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