1 /* 2 * Copyright (c) 1980 Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that this notice is preserved and that due credit is given 7 * to the University of California at Berkeley. The name of the University 8 * may not be used to endorse or promote products derived from this 9 * software without specific prior written permission. This software 10 * is provided ``as is'' without express or implied warranty. 11 * 12 * @(#)glob.h 5.10 (Berkeley) 06/19/88 13 */ 14 15 /* 16 * A bunch of global variable declarations lie herein. 17 * def.h must be included first. 18 */ 19 20 int msgCount; /* Count of messages read in */ 21 int mypid; /* Current process id */ 22 int rcvmode; /* True if receiving mail */ 23 int sawcom; /* Set after first command */ 24 char *Tflag; /* -T temp file for netnews */ 25 char nosrc; /* Don't source /usr/lib/Mail.rc */ 26 int senderr; /* An error while checking */ 27 int edit; /* Indicates editing a file */ 28 int readonly; /* Will be unable to rewrite file */ 29 int noreset; /* String resets suspended */ 30 int sourcing; /* Currently reading variant file */ 31 int loading; /* Loading user definitions */ 32 int cond; /* Current state of conditional exc. */ 33 FILE *itf; /* Input temp file buffer */ 34 FILE *otf; /* Output temp file buffer */ 35 FILE *pipef; /* Pipe file we have opened */ 36 int image; /* File descriptor for image of msg */ 37 FILE *input; /* Current command input file */ 38 char mailname[PATHSIZE]; /* Name of current file */ 39 char prevfile[PATHSIZE]; /* Name of previous file */ 40 int uid; /* The invoker's user id */ 41 char mailrc[PATHSIZE]; /* Name of startup file */ 42 char deadletter[PATHSIZE]; /* Name of #/dead.letter */ 43 char homedir[PATHSIZE]; /* Path name of home directory */ 44 char myname[PATHSIZE]; /* My login id */ 45 off_t mailsize; /* Size of system mailbox */ 46 int lexnumber; /* Number of TNUMBER from scan() */ 47 char lexstring[STRINGLEN]; /* String from TSTRING, scan() */ 48 int regretp; /* Pointer to TOS of regret tokens */ 49 int regretstack[REGDEP]; /* Stack of regretted tokens */ 50 char *stringstack[REGDEP]; /* Stack of regretted strings */ 51 int numberstack[REGDEP]; /* Stack of regretted numbers */ 52 struct message *dot; /* Pointer to current message */ 53 struct message *message; /* The actual message structure */ 54 struct var *variables[HSHSIZE]; /* Pointer to active var list */ 55 struct grouphead *groups[HSHSIZE];/* Pointer to active groups */ 56 struct ignoretab ignore[2]; /* ignored and retained fields 57 0 is ignore, 1 is retain */ 58 struct ignoretab saveignore[2]; /* ignored and retained fields 59 on save to folder */ 60 char **altnames; /* List of alternate names for user */ 61 char **localnames; /* List of aliases for our local host */ 62 int debug; /* Debug flag set */ 63 int screenwidth; /* Screen width, or best guess */ 64 int screenheight; /* Screen height, or best guess, 65 for "header" command */ 66 int realscreenheight; /* the real screen height */ 67 68 #include <setjmp.h> 69 70 jmp_buf srbuf; 71 72 73 /* 74 * The pointers for the string allocation routines, 75 * there are NSPACE independent areas. 76 * The first holds STRINGSIZE bytes, the next 77 * twice as much, and so on. 78 */ 79 80 #define NSPACE 25 /* Total number of string spaces */ 81 struct strings { 82 char *s_topFree; /* Beginning of this area */ 83 char *s_nextFree; /* Next alloctable place here */ 84 unsigned s_nleft; /* Number of bytes left here */ 85 } stringdope[NSPACE]; 86