Mercurial > hg > th-libs
changeset 43:8c015ac0c556
Cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 03 Oct 2011 00:21:32 +0300 |
parents | 7851f704d499 |
children | 669d2bc97c57 |
files | th_string.c |
diffstat | 1 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/th_string.c Mon Oct 03 00:20:48 2011 +0300 +++ b/th_string.c Mon Oct 03 00:21:32 2011 +0300 @@ -26,7 +26,7 @@ } -char *th_strncpy(char * dst, const char * src, const size_t n) +char *th_strncpy(char *dst, const char *src, const size_t n) { const char *s = src; char *d = dst; @@ -58,7 +58,7 @@ /* Simulate a sprintf() that allocates memory */ -char * th_strdup_vprintf(const char *fmt, va_list args) +char *th_strdup_vprintf(const char *fmt, va_list args) { int size = 64; char *buf, *nbuf = NULL; @@ -92,7 +92,7 @@ } -char * th_strdup_printf(const char *fmt, ...) +char *th_strdup_printf(const char *fmt, ...) { char *res; va_list ap; @@ -128,7 +128,7 @@ /* Compare two strings ignoring case [strcasecmp, strncasecmp] */ -int th_strcasecmp(const char * str1, const char * str2) +int th_strcasecmp(const char *str1, const char *str2) { const char *s1 = str1, *s2 = str2; assert(str1 != NULL); @@ -147,7 +147,7 @@ } -int th_strncasecmp(const char * str1, const char * str2, size_t n) +int th_strncasecmp(const char *str1, const char *str2, size_t n) { const char *s1 = str1, *s2 = str2; assert(str1 != NULL); @@ -170,7 +170,7 @@ /* Remove all occurences of control characters, in-place. * Resulting string is always shorter or same length than original. */ -void th_strip_ctrlchars(char * str) +void th_strip_ctrlchars(char *str) { char *i, *j; assert(str != NULL); @@ -190,7 +190,7 @@ /* Copy a given string over in *result. */ -int th_pstrcpy(char ** result, const char * str) +int th_pstrcpy(char **result, const char *str) { assert(result != NULL); @@ -208,7 +208,7 @@ /* Concatenates a given string into string pointed by *result. */ -int th_pstrcat(char ** result, const char * str) +int th_pstrcat(char **result, const char *str) { assert(result != NULL); @@ -240,7 +240,7 @@ * Updates iPos into the position of such character and * returns pointer to the string. */ -const char *th_findnext(const char * str, size_t * pos) +const char *th_findnext(const char *str, size_t *pos) { assert(str != NULL); @@ -254,7 +254,7 @@ /* Find next sep-character from string */ -const char *th_findsep(const char * str, size_t * pos, char sep) +const char *th_findsep(const char *str, size_t *pos, char sep) { assert(str != NULL); @@ -267,7 +267,7 @@ /* Find next sep- or whitespace from string */ -const char *th_findseporspace(const char * str, size_t * pos, char sep) +const char *th_findseporspace(const char *str, size_t *pos, char sep) { assert(str != NULL); @@ -283,7 +283,7 @@ * wildcards ? and *. "?" matches any character and "*" matches * any number of characters. */ -BOOL th_strmatch(const char * str, const char * pattern) +BOOL th_strmatch(const char *str, const char *pattern) { BOOL didMatch = TRUE, isAnyMode = FALSE, isEnd = FALSE; const char *tmpPattern = NULL; @@ -391,7 +391,7 @@ /* Compare a string to a pattern. Case-INSENSITIVE version. */ -BOOL th_strcasematch(const char * str, const char * pattern) +BOOL th_strcasematch(const char *str, const char *pattern) { BOOL didMatch = TRUE, isAnyMode = FALSE, isEnd = FALSE; const char *tmpPattern = NULL;