Annotation of 43BSDTahoe/new/news/src/params.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * params.h - parameters for everyone.
        !             3:  */
        !             4: 
        !             5: /*     @(#)params.h    2.25    10/15/87        */
        !             6: 
        !             7: #include <stdio.h>
        !             8: #include <signal.h>
        !             9: #include <sys/types.h>
        !            10: #include <grp.h>
        !            11: #include <pwd.h>
        !            12: #include <sys/stat.h>
        !            13: #include <ctype.h>
        !            14: 
        !            15: #include "defs.h"
        !            16: 
        !            17: #if defined(BSD4_2) || defined(BSD4_1C)
        !            18: #include <sys/time.h>
        !            19: #else /* sane */
        !            20: #include <time.h>
        !            21: #endif /* sane */
        !            22: 
        !            23: #ifndef UNAME
        !            24: /*
        !            25:  * 9 bytes is for compatibility with USG, in case you forget to define UNAME.
        !            26:  * 33 bytes in nodename because many sites have names longer than 8 chars.
        !            27:  */
        !            28: 
        !            29: struct utsname {
        !            30:        char    sysname[9];
        !            31:        char    nodename[33];
        !            32:        char    release[9];
        !            33:        char    version[9];
        !            34: };
        !            35: #else
        !            36: #include <sys/utsname.h>
        !            37: #endif
        !            38: 
        !            39: #ifndef USG
        !            40: #include <sys/timeb.h>
        !            41: #else
        !            42: struct timeb
        !            43: {
        !            44:        time_t  time;
        !            45:        unsigned short millitm;
        !            46:        short   timezone;
        !            47:        short   dstflag;
        !            48: };
        !            49: #endif
        !            50: 
        !            51: #include "header.h"
        !            52: 
        !            53: /* line from SUBFILE */
        !            54: struct srec {
        !            55:        char    s_name[2*BUFLEN];       /* system name          */
        !            56:        char    *s_nosend;              /* systems that inhibit sending */
        !            57:        char    s_nbuf[LBUFLEN];        /* system subscriptions */
        !            58:        char    s_flags[BUFLEN];        /* system flags         */
        !            59:        char    s_xmit[LBUFLEN];        /* system xmit routine  */
        !            60: };
        !            61: 
        !            62: extern int     uid, gid, duid, dgid;
        !            63: extern int     savmask, SigTrap, mode, lockcount;
        !            64: extern struct  hbuf header;
        !            65: extern char    bfr[LBUFLEN], *username, *userhome;
        !            66: 
        !            67: extern char    *SPOOL, *LIB, *BIN, *SUBFILE, *ACTIVE;
        !            68: extern char    *LOCKFILE, *SEQFILE, *ARTFILE;
        !            69: extern char    *news_version, *Progname;
        !            70: 
        !            71: #ifdef NOTIFY
        !            72: extern char    *TELLME;
        !            73: #endif /* NOTIFY */
        !            74: 
        !            75: extern char    *LOCALSYSNAME, *LOCALPATHSYSNAME, *FROMSYSNAME, *PATHSYSNAME;
        !            76: 
        !            77: #ifndef SHELL
        !            78: extern char    *SHELL;
        !            79: #endif /* !SHELL */
        !            80: 
        !            81: /* external function declarations */
        !            82: extern FILE    *xfopen(), *hread();
        !            83: extern char    *strcpy(), *strncpy(), *strcat(), *index(), *rindex();
        !            84: extern char    *ctime(), *mktemp(), *malloc(), *realloc(), *getenv();
        !            85: extern char    *arpadate(), *dirname(), *AllocCpy(), *strpbrk();
        !            86: extern char    *errmsg();
        !            87: extern struct  passwd *getpwnam(), *getpwuid(), *getpwent();
        !            88: extern struct  group *getgrnam();
        !            89: extern time_t  time(), getdate(), cgtdate();
        !            90: extern int     broadcast(), save(), newssave(), ushell(), onsig();
        !            91: extern long    atol();
        !            92: extern struct  tm *localtime();
        !            93: 
        !            94: #ifdef lint
        !            95: /* This horrible gross kludge is the only way I know to
        !            96:  * convince lint that signal(SIGINT,SIG_IGN) is legal. It hates SIG_IGN.
        !            97:  */
        !            98: #ifdef SIG_IGN
        !            99: #undef SIG_IGN
        !           100: #endif /* SIG_IGN */
        !           101: #define SIG_IGN        main
        !           102: extern int main();
        !           103: #endif /* lint */
        !           104: 
        !           105: #ifdef VMS
        !           106: #define LINK(a,b)      vmslink(a,b)
        !           107: #define UNLINK(a)      vmsdelete(a)
        !           108: FILE *art_open(), *xart_open();
        !           109: #else  
        !           110: #define LINK(a,b)      link(a,b)
        !           111: #define UNLINK(a)      unlink(a)
        !           112: #define art_open fopen
        !           113: #define xart_open xfopen
        !           114: #endif /* !VMS */
        !           115: 
        !           116: /* Check for old naming scheme using HIDDENNET */
        !           117: #ifdef HIDDENNET
        !           118: #  ifndef GENERICFROM          /* Ugly fix, only for use in pathinit.c */
        !           119: #    define GENERICFROM "%s%0.0s%s", HIDDENNET
        !           120: #    define HIDDENNET_IN_LOCALSYSNAME
        !           121: #  endif
        !           122: #  ifndef GENERICPATH
        !           123: #    define GENERICPATH HIDDENNET
        !           124: #  endif
        !           125: #endif
        !           126: 
        !           127: #ifdef M_XENIX
        !           128: /* fake SVID adivsory locking with xenix routines */
        !           129: #define lockf  locking
        !           130: #define F_ULOCK        0
        !           131: #define F_LOCK 3
        !           132: #define F_TLOCK        4
        !           133: #endif /* M_XENIX */
        !           134: 
        !           135: #ifdef IHCC
        !           136: #define DOGETUSERS
        !           137: #define LOGDIR
        !           138: #endif /* IHCC */
        !           139: 
        !           140: #ifdef BSD4_2
        !           141: #define MKDIR_SUB
        !           142: #define READDIR
        !           143: #endif /* BSD4_2 */
        !           144: 
        !           145: #ifdef READDIR
        !           146: #include <sys/dir.h>
        !           147: #else /* !READDIR */
        !           148: #include "ndir.h"
        !           149: #endif /* !READDIR */
        !           150: 
        !           151: #if defined(DBM) && !defined(M_XENIX)
        !           152: typedef struct {
        !           153:        char *dptr;
        !           154:        int dsize;
        !           155: } datum;
        !           156: #endif /* DBM &! XENIX */
        !           157: 
        !           158: #define STRCMP(a,b)  ((*(a) != *(b)) ? (*(a)-*(b)) : strcmp((a)+1, (b)+1))
        !           159: #define STRNCMP(a,b,n)  ((*(a) != *(b)) ? (*(a)-*(b)) : strncmp(a, b, n))
        !           160: #define PREFIX(a,b)  ((*(a) != *(b)) ? FALSE : prefix((a)+1, (b)+1))
        !           161: 
        !           162: #ifdef SERVER
        !           163: /* from clientlib.c */
        !           164: extern char    *getserverbyfile();
        !           165: extern int     server_init();
        !           166: extern  void   put_server();
        !           167: extern int     get_server();
        !           168: extern void    close_server();
        !           169: /* from nntp.c */
        !           170: extern FILE    *open_active();
        !           171: extern int     open_server();
        !           172: extern char    *set_group();
        !           173: extern char    *active_name();
        !           174: extern char    *group_name();
        !           175: extern FILE    *getarticle();
        !           176: extern FILE    *getartbyid();
        !           177: extern char    *article_name();
        !           178: extern void    sync_server();
        !           179: extern int     strindex();
        !           180: #endif /* SERVER */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.