aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-10-02 01:40:17 +0000
committerUlrich Drepper <drepper@redhat.com>1996-10-02 01:40:17 +0000
commita68b0d31a37a86785b3dbeeee3fad96ee71fadcd (patch)
tree61537b1f028002a9e6e0f5354fced6128bda8b9c /libio
parent2d07133b507b13d4a5ed6dc250f4345c8a26942a (diff)
downloadglibc-a68b0d31a37a86785b3dbeeee3fad96ee71fadcd.zip
glibc-a68b0d31a37a86785b3dbeeee3fad96ee71fadcd.tar.gz
glibc-a68b0d31a37a86785b3dbeeee3fad96ee71fadcd.tar.bz2
update from main archive 961001
Diffstat (limited to 'libio')
-rw-r--r--libio/clearerr_u.c4
-rw-r--r--libio/fgetc.c2
-rw-r--r--libio/fputc.c2
-rw-r--r--libio/fputc_u.c4
-rw-r--r--libio/freopen.c2
-rw-r--r--libio/fseek.c2
-rw-r--r--libio/genops.c4
-rw-r--r--libio/getc.c2
-rw-r--r--libio/getc_u.c4
-rw-r--r--libio/getchar.c3
-rw-r--r--libio/getchar_u.c4
-rw-r--r--libio/iofclose.c4
-rw-r--r--libio/iofflush.c4
-rw-r--r--libio/iofflush_u.c6
-rw-r--r--libio/iofgetpos.c2
-rw-r--r--libio/iofgets.c5
-rw-r--r--libio/iofputs.c2
-rw-r--r--libio/iofread.c2
-rw-r--r--libio/iofsetpos.c2
-rw-r--r--libio/ioftell.c2
-rw-r--r--libio/iofwrite.c2
-rw-r--r--libio/iogetdelim.c2
-rw-r--r--libio/iogetline.c4
-rw-r--r--libio/iogets.c3
-rw-r--r--libio/ioputs.c3
-rw-r--r--libio/iosetbuffer.c2
-rw-r--r--libio/iosetvbuf.c2
-rw-r--r--libio/ioungetc.c2
-rw-r--r--libio/putc.c2
-rw-r--r--libio/putchar.c3
-rw-r--r--libio/rewind.c4
-rw-r--r--libio/strops.c12
32 files changed, 50 insertions, 53 deletions
diff --git a/libio/clearerr_u.c b/libio/clearerr_u.c
index 4c8b6c2..189f38d 100644
--- a/libio/clearerr_u.c
+++ b/libio/clearerr_u.c
@@ -20,11 +20,9 @@ Boston, MA 02111-1307, USA. */
#include "stdio.h"
void
-__clearerr_unlocked (fp)
+clearerr_unlocked (fp)
FILE *fp;
{
CHECK_FILE (fp, /*nothing*/);
_IO_clearerr (fp);
}
-
-weak_alias (__clearerr_unlocked, clearerr_unlocked)
diff --git a/libio/fgetc.c b/libio/fgetc.c
index 07fd89a..a754c4b 100644
--- a/libio/fgetc.c
+++ b/libio/fgetc.c
@@ -31,7 +31,7 @@ fgetc (fp)
{
int result;
CHECK_FILE (fp, EOF);
- __libc_cleanup_region_start (_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_getc_unlocked (fp);
__libc_cleanup_region_end (1);
diff --git a/libio/fputc.c b/libio/fputc.c
index bd871ab..865ac8c 100644
--- a/libio/fputc.c
+++ b/libio/fputc.c
@@ -32,7 +32,7 @@ fputc (c, fp)
{
int result;
CHECK_FILE (fp, EOF);
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_putc_unlocked (c, fp);
__libc_cleanup_region_end (1);
diff --git a/libio/fputc_u.c b/libio/fputc_u.c
index 97e4d94..bc2cc2e 100644
--- a/libio/fputc_u.c
+++ b/libio/fputc_u.c
@@ -28,12 +28,10 @@ the executable file might be covered by the GNU General Public License. */
#undef fputc_unlocked
int
-__fputc_unlocked (c, fp)
+fputc_unlocked (c, fp)
int c;
_IO_FILE *fp;
{
CHECK_FILE (fp, EOF);
return _IO_putc_unlocked (c, fp);
}
-
-weak_alias (__fputc_unlocked, fputc_unlocked)
diff --git a/libio/freopen.c b/libio/freopen.c
index 5821e84..0b782dd 100644
--- a/libio/freopen.c
+++ b/libio/freopen.c
@@ -35,7 +35,7 @@ freopen (filename, mode, fp)
CHECK_FILE (fp, NULL);
if (!(fp->_flags & _IO_IS_FILEBUF))
return NULL;
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_freopen (filename, mode, fp);
__libc_cleanup_region_end (1);
diff --git a/libio/fseek.c b/libio/fseek.c
index c33927a..61f2e92 100644
--- a/libio/fseek.c
+++ b/libio/fseek.c
@@ -33,7 +33,7 @@ fseek (fp, offset, whence)
{
int result;
CHECK_FILE (fp, -1);
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_fseek (fp, offset, whence);
__libc_cleanup_region_end (1);
diff --git a/libio/genops.c b/libio/genops.c
index 7c2dcba..bd741ec 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -329,7 +329,7 @@ DEFUN(_IO_default_xsputn, (f, data, n),
_IO_ssize_t count = f->_IO_write_end - f->_IO_write_ptr; /* Space available. */
if (count > 0)
{
- if (count > more)
+ if ((_IO_size_t) count > more)
count = more;
if (count > 20)
{
@@ -374,7 +374,7 @@ DEFUN(_IO_default_xsgetn, (fp, data, n),
_IO_ssize_t count = fp->_IO_read_end - fp->_IO_read_ptr; /* Data available. */
if (count > 0)
{
- if (count > more)
+ if ((_IO_size_t) count > more)
count = more;
if (count > 20)
{
diff --git a/libio/getc.c b/libio/getc.c
index 82e5756..c345e44 100644
--- a/libio/getc.c
+++ b/libio/getc.c
@@ -33,7 +33,7 @@ getc (fp)
{
int result;
CHECK_FILE (fp, EOF);
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_getc_unlocked (fp);
__libc_cleanup_region_end (1);
diff --git a/libio/getc_u.c b/libio/getc_u.c
index 4aa5cd5..569e063 100644
--- a/libio/getc_u.c
+++ b/libio/getc_u.c
@@ -28,11 +28,9 @@ the executable file might be covered by the GNU General Public License. */
#undef getc_unlocked
int
-__getc_unlocked (fp)
+getc_unlocked (fp)
FILE *fp;
{
CHECK_FILE (fp, EOF);
return _IO_getc_unlocked (fp);
}
-
-weak_alias (__getc_unlocked, getc_unlocked)
diff --git a/libio/getchar.c b/libio/getchar.c
index e7a236c..d54ec58 100644
--- a/libio/getchar.c
+++ b/libio/getchar.c
@@ -31,7 +31,8 @@ int
getchar ()
{
int result;
- __libc_cleanup_region_start (&_IO_funlockfile, stdin);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile,
+ stdin);
_IO_flockfile (stdin);
result = _IO_getc_unlocked (stdin);
__libc_cleanup_region_end (1);
diff --git a/libio/getchar_u.c b/libio/getchar_u.c
index 0430f81..337f693 100644
--- a/libio/getchar_u.c
+++ b/libio/getchar_u.c
@@ -28,9 +28,7 @@ the executable file might be covered by the GNU General Public License. */
#undef getchar_unlocked
int
-__getchar_unlocked ()
+getchar_unlocked ()
{
return _IO_getc_unlocked (stdin);
}
-
-weak_alias (__getchar_unlocked, getchar_unlocked)
diff --git a/libio/iofclose.c b/libio/iofclose.c
index 9d53737..77c7b50 100644
--- a/libio/iofclose.c
+++ b/libio/iofclose.c
@@ -35,19 +35,19 @@ _IO_fclose (fp)
CHECK_FILE(fp, EOF);
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
if (fp->_IO_file_flags & _IO_IS_FILEBUF)
status = _IO_file_close_it (fp);
else
status = fp->_flags & _IO_ERR_SEEN ? -1 : 0;
_IO_FINISH (fp);
+ __libc_cleanup_region_end (1);
if (fp != _IO_stdin && fp != _IO_stdout && fp != _IO_stderr)
{
fp->_IO_file_flags = 0;
free(fp);
}
- __libc_cleanup_region_end (1);
return status;
}
diff --git a/libio/iofflush.c b/libio/iofflush.c
index cbc5b1f..385c962 100644
--- a/libio/iofflush.c
+++ b/libio/iofflush.c
@@ -23,6 +23,7 @@ This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "libioP.h"
+#include <stdio.h>
int
_IO_fflush (fp)
@@ -34,7 +35,8 @@ _IO_fflush (fp)
{
int result;
CHECK_FILE (fp, EOF);
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile,
+ fp);
_IO_flockfile (fp);
result = _IO_SYNC (fp) ? EOF : 0;
__libc_cleanup_region_end (1);
diff --git a/libio/iofflush_u.c b/libio/iofflush_u.c
index b7a9195..b8af710 100644
--- a/libio/iofflush_u.c
+++ b/libio/iofflush_u.c
@@ -23,9 +23,10 @@ This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "libioP.h"
+#include <stdio.h>
int
-_IO_fflush_unlocked (fp)
+fflush_unlocked (fp)
register _IO_FILE *fp;
{
if (fp == NULL)
@@ -36,6 +37,3 @@ _IO_fflush_unlocked (fp)
return _IO_SYNC (fp) ? EOF : 0;
}
}
-
-weak_alias (_IO_fflush_unlocked, fflush_unlocked)
-
diff --git a/libio/iofgetpos.c b/libio/iofgetpos.c
index 4cec7a7..07128c1 100644
--- a/libio/iofgetpos.c
+++ b/libio/iofgetpos.c
@@ -33,7 +33,7 @@ _IO_fgetpos (fp, posp)
{
_IO_fpos_t pos;
CHECK_FILE (fp, EOF);
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
__libc_cleanup_region_end (1);
diff --git a/libio/iofgets.c b/libio/iofgets.c
index 4d4ce5c..71d677c 100644
--- a/libio/iofgets.c
+++ b/libio/iofgets.c
@@ -1,5 +1,5 @@
/*
-Copyright (C) 1993, 1995 Free Software Foundation
+Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU IO Library. This library is free
software; you can redistribute it and/or modify it under the
@@ -23,6 +23,7 @@ This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "libioP.h"
+#include <stdio.h>
char*
_IO_fgets (buf, n, fp)
@@ -35,7 +36,7 @@ _IO_fgets (buf, n, fp)
CHECK_FILE (fp, NULL);
if (n <= 0)
return NULL;
- __libc_cleanup_region_start (&__funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
__flockfile (fp);
count = _IO_getline (fp, buf, n - 1, '\n', 1);
if (count == 0 || (fp->_IO_file_flags & _IO_ERR_SEEN))
diff --git a/libio/iofputs.c b/libio/iofputs.c
index a9fd5f2..6e94223 100644
--- a/libio/iofputs.c
+++ b/libio/iofputs.c
@@ -33,7 +33,7 @@ _IO_fputs (str, fp)
_IO_size_t len = strlen (str);
int result;
CHECK_FILE (fp, EOF);
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
if (_IO_sputn (fp, str, len) != len)
result = EOF;
diff --git a/libio/iofread.c b/libio/iofread.c
index af6bc33..8610b0c 100644
--- a/libio/iofread.c
+++ b/libio/iofread.c
@@ -36,7 +36,7 @@ _IO_fread (buf, size, count, fp)
CHECK_FILE (fp, 0);
if (bytes_requested == 0)
return 0;
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
bytes_read = _IO_sgetn (fp, (char *) buf, bytes_requested);
__libc_cleanup_region_end (1);
diff --git a/libio/iofsetpos.c b/libio/iofsetpos.c
index 9013606..52700f7 100644
--- a/libio/iofsetpos.c
+++ b/libio/iofsetpos.c
@@ -32,7 +32,7 @@ _IO_fsetpos (fp, posp)
{
int result;
CHECK_FILE (fp, EOF);
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
if (_IO_seekpos (fp, *posp, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD)
{
diff --git a/libio/ioftell.c b/libio/ioftell.c
index ec3b1a2..1fc7c55 100644
--- a/libio/ioftell.c
+++ b/libio/ioftell.c
@@ -32,7 +32,7 @@ _IO_ftell (fp)
{
_IO_pos_t pos;
CHECK_FILE (fp, -1L);
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
__libc_cleanup_region_end (1);
diff --git a/libio/iofwrite.c b/libio/iofwrite.c
index 4ee489d..7767a94 100644
--- a/libio/iofwrite.c
+++ b/libio/iofwrite.c
@@ -36,7 +36,7 @@ _IO_fwrite (buf, size, count, fp)
CHECK_FILE (fp, 0);
if (request == 0)
return 0;
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
written = _IO_sputn (fp, (const char *) buf, request);
__libc_cleanup_region_end (1);
diff --git a/libio/iogetdelim.c b/libio/iogetdelim.c
index da6efa4..d41bb6b 100644
--- a/libio/iogetdelim.c
+++ b/libio/iogetdelim.c
@@ -52,7 +52,7 @@ _IO_getdelim (lineptr, n, delimiter, fp)
return -1;
}
CHECK_FILE (fp, -1);
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
if (_IO_ferror_unlocked (fp))
{
diff --git a/libio/iogetline.c b/libio/iogetline.c
index 85dff7e..a727071 100644
--- a/libio/iogetline.c
+++ b/libio/iogetline.c
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 1993 Free Software Foundation
This file is part of the GNU IO Library. This library is free
@@ -48,7 +48,7 @@ DEFUN(_IO_getline, (fp, buf, n, delim, extract_delim),
break;
else
len = fp->_IO_read_end - fp->_IO_read_ptr;
- if (len >= n)
+ if ((_IO_size_t) len >= n)
len = n;
t = (char*)memchr((void*)fp->_IO_read_ptr, delim, len);
if (t != NULL)
diff --git a/libio/iogets.c b/libio/iogets.c
index 8fdc435..e132093 100644
--- a/libio/iogets.c
+++ b/libio/iogets.c
@@ -32,7 +32,8 @@ _IO_gets (buf)
_IO_size_t count;
int ch;
- __libc_cleanup_region_start (&_IO_funlockfile, _IO_stdin);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile,
+ _IO_stdin);
_IO_flockfile (_IO_stdin);
ch = _IO_getc_unlocked (_IO_stdin);
if (ch == EOF)
diff --git a/libio/ioputs.c b/libio/ioputs.c
index 2770ab2..34e68b9 100644
--- a/libio/ioputs.c
+++ b/libio/ioputs.c
@@ -30,7 +30,8 @@ _IO_puts (str)
{
int result;
_IO_size_t len = strlen (str);
- __libc_cleanup_region_start (&_IO_funlockfile, _IO_stdout);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile,
+ _IO_stdout);
_IO_flockfile (_IO_stdout);
if (_IO_sputn (_IO_stdout, str, len) == len
&& _IO_putc_unlocked ('\n', _IO_stdout) != EOF)
diff --git a/libio/iosetbuffer.c b/libio/iosetbuffer.c
index e44f339..d14e5d4 100644
--- a/libio/iosetbuffer.c
+++ b/libio/iosetbuffer.c
@@ -31,7 +31,7 @@ _IO_setbuffer (fp, buf, size)
_IO_size_t size;
{
CHECK_FILE (fp, );
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
fp->_flags &= ~_IO_LINE_BUF;
if (!buf)
diff --git a/libio/iosetvbuf.c b/libio/iosetvbuf.c
index e9dccae..3776330 100644
--- a/libio/iosetvbuf.c
+++ b/libio/iosetvbuf.c
@@ -37,7 +37,7 @@ _IO_setvbuf (fp, buf, mode, size)
{
int result;
CHECK_FILE (fp, EOF);
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
switch (mode)
{
diff --git a/libio/ioungetc.c b/libio/ioungetc.c
index cc41408..180e789 100644
--- a/libio/ioungetc.c
+++ b/libio/ioungetc.c
@@ -33,7 +33,7 @@ _IO_ungetc (c, fp)
CHECK_FILE (fp, EOF);
if (c == EOF)
return EOF;
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_sputbackc (fp, (unsigned char) c);
__libc_cleanup_region_end (1);
diff --git a/libio/putc.c b/libio/putc.c
index 5dff3de..bc69e2e 100644
--- a/libio/putc.c
+++ b/libio/putc.c
@@ -28,7 +28,7 @@ putc (c, fp)
{
int result;
CHECK_FILE (fp, EOF);
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_putc_unlocked (c, fp);
__libc_cleanup_region_end (1);
diff --git a/libio/putchar.c b/libio/putchar.c
index a7891a5..7822a31 100644
--- a/libio/putchar.c
+++ b/libio/putchar.c
@@ -26,7 +26,8 @@ putchar (c)
int c;
{
int result;
- __libc_cleanup_region_start (&_IO_funlockfile, _IO_stdout);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile,
+ _IO_stdout);
_IO_flockfile (_IO_stdout);
result = _IO_putc_unlocked (c, _IO_stdout);
__libc_cleanup_region_end (1);
diff --git a/libio/rewind.c b/libio/rewind.c
index d30233e..2af2dd8 100644
--- a/libio/rewind.c
+++ b/libio/rewind.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation
+/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
This file is part of the GNU IO Library. This library is free
software; you can redistribute it and/or modify it under the
@@ -29,7 +29,7 @@ rewind (fp)
_IO_FILE* fp;
{
CHECK_FILE (fp, );
- __libc_cleanup_region_start (&_IO_funlockfile, fp);
+ __libc_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
_IO_rewind (fp);
__libc_cleanup_region_end (1);
diff --git a/libio/strops.c b/libio/strops.c
index 98c5b26..4640633 100644
--- a/libio/strops.c
+++ b/libio/strops.c
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 1993 Free Software Foundation
This file is part of the GNU IO Library. This library is free
@@ -112,7 +112,7 @@ DEFUN(_IO_str_overflow, (fp, c),
fp->_flags |= _IO_CURRENTLY_PUTTING;
get_pos = LEN(fp);
}
- if (pos >= _IO_blen(fp) + flush_only)
+ if (pos >= (_IO_size_t) (_IO_blen(fp) + flush_only))
{
if (fp->_flags & _IO_USER_BUF) /* not allowed to enlarge */
{
@@ -187,10 +187,10 @@ DEFUN(_IO_str_count, (fp),
register _IO_FILE *fp)
{
_IO_ssize_t put_len = fp->_IO_write_ptr - fp->_IO_write_base;
- if (put_len < LEN(fp))
+ if (put_len < (_IO_ssize_t) LEN(fp))
put_len = LEN(fp);
return put_len;
-}
+}
_IO_pos_t
DEFUN(_IO_str_seekoff, (fp, offset, dir, mode),
@@ -213,7 +213,7 @@ DEFUN(_IO_str_seekoff, (fp, offset, dir, mode),
default: /* case _IO_seek_set: */
break;
}
- if (offset < 0 || (_IO_size_t)offset > cur_size)
+ if (offset < 0 || (_IO_ssize_t)offset > cur_size)
return EOF;
fp->_IO_read_ptr = fp->_IO_read_base + offset;
fp->_IO_read_end = fp->_IO_read_base + cur_size;
@@ -234,7 +234,7 @@ DEFUN(_IO_str_seekoff, (fp, offset, dir, mode),
default: /* case _IO_seek_set: */
break;
}
- if (offset < 0 || (_IO_size_t)offset > cur_size)
+ if (offset < 0 || (_IO_ssize_t)offset > cur_size)
return EOF;
LEN(fp) = cur_size;
fp->_IO_write_ptr = fp->_IO_write_base + offset;