21 lines
No EOL
603 B
C
21 lines
No EOL
603 B
C
#ifndef TCC_UTILS_CSTRING_H
|
|
# define TCC_UTILS_CSTRING_H 1
|
|
|
|
# include <stdarg.h>
|
|
|
|
typedef struct CString {
|
|
int size; /** size in bytes */
|
|
int size_allocated;
|
|
char *data;
|
|
} CString;
|
|
|
|
void cstr_ccat(CString *cstr, int ch);
|
|
void cstr_cat(CString *cstr, const char *str, int len);
|
|
void cstr_wccat(CString *cstr, int ch);
|
|
void cstr_new(CString *cstr);
|
|
void cstr_free(CString *cstr);
|
|
int cstr_printf(CString *cs, const char *fmt, ...) __attribute__((format(printf, (2), (3))));
|
|
int cstr_vprintf(CString *cstr, const char *fmt, va_list ap);
|
|
void cstr_reset(CString *cstr);
|
|
|
|
#endif /* !TCC_UTILS_CSTRING_H */ |