Rocco Rutte
[apps/madmutt.git] / protos.h
1 /*
2  * Copyright notice from original mutt:
3  * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
4  *
5  * This file is part of mutt-ng, see http://www.muttng.org/.
6  * It's licensed under the GNU General Public License,
7  * please see the file GPL in the top level source directory.
8  */
9
10 #ifdef HAVE_CONFIG_H
11 # include "config.h"
12 #endif
13
14 #if HAVE_STDINT_H
15 #include <stdint.h>
16 #elif HAVE_INTTYPES_H
17 #include <inttypes.h>
18 #endif
19 #include "mbyte.h"
20
21 #ifdef DEBUG
22 #define dprint(N,X) do { if(debuglevel>=N) fprintf X; } while (0)
23 #else
24 #define dprint(N,X)
25 #endif
26
27 #define MoreArgs(p) (*p->dptr && *p->dptr != ';' && *p->dptr != '#')
28
29 #define mutt_make_string(A,B,C,D,E) _mutt_make_string(A,B,C,D,E,0)
30 void _mutt_make_string (char *, size_t, const char *, CONTEXT *,
31                         HEADER *, format_flag);
32
33 int mutt_extract_token (BUFFER *, BUFFER *, int);
34 BUFFER *mutt_buffer_init (BUFFER *);
35 BUFFER *mutt_buffer_from (BUFFER *, char *);
36 void mutt_buffer_free (BUFFER **);
37 void mutt_buffer_add (BUFFER *, const char *, size_t);
38 void mutt_buffer_addstr (BUFFER *, const char *);
39 void mutt_buffer_addch (BUFFER *, char);
40
41 #define mutt_system(x) _mutt_system(x,0)
42 int _mutt_system (const char *, int);
43
44 #define mutt_next_thread(x) _mutt_aside_thread(x,1,0)
45 #define mutt_previous_thread(x) _mutt_aside_thread(x,0,0)
46 #define mutt_next_subthread(x) _mutt_aside_thread(x,1,1)
47 #define mutt_previous_subthread(x) _mutt_aside_thread(x,0,1)
48 int _mutt_aside_thread (HEADER *, short, short);
49
50 #define mutt_collapse_thread(x,y) _mutt_traverse_thread (x,y,M_THREAD_COLLAPSE)
51 #define mutt_uncollapse_thread(x,y) _mutt_traverse_thread (x,y,M_THREAD_UNCOLLAPSE)
52 #define mutt_get_hidden(x,y)_mutt_traverse_thread (x,y,M_THREAD_GET_HIDDEN)
53 #define mutt_thread_contains_unread(x,y) _mutt_traverse_thread (x,y,M_THREAD_UNREAD)
54 #define mutt_thread_next_unread(x,y) _mutt_traverse_thread(x,y,M_THREAD_NEXT_UNREAD)
55 int _mutt_traverse_thread (CONTEXT * ctx, HEADER * hdr, int flag);
56
57
58 #define mutt_new_parameter() safe_calloc (1, sizeof (PARAMETER))
59 #define mutt_new_header() safe_calloc (1, sizeof (HEADER))
60 #define mutt_new_envelope() safe_calloc (1, sizeof (ENVELOPE))
61 #define mutt_new_enter_state() safe_calloc (1, sizeof (ENTER_STATE))
62
63 typedef const char *format_t (char *, size_t, char, const char *,
64                               const char *, const char *, const char *,
65                               unsigned long, format_flag);
66
67 void mutt_FormatString (char *, size_t, const char *, format_t *,
68                         unsigned long, format_flag);
69 void mutt_parse_content_type (char *, BODY *);
70 void mutt_generate_boundary (PARAMETER **);
71 void mutt_delete_parameter (const char *attribute, PARAMETER ** p);
72 void mutt_set_parameter (const char *, const char *, PARAMETER **);
73
74
75 FILE *mutt_open_read (const char *, pid_t *);
76
77 void set_quadoption (int, int);
78 int query_quadoption (int, const char *);
79 int quadoption (int);
80
81 ADDRESS *mutt_default_from (void);
82 ADDRESS *mutt_get_address (ENVELOPE *, char **);
83 ADDRESS *mutt_lookup_alias (const char *s);
84 ADDRESS *mutt_remove_duplicates (ADDRESS *);
85 ADDRESS *mutt_expand_aliases (ADDRESS *);
86 ADDRESS *mutt_parse_adrlist (ADDRESS *, const char *);
87
88 BODY *mutt_make_file_attach (const char *);
89 BODY *mutt_make_message_attach (CONTEXT *, HEADER *, int);
90 BODY *mutt_remove_multipart (BODY *);
91 BODY *mutt_make_multipart (BODY *);
92 BODY *mutt_new_body (void);
93 BODY *mutt_parse_multipart (FILE *, const char *, long, int);
94 BODY *mutt_parse_messageRFC822 (FILE *, BODY *);
95 BODY *mutt_read_mime_header (FILE *, int);
96
97 CONTENT *mutt_get_content_info (const char *fname, BODY * b);
98
99 HASH *mutt_make_id_hash (CONTEXT *);
100 HASH *mutt_make_subj_hash (CONTEXT *);
101
102 LIST *mutt_make_references (ENVELOPE * e);
103 LIST *mutt_parse_references (char *, int);
104
105 ENVELOPE *mutt_read_rfc822_header (FILE *, HEADER *, short, short);
106 HEADER *mutt_dup_header (HEADER *);
107
108 #if USE_HCACHE
109 void *mutt_hcache_open (const char *path, const char *folder);
110 void mutt_hcache_close (void *db);
111 HEADER *mutt_hcache_restore (const unsigned char *d, HEADER ** oh);
112 void *mutt_hcache_fetch (void *db, const char *filename,
113                          size_t (*keylen) (const char *fn));
114 int mutt_hcache_store (void *db, const char *filename, HEADER * h,
115                        unsigned long uid_validity,
116                        size_t (*keylen) (const char *fn));
117 int mutt_hcache_delete (void *db, const char *filename,
118                         size_t (*keylen) (const char *fn));
119 #endif /* USE_HCACHE */
120
121 ATTACHPTR **mutt_gen_attach_list (BODY *, int, ATTACHPTR **, short *, short *,
122                                   int, int);
123
124 time_t mutt_decrease_mtime (const char *, struct stat *);
125 time_t mutt_local_tz (time_t);
126 time_t mutt_mktime (struct tm *, int);
127 time_t mutt_parse_date (const char *, HEADER *);
128 int is_from (const char *, char *, size_t, time_t *);
129
130 const char *mutt_attach_fmt (char *dest,
131                              size_t destlen,
132                              char op,
133                              const char *src,
134                              const char *prefix,
135                              const char *ifstring,
136                              const char *elsestring,
137                              unsigned long data, format_flag flags);
138
139
140 char *mutt_charset_hook (const char *);
141 char *mutt_iconv_hook (const char *);
142 char *mutt_expand_path (char *, size_t);
143 char *_mutt_expand_path (char *, size_t, int);
144 char *mutt_find_hook (int, const char *);
145 char *mutt_gecos_name (char *, size_t, struct passwd *);
146 char *mutt_gen_msgid (void);
147 char *mutt_get_body_charset (char *, size_t, BODY *);
148 const char *mutt_get_name (ADDRESS *);
149 char *mutt_get_parameter (const char *, PARAMETER *);
150 char *mutt_crypt_hook (ADDRESS *);
151 char *mutt_make_date (char *, size_t);
152
153 const char *mutt_make_version (void);
154
155 const char *mutt_fqdn (short);
156
157 void mutt_account_hook (const char *url);
158 void mutt_add_to_reference_headers (ENVELOPE * env, ENVELOPE * curenv,
159                                     LIST *** pp, LIST *** qq);
160 void mutt_adv_mktemp (char *, size_t);
161 void mutt_alias_menu (char *, size_t, ALIAS *);
162 void mutt_allow_interrupt (int);
163 void mutt_attach_init (BODY *);
164 void mutt_block_signals (void);
165 void mutt_block_signals_system (void);
166 void mutt_body_handler (BODY *, STATE *);
167 int mutt_bounce_message (FILE * fp, HEADER *, ADDRESS *);
168 void mutt_break_thread (HEADER *);
169 void mutt_canonical_charset (char *, size_t, const char *);
170 void mutt_check_rescore (CONTEXT *);
171 void mutt_clear_error (void);
172 void mutt_create_alias (ENVELOPE *, ADDRESS *);
173 void mutt_decode_attachment (BODY *, STATE *);
174 void mutt_decode_base64 (STATE * s, long len, int istext, iconv_t cd);
175 void mutt_default_save (char *, size_t, HEADER *);
176 void mutt_display_address (ENVELOPE *);
177 void mutt_display_sanitize (char *);
178 void mutt_edit_content_type (HEADER *, BODY *, FILE *);
179 void mutt_edit_file (const char *, const char *);
180 void mutt_edit_headers (const char *, const char *, HEADER *, char *, size_t);
181 void mutt_curses_error (const char *, ...);
182 void mutt_curses_message (const char *, ...);
183 void mutt_enter_command (void);
184 void mutt_expand_aliases_env (ENVELOPE *);
185 void mutt_expand_file_fmt (char *, size_t, const char *, const char *);
186 void mutt_expand_fmt (char *, size_t, const char *, const char *);
187 void mutt_expand_link (char *, const char *, const char *);
188 void mutt_fix_reply_recipients (ENVELOPE * env);
189 void mutt_folder_hook (char *);
190 void mutt_format_string (char *, size_t, int, int, int, char, const char *,
191                          size_t, int);
192 void mutt_format_s (char *, size_t, const char *, const char *);
193 void mutt_format_s_tree (char *, size_t, const char *, const char *);
194 void mutt_forward_intro (FILE * fp, HEADER * cur);
195 void mutt_forward_trailer (FILE * fp);
196 void mutt_free_alias (ALIAS **);
197 void mutt_free_body (BODY **);
198 void mutt_free_color (int fg, int bg);
199 void mutt_free_enter_state (ENTER_STATE **);
200 void mutt_free_envelope (ENVELOPE **);
201 void mutt_free_header (HEADER **);
202 void mutt_free_parameter (PARAMETER **);
203 void mutt_generate_header (char *, size_t, HEADER *, int);
204 void mutt_help (int);
205 void mutt_draw_tree (CONTEXT *);
206 void mutt_check_lookup_list (BODY *, char *, int);
207 void mutt_make_attribution (CONTEXT * ctx, HEADER * cur, FILE * out);
208 void mutt_make_forward_subject (ENVELOPE * env, CONTEXT * ctx, HEADER * cur);
209 void mutt_make_help (char *, size_t, char *, int, int);
210 void mutt_make_misc_reply_headers (ENVELOPE * env, CONTEXT * ctx,
211                                    HEADER * cur, ENVELOPE * curenv);
212 void mutt_make_post_indent (CONTEXT * ctx, HEADER * cur, FILE * out);
213 void mutt_message_to_7bit (BODY *, FILE *);
214
215 #define mutt_mktemp(a) _mutt_mktemp (a, __FILE__, __LINE__)
216 void _mutt_mktemp (char *, const char *, int);
217 void mutt_normalize_time (struct tm *);
218 void mutt_paddstr (int, const char *);
219 void mutt_parse_mime_message (CONTEXT * ctx, HEADER *);
220 void mutt_parse_part (FILE *, BODY *);
221 #define mutt_perror(a) _mutt_perror (a, __FILE__, __LINE__)
222 void _mutt_perror (const char*, const char*,int);
223 void mutt_prepare_envelope (ENVELOPE *, int);
224 void mutt_unprepare_envelope (ENVELOPE *);
225 void mutt_pretty_mailbox (char *);
226 void mutt_pretty_size (char *, size_t, long);
227 void mutt_pipe_message (HEADER *);
228 void mutt_print_message (HEADER *);
229 void mutt_print_patchlist (void);
230 void mutt_query_exit (void);
231 void mutt_query_menu (char *, size_t);
232 void mutt_safe_path (char *s, size_t l, ADDRESS * a);
233 void mutt_save_path (char *s, size_t l, ADDRESS * a);
234 void mutt_score_message (CONTEXT *, HEADER *, int);
235 void mutt_select_fcc (char *, size_t, HEADER *);
236
237 #define mutt_select_file(A,B,C) _mutt_select_file(A,B,C,NULL,NULL)
238 void _mutt_select_file (char *, size_t, int, char ***, int *);
239 void mutt_message_hook (CONTEXT *, HEADER *, int);
240 void _mutt_set_flag (CONTEXT *, HEADER *, int, int, int);
241
242 #define mutt_set_flag(a,b,c,d) _mutt_set_flag(a,b,c,d,1)
243 void mutt_set_followup_to (ENVELOPE *);
244 void mutt_shell_escape (void);
245 void mutt_show_error (void);
246 void mutt_signal_init (void);
247 void mutt_stamp_attachment (BODY * a);
248 void mutt_tabs_to_spaces (char *);
249 void mutt_tag_set_flag (int, int);
250 void mutt_unblock_signals (void);
251 void mutt_unblock_signals_system (int);
252 void mutt_update_encoding (BODY * a);
253 void mutt_update_tree (ATTACHPTR **, short);
254 void mutt_version (void);
255 void mutt_view_attachments (HEADER *);
256 void mutt_write_references (LIST *, FILE *);
257 void mutt_write_address_list (ADDRESS * adr, FILE * fp, int linelen,
258                               int display);
259 void mutt_set_virtual (CONTEXT *);
260
261 int mutt_addr_is_user (ADDRESS *);
262 int mutt_addwch (wchar_t);
263 int mutt_alias_complete (char *, size_t);
264 int mutt_alloc_color (int fg, int bg);
265 int mutt_any_key_to_continue (const char *);
266 int mutt_builtin_editor (const char *, HEADER *, HEADER *);
267 int mutt_can_decode (BODY *);
268 int mutt_change_flag (HEADER *, int);
269 int mutt_check_alias_name (const char *, char *);
270 int mutt_check_encoding (const char *);
271 int mutt_check_key (const char *);
272 int mutt_check_menu (const char *);
273 int mutt_check_mime_type (const char *);
274 int mutt_check_month (const char *);
275 int mutt_check_overwrite (const char *, const char *, char *, size_t, int *,
276                           char **);
277 int mutt_check_traditional_pgp (HEADER *, int *);
278 int mutt_command_complete (char *, size_t, int, int);
279 int mutt_var_value_complete (char *, size_t, int);
280 int mutt_complete (char *, size_t);
281 int mutt_compose_attachment (BODY * a);
282 int mutt_copy_body (FILE *, BODY **, BODY *);
283 int mutt_decode_save_attachment (FILE *, BODY *, char *, int, int);
284 int mutt_display_message (HEADER * h);
285 int mutt_edit_attachment (BODY *);
286 int mutt_edit_message (CONTEXT *, HEADER *);
287 int mutt_fetch_recips (ENVELOPE * out, ENVELOPE * in, int flags);
288 int mutt_chscmp (const char *s, const char *chs);
289
290 #define mutt_is_utf8(a) mutt_chscmp (a, "utf-8")
291 #define mutt_is_us_ascii(a) mutt_chscmp (a, "us-ascii")
292 int mutt_parent_message (CONTEXT *, HEADER *);
293 int mutt_prepare_template (FILE *, CONTEXT *, HEADER *, HEADER *, short);
294 int mutt_resend_message (FILE *, CONTEXT *, HEADER *);
295
296 #define mutt_enter_fname(A,B,C,D,E) _mutt_enter_fname(A,B,C,D,E,0,NULL,NULL)
297 int _mutt_enter_fname (const char *, char *, size_t, int *, int, int,
298                        char ***, int *);
299 int mutt_enter_string (char *buf, size_t buflen, int y, int x, int flags);
300 int _mutt_enter_string (char *, size_t, int, int, int, int, char ***, int *,
301                         ENTER_STATE *);
302 #define mutt_get_field(A,B,C,D) _mutt_get_field(A,B,C,D,0,NULL,NULL)
303 int _mutt_get_field (char *, char *, size_t, int, int, char ***, int *);
304 int mutt_get_hook_type (const char *);
305 int mutt_get_password (char *, char *, size_t);
306 int mutt_get_postponed (CONTEXT *, HEADER *, HEADER **, char *, size_t);
307 int mutt_get_tmp_attachment (BODY *);
308 int mutt_index_menu (void);
309 int mutt_invoke_mta (ADDRESS *, ADDRESS *, ADDRESS *, ADDRESS *, const char *,
310                      int);
311 int mutt_is_autoview (BODY *, const char *);
312 int mutt_is_mail_list (ADDRESS *);
313 int mutt_is_message_type (int, const char *);
314 int mutt_is_list_cc (int, ADDRESS *, ADDRESS *);
315 int mutt_is_list_recipient (int, ADDRESS *, ADDRESS *);
316 int mutt_is_subscribed_list (ADDRESS *);
317 int mutt_is_text_part (BODY *);
318 int mutt_is_valid_mailbox (const char *);
319 int mutt_link_threads (HEADER *, HEADER *, CONTEXT *);
320 int mutt_lookup_mime_type (BODY *, const char *);
321 int mutt_match_spam_list (const char *, SPAM_LIST *, char *, int);
322 int mutt_messages_in_thread (CONTEXT *, HEADER *, int);
323 int mutt_multi_choice (char *prompt, char *letters);
324 int mutt_needs_mailcap (BODY *);
325 int mutt_num_postponed (int);
326 int mutt_parse_bind (BUFFER *, BUFFER *, unsigned long, BUFFER *);
327 int mutt_parse_exec (BUFFER *, BUFFER *, unsigned long, BUFFER *);
328 int mutt_parse_color (BUFFER *, BUFFER *, unsigned long, BUFFER *);
329 int mutt_parse_uncolor (BUFFER *, BUFFER *, unsigned long, BUFFER *);
330 int mutt_parse_hook (BUFFER *, BUFFER *, unsigned long, BUFFER *);
331 int mutt_parse_macro (BUFFER *, BUFFER *, unsigned long, BUFFER *);
332 int mutt_parse_mono (BUFFER *, BUFFER *, unsigned long, BUFFER *);
333 int mutt_parse_unmono (BUFFER *, BUFFER *, unsigned long, BUFFER *);
334 int mutt_parse_push (BUFFER *, BUFFER *, unsigned long, BUFFER *);
335 int mutt_parse_rc_line ( /* const */ char *, BUFFER *, BUFFER *);
336 int mutt_parse_rfc822_line (ENVELOPE * e, HEADER * hdr, char *line, char *p,
337                             short user_hdrs, short weed, short do_2047,
338                             LIST ** lastp);
339 int mutt_parse_score (BUFFER *, BUFFER *, unsigned long, BUFFER *);
340 int mutt_parse_unscore (BUFFER *, BUFFER *, unsigned long, BUFFER *);
341 int mutt_parse_unhook (BUFFER *, BUFFER *, unsigned long, BUFFER *);
342 int mutt_pattern_func (int, char *);
343 int mutt_pipe_attachment (FILE *, BODY *, const char *, char *);
344 int mutt_print_attachment (FILE *, BODY *);
345 int mutt_query_complete (char *, size_t);
346 int mutt_query_variables (LIST * queries);
347 int mutt_save_attachment (FILE *, BODY *, char *, int, HEADER *);
348 void _mutt_save_message (HEADER *, CONTEXT *, int, int, int);
349 int mutt_save_message (HEADER *, int, int, int, int *);
350 int mutt_search_command (int, int);
351 int mutt_skipchars (const char *, const char *);
352 int mutt_strwidth (const char *);
353 int mutt_compose_menu (HEADER *, char *, size_t, HEADER *);
354 int mutt_thread_set_flag (HEADER *, int, int, int);
355 int mutt_update_list_file (char *, char *, char *, char *);
356 int mutt_user_is_recipient (HEADER *);
357 void mutt_update_num_postponed (void);
358 int mutt_view_attachment (FILE *, BODY *, int, HEADER *, ATTACHPTR **, short);
359 int mutt_wait_filter (pid_t);
360 int mutt_which_case (const char *);
361 int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid, int,
362                     char *);
363 int mutt_write_mime_body (BODY *, FILE *);
364 int mutt_write_mime_header (BODY *, FILE *);
365 int mutt_write_rfc822_header (FILE *, ENVELOPE *, BODY *, int, int);
366 int mutt_yesorno (const char *, int);
367 void mutt_set_header_color (CONTEXT *, HEADER *);
368 void mutt_sleep (short);
369 int mutt_save_confirm (const char *, struct stat *);
370
371 int mh_valid_message (const char *);
372
373 pid_t mutt_create_filter (const char *, FILE **, FILE **, FILE **);
374 pid_t mutt_create_filter_fd (const char *, FILE **, FILE **, FILE **, int,
375                              int, int);
376
377 ADDRESS *alias_reverse_lookup (ADDRESS *);
378
379 /* base64.c */
380 void mutt_to_base64 (unsigned char *, const unsigned char *, size_t, size_t);
381 int mutt_from_base64 (char *, const char *);
382
383 /* utf8.c */
384 int mutt_wctoutf8 (char *s, unsigned int c);
385
386 #ifdef LOCALES_HACK
387 #define IsPrint(c) (isprint((unsigned char)(c)) || \
388         ((unsigned char)(c) >= 0xa0))
389 #define IsWPrint(wc) (iswprint(wc) || wc >= 0xa0)
390 #else
391 #define IsPrint(c) (isprint((unsigned char)(c)) || \
392         (option (OPTLOCALES) ? 0 : \
393         ((unsigned char)(c) >= 0xa0)))
394 #define IsWPrint(wc) (iswprint(wc) || \
395         (option (OPTLOCALES) ? 0 : (wc >= 0xa0)))
396 #endif
397
398 #define new_pattern() safe_calloc(1, sizeof (pattern_t))
399
400 int mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags,
401                        CONTEXT * ctx, HEADER * h);
402 pattern_t *mutt_pattern_comp ( /* const */ char *s, int flags, BUFFER * err);
403 void mutt_check_simple (char *s, size_t len, const char *simple);
404 void mutt_pattern_free (pattern_t ** pat);
405
406 /* ----------------------------------------------------------------------------
407  * Prototypes for broken systems
408  */
409
410 #ifdef HAVE_SRAND48
411 #define LRAND lrand48
412 #define SRAND srand48
413 #define DRAND drand48
414 #else
415 #define LRAND rand
416 #define SRAND srand
417 #define DRAND (double)rand
418 #endif /* HAVE_SRAND48 */
419
420 /* HP-UX, ConvexOS and UNIXware don't have this macro */
421 #ifndef S_ISLNK
422 #define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK ? 1 : 0)
423 #endif
424
425 int getdnsdomainname (char *, size_t);
426
427 /* According to SCO support, this is how to detect SCO */
428 #if defined (_M_UNIX) || defined (M_OS)
429 #define SCO
430 #endif
431
432 /* SCO Unix uses chsize() instead of ftruncate() */
433 #ifndef HAVE_FTRUNCATE
434 #define ftruncate chsize
435 #endif
436
437 #ifndef HAVE_SNPRINTF
438 extern int snprintf (char *, size_t, const char *, ...);
439 #endif
440
441 #ifndef HAVE_VSNPRINTF
442 extern int vsnprintf (char *, size_t, const char *, va_list);
443 #endif
444
445 #ifndef HAVE_STRERROR
446 #ifndef STDC_HEADERS
447 extern int sys_nerr;
448 extern char *sys_errlist[];
449 #endif
450
451 #define strerror(x) ((x) > 0 && (x) < sys_nerr) ? sys_errlist[(x)] : 0
452 #endif /* !HAVE_STRERROR */
453
454 #ifndef HAVE_MEMMOVE
455 #define memmove(d,s,n) bcopy((s),(d),(n))
456 #endif
457
458 /* AIX doesn't define these in any headers (sigh) */
459 int strcasecmp (const char *, const char *);
460 int strncasecmp (const char *, const char *, size_t);
461
462 #ifdef _AIX
463 int setegid (gid_t);
464 #endif /* _AIX */
465
466 #ifndef STDC_HEADERS
467 extern FILE *fdopen ();
468 extern int system ();
469 extern int puts ();
470 extern int fputs ();
471 extern int fputc ();
472 extern int fseek ();
473 extern char *strchr ();
474 extern int getopt ();
475 extern int fputs ();
476 extern int fputc ();
477 extern int fclose ();
478 extern int fprintf ();
479 extern int printf ();
480 extern int fgetc ();
481 extern int tolower ();
482 extern int toupper ();
483 extern int sscanf ();
484 extern size_t fread ();
485 extern size_t fwrite ();
486 extern int system ();
487 extern int rename ();
488 extern time_t time ();
489 extern struct tm *localtime ();
490 extern char *asctime ();
491 extern char *strpbrk ();
492 extern int fflush ();
493 extern long lrand48 ();
494 extern void srand48 ();
495 extern time_t mktime ();
496 extern int vsprintf ();
497 extern int ungetc ();
498 extern char *mktemp ();
499 extern int ftruncate ();
500 extern void *memset ();
501 extern int pclose ();
502 extern int socket ();
503 extern int connect ();
504 extern size_t strftime ();
505 extern int lstat ();
506 extern void rewind ();
507 extern int readlink ();
508
509 /* IRIX barfs on empty var decls because the system include file uses elipsis
510    in the declaration.  So declare all the args to avoid compiler errors.  This
511    should be harmless on other systems.  */
512 int ioctl (int, int, ...);
513
514 #endif
515
516 /* unsorted */
517 void ci_bounce_message (HEADER *, int *);
518 int ci_send_message (int, HEADER *, char *, CONTEXT *, HEADER *);