1169691Skan// Locale support -*- C++ -*- 2169691Skan 3169691Skan// Copyright (C) 2000, 2003 Free Software Foundation, Inc. 4169691Skan// 5169691Skan// This file is part of the GNU ISO C++ Library. This library is free 6169691Skan// software; you can redistribute it and/or modify it under the 7169691Skan// terms of the GNU General Public License as published by the 8169691Skan// Free Software Foundation; either version 2, or (at your option) 9169691Skan// any later version. 10169691Skan 11169691Skan// This library is distributed in the hope that it will be useful, 12169691Skan// but WITHOUT ANY WARRANTY; without even the implied warranty of 13169691Skan// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14169691Skan// GNU General Public License for more details. 15169691Skan 16169691Skan// You should have received a copy of the GNU General Public License along 17169691Skan// with this library; see the file COPYING. If not, write to the Free 18169691Skan// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19169691Skan// USA. 20169691Skan 21169691Skan// As a special exception, you may use this file as part of a free software 22169691Skan// library without restriction. Specifically, if other files instantiate 23169691Skan// templates or use macros or inline functions from this file, or you compile 24169691Skan// this file and link it with other files to produce an executable, this 25169691Skan// file does not by itself cause the resulting executable to be covered by 26169691Skan// the GNU General Public License. This exception does not however 27169691Skan// invalidate any other reasons why the executable file might be covered by 28169691Skan// the GNU General Public License. 29169691Skan 30169691Skan// 31169691Skan// ISO C++ 14882: 22.1 Locales 32169691Skan// 33169691Skan 34169691Skan// Information as gleaned from /usr/include/ctype.h on FreeBSD 3.4, 35169691Skan// 4.0 and all versions of the CVS managed file at: 36169691Skan// :pserver:anoncvs@anoncvs.freebsd.org:/home/ncvs/src/include/ctype.h 37169691Skan 38169691Skan_GLIBCXX_BEGIN_NAMESPACE(std) 39169691Skan 40169691Skan /// @brief Base class for ctype. 41169691Skan struct ctype_base 42169691Skan { 43169691Skan // Non-standard typedefs. 44169691Skan typedef const int* __to_type; 45169691Skan 46169691Skan typedef unsigned long mask; 47169691Skan#ifdef _CTYPE_S 48169691Skan // FreeBSD 4.0 uses this style of define. 49169691Skan static const mask upper = _CTYPE_U; 50169691Skan static const mask lower = _CTYPE_L; 51169691Skan static const mask alpha = _CTYPE_A; 52169691Skan static const mask digit = _CTYPE_D; 53169691Skan static const mask xdigit = _CTYPE_X; 54169691Skan static const mask space = _CTYPE_S; 55169691Skan static const mask print = _CTYPE_R; 56169691Skan static const mask graph = _CTYPE_A | _CTYPE_D | _CTYPE_P; 57169691Skan static const mask cntrl = _CTYPE_C; 58169691Skan static const mask punct = _CTYPE_P; 59169691Skan static const mask alnum = _CTYPE_A | _CTYPE_D; 60169691Skan#else 61169691Skan // Older versions, including Free BSD 3.4, use this style of define. 62169691Skan static const mask upper = _U; 63169691Skan static const mask lower = _L; 64169691Skan static const mask alpha = _A; 65169691Skan static const mask digit = _D; 66169691Skan static const mask xdigit = _X; 67169691Skan static const mask space = _S; 68169691Skan static const mask print = _R; 69169691Skan static const mask graph = _A | _D | _P; 70169691Skan static const mask cntrl = _C; 71169691Skan static const mask punct = _P; 72169691Skan static const mask alnum = _A | _D; 73169691Skan#endif 74169691Skan }; 75169691Skan 76169691Skan_GLIBCXX_END_NAMESPACE 77