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