diff options
author | Bardur Arantsson <bardur@scientician.net> | 2013-03-25 10:59:33 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2013-09-27 14:46:41 +0200 |
commit | 63bb0520dcdb6177533fe3b412fd72ee1ce6d711 (patch) | |
tree | f5b8cba5d209522cf9d33ea347a43d57678d22ef /src/string_list.h | |
parent | d1bc64bd22673bc72bafd7e200cbbea6eacb06c1 (diff) |
Split out data types
Diffstat (limited to 'src/string_list.h')
-rw-r--r-- | src/string_list.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/string_list.h b/src/string_list.h new file mode 100644 index 00000000..bd88602f --- /dev/null +++ b/src/string_list.h @@ -0,0 +1,22 @@ +#pragma once + +#include "sglib.h" +#include "angband.h" + +/* + * String list. + */ +typedef struct string_list string_list; +struct string_list { + /* The string list owns the string */ + cptr s; + /* Next */ + string_list *next; +}; + +int compare_string_list(string_list *a, string_list *b); +SGLIB_DEFINE_LIST_PROTOTYPES(string_list, compare_string, next); + +void string_list_init(string_list *sl, cptr s); /* Initialize element; copies string */ +void string_list_destroy(string_list *sl); /* Destroy element */ +void string_list_append(string_list **slist, cptr s); /* Append string */ |