aboutsummaryrefslogtreecommitdiff
path: root/libio/wgenops.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-26 01:45:59 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-26 01:45:59 +0000
commit77fe0b9cd86ccba7349921082d886cbca613404c (patch)
treeef0d25d9dadd97d317a1c4e044385ccdde34bcc3 /libio/wgenops.c
parentd417e0ffc4d2707b0d684106f17554395e8be220 (diff)
downloadglibc-77fe0b9cd86ccba7349921082d886cbca613404c.zip
glibc-77fe0b9cd86ccba7349921082d886cbca613404c.tar.gz
glibc-77fe0b9cd86ccba7349921082d886cbca613404c.tar.bz2
Update.
2002-02-25 Ulrich Drepper <drepper@redhat.com> * assert/assert-perr.c: Use INTUSE to reference functions and variables inside libc itself. Ise INTDEF and INTDEF2 to define appropriate aliases. Add prototypes for the new aliases. * assert/assert.c: Likewise. * include/libc-symbols.h: Likewise. * include/stdio.h: Likewise. * include/netinet/in.h: Likewise. * include/rpc/auth.h: Likewise. * include/rpc/auth_unix.h: Likewise. * include/rpc/key_prot.h: Likewise. * include/rpc/pmap_prot.h: Likewise. * include/rpc/pmap_rmt.h: Likewise. * include/rpc/rpc_msg.h: Likewise. * include/rpc/xdr.h: Likewise. * inet/gethstbyad_r.c: Likewise. * inet/gethstbynm2_r.c: Likewise. * inet/gethstbynm_r.c: Likewise. * inet/gethstent_r.c: Likewise. * inet/in6_addr.c: Likewise. * libio/__fpurge.c: Likewise. * libio/filedoalloc.c: Likewise. * libio/fileops.c: Likewise. * libio/ftello.c: Likewise. * libio/ftello64.c: Likewise. * libio/genops.c: Likewise. * libio/iofclose.c: Likewise. * libio/iofdopen.c: Likewise. * libio/iofflush.c: Likewise. * libio/iofflush_u.c: Likewise. * libio/iofgetpos.c: Likewise. * libio/iofgetpos64.c: Likewise. * libio/iofgets.c: Likewise. * libio/iofgets_u.c: Likewise. * libio/iofopen.c: Likewise. * libio/iofopncook.c: Likewise. * libio/iofputs.c: Likewise. * libio/iofread.c: Likewise. * libio/iofread_u.c: Likewise. * libio/iofsetpos.c: Likewise. * libio/iofsetpos64.c: Likewise. * libio/ioftell.c: Likewise. * libio/iofwrite.c: Likewise. * libio/iogetline.c: Likewise. * libio/iogets.c: Likewise. * libio/iogetwline.c: Likewise. * libio/iolibio.h: Likewise. * libio/iopadn.c: Likewise. * libio/iopopen.c: Likewise. * libio/ioseekoff.c: Likewise. * libio/ioseekpos.c: Likewise. * libio/iosetbuffer.c: Likewise. * libio/iosetvbuf.c: Likewise. * libio/ioungetc.c: Likewise. * libio/ioungetwc.c: Likewise. * libio/iovdprintf.c: Likewise. * libio/iovsprintf.c: Likewise. * libio/iovsscanf.c: Likewise. * libio/libioP.h: Likewise. * libio/memstream.c: Likewise. * libio/obprintf.c: Likewise. * libio/oldfileops.c: Likewise. * libio/oldiofclose.c: Likewise. * libio/oldiofdopen.c: Likewise. * libio/oldiofgetpos.c: Likewise. * libio/oldiofgetpos64.c: Likewise. * libio/oldiofopen.c: Likewise. * libio/oldiofsetpos.c: Likewise. * libio/oldiofsetpos64.c: Likewise. * libio/oldiopopen.c: Likewise. * libio/oldstdfiles.c: Likewise. * libio/putc.c: Likewise. * libio/setbuf.c: Likewise. * libio/setlinebuf.c: Likewise. * libio/stdfiles.c: Likewise. * libio/stdio.c: Likewise. * libio/strops.c: Likewise. * libio/vasprintf.c: Likewise. * libio/vscanf.c: Likewise. * libio/vsnprintf.c: Likewise. * libio/vswprintf.c: Likewise. * libio/wfiledoalloc.c: Likewise. * libio/wfileops.c: Likewise. * libio/wgenops.c: Likewise. * libio/wstrops.c: Likewise. * malloc/mtrace.c: Likewise. * misc/error.c: Likewise. * misc/syslog.c: Likewise. * nss/getXXbyYY_r.c: Likewise. * nss/getXXent_r.c: Likewise. * nss/hosts-lookup.c: Likewise. * stdio-common/getw.c * stdio-common/printf-prs.c: Likewise. * stdio-common/printf_fp.c: Likewise. * stdio-common/printf_size.c: Likewise. * stdio-common/putw.c: Likewise. * stdio-common/scanf.c: Likewise. * stdio-common/sprintf.c: Likewise. * stdio-common/tmpfile64.c: Likewise. * stdio-common/vfprintf.c: Likewise. * stdio-common/vfscanf.c: Likewise. * stdlib/strfmon.c: Likewise. * sunrpc/auth_des.c: Likewise. * sunrpc/auth_none.c: Likewise. * sunrpc/auth_unix.c: Likewise. * sunrpc/authdes_prot.c: Likewise. * sunrpc/authuxprot.c: Likewise. * sunrpc/clnt_perr.c: Likewise. * sunrpc/clnt_raw.c: Likewise. * sunrpc/clnt_tcp.c: Likewise. * sunrpc/clnt_udp.c: Likewise. * sunrpc/clnt_unix.c: Likewise. * sunrpc/key_call.c: Likewise. * sunrpc/key_prot.c: Likewise. * sunrpc/openchild.c: Likewise. * sunrpc/pm_getmaps.c: Likewise. * sunrpc/pm_getport.c: Likewise. * sunrpc/pmap_clnt.c: Likewise. * sunrpc/pmap_prot.c: Likewise. * sunrpc/pmap_prot2.c: Likewise. * sunrpc/pmap_rmt.c: Likewise. * sunrpc/rpc_cmsg.c: Likewise. * sunrpc/rpc_prot.c: Likewise. * sunrpc/svc_authux.c: Likewise. * sunrpc/svc_raw.c: Likewise. * sunrpc/svc_simple.c: Likewise. * sunrpc/svc_tcp.c: Likewise. * sunrpc/svc_udp.c: Likewise. * sunrpc/svc_unix.c: Likewise. * sunrpc/xdr.c: Likewise. * sunrpc/xdr_array.c: Likewise. * sunrpc/xdr_mem.c: Likewise. * sunrpc/xdr_rec.c: Likewise. * sunrpc/xdr_ref.c: Likewise. * sunrpc/xdr_stdio.c: Likewise. * sysdeps/generic/_strerror.c: Likewise. * sysdeps/generic/printf_fphex.c: Likewise. * sysdeps/generic/tmpfile.c: Likewise. * sysdeps/gnu/errlist.awk: Likewise. * sysdeps/gnu/errlist.c: Likewise. * libio/Makefile (routines): Remove iosprint. * libio/iosprintf.c: Removed
Diffstat (limited to 'libio/wgenops.c')
-rw-r--r--libio/wgenops.c56
1 files changed, 36 insertions, 20 deletions
diff --git a/libio/wgenops.c b/libio/wgenops.c
index f021e8a..b0580e5 100644
--- a/libio/wgenops.c
+++ b/libio/wgenops.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,1995,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995,1997-2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper <drepper@cygnus.com>.
Based on the single byte version by Per Bothner <bothner@cygnus.com>.
@@ -64,6 +64,7 @@ _IO_least_wmarker (fp, end_p)
least_so_far = mark->_pos;
return least_so_far;
}
+INTDEF(_IO_least_wmarker)
/* Switch current get area from backup buffer to (start of) main get area. */
void
@@ -83,6 +84,7 @@ _IO_switch_to_main_wget_area (fp)
/* Set _IO_read_ptr. */
fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_base;
}
+INTDEF(_IO_switch_to_main_wget_area)
/* Switch current get area from main get area to (end of) backup area. */
@@ -103,6 +105,7 @@ _IO_switch_to_wbackup_area (fp)
/* Set _IO_read_ptr. */
fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end;
}
+INTDEF(_IO_switch_to_wbackup_area)
void
@@ -121,6 +124,7 @@ _IO_wsetb (f, b, eb, a)
else
f->_flags |= _IO_USER_BUF;
}
+INTDEF(_IO_wsetb)
wint_t
@@ -160,7 +164,7 @@ _IO_wdefault_pbackfail (fp, c)
fp->_wide_data->_IO_backup_base = fp->_wide_data->_IO_save_end;
}
fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_read_ptr;
- _IO_switch_to_wbackup_area (fp);
+ INTUSE(_IO_switch_to_wbackup_area) (fp);
}
else if (fp->_wide_data->_IO_read_ptr <= fp->_wide_data->_IO_read_base)
{
@@ -185,6 +189,7 @@ _IO_wdefault_pbackfail (fp, c)
}
return c;
}
+INTDEF(_IO_wdefault_pbackfail)
void
@@ -214,8 +219,9 @@ _IO_wdefault_finish (fp, dummy)
_IO_lock_fini (*fp->_lock);
#endif
- _IO_un_link ((struct _IO_FILE_plus *) fp);
+ INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp);
}
+INTDEF(_IO_wdefault_finish)
wint_t
@@ -228,6 +234,7 @@ _IO_wdefault_uflow (fp)
return WEOF;
return *fp->_wide_data->_IO_read_ptr++;
}
+INTDEF(_IO_wdefault_uflow)
wint_t
@@ -251,13 +258,13 @@ __wuflow (fp)
if (fp->_mode == 0)
_IO_fwide (fp, 1);
if (_IO_in_put_mode (fp))
- if (_IO_switch_to_wget_mode (fp) == EOF)
+ if (INTUSE(_IO_switch_to_wget_mode) (fp) == EOF)
return WEOF;
if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
return *fp->_wide_data->_IO_read_ptr++;
if (_IO_in_backup (fp))
{
- _IO_switch_to_main_wget_area (fp);
+ INTUSE(_IO_switch_to_main_wget_area) (fp);
if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
return *fp->_wide_data->_IO_read_ptr++;
}
@@ -267,7 +274,7 @@ __wuflow (fp)
return WEOF;
}
else if (_IO_have_wbackup (fp))
- _IO_free_wbackup_area (fp);
+ INTUSE(_IO_free_wbackup_area) (fp);
return _IO_UFLOW (fp);
}
@@ -282,13 +289,13 @@ __wunderflow (fp)
if (fp->_mode == 0)
_IO_fwide (fp, 1);
if (_IO_in_put_mode (fp))
- if (_IO_switch_to_wget_mode (fp) == EOF)
+ if (INTUSE(_IO_switch_to_wget_mode) (fp) == EOF)
return WEOF;
if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
return *fp->_wide_data->_IO_read_ptr;
if (_IO_in_backup (fp))
{
- _IO_switch_to_main_wget_area (fp);
+ INTUSE(_IO_switch_to_main_wget_area) (fp);
if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
return *fp->_wide_data->_IO_read_ptr;
}
@@ -298,7 +305,7 @@ __wunderflow (fp)
return WEOF;
}
else if (_IO_have_backup (fp))
- _IO_free_wbackup_area (fp);
+ INTUSE(_IO_free_wbackup_area) (fp);
return _IO_UNDERFLOW (fp);
}
@@ -351,6 +358,7 @@ _IO_wdefault_xsputn (f, data, n)
}
return n - more;
}
+INTDEF(_IO_wdefault_xsputn)
_IO_size_t
@@ -397,6 +405,7 @@ _IO_wdefault_xsgetn (fp, data, n)
}
return n - more;
}
+INTDEF(_IO_wdefault_xsgetn)
void
@@ -408,8 +417,10 @@ _IO_wdoallocbuf (fp)
if (!(fp->_flags & _IO_UNBUFFERED))
if ((wint_t)_IO_WDOALLOCATE (fp) != WEOF)
return;
- _IO_wsetb (fp, fp->_wide_data->_shortbuf, fp->_wide_data->_shortbuf + 1, 0);
+ INTUSE(_IO_wsetb) (fp, fp->_wide_data->_shortbuf,
+ fp->_wide_data->_shortbuf + 1, 0);
}
+INTDEF(_IO_wdoallocbuf)
_IO_FILE *
@@ -423,13 +434,13 @@ _IO_wdefault_setbuf (fp, p, len)
if (p == NULL || len == 0)
{
fp->_flags |= _IO_UNBUFFERED;
- _IO_wsetb (fp, fp->_wide_data->_shortbuf, fp->_wide_data->_shortbuf + 1,
- 0);
+ INTUSE(_IO_wsetb) (fp, fp->_wide_data->_shortbuf,
+ fp->_wide_data->_shortbuf + 1, 0);
}
else
{
fp->_flags &= ~_IO_UNBUFFERED;
- _IO_wsetb (fp, p, p + len, 0);
+ INTUSE(_IO_wsetb) (fp, p, p + len, 0);
}
fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr
= fp->_wide_data->_IO_write_end = 0;
@@ -437,6 +448,7 @@ _IO_wdefault_setbuf (fp, p, len)
= fp->_wide_data->_IO_read_end = 0;
return fp;
}
+INTDEF(_IO_wdefault_setbuf)
int
@@ -446,9 +458,10 @@ _IO_wdefault_doallocate (fp)
wchar_t *buf;
ALLOC_WBUF (buf, _IO_BUFSIZ, EOF);
- _IO_wsetb (fp, buf, buf + _IO_BUFSIZ, 1);
+ INTUSE(_IO_wsetb) (fp, buf, buf + _IO_BUFSIZ, 1);
return 1;
}
+INTDEF(_IO_wdefault_doallocate)
int
@@ -474,18 +487,20 @@ _IO_switch_to_wget_mode (fp)
fp->_flags &= ~_IO_CURRENTLY_PUTTING;
return 0;
}
+INTDEF(_IO_switch_to_wget_mode)
void
_IO_free_wbackup_area (fp)
_IO_FILE *fp;
{
if (_IO_in_backup (fp))
- _IO_switch_to_main_wget_area (fp); /* Just in case. */
+ INTUSE(_IO_switch_to_main_wget_area) (fp); /* Just in case. */
free (fp->_wide_data->_IO_save_base);
fp->_wide_data->_IO_save_base = NULL;
fp->_wide_data->_IO_save_end = NULL;
fp->_wide_data->_IO_backup_base = NULL;
}
+INTDEF(_IO_free_wbackup_area)
#if 0
int
@@ -517,7 +532,7 @@ save_for_wbackup (fp, end_p)
wchar_t *end_p;
{
/* Append [_IO_read_base..end_p] to backup area. */
- _IO_ssize_t least_mark = _IO_least_wmarker (fp, end_p);
+ _IO_ssize_t least_mark = INTUSE(_IO_least_wmarker) (fp, end_p);
/* needed_size is how much space we need in the backup area. */
_IO_size_t needed_size = ((end_p - fp->_wide_data->_IO_read_base)
- least_mark);
@@ -630,6 +645,7 @@ _IO_sputbackwc (fp, c)
return result;
}
+INTDEF(_IO_sputbackwc)
wint_t
_IO_sungetwc (fp)
@@ -672,7 +688,7 @@ _IO_init_wmarker (marker, fp)
{
marker->_sbuf = fp;
if (_IO_in_put_mode (fp))
- _IO_switch_to_wget_mode (fp);
+ INTUSE(_IO_switch_to_wget_mode) (fp);
if (_IO_in_backup (fp))
marker->_pos = fp->_wide_data->_IO_read_ptr - fp->_wide_data->_IO_read_end;
else
@@ -714,14 +730,14 @@ _IO_seekwmark (fp, mark, delta)
if (mark->_pos >= 0)
{
if (_IO_in_backup (fp))
- _IO_switch_to_main_wget_area (fp);
+ INTUSE(_IO_switch_to_main_wget_area) (fp);
fp->_wide_data->_IO_read_ptr = (fp->_wide_data->_IO_read_base
+ mark->_pos);
}
else
{
if (!_IO_in_backup (fp))
- _IO_switch_to_wbackup_area (fp);
+ INTUSE(_IO_switch_to_wbackup_area) (fp);
fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end + mark->_pos;
}
return 0;
@@ -752,5 +768,5 @@ _IO_unsave_wmarkers (fp)
}
if (_IO_have_backup (fp))
- _IO_free_wbackup_area (fp);
+ INTUSE(_IO_free_wbackup_area) (fp);
}