leafnode  1.12.0
About: Leafnode is a store & forward NNTP proxy for small (dialup) sites.
  Fossies Dox: leafnode-1.12.0.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

texpire.c File Reference
#include "leafnode.h"
#include "ln_log.h"
#include <ctype.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "system.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include "mysigact.h"
#include "mastring.h"
Include dependency graph for texpire.c:

Go to the source code of this file.

Data Structures

struct  exp
 

Functions

static void sig_int (int signo)
 
static int th (const char *mm)
 
static void dogroup (struct newsgroup *g, const char *name, int expdays)
 
static void expiregroup (void)
 
static void fixupgroup (struct newsgroup *g)
 
static int readmids (void)
 
static int cleanmids (void)
 
static void expiremsgid (void)
 
int main (int argc, char **argv)
 

Variables

static time_t default_expire
 
int verbose = 0
 
int debug = 0
 
static int repair = 0
 
static int use_atime = 1
 
static int quiet = 0
 
static int eflag
 
static const char *const MIDSFILE = "mids"
 
static sigjmp_buf jmpbuffer
 
static int blocksig
 

Function Documentation

◆ cleanmids()

static int cleanmids ( void  )
static

Definition at line 558 of file texpire.c.

References log_unlink(), mastr_clear(), mastr_delete(), mastr_new(), mastr_str, mastr_vcat(), MIDSFILE, rc, snprintf, and spooldir.

Referenced by main().

◆ dogroup()

◆ expiregroup()

static void expiregroup ( void  )
static

◆ expiremsgid()

static void expiremsgid ( void  )
static

◆ fixupgroup()

static void fixupgroup ( struct newsgroup g)
static

Definition at line 491 of file texpire.c.

References chdirgroup(), FALSE, newsgroup::first, newsgroup::last, and newsgroup::name.

Referenced by main().

◆ main()

◆ readmids()

static int readmids ( void  )
static

Definition at line 500 of file texpire.c.

References critmalloc(), insertmsgid(), ln_log(), LNLOG_CTOP, LNLOG_SERR, log_unlink(), MIDSFILE, and rc.

Referenced by expiremsgid().

◆ sig_int()

static void sig_int ( int  signo)
static

Definition at line 70 of file texpire.c.

References blocksig, and jmpbuffer.

Referenced by main().

◆ th()

static int th ( const char *  mm)
static

Definition at line 82 of file texpire.c.

References barf(), critmalloc(), critstrdup(), ln_log(), LNLOG_CTOP, LNLOG_SERR, lookup(), and MIDSFILE.

Referenced by dogroup(), and main().

Variable Documentation

◆ blocksig

int blocksig
static

Definition at line 67 of file texpire.c.

Referenced by main(), and sig_int().

◆ debug

int debug = 0

Definition at line 50 of file texpire.c.

◆ default_expire

time_t default_expire
static

Definition at line 47 of file texpire.c.

Referenced by expiregroup(), and main().

◆ eflag

int eflag
static

Definition at line 56 of file texpire.c.

Referenced by dogroup(), and expiremsgid().

◆ jmpbuffer

sigjmp_buf jmpbuffer
static

Definition at line 66 of file texpire.c.

Referenced by main(), and sig_int().

◆ MIDSFILE

const char* const MIDSFILE = "mids"
static

Definition at line 58 of file texpire.c.

Referenced by cleanmids(), expiremsgid(), readmids(), and th().

◆ quiet

int quiet = 0
static

Definition at line 54 of file texpire.c.

Referenced by dogroup(), expiremsgid(), lock_is_stale(), main(), and try_lock().

◆ repair

int repair = 0
static

Definition at line 51 of file texpire.c.

Referenced by dogroup(), and main().

◆ use_atime

int use_atime = 1
static

Definition at line 53 of file texpire.c.

Referenced by dogroup(), and main().

◆ verbose

int verbose = 0

Definition at line 49 of file texpire.c.

Referenced by dogroup(), expiregroup(), expiremsgid(), and main().