1228753Smm// Locale support -*- C++ -*- 2228753Smm 3228753Smm// Copyright (C) 2000, 2003 Free Software Foundation, Inc. 4228753Smm// 5228753Smm// This file is part of the GNU ISO C++ Library. This library is free 6228753Smm// software; you can redistribute it and/or modify it under the 7228753Smm// terms of the GNU General Public License as published by the 8228753Smm// Free Software Foundation; either version 2, or (at your option) 9228753Smm// any later version. 10228753Smm 11228753Smm// This library is distributed in the hope that it will be useful, 12228753Smm// but WITHOUT ANY WARRANTY; without even the implied warranty of 13228753Smm// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14228753Smm// GNU General Public License for more details. 15228753Smm 16228753Smm// You should have received a copy of the GNU General Public License along 17228753Smm// with this library; see the file COPYING. If not, write to the Free 18228753Smm// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19228753Smm// USA. 20228753Smm 21228753Smm// As a special exception, you may use this file as part of a free software 22228753Smm// library without restriction. Specifically, if other files instantiate 23228753Smm// templates or use macros or inline functions from this file, or you compile 24228753Smm// this file and link it with other files to produce an executable, this 25228753Smm// file does not by itself cause the resulting executable to be covered by 26228753Smm// the GNU General Public License. This exception does not however 27228763Smm// invalidate any other reasons why the executable file might be covered by 28228753Smm// the GNU General Public License. 29228753Smm 30228753Smm// 31228753Smm// ISO C++ 14882: 22.1 Locales 32228753Smm// 33228753Smm 34228753Smm// Information as gleaned from /usr/include/ctype.h on FreeBSD 3.4, 35228753Smm// 4.0 and all versions of the CVS managed file at: 36228753Smm// :pserver:anoncvs@anoncvs.freebsd.org:/home/ncvs/src/include/ctype.h 37228753Smm 38228753Smm_GLIBCXX_BEGIN_NAMESPACE(std) 39228753Smm 40228753Smm /// @brief Base class for ctype. 41228753Smm struct ctype_base 42228753Smm { 43228753Smm // Non-standard typedefs. 44232153Smm typedef const int* __to_type; 45232153Smm 46228753Smm // NB: Offsets into ctype<char>::_M_table force a particular size 47228753Smm // on the mask type. Because of this, we don't use an enum. 48228753Smm typedef unsigned long mask; 49228753Smm#ifdef _CTYPE_S 50228753Smm // FreeBSD 4.0 uses this style of define. 51228753Smm static const mask upper = _CTYPE_U; 52232153Smm static const mask lower = _CTYPE_L; 53232153Smm static const mask alpha = _CTYPE_A; 54228753Smm static const mask digit = _CTYPE_D; 55228753Smm static const mask xdigit = _CTYPE_X; 56228753Smm static const mask space = _CTYPE_S; 57228753Smm static const mask print = _CTYPE_R; 58228753Smm static const mask graph = _CTYPE_A | _CTYPE_D | _CTYPE_P; 59228753Smm static const mask cntrl = _CTYPE_C; 60228753Smm static const mask punct = _CTYPE_P; 61228753Smm static const mask alnum = _CTYPE_A | _CTYPE_D; 62228753Smm#else 63228753Smm // Older versions, including Free BSD 3.4, use this style of define. 64228753Smm static const mask upper = _U; 65228753Smm static const mask lower = _L; 66228753Smm static const mask alpha = _A; 67228753Smm static const mask digit = _D; 68228753Smm static const mask xdigit = _X; 69228753Smm static const mask space = _S; 70228753Smm static const mask print = _R; 71228753Smm static const mask graph = _A | _D | _P; 72228753Smm static const mask cntrl = _C; 73228753Smm static const mask punct = _P; 74228753Smm static const mask alnum = _A | _D; 75228753Smm#endif 76228753Smm }; 77228753Smm 78228753Smm_GLIBCXX_END_NAMESPACE 79232153Smm