|
Aegis
4.25.D505
|
00001 // 00002 // aegis - project change supervisor 00003 // Copyright (C) 1996, 1998, 2002, 2004-2006, 2008, 2012 Peter Miller 00004 // 00005 // This program is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation; either version 3 of the License, or (at 00008 // your option) any later version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 // 00018 00019 #ifndef COMMON_AC_WCTYPE_H 00020 #define COMMON_AC_WCTYPE_H 00021 00022 // 00023 // Often needed, if <wctype.h> is implemented in terms of <ctype.h>. 00024 // Not strictly ANSI C standard conforming. 00025 // 00026 #include <common/ac/ctype.h> 00027 00028 // 00029 // Often needed, particularly to implement the dummy functions if real 00030 // ones aren't present. Not strictly ANSI C standard conforming. 00031 // 00032 #include <common/ac/stddef.h> 00033 00034 // Solaris bug 1250837: include wchar.h before widec.h 00035 #include <common/ac/wchar.h> 00036 00037 // 00038 // Silicon Graphics 00039 // 00040 #if HAVE_WIDEC_H 00041 #include <widec.h> 00042 #endif 00043 00044 #if HAVE_WCTYPE_H 00045 #include <wctype.h> 00046 #endif 00047 00048 // 00049 // The ANSI C standard states that wint_t symbol shall be defined by 00050 // <wchar.h> and <wctype.h>. The GNU people also define it in <stddef.h>, 00051 // but this is incorrect. 00052 // 00053 #ifndef HAVE_WINT_T 00054 #define HAVE_WINT_T 1 00055 typedef wchar_t wint_t; 00056 #endif 00057 00058 #if !HAVE_WCTYPE_H 00059 int iswalnum(wint_t); 00060 int iswdigit(wint_t); 00061 int iswlower(wint_t); 00062 int iswprint(wint_t); 00063 int iswpunct(wint_t); 00064 int iswspace(wint_t); 00065 int iswupper(wint_t); 00066 wint_t towlower(wint_t); 00067 wint_t towupper(wint_t); 00068 #endif 00069 00070 // 00071 // HAVE_ISWPRINT is only set if (a) there is a have_iswprint function, 00072 // and (b) it works for ascii. It is assumed that if iswprint is absent 00073 // or brain-dead, then so are the rest. 00074 // 00075 // This code copes with the case where (a) it exists, (b) it is broken, 00076 // and (c) it is defined in <wctype.h> 00077 // 00078 #if !HAVE_ISWPRINT 00079 00080 #ifdef iswprint 00081 #undef iswprint 00082 #endif 00083 00084 #ifdef iswspace 00085 #undef iswspace 00086 #endif 00087 00088 #ifdef iswpunct 00089 #undef iswpunct 00090 #endif 00091 00092 #ifdef iswupper 00093 #undef iswupper 00094 #endif 00095 00096 #ifdef iswlower 00097 #undef iswlower 00098 #endif 00099 00100 #ifdef iswdigit 00101 #undef iswdigit 00102 #endif 00103 00104 #ifdef iswalnum 00105 #undef iswalnum 00106 #endif 00107 00108 #ifdef towupper 00109 #undef towupper 00110 #endif 00111 00112 #ifdef towlower 00113 #undef towlower 00114 #endif 00115 00116 #endif // !HAVE_ISWPRINT 00117 00118 #endif // COMMON_AC_WCTYPE_H 00119 // vim: set ts=8 sw=4 et :
1.7.6.1