~ubuntu-branches/debian/sid/freeciv/sid

« back to all changes in this revision

Viewing changes to utility/string_vector.h

  • Committer: Package Import Robot
  • Author(s): Clint Adams, Karl Goetz, Clint Adams
  • Date: 2011-08-28 22:40:00 UTC
  • mfrom: (1.2.19 upstream)
  • Revision ID: package-import@ubuntu.com-20110828224000-j2r1erewlem25dox
Tags: 2.3.0-1
[ Karl Goetz ]
* New upstream version.
* Fix themes_sdl_use_system_fonts.diff to apply cleanly on 2.3.0
* Massage work_around_unity_induced_breakage.diff to get it
  applying to the new codebase (The patch assumes commits made
  after 2.3.0 was tagged upstream).

[ Clint Adams ]
* Fudge build system to think there is no libtool mismatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#ifndef FC__STRING_VECTOR_H
14
14
#define FC__STRING_VECTOR_H
15
15
 
16
 
#include "shared.h"             /* bool type. */
 
16
#include "support.h"            /* bool type. */
 
17
 
 
18
struct astring;
 
19
 
17
20
 
18
21
struct strvec;                  /* Opaque. */
19
22
 
22
25
 
23
26
void strvec_reserve(struct strvec *psv, size_t reserve);
24
27
void strvec_store(struct strvec *psv, const char *const *vec, size_t size);
 
28
void strvec_from_str(struct strvec *psv,  char separator, const char *str);
25
29
void strvec_clear(struct strvec *psv);
26
30
void strvec_remove_empty(struct strvec *psv);
 
31
void strvec_remove_duplicate(struct strvec *psv,
 
32
                             int (*cmp_func) (const char *, const char *));
27
33
void strvec_copy(struct strvec *dest, const struct strvec *src);
 
34
void strvec_sort(struct strvec *psv, int (*sort_func) (const char *const *,
 
35
                                                       const char *const *));
28
36
 
29
37
void strvec_prepend(struct strvec *psv, const char *string);
30
38
void strvec_append(struct strvec *psv, const char *string);
36
44
const char *const *strvec_data(const struct strvec *psv);
37
45
bool strvec_index_valid(const struct strvec *psv, size_t index);
38
46
const char *strvec_get(const struct strvec *psv, size_t index);
 
47
void strvec_to_str(const struct strvec *psv, char separator,
 
48
                   char *buf, size_t buf_len);
 
49
const char *strvec_to_or_list(const struct strvec *psv,
 
50
                              struct astring *astr);
 
51
const char *strvec_to_and_list(const struct strvec *psv,
 
52
                               struct astring *astr);
39
53
 
40
54
/* Iteration macro. */
41
55
#define strvec_iterate(psv, str) \