From c903851a7e9daef63fd781a8f6aa38df46155518 Mon Sep 17 00:00:00 2001 From: kleink Date: Sun, 10 May 1998 16:57:51 +0000 Subject: [PATCH] Reorganize name space protection. --- include/ctype.h | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/include/ctype.h b/include/ctype.h index 776b2943e2c9..fb34aee32da4 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -1,4 +1,4 @@ -/* $NetBSD: ctype.h,v 1.16 1998/03/23 06:44:34 mrg Exp $ */ +/* $NetBSD: ctype.h,v 1.17 1998/05/10 16:57:51 kleink Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -42,6 +42,9 @@ #ifndef _CTYPE_H_ #define _CTYPE_H_ + +#include + #include #define _U 0x01 @@ -73,13 +76,18 @@ extern int isxdigit __P ((int)); extern int tolower __P ((int)); extern int toupper __P ((int)); -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) -extern int isblank __P ((int)); +#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \ + defined(_XOPEN_SOURCE) extern int isascii __P ((int)); extern int toascii __P ((int)); extern int _tolower __P ((int)); extern int _toupper __P ((int)); #endif + +#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ + !defined(_XOPEN_SOURCE) +extern int isblank __P ((int)); +#endif __END_DECLS #define isdigit(c) ((int)((_ctype_ + 1)[(int)(c)] & _N)) @@ -96,16 +104,21 @@ __END_DECLS #define tolower(c) ((int)((_tolower_tab_ + 1)[(int)(c)])) #define toupper(c) ((int)((_toupper_tab_ + 1)[(int)(c)])) -#if !defined(_ANSI_SOURCE) && !defined (_POSIX_SOURCE) -#if notyet -#define isblank(c) ((int)((_ctype_ + 1)[(int)(c)] & _B)) -#endif +#if !defined(_ANSI_SOURCE) && !defined (_POSIX_C_SOURCE) || \ + defined(_XOPEN_SOURCE) #define isascii(c) ((unsigned)(c) <= 0177) #define toascii(c) ((c) & 0177) #define _tolower(c) ((c) - 'A' + 'a') #define _toupper(c) ((c) - 'a' + 'A') #endif +#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \ + !defined(_XOPEN_SOURCE) +#if notyet +#define isblank(c) ((int)((_ctype_ + 1)[(int)(c)] & _B)) +#endif +#endif + #ifdef _CTYPE_PRIVATE #define _CTYPE_NUM_CHARS (1<<(sizeof(char)<<3))