diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-09 14:41:53 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-09 14:41:53 +0200 |
commit | 5fadc0cbb8577c61d66bd6f19ceaf0507c11e23b (patch) | |
tree | 684758441f5b431d0008253243034b6a4a29417c /include/stralloc.h | |
parent | 249866e3d1e11dc72eaa1305f4bb479ded92ef38 (diff) |
initial clang-format
Diffstat (limited to 'include/stralloc.h')
-rw-r--r-- | include/stralloc.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/include/stralloc.h b/include/stralloc.h index 0f4a7d2..b472891 100644 --- a/include/stralloc.h +++ b/include/stralloc.h @@ -15,35 +15,35 @@ */ typedef struct stralloc { - char* s; + char *s; size_t len; size_t a; } stralloc; //extern int stralloc_ready(stralloc *,unsigned int); -extern int stralloc_ready(stralloc *sa,size_t len); +extern int stralloc_ready(stralloc *sa, size_t len); //extern int stralloc_readyplus(stralloc *,unsigned int); -extern int stralloc_readyplus(stralloc *sa,size_t len); -extern int stralloc_copy(stralloc *,stralloc *); -extern int stralloc_cat(stralloc *,stralloc *); -extern int stralloc_copys(stralloc *,const char *); -extern int stralloc_cats(stralloc *,const char *); -extern int stralloc_copyb(stralloc *,const char *,unsigned int); -extern int stralloc_catb(stralloc *,const char *,unsigned int); +extern int stralloc_readyplus(stralloc *sa, size_t len); +extern int stralloc_copy(stralloc *, stralloc *); +extern int stralloc_cat(stralloc *, stralloc *); +extern int stralloc_copys(stralloc *, const char *); +extern int stralloc_cats(stralloc *, const char *); +extern int stralloc_copyb(stralloc *, const char *, unsigned int); +extern int stralloc_catb(stralloc *, const char *, unsigned int); //extern int stralloc_append(stralloc *,char *); /* beware: this takes a pointer to 1 char */ -extern int stralloc_append(stralloc *sa,const char *in); /* beware: this takes a pointer to 1 char */ -extern int stralloc_starts(stralloc *,const char *); +extern int stralloc_append(stralloc *sa, const char *in); /* beware: this takes a pointer to 1 char */ +extern int stralloc_starts(stralloc *, const char *); -#define stralloc_0(sa) stralloc_append(sa,"") +#define stralloc_0(sa) stralloc_append(sa, "") -extern int stralloc_catulong0(stralloc *,unsigned long,unsigned int); -extern int stralloc_catlong0(stralloc *,long,unsigned int); +extern int stralloc_catulong0(stralloc *, unsigned long, unsigned int); +extern int stralloc_catlong0(stralloc *, long, unsigned int); extern void stralloc_free(stralloc *); -#define stralloc_catlong(sa,l) (stralloc_catlong0((sa),(l),0)) -#define stralloc_catuint0(sa,i,n) (stralloc_catulong0((sa),(i),(n))) -#define stralloc_catint0(sa,i,n) (stralloc_catlong0((sa),(i),(n))) -#define stralloc_catint(sa,i) (stralloc_catlong0((sa),(i),0)) +#define stralloc_catlong(sa, l) (stralloc_catlong0((sa), (l), 0)) +#define stralloc_catuint0(sa, i, n) (stralloc_catulong0((sa), (i), (n))) +#define stralloc_catint0(sa, i, n) (stralloc_catlong0((sa), (i), (n))) +#define stralloc_catint(sa, i) (stralloc_catlong0((sa), (i), 0)) #endif |