1 /* 2 * Declaration of routines in the Elm library. 3 * This header normally included through "elm_defs.h". 4 */ 5 6 /* add_site.c */ 7 8 void add_site P_((char *, const char *, char *)); 9 10 11 /* addrmchusr.c */ 12 13 int addr_matches_user P_((char *, const char *)); 14 15 16 /* aliasdb.c */ 17 18 #ifdef ANSI_C 19 struct dbz; 20 #endif 21 int read_one_alias P_((struct dbz *, struct alias_disk_rec *)); 22 struct alias_rec *fetch_alias P_((struct dbz *, char *)); 23 char *next_addr_in_list P_((char **)); 24 25 26 /* atonum.c */ 27 28 int atonum P_((const char *)); 29 30 31 /* basename.c */ 32 33 char *basename P_((const char *)); 34 35 36 /* can_access.c */ 37 38 int can_access P_((const char *, int)); 39 40 41 /* can_open.c */ 42 43 int can_open P_((const char *, const char *)); 44 45 46 /* chloc.c */ 47 48 int chloc P_((const char *, int)); 49 int qchloc P_((const char *, int)); 50 51 52 /* date_util.c */ 53 54 int cvt_dayname_to_daynum P_((const char *, int *)); 55 int cvt_monthname_to_monthnum P_((const char *, int *)); 56 int cvt_yearstr_to_yearnum P_((const char *, int *)); 57 int cvt_mmddyy_to_dayofyear P_((int, int, int, int *)); 58 int cvt_timezone_to_offset P_((char *, int *)); 59 int cvt_numtz_to_mins P_((const char *)); 60 int cvt_timestr_to_hhmmss P_((const char *, int *, int *, int *)); 61 long make_gmttime P_((int, int, int, int, int, int)); 62 63 64 /* elm_access.c */ 65 66 int elm_access P_((const char *, int)); 67 68 69 /* errno.c */ 70 71 extern int errno; 72 #ifndef STRERROR 73 char *strerror P_((int)); 74 #endif 75 76 77 /* expand.c */ 78 79 int expand P_((char *)); 80 char *expand_define P_((const char *)); 81 82 83 /* fast_getpw.c */ 84 85 #ifdef ANSI_C 86 struct passwd; 87 #endif 88 struct passwd *fast_getpwuid P_((int)); 89 90 91 /* figadrssee.c */ 92 93 void figure_out_addressee P_((const char *, const char *, char *)); 94 95 96 /* gcos_name.c */ 97 98 char *gcos_name P_((char *, const char *)); 99 100 101 /* get_tz.c */ 102 103 #ifdef ANSI_C 104 struct tm; 105 #endif 106 int get_tz_mins P_((void)); 107 char *get_tz_name P_((struct tm *)); 108 109 110 /* getarpdate.c */ 111 112 char *get_arpa_date P_((void)); 113 114 115 /* getfullnam.c */ 116 117 char *get_full_name P_((const char *)); 118 119 120 /* gethostname.c */ 121 122 void get_hostname P_((char *, int)); 123 void get_hostdomain P_((char *, int)); 124 125 126 /* getword.c */ 127 128 int get_word P_((const char *, int, char *, int)); 129 130 131 /* header_cmp.c */ 132 133 char *header_cmp P_((const char *, const char *, const char *)); 134 int header_ncmp P_((const char *, const char *, int, const char *, int)); 135 136 137 /* in_list.c */ 138 139 int in_list P_((char *, char *)); 140 141 142 /* initcommon.c */ 143 144 void initialize_common P_((void)); 145 146 147 /* ldstate.c */ 148 149 /* environment parameter that points to folder state file */ 150 #define FOLDER_STATE_ENV "ELMSTATE" 151 152 struct folder_state { 153 char *folder_name; /* full pathname to current folder */ 154 int num_mssgs; /* number of messages in the folder */ 155 long *idx_list; /* index of seek offsets for messages */ 156 long *clen_list; /* list of content lengths for mssgs */ 157 int num_sel; /* number of messages selected */ 158 int *sel_list; /* list of selected message numbers */ 159 160 }; 161 162 int load_folder_state_file P_((struct folder_state *)); 163 164 165 /* len_next.c */ 166 167 int len_next_part P_((const char *)); 168 169 170 /* mail_gets.c */ 171 172 int mail_gets P_((char *, int, FILE *)); 173 174 175 /* mailfile.c */ 176 177 /* ##### defined in mailfile.h ##### */ 178 179 180 /* mcprt.c */ 181 182 /* ##### defined in mcprt.h ##### */ 183 184 185 /* mcprtlib.c */ 186 187 /* ##### defined in mcprtlib.c ###### */ 188 189 190 /* mk_aliases.c */ 191 192 int check_alias P_((char *)); 193 void despace_address P_((char *)); 194 int do_newalias P_((char *, char *, int, int)); 195 196 197 /* mk_lockname.c */ 198 199 char *mk_lockname P_((const char *)); 200 201 202 /* mlist.c */ 203 204 /* ##### defined in parseaddrs.h ##### */ 205 206 207 /* move_left.c */ 208 209 void move_left P_((char *, int)); 210 211 212 /* msgcat.c */ 213 214 /* ##### defined in msgcat.h ##### */ 215 216 217 /* ndbz.c */ 218 219 /* ##### defined in ndbz.h ##### */ 220 221 222 223 /* okay_addr.c */ 224 225 int okay_address P_((char *, char *)); 226 227 228 /* opt_utils.c */ 229 230 #ifndef HAS_CUSERID 231 char *cuserid P_((char *)); 232 #endif 233 /* strtok() declared in elm_defs.h */ 234 /* strpbrk() declared in elm_defs.h */ 235 /* strspn() declared in elm_defs.h */ 236 /* strcspn() declared in elm_defs.h */ 237 #ifndef TEMPNAM 238 char *tempnam P_((char *, char *)); 239 #endif 240 #ifndef GETOPT 241 int getopt P_((int, char **, char *)); 242 #endif 243 #ifndef RENAME 244 int rename P_((char *, char *)); 245 #endif 246 #ifndef MKDIR 247 int mkdir P_((const char *, int)); 248 #endif 249 250 251 /* parsarpdat.c */ 252 253 int parse_arpa_date P_((const char *, struct header_rec *)); 254 255 256 /* parsarpmbox.c */ 257 258 int parse_arpa_mailbox P_((const char *, char *, int, char *, int, char **)); 259 260 261 /* parsarpwho.c */ 262 263 int parse_arpa_who P_((const char *, char *)); 264 265 266 /* patmatch.c */ 267 268 #define PM_NOCASE (1<<0) /* letter case insignificant */ 269 #define PM_WSFOLD (1<<1) /* fold white space */ 270 #define PM_FANCHOR (1<<2) /* anchor pat at front (like ^) */ 271 #define PM_BANCHOR (1<<3) /* anchor pat at back (like $) */ 272 273 int patmatch P_((const char *, const char *, int)); 274 275 276 /* posixsig.c */ 277 278 #ifdef POSIX_SIGNALS 279 SIGHAND_TYPE (*posix_signal P_((int, SIGHAND_TYPE (*)(int)))) P_((int)); 280 #endif 281 282 283 /* putenv.c */ 284 285 #ifndef PUTENV 286 int putenv P_((const char *)); 287 #endif 288 289 290 /* qstrings.c */ 291 292 char *qstrpbrk P_((const char *, const char *)); 293 int qstrspn P_((const char *, const char *)); 294 int qstrcspn P_((const char *, const char *)); 295 296 297 /* realfrom.c */ 298 299 int real_from P_((const char *, struct header_rec *)); 300 301 302 /* remfirstwd.c */ 303 304 void remove_first_word P_((char *)); 305 void remove_header_keyword P_((char *)); 306 307 308 /* reverse.c */ 309 310 void reverse P_((char *)); 311 312 313 /* rfc822tlen.c */ 314 315 int rfc822_toklen P_((const char *)); 316 317 318 /* safemalloc.c */ 319 320 /* 321 * The "safe_malloc_fail_handler" vector points to a routine that is 322 * invoked if one of the safe_malloc() routines fails. At startup, this 323 * will point to the default handler that prints a diagnostic message 324 * and aborts. The vector may be changed to install a different error 325 * handler. 326 */ 327 extern void (*safe_malloc_fail_handler) P_((const char *, unsigned)); 328 329 void dflt_safe_malloc_fail_handler P_((const char *, unsigned)); 330 malloc_t safe_malloc P_((unsigned)); 331 malloc_t safe_realloc P_((malloc_t, unsigned)); 332 char *safe_strdup P_((const char *)); 333 334 335 /* shiftlower.c */ 336 337 char *shift_lower P_((char *)); 338 339 340 /* strfcpy.c */ 341 342 char *strfcpy P_((char *, const char *, int)); 343 void strfcat P_((char *, const char *, int)); 344 345 346 /* strftime.c */ 347 348 #ifndef STRFTIME 349 #ifdef ANSI_C 350 struct tm; 351 #endif 352 size_t strftime P_((char *, size_t, const char *, const struct tm *)); 353 #endif 354 355 356 /* strincmp.c */ 357 358 int strincmp P_((const char *, const char *, int)); 359 int istrcmp P_((const char *, const char *)); 360 361 362 /* striparens.c */ 363 364 char *strip_parens P_((const char *)); 365 char *get_parens P_((const char *)); 366 367 368 /* strstr.c */ 369 370 /* strstr() declared in elm_defs.h */ 371 372 373 /* strtokq.c */ 374 375 char *strtokq P_((char *, const char *, int)); 376 377 378 /* tail_of.c */ 379 380 int tail_of P_((char *, char *, char *)); 381 382 383 /* trim.c */ 384 385 char *trim_quotes P_((char *)); 386 char *trim_trailing_slashes P_((char *)); 387 char *trim_trailing_spaces P_((char *)); 388 389 390 /* validname.c */ 391 392 int valid_name P_((const char *)); 393 394