From: cuz Date: Sun, 29 Jul 2001 20:36:19 +0000 (+0000) Subject: Added IsControl X-Git-Tag: V2.12.0~2746 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=750cf445f7965d7f9f531a62da367a15b09ff684;p=cc65 Added IsControl git-svn-id: svn://svn.cc65.org/cc65/trunk@830 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/common/chartype.h b/src/common/chartype.h index a1cdfc56d..72ccf7560 100644 --- a/src/common/chartype.h +++ b/src/common/chartype.h @@ -38,6 +38,12 @@ +#include + +/* common */ +#include "inline.h" + + /* This module contains replacements for functions in ctype.h besides other * functions. There is a problem with using ctype.h directly: * The parameter must have a value of "unsigned char" or EOF. @@ -67,6 +73,16 @@ int IsAscii (char C); int IsBlank (char C); /* Check for a space or tab */ +#if defined(HAVE_INLINE) +INLINE int IsControl (char C) +/* Check for control chars */ +{ + return iscntrl ((unsigned char) C); +} +#else +# define IsControl(C) iscntrl (C) +#endif + int IsSpace (char C); /* Check for any white space characters */