Mercurial > hg > nnchat
diff th_string.h @ 81:69aed051f84d
Synced th-libs.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 20 Apr 2009 22:02:37 +0300 |
parents | e36df57c5b0f |
children | fe4d5f3b486c |
line wrap: on
line diff
--- a/th_string.h Fri Jan 30 01:54:51 2009 +0200 +++ b/th_string.h Mon Apr 20 22:02:37 2009 +0300 @@ -18,46 +18,46 @@ /* Macros */ -#define th_isalnum(c) isalnum((int)(unsigned char) c) -#define th_isalpha(c) isalpha((int)(unsigned char) c) -#define th_isascii(c) isascii((int)(unsigned char) c) -#define th_isblank(c) isblank((int)(unsigned char) c) -#define th_iscntrl(c) iscntrl((int)(unsigned char) c) -#define th_isdigit(c) isdigit((int)(unsigned char) c) -#define th_isgraph(c) isgraph((int)(unsigned char) c) -#define th_islower(c) islower((int)(unsigned char) c) -#define th_isprint(c) isprint((int)(unsigned char) c) -#define th_ispunct(c) ispunct((int)(unsigned char) c) -#define th_isspace(c) isspace((int)(unsigned char) c) -#define th_isupper(c) isupper((int)(unsigned char) c) -#define th_isxdigit(c) isxdigit((int)(unsigned char) c) -#define th_iscrlf(c) ((c=='\r')||(c=='\n')) +#define th_isalnum(c) isalnum((int)(unsigned char) c) +#define th_isalpha(c) isalpha((int)(unsigned char) c) +#define th_isascii(c) isascii((int)(unsigned char) c) +#define th_isblank(c) isblank((int)(unsigned char) c) +#define th_iscntrl(c) iscntrl((int)(unsigned char) c) +#define th_isdigit(c) isdigit((int)(unsigned char) c) +#define th_isgraph(c) isgraph((int)(unsigned char) c) +#define th_islower(c) islower((int)(unsigned char) c) +#define th_isprint(c) isprint((int)(unsigned char) c) +#define th_ispunct(c) ispunct((int)(unsigned char) c) +#define th_isspace(c) isspace((int)(unsigned char) c) +#define th_isupper(c) isupper((int)(unsigned char) c) +#define th_isxdigit(c) isxdigit((int)(unsigned char) c) +#define th_iscrlf(c) ((c=='\r')||(c=='\n')) -#define th_isspecial(q) (((q >= 0x5b) && (q <= 0x60)) || ((q >= 0x7b) && (q <= 0x7d))) +#define th_isspecial(q) (((q >= 0x5b) && (q <= 0x60)) || ((q >= 0x7b) && (q <= 0x7d))) -#define th_tolower(c) tolower((int)(unsigned char) c) -#define th_toupper(c) toupper((int)(unsigned char) c) +#define th_tolower(c) tolower((int)(unsigned char) c) +#define th_toupper(c) toupper((int)(unsigned char) c) /* Normal NUL-terminated string functions */ -char *th_stralloc(size_t); -char *th_strrealloc(char *, size_t); -char *th_strncpy(char *, const char *, size_t); -int th_strcasecmp(char *, char *); -int th_strncasecmp(char *, char *, size_t); -void th_strip_ctrlchars(char *); +char *th_stralloc(size_t); +char *th_strrealloc(char *, size_t); +char *th_strncpy(char *, const char *, size_t); +int th_strcasecmp(char *, char *); +int th_strncasecmp(char *, char *, size_t); +void th_strip_ctrlchars(char *); char *th_strdup(const char *); int th_pstrcpy(char **, char *); int th_pstrcat(char **, char *); -char *th_findnext(char *, size_t *); -char *th_findsep(char *, size_t *, char); -char *th_findseporspace(char *, size_t *, char); +char *th_findnext(char *, size_t *); +char *th_findsep(char *, size_t *, char); +char *th_findseporspace(char *, size_t *, char); -BOOL th_strmatch(char *, char *); -BOOL th_strcasematch(char *, char *); +BOOL th_strmatch(char *, char *); +BOOL th_strcasematch(char *, char *); #ifdef __cplusplus