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