2 * Copyright (C) 1998, 2000, 2001, 2006 Free Software Foundation, Inc.
4 * This file is part of JNLIB.
6 * JNLIB is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 3 of
9 * the License, or (at your option) any later version.
11 * JNLIB is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef LIBJNLIB_STRLIST_H
21 #define LIBJNLIB_STRLIST_H
25 struct string_list
*next
;
29 typedef struct string_list
*strlist_t
;
31 void free_strlist (strlist_t sl
);
32 strlist_t
add_to_strlist (strlist_t
*list
, const char *string
);
34 strlist_t
add_to_strlist2( strlist_t
*list
, const char *string
, int is_utf8
);
36 strlist_t
append_to_strlist (strlist_t
*list
, const char *string
);
37 strlist_t
append_to_strlist2 (strlist_t
*list
, const char *string
,
40 strlist_t
strlist_copy (strlist_t list
);
42 strlist_t
strlist_prev (strlist_t head
, strlist_t node
);
43 strlist_t
strlist_last (strlist_t node
);
44 char * strlist_pop (strlist_t
*list
);
46 #define FREE_STRLIST(a) do { free_strlist((a)); (a) = NULL ; } while(0)
49 #endif /*LIBJNLIB_STRLIST_H*/