diff -r c2f4c0285180 -r f600b0d1fc5d bl/blstring.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bl/blstring.h Fri Jan 27 10:30:16 2012 +0000 @@ -0,0 +1,18 @@ +#ifndef BL_STRING_H +#define BL_STRING_H + +#include +#include + +typedef struct { + char *str; + size_t alloc,len; +} String; + +String *string_new(const char *init); +char *string_free(String *string,boolean free_segment); +void string_append_c(String *string,char c); +void string_append_len(String *string,const char *s,ssize_t len); +#define string_append(string,s) string_append_len(string,s,-1) + +#endif /* BL_STRING_H */