c++io.h

00001 // underlying io library  -*- C++ -*-
00002 
00003 // Copyright (C) 2000, 2001, 2002 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 // c_io_stdio.h - Defines for using "C" stdio.h
00031 
00032 #ifndef _CPP_IO_STDIO_H
00033 #define _CPP_IO_STDIO_H 1
00034 
00035 #include <cstdio>
00036 #include <cstddef>
00037 #include <bits/gthr.h>
00038 
00039 namespace std 
00040 {
00041 // for fpos.h
00042   typedef long      streamoff;
00043   typedef ptrdiff_t streamsize; // Signed integral type
00044 #if _GLIBCPP_USE_WCHAR_T
00045   typedef ptrdiff_t wstreamsize;
00046 #endif
00047   typedef fpos_t    __c_streampos;
00048 
00049   typedef __gthread_mutex_t __c_lock;
00050 
00051 // for basic_file.h
00052   typedef FILE __c_file;
00053 
00054 // for ios_base.h
00055   struct __ios_flags
00056   {
00057     typedef short __int_type;
00058 
00059     static const __int_type _S_boolalpha =  0x0001;
00060     static const __int_type _S_dec =        0x0002;
00061     static const __int_type _S_fixed =      0x0004;
00062     static const __int_type _S_hex =        0x0008;
00063     static const __int_type _S_internal =   0x0010;
00064     static const __int_type _S_left =       0x0020;
00065     static const __int_type _S_oct =        0x0040;
00066     static const __int_type _S_right =      0x0080;
00067     static const __int_type _S_scientific = 0x0100;
00068     static const __int_type _S_showbase =       0x0200;
00069     static const __int_type _S_showpoint =  0x0400;
00070     static const __int_type _S_showpos =    0x0800;
00071     static const __int_type _S_skipws =     0x1000;
00072     static const __int_type _S_unitbuf =    0x2000;
00073     static const __int_type _S_uppercase =  0x4000;
00074     static const __int_type _S_adjustfield =    0x0020 | 0x0080 | 0x0010;
00075     static const __int_type _S_basefield =  0x0002 | 0x0040 | 0x0008;
00076     static const __int_type _S_floatfield = 0x0100 | 0x0004;
00077 
00078     // 27.4.2.1.3  Type ios_base::iostate
00079     static const __int_type _S_badbit =     0x01;
00080     static const __int_type _S_eofbit =     0x02;
00081     static const __int_type _S_failbit =        0x04;
00082 
00083     // 27.4.2.1.4  Type openmode
00084     static const __int_type _S_app =        0x01;
00085     static const __int_type _S_ate =        0x02;
00086     static const __int_type _S_bin =        0x04;
00087     static const __int_type _S_in =     0x08;
00088     static const __int_type _S_out =        0x10;
00089     static const __int_type _S_trunc =      0x20;
00090   };
00091 }
00092 
00093 #endif // _CPP_IO_STDIO_H

Generated on Thu Feb 10 23:22:53 2005 for libstdc++-v3 Source by  doxygen 1.4.0