|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T g
Length: 3990 (0xf96) Types: TextFile Names: »global.h«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit └─⟦f91e15335⟧ »EurOpenD3/news/nntp/nntplink2.0.0.tar.Z« └─⟦2c70c5e6b⟧ └─⟦this⟧ »global.h«
#include "conf.h" #include <stdio.h> #include <errno.h> #include <ctype.h> /*#include <strings.h> /* FIX THIS!!!! */ #include <sys/types.h> #ifdef BSD4_2 #include <sys/time.h> #include <sys/resource.h> #include <sys/ioctl.h> #include <sys/file.h> #else #include <sys/times.h> extern time_t time(); #endif BSD4_2 #include <fcntl.h> #include <signal.h> #ifdef USG #include "sysexits.h" #else #include <sysexits.h> #endif #ifdef SYSLOG #include <syslog.h> #endif SYSLOG #include "nntp.h" #ifdef BSD4_2 #include <sys/wait.h> #endif #include <sys/stat.h> #define MAXFNAME BUFSIZ /* maximum filename size - big enough? */ #define FCLOSE(fp) (void) fclose(fp); (fp) = (FILE *)NULL FILE *getfp(); char *errmsg(); void requeue(); void catchsig(); void logstats(); void log(); int interrupted(); void waitingfor(); void create_nntp_spoolfile(); /* ** Globals that certain things need. ** ** Various subroutines want the program name to report errors. ** The queue file, queue file pointer and current article name are ** there to write out the state of the queue file from a signal handler ** (that is, the list of unsent and (possibly) failed articles) so ** that when next we try sending to a given remote site, we don't send ** stuff we've already sent. */ extern char *Pname; /* this program's invocation name */ extern char *Host; /* current remote host */ extern char *TQfile; /* BOGUS HACK - ONLY IN BETA RELEASE */ extern char Qfile[MAXFNAME];/* current queue file we're operating on */ extern FILE *Qfp; /* the (FILE *) for above */ extern char Article[MAXFNAME]; /* current article filename */ extern char FailedArticle[MAXFNAME];/* article to requeue */ extern int resetstats; /* true after a logstats() */ extern unsigned short connected; extern char nntpfile[MAXFNAME]; char *safecopy(); /* ** Some flags, toggled by arguments */ #define TOGGLE(boolean) (boolean) = !(boolean) extern char Debug; extern char Report_Stats; extern char ReQueue_Fails; /* ** Numeric arguments */ extern int Close_After; /** close connection to remote at next pause if we've ** offered this many articles since last pause **/ extern int Log_After; /** log stats at next pause if we've proposed this many ** articles since last pause **/ extern int Sleep_Time; /** Sleep Sleep_Time seconds between checks of the ** queue file. **/ extern char CheckIdleTimeout; extern long IdleTimeOut; /** if we've been waiting for batch file for longer ** than this many seconds, close link while waiting **/ extern char CheckExitTimeout; extern long ExitTimeOut; /** if we've been waiting for batch file for longer ** than this many seconds, exit the program **/ extern char *USAGE; extern char *Fmt; extern char *E_fopen; extern char *E_unlk; #ifdef USELOG extern char *NNTPlog; /* yet another external log file */ extern FILE *Logfp; extern int fd; #endif USELOG extern struct { u_long offered; u_long accepted; u_long rejected; u_long failed; u_long since_close; } Stats; extern double Tbegin, Tend; /* transfer timestamps */ extern double ouser, osys; extern double user, sys; extern int errno; extern int strncmp(); extern char *rindex(); extern char *index(); extern char *mktemp(); extern char *strcpy(); #ifdef USG void bzero(s, l) register caddr_t s; register int l; { while(l-- > 0) *s++ = 0; } #endif USG /* ** Former parts of main(), now externals. */ extern int i; extern int transport; /* default is IP/TCP */ #ifdef USELOG extern char *amode; #endif USELOG #ifdef BSD4_2 extern struct timeval tod; extern struct timezone tz; #endif BSD4_2 extern int cnews; extern int Use_Log_File; extern int In_Log_File; extern char logline[MAXLOGLENGTH]; extern char old_logline[MAXLOGLENGTH]; extern char orig_Qfile[MAXFNAME]; extern char orig_nntpfile[MAXFNAME]; extern char sysname[MAXSYSNAME];