diff options
author | cvs2svn <> | 2008-09-05 00:26:21 +0400 |
---|---|---|
committer | cvs2svn <> | 2008-09-05 00:26:21 +0400 |
commit | 07b4b67a88f386ce4716a14e0ff2c2bce992b985 (patch) | |
tree | 2d367e3f5c271ef2cdf093f175039cd701237bc7 /newlib/libc/stdio | |
parent | cfef0dc52cc4eab69ddeab566fa31790a2328b6a (diff) |
This commit was manufactured by cvs2svn to create tag 'newlib-1_16_0'.newlib-1_16_0
Sprout from binutils-arc-20080908-branch 2008-09-04 20:26:19 UTC cvs2svn 'This commit was manufactured by cvs2svn to create branch 'binutils-'
Cherrypick from master 2007-12-19 22:36:48 UTC Jeff Johnston <jjohnstn@redhat.com> '':
ChangeLog
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
config.guess
config.rpath
config.sub
config/ChangeLog
config/acinclude.m4
config/acx.m4
config/confsubdir.m4
config/mh-i370pic
config/mh-ia64pic
config/mh-mingw
config/mh-ppc-darwin
config/mh-s390pic
config/mh-sparcpic
config/mt-mips-elfoabi
config/mt-spu
config/tls.m4
configure
configure.ac
libgloss/ChangeLog
libgloss/arm/configure
libgloss/arm/crt0.S
libgloss/arm/redboot-syscalls.c
libgloss/bfin/Makefile.in
libgloss/bfin/configure
libgloss/bfin/syscalls.c
libgloss/configure
libgloss/cris/configure
libgloss/cris/gensyscalls
libgloss/crx/configure
libgloss/d30v/configure
libgloss/doc/configure
libgloss/fr30/configure
libgloss/fr30/syscalls.c
libgloss/frv/configure
libgloss/frv/crt0.S
libgloss/frv/isatty.c
libgloss/hp74x/configure
libgloss/i386/configure
libgloss/i960/configure
libgloss/iq2000/configure
libgloss/iq2000/crt0.S
libgloss/iq2000/isatty.c
libgloss/libnosys/configure
libgloss/libnosys/configure.in
libgloss/libnosys/isatty.c
libgloss/m32c/configure
libgloss/m32c/exit.S
libgloss/m32r/configure
libgloss/m32r/isatty.c
libgloss/m68hc11/configure
libgloss/m68k/cf-crt1.c
libgloss/m68k/configure
libgloss/mcore/configure
libgloss/mep/configure
libgloss/mips/configure
libgloss/mn10200/configure
libgloss/mn10200/isatty.c
libgloss/mn10300/configure
libgloss/mn10300/crt0.S
libgloss/mn10300/isatty.c
libgloss/mt/configure
libgloss/pa/configure
libgloss/rs6000/configure
libgloss/sparc/configure
libgloss/sparc/libsys/configure
libgloss/spu/Makefile.in
libgloss/spu/configure
libgloss/spu/readlink.c
libgloss/spu/sbrk.c
libgloss/spu/syscalls.c
libgloss/wince/configure
libgloss/xstormy16/configure
libtool.m4
ltsugar.m4
newlib/ChangeLog
newlib/Makefile.am
newlib/Makefile.in
newlib/configure.host
newlib/libc/argz/argz_count.c
newlib/libc/argz/argz_extract.c
newlib/libc/argz/argz_stringify.c
newlib/libc/ctype/ctype_.c
newlib/libc/ctype/isalnum.c
newlib/libc/ctype/isalpha.c
newlib/libc/ctype/iscntrl.c
newlib/libc/ctype/isdigit.c
newlib/libc/ctype/islower.c
newlib/libc/ctype/isprint.c
newlib/libc/ctype/ispunct.c
newlib/libc/ctype/isspace.c
newlib/libc/ctype/isupper.c
newlib/libc/ctype/isxdigit.c
newlib/libc/include/_ansi.h
newlib/libc/include/_syslist.h
newlib/libc/include/assert.h
newlib/libc/include/ctype.h
newlib/libc/include/getopt.h
newlib/libc/include/machine/_default_types.h
newlib/libc/include/machine/ieeefp.h
newlib/libc/include/machine/setjmp.h
newlib/libc/include/math.h
newlib/libc/include/reent.h
newlib/libc/include/stdint.h
newlib/libc/include/stdio.h
newlib/libc/include/string.h
newlib/libc/include/sys/_default_fcntl.h
newlib/libc/include/sys/reent.h
newlib/libc/include/sys/stat.h
newlib/libc/include/sys/unistd.h
newlib/libc/libc.texinfo
newlib/libc/machine/arm/setjmp.S
newlib/libc/machine/configure
newlib/libc/machine/i386/memchr.S
newlib/libc/machine/i386/memset.S
newlib/libc/machine/i386/strchr.S
newlib/libc/machine/i386/strlen.S
newlib/libc/machine/m68k/memcpy.S
newlib/libc/machine/m68k/memset.S
newlib/libc/machine/m68k/setjmp.S
newlib/libc/machine/mips/strncpy.c
newlib/libc/machine/mn10300/memset.S
newlib/libc/machine/powerpc/vfprintf.c
newlib/libc/machine/spu/Makefile.am
newlib/libc/machine/spu/Makefile.in
newlib/libc/machine/spu/fprintf.S
newlib/libc/machine/spu/fscanf.S
newlib/libc/machine/spu/mk_syscalls
newlib/libc/machine/spu/printf.S
newlib/libc/machine/spu/scanf.S
newlib/libc/machine/spu/setjmp.S
newlib/libc/machine/spu/snprintf.S
newlib/libc/machine/spu/sprintf.S
newlib/libc/machine/spu/sscanf.S
newlib/libc/machine/spu/stack_reg_va.S
newlib/libc/machine/spu/strcat.c
newlib/libc/machine/spu/strcpy.c
newlib/libc/machine/spu/strlen.c
newlib/libc/machine/spu/strncat.c
newlib/libc/machine/spu/strncmp.c
newlib/libc/machine/spu/strncpy.c
newlib/libc/machine/spu/sys/dirent.h
newlib/libc/machine/spu/sys/errno.h
newlib/libc/machine/spu/sys/sched.h
newlib/libc/machine/spu/sys/syscall.h
newlib/libc/posix/Makefile.am
newlib/libc/posix/Makefile.in
newlib/libc/posix/isatty.c
newlib/libc/reent/Makefile.am
newlib/libc/reent/Makefile.in
newlib/libc/search/hash.h
newlib/libc/stdio/Makefile.am
newlib/libc/stdio/Makefile.in
newlib/libc/stdio/asiprintf.c
newlib/libc/stdio/asniprintf.c
newlib/libc/stdio/asnprintf.c
newlib/libc/stdio/asprintf.c
newlib/libc/stdio/dprintf.c
newlib/libc/stdio/fflush.c
newlib/libc/stdio/freopen.c
newlib/libc/stdio/ftell.c
newlib/libc/stdio/local.h
newlib/libc/stdio/makebuf.c
newlib/libc/stdio/rget.c
newlib/libc/stdio/siprintf.c
newlib/libc/stdio/siscanf.c
newlib/libc/stdio/sniprintf.c
newlib/libc/stdio/snprintf.c
newlib/libc/stdio/sprintf.c
newlib/libc/stdio/sscanf.c
newlib/libc/stdio/vasiprintf.c
newlib/libc/stdio/vasniprintf.c
newlib/libc/stdio/vasnprintf.c
newlib/libc/stdio/vasprintf.c
newlib/libc/stdio/vdiprintf.c
newlib/libc/stdio/vdprintf.c
newlib/libc/stdio/vfprintf.c
newlib/libc/stdio/vfscanf.c
newlib/libc/stdio/vsiprintf.c
newlib/libc/stdio/vsiscanf.c
newlib/libc/stdio/vsniprintf.c
newlib/libc/stdio/vsnprintf.c
newlib/libc/stdio/vsprintf.c
newlib/libc/stdio/vsscanf.c
newlib/libc/stdio64/ftello64.c
newlib/libc/stdlib/envlock.h
newlib/libc/stdlib/gdtoa-hexnan.c
newlib/libc/stdlib/getopt.c
newlib/libc/stdlib/mprec.h
newlib/libc/stdlib/strtod.c
newlib/libc/stdlib/wcsrtombs.c
newlib/libc/string/Makefile.am
newlib/libc/string/Makefile.in
newlib/libc/string/memchr.c
newlib/libc/string/memset.c
newlib/libc/string/strcasestr.c
newlib/libc/string/strchr.c
newlib/libc/string/strings.tex
newlib/libc/string/strlen.c
newlib/libc/string/strstr.c
newlib/libc/sys/a29khif/_isatty.S
newlib/libc/sys/arc/isatty.c
newlib/libc/sys/arm/syscalls.c
newlib/libc/sys/configure
newlib/libc/sys/d10v/syscalls.c
newlib/libc/sys/h8300hms/syscalls.c
newlib/libc/sys/h8500hms/syscalls.c
newlib/libc/sys/linux/Makefile.am
newlib/libc/sys/linux/Makefile.in
newlib/libc/sys/linux/bits/libc-lock.h
newlib/libc/sys/linux/iconv/iconvconfig.c
newlib/libc/sys/linux/iconv/strtab.c
newlib/libc/sys/linux/include/arpa/nameser.h
newlib/libc/sys/linux/include/hesiod.h
newlib/libc/sys/linux/include/libc_private.h
newlib/libc/sys/linux/include/net/ethernet.h
newlib/libc/sys/linux/include/net/if_atm.h
newlib/libc/sys/linux/include/net/if_media.h
newlib/libc/sys/linux/include/net/if_ppp.h
newlib/libc/sys/linux/include/net/if_pppvar.h
newlib/libc/sys/linux/include/netdb.h
newlib/libc/sys/linux/include/netinet/if_atm.h
newlib/libc/sys/linux/include/netinet/if_ether.h
newlib/libc/sys/linux/include/netinet/ip_flow.h
newlib/libc/sys/linux/include/nsswitch.h
newlib/libc/sys/linux/include/resolv.h
newlib/libc/sys/linux/include/sched.h
newlib/libc/sys/linux/include/stdint.h
newlib/libc/sys/linux/intl/locale.alias
newlib/libc/sys/linux/libc-symbols.h
newlib/libc/sys/linux/machine/i386/get_clockfreq.c
newlib/libc/sys/linux/machine/i386/include/endian.h
newlib/libc/sys/linux/machine/i386/include/param.h
newlib/libc/sys/linux/net/Makefile.am
newlib/libc/sys/linux/net/Makefile.in
newlib/libc/sys/linux/net/addr2ascii.3
newlib/libc/sys/linux/net/base64.c
newlib/libc/sys/linux/net/bindresvport.c
newlib/libc/sys/linux/net/byteorder.3
newlib/libc/sys/linux/net/ether_addr.c
newlib/libc/sys/linux/net/ethers.3
newlib/libc/sys/linux/net/getaddrinfo.3
newlib/libc/sys/linux/net/getaddrinfo.c
newlib/libc/sys/linux/net/gethostbydns.c
newlib/libc/sys/linux/net/gethostbyht.c
newlib/libc/sys/linux/net/gethostbyname.3
newlib/libc/sys/linux/net/gethostbynis.c
newlib/libc/sys/linux/net/gethostnamadr.c
newlib/libc/sys/linux/net/getifaddrs.3
newlib/libc/sys/linux/net/getifaddrs.c
newlib/libc/sys/linux/net/getipnodebyname.3
newlib/libc/sys/linux/net/getnameinfo.3
newlib/libc/sys/linux/net/getnameinfo.c
newlib/libc/sys/linux/net/getnetbydns.c
newlib/libc/sys/linux/net/getnetbyht.c
newlib/libc/sys/linux/net/getnetbynis.c
newlib/libc/sys/linux/net/getnetent.3
newlib/libc/sys/linux/net/getnetnamadr.c
newlib/libc/sys/linux/net/getproto.c
newlib/libc/sys/linux/net/getprotoent.3
newlib/libc/sys/linux/net/getprotoent.c
newlib/libc/sys/linux/net/getprotoname.c
newlib/libc/sys/linux/net/getservbyname.c
newlib/libc/sys/linux/net/getservbyport.c
newlib/libc/sys/linux/net/getservent.3
newlib/libc/sys/linux/net/getservent.c
newlib/libc/sys/linux/net/herror.c
newlib/libc/sys/linux/net/hesiod.3
newlib/libc/sys/linux/net/hesiod.c
newlib/libc/sys/linux/net/if_indextoname.3
newlib/libc/sys/linux/net/inet.3
newlib/libc/sys/linux/net/inet6_option_space.3
newlib/libc/sys/linux/net/inet6_rthdr_space.3
newlib/libc/sys/linux/net/inet_lnaof.c
newlib/libc/sys/linux/net/inet_makeaddr.c
newlib/libc/sys/linux/net/inet_net.3
newlib/libc/sys/linux/net/inet_netof.c
newlib/libc/sys/linux/net/inet_network.c
newlib/libc/sys/linux/net/inet_ntoa.c
newlib/libc/sys/linux/net/innetgr-stub.c
newlib/libc/sys/linux/net/ip6opt.c
newlib/libc/sys/linux/net/iso_addr.3
newlib/libc/sys/linux/net/iso_addr.c
newlib/libc/sys/linux/net/linkaddr.3
newlib/libc/sys/linux/net/linkaddr.c
newlib/libc/sys/linux/net/map_v4v6.c
newlib/libc/sys/linux/net/name6.c
newlib/libc/sys/linux/net/namespace.h
newlib/libc/sys/linux/net/ns.3
newlib/libc/sys/linux/net/ns_addr.c
newlib/libc/sys/linux/net/ns_name.c
newlib/libc/sys/linux/net/ns_netint.c
newlib/libc/sys/linux/net/ns_ntoa.c
newlib/libc/sys/linux/net/ns_parse.c
newlib/libc/sys/linux/net/ns_print.c
newlib/libc/sys/linux/net/ns_ttl.c
newlib/libc/sys/linux/net/nsap_addr.c
newlib/libc/sys/linux/net/nsdispatch.3
newlib/libc/sys/linux/net/nsdispatch.c
newlib/libc/sys/linux/net/nslexer.c
newlib/libc/sys/linux/net/nslexer.l
newlib/libc/sys/linux/net/nsparser.c
newlib/libc/sys/linux/net/nsparser.h
newlib/libc/sys/linux/net/nsparser.y
newlib/libc/sys/linux/net/rcmd.3
newlib/libc/sys/linux/net/rcmd.c
newlib/libc/sys/linux/net/rcmdsh.3
newlib/libc/sys/linux/net/res_comp.c
newlib/libc/sys/linux/net/res_config.h
newlib/libc/sys/linux/net/res_data.c
newlib/libc/sys/linux/net/res_debug.c
newlib/libc/sys/linux/net/res_init.c
newlib/libc/sys/linux/net/res_mkquery.c
newlib/libc/sys/linux/net/res_mkupdate.c
newlib/libc/sys/linux/net/res_query.c
newlib/libc/sys/linux/net/res_send.c
newlib/libc/sys/linux/net/res_update.c
newlib/libc/sys/linux/net/resolver.3
newlib/libc/sys/linux/net/rthdr.c
newlib/libc/sys/linux/net/send.c
newlib/libc/sys/linux/net/vars.c
newlib/libc/sys/linux/stdlib/COPYRIGHT
newlib/libc/sys/linux/stdlib/Makefile.am
newlib/libc/sys/linux/stdlib/Makefile.in
newlib/libc/sys/linux/stdlib/cclass.h
newlib/libc/sys/linux/stdlib/cname.h
newlib/libc/sys/linux/stdlib/collate.c
newlib/libc/sys/linux/stdlib/collate.h
newlib/libc/sys/linux/stdlib/collcmp.c
newlib/libc/sys/linux/stdlib/engine.c
newlib/libc/sys/linux/stdlib/fnmatch.3
newlib/libc/sys/linux/stdlib/fnmatch.c
newlib/libc/sys/linux/stdlib/glob.3
newlib/libc/sys/linux/stdlib/glob.c
newlib/libc/sys/linux/stdlib/reallocf.c
newlib/libc/sys/linux/stdlib/regcomp.c
newlib/libc/sys/linux/stdlib/regerror.c
newlib/libc/sys/linux/stdlib/regex.3
newlib/libc/sys/linux/stdlib/regex2.h
newlib/libc/sys/linux/stdlib/regexec.c
newlib/libc/sys/linux/stdlib/regfree.c
newlib/libc/sys/linux/stdlib/utils.h
newlib/libc/sys/linux/stdlib/wordexp.c
newlib/libc/sys/linux/stdlib/wordfree.c
newlib/libc/sys/linux/sys/ioctl.h
newlib/libc/sys/linux/sys/socket.h
newlib/libc/sys/linux/sys/types.h
newlib/libc/sys/linux/sys/unistd.h
newlib/libc/sys/mmixware/isatty.c
newlib/libc/sys/sh/syscalls.c
newlib/libc/sys/sysnecv850/crt0.S
newlib/libc/sys/sysnecv850/isatty.c
newlib/libc/syscalls/Makefile.am
newlib/libc/syscalls/Makefile.in
newlib/libc/syscalls/sysclose.c
newlib/libc/syscalls/sysexecve.c
newlib/libc/syscalls/sysfcntl.c
newlib/libc/syscalls/sysfork.c
newlib/libc/syscalls/sysfstat.c
newlib/libc/syscalls/sysgetpid.c
newlib/libc/syscalls/sysgettod.c
newlib/libc/syscalls/syskill.c
newlib/libc/syscalls/syslink.c
newlib/libc/syscalls/syslseek.c
newlib/libc/syscalls/sysopen.c
newlib/libc/syscalls/sysread.c
newlib/libc/syscalls/syssbrk.c
newlib/libc/syscalls/sysstat.c
newlib/libc/syscalls/systimes.c
newlib/libc/syscalls/sysunlink.c
newlib/libc/syscalls/syswait.c
newlib/libc/syscalls/syswrite.c
newlib/libc/time/mktime.c
newlib/libm/libm.texinfo
newlib/libm/machine/spu/configure
newlib/libm/machine/spu/headers/acosd2.h
newlib/libm/machine/spu/headers/acosf4.h
newlib/libm/machine/spu/headers/acoshd2.h
newlib/libm/machine/spu/headers/acoshf4.h
newlib/libm/machine/spu/headers/asind2.h
newlib/libm/machine/spu/headers/asinf4.h
newlib/libm/machine/spu/headers/asinhd2.h
newlib/libm/machine/spu/headers/asinhf4.h
newlib/libm/machine/spu/headers/atan2d2.h
newlib/libm/machine/spu/headers/atan2f4.h
newlib/libm/machine/spu/headers/atand2.h
newlib/libm/machine/spu/headers/atanf4.h
newlib/libm/machine/spu/headers/atanhd2.h
newlib/libm/machine/spu/headers/atanhf4.h
newlib/libm/machine/spu/headers/cbrt.h
newlib/libm/machine/spu/headers/cbrtf.h
newlib/libm/machine/spu/headers/cos_sin.h
newlib/libm/machine/spu/headers/cosd2.h
newlib/libm/machine/spu/headers/cosf4.h
newlib/libm/machine/spu/headers/coshd2.h
newlib/libm/machine/spu/headers/coshf4.h
newlib/libm/machine/spu/headers/divd2.h
newlib/libm/machine/spu/headers/divf4.h
newlib/libm/machine/spu/headers/erf_utils.h
newlib/libm/machine/spu/headers/erfcd2.h
newlib/libm/machine/spu/headers/erfcf4.h
newlib/libm/machine/spu/headers/erfd2.h
newlib/libm/machine/spu/headers/erff4.h
newlib/libm/machine/spu/headers/exp2d2.h
newlib/libm/machine/spu/headers/exp2f4.h
newlib/libm/machine/spu/headers/expd2.h
newlib/libm/machine/spu/headers/expf4.h
newlib/libm/machine/spu/headers/expm1d2.h
newlib/libm/machine/spu/headers/expm1f4.h
newlib/libm/machine/spu/headers/floord2.h
newlib/libm/machine/spu/headers/floorf4.h
newlib/libm/machine/spu/headers/hypotd2.h
newlib/libm/machine/spu/headers/hypotf4.h
newlib/libm/machine/spu/headers/isnand2.h
newlib/libm/machine/spu/headers/isnanf4.h
newlib/libm/machine/spu/headers/ldexpd2.h
newlib/libm/machine/spu/headers/ldexpf4.h
newlib/libm/machine/spu/headers/lgammad2.h
newlib/libm/machine/spu/headers/lgammaf4.h
newlib/libm/machine/spu/headers/log10d2.h
newlib/libm/machine/spu/headers/log1pd2.h
newlib/libm/machine/spu/headers/log1pf4.h
newlib/libm/machine/spu/headers/log2d2.h
newlib/libm/machine/spu/headers/log2f4.h
newlib/libm/machine/spu/headers/logbf4.h
newlib/libm/machine/spu/headers/logd2.h
newlib/libm/machine/spu/headers/logf4.h
newlib/libm/machine/spu/headers/nearbyintf4.h
newlib/libm/machine/spu/headers/nextafterd2.h
newlib/libm/machine/spu/headers/nextafterf4.h
newlib/libm/machine/spu/headers/powd2.h
newlib/libm/machine/spu/headers/powf4.h
newlib/libm/machine/spu/headers/recipd2.h
newlib/libm/machine/spu/headers/recipf4.h
newlib/libm/machine/spu/headers/rintf4.h
newlib/libm/machine/spu/headers/scalbnf4.h
newlib/libm/machine/spu/headers/signbitd2.h
newlib/libm/machine/spu/headers/simdmath.h
newlib/libm/machine/spu/headers/sincosd2.h
newlib/libm/machine/spu/headers/sincosf4.h
newlib/libm/machine/spu/headers/sind2.h
newlib/libm/machine/spu/headers/sinf4.h
newlib/libm/machine/spu/headers/sinhd2.h
newlib/libm/machine/spu/headers/sinhf4.h
newlib/libm/machine/spu/headers/sqrtd2.h
newlib/libm/machine/spu/headers/sqrtf4.h
newlib/libm/machine/spu/headers/tand2.h
newlib/libm/machine/spu/headers/tanf4.h
newlib/libm/machine/spu/headers/tanhd2.h
newlib/libm/machine/spu/headers/tanhf4.h
newlib/libm/machine/spu/headers/tgammad2.h
newlib/libm/machine/spu/headers/tgammaf4.h
newlib/libm/machine/spu/headers/truncd2.h
newlib/libm/machine/spu/headers/truncf4.h
src-release
Cherrypick from cygnus 1999-05-03 07:29:06 UTC Richard Henderson <rth@redhat.com> '19990502 sourceware import':
config/mh-armpic
config/mh-elfalphapic
config/mh-m68kpic
config/mh-papic
config/mh-ppcpic
config/mh-x86pic
Delete:
config/extensions.m4
config/futex.m4
config/mh-pa
config/mh-pa-hpux10
config/mt-mips-gnu
config/mt-mips16-compat
config/override.m4
config/proginstall.m4
config/tcl.m4
libgloss/bfin/basiccrt.S
libgloss/bfin/bf522.ld
libgloss/bfin/bf523.ld
libgloss/bfin/bf524.ld
libgloss/bfin/bf525.ld
libgloss/bfin/bf526.ld
libgloss/bfin/bf527.ld
libgloss/bfin/bf531.ld
libgloss/bfin/bf532.ld
libgloss/bfin/bf533.ld
libgloss/bfin/bf534.ld
libgloss/bfin/bf536.ld
libgloss/bfin/bf537.ld
libgloss/bfin/bf538.ld
libgloss/bfin/bf539.ld
libgloss/bfin/bf542.ld
libgloss/bfin/bf544.ld
libgloss/bfin/bf547.ld
libgloss/bfin/bf548.ld
libgloss/bfin/bf549.ld
libgloss/bfin/bf561.ld
libgloss/bfin/bf561a.ld
libgloss/bfin/bf561b.ld
libgloss/bfin/bf561m.ld
libgloss/bfin/bfin-common-mc.ld
libgloss/bfin/bfin-common-sc.ld
libgloss/bfin/include/blackfin.h
libgloss/bfin/include/cdefBF522.h
libgloss/bfin/include/cdefBF525.h
libgloss/bfin/include/cdefBF527.h
libgloss/bfin/include/cdefBF52x_base.h
libgloss/bfin/include/cdefBF531.h
libgloss/bfin/include/cdefBF532.h
libgloss/bfin/include/cdefBF533.h
libgloss/bfin/include/cdefBF534.h
libgloss/bfin/include/cdefBF535.h
libgloss/bfin/include/cdefBF536.h
libgloss/bfin/include/cdefBF537.h
libgloss/bfin/include/cdefBF538.h
libgloss/bfin/include/cdefBF539.h
libgloss/bfin/include/cdefBF53x.h
libgloss/bfin/include/cdefBF541.h
libgloss/bfin/include/cdefBF542.h
libgloss/bfin/include/cdefBF544.h
libgloss/bfin/include/cdefBF547.h
libgloss/bfin/include/cdefBF548.h
libgloss/bfin/include/cdefBF549.h
libgloss/bfin/include/cdefBF54x_base.h
libgloss/bfin/include/cdefBF561.h
libgloss/bfin/include/cdef_LPBlackfin.h
libgloss/bfin/include/cdefblackfin.h
libgloss/bfin/include/cplb.h
libgloss/bfin/include/cplbtab.h
libgloss/bfin/include/defBF522.h
libgloss/bfin/include/defBF525.h
libgloss/bfin/include/defBF527.h
libgloss/bfin/include/defBF52x_base.h
libgloss/bfin/include/defBF531.h
libgloss/bfin/include/defBF532.h
libgloss/bfin/include/defBF533.h
libgloss/bfin/include/defBF534.h
libgloss/bfin/include/defBF535.h
libgloss/bfin/include/defBF536.h
libgloss/bfin/include/defBF537.h
libgloss/bfin/include/defBF538.h
libgloss/bfin/include/defBF539.h
libgloss/bfin/include/defBF541.h
libgloss/bfin/include/defBF542.h
libgloss/bfin/include/defBF544.h
libgloss/bfin/include/defBF547.h
libgloss/bfin/include/defBF548.h
libgloss/bfin/include/defBF549.h
libgloss/bfin/include/defBF54x_base.h
libgloss/bfin/include/defBF561.h
libgloss/bfin/include/def_LPBlackfin.h
libgloss/bfin/include/defblackfin.h
libgloss/bfin/include/sys/_adi_platform.h
libgloss/bfin/include/sys/anomaly_macros_rtl.h
libgloss/bfin/include/sys/excause.h
libgloss/bfin/include/sys/exception.h
libgloss/bfin/include/sys/mc_typedef.h
libgloss/bfin/include/sys/platform.h
libgloss/bfin/include/sys/pll.h
libgloss/bfin/include/sysreg.h
libgloss/spu/linux_syscalls.c
libgloss/xstormy16/isatty.c
newlib/libc/machine/m68k/m68kasm.h
newlib/libc/machine/spu/assert.c
newlib/libc/machine/spu/impure.c
newlib/libc/machine/spu/include/spu_timer.h
newlib/libc/machine/spu/memcmp.c
newlib/libc/machine/spu/spu_clock_stop.c
newlib/libc/machine/spu/spu_clock_svcs.c
newlib/libc/machine/spu/spu_timebase.c
newlib/libc/machine/spu/spu_timer_flih.S
newlib/libc/machine/spu/spu_timer_free.c
newlib/libc/machine/spu/spu_timer_internal.h
newlib/libc/machine/spu/spu_timer_slih.c
newlib/libc/machine/spu/spu_timer_slih_reg.c
newlib/libc/machine/spu/spu_timer_stop.c
newlib/libc/machine/spu/spu_timer_svcs.c
newlib/libc/machine/spu/straddr.h
newlib/libc/machine/spu/strcpy.h
newlib/libc/machine/spu/strncmp.h
newlib/libc/machine/spu/sys/linux_syscalls.h
newlib/libc/posix/_isatty.c
newlib/libc/reent/isattyr.c
newlib/libc/string/memmem.c
newlib/libc/string/str-two-way.h
newlib/libc/sys/linux/isatty.c
newlib/libc/sys/linux/machine/i386/atomic.h
newlib/libc/sys/linux/net/XXX-lookup.c
newlib/libc/sys/linux/net/alias-lookup.c
newlib/libc/sys/linux/net/aliases.h
newlib/libc/sys/linux/net/check_pf.c
newlib/libc/sys/linux/net/databases.def
newlib/libc/sys/linux/net/digits_dots.c
newlib/libc/sys/linux/net/ether_aton.c
newlib/libc/sys/linux/net/ether_aton_r.c
newlib/libc/sys/linux/net/ether_hton.c
newlib/libc/sys/linux/net/ether_line.c
newlib/libc/sys/linux/net/ether_ntoa.c
newlib/libc/sys/linux/net/ether_ntoa_r.c
newlib/libc/sys/linux/net/ether_ntoh.c
newlib/libc/sys/linux/net/etherent.h
newlib/libc/sys/linux/net/ethers-lookup.c
newlib/libc/sys/linux/net/function.def
newlib/libc/sys/linux/net/getXXbyYY.c
newlib/libc/sys/linux/net/getXXbyYY_r.c
newlib/libc/sys/linux/net/getXXent.c
newlib/libc/sys/linux/net/getXXent_r.c
newlib/libc/sys/linux/net/getaliasent.c
newlib/libc/sys/linux/net/getaliasent_r.c
newlib/libc/sys/linux/net/getaliasname.c
newlib/libc/sys/linux/net/getaliasname_r.c
newlib/libc/sys/linux/net/gethstbyad.c
newlib/libc/sys/linux/net/gethstbyad_r.c
newlib/libc/sys/linux/net/gethstbynm.c
newlib/libc/sys/linux/net/gethstbynm2.c
newlib/libc/sys/linux/net/gethstbynm2_r.c
newlib/libc/sys/linux/net/gethstbynm_r.c
newlib/libc/sys/linux/net/gethstent.c
newlib/libc/sys/linux/net/gethstent_r.c
newlib/libc/sys/linux/net/getnetbyad.c
newlib/libc/sys/linux/net/getnetbyad_r.c
newlib/libc/sys/linux/net/getnetbynm.c
newlib/libc/sys/linux/net/getnetbynm_r.c
newlib/libc/sys/linux/net/getnetent.c
newlib/libc/sys/linux/net/getnetent_r.c
newlib/libc/sys/linux/net/getnetgrent.c
newlib/libc/sys/linux/net/getnetgrent_r.c
newlib/libc/sys/linux/net/getnssent.c
newlib/libc/sys/linux/net/getnssent_r.c
newlib/libc/sys/linux/net/getproto_r.c
newlib/libc/sys/linux/net/getprtent.c
newlib/libc/sys/linux/net/getprtent_r.c
newlib/libc/sys/linux/net/getprtname.c
newlib/libc/sys/linux/net/getprtname_r.c
newlib/libc/sys/linux/net/getrpcbyname.c
newlib/libc/sys/linux/net/getrpcbyname_r.c
newlib/libc/sys/linux/net/getrpcbynumber.c
newlib/libc/sys/linux/net/getrpcbynumber_r.c
newlib/libc/sys/linux/net/getrpcent.c
newlib/libc/sys/linux/net/getrpcent_r.c
newlib/libc/sys/linux/net/getservent_r.c
newlib/libc/sys/linux/net/getsrvbynm.c
newlib/libc/sys/linux/net/getsrvbynm_r.c
newlib/libc/sys/linux/net/getsrvbypt.c
newlib/libc/sys/linux/net/getsrvbypt_r.c
newlib/libc/sys/linux/net/grp-lookup.c
newlib/libc/sys/linux/net/herrno.c
newlib/libc/sys/linux/net/hosts-lookup.c
newlib/libc/sys/linux/net/ifaddrs.h
newlib/libc/sys/linux/net/ifreq.c
newlib/libc/sys/linux/net/ifreq.h
newlib/libc/sys/linux/net/in6_addr.c
newlib/libc/sys/linux/net/inet6_option.c
newlib/libc/sys/linux/net/inet_mkadr.c
newlib/libc/sys/linux/net/inet_net.c
newlib/libc/sys/linux/net/key-lookup.c
newlib/libc/sys/linux/net/local.h
newlib/libc/sys/linux/net/netgroup.h
newlib/libc/sys/linux/net/netgrp-lookup.c
newlib/libc/sys/linux/net/network-lookup.c
newlib/libc/sys/linux/net/not-cancel.h
newlib/libc/sys/linux/net/ns_samedomain.c
newlib/libc/sys/linux/net/nscd-types.h
newlib/libc/sys/linux/net/nscd/nscd-client.h
newlib/libc/sys/linux/net/nscd/nscd_proto.h
newlib/libc/sys/linux/net/nss.h
newlib/libc/sys/linux/net/nsswitch.c
newlib/libc/sys/linux/net/nsswitch.h
newlib/libc/sys/linux/net/opensock.c
newlib/libc/sys/linux/net/proto-lookup.c
newlib/libc/sys/linux/net/pwd-lookup.c
newlib/libc/sys/linux/net/res_debug.h
newlib/libc/sys/linux/net/res_hconf.c
newlib/libc/sys/linux/net/res_hconf.h
newlib/libc/sys/linux/net/res_libc.c
newlib/libc/sys/linux/net/rexec.c
newlib/libc/sys/linux/net/rpc-lookup.c
newlib/libc/sys/linux/net/ruserpass.c
newlib/libc/sys/linux/net/service-lookup.c
newlib/libc/sys/linux/net/spwd-lookup.c
newlib/libc/sys/linux/shlib-compat.h
newlib/libc/syscalls/sysisatty.c
newlib/testsuite/newlib.stdlib/size_max.c
newlib/testsuite/newlib.stdlib/stdlib.exp
Diffstat (limited to 'newlib/libc/stdio')
33 files changed, 65 insertions, 394 deletions
diff --git a/newlib/libc/stdio/Makefile.am b/newlib/libc/stdio/Makefile.am index b50b87188..4d3daaefb 100644 --- a/newlib/libc/stdio/Makefile.am +++ b/newlib/libc/stdio/Makefile.am @@ -128,8 +128,6 @@ endif !ELIX_LEVEL_2 endif !ELIX_LEVEL_1 LIBADD_OBJS = \ - $(lpfx)svfiprintf.$(oext) $(lpfx)svfprintf.$(oext) \ - $(lpfx)svfiscanf.$(oext) $(lpfx)svfscanf.$(oext) \ $(lpfx)vfiprintf.$(oext) $(lpfx)vfprintf.$(oext) \ $(lpfx)vfscanf.$(oext) $(lpfx)vfiscanf.$(oext) @@ -163,24 +161,12 @@ $(lpfx)vfprintf.$(oext): vfprintf.c $(lpfx)vfiprintf.$(oext): vfprintf.c $(LIB_COMPILE) -fshort-enums -DINTEGER_ONLY -c $(srcdir)/vfprintf.c -o $@ -$(lpfx)svfprintf.$(oext): vfprintf.c - $(LIB_COMPILE) -fshort-enums -DSTRING_ONLY -c $(srcdir)/vfprintf.c -o $@ - -$(lpfx)svfiprintf.$(oext): vfprintf.c - $(LIB_COMPILE) -fshort-enums -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfprintf.c -o $@ - $(lpfx)vfscanf.$(oext): vfscanf.c $(LIB_COMPILE) -c $(srcdir)/vfscanf.c -o $@ $(lpfx)vfiscanf.$(oext): vfscanf.c $(LIB_COMPILE) -DINTEGER_ONLY -c $(srcdir)/vfscanf.c -o $@ -$(lpfx)svfscanf.$(oext): vfscanf.c - $(LIB_COMPILE) -DSTRING_ONLY -c $(srcdir)/vfscanf.c -o $@ - -$(lpfx)svfiscanf.$(oext): vfscanf.c - $(LIB_COMPILE) -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfscanf.c -o $@ - CHEWOUT_FILES = \ clearerr.def \ diprintf.def \ @@ -288,10 +274,6 @@ $(lpfx)sprintf.$(oext): local.h $(lpfx)siscanf.$(oext): local.h $(lpfx)sscanf.$(oext): local.h $(lpfx)stdio.$(oext): local.h -$(lpfx)svfiprintf.$(oext): local.h -$(lpfx)svfiscanf.$(oext): local.h floatio.h -$(lpfx)svfprintf.$(oext): local.h -$(lpfx)svfscanf.$(oext): local.h floatio.h $(lpfx)ungetc.$(oext): local.h $(lpfx)vfiprintf.$(oext): local.h $(lpfx)vfprintf.$(oext): local.h diff --git a/newlib/libc/stdio/Makefile.in b/newlib/libc/stdio/Makefile.in index be8cd4554..3b80e35bc 100644 --- a/newlib/libc/stdio/Makefile.in +++ b/newlib/libc/stdio/Makefile.in @@ -54,11 +54,8 @@ CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru lib_a_AR = $(AR) $(ARFLAGS) -am__DEPENDENCIES_1 = $(lpfx)svfiprintf.$(oext) \ - $(lpfx)svfprintf.$(oext) $(lpfx)svfiscanf.$(oext) \ - $(lpfx)svfscanf.$(oext) $(lpfx)vfiprintf.$(oext) \ - $(lpfx)vfprintf.$(oext) $(lpfx)vfscanf.$(oext) \ - $(lpfx)vfiscanf.$(oext) +am__DEPENDENCIES_1 = $(lpfx)vfiprintf.$(oext) $(lpfx)vfprintf.$(oext) \ + $(lpfx)vfscanf.$(oext) $(lpfx)vfiscanf.$(oext) am__objects_1 = lib_a-clearerr.$(OBJEXT) lib_a-fclose.$(OBJEXT) \ lib_a-fdopen.$(OBJEXT) lib_a-feof.$(OBJEXT) \ lib_a-ferror.$(OBJEXT) lib_a-fflush.$(OBJEXT) \ @@ -441,8 +438,6 @@ GENERAL_SOURCES = \ @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@ELIX_4_SOURCES = @ELIX_LEVEL_1_TRUE@ELIX_4_SOURCES = LIBADD_OBJS = \ - $(lpfx)svfiprintf.$(oext) $(lpfx)svfprintf.$(oext) \ - $(lpfx)svfiscanf.$(oext) $(lpfx)svfscanf.$(oext) \ $(lpfx)vfiprintf.$(oext) $(lpfx)vfprintf.$(oext) \ $(lpfx)vfscanf.$(oext) $(lpfx)vfiscanf.$(oext) @@ -1350,24 +1345,12 @@ $(lpfx)vfprintf.$(oext): vfprintf.c $(lpfx)vfiprintf.$(oext): vfprintf.c $(LIB_COMPILE) -fshort-enums -DINTEGER_ONLY -c $(srcdir)/vfprintf.c -o $@ -$(lpfx)svfprintf.$(oext): vfprintf.c - $(LIB_COMPILE) -fshort-enums -DSTRING_ONLY -c $(srcdir)/vfprintf.c -o $@ - -$(lpfx)svfiprintf.$(oext): vfprintf.c - $(LIB_COMPILE) -fshort-enums -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfprintf.c -o $@ - $(lpfx)vfscanf.$(oext): vfscanf.c $(LIB_COMPILE) -c $(srcdir)/vfscanf.c -o $@ $(lpfx)vfiscanf.$(oext): vfscanf.c $(LIB_COMPILE) -DINTEGER_ONLY -c $(srcdir)/vfscanf.c -o $@ -$(lpfx)svfscanf.$(oext): vfscanf.c - $(LIB_COMPILE) -DSTRING_ONLY -c $(srcdir)/vfscanf.c -o $@ - -$(lpfx)svfiscanf.$(oext): vfscanf.c - $(LIB_COMPILE) -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfscanf.c -o $@ - .c.def: $(CHEW) < $< > $*.def 2> $*.ref touch stmp-def @@ -1405,10 +1388,6 @@ $(lpfx)sprintf.$(oext): local.h $(lpfx)siscanf.$(oext): local.h $(lpfx)sscanf.$(oext): local.h $(lpfx)stdio.$(oext): local.h -$(lpfx)svfiprintf.$(oext): local.h -$(lpfx)svfiscanf.$(oext): local.h floatio.h -$(lpfx)svfprintf.$(oext): local.h -$(lpfx)svfscanf.$(oext): local.h floatio.h $(lpfx)ungetc.$(oext): local.h $(lpfx)vfiprintf.$(oext): local.h $(lpfx)vfprintf.$(oext): local.h diff --git a/newlib/libc/stdio/asiprintf.c b/newlib/libc/stdio/asiprintf.c index 97474fd1a..aab3b4410 100644 --- a/newlib/libc/stdio/asiprintf.c +++ b/newlib/libc/stdio/asiprintf.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1990 The Regents of the University of California. + * Copyright (c) 1990, 2007 The Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms are permitted @@ -40,7 +40,7 @@ _DEFUN(_asiprintf_r, (ptr, strp, fmt), f._bf._size = f._w = 0; f._file = -1; /* No file. */ va_start (ap, fmt); - ret = _svfiprintf_r (ptr, &f, fmt, ap); + ret = _vfiprintf_r (ptr, &f, fmt, ap); va_end (ap); if (ret >= 0) { @@ -67,7 +67,7 @@ _DEFUN(asiprintf, (strp, fmt), f._bf._size = f._w = 0; f._file = -1; /* No file. */ va_start (ap, fmt); - ret = _svfiprintf_r (_REENT, &f, fmt, ap); + ret = _vfiprintf_r (_REENT, &f, fmt, ap); va_end (ap); if (ret >= 0) { diff --git a/newlib/libc/stdio/asniprintf.c b/newlib/libc/stdio/asniprintf.c index d4ff901e8..dd74b7c8c 100644 --- a/newlib/libc/stdio/asniprintf.c +++ b/newlib/libc/stdio/asniprintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007, 2008 Eric Blake +/* Copyright (C) 2007 Eric Blake * Permission to use, copy, modify, and distribute this software * is freely granted, provided that this notice is preserved. */ @@ -48,7 +48,7 @@ _DEFUN(_asniprintf_r, (ptr, buf, lenp, fmt), f._bf._size = f._w = len; f._file = -1; /* No file. */ va_start (ap, fmt); - ret = _svfiprintf_r (ptr, &f, fmt, ap); + ret = _vfiprintf_r (ptr, &f, fmt, ap); va_end (ap); if (ret < 0) return NULL; @@ -95,7 +95,7 @@ _DEFUN(asniprintf, (buf, lenp, fmt), f._bf._size = f._w = len; f._file = -1; /* No file. */ va_start (ap, fmt); - ret = _svfiprintf_r (ptr, &f, fmt, ap); + ret = _vfiprintf_r (ptr, &f, fmt, ap); va_end (ap); if (ret < 0) return NULL; diff --git a/newlib/libc/stdio/asnprintf.c b/newlib/libc/stdio/asnprintf.c index bb7057a34..ef9bd8900 100644 --- a/newlib/libc/stdio/asnprintf.c +++ b/newlib/libc/stdio/asnprintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007, 2008 Eric Blake +/* Copyright (C) 2007 Eric Blake * Permission to use, copy, modify, and distribute this software * is freely granted, provided that this notice is preserved. */ @@ -48,7 +48,7 @@ _DEFUN(_asnprintf_r, (ptr, buf, lenp, fmt), f._bf._size = f._w = len; f._file = -1; /* No file. */ va_start (ap, fmt); - ret = _svfprintf_r (ptr, &f, fmt, ap); + ret = _vfprintf_r (ptr, &f, fmt, ap); va_end (ap); if (ret < 0) return NULL; @@ -95,7 +95,7 @@ _DEFUN(asnprintf, (buf, lenp, fmt), f._bf._size = f._w = len; f._file = -1; /* No file. */ va_start (ap, fmt); - ret = _svfprintf_r (ptr, &f, fmt, ap); + ret = _vfprintf_r (ptr, &f, fmt, ap); va_end (ap); if (ret < 0) return NULL; diff --git a/newlib/libc/stdio/asprintf.c b/newlib/libc/stdio/asprintf.c index 59a08c808..d72a4a7e9 100644 --- a/newlib/libc/stdio/asprintf.c +++ b/newlib/libc/stdio/asprintf.c @@ -40,7 +40,7 @@ _DEFUN(_asprintf_r, (ptr, strp, fmt), f._bf._size = f._w = 0; f._file = -1; /* No file. */ va_start (ap, fmt); - ret = _svfprintf_r (ptr, &f, fmt, ap); + ret = _vfprintf_r (ptr, &f, fmt, ap); va_end (ap); if (ret >= 0) { @@ -67,7 +67,7 @@ _DEFUN(asprintf, (strp, fmt), f._bf._size = f._w = 0; f._file = -1; /* No file. */ va_start (ap, fmt); - ret = _svfprintf_r (_REENT, &f, fmt, ap); + ret = _vfprintf_r (_REENT, &f, fmt, ap); va_end (ap); if (ret >= 0) { diff --git a/newlib/libc/stdio/dprintf.c b/newlib/libc/stdio/dprintf.c index b0eb19192..53bb50bfa 100644 --- a/newlib/libc/stdio/dprintf.c +++ b/newlib/libc/stdio/dprintf.c @@ -45,7 +45,6 @@ Supporting OS subroutines required: <<sbrk>>, <<write>>. #include <stdio.h> #include <unistd.h> #include <stdarg.h> -#include "local.h" int _DEFUN(_dprintf_r, (ptr, fd, format), diff --git a/newlib/libc/stdio/fflush.c b/newlib/libc/stdio/fflush.c index 33e2e7b26..24bd6c10e 100644 --- a/newlib/libc/stdio/fflush.c +++ b/newlib/libc/stdio/fflush.c @@ -164,8 +164,6 @@ _DEFUN(_fflush_r, (ptr, fp), fp->_p = fp->_bf._base; if (fp->_flags & __SOFF) fp->_offset = curoff; - if (HASUB (fp)) - FREEUB (ptr, fp); } else { diff --git a/newlib/libc/stdio/freopen.c b/newlib/libc/stdio/freopen.c index 2a0d36247..247f8c6ad 100644 --- a/newlib/libc/stdio/freopen.c +++ b/newlib/libc/stdio/freopen.c @@ -167,7 +167,7 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp), /* * F_SETFL doesn't change textmode. Don't mess with modes of ttys. */ - if (0 <= f && ! _isatty_r (ptr, f) + if (0 <= f && ! isatty (f) && setmode (f, oflags & (O_BINARY | O_TEXT)) == -1) f = -1; #endif diff --git a/newlib/libc/stdio/ftell.c b/newlib/libc/stdio/ftell.c index 816cafa76..2aa10b2c7 100644 --- a/newlib/libc/stdio/ftell.c +++ b/newlib/libc/stdio/ftell.c @@ -118,12 +118,9 @@ _DEFUN(_ftell_r, (ptr, fp), return -1L; } - /* Find offset of underlying I/O object, then adjust for buffered - bytes. Flush a write stream, since the offset may be altered if - the stream is appending. Do not flush a read stream, since we - must not lose the ungetc buffer. */ - if (fp->_flags & __SWR) - _fflush_r (ptr, fp); + /* Find offset of underlying I/O object, then + adjust for buffered bytes. */ + _fflush_r (ptr, fp); /* may adjust seek offset on append stream */ if (fp->_flags & __SOFF) pos = fp->_offset; else diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h index 5dc2e6223..f02f91d57 100644 --- a/newlib/libc/stdio/local.h +++ b/newlib/libc/stdio/local.h @@ -34,15 +34,7 @@ extern int _EXFUN(__svfscanf_r,(struct _reent *,FILE *, _CONST char *,va_list)); -extern int _EXFUN(__ssvfscanf_r,(struct _reent *,FILE *, _CONST char *,va_list)); extern int _EXFUN(__svfiscanf_r,(struct _reent *,FILE *, _CONST char *,va_list)); -extern int _EXFUN(__ssvfiscanf_r,(struct _reent *,FILE *, _CONST char *,va_list)); -int _EXFUN(_svfprintf_r,(struct _reent *, FILE *, const char *, - va_list) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); -int _EXFUN(_svfiprintf_r,(struct _reent *, FILE *, const char *, - va_list) - _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); extern FILE *_EXFUN(__sfp,(struct _reent *)); extern int _EXFUN(__sflags,(struct _reent *,_CONST char*, int*)); extern int _EXFUN(__srefill_r,(struct _reent *,FILE *)); diff --git a/newlib/libc/stdio/makebuf.c b/newlib/libc/stdio/makebuf.c index a3f47e2f7..d13f162b2 100644 --- a/newlib/libc/stdio/makebuf.c +++ b/newlib/libc/stdio/makebuf.c @@ -107,7 +107,7 @@ _DEFUN(__smakebuf_r, (ptr, fp), fp->_flags |= __SMBF; fp->_bf._base = fp->_p = (unsigned char *) p; fp->_bf._size = size; - if (couldbetty && _isatty_r (ptr, fp->_file)) + if (couldbetty && isatty (fp->_file)) fp->_flags |= __SLBF; } } diff --git a/newlib/libc/stdio/rget.c b/newlib/libc/stdio/rget.c index 9474bd9f6..0444acee3 100644 --- a/newlib/libc/stdio/rget.c +++ b/newlib/libc/stdio/rget.c @@ -36,10 +36,6 @@ _DEFUN(__srget_r, (ptr, fp), struct _reent *ptr _AND register FILE *fp) { - /* Ensure that any fake std stream is resolved before - we call __srefill_r so we may access the true read buffer. */ - CHECK_INIT(ptr, fp); - if (__srefill_r (ptr, fp) == 0) { fp->_r--; diff --git a/newlib/libc/stdio/siprintf.c b/newlib/libc/stdio/siprintf.c index d6a0e1983..296a16ee0 100644 --- a/newlib/libc/stdio/siprintf.c +++ b/newlib/libc/stdio/siprintf.c @@ -119,7 +119,7 @@ _siprintf_r(ptr, str, fmt, va_alist) #else va_start (ap); #endif - ret = _svfiprintf_r (ptr, &f, fmt, ap); + ret = _vfiprintf_r (ptr, &f, fmt, ap); va_end (ap); *f._p = 0; return (ret); @@ -152,7 +152,7 @@ siprintf(str, fmt, va_alist) #else va_start (ap); #endif - ret = _svfiprintf_r (_REENT, &f, fmt, ap); + ret = _vfiprintf_r (_REENT, &f, fmt, ap); va_end (ap); *f._p = 0; return (ret); diff --git a/newlib/libc/stdio/siscanf.c b/newlib/libc/stdio/siscanf.c index a64e2a891..15b25c196 100644 --- a/newlib/libc/stdio/siscanf.c +++ b/newlib/libc/stdio/siscanf.c @@ -152,7 +152,7 @@ siscanf(str, fmt, va_alist) #else va_start (ap); #endif - ret = __ssvfiscanf_r (_REENT, &f, fmt, ap); + ret = __svfiscanf_r (_REENT, &f, fmt, ap); va_end (ap); return ret; } @@ -190,7 +190,7 @@ _siscanf_r(ptr, str, fmt, va_alist) #else va_start (ap); #endif - ret = __ssvfiscanf_r (ptr, &f, fmt, ap); + ret = __svfiscanf_r (ptr, &f, fmt, ap); va_end (ap); return ret; } diff --git a/newlib/libc/stdio/sniprintf.c b/newlib/libc/stdio/sniprintf.c index 98a2c2509..8cd06ce86 100644 --- a/newlib/libc/stdio/sniprintf.c +++ b/newlib/libc/stdio/sniprintf.c @@ -64,7 +64,7 @@ _sniprintf_r (ptr, str, size, fmt, va_alist) #else va_start (ap); #endif - ret = _svfiprintf_r (ptr, &f, fmt, ap); + ret = _vfiprintf_r (ptr, &f, fmt, ap); va_end (ap); if (ret < EOF) ptr->_errno = EOVERFLOW; @@ -108,7 +108,7 @@ sniprintf (str, size, fmt, va_alist) #else va_start (ap); #endif - ret = _svfiprintf_r (ptr, &f, fmt, ap); + ret = _vfiprintf_r (ptr, &f, fmt, ap); va_end (ap); if (ret < EOF) ptr->_errno = EOVERFLOW; diff --git a/newlib/libc/stdio/snprintf.c b/newlib/libc/stdio/snprintf.c index 13414e3d1..52db2dd2c 100644 --- a/newlib/libc/stdio/snprintf.c +++ b/newlib/libc/stdio/snprintf.c @@ -63,7 +63,7 @@ _snprintf_r(ptr, str, size, fmt, va_alist) #else va_start (ap); #endif - ret = _svfprintf_r (ptr, &f, fmt, ap); + ret = _vfprintf_r (ptr, &f, fmt, ap); va_end (ap); if (ret < EOF) ptr->_errno = EOVERFLOW; @@ -107,7 +107,7 @@ snprintf(str, size, fmt, va_alist) #else va_start (ap); #endif - ret = _svfprintf_r (ptr, &f, fmt, ap); + ret = _vfprintf_r (ptr, &f, fmt, ap); va_end (ap); if (ret < EOF) ptr->_errno = EOVERFLOW; diff --git a/newlib/libc/stdio/sprintf.c b/newlib/libc/stdio/sprintf.c index 48d811cf6..bdff0797d 100644 --- a/newlib/libc/stdio/sprintf.c +++ b/newlib/libc/stdio/sprintf.c @@ -583,7 +583,7 @@ _sprintf_r(ptr, str, fmt, va_alist) #else va_start (ap); #endif - ret = _svfprintf_r (ptr, &f, fmt, ap); + ret = _vfprintf_r (ptr, &f, fmt, ap); va_end (ap); *f._p = 0; return (ret); @@ -616,7 +616,7 @@ sprintf(str, fmt, va_alist) #else va_start (ap); #endif - ret = _svfprintf_r (_REENT, &f, fmt, ap); + ret = _vfprintf_r (_REENT, &f, fmt, ap); va_end (ap); *f._p = 0; return (ret); diff --git a/newlib/libc/stdio/sscanf.c b/newlib/libc/stdio/sscanf.c index b09390380..c0921e1e1 100644 --- a/newlib/libc/stdio/sscanf.c +++ b/newlib/libc/stdio/sscanf.c @@ -433,7 +433,7 @@ sscanf(str, fmt, va_alist) #else va_start (ap); #endif - ret = __ssvfscanf_r (_REENT, &f, fmt, ap); + ret = __svfscanf_r (_REENT, &f, fmt, ap); va_end (ap); return ret; } @@ -471,7 +471,7 @@ _sscanf_r(ptr, str, fmt, va_alist) #else va_start (ap); #endif - ret = __ssvfscanf_r (ptr, &f, fmt, ap); + ret = __svfscanf_r (ptr, &f, fmt, ap); va_end (ap); return ret; } diff --git a/newlib/libc/stdio/vasiprintf.c b/newlib/libc/stdio/vasiprintf.c index 671bbdb08..b16efe794 100644 --- a/newlib/libc/stdio/vasiprintf.c +++ b/newlib/libc/stdio/vasiprintf.c @@ -53,7 +53,7 @@ _DEFUN(_vasiprintf_r, (ptr, strp, fmt, ap), f._bf._base = f._p = NULL; f._bf._size = f._w = 0; f._file = -1; /* No file. */ - ret = _svfiprintf_r (ptr, &f, fmt, ap); + ret = _vfiprintf_r (ptr, &f, fmt, ap); if (ret >= 0) { *f._p = 0; diff --git a/newlib/libc/stdio/vasniprintf.c b/newlib/libc/stdio/vasniprintf.c index bf9b7c5eb..1e5d600c7 100644 --- a/newlib/libc/stdio/vasniprintf.c +++ b/newlib/libc/stdio/vasniprintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007, 2008 Eric Blake +/* Copyright (C) 2007 Eric Blake * Permission to use, copy, modify, and distribute this software * is freely granted, provided that this notice is preserved. */ @@ -47,7 +47,7 @@ _DEFUN(_vasniprintf_r, (ptr, buf, lenp, fmt, ap), } f._bf._size = f._w = len; f._file = -1; /* No file. */ - ret = _svfiprintf_r (ptr, &f, fmt, ap); + ret = _vfiprintf_r (ptr, &f, fmt, ap); if (ret < 0) return NULL; *lenp = ret; diff --git a/newlib/libc/stdio/vasnprintf.c b/newlib/libc/stdio/vasnprintf.c index 2dda30a7a..740aa0700 100644 --- a/newlib/libc/stdio/vasnprintf.c +++ b/newlib/libc/stdio/vasnprintf.c @@ -47,7 +47,7 @@ _DEFUN(_vasnprintf_r, (ptr, buf, lenp, fmt, ap), } f._bf._size = f._w = len; f._file = -1; /* No file. */ - ret = _svfprintf_r (ptr, &f, fmt, ap); + ret = _vfprintf_r (ptr, &f, fmt, ap); if (ret < 0) return NULL; *lenp = ret; diff --git a/newlib/libc/stdio/vasprintf.c b/newlib/libc/stdio/vasprintf.c index 525c6963a..90539d1d8 100644 --- a/newlib/libc/stdio/vasprintf.c +++ b/newlib/libc/stdio/vasprintf.c @@ -53,7 +53,7 @@ _DEFUN(_vasprintf_r, (ptr, strp, fmt, ap), f._bf._base = f._p = NULL; f._bf._size = f._w = 0; f._file = -1; /* No file. */ - ret = _svfprintf_r (ptr, &f, fmt, ap); + ret = _vfprintf_r (ptr, &f, fmt, ap); if (ret >= 0) { *f._p = 0; diff --git a/newlib/libc/stdio/vdiprintf.c b/newlib/libc/stdio/vdiprintf.c index 51bdb000e..b9b94735c 100644 --- a/newlib/libc/stdio/vdiprintf.c +++ b/newlib/libc/stdio/vdiprintf.c @@ -10,7 +10,6 @@ #include <stdlib.h> #include <unistd.h> #include <stdarg.h> -#include "local.h" int _DEFUN(_vdiprintf_r, (ptr, fd, format, ap), diff --git a/newlib/libc/stdio/vdprintf.c b/newlib/libc/stdio/vdprintf.c index bfb19c95b..8a20235ef 100644 --- a/newlib/libc/stdio/vdprintf.c +++ b/newlib/libc/stdio/vdprintf.c @@ -10,7 +10,6 @@ #include <stdlib.h> #include <unistd.h> #include <stdarg.h> -#include "local.h" int _DEFUN(_vdprintf_r, (ptr, fd, format, ap), diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index 1846d7c1e..e9c7c9e1a 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -116,18 +116,10 @@ static char *rcsid = "$Id$"; #ifdef INTEGER_ONLY # define VFPRINTF vfiprintf -# ifdef STRING_ONLY -# define _VFPRINTF_R _svfiprintf_r -# else -# define _VFPRINTF_R _vfiprintf_r -# endif +# define _VFPRINTF_R _vfiprintf_r #else # define VFPRINTF vfprintf -# ifdef STRING_ONLY -# define _VFPRINTF_R _svfprintf_r -# else -# define _VFPRINTF_R _vfprintf_r -# endif +# define _VFPRINTF_R _vfprintf_r # ifndef NO_FLOATING_POINT # define FLOATING_POINT # endif @@ -166,100 +158,6 @@ static char *rcsid = "$Id$"; # undef _NO_LONGLONG #endif -#ifdef STRING_ONLY -static int -_DEFUN(__sprint_r, (ptr, fp, uio), - struct _reent *ptr _AND - FILE *fp _AND - register struct __suio *uio) -{ - register size_t len; - register int w; - register struct __siov *iov; - register _CONST char *p = NULL; - - iov = uio->uio_iov; - len = 0; - - if (uio->uio_resid == 0) { - uio->uio_iovcnt = 0; - return (0); - } - - do { - while (len == 0) { - p = iov->iov_base; - len = iov->iov_len; - iov++; - } - w = fp->_w; - if (len >= w && fp->_flags & (__SMBF | __SOPT)) { - /* must be asprintf family */ - unsigned char *str; - int curpos = (fp->_p - fp->_bf._base); - /* Choose a geometric growth factor to avoid - * quadratic realloc behavior, but use a rate less - * than (1+sqrt(5))/2 to accomodate malloc - * overhead. asprintf EXPECTS us to overallocate, so - * that it can add a trailing \0 without - * reallocating. The new allocation should thus be - * max(prev_size*1.5, curpos+len+1). */ - int newsize = fp->_bf._size * 3 / 2; - if (newsize < curpos + len + 1) - newsize = curpos + len + 1; - if (fp->_flags & __SOPT) - { - /* asnprintf leaves original buffer alone. */ - str = (unsigned char *)_malloc_r (ptr, newsize); - if (!str) - { - ptr->_errno = ENOMEM; - goto err; - } - memcpy (str, fp->_bf._base, curpos); - fp->_flags = (fp->_flags & ~__SOPT) | __SMBF; - } - else - { - str = (unsigned char *)_realloc_r (ptr, fp->_bf._base, - newsize); - if (!str) { - /* Free unneeded buffer. */ - _free_r (ptr, fp->_bf._base); - /* Ensure correct errno, even if free - * changed it. */ - ptr->_errno = ENOMEM; - goto err; - } - } - fp->_bf._base = str; - fp->_p = str + curpos; - fp->_bf._size = newsize; - w = len; - fp->_w = newsize - curpos; - } - if (len < w) - w = len; - (void)memmove ((_PTR) fp->_p, (_PTR) p, (size_t) (w)); - fp->_w -= w; - fp->_p += w; - w = len; /* pretend we copied all */ - p += w; - len -= w; - } while ((uio->uio_resid -= w) != 0); - - uio->uio_resid = 0; - uio->uio_iovcnt = 0; - return 0; - -err: - fp->_flags |= __SERR; - uio->uio_resid = 0; - uio->uio_iovcnt = 0; - return EOF; -} - -#else /* !STRING_ONLY */ /* * Flush out all the vectors defined by the given uio, * then reset it so that it can be reused. @@ -324,7 +222,6 @@ _DEFUN(__sbprintf, (rptr, fp, fmt, ap), #endif return (ret); } -#endif /* !STRING_ONLY */ #ifdef FLOATING_POINT @@ -425,8 +322,8 @@ union arg_val }; static union arg_val * -_EXFUN(get_arg, (struct _reent *data, int n, char *fmt, - va_list *ap, int *numargs, union arg_val *args, +_EXFUN(get_arg, (struct _reent *data, int n, char *fmt, + va_list *ap, int *numargs, union arg_val *args, int *arg_type, char **last_fmt)); #endif /* !_NO_POS_ARGS */ @@ -463,8 +360,7 @@ _EXFUN(get_arg, (struct _reent *data, int n, char *fmt, int _EXFUN(_VFPRINTF_R, (struct _reent *, FILE *, _CONST char *, va_list)); -#ifndef STRING_ONLY -int +int _DEFUN(VFPRINTF, (fp, fmt0, ap), FILE * fp _AND _CONST char *fmt0 _AND @@ -474,9 +370,8 @@ _DEFUN(VFPRINTF, (fp, fmt0, ap), result = _VFPRINTF_R (_REENT, fp, fmt0, ap); return result; } -#endif /* STRING_ONLY */ -int +int _DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap), struct _reent *data _AND FILE * fp _AND @@ -622,14 +517,12 @@ _DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap), (u_long)GET_ARG (N, ap, u_int)) #endif -#ifndef STRING_ONLY - /* Initialize std streams if not dealing with sprintf family. */ CHECK_INIT (data, fp); _flockfile (fp); /* sorry, fprintf(read_only_file, "") returns EOF, not 0 */ if (cantwrite (data, fp)) { - _funlockfile (fp); + _funlockfile (fp); return (EOF); } @@ -639,19 +532,6 @@ _DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap), _funlockfile (fp); return (__sbprintf (data, fp, fmt0, ap)); } -#else /* STRING_ONLY */ - /* Create initial buffer if we are called by asprintf family. */ - if (fp->_flags & __SMBF && !fp->_bf._base) - { - fp->_bf._base = fp->_p = _malloc_r (data, 64); - if (!fp->_p) - { - data->_errno = ENOMEM; - return EOF; - } - fp->_bf._size = 64; - } -#endif /* STRING_ONLY */ fmt = (char *)fmt0; uio.uio_iov = iovp = iov; @@ -930,7 +810,7 @@ reswitch: switch (ch) { (wchar_t)GET_ARG (N, ap, wint_t), &ps)) == -1) { fp->_flags |= __SERR; - goto error; + goto error; } } else @@ -1108,7 +988,7 @@ reswitch: switch (ch) { #ifndef _NO_LONGLONG if (flags & QUADINT) *GET_ARG (N, ap, quad_ptr_t) = ret; - else + else #endif if (flags & LONGINT) *GET_ARG (N, ap, long_ptr_t) = ret; @@ -1450,9 +1330,7 @@ done: error: if (malloc_buf != NULL) _free_r (data, malloc_buf); -#ifndef STRING_ONLY _funlockfile (fp); -#endif return (__sferror (fp) ? EOF : ret); /* NOTREACHED */ } @@ -1614,7 +1492,7 @@ exponent(char *p0, int exp, int fmtch) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + The name of Red Hat Incorporated may not be used to endorse or promote products derived from this software without specific prior written permission. @@ -1639,24 +1517,24 @@ typedef enum { DOT, /* '.' */ STAR, /* '*' */ FLAG, /* format flag */ - OTHER, /* all other chars */ + OTHER, /* all other chars */ MAX_CH_CLASS /* place-holder */ } CH_CLASS; -typedef enum { +typedef enum { START, /* start */ SFLAG, /* seen a flag */ WDIG, /* seen digits in width area */ WIDTH, /* processed width */ SMOD, /* seen spec modifier */ - SDOT, /* seen dot */ + SDOT, /* seen dot */ VARW, /* have variable width specifier */ VARP, /* have variable precision specifier */ PREC, /* processed precision */ VWDIG, /* have digits in variable width specification */ VPDIG, /* have digits in variable precision specification */ - DONE, /* done */ - MAX_STATE, /* place-holder */ + DONE, /* done */ + MAX_STATE, /* place-holder */ } STATE; typedef enum { @@ -1681,7 +1559,7 @@ _CONST static CH_CLASS chclass[256] = { /* 30-37 */ ZERO, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, /* 38-3f */ DIGIT, DIGIT, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, /* 40-47 */ OTHER, SPEC, OTHER, SPEC, SPEC, SPEC, SPEC, SPEC, - /* 48-4f */ OTHER, OTHER, OTHER, OTHER, MODFR, OTHER, OTHER, SPEC, + /* 48-4f */ OTHER, OTHER, OTHER, OTHER, MODFR, OTHER, OTHER, SPEC, /* 50-57 */ OTHER, OTHER, OTHER, SPEC, OTHER, SPEC, OTHER, OTHER, /* 58-5f */ SPEC, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, /* 60-67 */ OTHER, SPEC, OTHER, SPEC, SPEC, SPEC, SPEC, SPEC, @@ -1707,7 +1585,7 @@ _CONST static CH_CLASS chclass[256] = { }; _CONST static STATE state_table[MAX_STATE][MAX_CH_CLASS] = { - /* '0' '1-9' '$' MODFR SPEC '.' '*' FLAG OTHER */ + /* '0' '1-9' '$' MODFR SPEC '.' '*' FLAG OTHER */ /* START */ { SFLAG, WDIG, DONE, SMOD, DONE, SDOT, VARW, SFLAG, DONE }, /* SFLAG */ { SFLAG, WDIG, DONE, SMOD, DONE, SDOT, VARW, SFLAG, DONE }, /* WDIG */ { DONE, DONE, WIDTH, SMOD, DONE, SDOT, DONE, DONE, DONE }, @@ -1722,7 +1600,7 @@ _CONST static STATE state_table[MAX_STATE][MAX_CH_CLASS] = { }; _CONST static ACTION action_table[MAX_STATE][MAX_CH_CLASS] = { - /* '0' '1-9' '$' MODFR SPEC '.' '*' FLAG OTHER */ + /* '0' '1-9' '$' MODFR SPEC '.' '*' FLAG OTHER */ /* START */ { NOOP, NUMBER, NOOP, GETMOD, GETARG, NOOP, NOOP, NOOP, NOOP }, /* SFLAG */ { NOOP, NUMBER, NOOP, GETMOD, GETARG, NOOP, NOOP, NOOP, NOOP }, /* WDIG */ { NOOP, NOOP, GETPOS, GETMOD, GETARG, NOOP, NOOP, NOOP, NOOP }, @@ -1778,10 +1656,10 @@ _DEFUN(get_arg, (data, n, fmt, ap, numargs_p, args, arg_type, last_fmt), while (*fmt && n >= numargs) { # ifdef _MB_CAPABLE - while ((nbytes = _mbtowc_r (data, &wc, fmt, MB_CUR_MAX, &wc_state)) > 0) + while ((nbytes = _mbtowc_r (data, &wc, fmt, MB_CUR_MAX, &wc_state)) > 0) { fmt += nbytes; - if (wc == '%') + if (wc == '%') break; } diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c index f56681eaa..68b55f426 100644 --- a/newlib/libc/stdio/vfscanf.c +++ b/newlib/libc/stdio/vfscanf.c @@ -121,35 +121,17 @@ Supporting OS subroutines required: #define VFSCANF vfiscanf #define _VFSCANF_R _vfiscanf_r #define __SVFSCANF __svfiscanf -#ifdef STRING_ONLY -# define __SVFSCANF_R __ssvfiscanf_r -#else -# define __SVFSCANF_R __svfiscanf_r -#endif +#define __SVFSCANF_R __svfiscanf_r #else #define VFSCANF vfscanf #define _VFSCANF_R _vfscanf_r #define __SVFSCANF __svfscanf -#ifdef STRING_ONLY -# define __SVFSCANF_R __ssvfscanf_r -#else -# define __SVFSCANF_R __svfscanf_r -#endif +#define __SVFSCANF_R __svfscanf_r #ifndef NO_FLOATING_POINT #define FLOATING_POINT #endif #endif -#ifdef STRING_ONLY -#undef _flockfile -#undef _funlockfile -#define _flockfile(x) {} -#define _funlockfile(x) {} -#define _ungetc_r _sungetc_r -#define __srefill_r __ssrefill_r -#define _fread_r _sfread_r -#endif - #ifdef FLOATING_POINT #include <math.h> #include <float.h> @@ -252,8 +234,6 @@ typedef unsigned long long u_long_long; #define BufferEmpty (fp->_r <= 0 && __srefill_r(rptr, fp)) -#ifndef STRING_ONLY - #ifndef _REENT_ONLY int @@ -287,135 +267,7 @@ _DEFUN(_VFSCANF_R, (data, fp, fmt, ap), CHECK_INIT(data, fp); return __SVFSCANF_R (data, fp, fmt, ap); } -#endif /* !STRING_ONLY */ - -#ifdef STRING_ONLY -/* When dealing with the sscanf family, we don't want to use the - * regular ungetc which will drag in file I/O items we don't need. - * So, we create our own trimmed-down version. */ -static int -_DEFUN(_sungetc_r, (data, fp, ch), - struct _reent *data _AND - int c _AND - register FILE *fp) -{ - if (c == EOF) - return (EOF); - /* After ungetc, we won't be at eof anymore */ - fp->_flags &= ~__SEOF; - c = (unsigned char) c; - - /* - * If we are in the middle of ungetc'ing, just continue. - * This may require expanding the current ungetc buffer. - */ - - if (HASUB (fp)) - { - if (fp->_r >= fp->_ub._size && __submore (data, fp)) - { - return EOF; - } - *--fp->_p = c; - fp->_r++; - return c; - } - - /* - * If we can handle this by simply backing up, do so, - * but never replace the original character. - * (This makes sscanf() work when scanning `const' data.) - */ - - if (fp->_bf._base != NULL && fp->_p > fp->_bf._base && fp->_p[-1] == c) - { - fp->_p--; - fp->_r++; - return c; - } - - /* - * Create an ungetc buffer. - * Initially, we will use the `reserve' buffer. - */ - - fp->_ur = fp->_r; - fp->_up = fp->_p; - fp->_ub._base = fp->_ubuf; - fp->_ub._size = sizeof (fp->_ubuf); - fp->_ubuf[sizeof (fp->_ubuf) - 1] = c; - fp->_p = &fp->_ubuf[sizeof (fp->_ubuf) - 1]; - fp->_r = 1; - return c; -} - -/* String only version of __srefill_r for sscanf family. */ -static int -_DEFUN(__ssrefill_r, (ptr, fp), - struct _reent * ptr _AND - register FILE * fp) -{ - /* - * Our only hope of further input is the ungetc buffer. - * If there is anything in that buffer to read, return. - */ - if (HASUB (fp)) - { - FREEUB (ptr, fp); - if ((fp->_r = fp->_ur) != 0) - { - fp->_p = fp->_up; - return 0; - } - } - - /* Otherwise we are out of character input. */ - fp->_p = fp->_bf._base; - fp->_r = 0; - fp->_flags &= ~__SMOD; /* buffer contents are again pristine */ - fp->_flags |= __SEOF; - return EOF; -} - -static size_t -_DEFUN(_sfread_r, (ptr, buf, size, count, fp), - struct _reent * ptr _AND - _PTR buf _AND - size_t size _AND - size_t count _AND - FILE * fp) -{ - register size_t resid; - register char *p; - register int r; - size_t total; - - if ((resid = count * size) == 0) - return 0; - - total = resid; - p = buf; - - while (resid > (r = fp->_r)) - { - _CAST_VOID memcpy ((_PTR) p, (_PTR) fp->_p, (size_t) r); - fp->_p += r; - fp->_r = 0; - p += r; - resid -= r; - if (__ssrefill_r (ptr, fp)) - { - /* no more input: return partial result */ - return (total - resid) / size; - } - } - _CAST_VOID memcpy ((_PTR) p, (_PTR) fp->_p, resid); - fp->_r -= resid; - fp->_p += resid; - return count; -} -#endif /* STRING_ONLY */ int _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap), @@ -889,7 +741,7 @@ _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap), } else { - size_t r = _fread_r (rptr, (_PTR) GET_ARG (N, ap, char *), 1, width, fp); + size_t r = fread ((_PTR) GET_ARG (N, ap, char *), 1, width, fp); if (r == 0) goto input_failure; diff --git a/newlib/libc/stdio/vsiprintf.c b/newlib/libc/stdio/vsiprintf.c index 05d009d72..967c178e4 100644 --- a/newlib/libc/stdio/vsiprintf.c +++ b/newlib/libc/stdio/vsiprintf.c @@ -53,7 +53,7 @@ _DEFUN(_vsiprintf_r, (ptr, str, fmt, ap), f._bf._base = f._p = (unsigned char *) str; f._bf._size = f._w = INT_MAX; f._file = -1; /* No file. */ - ret = _svfiprintf_r (ptr, &f, fmt, ap); + ret = _vfiprintf_r (ptr, &f, fmt, ap); *f._p = 0; return ret; } diff --git a/newlib/libc/stdio/vsiscanf.c b/newlib/libc/stdio/vsiscanf.c index c26171acf..ffbf22e97 100644 --- a/newlib/libc/stdio/vsiscanf.c +++ b/newlib/libc/stdio/vsiscanf.c @@ -71,5 +71,5 @@ _DEFUN(_vsiscanf_r, (ptr, str, fmt, ap), f._ub._base = NULL; f._lb._base = NULL; f._file = -1; /* No file. */ - return __ssvfiscanf_r (ptr, &f, fmt, ap); + return __svfiscanf_r (ptr, &f, fmt, ap); } diff --git a/newlib/libc/stdio/vsniprintf.c b/newlib/libc/stdio/vsniprintf.c index f7c60e280..d1c318576 100644 --- a/newlib/libc/stdio/vsniprintf.c +++ b/newlib/libc/stdio/vsniprintf.c @@ -61,7 +61,7 @@ _DEFUN(_vsniprintf_r, (ptr, str, size, fmt, ap), f._bf._base = f._p = (unsigned char *) str; f._bf._size = f._w = (size > 0 ? size - 1 : 0); f._file = -1; /* No file. */ - ret = _svfiprintf_r (ptr, &f, fmt, ap); + ret = _vfiprintf_r (ptr, &f, fmt, ap); if (ret < EOF) ptr->_errno = EOVERFLOW; if (size > 0) diff --git a/newlib/libc/stdio/vsnprintf.c b/newlib/libc/stdio/vsnprintf.c index 641047dd3..6a26f8bea 100644 --- a/newlib/libc/stdio/vsnprintf.c +++ b/newlib/libc/stdio/vsnprintf.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1990 The Regents of the University of California. + * Copyright (c) 1990, 2007 The Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms are permitted @@ -61,7 +61,7 @@ _DEFUN(_vsnprintf_r, (ptr, str, size, fmt, ap), f._bf._base = f._p = (unsigned char *) str; f._bf._size = f._w = (size > 0 ? size - 1 : 0); f._file = -1; /* No file. */ - ret = _svfprintf_r (ptr, &f, fmt, ap); + ret = _vfprintf_r (ptr, &f, fmt, ap); if (ret < EOF) ptr->_errno = EOVERFLOW; if (size > 0) diff --git a/newlib/libc/stdio/vsprintf.c b/newlib/libc/stdio/vsprintf.c index fd052cd95..5c2600411 100644 --- a/newlib/libc/stdio/vsprintf.c +++ b/newlib/libc/stdio/vsprintf.c @@ -53,7 +53,7 @@ _DEFUN(_vsprintf_r, (ptr, str, fmt, ap), f._bf._base = f._p = (unsigned char *) str; f._bf._size = f._w = INT_MAX; f._file = -1; /* No file. */ - ret = _svfprintf_r (ptr, &f, fmt, ap); + ret = _vfprintf_r (ptr, &f, fmt, ap); *f._p = 0; return ret; } diff --git a/newlib/libc/stdio/vsscanf.c b/newlib/libc/stdio/vsscanf.c index 566823add..9bb7c0c3e 100644 --- a/newlib/libc/stdio/vsscanf.c +++ b/newlib/libc/stdio/vsscanf.c @@ -71,5 +71,5 @@ _DEFUN(_vsscanf_r, (ptr, str, fmt, ap), f._ub._base = NULL; f._lb._base = NULL; f._file = -1; /* No file. */ - return __ssvfscanf_r (ptr, &f, fmt, ap); + return __svfscanf_r (ptr, &f, fmt, ap); } |