Author: sebor Date: Wed Mar 28 14:41:18 2007 New Revision: 523472 URL: http://svn.apache.org/viewvc?view=rev&rev=523472 Log: 2007-03-28 Martin Sebor * ctype.cpp (ctype_byname ctor): Asserted a precondition. (_RWSTD_NO_V3_LOCALE, _V3_LOCALE): Removed/replaced obsolete macros. Modified: incubator/stdcxx/trunk/src/ctype.cpp Modified: incubator/stdcxx/trunk/src/ctype.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/ctype.cpp?view=diff&rev=523472&r1=523471&r2=523472 ============================================================================== --- incubator/stdcxx/trunk/src/ctype.cpp (original) +++ incubator/stdcxx/trunk/src/ctype.cpp Wed Mar 28 14:41:18 2007 @@ -2,20 +2,27 @@ * * ctype.cpp - source for the C++ Standard Library ctype facets * - * $Id: //stdlib/dev/source/stdlib/ctype.cpp#102 $ + * $Id$ * *************************************************************************** * - * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave - * Software division. Licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. Unless required by - * applicable law or agreed to in writing, software distributed under - * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License - * for the specific language governing permissions and limitations under - * the License. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + * Copyright 2001-2006 Rogue Wave Software. * **************************************************************************/ @@ -23,8 +30,6 @@ #include -#ifndef _RWSTD_NO_V3_LOCALE - #include #include #include @@ -43,11 +48,11 @@ _RWSTD_NAMESPACE (__rw) { // table of character classes -extern const _V3_LOCALE::ctype_base::mask -__rw_classic_tab [_V3_LOCALE::ctype::table_size] = { +extern const _STD::ctype_base::mask +__rw_classic_tab [_STD::ctype::table_size] = { #undef MASK -#define MASK(x) _V3_LOCALE::ctype_base::mask (x) +#define MASK(x) _STD::ctype_base::mask (x) #undef LETTER #define LETTER(m) MASK (__rw_print | __rw_alpha | __rw_graph | m) @@ -451,7 +456,7 @@ // table of lowercase to uppercase character mappings extern const unsigned char -__rw_upper_tab [_V3_LOCALE::ctype::table_size + 1] = { +__rw_upper_tab [_STD::ctype::table_size + 1] = { #if 'A' == 0x41 @@ -532,7 +537,7 @@ // table of uppercase to lowercase character mappings extern const unsigned char -__rw_lower_tab [_V3_LOCALE::ctype::table_size + 1] = { +__rw_lower_tab [_STD::ctype::table_size + 1] = { #if 'A' == 0x41 @@ -646,7 +651,7 @@ _RWSTD_SPECIALIZE_USE_FACET (ctype); -_RWSTD_NAMESPACE (_V3_LOCALE) { +_RWSTD_NAMESPACE (std) { _RW::__rw_facet_id ctype::id; @@ -938,12 +943,12 @@ const mask *mask_tab = _RWSTD_REINTERPRET_CAST (const mask*, impl->mask_tab); + // verify that mask is the same size + _RWSTD_ASSERT (sizeof *mask_tab == sizeof *impl->mask_tab); + _C_mask_tab = _RWSTD_CONST_CAST (mask*, mask_tab); } } -} // namespace _V3_LOCALE - - -#endif // _RWSTD_NO_V3_LOCALE +} // namespace std