1: /*
   2:  * Common declarations, includes, and other goodies.
   3:  *
   4:  * @(#)common.h	1.26.1	(2.11BSD) 12/31/93
   5:  */
   6: 
   7: 
   8: #include <stdio.h>
   9: #include <sys/types.h>
  10: #include <sys/stat.h>
  11: #include <errno.h>
  12: #include <ctype.h>
  13: #include <pwd.h>
  14: #include <sys/file.h>
  15: #include <sys/param.h>
  16: 
  17: #include "../common/nntp.h"
  18: #include "../common/conf.h"
  19: 
  20: #ifdef SYSLOG
  21: # ifdef FAKESYSLOG
  22: #  include "fakesyslog.h"
  23: # else
  24: #  include <syslog.h>
  25: # endif
  26: #endif
  27: 
  28: #ifdef USG
  29: extern struct passwd *getpwent(), *getpwuid(), *getpwnam();
  30: # include <string.h>
  31: #else not USG
  32: # include <strings.h>
  33: # include <sys/wait.h>
  34: #endif not USG
  35: 
  36: #ifdef NDIR
  37: # include <ndir.h>
  38: #else not NDIR
  39: # include <sys/dir.h>
  40: #endif not NDIR
  41: 
  42: #ifdef FCNTL
  43: # include <fcntl.h>
  44: #endif FCNTL
  45: 
  46: /*
  47:  * <dbm.h> stupidly defines NULL, which is why the following
  48:  * brain death is necessary.
  49:  */
  50: 
  51: #ifdef DBM
  52: # undef NULL
  53: # include <dbm.h>
  54: # undef NULL
  55: # define NULL   0
  56: #endif DBM
  57: 
  58: #ifdef NDBM
  59: # include <ndbm.h>
  60: #endif
  61: 
  62: /*
  63:  * Some generic maximums.
  64:  */
  65: 
  66: #ifndef MAXPATHLEN
  67: #define MAXPATHLEN  1024
  68: #endif not MAXPATHLEN
  69: 
  70: #ifndef MAXHOSTNAMELEN
  71: #define MAXHOSTNAMELEN  256
  72: #endif not MAXHOSTNAMELEN
  73: 
  74: #define MAXBUFLEN   1024
  75: 
  76: /*
  77:  * For "spew()"
  78:  */
  79: 
  80: #define ARTICLE 0
  81: #define HEAD    1
  82: #define BODY    2
  83: #define STAT    3
  84: 
  85: /*
  86:  * For "ngmatch()"
  87:  */
  88: 
  89: #define ALLBUT  1
  90: 
  91: #define valid_art(s)    (atoi(s) != 0)
  92: 
  93: #define putline(s)  fputs((s), stdout); putchar('\r'); putchar('\n');
  94: 
  95: extern  int errno;
  96: 
  97: extern  char    *gets(), *fgets();
  98: extern  char    *mktemp();
  99: extern  FILE    *open_valid_art();
 100: extern  FILE    *openartbyid();
 101: extern  char    *gethistent();
 102: extern  int restreql();
 103: extern  int s1strneql();    /* for ngmatch */
 104: 
 105: extern  char    spooldir[];
 106: extern  char    activefile[];
 107: extern  char    accessfile[];
 108: extern  char    historyfile[];
 109: extern  char    ngdatefile[];
 110: extern  char    inews[];
 111: extern  char    rnews[];
 112: 
 113: extern  char    **group_array;
 114: extern  int num_groups;
 115: extern  char    *homedir;
 116: extern  int ingroup;
 117: extern  int maxgroups;
 118: extern  int art_array[];
 119: extern  int art_ptr;
 120: extern  FILE    *art_fp;
 121: extern  int num_arts;
 122: extern  int uid_poster, gid_poster;
 123: extern  int canread, canpost, canxfer;
 124: extern  char    **ngpermlist;
 125: extern  int ngpermcount;
 126: 
 127: extern  char    nntp_version[];
 128: 
 129: #ifdef LOG
 130: extern  int grps_acsd, arts_acsd;
 131: extern  char    hostname[];
 132: 
 133: extern  int ih_accepted;
 134: extern  int ih_rejected;
 135: extern  int ih_failed;
 136: 
 137: extern  int nn_told;
 138: extern  int nn_took;
 139: #endif

Defined macros

ARTICLE defined in line 80; used 2 times
BODY defined in line 82; used 2 times
HEAD defined in line 81; used 2 times
MAXHOSTNAMELEN defined in line 71; used 1 times
  • in line 70
MAXPATHLEN defined in line 67; used 1 times
  • in line 66
NULL defined in line 55; used 2 times
STAT defined in line 83; used 2 times

Usage of this include

Last modified: 1994-01-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3866
Valid CSS Valid XHTML 1.0 Strict