Christopher Faylor
85b6d63ba4
* libc/stdio/vfprintf.c: Add sys/lock.h include.
2004-01-17 04:29:54 +00:00
Jeff Johnston
4af71a917c
2004-01-16 Thomas Pfaff <tpfaff@gmx.net>
...
* libc/stdio/findfp.c (__sfp): Remove unnecessary memset.
* libc/stdio/vfprintf.c (__sbprintf): Ditto.
Add calls to __lock_init_recursive and __lock_close_recursive
instead.
2004-01-16 19:29:16 +00:00
Jeff Johnston
6a15098793
2004-01-15 Thomas Pfaff <tpfaff@gmx.net>
...
* libc/stdio/fclose.c: Include sys/lock.h.
(fclose): Destroy lock when file is closed.
* libc/stdio/findfp.c (__sfp): Initialize file pointers _lock
member.
* libc/stdio/freopen.c: Include sys/lock.h.
(_freopen_r): Destroy lock when file is closed.
* libc/stdio/vfprintf.c (__sbprintf): Initialize file pointers
_lock member.
2004-01-15 19:12:17 +00:00
Jeff Johnston
5d109bdeb0
2003-12-04 Artem B. Bityuckiy <abitytsky@softminecorp.com>
...
* libc/stdio/vfprintf.c (_VFPRINTF_R): Use _r versions
of mb routines for %lc and %ls support.
* libc/stdio/vfscanf.c (_svfscanf_r): Add %lc, %C,
%ls, and %S support. Remove CYGNUS_NEC markers and
code within.
2003-12-05 01:42:26 +00:00
Jeff Johnston
6db165c2a5
2003-11-24 Artem B. Bityuckiy <mail_lists@mail.ru>
...
* libc/stdio/vfprintf.c (_VFPRINTF_R): Fix check for 'C' format
specifier to use ch instead of *fmt.
2003-11-24 18:39:04 +00:00
Jeff Johnston
759a097e72
2003-11-21 Artem B. Bityuckiy <mail_lists@mail.ru>
...
* libc/stdio/vfprintf.c (_VFPRINTF_R, get_arg): Move mb-specific
code within checks for MB_CAPABLE. For non-mb-capable platforms,
use simple byte logic.
2003-11-22 01:07:24 +00:00
Jeff Johnston
64cfc6f213
2003-11-19 Nicholas Wourms <nwourms@netscape.net>
...
* configure.host: Enable positional arguments for printf
family for Cygwin.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Remove extraneous
pointer reference for quad_ptr_t.
2003-11-19 17:07:36 +00:00
Jeff Johnston
2985521f84
2003-11-07 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfprintf.c (_VFPRINTF_R): Fix typos that should be
referring to _NO_LONGLONG macro.
2003-11-07 16:01:17 +00:00
Jeff Johnston
d2ffac097d
2003-11-05 Jeff Johnston <jjohnstn@redhat.com>
...
Artem B. Bityuckiy <mail_lists@mail.ru>
* libc/stdio/vfprintf.c (_VFPRINTF_R): Add support for
%ls, %S, %lc, and %C format specifiers.
(get_arg): Ditto.
* libc/stdio/sprintf.c: Add documentation regarding new
format specifiers added in vfprintf.c.
2003-11-06 00:50:57 +00:00
Jeff Johnston
9fc9e1c916
2003-08-22 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/sys/reent.h: Add _GLOBAL_REENT macro.
* libc/stdio: Globally remove/replace all references to fp->_data.
Replace with _REENT or _GLOBAL_REENT where appropriate.
* libc/stdio/asprintf.c: Ditto.
* libc/stdio/fclose.c: Ditto.
* libc/stdio/fvwrite.c: Ditto.
* libc/stdio/makebuf.c: Ditto.
* libc/stdio/refill.c: Ditto.
* libc/stdio/local.h: Ditto.
* libc/stdio/setvbuf.c: Ditto.
* libc/stdio/sscanf.c: Ditto.
* libc/stdio/stdio.c: Ditto.
* libc/stdio/ungetc.c: Ditto.
* libc/stdio/vfscanf.c: Ditto.
* libc/stdio/vsscanf.c: Ditto.
* libc/stdio/fopen.c: Ditto. Also use _fseek_r in _fopen_r.
* libc/stdio/vasprintf.c: Ditto. Also call _vfprintf_r directly.
* libc/stdio/vsnprintf.c: Ditto.
* libc/stdio/vsprintf.c: Ditto.
* libc/stdio/fcloseall.c(fcloseall): Use _GLOBAL_REENT macro
instead of _REENT to walk file list.
* libc/stdio/fflush.c: Ditto.
* libc/stdio/fgetpos.c: Add reentrant version and have regular
version call reentrant version with _REENT argument.
* libc/stdio/fsetpos.c: Ditto.
* libc/stdio/fseek.c: Ditto.
* libc/stdio/fseeko.c: Ditto.
* libc/stdio/ftell.c: Ditto.
* libc/stdio/ftello.c: Ditto.
* libc/stdio/freopen.c: Ditto.
* libc/stdio/findfp.c: Use _GLOBAL_REENT pointer when adding
new files to chain. Also use _GLOBAL_REENT pointer for
cleaning up.
* libc/stdio/fiprintf.c: Reformatted to minimize duplicate code.
* libc/stdio/siprintf.c: Ditto.
* libc/stdio/iprintf.c: Ditto.
* libc/stdio/fprintf.c: Ditto.
* libc/stdio/printf.c: Ditto.
* libc/stdio/snprintf.c: Call _vfprintf_r directly.
* libc/stdio/sprintf.c: Ditto.
* libc/stdio/vprintf.c: Ditto. Also add _REENT_ONLY check.
* libc/stdio/rewind.c: Call _fseek_r directly.
* libc/stdio/tmpfile.c: Call _fopen_r and _remove_r directly.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Change _r routines to use
data pointer.
(get_arg): Add extra struct _reent pointer argument.
* libc/stdio64/fgetpos64.c: Add _r versions, remove any reference
to fp->_data.
* libc/stdio64/fopen64.c: Ditto.
* libc/stdio64/freopen64.c: Ditto.
* libc/stdio64/fsetpos64.c: Ditto.
* libc/stdio64/ftello64.c: Ditto.
* libc/stdio64/local64.h: Ditto.
* libc/stdio64/stdio64.c: Ditto.
* libc/stdio64/fseeko64.c: Ditto plus use _fstat_r instead of
_fstat64_r for the meantime.
2003-08-22 18:52:25 +00:00
Jeff Johnston
42de559299
2003-07-29 Honda Hiroki <hhonda@ipflex.com>
...
* libc/stdio/vfprintf.c: Set output size to 1 when
we have %f format with precision 0 and # flag not specified.
2003-07-29 20:45:11 +00:00
Jeff Johnston
be9c60e52e
2003-01-07 Charles Wilson <cwilson@ece.gatech.edu>
...
* libc/stdio/sprintf.c: fix typo
* libc/stdio/vfprintf.c: fix typo
2003-01-07 20:02:33 +00:00
Thomas Fitzsimmons
8d9112f2f3
* libc/include/langinfo.h: New file.
...
* libc/include/wchar.h: Likewise.
* libc/include/sys/syslimits.h: Likewise.
* libc/locale/fix_grouping.c: Likewise.
* libc/locale/ldpart.c: Likewise.
* libc/locale/ldpart.h: Likewise.
* libc/locale/lmessages.c: Likewise.
* libc/locale/lmessages.h: Likewise.
* libc/locale/lmonetary.c: Likewise.
* libc/locale/lmonetary.h: Likewise.
* libc/locale/lnumeric.c: Likewise.
* libc/locale/lnumeric.h: Likewise.
* libc/locale/nl_langinfo.3: Likewise.
* libc/locale/nl_langinfo.c: Likewise.
* libc/locale/timelocal.c: Likewise.
* libc/locale/timelocal.h: Likewise.
* libc/stdlib/btowc.c: Likewise.
* libc/stdlib/mbrlen.c: Likewise.
* libc/stdlib/mbrtowc.c: Likewise.
* libc/stdlib/mbsinit.c: Likewise.
* libc/stdlib/mbsrtowcs.c: Likewise.
* libc/stdlib/wcrtomb.c: Likewise.
* libc/stdlib/wcsrtombs.c: Likewise.
* libc/stdlib/wctob.c: Likewise.
* libc/sys/linux/prof-freq.c: Likewise.
* libc/sys/linux/profile.c: Likewise.
* libc/sys/linux/machine/i386/dl-procinfo.c: Likewise.
* libc/sys/linux/machine/i386/dl-procinfo.h: Likewise.
* libc/include/stdlib.h: Change re-entrant functions to take
mbstate_t pointers.
* libc/include/sys/_types.h: Define _mbstate_t.
* libc/include/sys/config.h (MB_LEN_MAX): New macro.
* libc/include/sys/errno.h (EILSEQ): New error code.
* libc/include/sys/reent.h: Include wchar.h. Change reentrant
structure to use mbstate_t.
* libc/locale/Makefile.am (LIB_SOURCES): Add new files.
* libc/machine/powerpc/vfprintf.c: Use mbstate_t.
* libc/machine/powerpc/vfscanf.c: Likewise.
* libc/stdio/getdelim.c: Reallocate buffer only when necessary.
* libc/stdio/vfprintf.c: Likewise.
* libc/stdio/vfscanf.c: Likewise.
* libc/stdlib/Makefile.am (LIB_SOURCES): Add new files.
* libc/stdlib/mblen.c: Use mbstate_t.
* libc/stdlib/mblen_r.c: Likewise.
* libc/stdlib/mbstowcs.c: Likewise.
* libc/stdlib/mbstowcs_r.c: Likewise.
* libc/stdlib/mbtowc.c: Likewise.
* libc/stdlib/mbtowc_r.c: Likewise.
* libc/stdlib/wcstombs.c: Likewise.
* libc/stdlib/wcstombs_r.c: Likewise.
* libc/stdlib/wctomb_r.c: Likewise.
* libc/sys/linux/Makefile.am (LIB_SOURCES): Add prof-freq.c and
profile.c.
* libc/sys/linux/machine/i386/Makefile.am (LIB_SOURCES): Add
dl-procinfo.c.
* libc/sys/linux/sys/errno.h (EILSEQ): New error code.
* libc/sys/linux/sys/types.h (off_t): Define type.
* testsuite/newlib.locale/UTF-8.c: Change locale name from UTF-8
to C-UTF-8.
* testsuite/newlib.locale/UTF-8.exp: Likewise.
2002-08-23 01:56:05 +00:00
Jeff Johnston
037240a242
2002-08-09 Jeff Johnston <jjohnstn@redhat.com>
...
* configure.host: Add check for --enable-newlib-io-pos-args
and define WANT_IO_POS_ARGS flag if enabled. Define
the flag by default for x86-linux configurations.
* configure.in: Add support for --enable-newlib-io-pos-args.
* libc/configure.in: Ditto.
* configure: Regenerated.
* libc/configure: Ditto.
* libc/stdio/Makefile.am: Specify -fshort-enums for compiling
vfprintf.c and vfiprintf.c.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/vfprintf.c: Add positional argument support that
is enabled by compiling with -DWANT_IO_POS_ARGS.
2002-08-09 21:12:09 +00:00
Jeff Johnston
7501704dc9
2002-07-04 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/Makefile.am: Add asprintf.c and vasprintf.c.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/asprintf.c: New file.
* libc/stdio/vasprintf.c: Ditto.
* libc/stdio/fvwrite.c: Add code to dynamically reallocate
the buffer for asprintf support.
* libc/stdio/sprintf.c: Add asprintf documentation.
* libc/stdio/vfprintf.c: Add vasprintf documentation.
* libc/include/stdio.h: Add new prototypes.
2002-07-04 18:56:17 +00:00
Thomas Fitzsimmons
e71372faea
* libc/include/sys/stdio.h: New file.
...
* libc/sys/linux/sys/stdio.h: New file.
* libc/include/stdio.h: Add declarations for flockfile,
ftrylockfile, and funlockfile. Include <sys/stdio.h>.
* libc/stdio/clearerr.c: Add file locking.
* libc/stdio/fclose.c: Likewise.
* libc/stdio/feof.c: Likewise.
* libc/stdio/ferror.c: Likewise.
* libc/stdio/fflush.c: Likewise.
* libc/stdio/fgetc.c: Likewise.
* libc/stdio/fgetpos.c: Likewise.
* libc/stdio/fgets.c: Likewise.
* libc/stdio/fileno.c: Likewise.
* libc/stdio/fputc.c: Likewise.
* libc/stdio/fputs.c: Likewise.
* libc/stdio/fread.c: Likewise.
* libc/stdio/freopen.c: Likewise.
* libc/stdio/fseek.c: Likewise.
* libc/stdio/ftell.c: Likewise.
* libc/stdio/fwrite.c: Likewise.
* libc/stdio/getc.c: Likewise.
* libc/stdio/putc.c: Likewise.
* libc/stdio/setvbuf.c: Likewise.
* libc/stdio/ungetc.c: Likewise.
* libc/stdio/vfprintf.c: Likewise.
2002-05-08 00:12:49 +00:00
Jeff Johnston
afecf2faee
2002-02-27 Jeff Johnston <jjohnstn@redhat.com>
...
* configure.host: Add check for --disable-newlib-io-float
configuration option and add -DNO_FLOATING_POINT to newlib cflags
if appropriate.
* acinclude.m4: Added --disable-newlib-io-float option.
* aclocal.m4: Regenerated.
* configure: Ditto.
* doc/aclocal.m4 doc/configure libc/aclocal.m4 libc/configure
* libc/*/aclocal.m4 libc/*/configure
* libm/*/aclocal.m4 libm/*/configure: Ditto.
* libc/stdio/vfprintf.c [!INTEGER_ONLY]: Only set FLOATING_POINT
if NO_FLOATING_POINT flag is not defined.
2002-02-27 23:56:24 +00:00
Nick Clifton
188bc140c0
Handle printf ("%#.0o",0);
2001-05-28 18:22:44 +00:00
Alexandre Oliva
6f637037e5
* libc/stdio/vfprintf.c (QUADINT) [_NO_LONGLONG]: Make it
...
equivalent to LONGINT.
2001-03-13 09:42:52 +00:00
Jeff Johnston
e9cd87b82a
2001-01-23 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio/vfprintf.c (_VFPRINTF_R): Modification to fix
that suppressed . for %.0f, 0.1. Check now looks if there
are padding zeroes (expt) in addition to any digits (ndig) to
print.
2001-01-23 19:49:09 +00:00
Jeff Johnston
b6182a09dd
2000-12-13 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdlib/ldtoa.c (_ldcheck): New routine
that categorizes a long double as NaN, Infinity, or other.
* libc/stdio/vfprintf.c [WANT_IO_LONG_DBL](_VFPRINTF_R): Removed
isinfl and isnanl static routines which were i386-specific. Changed
calls to the two removed routines to a single _ldcheck call.
* libc/stdio/vfieeefp.h (ldieee): Fixed missing semi-colons.
2000-12-14 00:25:06 +00:00
Jeff Johnston
b294082c46
2000-12-07 Jay Kulpinski <jskulpin@eng01.gdds.com>
...
* libc/stdio/vfprintf.c: Minor modification to avoid requiring
a floating point register unless really printing a floating
point number.
2000-12-08 00:27:39 +00:00
Jeff Johnston
6bdac416e9
2000-12-06 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdlib/Makefile.am: Added ldtoa.c to list of sources.
* libc/stdlib/Makefile.in: Regenerated.
* libc/stdio/floatio.h: Added suitable MAXEXP for long double.
* libc/stdio/vfieeefp.h: Added long double bit structures.
* libc/stdio/vfprintf.c[WANT_IO_LONG_DBL]: Added long double support.
[WANT_IO_LONG_DBL](isinfl, isnanl): New static long double routines.
(exponent): Changed expbuf to reasonable maximum instead of MAXEXP.
* libc/stdio/vfscanf.c[WANT_IO_LONG_DBL]: Added long double support.
* libc/stdlib/ldtoa.c: New file containing _ldtoa_r and
_strtold routines used for conversions between character
and long double.
2000-12-06 23:50:11 +00:00
Jeff Johnston
5bacbf109f
2000-08-16 Eric Fifer <efifer@sanwaint.com>
...
* libc/stdio/vfprintf.c (_vfprintf_r): suppress . with "%.0f", 0.1
2000-08-16 18:30:40 +00:00
DJ Delorie
91a8d90bab
* libc/stdio/vfprintf.c: pad 0.0 correctly with %e
2000-07-13 18:51:11 +00:00
Jeff Johnston
c87be3e4d6
Mon Apr 17 12:46:00 2000 Marek Michalkiewicz <marekm@linux.org.pl>
...
* libc/signal/signal.c (_signal_r) : Removed unused local variable temp. * libc/stdio/findfp.c (std): Added declaration of flags and file.
* libc/stdio/mktemp.c (_gettemp, _mkstemp_r, mkstemp): Added int
return type.
* libc/stdio/putchar.c (putchar): Added return statement.
* libc/stdio/refill.c (lflush): Added correct parentheses.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Ditto.
* libc/stdio/vfscanf.c (__svfscanf): Changed sprintf call which
prints long value to use l qualifier.
* libc/stdlib/dtoa.c (_dtoa_r): Added parentheses to remove warning
messages and initialized local values: ilim, ilim1, and spec_case.
* libc/stdlib/ecvtbuf.c (print_e): Removed unused variable dp.
* libc/stdlib/mbctype.h (_issjis1, _issjis2): Added parentheses.
* libc/stdlib/mprec.c: Ditto.
* libc/stdlib/setenv_r.c: Ditto.
* libc/stdlib/strtod.c: Ditto.
* libc/stdlib/strtol.c: Ditto.
* libc/stdlib/strtoul.c: Ditto.
* libm/common/sf_expm1.c: Added curly braces to if else clauses.
* libm/common/sf_log1p.c: Ditto.
* libm/common/sf_scalbn.c: Ditto.
* libm/math/ef_log.c: Ditto.
2000-04-17 17:10:18 +00:00
Jeff Johnston
b0ba0ac217
Mon Feb 21 11:43:50 2000 Jeff Johnston <jjohnstn@cygnus.com>
...
* libc/stdio/vfprintf.c (VFPRINTF): Added CHECK_INIT
call prior to calling _VFPRINTF_R so reentrant data area is set.
(_VFPRINTF_R): Removed now extraneous CHECK_INIT call.
2000-02-21 16:59:23 +00:00
Christopher Faylor
8a0efa53e4
import newlib-2000-02-17 snapshot
2000-02-17 19:39:52 +00:00