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: ???
00032 //
00033 
00034 // Note: This is not a conforming implementation.
00035 
00036 #ifndef _CPP_CWCHAR
00037 #define _CPP_CWCHAR 1
00038 
00039 #include <bits/c++config.h>
00040 #include <bits/std_cstddef.h>
00041 #include <bits/std_cstdio.h>
00042 #include <bits/std_cstdarg.h>
00043 
00044 #if _GLIBCPP_HAVE_WCHAR_H
00045 #pragma GCC system_header
00046 #include <wchar.h>
00047 #endif
00048 
00049 // Need to do a bit of trickery here with mbstate_t as char_traits
00050 // assumes it is in wchar.h, regardless of wchar_t specializations.
00051 #ifndef _GLIBCPP_HAVE_MBSTATE_T
00052 extern "C" 
00053 {
00054   typedef struct 
00055   {
00056     int __fill[6];
00057   } mbstate_t;
00058 }
00059 #endif
00060 
00061 namespace std 
00062 {
00063   using ::mbstate_t;
00064 }
00065 
00066 // Get rid of those macros defined in <wchar.h> in lieu of real functions.
00067 #undef vwprintf
00068 #undef vwscanf
00069 #undef wprintf
00070 #undef wscanf
00071 #undef getwc
00072 #undef getwchar
00073 #undef mbsinit
00074 #undef mbrlen
00075 #undef mbrtowc
00076 #undef mbsrtowcs
00077 #undef wcsrtombs
00078 #undef putwc
00079 #undef putwchar
00080 #undef ungetwc
00081 #undef wcrtomb
00082 #undef wcstod
00083 #undef wcstof
00084 #undef wcstol
00085 #undef wcstoul
00086 #undef wcscpy
00087 #undef wcsncpy
00088 #undef wcscat
00089 #undef wcsncat
00090 #undef wcscmp
00091 #undef wcscoll
00092 #undef wcsncmp
00093 #undef wcsxfrm
00094 #undef wcschr
00095 #undef wcscspn
00096 #undef wcslen
00097 #undef wcspbrk
00098 #undef wcsrchr
00099 #undef wcsspn
00100 #undef wcsstr
00101 #undef wcstok
00102 #undef wmemchr
00103 #undef wmemcmp
00104 #undef wmemcpy
00105 #undef wmemmove
00106 #undef wmemset
00107 #undef wcsftime
00108 #undef wcstold
00109 #undef wcstoll
00110 #undef wcstoull
00111 
00112 #if _GLIBCPP_USE_WCHAR_T
00113 namespace std
00114 {
00115   using ::wint_t;
00116 
00117   extern "C" wint_t btowc(int); 
00118   extern "C" int wctob(wint_t); 
00119   extern "C" wint_t fgetwc(FILE*); 
00120   extern "C" wchar_t* fgetws(wchar_t*, int, FILE*); 
00121   extern "C" wint_t fputwc(wchar_t, FILE*); 
00122   extern "C" int fputws(const wchar_t*, FILE*); 
00123   extern "C" int fwide(FILE*, int); 
00124   extern "C" int fwprintf(FILE*, const wchar_t*, ...); 
00125   extern "C" int fwscanf(FILE*, const wchar_t*, ...); 
00126   extern "C" int swprintf(wchar_t*, size_t, const wchar_t*, ...); 
00127   extern "C" int swscanf(const wchar_t*, const wchar_t*, ...); 
00128   extern "C" int vfwprintf(FILE*, const wchar_t*, va_list); 
00129   extern "C" int vfwscanf(FILE*, const wchar_t*, va_list); 
00130   extern "C" int vswprintf(wchar_t*, size_t, const wchar_t*, va_list); 
00131   extern "C" int vswscanf(const wchar_t*, const wchar_t*, va_list); 
00132   extern "C" int vwprintf(const wchar_t*, va_list); 
00133   extern "C" int vwscanf(const wchar_t*, va_list); 
00134   extern "C" int wprintf(const wchar_t*, ...); 
00135   extern "C" int wscanf(const wchar_t*, ...); 
00136   extern "C" wint_t getwc(FILE* stream); 
00137   extern "C" wint_t getwchar(void); 
00138   extern "C" int mbsinit(const mbstate_t*); 
00139   extern "C" size_t mbrlen(const char*, size_t, mbstate_t*); 
00140   extern "C" size_t mbrtowc(wchar_t*, const char*, size_t, mbstate_t*); 
00141   extern "C" size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*); 
00142   extern "C" size_t wcsrtombs(char*, const wchar_t **, size_t, mbstate_t*);
00143   extern "C" wint_t putwc(wchar_t, FILE*); 
00144   extern "C" wint_t putwchar(wchar_t); 
00145   extern "C" wint_t ungetwc(wint_t, FILE*);
00146   extern "C" size_t wcrtomb(char*, wchar_t, mbstate_t*); 
00147   extern "C" double wcstod(const wchar_t*, wchar_t**); 
00148   extern "C" float wcstof(const wchar_t*, wchar_t**); 
00149   extern "C" long int wcstol(const wchar_t*, wchar_t**, int); 
00150   extern "C" unsigned long int wcstoul(const wchar_t*, wchar_t**, int); 
00151   extern "C" wchar_t* wcscpy(wchar_t* s1, const wchar_t*); 
00152   extern "C" wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t); 
00153   extern "C" wchar_t* wcscat(wchar_t*, const wchar_t*); 
00154   extern "C" wchar_t* wcsncat(wchar_t*, const wchar_t*, size_t); 
00155   extern "C" int wcscmp(const wchar_t*, const wchar_t*); 
00156   extern "C" int wcscoll(const wchar_t*, const wchar_t*); 
00157   extern "C" int wcsncmp(const wchar_t*, const wchar_t*, size_t); 
00158   extern "C" size_t wcsxfrm(wchar_t*, const wchar_t*, size_t); 
00159   extern "C" const wchar_t* wcschr(const wchar_t*, wchar_t); 
00160   inline wchar_t*
00161   wcschr(wchar_t* __p, wchar_t __c)
00162   {
00163     return const_cast<wchar_t*>(wcschr(const_cast<const wchar_t*>(__p), __c));
00164   }
00165   extern "C" size_t wcscspn(const wchar_t*, const wchar_t*); 
00166   extern "C" size_t wcslen(const wchar_t*); 
00167   extern "C" const wchar_t* wcspbrk(const wchar_t*, const wchar_t*); 
00168   inline wchar_t*
00169   wcspbrk(wchar_t* __s1, wchar_t* __s2)
00170   {
00171     return const_cast<wchar_t*>(wcspbrk(const_cast<const wchar_t*>(__s1), __s2));
00172   }
00173   extern "C" const wchar_t* wcsrchr(const wchar_t*, wchar_t); 
00174   inline wchar_t*
00175   wcsrchr(wchar_t* __p, wchar_t __c)
00176   {
00177     return const_cast<wchar_t*>(wcsrchr(const_cast<const wchar_t*>(__p), __c));
00178   }
00179   extern "C" size_t wcsspn(const wchar_t*, const wchar_t*); 
00180   extern "C" const wchar_t* wcsstr(const wchar_t*, const wchar_t*); 
00181   inline wchar_t*
00182   wcsstr(wchar_t* __s1, wchar_t* __s2)
00183   {
00184     return const_cast<wchar_t*>(wcsstr(const_cast<const wchar_t*>(__s1), __s2));
00185   }
00186   extern "C" wchar_t* wcstok(wchar_t*, const wchar_t*, wchar_t**); 
00187   extern "C" const wchar_t* wmemchr(const wchar_t*, wchar_t, size_t);
00188   inline wchar_t*
00189   wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
00190   {
00191     return const_cast<wchar_t*>(wmemchr(const_cast<const wchar_t*>(__p), __c, __n));
00192   }
00193   extern "C" int wmemcmp(const wchar_t*, const wchar_t*, size_t); 
00194   extern "C" wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t); 
00195   extern "C" wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t); 
00196   extern "C" wchar_t* wmemset(wchar_t*, wchar_t, size_t); 
00197   extern "C" size_t wcsftime(wchar_t*, size_t, const wchar_t*, const struct tm*); 
00198 }
00199 
00200 #if _GLIBCPP_USE_C99
00201 namespace c99
00202 {
00203   extern "C" long double wcstold(const wchar_t*, wchar_t**); 
00204   extern "C" long long int wcstoll(const wchar_t*, wchar_t**, int); 
00205   extern "C" unsigned long long int wcstoull(const wchar_t*, wchar_t**, int); 
00206 }
00207 
00208 namespace std
00209 {
00210   using c99::wcstold;
00211   using c99::wcstoll;
00212   using c99::wcstoull;
00213 }
00214 #endif
00215 
00216 #endif //_GLIBCPP_USE_WCHAR_T
00217 
00218 #endif 

Generated at Tue May 1 16:28:38 2001 for libstdc++-v3 by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001