]>
diplodocus.org Git - nmh/blob - h/utils.h
3 * utils.h -- utility prototypes
6 void *mh_xmalloc(size_t);
7 void *mh_xrealloc(void *, size_t);
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));
16 * A vector of char array, used to hold a list of string message numbers
17 * or command arguments.
26 * Same as msgs_array, but for a vector of ints
35 * Add a argument to the given msgs_array or msgnum_array structure; extend
36 * the array size if necessary
39 void app_msgarg(struct msgs_array
*, char *);
40 void app_msgnum(struct msgnum_array
*, int);
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 *);
48 * See if a string contains 8 bit characters (use isascii() for the test).
51 * start - Pointer to start of string to test.
52 * end - End of string to test (test will stop before reaching
53 * this point). If NULL, continue until reaching '\0'.
55 * This function always stops at '\0' regardless of the value of 'end'.
56 * Returns 1 if the string contains an 8-bit character, 0 if it does not.
58 int contains8bit(const char *start
, const char *end
);