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 /** @file include/cstdio
00032  *  This is a Standard C++ Library file.  You should @c #include this file
00033  *  in your programs, rather than any of the "*.h" implementation files.
00034  *
00035  *  This is the C++ version of the Standard C Library header @c stdio.h,
00036  *  and its contents are (mostly) the same as that header, but are all
00037  *  contained in the namespace @c std (except for names which are defined
00038  *  as macros in C).
00039  */
00040 
00041 //
00042 // ISO C++ 14882: 27.8.2  C Library files
00043 //
00044 
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 _GLIBCXX_BEGIN_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 _GLIBCXX_END_NAMESPACE
00146 
00147 #if _GLIBCXX_USE_C99
00148 
00149 #undef snprintf
00150 #undef vfscanf
00151 #undef vscanf
00152 #undef vsnprintf
00153 #undef vsscanf
00154 
00155 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
00156 
00157 #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
00158   extern "C" int
00159   (snprintf)(char * restrict, size_t, const char * restrict, ...);
00160   extern "C" int
00161   (vfscanf)(FILE * restrict, const char * restrict, __gnuc_va_list);
00162   extern "C" int (vscanf)(const char * restrict, __gnuc_va_list);
00163   extern "C" int
00164   (vsnprintf)(char * restrict, size_t, const char * restrict, __gnuc_va_list);
00165   extern "C" int
00166   (vsscanf)(const char * restrict, const char * restrict, __gnuc_va_list);
00167 #endif
00168 
00169 #if !_GLIBCXX_USE_C99_DYNAMIC
00170   using ::snprintf;
00171   using ::vfscanf;
00172   using ::vscanf;
00173   using ::vsnprintf;
00174   using ::vsscanf;
00175 #endif
00176 
00177 _GLIBCXX_END_NAMESPACE
00178 
00179 _GLIBCXX_BEGIN_NAMESPACE(std)
00180 
00181   using ::__gnu_cxx::snprintf;
00182   using ::__gnu_cxx::vfscanf;
00183   using ::__gnu_cxx::vscanf;
00184   using ::__gnu_cxx::vsnprintf;
00185   using ::__gnu_cxx::vsscanf;
00186 
00187 _GLIBCXX_END_NAMESPACE
00188 
00189 #endif
00190 
00191 #endif

Generated on Thu Nov 1 13:11:25 2007 for libstdc++ by  doxygen 1.5.1