1 /*@ S-nail - a mail user agent derived from Berkeley Mail.
2 *@ A bunch of global variable declarations lie herein.
3 *@ def.h must be included first.
5 * Copyright (c) 2000-2004 Gunnar Ritter, Freiburg i. Br., Germany.
6 * Copyright (c) 2012 - 2013 Steffen "Daode" Nurpmeso <sdaoden@users.sf.net>.
9 * Copyright (c) 1980, 1993
10 * The Regents of the University of California. All rights reserved.
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 * 3. All advertising materials mentioning features or use of this software
21 * must display the following acknowledgement:
22 * This product includes software developed by the University of
23 * California, Berkeley and its contributors.
24 * 4. Neither the name of the University nor the names of its contributors
25 * may be used to endorse or promote products derived from this software
26 * without specific prior written permission.
28 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
29 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
32 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 /* These two come from version.c */
42 extern char const *const uagent
; /* User agent */
43 extern char const *const version
; /* The version string */
45 /* The rest will end up in main.o */
53 _E gid_t effectivegid
; /* Saved from when we started up */
54 _E gid_t realgid
; /* Saved from when we started up */
56 _E
int mb_cur_max
; /* value of MB_CUR_MAX */
57 _E
int realscreenheight
; /* the real screen height */
58 _E
int scrnwidth
; /* Screen width, or best guess */
59 _E
int scrnheight
; /* Screen height, or best guess,
60 * for "header" command */
61 _E
int utf8
; /* UTF-8 encoding in use for locale */
62 _E
int enc_has_state
; /* Encoding has shift states */
64 _E
char **altnames
; /* List of alternate names for user */
65 _E
char const *homedir
; /* Path name of home directory */
66 _E
char const *myname
; /* My login name */
67 _E
char const *progname
; /* Our name */
68 _E
char const *tempdir
; /* The temporary directory */
70 _E
int exit_status
; /* Exit status */
71 _E
int options
; /* Bits of enum user_options */
72 _E
char *option_u_arg
; /* name given with -u option */
73 _E
char *option_r_arg
; /* argument to -r option */
74 _E
char const **smopts
; /* sendmail(1) options, command line */
75 _E
size_t smopts_count
; /* Entries in smopts */
77 _E
int inhook
; /* currently executing a hook */
78 _E bool_t edit
; /* Indicates editing a file */
79 _E bool_t did_print_dot
; /* current message has been printed */
80 _E bool_t msglist_is_single
; /* Last NDMLIST/MSGLIST *chose* 1 msg */
81 _E bool_t loading
; /* Loading user definitions */
82 _E bool_t sourcing
; /* Currently reading variant file */
83 _E bool_t sawcom
; /* Set after first command */
84 _E bool_t starting
; /* still in startup code */
85 _E bool_t unset_allow_undefined
; /* allow to unset undefined variables */
86 _E
int noreset
; /* String resets suspended */
88 /* XXX stylish sorting */
89 _E
int msgCount
; /* Count of messages read in */
90 _E
enum condition cond
; /* Current state of conditional exc. */
91 _E
struct mailbox mb
; /* Current mailbox */
92 _E
int image
; /* File descriptor for image of msg */
93 _E
char mailname
[MAXPATHLEN
]; /* Name of current file */
94 _E
char displayname
[80 - 40]; /* Prettyfied for display */
95 _E
char prevfile
[MAXPATHLEN
]; /* Name of previous file */
96 _E
char mboxname
[MAXPATHLEN
]; /* Name of mbox */
97 _E off_t mailsize
; /* Size of system mailbox */
98 _E
struct message
*dot
; /* Pointer to current message */
99 _E
struct message
*prevdot
; /* Previous current message */
100 _E
struct message
*message
; /* The actual message structure */
101 _E
struct message
*threadroot
; /* first threaded message */
102 _E
int msgspace
; /* Number of allocated struct m */
103 _E
struct var
*variables
[HSHSIZE
]; /* Pointer to active var list */
104 _E
struct grouphead
*groups
[HSHSIZE
]; /* Pointer to active groups */
105 _E
struct ignoretab ignore
[2]; /* ignored and retained fields
106 * 0 is ignore, 1 is retain */
107 _E
struct ignoretab saveignore
[2]; /* ignored and retained fields
108 * on save to folder */
109 _E
struct ignoretab allignore
[2]; /* special, ignore all headers */
110 _E
struct ignoretab fwdignore
[2]; /* fields to ignore for forwarding */
111 _E
struct shortcut
*shortcuts
; /* list of shortcuts */
112 _E
int imap_created_mailbox
; /* hack to get feedback from imap */
114 _E
struct time_current time_current
; /* time(3); send: mail1() XXX->carrier*/
115 _E
struct termios_state termios_state
; /* getpassword(); see commands().. */
117 /* These are initialized strings */
118 _E
char const *const month_names
[12 + 1];
119 _E
char const *const weekday_names
[7 + 1];
122 _E
enum ssl_vrfy_level ssl_vrfy_level
; /* SSL verification level */
137 _E sighandler_type handlerstacktop
;
138 #define handlerpush(f) (savedtop = handlerstacktop, handlerstacktop = (f))
139 #define handlerpop() (handlerstacktop = savedtop)
140 _E sighandler_type dflpipe
;