Update.
* libio/Makefile (headers): Add stdio_ext.h.
(routines): Add __fbufsize, __freading, __fwriting, __freadable,
__fwritable, __flbf, __fpurge, __fpending, and __fsetlocking.
* libio/Versions [libc] (GLIBC_2.2): Add __fbufsize, __freading,
__fwriting, __freadable, __fwritable, __flbf, __fpurge, __fpending,
__fsetlocking, and _flushlbf.
* libio/__fbufsize.c: New file.
* libio/__flbf.c: New file.
* libio/__fpending.c: New file.
* libio/__fpurge.c: New file.
* libio/__freadable.c: New file.
* libio/__freading.c: New file.
* libio/__fsetlocking.c: New file.
* libio/__fwritable.c: New file.
* libio/__fwriting.c: New file.
* libio/stdio_ext.h: New file.
* libio/genops.c (_IO_flush_all_linebuffered): Add alias _flushlbf.
* libio/libio.h (_IO_USER_LOCK): Define.
2000-09-01 10:56:06 +02:00
|
|
|
/* Copyright (C) 2000 Free Software Foundation, Inc.
|
2001-07-06 06:58:11 +02:00
|
|
|
This file is part of the GNU C Library.
|
Update.
* libio/Makefile (headers): Add stdio_ext.h.
(routines): Add __fbufsize, __freading, __fwriting, __freadable,
__fwritable, __flbf, __fpurge, __fpending, and __fsetlocking.
* libio/Versions [libc] (GLIBC_2.2): Add __fbufsize, __freading,
__fwriting, __freadable, __fwritable, __flbf, __fpurge, __fpending,
__fsetlocking, and _flushlbf.
* libio/__fbufsize.c: New file.
* libio/__flbf.c: New file.
* libio/__fpending.c: New file.
* libio/__fpurge.c: New file.
* libio/__freadable.c: New file.
* libio/__freading.c: New file.
* libio/__fsetlocking.c: New file.
* libio/__fwritable.c: New file.
* libio/__fwriting.c: New file.
* libio/stdio_ext.h: New file.
* libio/genops.c (_IO_flush_all_linebuffered): Add alias _flushlbf.
* libio/libio.h (_IO_USER_LOCK): Define.
2000-09-01 10:56:06 +02:00
|
|
|
|
2001-07-06 06:58:11 +02:00
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
Update.
* libio/Makefile (headers): Add stdio_ext.h.
(routines): Add __fbufsize, __freading, __fwriting, __freadable,
__fwritable, __flbf, __fpurge, __fpending, and __fsetlocking.
* libio/Versions [libc] (GLIBC_2.2): Add __fbufsize, __freading,
__fwriting, __freadable, __fwritable, __flbf, __fpurge, __fpending,
__fsetlocking, and _flushlbf.
* libio/__fbufsize.c: New file.
* libio/__flbf.c: New file.
* libio/__fpending.c: New file.
* libio/__fpurge.c: New file.
* libio/__freadable.c: New file.
* libio/__freading.c: New file.
* libio/__fsetlocking.c: New file.
* libio/__fwritable.c: New file.
* libio/__fwriting.c: New file.
* libio/stdio_ext.h: New file.
* libio/genops.c (_IO_flush_all_linebuffered): Add alias _flushlbf.
* libio/libio.h (_IO_USER_LOCK): Define.
2000-09-01 10:56:06 +02:00
|
|
|
|
2001-07-06 06:58:11 +02:00
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
Update.
* libio/Makefile (headers): Add stdio_ext.h.
(routines): Add __fbufsize, __freading, __fwriting, __freadable,
__fwritable, __flbf, __fpurge, __fpending, and __fsetlocking.
* libio/Versions [libc] (GLIBC_2.2): Add __fbufsize, __freading,
__fwriting, __freadable, __fwritable, __flbf, __fpurge, __fpending,
__fsetlocking, and _flushlbf.
* libio/__fbufsize.c: New file.
* libio/__flbf.c: New file.
* libio/__fpending.c: New file.
* libio/__fpurge.c: New file.
* libio/__freadable.c: New file.
* libio/__freading.c: New file.
* libio/__fsetlocking.c: New file.
* libio/__fwritable.c: New file.
* libio/__fwriting.c: New file.
* libio/stdio_ext.h: New file.
* libio/genops.c (_IO_flush_all_linebuffered): Add alias _flushlbf.
* libio/libio.h (_IO_USER_LOCK): Define.
2000-09-01 10:56:06 +02:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 06:58:11 +02:00
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with the GNU C Library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
|
|
02111-1307 USA.
|
|
|
|
|
|
|
|
As a special exception, if you link the code in this file with
|
|
|
|
files compiled with a GNU compiler to produce an executable,
|
|
|
|
that does not cause the resulting executable to be covered by
|
|
|
|
the GNU Lesser General Public License. This exception does not
|
|
|
|
however invalidate any other reasons why the executable file
|
|
|
|
might be covered by the GNU Lesser General Public License.
|
|
|
|
This exception applies to code released by its copyright holders
|
|
|
|
in files containing the exception. */
|
Update.
* libio/Makefile (headers): Add stdio_ext.h.
(routines): Add __fbufsize, __freading, __fwriting, __freadable,
__fwritable, __flbf, __fpurge, __fpending, and __fsetlocking.
* libio/Versions [libc] (GLIBC_2.2): Add __fbufsize, __freading,
__fwriting, __freadable, __fwritable, __flbf, __fpurge, __fpending,
__fsetlocking, and _flushlbf.
* libio/__fbufsize.c: New file.
* libio/__flbf.c: New file.
* libio/__fpending.c: New file.
* libio/__fpurge.c: New file.
* libio/__freadable.c: New file.
* libio/__freading.c: New file.
* libio/__fsetlocking.c: New file.
* libio/__fwritable.c: New file.
* libio/__fwriting.c: New file.
* libio/stdio_ext.h: New file.
* libio/genops.c (_IO_flush_all_linebuffered): Add alias _flushlbf.
* libio/libio.h (_IO_USER_LOCK): Define.
2000-09-01 10:56:06 +02:00
|
|
|
|
|
|
|
#include <stdio_ext.h>
|
2000-09-01 19:49:19 +02:00
|
|
|
#include "libioP.h"
|
Update.
* libio/Makefile (headers): Add stdio_ext.h.
(routines): Add __fbufsize, __freading, __fwriting, __freadable,
__fwritable, __flbf, __fpurge, __fpending, and __fsetlocking.
* libio/Versions [libc] (GLIBC_2.2): Add __fbufsize, __freading,
__fwriting, __freadable, __fwritable, __flbf, __fpurge, __fpending,
__fsetlocking, and _flushlbf.
* libio/__fbufsize.c: New file.
* libio/__flbf.c: New file.
* libio/__fpending.c: New file.
* libio/__fpurge.c: New file.
* libio/__freadable.c: New file.
* libio/__freading.c: New file.
* libio/__fsetlocking.c: New file.
* libio/__fwritable.c: New file.
* libio/__fwriting.c: New file.
* libio/stdio_ext.h: New file.
* libio/genops.c (_IO_flush_all_linebuffered): Add alias _flushlbf.
* libio/libio.h (_IO_USER_LOCK): Define.
2000-09-01 10:56:06 +02:00
|
|
|
|
|
|
|
void
|
|
|
|
__fpurge (FILE *fp)
|
|
|
|
{
|
|
|
|
if (fp->_mode > 0)
|
|
|
|
{
|
|
|
|
/* Wide-char stream. */
|
2000-09-01 19:49:19 +02:00
|
|
|
if (_IO_in_backup (fp))
|
Update.
* libio/Makefile (headers): Add stdio_ext.h.
(routines): Add __fbufsize, __freading, __fwriting, __freadable,
__fwritable, __flbf, __fpurge, __fpending, and __fsetlocking.
* libio/Versions [libc] (GLIBC_2.2): Add __fbufsize, __freading,
__fwriting, __freadable, __fwritable, __flbf, __fpurge, __fpending,
__fsetlocking, and _flushlbf.
* libio/__fbufsize.c: New file.
* libio/__flbf.c: New file.
* libio/__fpending.c: New file.
* libio/__fpurge.c: New file.
* libio/__freadable.c: New file.
* libio/__freading.c: New file.
* libio/__fsetlocking.c: New file.
* libio/__fwritable.c: New file.
* libio/__fwriting.c: New file.
* libio/stdio_ext.h: New file.
* libio/genops.c (_IO_flush_all_linebuffered): Add alias _flushlbf.
* libio/libio.h (_IO_USER_LOCK): Define.
2000-09-01 10:56:06 +02:00
|
|
|
_IO_free_wbackup_area (fp);
|
|
|
|
|
|
|
|
fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_read_ptr;
|
|
|
|
fp->_wide_data->_IO_write_ptr = fp->_wide_data->_IO_write_base;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Byte stream. */
|
|
|
|
if (_IO_in_backup (fp))
|
|
|
|
_IO_free_backup_area (fp);
|
|
|
|
|
|
|
|
fp->_IO_read_end = fp->_IO_read_ptr;
|
|
|
|
fp->_IO_write_ptr = fp->_IO_write_base;
|
|
|
|
}
|
|
|
|
}
|