cstdio

Go to the documentation of this file.
00001 // -*- C++ -*- forwarding header.
00002 
00003 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
00004 // Free Software Foundation, Inc.
00005 //
00006 // This file is part of the GNU ISO C++ Library.  This library is free
00007 // software; you can redistribute it and/or modify it under the
00008 // terms of the GNU General Public License as published by the
00009 // Free Software Foundation; either version 2, or (at your option)
00010 // any later version.
00011 
00012 // This library is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 
00017 // You should have received a copy of the GNU General Public License along
00018 // with this library; see the file COPYING.  If not, write to the Free
00019 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
00020 // USA.
00021 
00022 // As a special exception, you may use this file as part of a free software
00023 // library without restriction.  Specifically, if other files instantiate
00024 // templates or use macros or inline functions from this file, or you compile
00025 // this file and link it with other files to produce an executable, this
00026 // file does not by itself cause the resulting executable to be covered by
00027 // the GNU General Public License.  This exception does not however
00028 // invalidate any other reasons why the executable file might be covered by
00029 // the GNU General Public License.
00030 
00031 //
00032 // ISO C++ 14882: 27.8.2  C Library files
00033 //
00034 
00045 #ifndef _GLIBCXX_CSTDIO
00046 #define _GLIBCXX_CSTDIO 1
00047 
00048 #pragma GCC system_header
00049 
00050 #include <bits/c++config.h>
00051 #include <cstddef>
00052 
00053 #include <stdio.h>
00054 
00055 // Get rid of those macros defined in <stdio.h> in lieu of real functions.
00056 #undef clearerr
00057 #undef fclose
00058 #undef feof
00059 #undef ferror
00060 #undef fflush
00061 #undef fgetc
00062 #undef fgetpos
00063 #undef fgets
00064 #undef fopen
00065 #undef fprintf
00066 #undef fputc
00067 #undef fputs
00068 #undef fread
00069 #undef freopen
00070 #undef fscanf
00071 #undef fseek
00072 #undef fsetpos
00073 #undef ftell
00074 #undef fwrite
00075 #undef getc
00076 #undef getchar
00077 #undef gets
00078 #undef perror
00079 #undef printf
00080 #undef putc
00081 #undef putchar
00082 #undef puts
00083 #undef remove
00084 #undef rename
00085 #undef rewind
00086 #undef scanf
00087 #undef setbuf
00088 #undef setvbuf
00089 #undef sprintf
00090 #undef sscanf
00091 #undef tmpfile
00092 #undef tmpnam
00093 #undef ungetc
00094 #undef vfprintf
00095 #undef vprintf
00096 #undef vsprintf
00097 
00098 namespace std
00099 {
00100   using ::FILE;
00101   using ::fpos_t;
00102 
00103   using ::clearerr;
00104   using ::fclose;
00105   using ::feof;
00106   using ::ferror;
00107   using ::fflush;
00108   using ::fgetc;
00109   using ::fgetpos;
00110   using ::fgets;
00111   using ::fopen;
00112   using ::fprintf;
00113   using ::fputc;
00114   using ::fputs;
00115   using ::fread;
00116   using ::freopen;
00117   using ::fscanf;
00118   using ::fseek;
00119   using ::fsetpos;
00120   using ::ftell;
00121   using ::fwrite;
00122   using ::getc;
00123   using ::getchar;
00124   using ::gets;
00125   using ::perror;
00126   using ::printf;
00127   using ::putc;
00128   using ::putchar;
00129   using ::puts;
00130   using ::remove;
00131   using ::rename;
00132   using ::rewind;
00133   using ::scanf;
00134   using ::setbuf;
00135   using ::setvbuf;
00136   using ::sprintf;
00137   using ::sscanf;
00138   using ::tmpfile;
00139   using ::tmpnam;
00140   using ::ungetc;
00141   using ::vfprintf;
00142   using ::vprintf;
00143   using ::vsprintf;
00144 }
00145 
00146 #if _GLIBCXX_USE_C99
00147 
00148 #undef snprintf
00149 #undef vfscanf
00150 #undef vscanf
00151 #undef vsnprintf
00152 #undef vsscanf
00153 
00154 namespace __gnu_cxx
00155 {
00156 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
00157   extern "C" int
00158   (snprintf)(char * restrict, size_t, const char * restrict, ...);
00159   extern "C" int
00160   (vfscanf)(FILE * restrict, const char * restrict, __gnuc_va_list);
00161   extern "C" int (vscanf)(const char * restrict, __gnuc_va_list);
00162   extern "C" int
00163   (vsnprintf)(char * restrict, size_t, const char * restrict, __gnuc_va_list);
00164   extern "C" int
00165   (vsscanf)(const char * restrict, const char * restrict, __gnuc_va_list);
00166 #endif
00167 
00168 #if !_GLIBCXX_USE_C99_DYNAMIC
00169   using ::snprintf;
00170   using ::vfscanf;
00171   using ::vscanf;
00172   using ::vsnprintf;
00173   using ::vsscanf;
00174 #endif
00175 }
00176 
00177 namespace std
00178 {
00179   using __gnu_cxx::snprintf;
00180   using __gnu_cxx::vfscanf;
00181   using __gnu_cxx::vscanf;
00182   using __gnu_cxx::vsnprintf;
00183   using __gnu_cxx::vsscanf;
00184 }
00185 #endif
00186 
00187 #endif

Generated on Tue Feb 2 16:55:52 2010 for GNU C++ STL by  doxygen 1.4.7