# c++io.h

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