10Sstevel@tonic-gate// Locale support -*- C++ -*- 20Sstevel@tonic-gate 30Sstevel@tonic-gate// Copyright (C) 2000 Free Software Foundation, Inc. 40Sstevel@tonic-gate// 53359Smyers// This file is part of the GNU ISO C++ Library. This library is free 63359Smyers// software; you can redistribute it and/or modify it under the 70Sstevel@tonic-gate// terms of the GNU General Public License as published by the 80Sstevel@tonic-gate// Free Software Foundation; either version 2, or (at your option) 90Sstevel@tonic-gate// any later version. 100Sstevel@tonic-gate 110Sstevel@tonic-gate// This library is distributed in the hope that it will be useful, 120Sstevel@tonic-gate// but WITHOUT ANY WARRANTY; without even the implied warranty of 130Sstevel@tonic-gate// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 140Sstevel@tonic-gate// GNU General Public License for more details. 150Sstevel@tonic-gate 160Sstevel@tonic-gate// You should have received a copy of the GNU General Public License along 170Sstevel@tonic-gate// with this library; see the file COPYING. If not, write to the Free 180Sstevel@tonic-gate// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 190Sstevel@tonic-gate// USA. 200Sstevel@tonic-gate 210Sstevel@tonic-gate// As a special exception, you may use this file as part of a free software 220Sstevel@tonic-gate// library without restriction. Specifically, if other files instantiate 230Sstevel@tonic-gate// templates or use macros or inline functions from this file, or you compile 240Sstevel@tonic-gate// this file and link it with other files to produce an executable, this 250Sstevel@tonic-gate// file does not by itself cause the resulting executable to be covered by 2612401SZachary.Kissel@Sun.COM// the GNU General Public License. This exception does not however 270Sstevel@tonic-gate// invalidate any other reasons why the executable file might be covered by 280Sstevel@tonic-gate// the GNU General Public License. 290Sstevel@tonic-gate 300Sstevel@tonic-gate/** @file ctype_inline.h 310Sstevel@tonic-gate * This is an internal header file, included by other library headers. 320Sstevel@tonic-gate * You should not attempt to use it directly. 330Sstevel@tonic-gate */ 340Sstevel@tonic-gate 350Sstevel@tonic-gate// 360Sstevel@tonic-gate// ISO C++ 14882: 22.1 Locales 370Sstevel@tonic-gate// 380Sstevel@tonic-gate 390Sstevel@tonic-gate// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) 403359Smyers// functions go in ctype.cc 413359Smyers 423359Smyers_GLIBCXX_BEGIN_NAMESPACE(std) 433359Smyers 443359Smyers bool 453359Smyers ctype<char>:: 463359Smyers is(mask __m, char __c) const 473359Smyers { return __OBJ_DATA(__lc_ctype)->mask[__c] & __m; } 483359Smyers 490Sstevel@tonic-gate const char* 500Sstevel@tonic-gate ctype<char>:: 510Sstevel@tonic-gate is(const char* __low, const char* __high, mask* __vec) const 520Sstevel@tonic-gate { 530Sstevel@tonic-gate while (__low < __high) 540Sstevel@tonic-gate *__vec++ = __OBJ_DATA(__lc_ctype)->mask[*__low++]; 550Sstevel@tonic-gate return __high; 560Sstevel@tonic-gate } 570Sstevel@tonic-gate 580Sstevel@tonic-gate const char* 590Sstevel@tonic-gate ctype<char>:: 600Sstevel@tonic-gate scan_is(mask __m, const char* __low, const char* __high) const 610Sstevel@tonic-gate { 620Sstevel@tonic-gate while (__low < __high && !this->is(__m, *__low)) 630Sstevel@tonic-gate ++__low; 640Sstevel@tonic-gate return __low; 650Sstevel@tonic-gate } 660Sstevel@tonic-gate 670Sstevel@tonic-gate const char* 680Sstevel@tonic-gate ctype<char>:: 690Sstevel@tonic-gate scan_not(mask __m, const char* __low, const char* __high) const 700Sstevel@tonic-gate { 710Sstevel@tonic-gate while (__low < __high && this->is(__m, *__low) != 0) 720Sstevel@tonic-gate ++__low; 730Sstevel@tonic-gate return __low; 740Sstevel@tonic-gate } 750Sstevel@tonic-gate 760Sstevel@tonic-gate_GLIBCXX_END_NAMESPACE 770Sstevel@tonic-gate