1117397Skan// Locale support -*- C++ -*- 2117397Skan 3132720Skan// Copyright (C) 2000, 2003 Free Software Foundation, Inc. 4117397Skan// 5117397Skan// This file is part of the GNU ISO C++ Library. This library is free 6117397Skan// software; you can redistribute it and/or modify it under the 7117397Skan// terms of the GNU General Public License as published by the 8117397Skan// Free Software Foundation; either version 2, or (at your option) 9117397Skan// any later version. 10117397Skan 11117397Skan// This library is distributed in the hope that it will be useful, 12117397Skan// but WITHOUT ANY WARRANTY; without even the implied warranty of 13117397Skan// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14117397Skan// GNU General Public License for more details. 15117397Skan 16117397Skan// You should have received a copy of the GNU General Public License along 17117397Skan// 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, 19117397Skan// USA. 20117397Skan 21117397Skan// As a special exception, you may use this file as part of a free software 22117397Skan// library without restriction. Specifically, if other files instantiate 23117397Skan// templates or use macros or inline functions from this file, or you compile 24117397Skan// this file and link it with other files to produce an executable, this 25117397Skan// file does not by itself cause the resulting executable to be covered by 26117397Skan// the GNU General Public License. This exception does not however 27117397Skan// invalidate any other reasons why the executable file might be covered by 28117397Skan// the GNU General Public License. 29117397Skan 30117397Skan// 31117397Skan// ISO C++ 14882: 22.1 Locales 32117397Skan// 33117397Skan 34117397Skan// Information as gleaned from /usr/include/ctype.h on FreeBSD 3.4, 35117397Skan// 4.0 and all versions of the CVS managed file at: 36117397Skan// :pserver:anoncvs@anoncvs.freebsd.org:/home/ncvs/src/include/ctype.h 37117397Skan 38169691Skan_GLIBCXX_BEGIN_NAMESPACE(std) 39169691Skan 40169691Skan /// @brief Base class for ctype. 41241957Sdim class ctype_base 42117397Skan { 43241957Sdim public: 44117397Skan // Non-standard typedefs. 45117397Skan typedef const int* __to_type; 46117397Skan 47117397Skan // NB: Offsets into ctype<char>::_M_table force a particular size 48117397Skan // on the mask type. Because of this, we don't use an enum. 49117397Skan typedef unsigned long mask; 50117397Skan#ifdef _CTYPE_S 51117397Skan // FreeBSD 4.0 uses this style of define. 52117397Skan static const mask upper = _CTYPE_U; 53117397Skan static const mask lower = _CTYPE_L; 54117397Skan static const mask alpha = _CTYPE_A; 55117397Skan static const mask digit = _CTYPE_D; 56117397Skan static const mask xdigit = _CTYPE_X; 57117397Skan static const mask space = _CTYPE_S; 58117397Skan static const mask print = _CTYPE_R; 59132720Skan static const mask graph = _CTYPE_A | _CTYPE_D | _CTYPE_P; 60117397Skan static const mask cntrl = _CTYPE_C; 61117397Skan static const mask punct = _CTYPE_P; 62117397Skan static const mask alnum = _CTYPE_A | _CTYPE_D; 63117397Skan#else 64117397Skan // Older versions, including Free BSD 3.4, use this style of define. 65117397Skan static const mask upper = _U; 66117397Skan static const mask lower = _L; 67117397Skan static const mask alpha = _A; 68117397Skan static const mask digit = _D; 69117397Skan static const mask xdigit = _X; 70117397Skan static const mask space = _S; 71117397Skan static const mask print = _R; 72132720Skan static const mask graph = _A | _D | _P; 73117397Skan static const mask cntrl = _C; 74117397Skan static const mask punct = _P; 75117397Skan static const mask alnum = _A | _D; 76117397Skan#endif 77117397Skan }; 78117397Skan 79169691Skan_GLIBCXX_END_NAMESPACE 80