1132720Skan// Locale support -*- C++ -*- 2132720Skan 3132720Skan// Copyright (C) 2000, 2003 Free Software Foundation, Inc. 4132720Skan// 5132720Skan// This file is part of the GNU ISO C++ Library. This library is free 6132720Skan// software; you can redistribute it and/or modify it under the 7132720Skan// terms of the GNU General Public License as published by the 8132720Skan// Free Software Foundation; either version 2, or (at your option) 9132720Skan// any later version. 10132720Skan 11132720Skan// This library is distributed in the hope that it will be useful, 12132720Skan// but WITHOUT ANY WARRANTY; without even the implied warranty of 13132720Skan// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14132720Skan// GNU General Public License for more details. 15132720Skan 16132720Skan// You should have received a copy of the GNU General Public License along 17132720Skan// 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, 19132720Skan// USA. 20132720Skan 21132720Skan// As a special exception, you may use this file as part of a free software 22132720Skan// library without restriction. Specifically, if other files instantiate 23132720Skan// templates or use macros or inline functions from this file, or you compile 24132720Skan// this file and link it with other files to produce an executable, this 25132720Skan// file does not by itself cause the resulting executable to be covered by 26132720Skan// the GNU General Public License. This exception does not however 27132720Skan// invalidate any other reasons why the executable file might be covered by 28132720Skan// the GNU General Public License. 29132720Skan 30169691Skan/** @file ctype_inline.h 31169691Skan * This is an internal header file, included by other library headers. 32169691Skan * You should not attempt to use it directly. 33169691Skan */ 34169691Skan 35132720Skan// 36132720Skan// ISO C++ 14882: 22.1 Locales 37132720Skan// 38132720Skan 39132720Skan// Information as gleaned from target/h/ctype.h 40132720Skan 41132720Skan// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) 42132720Skan// functions go in ctype.cc 43132720Skan 44169691Skan_GLIBCXX_BEGIN_NAMESPACE(std) 45169691Skan 46132720Skan bool 47132720Skan ctype<char>:: 48132720Skan is(mask __m, char __c) const 49132720Skan { return __ctype[static_cast<unsigned char>(__c)] & __m; } 50132720Skan 51132720Skan const char* 52132720Skan ctype<char>:: 53132720Skan is(const char* __low, const char* __high, mask* __vec) const 54132720Skan { 55132720Skan while (__low < __high) 56132720Skan *__vec++ = __ctype[static_cast<unsigned char>(*__low++)]; 57132720Skan return __high; 58132720Skan } 59132720Skan 60132720Skan const char* 61132720Skan ctype<char>:: 62132720Skan scan_is(mask __m, const char* __low, const char* __high) const 63132720Skan { 64132720Skan while (__low < __high 65132720Skan && !(__ctype[static_cast<unsigned char>(*__low)] & __m)) 66132720Skan ++__low; 67132720Skan return __low; 68132720Skan } 69132720Skan 70132720Skan const char* 71132720Skan ctype<char>:: 72132720Skan scan_not(mask __m, const char* __low, const char* __high) const 73132720Skan { 74132720Skan while (__low < __high 75132720Skan && (__ctype[static_cast<unsigned char>(*__low)] & __m)) 76132720Skan ++__low; 77132720Skan return __low; 78132720Skan } 79169691Skan 80169691Skan_GLIBCXX_END_NAMESPACE 81