From bc5585e6e528862e461ade6a7e94cf3da59185f1 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 15 Oct 2008 20:36:26 +0000 Subject: 2008-10-15 Craig Howland * libc/include/ctype.h (isblank): isblank is C99. * libc/ctype/isblank.c (isblank comments): ditto. isblank does not have a macro version (as was claimed in the description). --- newlib/libc/ctype/isblank.c | 11 ++++++----- newlib/libc/include/ctype.h | 6 +++++- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'newlib/libc') diff --git a/newlib/libc/ctype/isblank.c b/newlib/libc/ctype/isblank.c index c75d8ab02..3e124d8f7 100644 --- a/newlib/libc/ctype/isblank.c +++ b/newlib/libc/ctype/isblank.c @@ -15,16 +15,17 @@ TRAD_SYNOPSIS int isblank(<[c]>); DESCRIPTION -<> is a macro which classifies ASCII integer values by table -lookup. It is a predicate returning non-zero for blank characters, and 0 +<> is a function which classifies ASCII integer values by table +lookup. It is a predicate returning non-zero for blank characters, and 0 for other characters. -You can use a compiled subroutine instead of the macro definition by -undefining the macro using `<<#undef isblank>>'. - RETURNS <> returns non-zero if <[c]> is a blank character. +PORTABILITY +<> is C99. + +No supporting OS subroutines are required. */ #include <_ansi.h> diff --git a/newlib/libc/include/ctype.h b/newlib/libc/include/ctype.h index 17a486ebb..0e3d05244 100644 --- a/newlib/libc/include/ctype.h +++ b/newlib/libc/include/ctype.h @@ -19,8 +19,12 @@ int _EXFUN(isxdigit,(int __c)); int _EXFUN(tolower, (int __c)); int _EXFUN(toupper, (int __c)); -#ifndef __STRICT_ANSI__ +#if !defined(__STRICT_ANSI__) || \ + (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 1999901L) int _EXFUN(isblank, (int __c)); +#endif + +#ifndef __STRICT_ANSI__ int _EXFUN(isascii, (int __c)); int _EXFUN(toascii, (int __c)); int _EXFUN(_tolower, (int __c)); -- cgit v1.2.3