diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-05-21 15:53:28 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-05-21 15:53:28 +0000 |
commit | 088ea04ec02920216274c382c499690e9870afd4 (patch) | |
tree | 769d6f858d780d01e772e0feeb88278386c59ecb /src/include/util_StringList.h | |
parent | c98e1128705a4d5eed63e07219ffc41239c4ccc5 (diff) |
Stuff for sorted fixed-length lists of strings.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2202 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include/util_StringList.h')
-rw-r--r-- | src/include/util_StringList.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/include/util_StringList.h b/src/include/util_StringList.h new file mode 100644 index 00000000..39051d5b --- /dev/null +++ b/src/include/util_StringList.h @@ -0,0 +1,42 @@ + /*@@ + @header util_StringList.h + @date Mon May 21 16:58:15 2001 + @author Tom Goodale + @desc + Prototypes and data structures for fixed-size lists of unique strings. + @enddesc + @version $Header$ + @@*/ + +#ifndef _UTIL_STRINGLIST_H_ +#define _UTIL_STRINGLIST_H_ 1 + +#ifdef __cplusplus +extern "C" +{ +#endif +struct iInternalStringList +{ + struct iInternalStringList *next; + char *string; +}; + +typedef struct +{ + int fill; + struct iInternalStringList *list; + struct iInternalStringList *head; + struct iInternalStringList *current; +} uStringList; + +uStringList *Util_StringListCreate(int size); +int Util_StringListAdd(uStringList *list, const char *item); +void Util_StringListDestroy(uStringList *this); +const char *Util_StringListNext(uStringList *this, int flag); + + +#ifdef __cplusplus +} +#endif + +#endif /* _UTIL_STRINGLIST_H_ */ |