home *** CD-ROM | disk | FTP | other *** search
- # include "nrs.h"
-
- # ifndef lint
- static char RCSid[] = "@(#)$Header: defs.c,v 3.6 88/09/08 17:38:44 pb Exp $";
- # endif
- /********************************************************\
- * *
- * Various variables that are used all around the place. *
- * Also, most of the compiled in lookup tables etc etc. *
- * *
- * Julian Onions <jpo@uk.ac.nott.cs> *
- * *
- \********************************************************/
-
- Table tablist[MAXTABLES]; /* the list of atomic files */
-
- Lookup netnames[] = { /* network to string table */
- "JANET", JANET,
- "PSS", PSS,
- "TELEX", TELEX,
- 0, 0
- };
-
- Lookup lc_netnames[] = { /* network to string table */
- "janet", JANET,
- "pss", PSS,
- "telex", TELEX,
- 0, 0
- };
-
- Lookup netabbrevs[] = { /* network to string table */
- "J", JANET,
- "P", PSS,
- "T", TELEX,
- 0, 0
- };
-
- Lookup contexts[] = { /* nrs contexts to internal table */
- "X29", X29,
- "TS29", TS29,
- "FTP", NIFTP,
- "NIFTP", NIFTP,
- "FTP", NIFTP,
- "MAIL", MAIL_NIFTP,
- "MAIL-NIFTP", MAIL_NIFTP,
- "MAIL-X29", MAIL_X29,
- "MAIL-TELEX", MAIL_TELEX,
- "JTMP", JTMP,
- "JTMP-FILES", JTMP_FILES,
- "JTMP-REG", JTMP_REG,
- "YBTS-NODE", YBTS_NODE,
- "YBTS", YBTS,
- "DESC", DESC,
- 0, 0
- };
-
- Lookup directions[] = { /* nrs directions to internal table */
- "FORWARDS", DIR_FORWARDS,
- "REVERSE", DIR_REVERSE,
- "FORWARD", DIR_FORWARDS,
- "INVERSE", DIR_REVERSE,
- 0, 0
- };
-
- #ifdef F_YORK
- Lookup exp_services[] = { /* contexts to explicit york-box table */
- /* i.e. use name EXACTLY asis */
- "x", X29,
- "T", TS29,
- "F", NIFTP,
- "M", MAIL_NIFTP,
- "0", MAIL_TELEX,
- "1", MAIL_X29,
- "J", JTMP,
- "2", JTMP_FILES,
- "R", JTMP_REG,
- "3", YBTS_NODE,
- "4", YBTS,
- 0, 0
- };
-
- Lookup imp_services[] = { /* contexts to implicit york-box table */
- /* i.e. suffix `/<default YB string>' */
- "x", X29,
- "t", TS29,
- "f", NIFTP,
- "m", MAIL_NIFTP,
- 0, 0
- };
-
- Lookup def_ybstring[] = { /* contexts to default YB string table */
- "", X29,
- "TS29", TS29,
- "FTP", NIFTP,
- "FTP.MAIL", MAIL_NIFTP,
- 0, 0
- };
- #endif F_YORK
-
- #ifdef F_YORK21
- Lookup exp_21services[] = { /* contexts to D2.1 york-box table */
- "X", X29,
- "T", TS29,
- "F", NIFTP,
- "M", MAIL_NIFTP,
- "J", JTMP,
- 0, 0
- };
-
- #ifndef F_YORK
- Lookup def_ybstring[] = { /* contexts to default YB string table */
- "", X29,
- "TS29", TS29,
- "FTP", NIFTP,
- "FTP.MAIL", MAIL_NIFTP,
- 0, 0
- };
- #endif F_YORK
- #endif F_YORK21
-
- #ifdef F_VMS4
- Lookup vms4_services[] = { /* name of a context for VMS version 4 */
- "X29", X29,
- "TS29", TS29,
- "FTP", NIFTP,
- "MAIL", MAIL_NIFTP,
- "JTMP", JTMP,
- 0, 0
- };
- #endif F_VMS4
-
- #ifdef F_VMS5
- Lookup vms5_services[] = { /* name of a context for VMS version 5 */
- "X29", X29,
- "TS29", TS29,
- "FTP", NIFTP,
- "MAIL", MAIL_NIFTP,
- "JTMP", JTMP,
- 0, 0
- };
- #endif F_VMS5
-
- char *invo_name; /* who we are */
- char *M2file; /* module 2 file */
- char *M3file; /* module 3 file */
- char *M4file; /* module 4 file */
- char *Derfile; /* derived file */
- char *DOMfile; /* domain file */
-
- # ifdef MULT_OUTPUT_FILES
- File_list fil_list[MAXDOMAINS]; /* mmdf domains list */
- char *relay_host; /* relay host to janet */
- # endif MULT_OUTPUT_FILES
-
- int usederfil = 0; /* use derived file (1) or filelets (0) */
- int max_fnumb = 0; /* max atomic file number */
- int fnumb = 0; /* the max file number */
- int verbose = 0; /* do you want to see whats going on */
- int warns = 0; /* Count of warns so far */
- int max_warns = 20; /* max number of warns */
- int ignore_relay=0; /* ignore application relay strings --
- * e.g. in VMS still generate entry */
- int forwrev = UNSET; /* forward/reverse lookup */
- int longshort = UNSET; /* format desired long/short */
- int mixlow = UNSET; /* upper/lower case */
- int options = 0; /* output specific options */
- int (*outputformat)() = noformat; /* how to display it */
- int (*outputm4rec)() = 0; /* how to display it */
- int (*outputdomain)() = 0; /* how to display domains */
- int trip2fnumb[MAXCONTEXTS][MAXSUBNETS][MAXDIRECTIONS];
- /* Map triple to file number */
- int cont_want[MAXCONTEXTS];
- struct f2t fnumb2trip[MAX_FNUMB]; /* Map file number to triple */
- char *janetgateway; /* gateway to janet */
- char *pssgateway; /* gateway to pss */
- char *directory; /* the directory to find files in */
- char *stripoff; /* strip off this prefix */
- char *hostname; /* the name of this host */
- char *commentfile; /* the file with the comments in*/
- char nullstring[] = ""; /* THE null string */
-
- #ifdef PRIME
- null()
- {
- ;
- }
- #endif PRIME
-