summaryrefslogtreecommitdiff
path: root/stdio-common/vfprintf.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-11-20 03:48:11 +0000
committerRoland McGrath <roland@gnu.org>1995-11-20 03:48:11 +0000
commit96aa2d94a2355cdc55c96e808d14a0e7f2ebe77d (patch)
treef7c87e6742af0707b858a1387ca85b679aa8d13e /stdio-common/vfprintf.c
parenta5a81fecc7194d050066265a15b1ba8bc3abc627 (diff)
Sat Nov 18 16:46:01 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* libio/Makefile, libio/cleanup.c, libio/clearerr.c, libio/feof.c, libio/ferror.c, libio/fgetc.c, libio/filedoalloc.c, libio/fileno.c, libio/fileops.c, libio/fputc.c, libio/freopen.c, libio/fseek.c, libio/genops.c, libio/getc.c, libio/getchar.c, libio/iofclose.c, libio/iofdopen.c, libio/iofflush.c, libio/iofgetpos.c, libio/iofgets.c, libio/iofopen.c, libio/iofprintf.c, libio/iofputs.c, libio/iofread.c, libio/iofscanf.c, libio/iofsetpos.c, libio/ioftell.c, libio/iofwrite.c, libio/iogetdelim.c, libio/iogetline.c, libio/iogets.c, libio/iolibio.h, libio/iopadn.c, libio/ioprims.c, libio/ioputs.c, libio/ioseekoff.c, libio/ioseekpos.c, libio/iosetbuffer.c, libio/iosetvbuf.c, libio/iosprintf.c, libio/ioungetc.c, libio/iovsprintf.c, libio/iovsscanf.c, libio/libio.h, libio/libioP.h, libio/putc.c, libio/putchar.c, libio/rewind.c, libio/setbuf.c, libio/setlinebuf.c, libio/stdfiles.c, libio/stdio.c, libio/stdio.h, libio/strfile.h, libio/strops.c, libio/vasprintf.c, libio/vscanf.c, libio/vsnprintf.c: New files. Slightly modified version from Linux libc. * libio/memstream.c, libio/vdprintf.c: New files for functions not (yet) part of GNU libio. * libio/iofopncook.c: Implementation of `fopencookie', mainly written by Per Bothner. * stdio-common/getline.c: Adapted to libio. * stdio-common/snprintf.c: Adapted to libio. * stdio-common/vfprintf.c: Adapted to libio. * stdio-common/vfscanf.c: Adapted to libio. * sysdeps/posix/tempname.c: Adapted to libio.
Diffstat (limited to 'stdio-common/vfprintf.c')
-rw-r--r--stdio-common/vfprintf.c51
1 files changed, 26 insertions, 25 deletions
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index e22403be22..9e855ded56 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -239,11 +239,11 @@ vfprintf (s, format, ap)
/* Fill in the types of all the arguments. */
for (cnt = 0; cnt < nspecs; ++cnt)
{
- /* If the width is determined by an argument this is an int. */
+ /* If the width is determined by an argument this is an int. */
if (specs[cnt].width_arg != -1)
args_type[specs[cnt].width_arg] = PA_INT;
- /* If the precision is determined by an argument this is an int. */
+ /* If the precision is determined by an argument this is an int. */
if (specs[cnt].prec_arg != -1)
args_type[specs[cnt].prec_arg] = PA_INT;
@@ -583,16 +583,16 @@ vfprintf (s, format, ap)
case 'n':
/* Answer the count of characters written. */
if (specs[cnt].info.is_longlong)
- *(long long int *)
+ *(long long int *)
args_value[specs[cnt].data_arg].pa_pointer = done;
else if (specs[cnt].info.is_long)
- *(long int *)
+ *(long int *)
args_value[specs[cnt].data_arg].pa_pointer = done;
else if (!specs[cnt].info.is_short)
- *(int *)
+ *(int *)
args_value[specs[cnt].data_arg].pa_pointer = done;
else
- *(short int *)
+ *(short int *)
args_value[specs[cnt].data_arg].pa_pointer = done;
break;
@@ -745,23 +745,24 @@ _IO_helper_overflow (s, c)
static const struct _IO_jump_t _IO_helper_jumps =
{
- _IO_helper_overflow,
- _IO_default_underflow,
- _IO_default_xsputn,
- _IO_default_xsgetn,
- _IO_default_read,
- _IO_default_write,
- _IO_default_doallocate,
- _IO_default_pbackfail,
- _IO_default_setbuf,
- _IO_default_sync,
- _IO_default_finish,
- _IO_default_close,
- _IO_default_stat,
- _IO_default_seek,
- _IO_default_seekoff,
- _IO_default_seekpos,
- _IO_default_uflow
+ JUMP_INIT_DUMMY,
+ JUMP_INIT (finish, _IO_default_finish),
+ JUMP_INIT (overflow, _IO_helper_overflow),
+ JUMP_INIT (underflow, _IO_default_underflow),
+ JUMP_INIT (uflow, _IO_default_uflow),
+ JUMP_INIT (pbackfail, _IO_default_pbackfail),
+ JUMP_INIT (xsputn, _IO_default_xsputn),
+ JUMP_INIT (xsgetn, _IO_default_xsgetn),
+ JUMP_INIT (seekoff, _IO_default_seekoff),
+ JUMP_INIT (seekpos, _IO_default_seekpos),
+ JUMP_INIT (setbuf, _IO_default_setbuf),
+ JUMP_INIT (sync, _IO_default_sync),
+ JUMP_INIT (doallocate, _IO_default_doallocate),
+ JUMP_INIT (read, _IO_default_read),
+ JUMP_INIT (write, _IO_default_write),
+ JUMP_INIT (seek, _IO_default_seek),
+ JUMP_INIT (close, _IO_default_close),
+ JUMP_INIT (stat, _IO_default_stat)
};
static int
@@ -781,8 +782,8 @@ buffered_vfprintf (s, format, args)
hp->_IO_write_ptr = buf;
hp->_IO_write_end = buf + sizeof buf;
hp->_IO_file_flags = _IO_MAGIC|_IO_NO_READS;
- hp->_jumps = (struct _IO_jump_t *) &_IO_helper_jumps;
-
+ _IO_JUMPS (hp) = (struct _IO_jump_t *) &_IO_helper_jumps;
+
/* Now print to helper instead. */
result = _IO_vfprintf (hp, format, args);