annotate lwlib/lw_stringlist.h @ 372:90de73ba0cac

Created a useful debug framework and adjusted lw_expr_print() to return a "static" dynamic string
author lost@starbug
date Thu, 22 Apr 2010 18:19:06 -0600
parents 80826bf2827b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
324
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
1 /*
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
2 lw_stringlist.h
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
3
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
4 Copyright © 2010 William Astle
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
5
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
6 This file is part of LWTOOLS.
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
7
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
8 LWTOOLS is free software: you can redistribute it and/or modify it under the
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
9 terms of the GNU General Public License as published by the Free Software
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
10 Foundation, either version 3 of the License, or (at your option) any later
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
11 version.
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
12
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
13 This program is distributed in the hope that it will be useful, but WITHOUT
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
16 more details.
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
17
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
18 You should have received a copy of the GNU General Public License along with
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
19 this program. If not, see <http://www.gnu.org/licenses/>.
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
20 */
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
21
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
22 #ifndef ___lw_stringlist_h_seen___
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
23 #define ___lw_stringlist_h_seen___
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
24
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
25
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
26 #ifdef ___lw_stringlist_c_seen___
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
27
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
28 struct lw_stringlist_priv
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
29 {
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
30 char **strings;
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
31 int nstrings;
326
2eb058346cad Added string module and expanded stringlist module
lost
parents: 324
diff changeset
32 int cstring;
324
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
33 };
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
34 typedef struct lw_stringlist_priv * lw_stringlist_t;
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
35
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
36 #else /* def ___lw_stringlist_c_seen___ */
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
37
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
38 typedef void * lw_stringlist_t;
326
2eb058346cad Added string module and expanded stringlist module
lost
parents: 324
diff changeset
39 extern lw_stringlist_t lw_stringlist_create(void);
2eb058346cad Added string module and expanded stringlist module
lost
parents: 324
diff changeset
40 extern void lw_stringlist_destroy(lw_stringlist_t S);
2eb058346cad Added string module and expanded stringlist module
lost
parents: 324
diff changeset
41 extern void lw_stringlist_addstring(lw_stringlist_t S, char *str);
2eb058346cad Added string module and expanded stringlist module
lost
parents: 324
diff changeset
42 extern void lw_stringlist_reset(lw_stringlist_t S);
2eb058346cad Added string module and expanded stringlist module
lost
parents: 324
diff changeset
43 extern char *lw_stringlist_current(lw_stringlist_t S);
2eb058346cad Added string module and expanded stringlist module
lost
parents: 324
diff changeset
44 extern char *lw_stringlist_next(lw_stringlist_t S);
2eb058346cad Added string module and expanded stringlist module
lost
parents: 324
diff changeset
45 extern int lw_stringlist_nstrings(lw_stringlist_t S);
327
80826bf2827b Added copier for stringlist module
lost
parents: 326
diff changeset
46 extern lw_stringlist_t lw_stringlist_copy(lw_stringlist_t S);
324
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
47
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
48 #endif /* def ___lw_stringlist_c_seen___ */
be63116281b0 Created lwlib folder and added first bits to it
lost
parents:
diff changeset
49
326
2eb058346cad Added string module and expanded stringlist module
lost
parents: 324
diff changeset
50 #endif /* ___lw_stringlist_h_seen___ */