mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +02:00
toupper(), tolower(), isspace(), is..etc..() aren't safe with chars in some
systems, use our own is_...() functions now instead. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2348 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
820c9d3d82
commit
f4897860b5
35 changed files with 112 additions and 95 deletions
17
src/common.h
17
src/common.h
|
|
@ -72,6 +72,23 @@ const char *get_irssi_config(void);
|
|||
if (a) { g_free(a); (a) = NULL; } \
|
||||
} G_STMT_END
|
||||
|
||||
/* ctype.h isn't safe with chars, use our own instead */
|
||||
#define i_toupper(x) toupper((int) (unsigned char) (x))
|
||||
#define i_tolower(x) tolower((int) (unsigned char) (x))
|
||||
#define i_isalnum(x) isalnum((int) (unsigned char) (x))
|
||||
#define i_isalpha(x) isalpha((int) (unsigned char) (x))
|
||||
#define i_isascii(x) isascii((int) (unsigned char) (x))
|
||||
#define i_isblank(x) isblank((int) (unsigned char) (x))
|
||||
#define i_iscntrl(x) iscntrl((int) (unsigned char) (x))
|
||||
#define i_isdigit(x) isdigit((int) (unsigned char) (x))
|
||||
#define i_isgraph(x) isgraph((int) (unsigned char) (x))
|
||||
#define i_islower(x) islower((int) (unsigned char) (x))
|
||||
#define i_isprint(x) isprint((int) (unsigned char) (x))
|
||||
#define i_ispunct(x) ispunct((int) (unsigned char) (x))
|
||||
#define i_isspace(x) isspace((int) (unsigned char) (x))
|
||||
#define i_isupper(x) isupper((int) (unsigned char) (x))
|
||||
#define i_isxdigit(x) isxdigit((int) (unsigned char) (x))
|
||||
|
||||
typedef struct _IPADDR IPADDR;
|
||||
typedef struct _CONFIG_REC CONFIG_REC;
|
||||
typedef struct _CONFIG_NODE CONFIG_NODE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue