backward compatible processing for "+/pattern"
[unix-history] / usr / src / usr.bin / mail / glob.h
CommitLineData
761330fe
DF
1/*
2 * Copyright (c) 1980 Regents of the University of California.
0c5f72fb 3 * All rights reserved.
761330fe 4 *
0c5f72fb 5 * Redistribution and use in source and binary forms are permitted
acfc7e9b
KB
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.
0c5f72fb 16 *
85d5837f 17 * @(#)glob.h 5.18 (Berkeley) %G%
761330fe 18 */
2ae9f53f 19
e6a88a51
KS
20/*
21 * A bunch of global variable declarations lie herein.
22 * def.h must be included first.
23 */
24
e6a88a51 25int msgCount; /* Count of messages read in */
e6a88a51
KS
26int rcvmode; /* True if receiving mail */
27int sawcom; /* Set after first command */
31840345 28char *Tflag; /* -T temp file for netnews */
e6a88a51
KS
29int senderr; /* An error while checking */
30int edit; /* Indicates editing a file */
df1ae8ec 31int readonly; /* Will be unable to rewrite file */
e6a88a51
KS
32int noreset; /* String resets suspended */
33int sourcing; /* Currently reading variant file */
ef4abe32 34int loading; /* Loading user definitions */
b04d2a11 35int cond; /* Current state of conditional exc. */
e6a88a51
KS
36FILE *itf; /* Input temp file buffer */
37FILE *otf; /* Output temp file buffer */
df1ae8ec 38FILE *pipef; /* Pipe file we have opened */
e6a88a51
KS
39int image; /* File descriptor for image of msg */
40FILE *input; /* Current command input file */
2a0f6531
EW
41char mailname[PATHSIZE]; /* Name of current file */
42char prevfile[PATHSIZE]; /* Name of previous file */
f674e088
EW
43char *homedir; /* Path name of home directory */
44char *myname; /* My login name */
e6a88a51
KS
45off_t mailsize; /* Size of system mailbox */
46int lexnumber; /* Number of TNUMBER from scan() */
47char lexstring[STRINGLEN]; /* String from TSTRING, scan() */
48int regretp; /* Pointer to TOS of regret tokens */
49int regretstack[REGDEP]; /* Stack of regretted tokens */
85d5837f 50char *string_stack[REGDEP]; /* Stack of regretted strings */
e6a88a51
KS
51int numberstack[REGDEP]; /* Stack of regretted numbers */
52struct message *dot; /* Pointer to current message */
53struct message *message; /* The actual message structure */
54struct var *variables[HSHSIZE]; /* Pointer to active var list */
55struct grouphead *groups[HSHSIZE];/* Pointer to active groups */
887efe38
EW
56struct ignoretab ignore[2]; /* ignored and retained fields
57 0 is ignore, 1 is retain */
58struct ignoretab saveignore[2]; /* ignored and retained fields
59 on save to folder */
2de8fc95 60struct ignoretab ignoreall[2]; /* special, ignore all headers */
d1361008 61char **altnames; /* List of alternate names for user */
e6a88a51 62int debug; /* Debug flag set */
828615a1 63int screenwidth; /* Screen width, or best guess */
d56fd190
EW
64int screenheight; /* Screen height, or best guess,
65 for "header" command */
66int realscreenheight; /* the real screen height */
e6a88a51
KS
67
68#include <setjmp.h>
69
70jmp_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
c42869b9 80#define NSPACE 25 /* Total number of string spaces */
e6a88a51
KS
81struct 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];