1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

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.
This commit is contained in:
Roland McGrath
1995-11-20 03:48:11 +00:00
parent a5a81fecc7
commit 96aa2d94a2
74 changed files with 5782 additions and 111 deletions

View File

@@ -269,7 +269,7 @@ __printf_fp (fp, info, args)
{
fracsize = __mpn_extract_long_double (fp_input,
(sizeof (fp_input) /
sizeof (fp_input[0])),
sizeof (fp_input[0])),
&exponent, &is_neg,
fpnum.ldbl);
to_shift = 1 + fracsize * BITS_PER_MP_LIMB - LDBL_MANT_DIG;
@@ -496,7 +496,7 @@ __printf_fp (fp, info, args)
/* Now shift the input value to its right place. */
cy = __mpn_lshift (frac, fp_input, fracsize, to_shift);
frac[fracsize++] = cy;
frac[fracsize++] = cy;
assert (cy == 1 || (frac[fracsize - 2] == 0 && frac[0] == 0));
expsign = 1;
@@ -524,7 +524,7 @@ __printf_fp (fp, info, args)
if (cy == 0)
--tmpsize;
count_leading_zeros (cnt_h, tmp[tmpsize - 1]);
count_leading_zeros (cnt_h, tmp[tmpsize - 1]);
incr = (tmpsize - fracsize) * BITS_PER_MP_LIMB
+ BITS_PER_MP_LIMB - 1 - cnt_h;
@@ -559,7 +559,7 @@ __printf_fp (fp, info, args)
&& tmp[tmpsize - 2] < topval[0]))))
{
/* The factor is right. Adapt binary and decimal
exponents. */
exponents. */
exponent -= incr;
exp10 |= 1 << explog;
@@ -639,7 +639,7 @@ __printf_fp (fp, info, args)
/* Now shift the input value to its right place. */
cy = __mpn_lshift (frac, fp_input, fracsize, (exponent + to_shift));
frac[fracsize++] = cy;
frac[fracsize++] = cy;
exponent = 0;
}
@@ -714,7 +714,7 @@ __printf_fp (fp, info, args)
it is possible that we need two more characters in front of all the
other output. */
buffer = alloca (2 + chars_needed);
cp = startp = buffer + 2; /* Let room for rounding. */
cp = startp = buffer + 2; /* Let room for rounding. */
/* Do the real work: put digits in allocated buffer. */
if (expsign == 0 || type != 'f')
@@ -886,7 +886,7 @@ __printf_fp (fp, info, args)
}
/* Compute number of characters which must be filled with the padding
character. */
character. */
if (is_neg || info->showsign || info->space)
--width;
width -= cp - startp;