xref: /titanic_53/usr/src/cmd/mailx/hdr/glob.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23*7c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
24*7c478bd9Sstevel@tonic-gate 
25*7c478bd9Sstevel@tonic-gate 
26*7c478bd9Sstevel@tonic-gate /*
27*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1998 by Sun Microsystems, Inc.
28*7c478bd9Sstevel@tonic-gate  * All rights reserved.
29*7c478bd9Sstevel@tonic-gate  */
30*7c478bd9Sstevel@tonic-gate 
31*7c478bd9Sstevel@tonic-gate /*
32*7c478bd9Sstevel@tonic-gate  * University Copyright- Copyright (c) 1982, 1986, 1988
33*7c478bd9Sstevel@tonic-gate  * The Regents of the University of California
34*7c478bd9Sstevel@tonic-gate  * All Rights Reserved
35*7c478bd9Sstevel@tonic-gate  *
36*7c478bd9Sstevel@tonic-gate  * University Acknowledgment- Portions of this document are derived from
37*7c478bd9Sstevel@tonic-gate  * software developed by the University of California, Berkeley, and its
38*7c478bd9Sstevel@tonic-gate  * contributors.
39*7c478bd9Sstevel@tonic-gate  */
40*7c478bd9Sstevel@tonic-gate 
41*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
42*7c478bd9Sstevel@tonic-gate 
43*7c478bd9Sstevel@tonic-gate /*
44*7c478bd9Sstevel@tonic-gate  * mailx -- a modified version of a University of California at Berkeley
45*7c478bd9Sstevel@tonic-gate  *	mail program
46*7c478bd9Sstevel@tonic-gate  *
47*7c478bd9Sstevel@tonic-gate  * A bunch of global variable declarations lie herein.
48*7c478bd9Sstevel@tonic-gate  * def.h must be included first.
49*7c478bd9Sstevel@tonic-gate  */
50*7c478bd9Sstevel@tonic-gate 
51*7c478bd9Sstevel@tonic-gate extern int		Fflag;		/* -F option (followup) */
52*7c478bd9Sstevel@tonic-gate extern int		Hflag;		/* print headers and exit */
53*7c478bd9Sstevel@tonic-gate extern char		*Tflag;		/* -T temp file for netnews */
54*7c478bd9Sstevel@tonic-gate extern int		UnUUCP;		/* -U flag */
55*7c478bd9Sstevel@tonic-gate extern char		**altnames;	/* List of alternate names for user */
56*7c478bd9Sstevel@tonic-gate extern int		askme;		/* ???? */
57*7c478bd9Sstevel@tonic-gate extern int		baud;		/* Output baud rate */
58*7c478bd9Sstevel@tonic-gate extern char		*bflag;		/* Bcc given from non tty */
59*7c478bd9Sstevel@tonic-gate extern char		*binmsg;	/* Message: content unprintable */
60*7c478bd9Sstevel@tonic-gate extern char		*cflag;		/* Cc given from non tty */
61*7c478bd9Sstevel@tonic-gate extern const struct cmd	cmdtab[];	/* ???? */
62*7c478bd9Sstevel@tonic-gate extern int		cond;		/* Current state of conditional exc. */
63*7c478bd9Sstevel@tonic-gate extern NODE		*curptr;	/* ???? */
64*7c478bd9Sstevel@tonic-gate extern int		debug;		/* Debug flag set */
65*7c478bd9Sstevel@tonic-gate extern char		domain[];	/* ???? */
66*7c478bd9Sstevel@tonic-gate extern struct message	*dot;		/* Pointer to current message */
67*7c478bd9Sstevel@tonic-gate extern int		edit;		/* Indicates editing a file */
68*7c478bd9Sstevel@tonic-gate extern char		*editfile;	/* Name of file being edited */
69*7c478bd9Sstevel@tonic-gate extern int		exitflg;	/* -e for mail test */
70*7c478bd9Sstevel@tonic-gate extern NODE		*fplist;	/* ???? */
71*7c478bd9Sstevel@tonic-gate extern struct grouphead	*groups[];	/* Pointer to active groups */
72*7c478bd9Sstevel@tonic-gate extern struct hdr	header[];	/* Known header types */
73*7c478bd9Sstevel@tonic-gate extern int		hflag;		/* Sequence number for network -h */
74*7c478bd9Sstevel@tonic-gate extern char		homedir[];	/* Name of home directory */
75*7c478bd9Sstevel@tonic-gate extern char		host[];		/* ???? */
76*7c478bd9Sstevel@tonic-gate extern struct ignore	*ignore[];	/* Pointer to ignored fields */
77*7c478bd9Sstevel@tonic-gate extern int		image;		/* File descriptor for image of msg */
78*7c478bd9Sstevel@tonic-gate extern FILE		*input;		/* Current command input file */
79*7c478bd9Sstevel@tonic-gate extern int		intty;		/* True if standard input a tty */
80*7c478bd9Sstevel@tonic-gate extern int		issysmbox;	/* mailname is a system mailbox */
81*7c478bd9Sstevel@tonic-gate extern FILE		*itf;		/* Input temp file buffer */
82*7c478bd9Sstevel@tonic-gate extern int		lexnumber;	/* Number of TNUMBER from scan() */
83*7c478bd9Sstevel@tonic-gate extern char		lexstring[];	/* String from TSTRING, scan() */
84*7c478bd9Sstevel@tonic-gate extern int		loading;	/* Loading user definitions */
85*7c478bd9Sstevel@tonic-gate extern char		*lockname;	/* named used for locking in /var/mail */
86*7c478bd9Sstevel@tonic-gate extern char		*maildir;	/* directory for mail files */
87*7c478bd9Sstevel@tonic-gate extern char		mailname[];	/* Name of /var/mail system mailbox */
88*7c478bd9Sstevel@tonic-gate extern off_t		mailsize;	/* Size of system mailbox */
89*7c478bd9Sstevel@tonic-gate extern int		maxfiles;	/* Maximum number of open files */
90*7c478bd9Sstevel@tonic-gate extern struct message	*message;	/* The actual message structure */
91*7c478bd9Sstevel@tonic-gate extern char		*metanet;	/* ???? */
92*7c478bd9Sstevel@tonic-gate extern int		msgCount;	/* Count of messages read in */
93*7c478bd9Sstevel@tonic-gate extern gid_t		myegid;		/* User's effective gid */
94*7c478bd9Sstevel@tonic-gate extern uid_t		myeuid;		/* User's effective uid */
95*7c478bd9Sstevel@tonic-gate extern char		myname[];	/* My login id */
96*7c478bd9Sstevel@tonic-gate extern pid_t		mypid;		/* Current process id */
97*7c478bd9Sstevel@tonic-gate extern gid_t		myrgid;		/* User's real gid */
98*7c478bd9Sstevel@tonic-gate extern uid_t		myruid;		/* User's real uid */
99*7c478bd9Sstevel@tonic-gate extern int		newsflg;	/* -I option for netnews */
100*7c478bd9Sstevel@tonic-gate extern char		noheader;	/* Suprress initial header listing */
101*7c478bd9Sstevel@tonic-gate extern int		noreset;	/* String resets suspended */
102*7c478bd9Sstevel@tonic-gate extern char		nosrc;		/* Don't source /etc/mail/mailx.rc */
103*7c478bd9Sstevel@tonic-gate extern int		nretained;	/* Number of retained fields */
104*7c478bd9Sstevel@tonic-gate extern int		numberstack[];	/* Stack of regretted numbers */
105*7c478bd9Sstevel@tonic-gate extern char		origname[];	/* Original name of mail file */
106*7c478bd9Sstevel@tonic-gate extern FILE		*otf;		/* Output temp file buffer */
107*7c478bd9Sstevel@tonic-gate extern int		outtty;		/* True if standard output a tty */
108*7c478bd9Sstevel@tonic-gate extern FILE		*pipef;		/* Pipe file we have opened */
109*7c478bd9Sstevel@tonic-gate extern char		*progname;	/* program name (argv[0]) */
110*7c478bd9Sstevel@tonic-gate extern char		*prompt;	/* prompt string */
111*7c478bd9Sstevel@tonic-gate extern int		rcvmode;	/* True if receiving mail */
112*7c478bd9Sstevel@tonic-gate extern int		readonly;	/* Will be unable to rewrite file */
113*7c478bd9Sstevel@tonic-gate extern int		regretp;	/* Pointer to TOS of regret tokens */
114*7c478bd9Sstevel@tonic-gate extern int		regretstack[];	/* Stack of regretted tokens */
115*7c478bd9Sstevel@tonic-gate extern struct ignore	*retain[HSHSIZE];/* Pointer to retained fields */
116*7c478bd9Sstevel@tonic-gate extern char		*rflag;		/* -r address for network */
117*7c478bd9Sstevel@tonic-gate extern int		rmail;		/* Being called as rmail */
118*7c478bd9Sstevel@tonic-gate extern int		sawcom;		/* Set after first command */
119*7c478bd9Sstevel@tonic-gate extern int		selfsent;	/* User sent self something */
120*7c478bd9Sstevel@tonic-gate extern int		senderr;	/* An error while checking */
121*7c478bd9Sstevel@tonic-gate extern int		rpterr;		/* An error msg was sent to stderr */
122*7c478bd9Sstevel@tonic-gate extern char		*sflag;		/* Subject given from non tty */
123*7c478bd9Sstevel@tonic-gate extern int		sourcing;	/* Currently reading variant file */
124*7c478bd9Sstevel@tonic-gate extern int		space;		/* Current maximum number of messages */
125*7c478bd9Sstevel@tonic-gate extern jmp_buf		srbuf;		/* ???? */
126*7c478bd9Sstevel@tonic-gate extern struct strings	stringdope[];	/* pointer for the salloc routines */
127*7c478bd9Sstevel@tonic-gate extern char		*stringstack[];	/* Stack of regretted strings */
128*7c478bd9Sstevel@tonic-gate extern char		tempEdit[];	/* ???? */
129*7c478bd9Sstevel@tonic-gate extern char		tempMail[];	/* ???? */
130*7c478bd9Sstevel@tonic-gate extern char		tempMesg[];	/* ???? */
131*7c478bd9Sstevel@tonic-gate extern char		tempQuit[];	/* ???? */
132*7c478bd9Sstevel@tonic-gate extern char		tempResid[];	/* temp file in :saved */
133*7c478bd9Sstevel@tonic-gate extern char		tempZedit[];	/* ???? */
134*7c478bd9Sstevel@tonic-gate extern int		tflag;		/* Read headers from text */
135*7c478bd9Sstevel@tonic-gate extern uid_t		uid;		/* The invoker's user id */
136*7c478bd9Sstevel@tonic-gate extern struct utimbuf	*utimep;	/* ???? */
137*7c478bd9Sstevel@tonic-gate extern struct var	*variables[];	/* Pointer to active var list */
138*7c478bd9Sstevel@tonic-gate extern const char *const version;	/* ???? */
139*7c478bd9Sstevel@tonic-gate extern int		receipt_flg;	/* Flag for return receipt */
140*7c478bd9Sstevel@tonic-gate 
141*7c478bd9Sstevel@tonic-gate /*
142*7c478bd9Sstevel@tonic-gate  * Standard external variables from the C library.
143*7c478bd9Sstevel@tonic-gate  */
144*7c478bd9Sstevel@tonic-gate extern char		*optarg;
145*7c478bd9Sstevel@tonic-gate extern int		optind;
146