File: globals.h

package info (click to toggle)
mutt 0.91.2-2
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,056 kB
  • ctags: 2,189
  • sloc: ansic: 34,582; sh: 203; makefile: 197; perl: 21; awk: 2
file content (147 lines) | stat: -rw-r--r-- 4,789 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/*
 * Copyright (C) 1996-8 Michael R. Elkins <me@cs.hmc.edu>
 * 
 *     This program is free software; you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation; either version 2 of the License, or
 *     (at your option) any later version.
 * 
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 * 
 *     You should have received a copy of the GNU General Public License
 *     along with this program; if not, write to the Free Software
 *     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */ 

/* nifty trick I stole from ELM 2.5alpha. */
#ifdef MAIN_C
#define WHERE 
#define INITVAL(x) = x
#else
#define WHERE extern
#define INITVAL(x) 
#endif

WHERE CONTEXT *Context;

WHERE char Errorbuf[SHORT_STRING];

WHERE char AliasFile[_POSIX_PATH_MAX];
WHERE char AliasFmt[SHORT_STRING];
WHERE char AttachSep[SHORT_STRING] INITVAL({0});
WHERE char Attribution[SHORT_STRING];
WHERE char Charset[SHORT_STRING];
WHERE char DecodeFmt[SHORT_STRING];
WHERE char DefaultHook[SHORT_STRING];
WHERE char DateFmt[SHORT_STRING];
WHERE char DsnNotify[SHORT_STRING] INITVAL({0});
WHERE char DsnReturn[SHORT_STRING] INITVAL({0});
WHERE char Editor[_POSIX_PATH_MAX];
WHERE char ForwFmt[SHORT_STRING];
WHERE char Fqdn[SHORT_STRING];
WHERE char HdrFmt[SHORT_STRING];
WHERE char Homedir[_POSIX_PATH_MAX];
WHERE char Hostname[SHORT_STRING];
WHERE char InReplyTo[SHORT_STRING];
WHERE char Inbox[_POSIX_PATH_MAX];
WHERE char Ispell[_POSIX_PATH_MAX];
WHERE char LastFolder[_POSIX_PATH_MAX];
WHERE char Locale[SHORT_STRING];
WHERE char MailcapPath[LONG_STRING];
WHERE char Maildir[_POSIX_PATH_MAX];
WHERE char MsgFmt[SHORT_STRING];
WHERE char Muttrc[_POSIX_PATH_MAX] INITVAL({0});
WHERE char Outbox[_POSIX_PATH_MAX] INITVAL({0});
WHERE char Pager[_POSIX_PATH_MAX];
WHERE char PagerFmt[SHORT_STRING];
WHERE char PipeSep[SHORT_STRING] INITVAL({0});
WHERE char PostIndentString[SHORT_STRING] INITVAL({0});
WHERE char Postponed[_POSIX_PATH_MAX];
WHERE char Prefix[SHORT_STRING];
WHERE char PrintCmd[_POSIX_PATH_MAX];
WHERE char Realname[SHORT_STRING];
WHERE char Sendmail[_POSIX_PATH_MAX];
WHERE char SendmailBounce[_POSIX_PATH_MAX];
WHERE char Shell[_POSIX_PATH_MAX];
WHERE char Signature[_POSIX_PATH_MAX];
WHERE char SimpleSearch[SHORT_STRING];
WHERE char Spoolfile[_POSIX_PATH_MAX];
WHERE char StChars[4]; /* -*%\0 */
WHERE char Status[STRING];
WHERE char Tempdir[_POSIX_PATH_MAX];
WHERE char Tochars[8]; /* " +TCF" */
WHERE char Username[SHORT_STRING];
WHERE char Visual[_POSIX_PATH_MAX];

WHERE LIST *AutoViewList INITVAL(0);
WHERE LIST *HeaderOrderList INITVAL(0);
WHERE LIST *Ignore INITVAL(0);
WHERE LIST *UnIgnore INITVAL(0);
WHERE LIST *MailLists INITVAL(0);

#ifdef USE_POP
WHERE char PopHost[SHORT_STRING] INITVAL({0});
WHERE char PopPass[SHORT_STRING] INITVAL({0});
WHERE char PopUser[SHORT_STRING] INITVAL({0});
#endif

/* bit vector for boolean variables */
#ifdef MAIN_C
unsigned char Options[(OPTMAX + 7)/8];
#else
extern unsigned char Options[];
#endif

/* bit vector for the yes/no/ask variable type */
WHERE unsigned long QuadOptions INITVAL (0);

WHERE char EscChar[2] INITVAL ("~"); /* $escape, used for $editor=builtin */

WHERE unsigned short Counter INITVAL (0);
WHERE short HistSize INITVAL (10);
WHERE short PagerContext INITVAL (0);
WHERE short PagerIndexLines INITVAL (0);
WHERE short PopPort INITVAL (110);
WHERE short ReadInc INITVAL (10);
WHERE short ScoreDefault INITVAL (10);
WHERE short Timeout INITVAL (600); /* seconds */
WHERE short TrimRef INITVAL (10);
WHERE short WriteInc INITVAL (10);

/* vector to store received signals */
WHERE short Signals INITVAL (0);

WHERE ALIAS *Aliases INITVAL (0);
WHERE LIST *UserHeader INITVAL (0);

#ifdef DEBUG
WHERE FILE *debugfile INITVAL (0);
WHERE int debuglevel INITVAL (0);
#endif

#ifdef USE_SETGID
WHERE gid_t MailGid;
WHERE gid_t UserGid;
#endif /* USE_SETGID */

#ifdef MAIN_C
const char *Weekdays[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
const char *Months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "ERR" };

const char *BodyTypes[] = { "x-unknown", "audio", "application", "image", "message", "multipart", "text", "video" };
const char *BodyEncodings[] = { "x-unknown", "7bit", "8bit", "quoted-printable", "base64", "binary" };
#else
extern const char *Weekdays[];
extern const char *Months[];
#endif

#ifdef MAIN_C
/* so that global vars get included */ 
#include "mx.h"
#include "mutt_regex.h"
#include "buffy.h"
#include "sort.h"
#endif /* MAIN_C */