Home | History | Annotate | Line # | Download | only in mail
glob.h revision 1.1
      1  1.1  cgd /*
      2  1.1  cgd  * Copyright (c) 1980 Regents of the University of California.
      3  1.1  cgd  * All rights reserved.
      4  1.1  cgd  *
      5  1.1  cgd  * Redistribution and use in source and binary forms, with or without
      6  1.1  cgd  * modification, are permitted provided that the following conditions
      7  1.1  cgd  * are met:
      8  1.1  cgd  * 1. Redistributions of source code must retain the above copyright
      9  1.1  cgd  *    notice, this list of conditions and the following disclaimer.
     10  1.1  cgd  * 2. Redistributions in binary form must reproduce the above copyright
     11  1.1  cgd  *    notice, this list of conditions and the following disclaimer in the
     12  1.1  cgd  *    documentation and/or other materials provided with the distribution.
     13  1.1  cgd  * 3. All advertising materials mentioning features or use of this software
     14  1.1  cgd  *    must display the following acknowledgement:
     15  1.1  cgd  *	This product includes software developed by the University of
     16  1.1  cgd  *	California, Berkeley and its contributors.
     17  1.1  cgd  * 4. Neither the name of the University nor the names of its contributors
     18  1.1  cgd  *    may be used to endorse or promote products derived from this software
     19  1.1  cgd  *    without specific prior written permission.
     20  1.1  cgd  *
     21  1.1  cgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     22  1.1  cgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23  1.1  cgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24  1.1  cgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     25  1.1  cgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     26  1.1  cgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     27  1.1  cgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     28  1.1  cgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     29  1.1  cgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     30  1.1  cgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     31  1.1  cgd  * SUCH DAMAGE.
     32  1.1  cgd  *
     33  1.1  cgd  *	@(#)glob.h	5.20 (Berkeley) 6/25/90
     34  1.1  cgd  */
     35  1.1  cgd 
     36  1.1  cgd /*
     37  1.1  cgd  * A bunch of global variable declarations lie herein.
     38  1.1  cgd  * def.h must be included first.
     39  1.1  cgd  */
     40  1.1  cgd 
     41  1.1  cgd int	msgCount;			/* Count of messages read in */
     42  1.1  cgd int	rcvmode;			/* True if receiving mail */
     43  1.1  cgd int	sawcom;				/* Set after first command */
     44  1.1  cgd char	*Tflag;				/* -T temp file for netnews */
     45  1.1  cgd int	senderr;			/* An error while checking */
     46  1.1  cgd int	edit;				/* Indicates editing a file */
     47  1.1  cgd int	readonly;			/* Will be unable to rewrite file */
     48  1.1  cgd int	noreset;			/* String resets suspended */
     49  1.1  cgd int	sourcing;			/* Currently reading variant file */
     50  1.1  cgd int	loading;			/* Loading user definitions */
     51  1.1  cgd int	cond;				/* Current state of conditional exc. */
     52  1.1  cgd FILE	*itf;				/* Input temp file buffer */
     53  1.1  cgd FILE	*otf;				/* Output temp file buffer */
     54  1.1  cgd int	image;				/* File descriptor for image of msg */
     55  1.1  cgd FILE	*input;				/* Current command input file */
     56  1.1  cgd char	mailname[PATHSIZE];		/* Name of current file */
     57  1.1  cgd char	prevfile[PATHSIZE];		/* Name of previous file */
     58  1.1  cgd char	*homedir;			/* Path name of home directory */
     59  1.1  cgd char	*myname;			/* My login name */
     60  1.1  cgd off_t	mailsize;			/* Size of system mailbox */
     61  1.1  cgd int	lexnumber;			/* Number of TNUMBER from scan() */
     62  1.1  cgd char	lexstring[STRINGLEN];		/* String from TSTRING, scan() */
     63  1.1  cgd int	regretp;			/* Pointer to TOS of regret tokens */
     64  1.1  cgd int	regretstack[REGDEP];		/* Stack of regretted tokens */
     65  1.1  cgd char	*string_stack[REGDEP];		/* Stack of regretted strings */
     66  1.1  cgd int	numberstack[REGDEP];		/* Stack of regretted numbers */
     67  1.1  cgd struct	message	*dot;			/* Pointer to current message */
     68  1.1  cgd struct	message	*message;		/* The actual message structure */
     69  1.1  cgd struct	var	*variables[HSHSIZE];	/* Pointer to active var list */
     70  1.1  cgd struct	grouphead	*groups[HSHSIZE];/* Pointer to active groups */
     71  1.1  cgd struct	ignoretab	ignore[2];	/* ignored and retained fields
     72  1.1  cgd 					   0 is ignore, 1 is retain */
     73  1.1  cgd struct	ignoretab	saveignore[2];	/* ignored and retained fields
     74  1.1  cgd 					   on save to folder */
     75  1.1  cgd struct	ignoretab	ignoreall[2];	/* special, ignore all headers */
     76  1.1  cgd char	**altnames;			/* List of alternate names for user */
     77  1.1  cgd int	debug;				/* Debug flag set */
     78  1.1  cgd int	screenwidth;			/* Screen width, or best guess */
     79  1.1  cgd int	screenheight;			/* Screen height, or best guess,
     80  1.1  cgd 					   for "header" command */
     81  1.1  cgd int	realscreenheight;		/* the real screen height */
     82  1.1  cgd 
     83  1.1  cgd #include <setjmp.h>
     84  1.1  cgd 
     85  1.1  cgd jmp_buf	srbuf;
     86  1.1  cgd 
     87  1.1  cgd 
     88  1.1  cgd /*
     89  1.1  cgd  * The pointers for the string allocation routines,
     90  1.1  cgd  * there are NSPACE independent areas.
     91  1.1  cgd  * The first holds STRINGSIZE bytes, the next
     92  1.1  cgd  * twice as much, and so on.
     93  1.1  cgd  */
     94  1.1  cgd 
     95  1.1  cgd #define	NSPACE	25			/* Total number of string spaces */
     96  1.1  cgd struct strings {
     97  1.1  cgd 	char	*s_topFree;		/* Beginning of this area */
     98  1.1  cgd 	char	*s_nextFree;		/* Next alloctable place here */
     99  1.1  cgd 	unsigned s_nleft;		/* Number of bytes left here */
    100  1.1  cgd } stringdope[NSPACE];
    101