From 750cf445f7965d7f9f531a62da367a15b09ff684 Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 29 Jul 2001 20:36:19 +0000 Subject: [PATCH] Added IsControl git-svn-id: svn://svn.cc65.org/cc65/trunk@830 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/common/chartype.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 */ -- 2.39.5