d559baa15dd5142df9f92a1bd492c3f836905811
[mmh] / h / prototypes.h
1
2 /*
3  * prototypes.h -- various prototypes
4  *
5  * $Id$
6  */
7
8 /* If we're using gcc then give it some information about
9  * functions that abort.
10  */
11 #if __GNUC__ > 2
12 #define NORETURN __attribute__((__noreturn__)
13 #else
14 #define NORETURN
15 #endif
16
17 /*
18  * missing system prototypes
19  */
20 #ifndef HAVE_TERMCAP_H
21 extern int tgetent (char *bp, char *name);
22 extern int tgetnum (char *id);
23 extern int tgetflag (char *id);
24 extern char *tgetstr (char *id, char **area);
25 extern char *tgoto (char *cm, int destcol, int destline);
26 extern int tputs (char *cp, int affcnt, int (*outc) (int));
27 #endif
28
29 /*
30  * prototype from config.h
31  */
32 char *etcpath(char *);
33
34 /*
35  * prototypes from the nmh subroutine library
36  */
37 void adios (char *, char *, ...) NORETURN;
38 void admonish (char *, char *, ...);
39 void advertise (char *, char *, char *, va_list);
40 void advise (char *, char *, ...);
41 void ambigsw (char *, struct swit *);
42 int atooi(char *);
43 char **brkstring (char *, char *, char *);
44 int check_charset (char *, int);
45 void closefds(int);
46 char *concat (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 (char *, char *);
54 char **copyip (char **, char **, int);
55 void cpydata (int, int, char *, char *);
56 void cpydgst (int, int, char *, char *);
57 int decode_rfc2047 (char *, char *, size_t);
58 void discard (FILE *);
59 int default_done (int);
60 int ext_hook(char *, char *, char *);
61 int fdcompare (int, int);
62 int folder_addmsg (struct msgs **, char *, int, int, int, int, char *);
63 int folder_delmsgs (struct msgs *, int, int);
64 void folder_free (struct msgs *);
65 int folder_pack (struct msgs **, int);
66 struct msgs *folder_read (char *);
67 struct msgs *folder_realloc (struct msgs *, int, int);
68 int gans (char *, struct swit *);
69 char **getans (char *, struct swit *);
70 int getanswer (char *);
71 char **getarguments (char *, int, char **, int);
72 char *get_charset();
73 char *getcpy (char *);
74 char *getfolder(int);
75 int lkclose(int, char*);
76 int lkfclose(FILE *, char *);
77 FILE *lkfopen(char *, char *);
78 int lkopen(char *, int, mode_t);
79 int m_atoi (char *);
80 char *m_backup (char *);
81 int m_convert (struct msgs *, char *);
82 char *m_draft (char *, char *, int, int *);
83 void m_eomsbr (int (*)(int));
84 int m_getfld (int, unsigned char *, unsigned char *, int, FILE *);
85 int m_gmprot (void);
86 char *m_maildir (char *);
87 char *m_mailpath (char *);
88 char *m_name (int);
89 int m_putenv (char *, char *);
90 char *m_scratch (char *, char *);
91 char *m_tmpfil (char *);
92 void m_unknown(FILE *);
93 int makedir (char *);
94 char *nmh_getpass(const char *);
95 char *norm_charmap(char *);
96 char *new_fs (char *, char *, char *);
97 char *path(char *, int);
98 int peekc(FILE *ib);
99 int pidwait (pid_t, int);
100 int pidstatus (int, FILE *, char *);
101 char *pluspath(char *);
102 void print_help (char *, struct swit *, int);
103 void print_sw (char *, struct swit *, char *);
104 void print_version (char *);
105 void push (void);
106 char *pwd (void);
107 char *r1bindex(char *, int);
108 void readconfig (struct node **, FILE *, char *, int);
109 int refile (char **, char *);
110 void ruserpass(char *, char **, char **);
111 int remdir (char *);
112 int seq_addmsg (struct msgs *, char *, int, int, int);
113 int seq_addsel (struct msgs *, char *, int, int);
114 char *seq_bits (struct msgs *);
115 int seq_delmsg (struct msgs *, char *, int);
116 int seq_delsel (struct msgs *, char *, int, int);
117 int seq_getnum (struct msgs *, char *);
118 char *seq_list (struct msgs *, char *);
119 int seq_nameok (unsigned char *);
120 void seq_print (struct msgs *, char *);
121 void seq_printall (struct msgs *);
122 void seq_read (struct msgs *);
123 void seq_save (struct msgs *);
124 void seq_setcur (struct msgs *, int);
125 void seq_setprev (struct msgs *);
126 void seq_setunseen (struct msgs *, int);
127 int showfile (char **, char *);
128 int smatch(char *, struct swit *);
129 char *snprintb (char *, size_t, unsigned, char *);
130 int ssequal (char *, char *);
131 int stringdex (char *, char *);
132 char *trimcpy (unsigned char *);
133 int unputenv (char *);
134 int uprf (char *, char *);
135 int vfgets (FILE *, char **);
136 char *write_charset_8bit (void);
137
138 #ifdef RPATHS
139 int get_returnpath (char *, int, char *, int);
140 #endif
141
142 /*
143  * prototypes for compatibility functions in library
144  */
145 #ifndef HAVE_SNPRINTF_PROTOTYPE
146 int snprintf (char *, size_t, const char *, ...);
147 int vsnprintf (char *, size_t, const char *, va_list);
148 #endif
149
150 int mh_strcasecmp (const char *s1, const char *s2);
151 int strncasecmp (const char *s1, const char *s2, size_t n);
152
153
154 /*
155  * some prototypes for address parsing system
156  * (others are in addrsbr.h)
157  */
158 char *LocalName(void);
159 char *SystemName(void);
160 char *OfficialName(char *);
161
162 /*
163  * prototypes for some routines in uip
164  */
165 int annotate (char *, char *, char *, int, int, int, int);
166 void annolist(char *, char *, char *, int);
167 void annopreserve(int);
168 int distout (char *, char *, char *);
169 void replout (FILE *, char *, char *, struct msgs *, int,
170         int, char *, char *, char *);
171 int sendsbr (char **, int, char *, struct stat *, int, char *, int);
172 int what_now (char *, int, int, char *, char *,
173         int, struct msgs *, char *, int, char *);
174