src/utils_array.[ch]: Implement "array_prepend{,_format}".
[collection4.git] / src / utils_array.h
1 #ifndef UTILS_ARRAY_H
2 #define UTILS_ARRAY_H 1
3
4 struct str_array_s;
5 typedef struct str_array_s str_array_t;
6
7 str_array_t *array_create (void);
8 void array_destroy (str_array_t *a);
9
10 int array_append (str_array_t *a, const char *entry);
11 int array_append_format (str_array_t *a, const char *format, ...)
12   __attribute__((format(printf,2,3)));
13
14 int array_prepend (str_array_t *a, const char *entry);
15 int array_prepend_format (str_array_t *a, const char *format, ...)
16   __attribute__((format(printf,2,3)));
17
18 int array_sort (str_array_t *a);
19
20 int array_argc (str_array_t *);
21 char **array_argv (str_array_t *);
22
23 #endif /* UTILS_ARRAY_H */
24 /* vim: set sw=2 sts=2 et fdm=marker : */