2 * collection4 - utils_array.h
3 * Copyright (C) 2010 Florian octo Forster
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301 USA
21 * Florian octo Forster <ff at octo.it>
25 #define UTILS_ARRAY_H 1
28 typedef struct str_array_s str_array_t;
30 str_array_t *array_create (void);
31 void array_destroy (str_array_t *a);
33 int array_append (str_array_t *a, const char *entry);
34 int array_append_format (str_array_t *a, const char *format, ...)
35 __attribute__((format(printf,2,3)));
37 int array_prepend (str_array_t *a, const char *entry);
38 int array_prepend_format (str_array_t *a, const char *format, ...)
39 __attribute__((format(printf,2,3)));
41 int array_sort (str_array_t *a);
43 int array_argc (str_array_t *);
44 char **array_argv (str_array_t *);
46 #endif /* UTILS_ARRAY_H */
47 /* vim: set sw=2 sts=2 et fdm=marker : */