diff options
Diffstat (limited to 'xstring.h')
-rw-r--r-- | xstring.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/xstring.h b/xstring.h new file mode 100644 index 0000000..3e98ec9 --- /dev/null +++ b/xstring.h @@ -0,0 +1,17 @@ +#ifndef CTIMELINE_XSTRING_H +#define CTIMELINE_XSTRING_H + +#define INIT_LEN_STRING 32 + +typedef struct tag_string { + char *s; + int len; + int capacity; +} string; + +string *string_alloc(const char *text); +void string_release(string *str); +void string_reset(string *str); +void string_addch(string *str, int ch); + +#endif /* CTIMELINE_XSTRING_H */ |