]> gcc.gnu.org Git - gcc.git/blame - libstdc++-v3/config/os/djgpp/ctype_inline.h
Update Copyright years for files modified in 2010.
[gcc.git] / libstdc++-v3 / config / os / djgpp / ctype_inline.h
CommitLineData
6f87af20
LB
1// Locale support -*- C++ -*-
2
d652f226
JJ
3// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010
4// Free Software Foundation, Inc.
6f87af20
LB
5//
6// This file is part of the GNU ISO C++ Library. This library is free
7// software; you can redistribute it and/or modify it under the
8// terms of the GNU General Public License as published by the
748086b7 9// Free Software Foundation; either version 3, or (at your option)
6f87af20
LB
10// any later version.
11
12// This library is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16
748086b7
JJ
17// Under Section 7 of GPL version 3, you are granted additional
18// permissions described in the GCC Runtime Library Exception, version
19// 3.1, as published by the Free Software Foundation.
6f87af20 20
748086b7
JJ
21// You should have received a copy of the GNU General Public License and
22// a copy of the GCC Runtime Library Exception along with this program;
23// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24// <http://www.gnu.org/licenses/>.
6f87af20 25
f910786b 26/** @file bits/ctype_inline.h
143c27b0 27 * This is an internal header file, included by other library headers.
f910786b 28 * Do not attempt to use it directly. @headername{locale}
143c27b0
BK
29 */
30
6f87af20
LB
31//
32// ISO C++ 14882: 22.1 Locales
33//
f910786b 34
6f87af20
LB
35// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
36// functions go in ctype.cc
f910786b 37
143c27b0
BK
38_GLIBCXX_BEGIN_NAMESPACE(std)
39
6f87af20
LB
40 bool
41 ctype<char>::
f910786b 42 is(mask __m, char __c) const
f33e4b3d 43 { return _M_table[static_cast<unsigned char>(__c)] & __m; }
6f87af20
LB
44
45 const char*
46 ctype<char>::
f910786b 47 is(const char* __low, const char* __high, mask* __vec) const
6f87af20
LB
48 {
49 while (__low < __high)
e49ceff2 50 *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
6f87af20
LB
51 return __high;
52 }
53
54 const char*
55 ctype<char>::
e49ceff2 56 scan_is(mask __m, const char* __low, const char* __high) const
6f87af20 57 {
f910786b 58 while (__low < __high
f33e4b3d 59 && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
6f87af20
LB
60 ++__low;
61 return __low;
62 }
63
64 const char*
65 ctype<char>::
e49ceff2 66 scan_not(mask __m, const char* __low, const char* __high) const
6f87af20 67 {
f910786b 68 while (__low < __high
f33e4b3d 69 && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
6f87af20
LB
70 ++__low;
71 return __low;
72 }
143c27b0
BK
73
74_GLIBCXX_END_NAMESPACE
This page took 0.881771 seconds and 5 git commands to generate.