Small, Fast S-Expression Library
|
00001 00045 #ifndef __CSTRING_H__ 00046 #define __CSTRING_H__ 00047 00048 #include <stdlib.h> 00049 00054 typedef struct __cstring { 00058 char *base; 00059 00063 size_t len; 00064 00070 size_t curlen; 00071 } CSTRING; 00072 00073 #ifdef __cplusplus 00074 extern "C" { 00075 #endif /* __cplusplus */ 00076 00080 void sgrowsize(size_t s); 00081 00087 CSTRING *snew(size_t s); 00088 00098 CSTRING *sadd(CSTRING *s, char *a); 00099 00108 CSTRING *saddch(CSTRING *s, char a); 00109 00119 CSTRING *strim(CSTRING *s); 00120 00125 char *toCharPtr(CSTRING *s); 00126 00131 void sempty(CSTRING *s); 00132 00136 void sdestroy(CSTRING *s); 00137 00138 #ifdef __cplusplus 00139 } 00140 #endif /* __cplusplus */ 00141 00142 #endif /* __CSTRING_H__ */