]> diplodocus.org Git - nmh/blob - h/utils.h
Removed a bunch of unreachable break statements found by
[nmh] / h / utils.h
1
2 /*
3 * utils.h -- utility prototypes
4 */
5
6 void *mh_xmalloc(size_t);
7 void *mh_xrealloc(void *, size_t);
8 char *pwd(void);
9 char *add(const char *, char *);
10 char *addlist(char *, const char *);
11 int folder_exists(const char *);
12 void create_folder(char *, int, void (*)(int));
13 int num_digits(int);
14
15 /*
16 * A vector of char array, used to hold a list of string message numbers
17 * or command arguments.
18 */
19
20 struct msgs_array {
21 int max, size;
22 char **msgs;
23 };
24
25 /*
26 * Same as msgs_array, but for a vector of ints
27 */
28
29 struct msgnum_array {
30 int max, size;
31 int *msgnums;
32 };
33
34 /*
35 * Add a argument to the given msgs_array or msgnum_array structure; extend
36 * the array size if necessary
37 */
38
39 void app_msgarg(struct msgs_array *, char *);
40 void app_msgnum(struct msgnum_array *, int);
41
42 int open_form(char **, char *);
43 char *find_str (const char [], size_t, const char *);
44 char *rfind_str (const char [], size_t, const char *);
45 char *nmh_strcasestr (const char *, const char *);