home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue2 / SDL.ARC / !gcc / include / unixlib / stdio-comm / h / stdio_ext
Encoding:
Text File  |  2004-09-05  |  3.1 KB  |  98 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /usr/local/cvsroot/gccsdk/unixlib/source/clib/stdio-common/stdio_ext.h,v $
  4.  * $Date: 2002/12/22 18:22:28 $
  5.  * $Revision: 1.1 $
  6.  * $State: Exp $
  7.  * $Author: admin $
  8.  *
  9.  ***************************************************************************/
  10.  
  11. /* Functions to access FILE structure internals.
  12.    Copyright (C) 2000, 2001 Free Software Foundation, Inc.
  13.    This file is part of the GNU C Library.
  14.  
  15.    The GNU C Library is free software; you can redistribute it and/or
  16.    modify it under the terms of the GNU Lesser General Public
  17.    License as published by the Free Software Foundation; either
  18.    version 2.1 of the License, or (at your option) any later version.
  19.  
  20.    The GNU C Library is distributed in the hope that it will be useful,
  21.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  22.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  23.    Lesser General Public License for more details.
  24.  
  25.    You should have received a copy of the GNU Lesser General Public
  26.    License along with the GNU C Library; if not, write to the Free
  27.    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28.    02111-1307 USA.  */
  29.  
  30. /* This header contains the same definitions as the header of the same name
  31.    on Sun's Solaris OS.  */
  32.  
  33. #ifndef _STDIO_EXT_H
  34. #define _STDIO_EXT_H    1
  35.  
  36. #include <stdio.h>
  37.  
  38. enum
  39. {
  40.   /* Query current state of the locking status.  */
  41.   FSETLOCKING_QUERY = 0,
  42. #define FSETLOCKING_QUERY    FSETLOCKING_QUERY
  43.   /* The library protects all uses of the stream functions, except for
  44.      uses of the *_unlocked functions, by calls equivalent to flockfile().  */
  45.   FSETLOCKING_INTERNAL,
  46. #define FSETLOCKING_INTERNAL    FSETLOCKING_INTERNAL
  47.   /* The user will take care of locking.  */
  48.   FSETLOCKING_BYCALLER
  49. #define FSETLOCKING_BYCALLER    FSETLOCKING_BYCALLER
  50. };
  51.  
  52.  
  53. __BEGIN_DECLS
  54.  
  55. /* Return the size of the buffer of FP in bytes currently in use by
  56.    the given stream.  */
  57. extern size_t __fbufsize (FILE *__fp);
  58.  
  59.  
  60. /* Return non-zero value iff the stream FP is opened readonly, or if the
  61.    last operation on the stream was a read operation.  */
  62. extern int __freading (FILE *__fp);
  63.  
  64. /* Return non-zero value iff the stream FP is opened write-only or
  65.    append-only, or if the last operation on the stream was a write
  66.    operation.  */
  67. extern int __fwriting (FILE *__fp);
  68.  
  69.  
  70. /* Return non-zero value iff stream FP is not opened write-only or
  71.    append-only.  */
  72. extern int __freadable (FILE *__fp);
  73.  
  74. /* Return non-zero value iff stream FP is not opened read-only.  */
  75. extern int __fwritable (FILE *__fp);
  76.  
  77.  
  78. /* Return non-zero value iff the stream FP is line-buffered.  */
  79. extern int __flbf (FILE *__fp);
  80.  
  81.  
  82. /* Discard all pending buffered I/O on the stream FP.  */
  83. extern void __fpurge (FILE *__fp);
  84.  
  85. /* Return amount of output in bytes pending on a stream FP.  */
  86. extern size_t __fpending (FILE *__fp);
  87.  
  88. /* Flush all line-buffered files.  */
  89. extern void _flushlbf (void);
  90.  
  91.  
  92. /* Set locking status of stream FP to TYPE.  */
  93. extern int __fsetlocking (FILE *__fp, int __type);
  94.  
  95. __END_DECLS
  96.  
  97. #endif    /* stdio_ext.h */
  98.