~ubuntu-branches/ubuntu/breezy/gettext/breezy

« back to all changes in this revision

Viewing changes to src/str-list.h

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2004-03-14 17:40:02 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040314174002-p1ad5ldve1hqzhye
Tags: 0.14.1-2
* Added libexpat1-dev to Build-Depends, for glade support.
* Added libc0.1-dev to Build-Depends, for GNU/kFreeBSD.
* Removed special-casing of knetbsd-gnu in debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* GNU gettext - internationalization aids
2
 
   Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
3
 
 
4
 
   This file was written by Peter Miller <millerp@canb.auug.org.au>
5
 
 
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)
9
 
any later version.
10
 
 
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.
15
 
 
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.  */
19
 
 
20
 
#ifndef SRC_STR_LIST_H
21
 
#define SRC_STR_LIST_H 1
22
 
 
23
 
/* Get size_t and NULL.  */
24
 
#include <stddef.h>
25
 
 
26
 
/* Type describing list of immutable strings,
27
 
   implemented using a dynamic array.  */
28
 
typedef struct string_list_ty string_list_ty;
29
 
struct string_list_ty
30
 
{
31
 
  const char **item;
32
 
  size_t nitems;
33
 
  size_t nitems_max;
34
 
};
35
 
 
36
 
/* Return a fresh, empty list of strings.  */
37
 
extern string_list_ty *string_list_alloc PARAMS ((void));
38
 
 
39
 
/* Append a single string to the end of a list of strings.  */
40
 
extern void string_list_append PARAMS ((string_list_ty *__slp,
41
 
                                        const char *__s));
42
 
 
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,
46
 
                                               const char *__s));
47
 
 
48
 
/* Free a list of strings.  */
49
 
extern void string_list_free PARAMS ((string_list_ty *__slp));
50
 
 
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));
54
 
 
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,
57
 
                                       const char *__s));
58
 
 
59
 
#endif