ali@5: #ifndef BL_STRING_H ali@5: #define BL_STRING_H ali@0: ali@0: #include ali@5: #include ali@0: ali@0: typedef struct { ali@0: char *str; ali@0: size_t alloc,len; ali@0: } String; ali@0: ali@0: String *string_new(const char *init); ali@0: char *string_free(String *string,boolean free_segment); ali@0: void string_append_c(String *string,char c); ali@0: void string_append_len(String *string,const char *s,ssize_t len); ali@0: #define string_append(string,s) string_append_len(string,s,-1) ali@0: ali@5: #endif /* BL_STRING_H */