2 Proprietary Rand Corporation
, 1981.
3 Further distribution of
this software
4 subject to the terms of the Rand
8 /* mh.h - main header file for all of mh */
10 /* VOID is used to indicate explicitly that the value of a function
12 /* If you have a newer C compiler, it is better to simply say:
14 /* instead of what follows
18 # define VOID _VOID_ = (int)
24 /* #define ARPANET /* if you are on the ARPANET */
26 /* #define VMUNIX /* if you are running a Berkeley system */
27 /* if you define VMUNIX, then define JOBSLIB=-ljobs in progs/Makefile */
32 extern char *rhosts
[];
37 #define NULLCP (char *)0
39 #define MAXFOLDER 999 /* Max number of messages in a folder */
40 #define DMAXFOLDER 3 /* Number of digits in MAXFOLDER */
42 #define MAXARGS 1000 /* Max messages to exec */
44 /* Flag bits in msgstats */
45 #define EXISTS 01 /* Message exists */
46 #define DELETED 02 /* Deleted undefined currently */
47 #define SELECTED 04 /* Message selected by an arg */
48 #define SELECT_EMPTY 010/* Single empty msg selected by an mhpath arg */
50 #define READONLY 01 /* No write access to folder */
51 #define DEFMOD 01 /* In-core profile has been modified */
53 /*#define NEWS 1 /* Define for news inclusion */
61 * m_gmsg() returns this structure. It contains the per folder
62 * information which is obtained from reading the folder directory.
66 int hghmsg
; /* Highest msg in directory */
67 int nummsg
; /* Actual Number of msgs */
68 int lowmsg
; /* Lowest msg number */
69 int curmsg
; /* Number of current msg if any */
70 int lowsel
; /* Lowest selected msg number */
71 int hghsel
; /* Highest selected msg number */
72 int numsel
; /* Number of msgs selected */
73 char *foldpath
; /* Pathname of folder */
74 char selist
, /* Folder has a "select" file */
75 msgflags
, /* Folder status bits */
77 others
; /* Folder has other file(s) */
78 char msgstats
[1]; /* Stat bytes for each msg */
81 /* m_getfld definitions and return values */
83 #define NAMESZ 64 /* Limit on component name size */
84 #define LENERR -2 /* Name too long error from getfld */
85 #define FMTERR -3 /* Message Format error */
87 /* m_getfld return codes */
88 #define FLD 0 /* Field returned */
89 #define FLDPLUS 1 /* Field " with more to come */
90 #define FLDEOF 2 /* Field " ending at eom */
91 #define BODY 3 /* Body " with more to come */
92 #define BODYEOF 4 /* Body " ending at eom */
93 #define FILEEOF 5 /* Reached end of input file */
96 * These standard strings are defined in strings.a. They are the
97 * only system-dependent parameters in MH, and thus by redefining
98 * their values and reloading the various modules, MH will run
103 *components
, /* Name of user's component file (in mh dir) */
104 *current
, /* Name of current msg file in a folder */
105 *defalt
, /* Name of the std folder (inbox) */
106 *distcomps
, /* Name of `dist' components file */
107 *draft
, /* Name of the normal draft file */
108 *fileproc
, /* Path of file program */
109 *foldprot
, /* Default folder protection */
110 /* *hostname, /* Local net host name */
111 *installproc
, /* Name of auto-install program path */
112 /* *layout, /* Name of mhl layout file */
113 *listname
, /* Default selection list folder name */
114 *lockdir
, /* Dir for lock files (Same fs as mailboxes)*/
115 *lproc
, /* Path of "list" prog for "What now?" */
116 *lsproc
, /* Path of the block style ls program */
117 *mailboxes
, /* Incoming mail directory */
118 *mailproc
, /* Path of Bell equivalent mail pgm, used by news -send */
119 *mh_prof
, /* Name of users profile file */
120 *mh_deliver
, /* Name of deliverer for mh */
121 *mhlformat
, /* Name of mhl format file in MH dir */
122 *mhlstdfmt
, /* Name of standard mhl format file */
123 *mhnews
, /* Name of MH news file */
124 *msgprot
, /* Default message protection (s.a. 0664) */
125 *pfolder
, /* Name of current folder profile entry */
126 *prproc
, /* Path of the pr program */
127 *scanproc
, /* Path of the scan program */
128 *showproc
, /* Path of the type (l) program */
129 *sendproc
, /* Path of the send message program */
130 *stdcomps
, /* Std comp file if missing user's own */
131 *stddcomps
, /* Std dist file if missing user's own */
132 *sysed
; /* Path of the std (e) editor */
134 /* Just about every program uses this also via m_getdefs */
135 char *mypath
; /* User's log-on path */
138 * node structure used to hold a linked list of the users profile
139 * information taken from logpath/.mh_prof.
152 * The first char in the mhnews file indicates whether the program
153 * calling m_news() should continue running or halt.
156 #define NEWSHALT '!' /* Halt after showing the news */
157 #define NEWSCONT ' ' /* Continue (ditto) */
158 #define NEWSPAUSE '\001' /* Pause during news output... */
162 * Miscellaneous Defines to speed things up
165 #define error(str) { fprintf(stderr, "%s\n", str); exit(-1); }
168 * Routine type declarations -- needed by version 7 compiler
183 struct msgs
*m_gmsg();
193 * Routine type declarations -- SHOULD BE GLOBAL
198 * Defines for path evaluation type--routine path second arg: