summaryrefslogtreecommitdiffstats
path: root/contrib/libstdc++/config/os/mingw32
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-07-11 03:42:04 +0000
committerkan <kan@FreeBSD.org>2003-07-11 03:42:04 +0000
commitc7bbbdd036d3dd7ae253fb13c9994215af06f073 (patch)
treece14546aca3a67fa3440aed52f132bafaf68fe70 /contrib/libstdc++/config/os/mingw32
parentb2a8872fbe1ec1c49094559ac7b78e6ea4ab7180 (diff)
downloadFreeBSD-src-c7bbbdd036d3dd7ae253fb13c9994215af06f073.zip
FreeBSD-src-c7bbbdd036d3dd7ae253fb13c9994215af06f073.tar.gz
Gcc 3.3.1-pre 2003-07-11 C++ support bits.
Diffstat (limited to 'contrib/libstdc++/config/os/mingw32')
-rw-r--r--contrib/libstdc++/config/os/mingw32/ctype_base.h58
-rw-r--r--contrib/libstdc++/config/os/mingw32/ctype_inline.h71
-rw-r--r--contrib/libstdc++/config/os/mingw32/ctype_noninline.h89
-rw-r--r--contrib/libstdc++/config/os/mingw32/os_defines.h37
4 files changed, 255 insertions, 0 deletions
diff --git a/contrib/libstdc++/config/os/mingw32/ctype_base.h b/contrib/libstdc++/config/os/mingw32/ctype_base.h
new file mode 100644
index 0000000..c077594
--- /dev/null
+++ b/contrib/libstdc++/config/os/mingw32/ctype_base.h
@@ -0,0 +1,58 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information, as gleaned from /mingw32/include/ctype.h.
+
+ struct ctype_base
+ {
+ // Non-standard typedefs.
+ typedef const int* __to_type;
+
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+ typedef unsigned short mask;
+ static const mask upper = _UPPER;
+ static const mask lower = _LOWER;
+ static const mask alpha = _ALPHA;
+ static const mask digit = _DIGIT;
+ static const mask xdigit = _HEX;
+ static const mask space = _SPACE;
+ static const mask print = (_BLANK | _PUNCT| _ALPHA | _DIGIT);
+ static const mask graph = (_PUNCT | _ALPHA | _DIGIT);
+ static const mask cntrl = _CONTROL;
+ static const mask punct = _PUNCT;
+ static const mask alnum = (_ALPHA | _DIGIT);
+ };
+
+
+
diff --git a/contrib/libstdc++/config/os/mingw32/ctype_inline.h b/contrib/libstdc++/config/os/mingw32/ctype_inline.h
new file mode 100644
index 0000000..979d607
--- /dev/null
+++ b/contrib/libstdc++/config/os/mingw32/ctype_inline.h
@@ -0,0 +1,71 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
+// functions go in ctype.cc
+
+
+ bool
+ ctype<char>::
+ is(mask __m, char __c) const
+ {
+ return (_M_table[static_cast<unsigned char>(__c) ] & __m);
+ }
+
+
+ const char*
+ ctype<char>::
+ is(const char* __low, const char* __high, mask* __vec) const
+ {
+ while (__low < __high)
+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
+ return __high;
+ }
+
+ const char*
+ ctype<char>::
+ scan_is(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high && !this->is(__m, *__low))
+ ++__low;
+ return __low;
+ }
+
+ const char*
+ ctype<char>::
+ scan_not(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high && this->is(__m, *__low) != 0)
+ ++__low;
+ return __low;
+ }
diff --git a/contrib/libstdc++/config/os/mingw32/ctype_noninline.h b/contrib/libstdc++/config/os/mingw32/ctype_noninline.h
new file mode 100644
index 0000000..998547c
--- /dev/null
+++ b/contrib/libstdc++/config/os/mingw32/ctype_noninline.h
@@ -0,0 +1,89 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2002 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information as gleaned from /mingw32/include/ctype.h.
+
+ // This should be in mingw's ctype.h but isn't in older versions
+ // Static classic C-locale table. _ctype[0] is EOF
+ extern "C" unsigned short __declspec(dllimport) _ctype[];
+
+ const ctype_base::mask*
+ ctype<char>::classic_table() throw()
+ { return _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 : classic_table())
+ { }
+
+ 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 : classic_table())
+ { }
+
+ char
+ ctype<char>::do_toupper(char __c) const
+ { return (this->is(ctype_base::lower, __c) ? (__c - 'a' + 'A') : __c); }
+
+ const char*
+ ctype<char>::do_toupper(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = this->do_toupper(*__low);
+ ++__low;
+ }
+ return __high;
+ }
+
+ char
+ ctype<char>::do_tolower(char __c) const
+ { return (this->is(ctype_base::upper, __c) ? (__c - 'A' + 'a') : __c); }
+
+ const char*
+ ctype<char>::do_tolower(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = this->do_tolower(*__low);
+ ++__low;
+ }
+ return __high;
+ }
+
+
+
+
diff --git a/contrib/libstdc++/config/os/mingw32/os_defines.h b/contrib/libstdc++/config/os/mingw32/os_defines.h
new file mode 100644
index 0000000..5c99e09
--- /dev/null
+++ b/contrib/libstdc++/config/os/mingw32/os_defines.h
@@ -0,0 +1,37 @@
+// Specific definitions for generic platforms -*- C++ -*-
+
+// Copyright (C) 2000 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+
+#ifndef _GLIBCPP_OS_DEFINES
+# define _GLIBCPP_OS_DEFINES
+
+// System-specific #define, typedefs, corrections, etc, go here. This
+// file will come before all others.
+
+#endif
OpenPOWER on IntegriCloud