summaryrefslogtreecommitdiffstats
path: root/contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h')
-rw-r--r--contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h32
1 files changed, 23 insertions, 9 deletions
diff --git a/contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h b/contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h
index 80138cb..70bf41c 100644
--- a/contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -32,21 +32,35 @@
//
// Information as gleaned from /usr/include/ctype.h
-
+
+ extern "C" const u_int8_t _C_ctype_[];
+
const ctype_base::mask*
ctype<char>::classic_table() throw()
- { return 0; }
+ { return _C_ctype_ + 1; }
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _ctype_ + 1)
- { }
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _ctype_ + 1)
- { }
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
OpenPOWER on IntegriCloud