1
/* GNU gettext - internationalization aids
2
Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
4
This file was written by Peter Miller <millerp@canb.auug.org.au>
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2, or (at your option)
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20
#ifndef SRC_STR_LIST_H
21
#define SRC_STR_LIST_H 1
23
/* Get size_t and NULL. */
26
/* Type describing list of immutable strings,
27
implemented using a dynamic array. */
28
typedef struct string_list_ty string_list_ty;
36
/* Return a fresh, empty list of strings. */
37
extern string_list_ty *string_list_alloc PARAMS ((void));
39
/* Append a single string to the end of a list of strings. */
40
extern void string_list_append PARAMS ((string_list_ty *__slp,
43
/* Append a single string to the end of a list of strings, unless it is
44
already contained in the list. */
45
extern void string_list_append_unique PARAMS ((string_list_ty *__slp,
48
/* Free a list of strings. */
49
extern void string_list_free PARAMS ((string_list_ty *__slp));
51
/* Return a freshly allocated string obtained by concatenating all the
52
strings in the list, separated by spaces. */
53
extern char *string_list_join PARAMS ((const string_list_ty *__slp));
55
/* Return 1 if s is contained in the list of strings, 0 otherwise. */
56
extern int string_list_member PARAMS ((const string_list_ty *__slp,