]> diplodocus.org Git - nmh/blob - docs/historical/mh-nov-1983/cmds/mh.h
Removed --depth 1 from git clone invocation.
[nmh] / docs / historical / mh-nov-1983 / cmds / mh.h
1 #define ALL ""
2
3 #define MAXARGS 1000 /* Max messages to exec */
4
5 #define EXISTS 01 /* Flag bits in msgstats-- Deleted is */
6 #define DELETED 02 /* undefined currently */
7 #define SELECTED 04 /* Message selected by an arg */
8
9 #define READONLY 01 /* No write access to folder */
10 #define DEFMOD 01 /* In-core profile has been modified */
11
12 /*#define NEWS 1 /* Define for news inclusion */
13
14 struct swit {
15 char *sw;
16 int minchars;
17 };
18
19 /*
20 * m_gmsg() returns this structure. It contains the per folder
21 * information which is obtained from reading the folder directory.
22 */
23
24 struct msgs {
25 int hghmsg; /* Highest msg in directory */
26 int nummsg; /* Actual Number of msgs */
27 int lowmsg; /* Lowest msg number */
28 int curmsg; /* Number of current msg if any */
29 int lowsel; /* Lowest selected msg number */
30 int hghsel; /* Highest selected msg number */
31 int numsel; /* Number of msgs selected */
32 char *foldpath; /* Pathname of folder */
33 char selist, /* Folder has a "select" file */
34 msgflags, /* Folder status bits */
35 filler,
36 others; /* Folder has other file(s) */
37 char msgstats[1]; /* Stat bytes for each msg */
38 };
39
40 /* m_getfld definitions and return values */
41
42 #define NAMESZ 64 /* Limit on component name size */
43 #define LENERR -2 /* Name too long error from getfld */
44 #define FMTERR -3 /* Message Format error */
45
46 /* m_getfld return codes */
47 #define FLD 0 /* Field returned */
48 #define FLDPLUS 1 /* Field " with more to come */
49 #define FLDEOF 2 /* Field " ending at eom */
50 #define BODY 3 /* Body " with more to come */
51 #define BODYEOF 4 /* Body " ending at eom */
52 #define FILEEOF 5 /* Reached end of input file */
53
54 /*
55 * These standard strings are defined in strings.a. They are the
56 * only system-dependent parameters in MH, and thus by redefining
57 * their values and reloading the various modules, MH will run
58 * on any system.
59 */
60
61 char
62 *components, /* Name of user's component file (in mh dir) */
63 *current, /* Name of current msg file in a folder */
64 *defalt, /* Name of the std folder (inbox) */
65 *distcomps, /* Name of `dist' components file */
66 *draft, /* Name of the normal draft file */
67 *fileproc, /* Path of file program */
68 *foldprot, /* Default folder protection */
69 *hostname, /* Local net host name */
70 *installproc, /* Name of auto-install program path */
71 *listname, /* Default selection list folder name */
72 *lockdir, /* Dir for lock files (Same fs as mailboxes)*/
73 *lsproc, /* Path of the Harvard ls program */
74 *mailboxes, /* Incoming mail directory */
75 *mh_prof, /* Name of users profile file */
76 *mh_deliver, /* Name of deliverer for mh */
77 *mhnews, /* Name of MH news file */
78 *msgprot, /* Default message protection (s.a. 0664) */
79 *pfolder, /* Name of current folder profile entry */
80 *prproc, /* Path of the pr program */
81 *scanproc, /* Path of the scan program */
82 *showproc, /* Path of the type (l) program */
83 *sendproc, /* Path of the send message program */
84 *stdcomps, /* Std comp file if missing user's own */
85 *stddcomps, /* Std dist file if missing user's own */
86 *sysed, /* Path of the std (ned) editor */
87 /* Just about every program uses this also */
88 *mypath; /* User's log-on path */
89
90 #ifdef UNIXCOMP
91 char *unixtomh; /* Path of program to convert UNIX style
92 mailboxes to MH style mailboxes */
93 char *Mailprog; /* Path of program to do actual mailing */
94 char *localname; /* Name of local machine on local net */
95 #endif
96
97 /*
98 * node structure used to hold a linked list of the users profile
99 * information taken from logpath/.mh_prof.
100 */
101
102 struct node {
103 struct node *n_next;
104 char *n_name,
105 *n_field;
106 } *m_defs;
107
108 char def_flags;
109
110
111 /*
112 * The first char in the mhnews file indicates whether the program
113 * calling m_news() should continue running or halt.
114 */
115
116 #define NEWSHALT '!' /* Halt after showing the news */
117 #define NEWSCONT ' ' /* Continue (ditto) */
118 #define NEWSPAUSE '\001' /* Pause during news output... */
119
120
121 /*
122 * Miscellaneous Defines to speed things up
123 */
124
125 #define error(str) { fprintf(stderr, "%s\n", str); exit(-1); }
126
127 /*
128 * Routine type declarations -- needed by version 7 compiler
129 */
130
131 char **brkstring();
132 char *m_maildir();
133 char *m_find();
134 char *m_name();
135 char *concat();
136 char *getcpy();
137 char *trimcpy();
138 char *add();
139 char *invo_name();
140 char **copyip();
141 char *getcpy();
142 char *m_getfolder();
143 struct msgs *m_gmsg();
144 char *copy();
145 char **getans();
146 char *cdate();
147 char *makename();
148 char *r1bindex();
149
150 /*
151 * Routine type declarations -- SHOULD BE GLOBAL
152 */
153 char *getenv();
154