Whole document tree
    

Whole document tree

std_cwchar.h Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

std_cwchar.h

Go to the documentation of this file.
00001 // -*- C++ -*- forwarding header.
00002 
00003 // Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
00004 //
00005 // This file is part of the GNU ISO C++ Library.  This library is free
00006 // software; you can redistribute it and/or modify it under the
00007 // terms of the GNU General Public License as published by the
00008 // Free Software Foundation; either version 2, or (at your option)
00009 // any later version.
00010 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 
00016 // You should have received a copy of the GNU General Public License along
00017 // with this library; see the file COPYING.  If not, write to the Free
00018 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
00019 // USA.
00020 
00021 // As a special exception, you may use this file as part of a free software
00022 // library without restriction.  Specifically, if other files instantiate
00023 // templates or use macros or inline functions from this file, or you compile
00024 // this file and link it with other files to produce an executable, this
00025 // file does not by itself cause the resulting executable to be covered by
00026 // the GNU General Public License.  This exception does not however
00027 // invalidate any other reasons why the executable file might be covered by
00028 // the GNU General Public License.
00029 
00030 //
00031 // ISO C++ 14882: 21.4
00032 //
00033 
00034 #ifndef _CPP_CWCHAR
00035 #define _CPP_CWCHAR 1
00036 
00037 #include <bits/c++config.h>
00038 #include <bits/std_cstddef.h>
00039 #include <bits/std_ctime.h>
00040 
00041 #if _GLIBCPP_HAVE_WCHAR_H
00042 #pragma GCC system_header
00043 #include <wchar.h>
00044 #endif
00045 
00046 // Need to do a bit of trickery here with mbstate_t as char_traits
00047 // assumes it is in wchar.h, regardless of wchar_t specializations.
00048 #ifndef _GLIBCPP_HAVE_MBSTATE_T
00049 extern "C" 
00050 {
00051   typedef struct 
00052   {
00053     int __fill[6];
00054   } mbstate_t;
00055 }
00056 #endif
00057 
00058 namespace std 
00059 {
00060   using ::mbstate_t;
00061 }
00062 
00063 // Get rid of those macros defined in <wchar.h> in lieu of real functions.
00064 #undef btowc
00065 #undef fgetwc
00066 #undef fgetws
00067 #undef fputwc
00068 #undef fputws
00069 #undef fwide
00070 #undef fwprintf
00071 #undef fwscanf
00072 #undef getwc
00073 #undef getwchar
00074 #undef mbrlen
00075 #undef mbrtowc
00076 #undef mbsinit
00077 #undef mbsrtowcs
00078 #undef putwc
00079 #undef putwchar
00080 #undef swprintf
00081 #undef swscanf
00082 #undef ungetwc
00083 #undef vfwprintf
00084 #undef vfwscanf
00085 #undef vswprintf
00086 #undef vswscanf
00087 #undef vwprintf
00088 #undef vwscanf
00089 #undef wcrtomb
00090 #undef wcscat
00091 #undef wcschr
00092 #undef wcscmp
00093 #undef wcscoll
00094 #undef wcscpy
00095 #undef wcscspn
00096 #undef wcsftime
00097 #undef wcslen
00098 #undef wcsncat
00099 #undef wcsncmp
00100 #undef wcsncpy
00101 #undef wcspbrk
00102 #undef wcsrchr
00103 #undef wcsrtombs
00104 #undef wcsspn
00105 #undef wcsstr
00106 #undef wcstod
00107 #undef wcstof
00108 #undef wcstok
00109 #undef wcstol
00110 #undef wcstoul
00111 #undef wcsxfrm
00112 #undef wctob
00113 #undef wmemchr
00114 #undef wmemcmp
00115 #undef wmemcpy
00116 #undef wmemmove
00117 #undef wmemset
00118 #undef wprintf
00119 #undef wscanf
00120 
00121 #if _GLIBCPP_USE_WCHAR_T
00122 namespace std
00123 {
00124   using ::wint_t;
00125 
00126   using ::btowc;
00127   using ::fgetwc;
00128   using ::fgetws;
00129   using ::fputwc;
00130   using ::fputws;
00131   using ::fwide;
00132   using ::fwprintf;
00133   using ::fwscanf;
00134   using ::getwc;
00135   using ::getwchar;
00136   using ::mbrlen;
00137   using ::mbrtowc;
00138   using ::mbsinit;
00139   using ::mbsrtowcs;
00140   using ::putwc;
00141   using ::putwchar;
00142   using ::swprintf;
00143   using ::swscanf;
00144   using ::ungetwc;
00145   using ::vfwprintf;
00146   using ::vfwscanf;
00147   using ::vswprintf;
00148   using ::vswscanf;
00149   using ::vwprintf;
00150   using ::vwscanf;
00151   using ::wcrtomb;
00152   using ::wcscat;
00153   using ::wcscmp;
00154   using ::wcscoll;
00155   using ::wcscpy;
00156   using ::wcscspn;
00157   using ::wcsftime;
00158   using ::wcslen;
00159   using ::wcsncat;
00160   using ::wcsncmp;
00161   using ::wcsncpy;
00162   using ::wcsrtombs;
00163   using ::wcsspn;
00164   using ::wcstod;
00165   using ::wcstof;
00166   using ::wcstok;
00167   using ::wcstol;
00168   using ::wcstoul;
00169   using ::wcsxfrm;
00170   using ::wctob;
00171   using ::wmemcmp;
00172   using ::wmemcpy;
00173   using ::wmemmove;
00174   using ::wmemset;
00175   using ::wprintf;
00176   using ::wscanf;
00177 
00178   using ::wcschr;
00179 
00180   inline wchar_t*
00181   wcschr(wchar_t* __p, wchar_t __c)
00182   { return wcschr(const_cast<const wchar_t*>(__p), __c); }
00183 
00184   using ::wcspbrk;
00185 
00186   inline wchar_t*
00187   wcspbrk(wchar_t* __s1, wchar_t* __s2)
00188   { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); }
00189 
00190   using ::wcsrchr;
00191 
00192   inline wchar_t*
00193   wcsrchr(wchar_t* __p, wchar_t __c)
00194   { return wcsrchr(const_cast<const wchar_t*>(__p), __c); }
00195 
00196   using ::wcsstr;
00197 
00198   inline wchar_t*
00199   wcsstr(wchar_t* __s1, wchar_t* __s2)
00200   { return wcsstr(const_cast<const wchar_t*>(__s1), __s2); }
00201 
00202   using ::wmemchr;
00203 
00204   inline wchar_t*
00205   wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
00206   { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
00207 }
00208 
00209 #if _GLIBCPP_USE_C99
00210 
00211 #undef wcstold
00212 #undef wcstoll
00213 #undef wcstoull
00214 
00215 namespace __gnu_cxx
00216 {
00217   using ::wcstold;
00218   using ::wcstoll;
00219   using ::wcstoull;
00220 }
00221 
00222 namespace std
00223 {
00224   using __gnu_cxx::wcstold;
00225   using __gnu_cxx::wcstoll;
00226   using __gnu_cxx::wcstoull;
00227 }
00228 #endif
00229 
00230 #endif //_GLIBCPP_USE_WCHAR_T
00231 
00232 #endif 

Generated on Mon Apr 8 03:11:33 2002 for libstdc++-v3 Source by doxygen1.2.15