]> diplodocus.org Git - nmh/blob - h/prototypes.h
921021d7f3db9d1cb5423ac33fdab7c48015c739
[nmh] / h / prototypes.h
1
2 /*
3 * prototypes.h -- various prototypes
4 *
5 * If you modify functions here, please document their current behavior
6 * as much as practical.
7 */
8
9 /*
10 * missing system prototypes
11 */
12 #if ! defined(HAVE_TERMCAP_H) && ! defined (HAVE_NCURSES_TERMCAP_H)
13 extern int tgetent (char *bp, char *name);
14 extern int tgetnum (char *id);
15 extern int tgetflag (char *id);
16 extern char *tgetstr (char *id, char **area);
17 extern char *tgoto (char *cm, int destcol, int destline);
18 extern int tputs (char *cp, int affcnt, int (*outc) (int));
19 #endif
20
21 /*
22 * prototype from config.h
23 */
24 char *etcpath(char *);
25
26 /*
27 * prototypes from the nmh subroutine library
28 */
29
30 struct msgs_array;
31
32 void adios (char *, char *, ...) NORETURN;
33 void admonish (char *, char *, ...);
34 void advertise (char *, char *, char *, va_list);
35 void advise (char *, char *, ...);
36 char **argsplit (char *, char **, int *);
37 void argsplit_msgarg (struct msgs_array *, char *, char **);
38 void argsplit_insert (struct msgs_array *, char *, char **);
39 void arglist_free (char *, char **);
40 void ambigsw (char *, struct swit *);
41 int atooi(char *);
42 char **brkstring (char *, char *, char *);
43 int check_charset (char *, int);
44 int client(char *, char *, char *, int, int);
45 void closefds(int);
46 char *concat (const char *, ...);
47 int context_del (char *);
48 char *context_find (char *);
49 int context_foil (char *);
50 void context_read (void);
51 void context_replace (char *, char *);
52 void context_save (void);
53 char *copy (const char *, char *);
54 char **copyip (char **, char **, int);
55 void cpydata (int, int, char *, char *);
56 void cpydgst (int, int, char *, char *);
57 char *cpytrim (const char *);
58 int decode_rfc2047 (char *, char *, size_t);
59 void discard (FILE *);
60 int default_done (int);
61 void escape_display_name (char *, size_t);
62 void escape_local_part (char *, size_t);
63 int ext_hook(char *, char *, char *);
64 int fdcompare (int, int);
65 int folder_addmsg (struct msgs **, char *, int, int, int, int, char *);
66 int folder_delmsgs (struct msgs *, int, int);
67 void folder_free (struct msgs *);
68 int folder_pack (struct msgs **, int);
69 struct msgs *folder_read (char *);
70 struct msgs *folder_realloc (struct msgs *, int, int);
71 int gans (char *, struct swit *);
72 char **getans (char *, struct swit *);
73 #ifdef READLINE_SUPPORT
74 char **getans_via_readline (char *, struct swit *);
75 #endif /* READLINE_SUPPORT */
76 int getanswer (char *);
77 char **getarguments (char *, int, char **, int);
78 char *get_charset(void);
79 char *getcpy (char *);
80 char *get_default_editor(void);
81 char *getfolder(int);
82 /*
83 * Lock open/close routines.
84 *
85 * The lk[f]opendata() functions are designed to open "data" files (anything
86 * not a mail spool file) using the locking mechanism configured for data
87 * files. The lk[f]openspool() functions are for opening the mail spool
88 * file, which will use the locking algorithm configured for the mail
89 * spool.
90 *
91 * All of these functions have a third argument, an integer which
92 * indicates the type of lock. A "0" means a shared (read) lock, and a
93 * "1" indicates an exclusive (write) lock.
94 */
95 int lkclosedata(int, char*);
96 int lkclosespool(int, char*);
97 int lkfclosedata(FILE *, char *);
98 int lkfclosespool(FILE *, char *);
99 FILE *lkfopendata(char *, char *, int);
100 int lkopendata(char *, int, mode_t, int);
101 FILE *lkfopenspool(char *, char *, int);
102 int lkopenspool(char *, int, mode_t, int);
103 int m_atoi (char *);
104 char *m_backup (char *);
105 int m_convert (struct msgs *, char *);
106 char *m_draft (char *, char *, int, int *);
107 void m_eomsbr (m_getfld_state_t, int (*)(int));
108 void m_getfld_state_reset (m_getfld_state_t *);
109 void m_getfld_state_destroy (m_getfld_state_t *);
110 void m_getfld_track_filepos (m_getfld_state_t *, FILE *);
111 int m_getfld (m_getfld_state_t *, char[NAMESZ], char *, int *, FILE *);
112 int m_gmprot (void);
113 char *m_maildir (char *);
114 char *m_mailpath (char *);
115 char *m_name (int);
116 int m_putenv (char *, char *);
117 int m_rand (unsigned char *, size_t);
118 char *m_mktemp(const char *, int *, FILE **);
119 char *m_mktemp2(const char *, const char *, int *, FILE **);
120 void m_unknown(m_getfld_state_t *, FILE *);
121 int makedir (char *);
122 char *message_id (time_t, int);
123 char *nmh_getpass(const char *);
124 char *norm_charmap(char *);
125 char *new_fs (char *, char *, char *);
126 char *path(char *, int);
127 int peekc(FILE *ib);
128 int pidwait (pid_t, int);
129 int pidstatus (int, FILE *, char *);
130 char *pluspath(char *);
131 void print_help (char *, struct swit *, int);
132 void print_sw (char *, struct swit *, char *, FILE *);
133 void print_version (char *);
134 void push (void);
135 char *pwd (void);
136 char *r1bindex(char *, int);
137 void readconfig (struct node **, FILE *, char *, int);
138 int refile (char **, char *);
139 void ruserpass(char *, char **, char **);
140 int remdir (char *);
141 void scan_detect_mbox_style (FILE *);
142 void scan_finished ();
143 void scan_eom_action (int (*)());
144 void scan_reset_m_getfld_state ();
145 int seq_addmsg (struct msgs *, char *, int, int, int);
146 int seq_addsel (struct msgs *, char *, int, int);
147 char *seq_bits (struct msgs *);
148 int seq_delmsg (struct msgs *, char *, int);
149 int seq_delsel (struct msgs *, char *, int, int);
150 int seq_getnum (struct msgs *, char *);
151 char *seq_list (struct msgs *, char *);
152 int seq_nameok (char *);
153 void seq_print (struct msgs *, char *);
154 void seq_printall (struct msgs *);
155 void seq_read (struct msgs *);
156 void seq_save (struct msgs *);
157 void seq_setcur (struct msgs *, int);
158 void seq_setprev (struct msgs *);
159 void seq_setunseen (struct msgs *, int);
160 int showfile (char **, char *);
161 int smatch(char *, struct swit *);
162 char *snprintb (char *, size_t, unsigned, char *);
163 int ssequal (char *, char *);
164 int stringdex (char *, char *);
165 char *trimcpy (char *);
166 int unputenv (char *);
167 int uprf (char *, char *);
168 int vfgets (FILE *, char **);
169 char *write_charset_8bit (void);
170
171 int mh_strcasecmp (const char *s1, const char *s2);
172 int strncasecmp (const char *s1, const char *s2, size_t n);
173
174
175 /*
176 * some prototypes for address parsing system
177 * (others are in addrsbr.h)
178 */
179 char *LocalName(int);
180 char *SystemName(void);
181
182 /*
183 * prototypes for some routines in uip
184 */
185 int annotate (char *, char *, char *, int, int, int, int);
186 void annolist(char *, char *, char *, int);
187 void annopreserve(int);
188 void clear_screen(void);
189 void m_pclose(void);
190 int make_intermediates(char *);
191 int mhl(int, char **);
192 int mhlsbr(int, char **, FILE *(*)(char *));
193 int distout (char *, char *, char *);
194 void replout (FILE *, char *, char *, struct msgs *, int,
195 int, char *, char *, char *, int);
196 int sc_hardcopy(void);
197 int sc_length(void);
198 int sc_width(void);
199 int build_form (char *, char *, int *, char *, char *, char *, char *,
200 char *, char *);
201 int sendsbr (char **, int, char *, char *, struct stat *, int, char *, int);
202 int SOprintf (char *, ...);
203 int what_now (char *, int, int, char *, char *,
204 int, struct msgs *, char *, int, char *, int);
205 int WhatNow(int, char **);
206 int writeBase64aux(FILE *, FILE *);
207 int writeBase64 (unsigned char *, size_t, unsigned char *);