hpctype.h

Go to the documentation of this file.
00001 //& ****************************************************************************
00002 //&
00003 //& Written by Ingo Blank, August 2004
00004 //& Donated to the HP-GCC Development Team
00005 //& Copyright (C) 2004 The HP-GCC Development Team
00006 //&
00007 //& ****************************************************************************
00008 //&
00009 //&
00010 //& This file is part of HP-GCC.
00011 //&
00012 //& HP-GCC is free software; you can redistribute it and/or modify
00013 //& it under the terms of the GNU General Public License as published by
00014 //& the Free Software Foundation; either version 2, or (at your option)
00015 //& any later version.
00016 //& 
00017 //& HP-GCC is distributed in the hope that it will be useful,
00018 //& but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 //& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 //& GNU General Public License for more details.
00021 //& 
00022 //& You should have received a copy of the GNU General Public License
00023 //& along with HP-GCC; see the file COPYING. 
00024 //&
00025 //& As a special exception, you may use this file as part of a free software
00026 //& library without restriction.  Specifically, if other files instantiate
00027 //& templates or use macros or inline functions from this file, or you compile
00028 //& this file and link it with other files to produce an executable, this
00029 //& file does not by itself cause the resulting executable to be covered by
00030 //& the GNU General Public License.  This exception does not however
00031 //& invalidate any other reasons why the executable file might be covered by
00032 //& the GNU General Public License.
00033 //&
00034 //& ****************************************************************************
00035 
00036 
00041 #ifndef _CTYPE_H_
00042 #define _CTYPE_H_
00043 
00044 // ctype
00045 
00046 #define _islower(c) ('a' <= (c) && (c) <= 'z')
00047 #define _isupper(c) ('A' <= (c) && (c) <= 'Z')
00048 #define _isdigit(c) ('0' <= (c) && (c) <= '9')
00049 #define _isalpha(c) (_islower(c) || _isupper(c))
00050 #define _toupper(c) (_islower((c)) ? ((c)-32) : (c))
00051 #define _tolower(c) (_isupper((c)) ? ((c)+32) : (c))
00052 
00053 
00054 
00055 // wrappers for above macros for pointer security
00056 // iblank 2004-10-26
00057 
00058 inline int islower(int c);
00059 inline int isupper(int c);
00060 inline int isdigit(int c); 
00061 inline int isalpha(int c); 
00062 inline int toupper(int c); 
00063 inline int tolower(int c); 
00064 
00065 
00066 #endif //_CTYPE_H_

Generated on Sat Feb 17 00:05:26 2007 for HP-GCCLibrary by  doxygen 1.5.0