quakeforge/include/QF/dstring.h
Brian Koropoff 557846b220 This is the first commit to the newcmd branch, which is a mostly-rewritten
console command parser.  It will eventually include html-like tags for
modifying text (gold numbers, brown characters, etc) and escaped characters.
The major differences so far are that dynamic strings are now used instead
of static buffers, and single quotes can be used to enclose tokens as
well as double quotes.
2002-03-03 03:36:27 +00:00

20 lines
743 B
C

typedef struct dstring_s {
unsigned long int size, truesize;
char *str;
} dstring_t;
// General buffer functions
dstring_t *dstring_new(void);
void dstring_delete (dstring_t *dstr);
void dstring_adjust(dstring_t *dstr);
void dstring_append (dstring_t *dstr, const char *data, unsigned int len);
void dstring_insert(dstring_t *dstr, const char *data, unsigned int len, unsigned int pos);
void dstring_snip (dstring_t *dstr, unsigned int pos, unsigned int len);
void dstring_clear (dstring_t *dstr);
// String-specific functions
dstring_t *dstring_newstr (void);
void dstring_appendstr (dstring_t *dstr, const char *str);
void dstring_insertstr (dstring_t *dstr, const char *str, unsigned int pos);
void dstring_clearstr (dstring_t *dstr);