diff options
author | cvs2svn <> | 2011-12-08 20:47:28 +0000 |
---|---|---|
committer | cvs2svn <> | 2011-12-08 20:47:28 +0000 |
commit | ad0835bc5e9652f42535584b12137a955ac68789 (patch) | |
tree | 20d4d2b91d701fdad9d1d4ab3c5ff3ce796070fd /newlib/libc/stdio | |
parent | 9b80fa0f92a03b317bca0c6f721627c9885791ae (diff) | |
download | cygnal-ad0835bc5e9652f42535584b12137a955ac68789.tar.gz cygnal-ad0835bc5e9652f42535584b12137a955ac68789.tar.bz2 cygnal-ad0835bc5e9652f42535584b12137a955ac68789.zip |
This commit was manufactured by cvs2svn to create branch 'gdb_7_4-branch'.gdb_7_4-2011-12-13-branchpoint
Sprout from master 2011-12-08 20:47:27 UTC Andrew Pinski <apinski@cavium.com> 'bfd:'
Cherrypick from cygnus 1999-05-03 07:29:06 UTC Richard Henderson <rth@redhat.com> '19990502 sourceware import':
README
config/mt-d30v
config/mt-ospace
etc/add-log.el
etc/add-log.vi
etc/configbuild.ein
etc/configbuild.fig
etc/configbuild.jin
etc/configbuild.tin
etc/configdev.ein
etc/configdev.fig
etc/configdev.jin
etc/configdev.tin
include/aout/hppa.h
include/coff/sym.h
include/fopen-bin.h
include/fopen-same.h
include/opcode/tahoe.h
makefile.vms
Delete:
libgloss/ChangeLog
libgloss/Makefile.in
libgloss/README
libgloss/acinclude.m4
libgloss/aclocal.m4
libgloss/arm/Makefile.in
libgloss/arm/_exit.c
libgloss/arm/_kill.c
libgloss/arm/aclocal.m4
libgloss/arm/arm.h
libgloss/arm/coff-iq80310.specs
libgloss/arm/coff-pid.specs
libgloss/arm/coff-rdimon.specs
libgloss/arm/coff-rdpmon.specs
libgloss/arm/coff-redboot.ld
libgloss/arm/coff-redboot.specs
libgloss/arm/configure
libgloss/arm/configure.in
libgloss/arm/crt0.S
libgloss/arm/elf-iq80310.specs
libgloss/arm/elf-linux.specs
libgloss/arm/elf-pid.specs
libgloss/arm/elf-rdimon.specs
libgloss/arm/elf-rdpmon.specs
libgloss/arm/elf-redboot.ld
libgloss/arm/elf-redboot.specs
libgloss/arm/libcfunc.c
libgloss/arm/linux-crt0.c
libgloss/arm/linux-syscall.h
libgloss/arm/linux-syscalls0.S
libgloss/arm/linux-syscalls1.c
libgloss/arm/redboot-crt0.S
libgloss/arm/redboot-syscalls.c
libgloss/arm/swi.h
libgloss/arm/syscall.h
libgloss/arm/syscalls.c
libgloss/arm/trap.S
libgloss/bfin/Makefile.in
libgloss/bfin/aclocal.m4
libgloss/bfin/basiccrt.S
libgloss/bfin/bf504.ld
libgloss/bfin/bf506.ld
libgloss/bfin/bf512.ld
libgloss/bfin/bf514.ld
libgloss/bfin/bf516.ld
libgloss/bfin/bf518.ld
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/bf592.ld
libgloss/bfin/bfin-common-mc.ld
libgloss/bfin/bfin-common-sc.ld
libgloss/bfin/configure
libgloss/bfin/configure.in
libgloss/bfin/crt0.S
libgloss/bfin/include/blackfin.h
libgloss/bfin/include/builtins.h
libgloss/bfin/include/ccblkfn.h
libgloss/bfin/include/cdefBF504.h
libgloss/bfin/include/cdefBF504F.h
libgloss/bfin/include/cdefBF506F.h
libgloss/bfin/include/cdefBF50x_base.h
libgloss/bfin/include/cdefBF512.h
libgloss/bfin/include/cdefBF514.h
libgloss/bfin/include/cdefBF516.h
libgloss/bfin/include/cdefBF518.h
libgloss/bfin/include/cdefBF51x_base.h
libgloss/bfin/include/cdefBF522.h
libgloss/bfin/include/cdefBF523.h
libgloss/bfin/include/cdefBF524.h
libgloss/bfin/include/cdefBF525.h
libgloss/bfin/include/cdefBF526.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/cdefBF542.h
libgloss/bfin/include/cdefBF542M.h
libgloss/bfin/include/cdefBF544.h
libgloss/bfin/include/cdefBF544M.h
libgloss/bfin/include/cdefBF547.h
libgloss/bfin/include/cdefBF547M.h
libgloss/bfin/include/cdefBF548.h
libgloss/bfin/include/cdefBF548M.h
libgloss/bfin/include/cdefBF549.h
libgloss/bfin/include/cdefBF549M.h
libgloss/bfin/include/cdefBF54x_base.h
libgloss/bfin/include/cdefBF561.h
libgloss/bfin/include/cdefBF592-A.h
libgloss/bfin/include/cdefBF59x_base.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/defBF504.h
libgloss/bfin/include/defBF504F.h
libgloss/bfin/include/defBF506F.h
libgloss/bfin/include/defBF50x_base.h
libgloss/bfin/include/defBF512.h
libgloss/bfin/include/defBF514.h
libgloss/bfin/include/defBF516.h
libgloss/bfin/include/defBF518.h
libgloss/bfin/include/defBF51x_base.h
libgloss/bfin/include/defBF522.h
libgloss/bfin/include/defBF523.h
libgloss/bfin/include/defBF524.h
libgloss/bfin/include/defBF525.h
libgloss/bfin/include/defBF526.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/defBF542.h
libgloss/bfin/include/defBF542M.h
libgloss/bfin/include/defBF544.h
libgloss/bfin/include/defBF544M.h
libgloss/bfin/include/defBF547.h
libgloss/bfin/include/defBF547M.h
libgloss/bfin/include/defBF548.h
libgloss/bfin/include/defBF548M.h
libgloss/bfin/include/defBF549.h
libgloss/bfin/include/defBF549M.h
libgloss/bfin/include/defBF54x_base.h
libgloss/bfin/include/defBF561.h
libgloss/bfin/include/defBF592-A.h
libgloss/bfin/include/defBF59x_base.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/bfin/syscalls.c
libgloss/close.c
libgloss/config/default.mh
libgloss/config/default.mt
libgloss/config/dos.mh
libgloss/config/mips.mt
libgloss/config/mn10200.mt
libgloss/config/mn10300.mt
libgloss/config/ppc.mh
libgloss/config/xc16x.mt
libgloss/configure
libgloss/configure.in
libgloss/cr16/Makefile.in
libgloss/cr16/_exit.c
libgloss/cr16/_getenv.c
libgloss/cr16/_rename.c
libgloss/cr16/aclocal.m4
libgloss/cr16/close.c
libgloss/cr16/configure
libgloss/cr16/configure.in
libgloss/cr16/crt1.S
libgloss/cr16/crti.S
libgloss/cr16/crtn.S
libgloss/cr16/dvz_hndl.c
libgloss/cr16/flg_hndl.c
libgloss/cr16/fstat.c
libgloss/cr16/getpid.c
libgloss/cr16/iad_hndl.c
libgloss/cr16/intable.c
libgloss/cr16/isatty.c
libgloss/cr16/kill.c
libgloss/cr16/lseek.c
libgloss/cr16/open.c
libgloss/cr16/putnum.c
libgloss/cr16/read.c
libgloss/cr16/sbrk.c
libgloss/cr16/sim.ld
libgloss/cr16/stat.c
libgloss/cr16/svc_hndl.c
libgloss/cr16/time.c
libgloss/cr16/und_hndl.c
libgloss/cr16/unlink.c
libgloss/cr16/write.c
libgloss/cris/Makefile.in
libgloss/cris/aclocal.m4
libgloss/cris/configure
libgloss/cris/configure.in
libgloss/cris/crt0.S
libgloss/cris/crti.c
libgloss/cris/crtn.c
libgloss/cris/gensyscalls
libgloss/cris/irqtable.S
libgloss/cris/lcrt0.c
libgloss/cris/linunistd.h
libgloss/cris/outbyte.c
libgloss/cris/setup.S
libgloss/crx/Makefile.in
libgloss/crx/_exit.c
libgloss/crx/_getenv.c
libgloss/crx/_rename.c
libgloss/crx/aclocal.m4
libgloss/crx/close.c
libgloss/crx/configure
libgloss/crx/configure.in
libgloss/crx/crt0.S
libgloss/crx/crti.S
libgloss/crx/crtn.S
libgloss/crx/dvz_hndl.c
libgloss/crx/flg_hndl.c
libgloss/crx/fstat.c
libgloss/crx/getpid.c
libgloss/crx/iad_hndl.c
libgloss/crx/intable.c
libgloss/crx/isatty.c
libgloss/crx/kill.c
libgloss/crx/lseek.c
libgloss/crx/open.c
libgloss/crx/putnum.c
libgloss/crx/read.c
libgloss/crx/sbrk.c
libgloss/crx/sim.ld
libgloss/crx/stat.c
libgloss/crx/svc_hndl.c
libgloss/crx/time.c
libgloss/crx/und_hndl.c
libgloss/crx/unlink.c
libgloss/crx/write.c
libgloss/d30v/Makefile.in
libgloss/d30v/aclocal.m4
libgloss/d30v/configure
libgloss/d30v/configure.in
libgloss/d30v/crt0.S
libgloss/d30v/inbyte.c
libgloss/d30v/outbyte.c
libgloss/d30v/syscalls.c
libgloss/debug.c
libgloss/debug.h
libgloss/doc/Makefile.in
libgloss/doc/configure
libgloss/doc/configure.in
libgloss/doc/porting.texi
libgloss/fr30/Makefile.in
libgloss/fr30/aclocal.m4
libgloss/fr30/configure
libgloss/fr30/configure.in
libgloss/fr30/crt0.s
libgloss/fr30/syscalls.c
libgloss/frv/Makefile.in
libgloss/frv/aclocal.m4
libgloss/frv/configure
libgloss/frv/configure.in
libgloss/frv/crt0.S
libgloss/frv/fstat.c
libgloss/frv/getpid.c
libgloss/frv/isatty.c
libgloss/frv/kill.c
libgloss/frv/print.c
libgloss/frv/putnum.c
libgloss/frv/sbrk.c
libgloss/frv/sim-close.S
libgloss/frv/sim-exit.S
libgloss/frv/sim-inbyte.c
libgloss/frv/sim-lseek.S
libgloss/frv/sim-open.S
libgloss/frv/sim-read.S
libgloss/frv/sim-time.c
libgloss/frv/sim-unlink.S
libgloss/frv/sim-write.S
libgloss/frv/stat.c
libgloss/fstat.c
libgloss/getpid.c
libgloss/glue.h
libgloss/hp74x/Makefile.in
libgloss/hp74x/README
libgloss/hp74x/aclocal.m4
libgloss/hp74x/checksum.c
libgloss/hp74x/configure
libgloss/hp74x/configure.in
libgloss/hp74x/crt0.s
libgloss/hp74x/debugger.h
libgloss/hp74x/debugger.s
libgloss/hp74x/diagnose.h
libgloss/hp74x/hppa-defs.h
libgloss/hp74x/hppa.ld
libgloss/hp74x/io.c
libgloss/hp74x/iva_table.h
libgloss/hp74x/iva_table.s
libgloss/hp74x/pa_stub.c
libgloss/hp74x/test.c
libgloss/i386/Makefile.in
libgloss/i386/aclocal.m4
libgloss/i386/configure
libgloss/i386/configure.in
libgloss/i386/cygmon-crt0.S
libgloss/i386/cygmon-gmon.c
libgloss/i386/cygmon-gmon.h
libgloss/i386/cygmon-salib.c
libgloss/i386/cygmon-syscall.h
libgloss/i386/cygmon.ld
libgloss/i960/Makefile.in
libgloss/i960/aclocal.m4
libgloss/i960/asm.h
libgloss/i960/configure
libgloss/i960/configure.in
libgloss/i960/crt0.c
libgloss/i960/mon-read.c
libgloss/i960/mon-syscalls.S
libgloss/i960/mon-write.c
libgloss/i960/mon960.c
libgloss/i960/mon960.ld
libgloss/i960/syscall.h
libgloss/iq2000/Makefile.in
libgloss/iq2000/_exit.c
libgloss/iq2000/access.c
libgloss/iq2000/aclocal.m4
libgloss/iq2000/chmod.c
libgloss/iq2000/chown.c
libgloss/iq2000/close.c
libgloss/iq2000/configure
libgloss/iq2000/configure.in
libgloss/iq2000/creat.c
libgloss/iq2000/crt0.S
libgloss/iq2000/crt1.c
libgloss/iq2000/execv.c
libgloss/iq2000/execve.c
libgloss/iq2000/fork.c
libgloss/iq2000/fstat.c
libgloss/iq2000/getpid.c
libgloss/iq2000/gettime.c
libgloss/iq2000/isatty.c
libgloss/iq2000/kill.c
libgloss/iq2000/lseek.c
libgloss/iq2000/open.c
libgloss/iq2000/pipe.c
libgloss/iq2000/read.c
libgloss/iq2000/sbrk.c
libgloss/iq2000/sim.ld
libgloss/iq2000/stat.c
libgloss/iq2000/test.c
libgloss/iq2000/time.c
libgloss/iq2000/times.c
libgloss/iq2000/trap.c
libgloss/iq2000/trap.h
libgloss/iq2000/unlink.c
libgloss/iq2000/utime.c
libgloss/iq2000/wait.c
libgloss/iq2000/write.c
libgloss/isatty.c
libgloss/kill.c
libgloss/libnosys/Makefile.in
libgloss/libnosys/_exit.c
libgloss/libnosys/acconfig.h
libgloss/libnosys/aclocal.m4
libgloss/libnosys/chown.c
libgloss/libnosys/close.c
libgloss/libnosys/config.h.in
libgloss/libnosys/configure
libgloss/libnosys/configure.in
libgloss/libnosys/environ.c
libgloss/libnosys/errno.c
libgloss/libnosys/execve.c
libgloss/libnosys/fork.c
libgloss/libnosys/fstat.c
libgloss/libnosys/getpid.c
libgloss/libnosys/gettod.c
libgloss/libnosys/isatty.c
libgloss/libnosys/kill.c
libgloss/libnosys/link.c
libgloss/libnosys/lseek.c
libgloss/libnosys/open.c
libgloss/libnosys/read.c
libgloss/libnosys/readlink.c
libgloss/libnosys/sbrk.c
libgloss/libnosys/stat.c
libgloss/libnosys/symlink.c
libgloss/libnosys/times.c
libgloss/libnosys/unlink.c
libgloss/libnosys/wait.c
libgloss/libnosys/warning.h
libgloss/libnosys/write.c
libgloss/lm32/Makefile.in
libgloss/lm32/aclocal.m4
libgloss/lm32/configure
libgloss/lm32/configure.in
libgloss/lm32/crt0.S
libgloss/lm32/isatty.c
libgloss/lm32/scall.S
libgloss/lm32/sim.ld
libgloss/lseek.c
libgloss/m32c/Makefile.in
libgloss/m32c/abort.S
libgloss/m32c/aclocal.m4
libgloss/m32c/argv.S
libgloss/m32c/argvlen.S
libgloss/m32c/chdir.S
libgloss/m32c/chmod.S
libgloss/m32c/close.S
libgloss/m32c/configure
libgloss/m32c/configure.in
libgloss/m32c/crt0.S
libgloss/m32c/crtn.S
libgloss/m32c/exit.S
libgloss/m32c/fstat.S
libgloss/m32c/genscript
libgloss/m32c/getpid.S
libgloss/m32c/gettimeofday.S
libgloss/m32c/heaptop.S
libgloss/m32c/isatty.S
libgloss/m32c/kill.S
libgloss/m32c/link.S
libgloss/m32c/lseek.S
libgloss/m32c/m32c.tmpl
libgloss/m32c/m32csys.h
libgloss/m32c/open.S
libgloss/m32c/read.S
libgloss/m32c/sample.c
libgloss/m32c/sbrk.c
libgloss/m32c/stat.S
libgloss/m32c/time.S
libgloss/m32c/times.S
libgloss/m32c/unlink.S
libgloss/m32c/utime.S
libgloss/m32c/varvects.S
libgloss/m32c/varvects.h
libgloss/m32c/write.S
libgloss/m32r/Makefile.in
libgloss/m32r/aclocal.m4
libgloss/m32r/chmod.c
libgloss/m32r/close.c
libgloss/m32r/configure
libgloss/m32r/configure.in
libgloss/m32r/crt0.S
libgloss/m32r/eit.h
libgloss/m32r/eva-stub.ld
libgloss/m32r/eva.ld
libgloss/m32r/exit.c
libgloss/m32r/fstat.c
libgloss/m32r/getpid.c
libgloss/m32r/isatty.c
libgloss/m32r/kill.c
libgloss/m32r/lseek.c
libgloss/m32r/m32r-lib.c
libgloss/m32r/m32r-stub.c
libgloss/m32r/mon.specs
libgloss/m32r/open.c
libgloss/m32r/raise.c
libgloss/m32r/read.c
libgloss/m32r/sbrk.c
libgloss/m32r/stat.c
libgloss/m32r/trap0.S
libgloss/m32r/trapmon0.c
libgloss/m32r/unlink.c
libgloss/m32r/utime.c
libgloss/m32r/write.c
libgloss/m68hc11/Makefile.in
libgloss/m68hc11/aclocal.m4
libgloss/m68hc11/configure
libgloss/m68hc11/configure.in
libgloss/m68hc11/crt0.S
libgloss/m68hc11/sci-inout.S
libgloss/m68hc11/sim-valid-m68hc11.ld
libgloss/m68hc11/sim-valid-m68hc12.ld
libgloss/m68hc11/syscalls.c
libgloss/m68k/Makefile.in
libgloss/m68k/README
libgloss/m68k/aclocal.m4
libgloss/m68k/asm.h
libgloss/m68k/bcc.ld
libgloss/m68k/cf-crt0.S
libgloss/m68k/cf-crt1.c
libgloss/m68k/cf-exit.c
libgloss/m68k/cf-hosted.S
libgloss/m68k/cf-isrs.c
libgloss/m68k/cf-isv.S
libgloss/m68k/cf-sbrk.c
libgloss/m68k/cf.sc
libgloss/m68k/configure
libgloss/m68k/configure.in
libgloss/m68k/cpu32bug.S
libgloss/m68k/cpu32bug.h
libgloss/m68k/crt0.S
libgloss/m68k/dtor.C
libgloss/m68k/fido-_exit.c
libgloss/m68k/fido-crt0.S
libgloss/m68k/fido-handler.c
libgloss/m68k/fido-hosted.S
libgloss/m68k/fido-sbrk.c
libgloss/m68k/fido.h
libgloss/m68k/fido.sc
libgloss/m68k/fido_profiling.h
libgloss/m68k/idp-inbyte.c
libgloss/m68k/idp-outbyte.c
libgloss/m68k/idp.ld
libgloss/m68k/idpgdb.ld
libgloss/m68k/io-close.c
libgloss/m68k/io-exit.c
libgloss/m68k/io-fstat.c
libgloss/m68k/io-gdb.c
libgloss/m68k/io-gettimeofday.c
libgloss/m68k/io-isatty.c
libgloss/m68k/io-lseek.c
libgloss/m68k/io-open.c
libgloss/m68k/io-read.c
libgloss/m68k/io-rename.c
libgloss/m68k/io-stat.c
libgloss/m68k/io-system.c
libgloss/m68k/io-time.c
libgloss/m68k/io-unlink.c
libgloss/m68k/io-write.c
libgloss/m68k/io.h
libgloss/m68k/leds.c
libgloss/m68k/leds.h
libgloss/m68k/mc68681reg.h
libgloss/m68k/mc68ec.c
libgloss/m68k/mvme-stub.c
libgloss/m68k/mvme.S
libgloss/m68k/mvme135-asm.S
libgloss/m68k/mvme135.ld
libgloss/m68k/mvme162.ld
libgloss/m68k/mvme162lx-asm.S
libgloss/m68k/sbc5204.ld
libgloss/m68k/sbc5206.ld
libgloss/m68k/sim-abort.c
libgloss/m68k/sim-crt0.S
libgloss/m68k/sim-errno.c
libgloss/m68k/sim-funcs.c
libgloss/m68k/sim-inbyte.c
libgloss/m68k/sim-print.c
libgloss/m68k/sim-sbrk.c
libgloss/m68k/sim.ld
libgloss/m68k/simulator.S
libgloss/m68k/test.c
libgloss/mcore/Makefile.in
libgloss/mcore/aclocal.m4
libgloss/mcore/close.c
libgloss/mcore/cmb-exit.c
libgloss/mcore/cmb-inbyte.c
libgloss/mcore/cmb-outbyte.c
libgloss/mcore/configure
libgloss/mcore/configure.in
libgloss/mcore/crt0.S
libgloss/mcore/elf-cmb.ld
libgloss/mcore/elf-cmb.specs
libgloss/mcore/fstat.c
libgloss/mcore/getpid.c
libgloss/mcore/kill.c
libgloss/mcore/lseek.c
libgloss/mcore/open.c
libgloss/mcore/pe-cmb.ld
libgloss/mcore/pe-cmb.specs
libgloss/mcore/print.c
libgloss/mcore/putnum.c
libgloss/mcore/raise.c
libgloss/mcore/read.c
libgloss/mcore/sbrk.c
libgloss/mcore/stat.c
libgloss/mcore/syscalls.S
libgloss/mcore/unlink.c
libgloss/mcore/write.c
libgloss/mep/Makefile.in
libgloss/mep/aclocal.m4
libgloss/mep/configure
libgloss/mep/configure.in
libgloss/mep/crt0.S
libgloss/mep/crtn.S
libgloss/mep/default.ld
libgloss/mep/fmax.ld
libgloss/mep/gcov-io.h
libgloss/mep/gmap_default.ld
libgloss/mep/h_reset.c
libgloss/mep/handlers.c
libgloss/mep/isatty.c
libgloss/mep/mep-bb.c
libgloss/mep/mep-gmon.c
libgloss/mep/min.ld
libgloss/mep/read.c
libgloss/mep/sbrk.c
libgloss/mep/sdram-crt0.S
libgloss/mep/sim-crt0.S
libgloss/mep/sim-crtn.S
libgloss/mep/simnovec-crt0.S
libgloss/mep/simple.ld
libgloss/mep/simsdram-crt0.S
libgloss/mep/syscalls.S
libgloss/mep/write.c
libgloss/microblaze/Makefile.in
libgloss/microblaze/_exception_handler.S
libgloss/microblaze/_hw_exception_handler.S
libgloss/microblaze/_interrupt_handler.S
libgloss/microblaze/_program_clean.S
libgloss/microblaze/_program_init.S
libgloss/microblaze/configure
libgloss/microblaze/configure.in
libgloss/microblaze/crt0.S
libgloss/microblaze/crt1.S
libgloss/microblaze/crt2.S
libgloss/microblaze/crt3.S
libgloss/microblaze/crt4.S
libgloss/microblaze/crtinit.S
libgloss/microblaze/pgcrtinit.S
libgloss/microblaze/sbrk.c
libgloss/microblaze/sim-crtinit.S
libgloss/microblaze/sim-pgcrtinit.S
libgloss/microblaze/timer.c
libgloss/microblaze/xil_malloc.c
libgloss/microblaze/xil_sbrk.c
libgloss/microblaze/xilinx.ld
libgloss/mips/Makefile.in
libgloss/mips/aclocal.m4
libgloss/mips/array-io.c
libgloss/mips/array.ld
libgloss/mips/cfe.c
libgloss/mips/cfe.ld
libgloss/mips/cfe_api.c
libgloss/mips/cfe_api.h
libgloss/mips/cfe_api_int.h
libgloss/mips/cfe_error.h
libgloss/mips/cfe_mem.c
libgloss/mips/cma101.c
libgloss/mips/configure
libgloss/mips/configure.in
libgloss/mips/crt0.S
libgloss/mips/crt0_cfe.S
libgloss/mips/crt0_cygmon.S
libgloss/mips/cygmon.c
libgloss/mips/ddb-kseg0.ld
libgloss/mips/ddb.ld
libgloss/mips/dtor.C
libgloss/mips/dve.ld
libgloss/mips/dvemon.c
libgloss/mips/entry.S
libgloss/mips/idt.ld
libgloss/mips/idt32.ld
libgloss/mips/idt64.ld
libgloss/mips/idtecoff.ld
libgloss/mips/idtmon.S
libgloss/mips/jmr3904-io.c
libgloss/mips/jmr3904app-java.ld
libgloss/mips/jmr3904app.ld
libgloss/mips/jmr3904dram-java.ld
libgloss/mips/jmr3904dram.ld
libgloss/mips/lsi.ld
libgloss/mips/lsipmon.S
libgloss/mips/nullmon.c
libgloss/mips/nullmon.ld
libgloss/mips/pmon.S
libgloss/mips/pmon.ld
libgloss/mips/regs.S
libgloss/mips/syscalls.c
libgloss/mips/test.c
libgloss/mips/vr4300.S
libgloss/mips/vr5xxx.S
libgloss/mn10200/Makefile.in
libgloss/mn10200/_exit.c
libgloss/mn10200/access.c
libgloss/mn10200/aclocal.m4
libgloss/mn10200/chmod.c
libgloss/mn10200/chown.c
libgloss/mn10200/close.c
libgloss/mn10200/configure
libgloss/mn10200/configure.in
libgloss/mn10200/creat.c
libgloss/mn10200/crt0.S
libgloss/mn10200/crt1.c
libgloss/mn10200/eval.ld
libgloss/mn10200/execv.c
libgloss/mn10200/execve.c
libgloss/mn10200/fork.c
libgloss/mn10200/fstat.c
libgloss/mn10200/getpid.c
libgloss/mn10200/gettime.c
libgloss/mn10200/isatty.c
libgloss/mn10200/kill.c
libgloss/mn10200/lseek.c
libgloss/mn10200/open.c
libgloss/mn10200/pipe.c
libgloss/mn10200/read.c
libgloss/mn10200/sbrk.c
libgloss/mn10200/sim.ld
libgloss/mn10200/stat.c
libgloss/mn10200/test.c
libgloss/mn10200/time.c
libgloss/mn10200/times.c
libgloss/mn10200/trap.S
libgloss/mn10200/trap.h
libgloss/mn10200/unlink.c
libgloss/mn10200/utime.c
libgloss/mn10200/wait.c
libgloss/mn10200/write.c
libgloss/mn10300/Makefile.in
libgloss/mn10300/_exit.c
libgloss/mn10300/access.c
libgloss/mn10300/aclocal.m4
libgloss/mn10300/asb2303.ld
libgloss/mn10300/asb2305.ld
libgloss/mn10300/chmod.c
libgloss/mn10300/chown.c
libgloss/mn10300/close.c
libgloss/mn10300/configure
libgloss/mn10300/configure.in
libgloss/mn10300/creat.c
libgloss/mn10300/crt0-eval.S
libgloss/mn10300/crt0.S
libgloss/mn10300/crt0_cygmon.S
libgloss/mn10300/crt0_redboot.S
libgloss/mn10300/crt1.c
libgloss/mn10300/cygmon.c
libgloss/mn10300/eval.ld
libgloss/mn10300/execv.c
libgloss/mn10300/execve.c
libgloss/mn10300/fork.c
libgloss/mn10300/fstat.c
libgloss/mn10300/getpid.c
libgloss/mn10300/gettime.c
libgloss/mn10300/isatty.c
libgloss/mn10300/kill.c
libgloss/mn10300/lseek.c
libgloss/mn10300/open.c
libgloss/mn10300/pipe.c
libgloss/mn10300/read.c
libgloss/mn10300/sbrk.c
libgloss/mn10300/sim.ld
libgloss/mn10300/stat.c
libgloss/mn10300/test.c
libgloss/mn10300/time.c
libgloss/mn10300/times.c
libgloss/mn10300/trap.S
libgloss/mn10300/trap.h
libgloss/mn10300/unlink.c
libgloss/mn10300/utime.c
libgloss/mn10300/wait.c
libgloss/mn10300/write.c
libgloss/moxie/Makefile.in
libgloss/moxie/aclocal.m4
libgloss/moxie/configure
libgloss/moxie/configure.in
libgloss/moxie/crt0.S
libgloss/moxie/fstat.c
libgloss/moxie/getpid.c
libgloss/moxie/isatty.c
libgloss/moxie/kill.c
libgloss/moxie/moxie-elf-common.ld
libgloss/moxie/print.c
libgloss/moxie/putnum.c
libgloss/moxie/qemu-time.c
libgloss/moxie/qemu-write.c
libgloss/moxie/qemu.ld
libgloss/moxie/sbrk.c
libgloss/moxie/sim-close.S
libgloss/moxie/sim-exit.S
libgloss/moxie/sim-inbyte.c
libgloss/moxie/sim-lseek.S
libgloss/moxie/sim-lseek.c
libgloss/moxie/sim-open.S
libgloss/moxie/sim-read.S
libgloss/moxie/sim-time.c
libgloss/moxie/sim-unlink.S
libgloss/moxie/sim-write.S
libgloss/moxie/sim.ld
libgloss/moxie/stat.c
libgloss/mt/16-002.ld
libgloss/mt/16-003.ld
libgloss/mt/64-001.ld
libgloss/mt/Makefile.in
libgloss/mt/access.c
libgloss/mt/aclocal.m4
libgloss/mt/chmod.c
libgloss/mt/close.c
libgloss/mt/configure
libgloss/mt/configure.in
libgloss/mt/crt0-16-002.S
libgloss/mt/crt0-16-003.S
libgloss/mt/crt0-64-001.S
libgloss/mt/crt0-ms2.S
libgloss/mt/crt0.S
libgloss/mt/exit-16-002.c
libgloss/mt/exit-16-003.c
libgloss/mt/exit-64-001.c
libgloss/mt/exit-ms2.c
libgloss/mt/exit.c
libgloss/mt/fstat.c
libgloss/mt/getpid.c
libgloss/mt/gettime.c
libgloss/mt/isatty.c
libgloss/mt/kill.c
libgloss/mt/lseek.c
libgloss/mt/ms2.ld
libgloss/mt/open.c
libgloss/mt/read.c
libgloss/mt/sbrk.c
libgloss/mt/startup-16-002.S
libgloss/mt/startup-16-003.S
libgloss/mt/startup-64-001.S
libgloss/mt/startup-ms2.S
libgloss/mt/stat.c
libgloss/mt/time.c
libgloss/mt/times.c
libgloss/mt/trap.S
libgloss/mt/trap.h
libgloss/mt/unlink.c
libgloss/mt/utime.c
libgloss/mt/write.c
libgloss/open.c
libgloss/pa/Makefile.in
libgloss/pa/README
libgloss/pa/aclocal.m4
libgloss/pa/configure
libgloss/pa/configure.in
libgloss/pa/crt0.S
libgloss/pa/hp-milli.s
libgloss/pa/op50n-io.S
libgloss/pa/op50n.h
libgloss/pa/op50n.ld
libgloss/pa/op50nled.c
libgloss/pa/setjmp.S
libgloss/pa/test.c
libgloss/pa/w89k-io.c
libgloss/pa/w89k.h
libgloss/pa/w89k.ld
libgloss/print.c
libgloss/putnum.c
libgloss/read.c
libgloss/rl78/Makefile.in
libgloss/rl78/abort.S
libgloss/rl78/argv.S
libgloss/rl78/argvlen.S
libgloss/rl78/chdir.S
libgloss/rl78/chmod.S
libgloss/rl78/close.S
libgloss/rl78/configure
libgloss/rl78/configure.in
libgloss/rl78/crt0.S
libgloss/rl78/crtn.S
libgloss/rl78/exit.S
libgloss/rl78/fstat.S
libgloss/rl78/gcrt0.S
libgloss/rl78/getpid.S
libgloss/rl78/gettimeofday.S
libgloss/rl78/isatty.S
libgloss/rl78/kill.S
libgloss/rl78/link.S
libgloss/rl78/lseek.S
libgloss/rl78/mcount.c
libgloss/rl78/open.S
libgloss/rl78/read.S
libgloss/rl78/rl78-sim.ld
libgloss/rl78/rl78-sys.h
libgloss/rl78/rl78.ld
libgloss/rl78/sbrk.c
libgloss/rl78/stat.S
libgloss/rl78/time.S
libgloss/rl78/times.S
libgloss/rl78/unlink.S
libgloss/rl78/utime.S
libgloss/rl78/write.c
libgloss/rs6000/Makefile.in
libgloss/rs6000/aclocal.m4
libgloss/rs6000/ads-exit.S
libgloss/rs6000/ads-io.c
libgloss/rs6000/ads.ld
libgloss/rs6000/configure
libgloss/rs6000/configure.in
libgloss/rs6000/crt0.S
libgloss/rs6000/mbx-exit.c
libgloss/rs6000/mbx-inbyte.c
libgloss/rs6000/mbx-outbyte.c
libgloss/rs6000/mbx-print.c
libgloss/rs6000/mbx.ld
libgloss/rs6000/mbx.specs
libgloss/rs6000/mcount.S
libgloss/rs6000/mvme-errno.c
libgloss/rs6000/mvme-exit.S
libgloss/rs6000/mvme-inbyte.S
libgloss/rs6000/mvme-outbyte.S
libgloss/rs6000/mvme-print.c
libgloss/rs6000/mvme-read.c
libgloss/rs6000/sim-abort.c
libgloss/rs6000/sim-crt0.S
libgloss/rs6000/sim-errno.c
libgloss/rs6000/sim-getrusage.S
libgloss/rs6000/sim-inbyte.c
libgloss/rs6000/sim-print.c
libgloss/rs6000/sim-sbrk.c
libgloss/rs6000/simulator.S
libgloss/rs6000/sol-cfuncs.c
libgloss/rs6000/sol-syscall.S
libgloss/rs6000/test.c
libgloss/rs6000/xil-crt0.S
libgloss/rs6000/xilinx.ld
libgloss/rs6000/xilinx440.ld
libgloss/rs6000/yellowknife.ld
libgloss/rx/Makefile.in
libgloss/rx/abort.S
libgloss/rx/argv.S
libgloss/rx/argvlen.S
libgloss/rx/chdir.S
libgloss/rx/chmod.S
libgloss/rx/close.S
libgloss/rx/configure
libgloss/rx/configure.in
libgloss/rx/crt0.S
libgloss/rx/crtn.S
libgloss/rx/exit.S
libgloss/rx/fstat.S
libgloss/rx/gcrt0.S
libgloss/rx/getpid.S
libgloss/rx/gettimeofday.S
libgloss/rx/heaptop.S
libgloss/rx/isatty.S
libgloss/rx/kill.S
libgloss/rx/link.S
libgloss/rx/lseek.S
libgloss/rx/mcount.c
libgloss/rx/open.S
libgloss/rx/read.S
libgloss/rx/rx-sim.ld
libgloss/rx/rx.ld
libgloss/rx/rxsys.h
libgloss/rx/sbrk.c
libgloss/rx/sigprocmask.S
libgloss/rx/sleep.S
libgloss/rx/stat.S
libgloss/rx/time.S
libgloss/rx/times.S
libgloss/rx/unlink.S
libgloss/rx/utime.S
libgloss/rx/write.S
libgloss/sbrk.c
libgloss/sh/sh1lcevb.ld
libgloss/sh/sh2lcevb.ld
libgloss/sh/sh3bb.ld
libgloss/sh/sh3lcevb.ld
libgloss/sparc/Makefile.in
libgloss/sparc/aclocal.m4
libgloss/sparc/asm.h
libgloss/sparc/cache.c
libgloss/sparc/configure
libgloss/sparc/configure.in
libgloss/sparc/crt0-701.S
libgloss/sparc/crt0.S
libgloss/sparc/cygmon-crt0.S
libgloss/sparc/cygmon-salib.c
libgloss/sparc/cygmon-sparc64-ld.src
libgloss/sparc/cygmon.ld.src
libgloss/sparc/dtor.C
libgloss/sparc/elfsim.ld
libgloss/sparc/erc32-crt0.S
libgloss/sparc/erc32-io.c
libgloss/sparc/erc32-stub.c
libgloss/sparc/erc32.ld
libgloss/sparc/ex930.ld
libgloss/sparc/ex931.ld
libgloss/sparc/ex934.ld
libgloss/sparc/fixctors.c
libgloss/sparc/libsys/Makefile.in
libgloss/sparc/libsys/_exit.S
libgloss/sparc/libsys/aclocal.m4
libgloss/sparc/libsys/cerror.S
libgloss/sparc/libsys/configure
libgloss/sparc/libsys/configure.in
libgloss/sparc/libsys/isatty.c
libgloss/sparc/libsys/libsys-crt0.S
libgloss/sparc/libsys/sbrk.S
libgloss/sparc/libsys/syscall.h
libgloss/sparc/libsys/syscallasm.h
libgloss/sparc/libsys/template.S
libgloss/sparc/libsys/template_r.S
libgloss/sparc/salib-701.c
libgloss/sparc/salib.c
libgloss/sparc/slite.h
libgloss/sparc/sparc-stub.c
libgloss/sparc/sparc86x.ld
libgloss/sparc/sparcl-stub.c
libgloss/sparc/sparclet-stub.c
libgloss/sparc/sparclite.h
libgloss/sparc/sysc-701.c
libgloss/sparc/syscalls.c
libgloss/sparc/test.c
libgloss/sparc/traps.S
libgloss/sparc/tsc701.ld
libgloss/spu/Makefile.in
libgloss/spu/access.c
libgloss/spu/aclocal.m4
libgloss/spu/chdir.c
libgloss/spu/chmod.c
libgloss/spu/chown.c
libgloss/spu/close.c
libgloss/spu/configure
libgloss/spu/configure.in
libgloss/spu/conv_stat.c
libgloss/spu/crt0.S
libgloss/spu/crti.S
libgloss/spu/crtn.S
libgloss/spu/dirfuncs.c
libgloss/spu/dup.c
libgloss/spu/dup2.c
libgloss/spu/exit.c
libgloss/spu/fchdir.c
libgloss/spu/fchmod.c
libgloss/spu/fchown.c
libgloss/spu/fdatasync.c
libgloss/spu/fstat.c
libgloss/spu/fsync.c
libgloss/spu/ftruncate.c
libgloss/spu/getcwd.c
libgloss/spu/getitimer.c
libgloss/spu/getpagesize.c
libgloss/spu/getpid.c
libgloss/spu/gettimeofday.c
libgloss/spu/isatty.c
libgloss/spu/jsre.h
libgloss/spu/kill.c
libgloss/spu/lchown.c
libgloss/spu/link.c
libgloss/spu/linux_getpid.c
libgloss/spu/linux_gettid.c
libgloss/spu/linux_syscalls.c
libgloss/spu/lockf.c
libgloss/spu/lseek.c
libgloss/spu/lstat.c
libgloss/spu/mkdir.c
libgloss/spu/mknod.c
libgloss/spu/mkstemp.c
libgloss/spu/mktemp.c
libgloss/spu/mmap_eaddr.c
libgloss/spu/mremap_eaddr.c
libgloss/spu/msync_eaddr.c
libgloss/spu/munmap_eaddr.c
libgloss/spu/nanosleep.c
libgloss/spu/open.c
libgloss/spu/pread.c
libgloss/spu/pwrite.c
libgloss/spu/read.c
libgloss/spu/readlink.c
libgloss/spu/readv.c
libgloss/spu/rmdir.c
libgloss/spu/sbrk.c
libgloss/spu/sched_yield.c
libgloss/spu/setitimer.c
libgloss/spu/shm_open.c
libgloss/spu/shm_unlink.c
libgloss/spu/stat.c
libgloss/spu/symlink.c
libgloss/spu/sync.c
libgloss/spu/syscalls.c
libgloss/spu/times.c
libgloss/spu/truncate.c
libgloss/spu/umask.c
libgloss/spu/unlink.c
libgloss/spu/utime.c
libgloss/spu/utimes.c
libgloss/spu/write.c
libgloss/spu/writev.c
libgloss/stat.c
libgloss/syscall.h
libgloss/testsuite/Makefile.in
libgloss/testsuite/config/hppa.mt
libgloss/testsuite/config/m68k.mt
libgloss/testsuite/config/mips.mt
libgloss/testsuite/config/support.c
libgloss/testsuite/configure.in
libgloss/testsuite/lib/libgloss.exp
libgloss/testsuite/libgloss.all/.gdbinit
libgloss/testsuite/libgloss.all/Makefile.in
libgloss/testsuite/libgloss.all/array.c
libgloss/testsuite/libgloss.all/configure.in
libgloss/testsuite/libgloss.all/div.c
libgloss/testsuite/libgloss.all/double.c
libgloss/testsuite/libgloss.all/float.c
libgloss/testsuite/libgloss.all/func.c
libgloss/testsuite/libgloss.all/io.c
libgloss/testsuite/libgloss.all/math.c
libgloss/testsuite/libgloss.all/memory.c
libgloss/testsuite/libgloss.all/misc.c
libgloss/testsuite/libgloss.all/printf.c
libgloss/testsuite/libgloss.all/struct.c
libgloss/testsuite/libgloss.all/varargs.c
libgloss/testsuite/libgloss.all/varargs2.c
libgloss/tic6x/Makefile.in
libgloss/tic6x/aclocal.m4
libgloss/tic6x/configure
libgloss/tic6x/configure.in
libgloss/tic6x/crt0.S
libgloss/tic6x/getpid.c
libgloss/tic6x/kill.c
libgloss/tic6x/sbrk.c
libgloss/tic6x/syscalls.c
libgloss/unlink.c
libgloss/v850/Makefile.in
libgloss/v850/_exit.c
libgloss/v850/access.c
libgloss/v850/aclocal.m4
libgloss/v850/chmod.c
libgloss/v850/chown.c
libgloss/v850/close.c
libgloss/v850/configure
libgloss/v850/configure.in
libgloss/v850/creat.c
libgloss/v850/crt0.S
libgloss/v850/crt1.c
libgloss/v850/execv.c
libgloss/v850/execve.c
libgloss/v850/fork.c
libgloss/v850/fstat.c
libgloss/v850/getpid.c
libgloss/v850/gettime.c
libgloss/v850/isatty.c
libgloss/v850/kill.c
libgloss/v850/link.c
libgloss/v850/lseek.c
libgloss/v850/open.c
libgloss/v850/pipe.c
libgloss/v850/read.c
libgloss/v850/sbrk.c
libgloss/v850/sim.ld
libgloss/v850/stat.c
libgloss/v850/sys/syscall.h
libgloss/v850/time.c
libgloss/v850/times.c
libgloss/v850/trap.S
libgloss/v850/unlink.c
libgloss/v850/utime.c
libgloss/v850/wait.c
libgloss/v850/write.c
libgloss/wince/Makefile.am
libgloss/wince/Makefile.in
libgloss/wince/aclocal.m4
libgloss/wince/configure
libgloss/wince/configure.in
libgloss/write.c
libgloss/xc16x/Makefile.in
libgloss/xc16x/aclocal.m4
libgloss/xc16x/close.S
libgloss/xc16x/configure
libgloss/xc16x/configure.in
libgloss/xc16x/create.c
libgloss/xc16x/crt0.S
libgloss/xc16x/fstat.S
libgloss/xc16x/getchar1.c
libgloss/xc16x/isatty.c
libgloss/xc16x/lseek.c
libgloss/xc16x/mem-layout.c
libgloss/xc16x/misc.c
libgloss/xc16x/open.c
libgloss/xc16x/read.c
libgloss/xc16x/sbrk.c
libgloss/xc16x/sys/syscall.h
libgloss/xc16x/syscalls.c
libgloss/xc16x/trap_handle.c
libgloss/xc16x/write.c
libgloss/xstormy16/Makefile.in
libgloss/xstormy16/aclocal.m4
libgloss/xstormy16/close.c
libgloss/xstormy16/configure
libgloss/xstormy16/configure.in
libgloss/xstormy16/crt0.s
libgloss/xstormy16/crt0_stub.s
libgloss/xstormy16/crti.s
libgloss/xstormy16/crtn.s
libgloss/xstormy16/eva_app.c
libgloss/xstormy16/eva_app.ld
libgloss/xstormy16/eva_stub.ld
libgloss/xstormy16/fstat.c
libgloss/xstormy16/getpid.c
libgloss/xstormy16/isatty.c
libgloss/xstormy16/kill.c
libgloss/xstormy16/lseek.c
libgloss/xstormy16/open.c
libgloss/xstormy16/sim_high.ld
libgloss/xstormy16/sim_malloc_start.s
libgloss/xstormy16/sim_rom.ld
libgloss/xstormy16/stat.c
libgloss/xstormy16/syscalls.S
libgloss/xstormy16/syscalls.m4
libgloss/xstormy16/unlink.c
libgloss/xstormy16/xstormy16_stub.c
newlib/ChangeLog
newlib/HOWTO
newlib/MAINTAINERS
newlib/Makefile.am
newlib/Makefile.in
newlib/Makefile.shared
newlib/NEWS
newlib/README
newlib/acconfig.h
newlib/acinclude.m4
newlib/aclocal.m4
newlib/configure
newlib/configure.host
newlib/configure.in
newlib/confsubdir.m4
newlib/doc/Makefile.am
newlib/doc/Makefile.in
newlib/doc/aclocal.m4
newlib/doc/ansidecl.h
newlib/doc/configure
newlib/doc/configure.in
newlib/doc/doc.str
newlib/doc/makedoc.c
newlib/iconvdata/EUC-JP.irreversible
newlib/iconvdata/Makefile.am
newlib/iconvdata/Makefile.in
newlib/iconvdata/SJIS.irreversible
newlib/iconvdata/aclocal.m4
newlib/iconvdata/configure
newlib/iconvdata/configure.in
newlib/iconvdata/dummy.c
newlib/iconvdata/euc-jp.c
newlib/iconvdata/gconv-modules
newlib/iconvdata/jis0201.c
newlib/iconvdata/jis0201.h
newlib/iconvdata/jis0208.c
newlib/iconvdata/jis0208.h
newlib/iconvdata/jis0212.c
newlib/iconvdata/jis0212.h
newlib/iconvdata/sjis.c
newlib/libc/Makefile.am
newlib/libc/Makefile.in
newlib/libc/aclocal.m4
newlib/libc/argz/Makefile.am
newlib/libc/argz/Makefile.in
newlib/libc/argz/argz_add.c
newlib/libc/argz/argz_add_sep.c
newlib/libc/argz/argz_append.c
newlib/libc/argz/argz_count.c
newlib/libc/argz/argz_create.c
newlib/libc/argz/argz_create_sep.c
newlib/libc/argz/argz_delete.c
newlib/libc/argz/argz_extract.c
newlib/libc/argz/argz_insert.c
newlib/libc/argz/argz_next.c
newlib/libc/argz/argz_replace.c
newlib/libc/argz/argz_stringify.c
newlib/libc/argz/buf_findstr.c
newlib/libc/argz/buf_findstr.h
newlib/libc/argz/dummy.c
newlib/libc/argz/envz_add.c
newlib/libc/argz/envz_entry.c
newlib/libc/argz/envz_get.c
newlib/libc/argz/envz_merge.c
newlib/libc/argz/envz_remove.c
newlib/libc/argz/envz_strip.c
newlib/libc/configure
newlib/libc/configure.in
newlib/libc/ctype/Makefile.am
newlib/libc/ctype/Makefile.in
newlib/libc/ctype/ctype.tex
newlib/libc/ctype/ctype_.c
newlib/libc/ctype/ctype_cp.h
newlib/libc/ctype/ctype_iso.h
newlib/libc/ctype/isalnum.c
newlib/libc/ctype/isalpha.c
newlib/libc/ctype/isascii.c
newlib/libc/ctype/isblank.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/iswalnum.c
newlib/libc/ctype/iswalpha.c
newlib/libc/ctype/iswblank.c
newlib/libc/ctype/iswcntrl.c
newlib/libc/ctype/iswctype.c
newlib/libc/ctype/iswdigit.c
newlib/libc/ctype/iswgraph.c
newlib/libc/ctype/iswlower.c
newlib/libc/ctype/iswprint.c
newlib/libc/ctype/iswpunct.c
newlib/libc/ctype/iswspace.c
newlib/libc/ctype/iswupper.c
newlib/libc/ctype/iswxdigit.c
newlib/libc/ctype/isxdigit.c
newlib/libc/ctype/jp2uc.c
newlib/libc/ctype/jp2uc.h
newlib/libc/ctype/local.h
newlib/libc/ctype/toascii.c
newlib/libc/ctype/tolower.c
newlib/libc/ctype/toupper.c
newlib/libc/ctype/towctrans.c
newlib/libc/ctype/towlower.c
newlib/libc/ctype/towupper.c
newlib/libc/ctype/utf8alpha.h
newlib/libc/ctype/utf8print.h
newlib/libc/ctype/wctrans.c
newlib/libc/ctype/wctype.c
newlib/libc/errno/Makefile.am
newlib/libc/errno/Makefile.in
newlib/libc/errno/errno.c
newlib/libc/iconv/Makefile.am
newlib/libc/iconv/Makefile.in
newlib/libc/iconv/ccs/Makefile.am
newlib/libc/iconv/ccs/Makefile.in
newlib/libc/iconv/ccs/big5.c
newlib/libc/iconv/ccs/binary/Makefile.am
newlib/libc/iconv/ccs/binary/Makefile.in
newlib/libc/iconv/ccs/binary/big5.cct
newlib/libc/iconv/ccs/binary/cns11643_plane1.cct
newlib/libc/iconv/ccs/binary/cns11643_plane14.cct
newlib/libc/iconv/ccs/binary/cns11643_plane2.cct
newlib/libc/iconv/ccs/binary/cp775.cct
newlib/libc/iconv/ccs/binary/cp850.cct
newlib/libc/iconv/ccs/binary/cp852.cct
newlib/libc/iconv/ccs/binary/cp855.cct
newlib/libc/iconv/ccs/binary/cp866.cct
newlib/libc/iconv/ccs/binary/iso_8859_1.cct
newlib/libc/iconv/ccs/binary/iso_8859_10.cct
newlib/libc/iconv/ccs/binary/iso_8859_11.cct
newlib/libc/iconv/ccs/binary/iso_8859_13.cct
newlib/libc/iconv/ccs/binary/iso_8859_14.cct
newlib/libc/iconv/ccs/binary/iso_8859_15.cct
newlib/libc/iconv/ccs/binary/iso_8859_2.cct
newlib/libc/iconv/ccs/binary/iso_8859_3.cct
newlib/libc/iconv/ccs/binary/iso_8859_4.cct
newlib/libc/iconv/ccs/binary/iso_8859_5.cct
newlib/libc/iconv/ccs/binary/iso_8859_6.cct
newlib/libc/iconv/ccs/binary/iso_8859_7.cct
newlib/libc/iconv/ccs/binary/iso_8859_8.cct
newlib/libc/iconv/ccs/binary/iso_8859_9.cct
newlib/libc/iconv/ccs/binary/iso_ir_111.cct
newlib/libc/iconv/ccs/binary/jis_x0201_1976.cct
newlib/libc/iconv/ccs/binary/jis_x0208_1990.cct
newlib/libc/iconv/ccs/binary/jis_x0212_1990.cct
newlib/libc/iconv/ccs/binary/koi8_r.cct
newlib/libc/iconv/ccs/binary/koi8_ru.cct
newlib/libc/iconv/ccs/binary/koi8_u.cct
newlib/libc/iconv/ccs/binary/koi8_uni.cct
newlib/libc/iconv/ccs/binary/ksx1001.cct
newlib/libc/iconv/ccs/binary/win_1250.cct
newlib/libc/iconv/ccs/binary/win_1251.cct
newlib/libc/iconv/ccs/binary/win_1252.cct
newlib/libc/iconv/ccs/binary/win_1253.cct
newlib/libc/iconv/ccs/binary/win_1254.cct
newlib/libc/iconv/ccs/binary/win_1255.cct
newlib/libc/iconv/ccs/binary/win_1256.cct
newlib/libc/iconv/ccs/binary/win_1257.cct
newlib/libc/iconv/ccs/binary/win_1258.cct
newlib/libc/iconv/ccs/ccs.h
newlib/libc/iconv/ccs/ccsbi.c
newlib/libc/iconv/ccs/ccsbi.h
newlib/libc/iconv/ccs/ccsnames.h
newlib/libc/iconv/ccs/cns11643_plane1.c
newlib/libc/iconv/ccs/cns11643_plane14.c
newlib/libc/iconv/ccs/cns11643_plane2.c
newlib/libc/iconv/ccs/cp775.c
newlib/libc/iconv/ccs/cp850.c
newlib/libc/iconv/ccs/cp852.c
newlib/libc/iconv/ccs/cp855.c
newlib/libc/iconv/ccs/cp866.c
newlib/libc/iconv/ccs/iso_8859_1.c
newlib/libc/iconv/ccs/iso_8859_10.c
newlib/libc/iconv/ccs/iso_8859_11.c
newlib/libc/iconv/ccs/iso_8859_13.c
newlib/libc/iconv/ccs/iso_8859_14.c
newlib/libc/iconv/ccs/iso_8859_15.c
newlib/libc/iconv/ccs/iso_8859_2.c
newlib/libc/iconv/ccs/iso_8859_3.c
newlib/libc/iconv/ccs/iso_8859_4.c
newlib/libc/iconv/ccs/iso_8859_5.c
newlib/libc/iconv/ccs/iso_8859_6.c
newlib/libc/iconv/ccs/iso_8859_7.c
newlib/libc/iconv/ccs/iso_8859_8.c
newlib/libc/iconv/ccs/iso_8859_9.c
newlib/libc/iconv/ccs/iso_ir_111.c
newlib/libc/iconv/ccs/jis_x0201_1976.c
newlib/libc/iconv/ccs/jis_x0208_1990.c
newlib/libc/iconv/ccs/jis_x0212_1990.c
newlib/libc/iconv/ccs/koi8_r.c
newlib/libc/iconv/ccs/koi8_ru.c
newlib/libc/iconv/ccs/koi8_u.c
newlib/libc/iconv/ccs/koi8_uni.c
newlib/libc/iconv/ccs/ksx1001.c
newlib/libc/iconv/ccs/mktbl.pl
newlib/libc/iconv/ccs/win_1250.c
newlib/libc/iconv/ccs/win_1251.c
newlib/libc/iconv/ccs/win_1252.c
newlib/libc/iconv/ccs/win_1253.c
newlib/libc/iconv/ccs/win_1254.c
newlib/libc/iconv/ccs/win_1255.c
newlib/libc/iconv/ccs/win_1256.c
newlib/libc/iconv/ccs/win_1257.c
newlib/libc/iconv/ccs/win_1258.c
newlib/libc/iconv/ces/Makefile.am
newlib/libc/iconv/ces/Makefile.in
newlib/libc/iconv/ces/cesbi.c
newlib/libc/iconv/ces/cesbi.h
newlib/libc/iconv/ces/cesdeps.h
newlib/libc/iconv/ces/euc.c
newlib/libc/iconv/ces/mkdeps.pl
newlib/libc/iconv/ces/table-pcs.c
newlib/libc/iconv/ces/table.c
newlib/libc/iconv/ces/ucs-2-internal.c
newlib/libc/iconv/ces/ucs-2.c
newlib/libc/iconv/ces/ucs-4-internal.c
newlib/libc/iconv/ces/ucs-4.c
newlib/libc/iconv/ces/us-ascii.c
newlib/libc/iconv/ces/utf-16.c
newlib/libc/iconv/ces/utf-8.c
newlib/libc/iconv/encoding.aliases
newlib/libc/iconv/iconv.tex
newlib/libc/iconv/lib/Makefile.am
newlib/libc/iconv/lib/Makefile.in
newlib/libc/iconv/lib/aliasesbi.c
newlib/libc/iconv/lib/aliasesi.c
newlib/libc/iconv/lib/conv.h
newlib/libc/iconv/lib/encnames.h
newlib/libc/iconv/lib/encoding.deps
newlib/libc/iconv/lib/endian.h
newlib/libc/iconv/lib/iconv.c
newlib/libc/iconv/lib/iconvnls.c
newlib/libc/iconv/lib/iconvnls.h
newlib/libc/iconv/lib/local.h
newlib/libc/iconv/lib/nullconv.c
newlib/libc/iconv/lib/ucsconv.c
newlib/libc/iconv/lib/ucsconv.h
newlib/libc/include/_ansi.h
newlib/libc/include/_syslist.h
newlib/libc/include/alloca.h
newlib/libc/include/ar.h
newlib/libc/include/argz.h
newlib/libc/include/assert.h
newlib/libc/include/complex.h
newlib/libc/include/ctype.h
newlib/libc/include/dirent.h
newlib/libc/include/envlock.h
newlib/libc/include/envz.h
newlib/libc/include/errno.h
newlib/libc/include/fastmath.h
newlib/libc/include/fcntl.h
newlib/libc/include/fnmatch.h
newlib/libc/include/getopt.h
newlib/libc/include/glob.h
newlib/libc/include/grp.h
newlib/libc/include/iconv.h
newlib/libc/include/ieeefp.h
newlib/libc/include/inttypes.h
newlib/libc/include/langinfo.h
newlib/libc/include/libgen.h
newlib/libc/include/limits.h
newlib/libc/include/locale.h
newlib/libc/include/machine/_default_types.h
newlib/libc/include/machine/_types.h
newlib/libc/include/machine/ansi.h
newlib/libc/include/machine/endian.h
newlib/libc/include/machine/fastmath.h
newlib/libc/include/machine/ieeefp.h
newlib/libc/include/machine/malloc.h
newlib/libc/include/machine/param.h
newlib/libc/include/machine/setjmp-dj.h
newlib/libc/include/machine/setjmp.h
newlib/libc/include/machine/stdlib.h
newlib/libc/include/machine/termios.h
newlib/libc/include/machine/time.h
newlib/libc/include/machine/types.h
newlib/libc/include/malloc.h
newlib/libc/include/math.h
newlib/libc/include/newlib.h
newlib/libc/include/paths.h
newlib/libc/include/process.h
newlib/libc/include/pthread.h
newlib/libc/include/pwd.h
newlib/libc/include/reent.h
newlib/libc/include/regdef.h
newlib/libc/include/regex.h
newlib/libc/include/rpc/types.h
newlib/libc/include/rpc/xdr.h
newlib/libc/include/sched.h
newlib/libc/include/search.h
newlib/libc/include/setjmp.h
newlib/libc/include/signal.h
newlib/libc/include/stdint.h
newlib/libc/include/stdio.h
newlib/libc/include/stdio_ext.h
newlib/libc/include/stdlib.h
newlib/libc/include/string.h
newlib/libc/include/strings.h
newlib/libc/include/sys/_default_fcntl.h
newlib/libc/include/sys/_types.h
newlib/libc/include/sys/cdefs.h
newlib/libc/include/sys/config.h
newlib/libc/include/sys/custom_file.h
newlib/libc/include/sys/dir.h
newlib/libc/include/sys/dirent.h
newlib/libc/include/sys/errno.h
newlib/libc/include/sys/fcntl.h
newlib/libc/include/sys/features.h
newlib/libc/include/sys/file.h
newlib/libc/include/sys/iconvnls.h
newlib/libc/include/sys/lock.h
newlib/libc/include/sys/param.h
newlib/libc/include/sys/queue.h
newlib/libc/include/sys/reent.h
newlib/libc/include/sys/resource.h
newlib/libc/include/sys/sched.h
newlib/libc/include/sys/signal.h
newlib/libc/include/sys/stat.h
newlib/libc/include/sys/stdio.h
newlib/libc/include/sys/string.h
newlib/libc/include/sys/syslimits.h
newlib/libc/include/sys/time.h
newlib/libc/include/sys/timeb.h
newlib/libc/include/sys/times.h
newlib/libc/include/sys/types.h
newlib/libc/include/sys/unistd.h
newlib/libc/include/sys/utime.h
newlib/libc/include/sys/wait.h
newlib/libc/include/tar.h
newlib/libc/include/termios.h
newlib/libc/include/time.h
newlib/libc/include/unctrl.h
newlib/libc/include/unistd.h
newlib/libc/include/utime.h
newlib/libc/include/utmp.h
newlib/libc/include/wchar.h
newlib/libc/include/wctype.h
newlib/libc/include/wordexp.h
newlib/libc/libc.texinfo
newlib/libc/locale/Makefile.am
newlib/libc/locale/Makefile.in
newlib/libc/locale/fix_grouping.c
newlib/libc/locale/lctype.c
newlib/libc/locale/lctype.h
newlib/libc/locale/ldpart.c
newlib/libc/locale/ldpart.h
newlib/libc/locale/lmessages.c
newlib/libc/locale/lmessages.h
newlib/libc/locale/lmonetary.c
newlib/libc/locale/lmonetary.h
newlib/libc/locale/lnumeric.c
newlib/libc/locale/lnumeric.h
newlib/libc/locale/locale.c
newlib/libc/locale/locale.tex
newlib/libc/locale/nl_langinfo.3
newlib/libc/locale/nl_langinfo.c
newlib/libc/locale/setlocale.h
newlib/libc/locale/timelocal.c
newlib/libc/locale/timelocal.h
newlib/libc/machine/Makefile.am
newlib/libc/machine/Makefile.in
newlib/libc/machine/a29k/Makefile.am
newlib/libc/machine/a29k/Makefile.in
newlib/libc/machine/a29k/aclocal.m4
newlib/libc/machine/a29k/configure
newlib/libc/machine/a29k/configure.in
newlib/libc/machine/aclocal.m4
newlib/libc/machine/arm/Makefile.am
newlib/libc/machine/arm/Makefile.in
newlib/libc/machine/arm/access.c
newlib/libc/machine/arm/aclocal.m4
newlib/libc/machine/arm/arm_asm.h
newlib/libc/machine/arm/configure
newlib/libc/machine/arm/configure.in
newlib/libc/machine/arm/machine/param.h
newlib/libc/machine/arm/memchr-stub.c
newlib/libc/machine/arm/memchr.S
newlib/libc/machine/arm/memcpy-stub.c
newlib/libc/machine/arm/memcpy.S
newlib/libc/machine/arm/setjmp.S
newlib/libc/machine/arm/strcmp.c
newlib/libc/machine/arm/strcpy.c
newlib/libc/machine/arm/strlen-armv7.S
newlib/libc/machine/arm/strlen.c
newlib/libc/machine/bfin/Makefile.am
newlib/libc/machine/bfin/Makefile.in
newlib/libc/machine/bfin/aclocal.m4
newlib/libc/machine/bfin/configure
newlib/libc/machine/bfin/configure.in
newlib/libc/machine/bfin/longjmp.S
newlib/libc/machine/bfin/setjmp.S
newlib/libc/machine/configure
newlib/libc/machine/configure.in
newlib/libc/machine/cr16/Makefile.am
newlib/libc/machine/cr16/Makefile.in
newlib/libc/machine/cr16/aclocal.m4
newlib/libc/machine/cr16/configure
newlib/libc/machine/cr16/configure.in
newlib/libc/machine/cr16/getenv.c
newlib/libc/machine/cr16/setjmp.S
newlib/libc/machine/cr16/sys/asm.h
newlib/libc/machine/cr16/sys/libh.h
newlib/libc/machine/cr16/sys/syscall.h
newlib/libc/machine/cris/Makefile.am
newlib/libc/machine/cris/Makefile.in
newlib/libc/machine/cris/aclocal.m4
newlib/libc/machine/cris/configure
newlib/libc/machine/cris/configure.in
newlib/libc/machine/cris/include/pthread.h
newlib/libc/machine/cris/libcdtor.c
newlib/libc/machine/cris/memcpy.c
newlib/libc/machine/cris/memmove.c
newlib/libc/machine/cris/memset.c
newlib/libc/machine/cris/setjmp.c
newlib/libc/machine/cris/sys/errno.h
newlib/libc/machine/cris/sys/fcntl.h
newlib/libc/machine/cris/sys/signal.h
newlib/libc/machine/crx/Makefile.am
newlib/libc/machine/crx/Makefile.in
newlib/libc/machine/crx/aclocal.m4
newlib/libc/machine/crx/configure
newlib/libc/machine/crx/configure.in
newlib/libc/machine/crx/getenv.c
newlib/libc/machine/crx/setjmp.S
newlib/libc/machine/crx/sys/asm.h
newlib/libc/machine/crx/sys/libh.h
newlib/libc/machine/crx/sys/syscall.h
newlib/libc/machine/d10v/Makefile.am
newlib/libc/machine/d10v/Makefile.in
newlib/libc/machine/d10v/aclocal.m4
newlib/libc/machine/d10v/configure
newlib/libc/machine/d10v/configure.in
newlib/libc/machine/d10v/setjmp.S
newlib/libc/machine/d30v/Makefile.am
newlib/libc/machine/d30v/Makefile.in
newlib/libc/machine/d30v/aclocal.m4
newlib/libc/machine/d30v/configure
newlib/libc/machine/d30v/configure.in
newlib/libc/machine/d30v/setjmp.S
newlib/libc/machine/fr30/Makefile.am
newlib/libc/machine/fr30/Makefile.in
newlib/libc/machine/fr30/aclocal.m4
newlib/libc/machine/fr30/configure
newlib/libc/machine/fr30/configure.in
newlib/libc/machine/fr30/setjmp.S
newlib/libc/machine/frv/Makefile.am
newlib/libc/machine/frv/Makefile.in
newlib/libc/machine/frv/aclocal.m4
newlib/libc/machine/frv/configure
newlib/libc/machine/frv/configure.in
newlib/libc/machine/frv/setjmp.S
newlib/libc/machine/h8300/Makefile.am
newlib/libc/machine/h8300/Makefile.in
newlib/libc/machine/h8300/aclocal.m4
newlib/libc/machine/h8300/configure
newlib/libc/machine/h8300/configure.in
newlib/libc/machine/h8300/defines.h
newlib/libc/machine/h8300/h8sx_strcpy.S
newlib/libc/machine/h8300/memcpy.S
newlib/libc/machine/h8300/memset.S
newlib/libc/machine/h8300/reg_memcpy.S
newlib/libc/machine/h8300/reg_memset.S
newlib/libc/machine/h8300/setarch.h
newlib/libc/machine/h8300/setjmp.S
newlib/libc/machine/h8300/strcmp.S
newlib/libc/machine/h8500/Makefile.am
newlib/libc/machine/h8500/Makefile.in
newlib/libc/machine/h8500/aclocal.m4
newlib/libc/machine/h8500/cmpsi.c
newlib/libc/machine/h8500/configure
newlib/libc/machine/h8500/configure.in
newlib/libc/machine/h8500/divhi3.S
newlib/libc/machine/h8500/divsi3.c
newlib/libc/machine/h8500/mulhi3.c
newlib/libc/machine/h8500/mulsi3.c
newlib/libc/machine/h8500/negsi2.c
newlib/libc/machine/h8500/psi.S
newlib/libc/machine/h8500/setjmp.S
newlib/libc/machine/h8500/shifts.c
newlib/libc/machine/hppa/DEFS.h
newlib/libc/machine/hppa/Makefile.am
newlib/libc/machine/hppa/Makefile.in
newlib/libc/machine/hppa/aclocal.m4
newlib/libc/machine/hppa/configure
newlib/libc/machine/hppa/configure.in
newlib/libc/machine/hppa/memchr.S
newlib/libc/machine/hppa/memcmp.S
newlib/libc/machine/hppa/memcpy.S
newlib/libc/machine/hppa/memset.S
newlib/libc/machine/hppa/pcc_prefix.s
newlib/libc/machine/hppa/setjmp.S
newlib/libc/machine/hppa/strcat.S
newlib/libc/machine/hppa/strcmp.S
newlib/libc/machine/hppa/strcpy.S
newlib/libc/machine/hppa/strlen.S
newlib/libc/machine/hppa/strncat.S
newlib/libc/machine/hppa/strncmp.S
newlib/libc/machine/hppa/strncpy.S
newlib/libc/machine/i386/Makefile.am
newlib/libc/machine/i386/Makefile.in
newlib/libc/machine/i386/aclocal.m4
newlib/libc/machine/i386/configure
newlib/libc/machine/i386/configure.in
newlib/libc/machine/i386/f_atan2.S
newlib/libc/machine/i386/f_atan2f.S
newlib/libc/machine/i386/f_exp.c
newlib/libc/machine/i386/f_expf.c
newlib/libc/machine/i386/f_frexp.S
newlib/libc/machine/i386/f_frexpf.S
newlib/libc/machine/i386/f_ldexp.S
newlib/libc/machine/i386/f_ldexpf.S
newlib/libc/machine/i386/f_log.S
newlib/libc/machine/i386/f_log10.S
newlib/libc/machine/i386/f_log10f.S
newlib/libc/machine/i386/f_logf.S
newlib/libc/machine/i386/f_math.h
newlib/libc/machine/i386/f_pow.c
newlib/libc/machine/i386/f_powf.c
newlib/libc/machine/i386/f_tan.S
newlib/libc/machine/i386/f_tanf.S
newlib/libc/machine/i386/i386mach.h
newlib/libc/machine/i386/machine/fastmath.h
newlib/libc/machine/i386/memchr.S
newlib/libc/machine/i386/memcmp.S
newlib/libc/machine/i386/memcpy.S
newlib/libc/machine/i386/memmove.S
newlib/libc/machine/i386/memset.S
newlib/libc/machine/i386/setjmp.S
newlib/libc/machine/i386/strchr.S
newlib/libc/machine/i386/strlen.S
newlib/libc/machine/i960/Makefile.am
newlib/libc/machine/i960/Makefile.in
newlib/libc/machine/i960/aclocal.m4
newlib/libc/machine/i960/configure
newlib/libc/machine/i960/configure.in
newlib/libc/machine/i960/memccpy.S
newlib/libc/machine/i960/memccpy_ca.S
newlib/libc/machine/i960/memchr.S
newlib/libc/machine/i960/memchr_ca.S
newlib/libc/machine/i960/memcmp.S
newlib/libc/machine/i960/memcmp_ca.S
newlib/libc/machine/i960/memcpy.S
newlib/libc/machine/i960/memcpy_ca.S
newlib/libc/machine/i960/memset.S
newlib/libc/machine/i960/setjmp.S
newlib/libc/machine/i960/strchr.S
newlib/libc/machine/i960/strchr_ca.S
newlib/libc/machine/i960/strcmp.S
newlib/libc/machine/i960/strcmp_ca.S
newlib/libc/machine/i960/strcpy.S
newlib/libc/machine/i960/strcpy_ca.S
newlib/libc/machine/i960/strcspn.S
newlib/libc/machine/i960/strdup.S
newlib/libc/machine/i960/strlen.S
newlib/libc/machine/i960/strlen_ca.S
newlib/libc/machine/i960/strncat.S
newlib/libc/machine/i960/strncat_ca.S
newlib/libc/machine/i960/strncmp.S
newlib/libc/machine/i960/strncmp_ca.S
newlib/libc/machine/i960/strncpy.S
newlib/libc/machine/i960/strncpy_ca.S
newlib/libc/machine/i960/strpbrk.S
newlib/libc/machine/i960/strrchr.S
newlib/libc/machine/iq2000/Makefile.am
newlib/libc/machine/iq2000/Makefile.in
newlib/libc/machine/iq2000/aclocal.m4
newlib/libc/machine/iq2000/configure
newlib/libc/machine/iq2000/configure.in
newlib/libc/machine/iq2000/setjmp.S
newlib/libc/machine/lm32/Makefile.am
newlib/libc/machine/lm32/Makefile.in
newlib/libc/machine/lm32/aclocal.m4
newlib/libc/machine/lm32/configure
newlib/libc/machine/lm32/configure.in
newlib/libc/machine/lm32/setjmp.S
newlib/libc/machine/m32c/Makefile.am
newlib/libc/machine/m32c/Makefile.in
newlib/libc/machine/m32c/aclocal.m4
newlib/libc/machine/m32c/configure
newlib/libc/machine/m32c/configure.in
newlib/libc/machine/m32c/setjmp.S
newlib/libc/machine/m32r/Makefile.am
newlib/libc/machine/m32r/Makefile.in
newlib/libc/machine/m32r/aclocal.m4
newlib/libc/machine/m32r/configure
newlib/libc/machine/m32r/configure.in
newlib/libc/machine/m32r/setjmp.S
newlib/libc/machine/m68hc11/Makefile.am
newlib/libc/machine/m68hc11/Makefile.in
newlib/libc/machine/m68hc11/aclocal.m4
newlib/libc/machine/m68hc11/configure
newlib/libc/machine/m68hc11/configure.in
newlib/libc/machine/m68hc11/setjmp.S
newlib/libc/machine/m68k/Makefile.am
newlib/libc/machine/m68k/Makefile.in
newlib/libc/machine/m68k/aclocal.m4
newlib/libc/machine/m68k/configure
newlib/libc/machine/m68k/configure.in
newlib/libc/machine/m68k/m68kasm.h
newlib/libc/machine/m68k/memcpy.S
newlib/libc/machine/m68k/memset.S
newlib/libc/machine/m68k/setjmp.S
newlib/libc/machine/m68k/strcpy.c
newlib/libc/machine/m68k/strlen.c
newlib/libc/machine/m88k/Makefile.am
newlib/libc/machine/m88k/Makefile.in
newlib/libc/machine/m88k/aclocal.m4
newlib/libc/machine/m88k/configure
newlib/libc/machine/m88k/configure.in
newlib/libc/machine/m88k/setjmp.S
newlib/libc/machine/mep/Makefile.am
newlib/libc/machine/mep/Makefile.in
newlib/libc/machine/mep/aclocal.m4
newlib/libc/machine/mep/configure
newlib/libc/machine/mep/configure.in
newlib/libc/machine/mep/setjmp.S
newlib/libc/machine/microblaze/Makefile.am
newlib/libc/machine/microblaze/Makefile.in
newlib/libc/machine/microblaze/abort.c
newlib/libc/machine/microblaze/aclocal.m4
newlib/libc/machine/microblaze/configure
newlib/libc/machine/microblaze/configure.in
newlib/libc/machine/microblaze/longjmp.S
newlib/libc/machine/microblaze/setjmp.S
newlib/libc/machine/microblaze/strcmp.c
newlib/libc/machine/microblaze/strcpy.c
newlib/libc/machine/microblaze/strlen.c
newlib/libc/machine/mips/Makefile.am
newlib/libc/machine/mips/Makefile.in
newlib/libc/machine/mips/aclocal.m4
newlib/libc/machine/mips/configure
newlib/libc/machine/mips/configure.in
newlib/libc/machine/mips/machine/regdef.h
newlib/libc/machine/mips/memcpy.c
newlib/libc/machine/mips/memset.c
newlib/libc/machine/mips/setjmp.S
newlib/libc/machine/mips/strcmp.c
newlib/libc/machine/mips/strlen.c
newlib/libc/machine/mips/strncpy.c
newlib/libc/machine/mn10200/Makefile.am
newlib/libc/machine/mn10200/Makefile.in
newlib/libc/machine/mn10200/aclocal.m4
newlib/libc/machine/mn10200/configure
newlib/libc/machine/mn10200/configure.in
newlib/libc/machine/mn10200/setjmp.S
newlib/libc/machine/mn10300/Makefile.am
newlib/libc/machine/mn10300/Makefile.in
newlib/libc/machine/mn10300/aclocal.m4
newlib/libc/machine/mn10300/configure
newlib/libc/machine/mn10300/configure.in
newlib/libc/machine/mn10300/memchr.S
newlib/libc/machine/mn10300/memcmp.S
newlib/libc/machine/mn10300/memcpy.S
newlib/libc/machine/mn10300/memset.S
newlib/libc/machine/mn10300/setjmp.S
newlib/libc/machine/mn10300/strchr.S
newlib/libc/machine/mn10300/strcmp.S
newlib/libc/machine/mn10300/strcpy.S
newlib/libc/machine/mn10300/strlen.S
newlib/libc/machine/moxie/Makefile.am
newlib/libc/machine/moxie/Makefile.in
newlib/libc/machine/moxie/aclocal.m4
newlib/libc/machine/moxie/configure
newlib/libc/machine/moxie/configure.in
newlib/libc/machine/moxie/setjmp.S
newlib/libc/machine/mt/Makefile.am
newlib/libc/machine/mt/Makefile.in
newlib/libc/machine/mt/aclocal.m4
newlib/libc/machine/mt/configure
newlib/libc/machine/mt/configure.in
newlib/libc/machine/mt/setjmp.S
newlib/libc/machine/necv70/Makefile.am
newlib/libc/machine/necv70/Makefile.in
newlib/libc/machine/necv70/aclocal.m4
newlib/libc/machine/necv70/configure
newlib/libc/machine/necv70/configure.in
newlib/libc/machine/necv70/fastmath.S
newlib/libc/machine/necv70/machine/registers.h
newlib/libc/machine/necv70/necv70.tex
newlib/libc/machine/necv70/setjmp.S
newlib/libc/machine/powerpc/Makefile.am
newlib/libc/machine/powerpc/Makefile.in
newlib/libc/machine/powerpc/aclocal.m4
newlib/libc/machine/powerpc/atosfix16.c
newlib/libc/machine/powerpc/atosfix32.c
newlib/libc/machine/powerpc/atosfix64.c
newlib/libc/machine/powerpc/atoufix16.c
newlib/libc/machine/powerpc/atoufix32.c
newlib/libc/machine/powerpc/atoufix64.c
newlib/libc/machine/powerpc/configure
newlib/libc/machine/powerpc/configure.in
newlib/libc/machine/powerpc/fix64.h
newlib/libc/machine/powerpc/machine/malloc.h
newlib/libc/machine/powerpc/machine/stdlib.h
newlib/libc/machine/powerpc/setjmp.S
newlib/libc/machine/powerpc/simdldtoa.c
newlib/libc/machine/powerpc/strtosfix16.c
newlib/libc/machine/powerpc/strtosfix32.c
newlib/libc/machine/powerpc/strtosfix64.c
newlib/libc/machine/powerpc/strtoufix16.c
newlib/libc/machine/powerpc/strtoufix32.c
newlib/libc/machine/powerpc/strtoufix64.c
newlib/libc/machine/powerpc/times.c
newlib/libc/machine/powerpc/ufix64toa.c
newlib/libc/machine/powerpc/vec_calloc.c
newlib/libc/machine/powerpc/vec_free.c
newlib/libc/machine/powerpc/vec_malloc.c
newlib/libc/machine/powerpc/vec_mallocr.c
newlib/libc/machine/powerpc/vec_realloc.c
newlib/libc/machine/powerpc/vfprintf.c
newlib/libc/machine/powerpc/vfscanf.c
newlib/libc/machine/rl78/Makefile.am
newlib/libc/machine/rl78/Makefile.in
newlib/libc/machine/rl78/aclocal.m4
newlib/libc/machine/rl78/configure
newlib/libc/machine/rl78/configure.in
newlib/libc/machine/rl78/setjmp.S
newlib/libc/machine/rx/Makefile.am
newlib/libc/machine/rx/Makefile.in
newlib/libc/machine/rx/aclocal.m4
newlib/libc/machine/rx/configure
newlib/libc/machine/rx/configure.in
newlib/libc/machine/rx/memchr.S
newlib/libc/machine/rx/memcpy.S
newlib/libc/machine/rx/memmove.S
newlib/libc/machine/rx/mempcpy.S
newlib/libc/machine/rx/memset.S
newlib/libc/machine/rx/setjmp.S
newlib/libc/machine/rx/strcat.S
newlib/libc/machine/rx/strcmp.S
newlib/libc/machine/rx/strcpy.S
newlib/libc/machine/rx/strlen.S
newlib/libc/machine/rx/strncat.S
newlib/libc/machine/rx/strncmp.S
newlib/libc/machine/rx/strncpy.S
newlib/libc/machine/sh/Makefile.am
newlib/libc/machine/sh/Makefile.in
newlib/libc/machine/sh/aclocal.m4
newlib/libc/machine/sh/asm.h
newlib/libc/machine/sh/configure
newlib/libc/machine/sh/configure.in
newlib/libc/machine/sh/memcpy.S
newlib/libc/machine/sh/memset.S
newlib/libc/machine/sh/setjmp.S
newlib/libc/machine/sh/strcmp.S
newlib/libc/machine/sh/strcpy.S
newlib/libc/machine/sh/strlen.S
newlib/libc/machine/sh/strncpy.S
newlib/libc/machine/sparc/Makefile.am
newlib/libc/machine/sparc/Makefile.in
newlib/libc/machine/sparc/aclocal.m4
newlib/libc/machine/sparc/configure
newlib/libc/machine/sparc/configure.in
newlib/libc/machine/sparc/machine/sparclet.h
newlib/libc/machine/sparc/scan.c
newlib/libc/machine/sparc/setjmp.S
newlib/libc/machine/sparc/shuffle.c
newlib/libc/machine/spu/Makefile.am
newlib/libc/machine/spu/Makefile.in
newlib/libc/machine/spu/aclocal.m4
newlib/libc/machine/spu/assert.c
newlib/libc/machine/spu/c99ppe.h
newlib/libc/machine/spu/calloc_ea.c
newlib/libc/machine/spu/clearerr.c
newlib/libc/machine/spu/configure
newlib/libc/machine/spu/configure.in
newlib/libc/machine/spu/creat.c
newlib/libc/machine/spu/ea_internal.h
newlib/libc/machine/spu/fclose.c
newlib/libc/machine/spu/fdopen.c
newlib/libc/machine/spu/feof.c
newlib/libc/machine/spu/ferror.c
newlib/libc/machine/spu/fflush.c
newlib/libc/machine/spu/fgetc.c
newlib/libc/machine/spu/fgetpos.c
newlib/libc/machine/spu/fgets.c
newlib/libc/machine/spu/fileno.c
newlib/libc/machine/spu/fiprintf.S
newlib/libc/machine/spu/fiscanf.S
newlib/libc/machine/spu/fopen.c
newlib/libc/machine/spu/fprintf.S
newlib/libc/machine/spu/fputc.c
newlib/libc/machine/spu/fputs.c
newlib/libc/machine/spu/fread.c
newlib/libc/machine/spu/free_ea.c
newlib/libc/machine/spu/freopen.c
newlib/libc/machine/spu/fscanf.S
newlib/libc/machine/spu/fseek.c
newlib/libc/machine/spu/fsetpos.c
newlib/libc/machine/spu/ftell.c
newlib/libc/machine/spu/fwrite.c
newlib/libc/machine/spu/getc.c
newlib/libc/machine/spu/getchar.c
newlib/libc/machine/spu/gets.c
newlib/libc/machine/spu/impure.c
newlib/libc/machine/spu/include/ea.h
newlib/libc/machine/spu/include/fenv.h
newlib/libc/machine/spu/include/spu_timer.h
newlib/libc/machine/spu/iprintf.S
newlib/libc/machine/spu/iscanf.S
newlib/libc/machine/spu/machine/_types.h
newlib/libc/machine/spu/malloc_ea.c
newlib/libc/machine/spu/memchr_ea.c
newlib/libc/machine/spu/memcmp.c
newlib/libc/machine/spu/memcmp_ea.c
newlib/libc/machine/spu/memcpy.c
newlib/libc/machine/spu/memcpy_ea.c
newlib/libc/machine/spu/memmove.c
newlib/libc/machine/spu/memmove_ea.c
newlib/libc/machine/spu/memset.c
newlib/libc/machine/spu/memset_ea.c
newlib/libc/machine/spu/mk_syscalls
newlib/libc/machine/spu/mmap_ea.c
newlib/libc/machine/spu/mremap_ea.c
newlib/libc/machine/spu/msync_ea.c
newlib/libc/machine/spu/munmap_ea.c
newlib/libc/machine/spu/perror.c
newlib/libc/machine/spu/posix_memalign_ea.c
newlib/libc/machine/spu/pread_ea.c
newlib/libc/machine/spu/printf.S
newlib/libc/machine/spu/putc.c
newlib/libc/machine/spu/putchar.c
newlib/libc/machine/spu/puts.c
newlib/libc/machine/spu/pwrite_ea.c
newlib/libc/machine/spu/read_ea.c
newlib/libc/machine/spu/readv_ea.c
newlib/libc/machine/spu/realloc_ea.c
newlib/libc/machine/spu/remove.c
newlib/libc/machine/spu/rename.c
newlib/libc/machine/spu/rewind.c
newlib/libc/machine/spu/scanf.S
newlib/libc/machine/spu/setbuf.c
newlib/libc/machine/spu/setjmp.S
newlib/libc/machine/spu/setvbuf.c
newlib/libc/machine/spu/siprintf.S
newlib/libc/machine/spu/siscanf.S
newlib/libc/machine/spu/sleep.c
newlib/libc/machine/spu/sniprintf.S
newlib/libc/machine/spu/snprintf.S
newlib/libc/machine/spu/sprintf.S
newlib/libc/machine/spu/spu-gmon.c
newlib/libc/machine/spu/spu-mcount.S
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/sscanf.S
newlib/libc/machine/spu/stack_reg_va.S
newlib/libc/machine/spu/stdio.c
newlib/libc/machine/spu/straddr.h
newlib/libc/machine/spu/strcat.c
newlib/libc/machine/spu/strcat_ea.c
newlib/libc/machine/spu/strchr.c
newlib/libc/machine/spu/strchr_ea.c
newlib/libc/machine/spu/strcmp.c
newlib/libc/machine/spu/strcmp_ea.c
newlib/libc/machine/spu/strcpy.c
newlib/libc/machine/spu/strcpy.h
newlib/libc/machine/spu/strcpy_ea.c
newlib/libc/machine/spu/strcspn.c
newlib/libc/machine/spu/strcspn_ea.c
newlib/libc/machine/spu/strlen.c
newlib/libc/machine/spu/strlen_ea.c
newlib/libc/machine/spu/strncat.c
newlib/libc/machine/spu/strncat_ea.c
newlib/libc/machine/spu/strncmp.c
newlib/libc/machine/spu/strncmp.h
newlib/libc/machine/spu/strncmp_ea.c
newlib/libc/machine/spu/strncpy.c
newlib/libc/machine/spu/strncpy_ea.c
newlib/libc/machine/spu/strpbrk.c
newlib/libc/machine/spu/strpbrk_ea.c
newlib/libc/machine/spu/strrchr.c
newlib/libc/machine/spu/strrchr_ea.c
newlib/libc/machine/spu/strspn.c
newlib/libc/machine/spu/strspn_ea.c
newlib/libc/machine/spu/strstr_ea.c
newlib/libc/machine/spu/strxfrm.c
newlib/libc/machine/spu/sys/custom_file.h
newlib/libc/machine/spu/sys/dirent.h
newlib/libc/machine/spu/sys/errno.h
newlib/libc/machine/spu/sys/fenv.h
newlib/libc/machine/spu/sys/linux_syscalls.h
newlib/libc/machine/spu/sys/mman.h
newlib/libc/machine/spu/sys/sched.h
newlib/libc/machine/spu/sys/syscall.h
newlib/libc/machine/spu/sys/uio.h
newlib/libc/machine/spu/sys/utime.h
newlib/libc/machine/spu/syscall.def
newlib/libc/machine/spu/tmpfile.c
newlib/libc/machine/spu/tmpnam.c
newlib/libc/machine/spu/ungetc.c
newlib/libc/machine/spu/usleep.c
newlib/libc/machine/spu/vec_literal.h
newlib/libc/machine/spu/vfiprintf.c
newlib/libc/machine/spu/vfiscanf.c
newlib/libc/machine/spu/vfprintf.c
newlib/libc/machine/spu/vfscanf.c
newlib/libc/machine/spu/viprintf.c
newlib/libc/machine/spu/viscanf.c
newlib/libc/machine/spu/vprintf.c
newlib/libc/machine/spu/vscanf.c
newlib/libc/machine/spu/vsiprintf.c
newlib/libc/machine/spu/vsiscanf.c
newlib/libc/machine/spu/vsniprintf.c
newlib/libc/machine/spu/vsnprintf.c
newlib/libc/machine/spu/vsprintf.c
newlib/libc/machine/spu/vsscanf.c
newlib/libc/machine/spu/write_ea.c
newlib/libc/machine/spu/writev_ea.c
newlib/libc/machine/tic4x/Makefile.am
newlib/libc/machine/tic4x/Makefile.in
newlib/libc/machine/tic4x/aclocal.m4
newlib/libc/machine/tic4x/configure
newlib/libc/machine/tic4x/configure.in
newlib/libc/machine/tic4x/setjmp.S
newlib/libc/machine/tic6x/Makefile.am
newlib/libc/machine/tic6x/Makefile.in
newlib/libc/machine/tic6x/aclocal.m4
newlib/libc/machine/tic6x/configure
newlib/libc/machine/tic6x/configure.in
newlib/libc/machine/tic6x/setjmp.S
newlib/libc/machine/tic80/Makefile.am
newlib/libc/machine/tic80/Makefile.in
newlib/libc/machine/tic80/aclocal.m4
newlib/libc/machine/tic80/configure
newlib/libc/machine/tic80/configure.in
newlib/libc/machine/tic80/setjmp.S
newlib/libc/machine/v850/Makefile.am
newlib/libc/machine/v850/Makefile.in
newlib/libc/machine/v850/aclocal.m4
newlib/libc/machine/v850/configure
newlib/libc/machine/v850/configure.in
newlib/libc/machine/v850/setjmp.S
newlib/libc/machine/w65/Makefile.am
newlib/libc/machine/w65/Makefile.in
newlib/libc/machine/w65/aclocal.m4
newlib/libc/machine/w65/cmpsi.c
newlib/libc/machine/w65/configure
newlib/libc/machine/w65/configure.in
newlib/libc/machine/w65/divsi3.c
newlib/libc/machine/w65/lshrhi.S
newlib/libc/machine/w65/mulsi3.c
newlib/libc/machine/w65/sdivhi3.S
newlib/libc/machine/w65/smulhi3.S
newlib/libc/machine/w65/udivhi3.S
newlib/libc/machine/w65/umodhi3.S
newlib/libc/machine/x86_64/Makefile.am
newlib/libc/machine/x86_64/Makefile.in
newlib/libc/machine/x86_64/aclocal.m4
newlib/libc/machine/x86_64/configure
newlib/libc/machine/x86_64/configure.in
newlib/libc/machine/x86_64/memcpy.S
newlib/libc/machine/x86_64/memset.S
newlib/libc/machine/x86_64/setjmp.S
newlib/libc/machine/x86_64/x86_64mach.h
newlib/libc/machine/xc16x/Makefile.am
newlib/libc/machine/xc16x/Makefile.in
newlib/libc/machine/xc16x/aclocal.m4
newlib/libc/machine/xc16x/configure
newlib/libc/machine/xc16x/configure.in
newlib/libc/machine/xc16x/putchar.c
newlib/libc/machine/xc16x/puts.c
newlib/libc/machine/xc16x/setjmp.S
newlib/libc/machine/xscale/Makefile.am
newlib/libc/machine/xscale/Makefile.in
newlib/libc/machine/xscale/aclocal.m4
newlib/libc/machine/xscale/configure
newlib/libc/machine/xscale/configure.in
newlib/libc/machine/xscale/machine/profile.h
newlib/libc/machine/xscale/memchr.c
newlib/libc/machine/xscale/memcmp.c
newlib/libc/machine/xscale/memcpy.c
newlib/libc/machine/xscale/memmove.c
newlib/libc/machine/xscale/memset.c
newlib/libc/machine/xscale/setjmp.S
newlib/libc/machine/xscale/strchr.c
newlib/libc/machine/xscale/strcmp.c
newlib/libc/machine/xscale/strcpy.c
newlib/libc/machine/xscale/strlen.c
newlib/libc/machine/xscale/xscale.h
newlib/libc/machine/xstormy16/Makefile.am
newlib/libc/machine/xstormy16/Makefile.in
newlib/libc/machine/xstormy16/aclocal.m4
newlib/libc/machine/xstormy16/configure
newlib/libc/machine/xstormy16/configure.in
newlib/libc/machine/xstormy16/mallocr.c
newlib/libc/machine/xstormy16/setjmp.S
newlib/libc/machine/xstormy16/tiny-malloc.c
newlib/libc/machine/z8k/Makefile.am
newlib/libc/machine/z8k/Makefile.in
newlib/libc/machine/z8k/aclocal.m4
newlib/libc/machine/z8k/args.h
newlib/libc/machine/z8k/configure
newlib/libc/machine/z8k/configure.in
newlib/libc/machine/z8k/memcmp.S
newlib/libc/machine/z8k/memcpy.S
newlib/libc/machine/z8k/memmove.S
newlib/libc/machine/z8k/memset.S
newlib/libc/machine/z8k/setjmp.S
newlib/libc/misc/Makefile.am
newlib/libc/misc/Makefile.in
newlib/libc/misc/__dprintf.c
newlib/libc/misc/ffs.c
newlib/libc/misc/fini.c
newlib/libc/misc/init.c
newlib/libc/misc/misc.tex
newlib/libc/misc/unctrl.c
newlib/libc/posix/COPYRIGHT
newlib/libc/posix/Makefile.am
newlib/libc/posix/Makefile.in
newlib/libc/posix/_isatty.c
newlib/libc/posix/cclass.h
newlib/libc/posix/closedir.c
newlib/libc/posix/cname.h
newlib/libc/posix/collate.c
newlib/libc/posix/collate.h
newlib/libc/posix/collcmp.c
newlib/libc/posix/creat.c
newlib/libc/posix/engine.c
newlib/libc/posix/execl.c
newlib/libc/posix/execle.c
newlib/libc/posix/execlp.c
newlib/libc/posix/execv.c
newlib/libc/posix/execve.c
newlib/libc/posix/execvp.c
newlib/libc/posix/fnmatch.3
newlib/libc/posix/fnmatch.c
newlib/libc/posix/glob.3
newlib/libc/posix/glob.c
newlib/libc/posix/isatty.c
newlib/libc/posix/namespace.h
newlib/libc/posix/opendir.c
newlib/libc/posix/popen.c
newlib/libc/posix/posix.tex
newlib/libc/posix/readdir.c
newlib/libc/posix/readdir_r.c
newlib/libc/posix/regcomp.c
newlib/libc/posix/regerror.c
newlib/libc/posix/regex.3
newlib/libc/posix/regex2.h
newlib/libc/posix/regexec.c
newlib/libc/posix/regfree.c
newlib/libc/posix/rewinddir.c
newlib/libc/posix/rune.h
newlib/libc/posix/runetype.h
newlib/libc/posix/scandir.c
newlib/libc/posix/seekdir.c
newlib/libc/posix/sleep.c
newlib/libc/posix/sysexits.h
newlib/libc/posix/telldir.c
newlib/libc/posix/un-namespace.h
newlib/libc/posix/usleep.c
newlib/libc/posix/utils.h
newlib/libc/posix/wordexp.c
newlib/libc/posix/wordfree.c
newlib/libc/reent/Makefile.am
newlib/libc/reent/Makefile.in
newlib/libc/reent/closer.c
newlib/libc/reent/execr.c
newlib/libc/reent/fcntlr.c
newlib/libc/reent/fstat64r.c
newlib/libc/reent/fstatr.c
newlib/libc/reent/getreent.c
newlib/libc/reent/gettimeofdayr.c
newlib/libc/reent/impure.c
newlib/libc/reent/isattyr.c
newlib/libc/reent/linkr.c
newlib/libc/reent/lseek64r.c
newlib/libc/reent/lseekr.c
newlib/libc/reent/mkdirr.c
newlib/libc/reent/open64r.c
newlib/libc/reent/openr.c
newlib/libc/reent/readr.c
newlib/libc/reent/reent.c
newlib/libc/reent/reent.tex
newlib/libc/reent/renamer.c
newlib/libc/reent/sbrkr.c
newlib/libc/reent/signalr.c
newlib/libc/reent/signgam.c
newlib/libc/reent/stat64r.c
newlib/libc/reent/statr.c
newlib/libc/reent/timesr.c
newlib/libc/reent/unlinkr.c
newlib/libc/reent/writer.c
newlib/libc/saber
newlib/libc/search/Makefile.am
newlib/libc/search/Makefile.in
newlib/libc/search/bsearch.c
newlib/libc/search/db_local.h
newlib/libc/search/extern.h
newlib/libc/search/hash.c
newlib/libc/search/hash.h
newlib/libc/search/hash_bigkey.c
newlib/libc/search/hash_buf.c
newlib/libc/search/hash_func.c
newlib/libc/search/hash_log2.c
newlib/libc/search/hash_page.c
newlib/libc/search/hcreate.3
newlib/libc/search/hcreate.c
newlib/libc/search/hcreate_r.c
newlib/libc/search/page.h
newlib/libc/search/qsort.c
newlib/libc/search/tdelete.c
newlib/libc/search/tdestroy.c
newlib/libc/search/tfind.c
newlib/libc/search/tsearch.3
newlib/libc/search/tsearch.c
newlib/libc/search/twalk.c
newlib/libc/signal/Makefile.am
newlib/libc/signal/Makefile.in
newlib/libc/signal/psignal.c
newlib/libc/signal/raise.c
newlib/libc/signal/signal.c
newlib/libc/signal/signal.tex
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/clearerr.c
newlib/libc/stdio/diprintf.c
newlib/libc/stdio/dprintf.c
newlib/libc/stdio/fclose.c
newlib/libc/stdio/fcloseall.c
newlib/libc/stdio/fdopen.c
newlib/libc/stdio/feof.c
newlib/libc/stdio/ferror.c
newlib/libc/stdio/fflush.c
newlib/libc/stdio/fgetc.c
newlib/libc/stdio/fgetpos.c
newlib/libc/stdio/fgets.c
newlib/libc/stdio/fgetwc.c
newlib/libc/stdio/fgetws.c
newlib/libc/stdio/fileno.c
newlib/libc/stdio/findfp.c
newlib/libc/stdio/fiprintf.c
newlib/libc/stdio/fiscanf.c
newlib/libc/stdio/flags.c
newlib/libc/stdio/floatio.h
newlib/libc/stdio/fmemopen.c
newlib/libc/stdio/fopen.c
newlib/libc/stdio/fopencookie.c
newlib/libc/stdio/fprintf.c
newlib/libc/stdio/fpurge.c
newlib/libc/stdio/fputc.c
newlib/libc/stdio/fputs.c
newlib/libc/stdio/fputwc.c
newlib/libc/stdio/fputws.c
newlib/libc/stdio/fread.c
newlib/libc/stdio/freopen.c
newlib/libc/stdio/fscanf.c
newlib/libc/stdio/fseek.c
newlib/libc/stdio/fseeko.c
newlib/libc/stdio/fsetpos.c
newlib/libc/stdio/ftell.c
newlib/libc/stdio/ftello.c
newlib/libc/stdio/funopen.c
newlib/libc/stdio/fvwrite.c
newlib/libc/stdio/fvwrite.h
newlib/libc/stdio/fwalk.c
newlib/libc/stdio/fwide.c
newlib/libc/stdio/fwprintf.c
newlib/libc/stdio/fwrite.c
newlib/libc/stdio/fwscanf.c
newlib/libc/stdio/getc.c
newlib/libc/stdio/getc_u.c
newlib/libc/stdio/getchar.c
newlib/libc/stdio/getchar_u.c
newlib/libc/stdio/getdelim.c
newlib/libc/stdio/getline.c
newlib/libc/stdio/gets.c
newlib/libc/stdio/getw.c
newlib/libc/stdio/getwc.c
newlib/libc/stdio/getwchar.c
newlib/libc/stdio/iprintf.c
newlib/libc/stdio/iscanf.c
newlib/libc/stdio/local.h
newlib/libc/stdio/makebuf.c
newlib/libc/stdio/mktemp.c
newlib/libc/stdio/open_memstream.c
newlib/libc/stdio/perror.c
newlib/libc/stdio/printf.c
newlib/libc/stdio/putc.c
newlib/libc/stdio/putc_u.c
newlib/libc/stdio/putchar.c
newlib/libc/stdio/putchar_u.c
newlib/libc/stdio/puts.c
newlib/libc/stdio/putw.c
newlib/libc/stdio/putwc.c
newlib/libc/stdio/putwchar.c
newlib/libc/stdio/refill.c
newlib/libc/stdio/remove.c
newlib/libc/stdio/rename.c
newlib/libc/stdio/rewind.c
newlib/libc/stdio/rget.c
newlib/libc/stdio/scanf.c
newlib/libc/stdio/sccl.c
newlib/libc/stdio/setbuf.c
newlib/libc/stdio/setbuffer.c
newlib/libc/stdio/setlinebuf.c
newlib/libc/stdio/setvbuf.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/stdio.c
newlib/libc/stdio/stdio.tex
newlib/libc/stdio/swprintf.c
newlib/libc/stdio/swscanf.c
newlib/libc/stdio/tmpfile.c
newlib/libc/stdio/tmpnam.c
newlib/libc/stdio/ungetc.c
newlib/libc/stdio/ungetwc.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/vfieeefp.h
newlib/libc/stdio/vfprintf.c
newlib/libc/stdio/vfscanf.c
newlib/libc/stdio/vfwprintf.c
newlib/libc/stdio/vfwscanf.c
newlib/libc/stdio/viprintf.c
newlib/libc/stdio/viscanf.c
newlib/libc/stdio/vprintf.c
newlib/libc/stdio/vscanf.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/stdio/vswprintf.c
newlib/libc/stdio/vswscanf.c
newlib/libc/stdio/vwprintf.c
newlib/libc/stdio/vwscanf.c
newlib/libc/stdio/wbuf.c
newlib/libc/stdio/wprintf.c
newlib/libc/stdio/wscanf.c
newlib/libc/stdio/wsetup.c
newlib/libc/stdio64/Makefile.am
newlib/libc/stdio64/Makefile.in
newlib/libc/stdio64/dummy.c
newlib/libc/stdio64/fdopen64.c
newlib/libc/stdio64/fgetpos64.c
newlib/libc/stdio64/fopen64.c
newlib/libc/stdio64/freopen64.c
newlib/libc/stdio64/fseeko64.c
newlib/libc/stdio64/fsetpos64.c
newlib/libc/stdio64/ftello64.c
newlib/libc/stdio64/stdio64.c
newlib/libc/stdio64/stdio64.tex
newlib/libc/stdio64/tmpfile64.c
newlib/libc/stdlib/Makefile.am
newlib/libc/stdlib/Makefile.in
newlib/libc/stdlib/_Exit.c
newlib/libc/stdlib/__adjust.c
newlib/libc/stdlib/__atexit.c
newlib/libc/stdlib/__call_atexit.c
newlib/libc/stdlib/__exp10.c
newlib/libc/stdlib/__ten_mu.c
newlib/libc/stdlib/a64l.c
newlib/libc/stdlib/abort.c
newlib/libc/stdlib/abs.c
newlib/libc/stdlib/assert.c
newlib/libc/stdlib/atexit.c
newlib/libc/stdlib/atexit.h
newlib/libc/stdlib/atof.c
newlib/libc/stdlib/atoff.c
newlib/libc/stdlib/atoi.c
newlib/libc/stdlib/atol.c
newlib/libc/stdlib/atoll.c
newlib/libc/stdlib/btowc.c
newlib/libc/stdlib/calloc.c
newlib/libc/stdlib/cxa_atexit.c
newlib/libc/stdlib/cxa_finalize.c
newlib/libc/stdlib/div.c
newlib/libc/stdlib/drand48.c
newlib/libc/stdlib/dtoa.c
newlib/libc/stdlib/dtoastub.c
newlib/libc/stdlib/ecvtbuf.c
newlib/libc/stdlib/efgcvt.c
newlib/libc/stdlib/environ.c
newlib/libc/stdlib/envlock.c
newlib/libc/stdlib/eprintf.c
newlib/libc/stdlib/erand48.c
newlib/libc/stdlib/exit.c
newlib/libc/stdlib/gd_qnan.h
newlib/libc/stdlib/gdtoa-gethex.c
newlib/libc/stdlib/gdtoa-hexnan.c
newlib/libc/stdlib/gdtoa.h
newlib/libc/stdlib/getenv.c
newlib/libc/stdlib/getenv_r.c
newlib/libc/stdlib/getopt.c
newlib/libc/stdlib/getsubopt.3
newlib/libc/stdlib/getsubopt.c
newlib/libc/stdlib/jrand48.c
newlib/libc/stdlib/l64a.c
newlib/libc/stdlib/labs.c
newlib/libc/stdlib/lcong48.c
newlib/libc/stdlib/ldiv.c
newlib/libc/stdlib/ldtoa.c
newlib/libc/stdlib/llabs.c
newlib/libc/stdlib/lldiv.c
newlib/libc/stdlib/local.h
newlib/libc/stdlib/lrand48.c
newlib/libc/stdlib/malign.c
newlib/libc/stdlib/malloc.c
newlib/libc/stdlib/mallocr.c
newlib/libc/stdlib/mbctype.h
newlib/libc/stdlib/mblen.c
newlib/libc/stdlib/mblen_r.c
newlib/libc/stdlib/mbrlen.c
newlib/libc/stdlib/mbrtowc.c
newlib/libc/stdlib/mbsinit.c
newlib/libc/stdlib/mbsnrtowcs.c
newlib/libc/stdlib/mbsrtowcs.c
newlib/libc/stdlib/mbstowcs.c
newlib/libc/stdlib/mbstowcs_r.c
newlib/libc/stdlib/mbtowc.c
newlib/libc/stdlib/mbtowc_r.c
newlib/libc/stdlib/mlock.c
newlib/libc/stdlib/mprec.c
newlib/libc/stdlib/mprec.h
newlib/libc/stdlib/mrand48.c
newlib/libc/stdlib/msize.c
newlib/libc/stdlib/mstats.c
newlib/libc/stdlib/mtrim.c
newlib/libc/stdlib/nrand48.c
newlib/libc/stdlib/on_exit.c
newlib/libc/stdlib/putenv.c
newlib/libc/stdlib/putenv_r.c
newlib/libc/stdlib/rand.c
newlib/libc/stdlib/rand48.c
newlib/libc/stdlib/rand48.h
newlib/libc/stdlib/rand_r.c
newlib/libc/stdlib/realloc.c
newlib/libc/stdlib/reallocf.c
newlib/libc/stdlib/sb_charsets.c
newlib/libc/stdlib/seed48.c
newlib/libc/stdlib/setenv.c
newlib/libc/stdlib/setenv_r.c
newlib/libc/stdlib/srand48.c
newlib/libc/stdlib/std.h
newlib/libc/stdlib/stdlib.tex
newlib/libc/stdlib/strtod.c
newlib/libc/stdlib/strtol.c
newlib/libc/stdlib/strtold.c
newlib/libc/stdlib/strtoll.c
newlib/libc/stdlib/strtoll_r.c
newlib/libc/stdlib/strtoul.c
newlib/libc/stdlib/strtoull.c
newlib/libc/stdlib/strtoull_r.c
newlib/libc/stdlib/system.c
newlib/libc/stdlib/valloc.c
newlib/libc/stdlib/wcrtomb.c
newlib/libc/stdlib/wcsnrtombs.c
newlib/libc/stdlib/wcsrtombs.c
newlib/libc/stdlib/wcstod.c
newlib/libc/stdlib/wcstol.c
newlib/libc/stdlib/wcstold.c
newlib/libc/stdlib/wcstoll.c
newlib/libc/stdlib/wcstoll_r.c
newlib/libc/stdlib/wcstombs.c
newlib/libc/stdlib/wcstombs_r.c
newlib/libc/stdlib/wcstoul.c
newlib/libc/stdlib/wcstoull.c
newlib/libc/stdlib/wcstoull_r.c
newlib/libc/stdlib/wctob.c
newlib/libc/stdlib/wctomb.c
newlib/libc/stdlib/wctomb_r.c
newlib/libc/string/Makefile.am
newlib/libc/string/Makefile.in
newlib/libc/string/bcmp.c
newlib/libc/string/bcopy.c
newlib/libc/string/bzero.c
newlib/libc/string/index.c
newlib/libc/string/local.h
newlib/libc/string/memccpy.c
newlib/libc/string/memchr.c
newlib/libc/string/memcmp.c
newlib/libc/string/memcpy.c
newlib/libc/string/memmem.c
newlib/libc/string/memmove.c
newlib/libc/string/mempcpy.c
newlib/libc/string/memset.c
newlib/libc/string/rindex.c
newlib/libc/string/stpcpy.c
newlib/libc/string/stpncpy.c
newlib/libc/string/str-two-way.h
newlib/libc/string/strcasecmp.c
newlib/libc/string/strcasestr.c
newlib/libc/string/strcat.c
newlib/libc/string/strchr.c
newlib/libc/string/strchrnul.c
newlib/libc/string/strcmp.c
newlib/libc/string/strcoll.c
newlib/libc/string/strcpy.c
newlib/libc/string/strcspn.c
newlib/libc/string/strdup.c
newlib/libc/string/strdup_r.c
newlib/libc/string/strerror.c
newlib/libc/string/strerror_r.c
newlib/libc/string/strings.tex
newlib/libc/string/strlcat.c
newlib/libc/string/strlcpy.c
newlib/libc/string/strlen.c
newlib/libc/string/strlwr.c
newlib/libc/string/strncasecmp.c
newlib/libc/string/strncat.c
newlib/libc/string/strncmp.c
newlib/libc/string/strncpy.c
newlib/libc/string/strndup.c
newlib/libc/string/strndup_r.c
newlib/libc/string/strnlen.c
newlib/libc/string/strpbrk.c
newlib/libc/string/strrchr.c
newlib/libc/string/strsep.c
newlib/libc/string/strsignal.c
newlib/libc/string/strspn.c
newlib/libc/string/strstr.c
newlib/libc/string/strtok.c
newlib/libc/string/strtok_r.c
newlib/libc/string/strupr.c
newlib/libc/string/strxfrm.c
newlib/libc/string/swab.c
newlib/libc/string/u_strerr.c
newlib/libc/string/wcpcpy.c
newlib/libc/string/wcpncpy.c
newlib/libc/string/wcscasecmp.c
newlib/libc/string/wcscat.c
newlib/libc/string/wcschr.c
newlib/libc/string/wcscmp.c
newlib/libc/string/wcscoll.c
newlib/libc/string/wcscpy.c
newlib/libc/string/wcscspn.c
newlib/libc/string/wcsdup.c
newlib/libc/string/wcslcat.c
newlib/libc/string/wcslcpy.c
newlib/libc/string/wcslen.c
newlib/libc/string/wcsncasecmp.c
newlib/libc/string/wcsncat.c
newlib/libc/string/wcsncmp.c
newlib/libc/string/wcsncpy.c
newlib/libc/string/wcsnlen.c
newlib/libc/string/wcspbrk.c
newlib/libc/string/wcsrchr.c
newlib/libc/string/wcsspn.c
newlib/libc/string/wcsstr.c
newlib/libc/string/wcstok.c
newlib/libc/string/wcstrings.tex
newlib/libc/string/wcswidth.c
newlib/libc/string/wcsxfrm.c
newlib/libc/string/wcwidth.c
newlib/libc/string/wmemchr.c
newlib/libc/string/wmemcmp.c
newlib/libc/string/wmemcpy.c
newlib/libc/string/wmemmove.c
newlib/libc/string/wmemset.c
newlib/libc/string/xpg_strerror_r.c
newlib/libc/sys.tex
newlib/libc/sys/Makefile.am
newlib/libc/sys/Makefile.in
newlib/libc/sys/a29khif/Makefile.am
newlib/libc/sys/a29khif/Makefile.in
newlib/libc/sys/a29khif/_alloc.S
newlib/libc/sys/a29khif/_close.S
newlib/libc/sys/a29khif/_cycles.S
newlib/libc/sys/a29khif/_exit.S
newlib/libc/sys/a29khif/_fstat.S
newlib/libc/sys/a29khif/_getpsiz.S
newlib/libc/sys/a29khif/_gettz.S
newlib/libc/sys/a29khif/_ioctl.S
newlib/libc/sys/a29khif/_iostat.S
newlib/libc/sys/a29khif/_iowait.S
newlib/libc/sys/a29khif/_isatty.S
newlib/libc/sys/a29khif/_lseek.S
newlib/libc/sys/a29khif/_open.S
newlib/libc/sys/a29khif/_query.S
newlib/libc/sys/a29khif/_read.S
newlib/libc/sys/a29khif/_sbrk.S
newlib/libc/sys/a29khif/_setim.S
newlib/libc/sys/a29khif/_settrap.S
newlib/libc/sys/a29khif/_setvec.S
newlib/libc/sys/a29khif/_tmpnam.S
newlib/libc/sys/a29khif/_write.S
newlib/libc/sys/a29khif/aclocal.m4
newlib/libc/sys/a29khif/alloc.S
newlib/libc/sys/a29khif/clock.S
newlib/libc/sys/a29khif/configure
newlib/libc/sys/a29khif/configure.in
newlib/libc/sys/a29khif/crt0.S
newlib/libc/sys/a29khif/getargs.S
newlib/libc/sys/a29khif/getenv.S
newlib/libc/sys/a29khif/getpid.c
newlib/libc/sys/a29khif/kill.c
newlib/libc/sys/a29khif/read.S
newlib/libc/sys/a29khif/remove.S
newlib/libc/sys/a29khif/rename.S
newlib/libc/sys/a29khif/signal.S
newlib/libc/sys/a29khif/stubs.S
newlib/libc/sys/a29khif/sys/cpudef.h
newlib/libc/sys/a29khif/sys/fpsymbol.h
newlib/libc/sys/a29khif/sys/intrinsi.h
newlib/libc/sys/a29khif/sys/macros.h
newlib/libc/sys/a29khif/sys/proreg.h
newlib/libc/sys/a29khif/sys/romdcl.h
newlib/libc/sys/a29khif/sys/smartmac.h
newlib/libc/sys/a29khif/sys/sysmac.h
newlib/libc/sys/a29khif/systime.S
newlib/libc/sys/a29khif/vec.S
newlib/libc/sys/aclocal.m4
newlib/libc/sys/arc/Makefile.am
newlib/libc/sys/arc/Makefile.in
newlib/libc/sys/arc/aclocal.m4
newlib/libc/sys/arc/configure
newlib/libc/sys/arc/configure.in
newlib/libc/sys/arc/crt0.S
newlib/libc/sys/arc/dummy.S
newlib/libc/sys/arc/isatty.c
newlib/libc/sys/arc/mem-layout.c
newlib/libc/sys/arc/sbrk.c
newlib/libc/sys/arc/sys/syscall.h
newlib/libc/sys/arc/syscalls.c
newlib/libc/sys/arm/Makefile.am
newlib/libc/sys/arm/Makefile.in
newlib/libc/sys/arm/aclocal.m4
newlib/libc/sys/arm/aeabi_atexit.c
newlib/libc/sys/arm/arm.h
newlib/libc/sys/arm/configure
newlib/libc/sys/arm/configure.in
newlib/libc/sys/arm/crt0.S
newlib/libc/sys/arm/libcfunc.c
newlib/libc/sys/arm/swi.h
newlib/libc/sys/arm/sys/fcntl.h
newlib/libc/sys/arm/sys/param.h
newlib/libc/sys/arm/syscalls.c
newlib/libc/sys/arm/trap.S
newlib/libc/sys/configure
newlib/libc/sys/configure.in
newlib/libc/sys/d10v/Makefile.am
newlib/libc/sys/d10v/Makefile.in
newlib/libc/sys/d10v/aclocal.m4
newlib/libc/sys/d10v/configure
newlib/libc/sys/d10v/configure.in
newlib/libc/sys/d10v/creat.c
newlib/libc/sys/d10v/crt0.S
newlib/libc/sys/d10v/sys/syscall.h
newlib/libc/sys/d10v/syscalls.c
newlib/libc/sys/d10v/trap.S
newlib/libc/sys/decstation/Makefile.am
newlib/libc/sys/decstation/Makefile.in
newlib/libc/sys/decstation/_main.c
newlib/libc/sys/decstation/aclocal.m4
newlib/libc/sys/decstation/configure
newlib/libc/sys/decstation/configure.in
newlib/libc/sys/decstation/sys/dirent.h
newlib/libc/sys/h8300hms/Makefile.am
newlib/libc/sys/h8300hms/Makefile.in
newlib/libc/sys/h8300hms/_exit.S
newlib/libc/sys/h8300hms/aclocal.m4
newlib/libc/sys/h8300hms/close.S
newlib/libc/sys/h8300hms/configure
newlib/libc/sys/h8300hms/configure.in
newlib/libc/sys/h8300hms/crt0.S
newlib/libc/sys/h8300hms/crt1.c
newlib/libc/sys/h8300hms/fstat.S
newlib/libc/sys/h8300hms/lseek.S
newlib/libc/sys/h8300hms/misc.c
newlib/libc/sys/h8300hms/open.S
newlib/libc/sys/h8300hms/read.S
newlib/libc/sys/h8300hms/sbrk.c
newlib/libc/sys/h8300hms/setarch.h
newlib/libc/sys/h8300hms/stat.S
newlib/libc/sys/h8300hms/sys/file.h
newlib/libc/sys/h8300hms/sys/syscall.h
newlib/libc/sys/h8300hms/syscalls.c
newlib/libc/sys/h8300hms/write.S
newlib/libc/sys/h8500hms/Makefile.am
newlib/libc/sys/h8500hms/Makefile.in
newlib/libc/sys/h8500hms/aclocal.m4
newlib/libc/sys/h8500hms/configure
newlib/libc/sys/h8500hms/configure.in
newlib/libc/sys/h8500hms/crt0.c
newlib/libc/sys/h8500hms/misc.c
newlib/libc/sys/h8500hms/syscalls.c
newlib/libc/sys/linux/Makefile.am
newlib/libc/sys/linux/Makefile.in
newlib/libc/sys/linux/aclocal.m4
newlib/libc/sys/linux/aio.c
newlib/libc/sys/linux/aio64.c
newlib/libc/sys/linux/argp/Makefile.am
newlib/libc/sys/linux/argp/Makefile.in
newlib/libc/sys/linux/argp/argp-ba.c
newlib/libc/sys/linux/argp/argp-eexst.c
newlib/libc/sys/linux/argp/argp-fmtstream.c
newlib/libc/sys/linux/argp/argp-fmtstream.h
newlib/libc/sys/linux/argp/argp-fs-xinl.c
newlib/libc/sys/linux/argp/argp-help.c
newlib/libc/sys/linux/argp/argp-namefrob.h
newlib/libc/sys/linux/argp/argp-parse.c
newlib/libc/sys/linux/argp/argp-pv.c
newlib/libc/sys/linux/argp/argp-pvh.c
newlib/libc/sys/linux/argp/argp-xinl.c
newlib/libc/sys/linux/bits/dirent.h
newlib/libc/sys/linux/bits/initspin.h
newlib/libc/sys/linux/bits/libc-lock.h
newlib/libc/sys/linux/bits/pthreadtypes.h
newlib/libc/sys/linux/bits/typesizes.h
newlib/libc/sys/linux/bp-checks.h
newlib/libc/sys/linux/brk.c
newlib/libc/sys/linux/calloc.c
newlib/libc/sys/linux/callocr.c
newlib/libc/sys/linux/cfreer.c
newlib/libc/sys/linux/cfspeed.c
newlib/libc/sys/linux/clock_getres.c
newlib/libc/sys/linux/clock_gettime.c
newlib/libc/sys/linux/clock_settime.c
newlib/libc/sys/linux/cmath/Makefile.am
newlib/libc/sys/linux/cmath/Makefile.in
newlib/libc/sys/linux/cmath/math_private.h
newlib/libc/sys/linux/cmath/s_cacos.c
newlib/libc/sys/linux/cmath/s_cacosf.c
newlib/libc/sys/linux/cmath/s_cacosh.c
newlib/libc/sys/linux/cmath/s_cacoshf.c
newlib/libc/sys/linux/cmath/s_cacoshl.c
newlib/libc/sys/linux/cmath/s_cacosl.c
newlib/libc/sys/linux/cmath/s_casin.c
newlib/libc/sys/linux/cmath/s_casinf.c
newlib/libc/sys/linux/cmath/s_casinh.c
newlib/libc/sys/linux/cmath/s_casinhf.c
newlib/libc/sys/linux/cmath/s_casinhl.c
newlib/libc/sys/linux/cmath/s_casinl.c
newlib/libc/sys/linux/cmath/s_catan.c
newlib/libc/sys/linux/cmath/s_catanf.c
newlib/libc/sys/linux/cmath/s_catanh.c
newlib/libc/sys/linux/cmath/s_catanhf.c
newlib/libc/sys/linux/cmath/s_catanhl.c
newlib/libc/sys/linux/cmath/s_catanl.c
newlib/libc/sys/linux/cmath/s_cbrtl.c
newlib/libc/sys/linux/cmath/s_ccos.c
newlib/libc/sys/linux/cmath/s_ccosf.c
newlib/libc/sys/linux/cmath/s_ccosh.c
newlib/libc/sys/linux/cmath/s_ccoshf.c
newlib/libc/sys/linux/cmath/s_ccoshl.c
newlib/libc/sys/linux/cmath/s_ccosl.c
newlib/libc/sys/linux/cmath/s_cexp.c
newlib/libc/sys/linux/cmath/s_cexpf.c
newlib/libc/sys/linux/cmath/s_cexpl.c
newlib/libc/sys/linux/cmath/s_clog.c
newlib/libc/sys/linux/cmath/s_clog10.c
newlib/libc/sys/linux/cmath/s_clog10f.c
newlib/libc/sys/linux/cmath/s_clog10l.c
newlib/libc/sys/linux/cmath/s_clogf.c
newlib/libc/sys/linux/cmath/s_clogl.c
newlib/libc/sys/linux/cmath/s_cpow.c
newlib/libc/sys/linux/cmath/s_cpowf.c
newlib/libc/sys/linux/cmath/s_cpowl.c
newlib/libc/sys/linux/cmath/s_cproj.c
newlib/libc/sys/linux/cmath/s_cprojf.c
newlib/libc/sys/linux/cmath/s_cprojl.c
newlib/libc/sys/linux/cmath/s_csin.c
newlib/libc/sys/linux/cmath/s_csinf.c
newlib/libc/sys/linux/cmath/s_csinh.c
newlib/libc/sys/linux/cmath/s_csinhf.c
newlib/libc/sys/linux/cmath/s_csinhl.c
newlib/libc/sys/linux/cmath/s_csinl.c
newlib/libc/sys/linux/cmath/s_csqrt.c
newlib/libc/sys/linux/cmath/s_csqrtf.c
newlib/libc/sys/linux/cmath/s_csqrtl.c
newlib/libc/sys/linux/cmath/s_ctan.c
newlib/libc/sys/linux/cmath/s_ctanf.c
newlib/libc/sys/linux/cmath/s_ctanh.c
newlib/libc/sys/linux/cmath/s_ctanhf.c
newlib/libc/sys/linux/cmath/s_ctanhl.c
newlib/libc/sys/linux/cmath/s_ctanl.c
newlib/libc/sys/linux/config.h
newlib/libc/sys/linux/configure
newlib/libc/sys/linux/configure.in
newlib/libc/sys/linux/confstr.c
newlib/libc/sys/linux/confstr.h
newlib/libc/sys/linux/crt1.c
newlib/libc/sys/linux/ctermid.c
newlib/libc/sys/linux/dl/Makefile.am
newlib/libc/sys/linux/dl/Makefile.in
newlib/libc/sys/linux/dl/abi-tag.h
newlib/libc/sys/linux/dl/atomicity.h
newlib/libc/sys/linux/dl/dl-addr.c
newlib/libc/sys/linux/dl/dl-cache.c
newlib/libc/sys/linux/dl/dl-cache.h
newlib/libc/sys/linux/dl/dl-close.c
newlib/libc/sys/linux/dl/dl-debug.c
newlib/libc/sys/linux/dl/dl-deps.c
newlib/libc/sys/linux/dl/dl-dst.h
newlib/libc/sys/linux/dl/dl-error.c
newlib/libc/sys/linux/dl/dl-fini.c
newlib/libc/sys/linux/dl/dl-init.c
newlib/libc/sys/linux/dl/dl-iteratephdr.c
newlib/libc/sys/linux/dl/dl-libc.c
newlib/libc/sys/linux/dl/dl-librecon.h
newlib/libc/sys/linux/dl/dl-load.c
newlib/libc/sys/linux/dl/dl-local.h
newlib/libc/sys/linux/dl/dl-lookup.c
newlib/libc/sys/linux/dl/dl-lookupcfg.h
newlib/libc/sys/linux/dl/dl-minimal.c
newlib/libc/sys/linux/dl/dl-misc.c
newlib/libc/sys/linux/dl/dl-object.c
newlib/libc/sys/linux/dl/dl-open.c
newlib/libc/sys/linux/dl/dl-osinfo.h
newlib/libc/sys/linux/dl/dl-profile.c
newlib/libc/sys/linux/dl/dl-profstub.c
newlib/libc/sys/linux/dl/dl-reloc.c
newlib/libc/sys/linux/dl/dl-runtime.c
newlib/libc/sys/linux/dl/dl-support.c
newlib/libc/sys/linux/dl/dl-sym.c
newlib/libc/sys/linux/dl/dl-version.c
newlib/libc/sys/linux/dl/do-lookup.h
newlib/libc/sys/linux/dl/do-rel.h
newlib/libc/sys/linux/dl/dynamic-link.h
newlib/libc/sys/linux/dl/kernel-features.h
newlib/libc/sys/linux/dl/ldsodefs.h
newlib/libc/sys/linux/dl/libintl.h
newlib/libc/sys/linux/dl/trusted-dirs.h
newlib/libc/sys/linux/dl/unsecvars.h
newlib/libc/sys/linux/fclean.c
newlib/libc/sys/linux/flockfile.c
newlib/libc/sys/linux/fpathconf.c
newlib/libc/sys/linux/free.c
newlib/libc/sys/linux/freer.c
newlib/libc/sys/linux/fstab.c
newlib/libc/sys/linux/fstatvfs.c
newlib/libc/sys/linux/fstatvfs64.c
newlib/libc/sys/linux/ftok.c
newlib/libc/sys/linux/ftw.c
newlib/libc/sys/linux/ftw64.c
newlib/libc/sys/linux/funlockfile.c
newlib/libc/sys/linux/getdate.c
newlib/libc/sys/linux/getdate_err.c
newlib/libc/sys/linux/gethostid.c
newlib/libc/sys/linux/gethostname.c
newlib/libc/sys/linux/getlogin.c
newlib/libc/sys/linux/getopt.c
newlib/libc/sys/linux/getopt1.c
newlib/libc/sys/linux/getpwent.c
newlib/libc/sys/linux/getreent.c
newlib/libc/sys/linux/getrlimit64.c
newlib/libc/sys/linux/getwd.c
newlib/libc/sys/linux/hp-timing.h
newlib/libc/sys/linux/iconv/Makefile.am
newlib/libc/sys/linux/iconv/Makefile.in
newlib/libc/sys/linux/iconv/categories.def
newlib/libc/sys/linux/iconv/dummy-repertoire.c
newlib/libc/sys/linux/iconv/gconv.c
newlib/libc/sys/linux/iconv/gconv_builtin.c
newlib/libc/sys/linux/iconv/gconv_builtin.h
newlib/libc/sys/linux/iconv/gconv_cache.c
newlib/libc/sys/linux/iconv/gconv_charset.h
newlib/libc/sys/linux/iconv/gconv_close.c
newlib/libc/sys/linux/iconv/gconv_conf.c
newlib/libc/sys/linux/iconv/gconv_db.c
newlib/libc/sys/linux/iconv/gconv_dl.c
newlib/libc/sys/linux/iconv/gconv_int.h
newlib/libc/sys/linux/iconv/gconv_open.c
newlib/libc/sys/linux/iconv/gconv_simple.c
newlib/libc/sys/linux/iconv/gconv_trans.c
newlib/libc/sys/linux/iconv/hash-string.h
newlib/libc/sys/linux/iconv/iconv.c
newlib/libc/sys/linux/iconv/iconv.h
newlib/libc/sys/linux/iconv/iconv_charmap.c
newlib/libc/sys/linux/iconv/iconv_close.c
newlib/libc/sys/linux/iconv/iconv_open.c
newlib/libc/sys/linux/iconv/iconvconfig.h
newlib/libc/sys/linux/iconv/loadinfo.h
newlib/libc/sys/linux/iconv/localeinfo.h
newlib/libc/sys/linux/iconv/loop.c
newlib/libc/sys/linux/iconv/skeleton.c
newlib/libc/sys/linux/ids.c
newlib/libc/sys/linux/include/argp.h
newlib/libc/sys/linux/include/arpa/ftp.h
newlib/libc/sys/linux/include/arpa/inet.h
newlib/libc/sys/linux/include/arpa/nameser.h
newlib/libc/sys/linux/include/arpa/nameser_compat.h
newlib/libc/sys/linux/include/arpa/telnet.h
newlib/libc/sys/linux/include/arpa/tftp.h
newlib/libc/sys/linux/include/bp-sym.h
newlib/libc/sys/linux/include/cmathcalls.h
newlib/libc/sys/linux/include/complex.h
newlib/libc/sys/linux/include/dl-hash.h
newlib/libc/sys/linux/include/dlfcn.h
newlib/libc/sys/linux/include/fnmatch.h
newlib/libc/sys/linux/include/gconv.h
newlib/libc/sys/linux/include/getopt.h
newlib/libc/sys/linux/include/glob.h
newlib/libc/sys/linux/include/hesiod.h
newlib/libc/sys/linux/include/iconv.h
newlib/libc/sys/linux/include/ifaddrs.h
newlib/libc/sys/linux/include/limits.h
newlib/libc/sys/linux/include/link.h
newlib/libc/sys/linux/include/ltdl.h
newlib/libc/sys/linux/include/malloc.h
newlib/libc/sys/linux/include/mcheck.h
newlib/libc/sys/linux/include/mqueue.h
newlib/libc/sys/linux/include/namespace.h
newlib/libc/sys/linux/include/net/bpf.h
newlib/libc/sys/linux/include/net/bpf_compat.h
newlib/libc/sys/linux/include/net/bpfdesc.h
newlib/libc/sys/linux/include/net/bridge.h
newlib/libc/sys/linux/include/net/ethernet.h
newlib/libc/sys/linux/include/net/fddi.h
newlib/libc/sys/linux/include/net/if.h
newlib/libc/sys/linux/include/net/if_arc.h
newlib/libc/sys/linux/include/net/if_arp.h
newlib/libc/sys/linux/include/net/if_dl.h
newlib/libc/sys/linux/include/net/if_gif.h
newlib/libc/sys/linux/include/net/if_ieee80211.h
newlib/libc/sys/linux/include/net/if_llc.h
newlib/libc/sys/linux/include/net/if_mib.h
newlib/libc/sys/linux/include/net/if_ppp.h
newlib/libc/sys/linux/include/net/if_slvar.h
newlib/libc/sys/linux/include/net/if_sppp.h
newlib/libc/sys/linux/include/net/if_stf.h
newlib/libc/sys/linux/include/net/if_tap.h
newlib/libc/sys/linux/include/net/if_tapvar.h
newlib/libc/sys/linux/include/net/if_tun.h
newlib/libc/sys/linux/include/net/if_tunvar.h
newlib/libc/sys/linux/include/net/if_types.h
newlib/libc/sys/linux/include/net/if_var.h
newlib/libc/sys/linux/include/net/if_vlan_var.h
newlib/libc/sys/linux/include/net/intrq.h
newlib/libc/sys/linux/include/net/iso88025.h
newlib/libc/sys/linux/include/net/net_osdep.h
newlib/libc/sys/linux/include/net/netisr.h
newlib/libc/sys/linux/include/net/pfil.h
newlib/libc/sys/linux/include/net/pfkeyv2.h
newlib/libc/sys/linux/include/net/ppp_comp.h
newlib/libc/sys/linux/include/net/ppp_defs.h
newlib/libc/sys/linux/include/net/radix.h
newlib/libc/sys/linux/include/net/raw_cb.h
newlib/libc/sys/linux/include/net/route.h
newlib/libc/sys/linux/include/net/slcompress.h
newlib/libc/sys/linux/include/net/slip.h
newlib/libc/sys/linux/include/net/zlib.h
newlib/libc/sys/linux/include/netconfig.h
newlib/libc/sys/linux/include/netdb.h
newlib/libc/sys/linux/include/netinet/icmp6.h
newlib/libc/sys/linux/include/netinet/icmp_var.h
newlib/libc/sys/linux/include/netinet/if_ether.h
newlib/libc/sys/linux/include/netinet/igmp.h
newlib/libc/sys/linux/include/netinet/igmp_var.h
newlib/libc/sys/linux/include/netinet/in.h
newlib/libc/sys/linux/include/netinet/in_gif.h
newlib/libc/sys/linux/include/netinet/in_pcb.h
newlib/libc/sys/linux/include/netinet/in_systm.h
newlib/libc/sys/linux/include/netinet/in_var.h
newlib/libc/sys/linux/include/netinet/ip.h
newlib/libc/sys/linux/include/netinet/ip6.h
newlib/libc/sys/linux/include/netinet/ip_dummynet.h
newlib/libc/sys/linux/include/netinet/ip_ecn.h
newlib/libc/sys/linux/include/netinet/ip_encap.h
newlib/libc/sys/linux/include/netinet/ip_fw.h
newlib/libc/sys/linux/include/netinet/ip_icmp.h
newlib/libc/sys/linux/include/netinet/ip_mroute.h
newlib/libc/sys/linux/include/netinet/ip_var.h
newlib/libc/sys/linux/include/netinet/ipprotosw.h
newlib/libc/sys/linux/include/netinet/tcp.h
newlib/libc/sys/linux/include/netinet/tcp_debug.h
newlib/libc/sys/linux/include/netinet/tcp_fsm.h
newlib/libc/sys/linux/include/netinet/tcp_seq.h
newlib/libc/sys/linux/include/netinet/tcp_timer.h
newlib/libc/sys/linux/include/netinet/tcp_var.h
newlib/libc/sys/linux/include/netinet/tcpip.h
newlib/libc/sys/linux/include/netinet/udp.h
newlib/libc/sys/linux/include/netinet/udp_var.h
newlib/libc/sys/linux/include/netinet6/ah.h
newlib/libc/sys/linux/include/netinet6/ah6.h
newlib/libc/sys/linux/include/netinet6/esp.h
newlib/libc/sys/linux/include/netinet6/esp6.h
newlib/libc/sys/linux/include/netinet6/esp_rijndael.h
newlib/libc/sys/linux/include/netinet6/icmp6.h
newlib/libc/sys/linux/include/netinet6/in6.h
newlib/libc/sys/linux/include/netinet6/in6_gif.h
newlib/libc/sys/linux/include/netinet6/in6_ifattach.h
newlib/libc/sys/linux/include/netinet6/in6_pcb.h
newlib/libc/sys/linux/include/netinet6/in6_prefix.h
newlib/libc/sys/linux/include/netinet6/in6_var.h
newlib/libc/sys/linux/include/netinet6/ip6.h
newlib/libc/sys/linux/include/netinet6/ip6_ecn.h
newlib/libc/sys/linux/include/netinet6/ip6_fw.h
newlib/libc/sys/linux/include/netinet6/ip6_mroute.h
newlib/libc/sys/linux/include/netinet6/ip6_var.h
newlib/libc/sys/linux/include/netinet6/ip6protosw.h
newlib/libc/sys/linux/include/netinet6/ipcomp.h
newlib/libc/sys/linux/include/netinet6/ipcomp6.h
newlib/libc/sys/linux/include/netinet6/ipsec.h
newlib/libc/sys/linux/include/netinet6/ipsec6.h
newlib/libc/sys/linux/include/netinet6/mld6_var.h
newlib/libc/sys/linux/include/netinet6/nd6.h
newlib/libc/sys/linux/include/netinet6/pim6.h
newlib/libc/sys/linux/include/netinet6/pim6_var.h
newlib/libc/sys/linux/include/netinet6/raw_ip6.h
newlib/libc/sys/linux/include/netinet6/scope6_var.h
newlib/libc/sys/linux/include/netinet6/tcp6_var.h
newlib/libc/sys/linux/include/netinet6/udp6_var.h
newlib/libc/sys/linux/include/netns/idp.h
newlib/libc/sys/linux/include/netns/idp_var.h
newlib/libc/sys/linux/include/netns/ns.h
newlib/libc/sys/linux/include/netns/ns_error.h
newlib/libc/sys/linux/include/netns/ns_if.h
newlib/libc/sys/linux/include/netns/ns_pcb.h
newlib/libc/sys/linux/include/netns/sp.h
newlib/libc/sys/linux/include/netns/spidp.h
newlib/libc/sys/linux/include/netns/spp_debug.h
newlib/libc/sys/linux/include/netns/spp_timer.h
newlib/libc/sys/linux/include/netns/spp_var.h
newlib/libc/sys/linux/include/paths.h
newlib/libc/sys/linux/include/pthread.h
newlib/libc/sys/linux/include/regex.h
newlib/libc/sys/linux/include/resolv.h
newlib/libc/sys/linux/include/rpc/Makefile
newlib/libc/sys/linux/include/rpc/auth.h
newlib/libc/sys/linux/include/rpc/auth_des.h
newlib/libc/sys/linux/include/rpc/auth_kerb.h
newlib/libc/sys/linux/include/rpc/auth_unix.h
newlib/libc/sys/linux/include/rpc/clnt.h
newlib/libc/sys/linux/include/rpc/clnt_soc.h
newlib/libc/sys/linux/include/rpc/clnt_stat.h
newlib/libc/sys/linux/include/rpc/des.h
newlib/libc/sys/linux/include/rpc/des_crypt.h
newlib/libc/sys/linux/include/rpc/nettype.h
newlib/libc/sys/linux/include/rpc/pmap_clnt.h
newlib/libc/sys/linux/include/rpc/pmap_prot.h
newlib/libc/sys/linux/include/rpc/pmap_rmt.h
newlib/libc/sys/linux/include/rpc/raw.h
newlib/libc/sys/linux/include/rpc/rpc.h
newlib/libc/sys/linux/include/rpc/rpc_com.h
newlib/libc/sys/linux/include/rpc/rpc_msg.h
newlib/libc/sys/linux/include/rpc/rpcb_clnt.h
newlib/libc/sys/linux/include/rpc/rpcb_prot.h
newlib/libc/sys/linux/include/rpc/rpcb_prot.x
newlib/libc/sys/linux/include/rpc/rpcent.h
newlib/libc/sys/linux/include/rpc/svc.h
newlib/libc/sys/linux/include/rpc/svc_auth.h
newlib/libc/sys/linux/include/rpc/svc_dg.h
newlib/libc/sys/linux/include/rpc/svc_soc.h
newlib/libc/sys/linux/include/rpc/types.h
newlib/libc/sys/linux/include/rpc/xdr.h
newlib/libc/sys/linux/include/rune.h
newlib/libc/sys/linux/include/runetype.h
newlib/libc/sys/linux/include/sched.h
newlib/libc/sys/linux/include/semaphore.h
newlib/libc/sys/linux/include/setjmp.h
newlib/libc/sys/linux/include/setlocale.h
newlib/libc/sys/linux/include/stdint.h
newlib/libc/sys/linux/include/time.h
newlib/libc/sys/linux/include/un-namespace.h
newlib/libc/sys/linux/include/unistd.h
newlib/libc/sys/linux/include/wordexp.h
newlib/libc/sys/linux/inode.c
newlib/libc/sys/linux/internal_statvfs.c
newlib/libc/sys/linux/intl/Makefile.am
newlib/libc/sys/linux/intl/Makefile.in
newlib/libc/sys/linux/intl/bindtextdom.c
newlib/libc/sys/linux/intl/catgets.c
newlib/libc/sys/linux/intl/catgetsinfo.h
newlib/libc/sys/linux/intl/config.h
newlib/libc/sys/linux/intl/dcgettext.c
newlib/libc/sys/linux/intl/dcigettext.c
newlib/libc/sys/linux/intl/dcngettext.c
newlib/libc/sys/linux/intl/dgettext.c
newlib/libc/sys/linux/intl/dngettext.c
newlib/libc/sys/linux/intl/explodename.c
newlib/libc/sys/linux/intl/finddomain.c
newlib/libc/sys/linux/intl/gettext.c
newlib/libc/sys/linux/intl/gettext.h
newlib/libc/sys/linux/intl/gettextP.h
newlib/libc/sys/linux/intl/hash-string.h
newlib/libc/sys/linux/intl/l10nflist.c
newlib/libc/sys/linux/intl/lcl_stpcpy.c
newlib/libc/sys/linux/intl/loadinfo.h
newlib/libc/sys/linux/intl/loadmsgcat.c
newlib/libc/sys/linux/intl/localealias.c
newlib/libc/sys/linux/intl/ngettext.c
newlib/libc/sys/linux/intl/open_catalog.c
newlib/libc/sys/linux/intl/plural.c
newlib/libc/sys/linux/intl/plural.y
newlib/libc/sys/linux/intl/textdomain.c
newlib/libc/sys/linux/io.c
newlib/libc/sys/linux/io64.c
newlib/libc/sys/linux/ipc.c
newlib/libc/sys/linux/isatty.c
newlib/libc/sys/linux/kernel_sigaction.h
newlib/libc/sys/linux/libc-internal.h
newlib/libc/sys/linux/libc-symbols.h
newlib/libc/sys/linux/libc-tsd.h
newlib/libc/sys/linux/libintl.h
newlib/libc/sys/linux/linux.c
newlib/libc/sys/linux/linux_fsinfo.h
newlib/libc/sys/linux/linuxthreads/LICENSE
newlib/libc/sys/linux/linuxthreads/Makefile.am
newlib/libc/sys/linux/linuxthreads/Makefile.in
newlib/libc/sys/linux/linuxthreads/aclocal.m4
newlib/libc/sys/linux/linuxthreads/attr.c
newlib/libc/sys/linux/linuxthreads/barrier.c
newlib/libc/sys/linux/linuxthreads/bits/initspin.h
newlib/libc/sys/linux/linuxthreads/bits/libc-lock.h
newlib/libc/sys/linux/linuxthreads/bits/libc-tsd.h
newlib/libc/sys/linux/linuxthreads/bits/local_lim.h
newlib/libc/sys/linux/linuxthreads/bits/posix_opt.h
newlib/libc/sys/linux/linuxthreads/bits/pthreadtypes.h
newlib/libc/sys/linux/linuxthreads/bits/sigthread.h
newlib/libc/sys/linux/linuxthreads/bp-sym.h
newlib/libc/sys/linux/linuxthreads/cancel.c
newlib/libc/sys/linux/linuxthreads/condvar.c
newlib/libc/sys/linux/linuxthreads/config.h
newlib/libc/sys/linux/linuxthreads/configure
newlib/libc/sys/linux/linuxthreads/configure.in
newlib/libc/sys/linux/linuxthreads/defs.awk
newlib/libc/sys/linux/linuxthreads/ecmutex.c
newlib/libc/sys/linux/linuxthreads/events.c
newlib/libc/sys/linux/linuxthreads/getcpuclockid.c
newlib/libc/sys/linux/linuxthreads/getreent.c
newlib/libc/sys/linux/linuxthreads/internals.h
newlib/libc/sys/linux/linuxthreads/join.c
newlib/libc/sys/linux/linuxthreads/joinrace.c
newlib/libc/sys/linux/linuxthreads/kernel-features.h
newlib/libc/sys/linux/linuxthreads/libc-internal.h
newlib/libc/sys/linux/linuxthreads/libc-symbols.h
newlib/libc/sys/linux/linuxthreads/linuxthreads.texi
newlib/libc/sys/linux/linuxthreads/lockfile.c
newlib/libc/sys/linux/linuxthreads/machine/Makefile.am
newlib/libc/sys/linux/linuxthreads/machine/Makefile.in
newlib/libc/sys/linux/linuxthreads/machine/aclocal.m4
newlib/libc/sys/linux/linuxthreads/machine/configure
newlib/libc/sys/linux/linuxthreads/machine/configure.in
newlib/libc/sys/linux/linuxthreads/machine/generic/generic-sysdep.h
newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.am
newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.in
newlib/libc/sys/linux/linuxthreads/machine/i386/aclocal.m4
newlib/libc/sys/linux/linuxthreads/machine/i386/bp-asm.h
newlib/libc/sys/linux/linuxthreads/machine/i386/clone.S
newlib/libc/sys/linux/linuxthreads/machine/i386/configure
newlib/libc/sys/linux/linuxthreads/machine/i386/configure.in
newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.S
newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.h
newlib/libc/sys/linux/linuxthreads/machine/i386/pspinlock.c
newlib/libc/sys/linux/linuxthreads/machine/i386/pt-machine.h
newlib/libc/sys/linux/linuxthreads/machine/i386/sigcontextinfo.h
newlib/libc/sys/linux/linuxthreads/machine/i386/stackinfo.h
newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.S
newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.h
newlib/libc/sys/linux/linuxthreads/machine/i386/useldt.h
newlib/libc/sys/linux/linuxthreads/manager.c
newlib/libc/sys/linux/linuxthreads/mq_notify.c
newlib/libc/sys/linux/linuxthreads/mutex.c
newlib/libc/sys/linux/linuxthreads/no-tsd.c
newlib/libc/sys/linux/linuxthreads/oldsemaphore.c
newlib/libc/sys/linux/linuxthreads/posix-timer.h
newlib/libc/sys/linux/linuxthreads/prio.c
newlib/libc/sys/linux/linuxthreads/proc_service.h
newlib/libc/sys/linux/linuxthreads/pt-machine.c
newlib/libc/sys/linux/linuxthreads/ptclock_gettime.c
newlib/libc/sys/linux/linuxthreads/ptclock_settime.c
newlib/libc/sys/linux/linuxthreads/ptfork.c
newlib/libc/sys/linux/linuxthreads/pthread.c
newlib/libc/sys/linux/linuxthreads/ptlongjmp.c
newlib/libc/sys/linux/linuxthreads/queue.h
newlib/libc/sys/linux/linuxthreads/reent.c
newlib/libc/sys/linux/linuxthreads/reqsyscalls.c
newlib/libc/sys/linux/linuxthreads/restart.h
newlib/libc/sys/linux/linuxthreads/rwlock.c
newlib/libc/sys/linux/linuxthreads/semaphore.c
newlib/libc/sys/linux/linuxthreads/semaphore.h
newlib/libc/sys/linux/linuxthreads/shlib-compat.h
newlib/libc/sys/linux/linuxthreads/signals.c
newlib/libc/sys/linux/linuxthreads/specific.c
newlib/libc/sys/linux/linuxthreads/spinlock.c
newlib/libc/sys/linux/linuxthreads/spinlock.h
newlib/libc/sys/linux/linuxthreads/sysctl.c
newlib/libc/sys/linux/linuxthreads/td_init.c
newlib/libc/sys/linux/linuxthreads/td_log.c
newlib/libc/sys/linux/linuxthreads/td_symbol_list.c
newlib/libc/sys/linux/linuxthreads/td_ta_clear_event.c
newlib/libc/sys/linux/linuxthreads/td_ta_delete.c
newlib/libc/sys/linux/linuxthreads/td_ta_enable_stats.c
newlib/libc/sys/linux/linuxthreads/td_ta_event_addr.c
newlib/libc/sys/linux/linuxthreads/td_ta_event_getmsg.c
newlib/libc/sys/linux/linuxthreads/td_ta_get_nthreads.c
newlib/libc/sys/linux/linuxthreads/td_ta_get_ph.c
newlib/libc/sys/linux/linuxthreads/td_ta_get_stats.c
newlib/libc/sys/linux/linuxthreads/td_ta_map_id2thr.c
newlib/libc/sys/linux/linuxthreads/td_ta_map_lwp2thr.c
newlib/libc/sys/linux/linuxthreads/td_ta_new.c
newlib/libc/sys/linux/linuxthreads/td_ta_reset_stats.c
newlib/libc/sys/linux/linuxthreads/td_ta_set_event.c
newlib/libc/sys/linux/linuxthreads/td_ta_setconcurrency.c
newlib/libc/sys/linux/linuxthreads/td_ta_thr_iter.c
newlib/libc/sys/linux/linuxthreads/td_ta_tsd_iter.c
newlib/libc/sys/linux/linuxthreads/td_thr_clear_event.c
newlib/libc/sys/linux/linuxthreads/td_thr_dbresume.c
newlib/libc/sys/linux/linuxthreads/td_thr_dbsuspend.c
newlib/libc/sys/linux/linuxthreads/td_thr_event_enable.c
newlib/libc/sys/linux/linuxthreads/td_thr_event_getmsg.c
newlib/libc/sys/linux/linuxthreads/td_thr_get_info.c
newlib/libc/sys/linux/linuxthreads/td_thr_getfpregs.c
newlib/libc/sys/linux/linuxthreads/td_thr_getgregs.c
newlib/libc/sys/linux/linuxthreads/td_thr_getxregs.c
newlib/libc/sys/linux/linuxthreads/td_thr_getxregsize.c
newlib/libc/sys/linux/linuxthreads/td_thr_set_event.c
newlib/libc/sys/linux/linuxthreads/td_thr_setfpregs.c
newlib/libc/sys/linux/linuxthreads/td_thr_setgregs.c
newlib/libc/sys/linux/linuxthreads/td_thr_setprio.c
newlib/libc/sys/linux/linuxthreads/td_thr_setsigpending.c
newlib/libc/sys/linux/linuxthreads/td_thr_setxregs.c
newlib/libc/sys/linux/linuxthreads/td_thr_sigsetmask.c
newlib/libc/sys/linux/linuxthreads/td_thr_tsd.c
newlib/libc/sys/linux/linuxthreads/td_thr_validate.c
newlib/libc/sys/linux/linuxthreads/testrtsig.h
newlib/libc/sys/linux/linuxthreads/thread_db.h
newlib/libc/sys/linux/linuxthreads/thread_dbP.h
newlib/libc/sys/linux/linuxthreads/timer_create.c
newlib/libc/sys/linux/linuxthreads/timer_delete.c
newlib/libc/sys/linux/linuxthreads/timer_getoverr.c
newlib/libc/sys/linux/linuxthreads/timer_gettime.c
newlib/libc/sys/linux/linuxthreads/timer_routines.c
newlib/libc/sys/linux/linuxthreads/timer_settime.c
newlib/libc/sys/linux/linuxthreads/tst-cancel.c
newlib/libc/sys/linux/linuxthreads/tst-context.c
newlib/libc/sys/linux/linuxthreads/tststack.c
newlib/libc/sys/linux/linuxthreads/unload.c
newlib/libc/sys/linux/linuxthreads/weaks.c
newlib/libc/sys/linux/linuxthreads/wrapsyscall.c
newlib/libc/sys/linux/machine/Makefile.am
newlib/libc/sys/linux/machine/Makefile.in
newlib/libc/sys/linux/machine/aclocal.m4
newlib/libc/sys/linux/machine/configure
newlib/libc/sys/linux/machine/configure.in
newlib/libc/sys/linux/machine/hp-timing.h
newlib/libc/sys/linux/machine/i386/Makefile.am
newlib/libc/sys/linux/machine/i386/Makefile.in
newlib/libc/sys/linux/machine/i386/aclocal.m4
newlib/libc/sys/linux/machine/i386/atomic.h
newlib/libc/sys/linux/machine/i386/configure
newlib/libc/sys/linux/machine/i386/configure.in
newlib/libc/sys/linux/machine/i386/crt0.c
newlib/libc/sys/linux/machine/i386/dl-machine.h
newlib/libc/sys/linux/machine/i386/dl-procinfo.c
newlib/libc/sys/linux/machine/i386/dl-procinfo.h
newlib/libc/sys/linux/machine/i386/get_clockfreq.c
newlib/libc/sys/linux/machine/i386/getpagesize.c
newlib/libc/sys/linux/machine/i386/hp-timing.c
newlib/libc/sys/linux/machine/i386/hp-timing.h
newlib/libc/sys/linux/machine/i386/huge_val.h
newlib/libc/sys/linux/machine/i386/i386mach.h
newlib/libc/sys/linux/machine/i386/include/endian.h
newlib/libc/sys/linux/machine/i386/include/param.h
newlib/libc/sys/linux/machine/i386/include/setjmp.h
newlib/libc/sys/linux/machine/i386/include/termios.h
newlib/libc/sys/linux/machine/i386/setjmp.S
newlib/libc/sys/linux/machine/i386/sigaction.c
newlib/libc/sys/linux/machine/i386/sigstack.h
newlib/libc/sys/linux/machine/i386/socketcall.h
newlib/libc/sys/linux/machine/i386/syscall.h
newlib/libc/sys/linux/machine/i386/sysdep.h
newlib/libc/sys/linux/machine/i386/weakalias.h
newlib/libc/sys/linux/malign.c
newlib/libc/sys/linux/malignr.c
newlib/libc/sys/linux/mallinfor.c
newlib/libc/sys/linux/malloc.c
newlib/libc/sys/linux/mallocr.c
newlib/libc/sys/linux/malloptr.c
newlib/libc/sys/linux/mallstatsr.c
newlib/libc/sys/linux/mcheck.c
newlib/libc/sys/linux/mhooks.h
newlib/libc/sys/linux/mmap.c
newlib/libc/sys/linux/mntent.c
newlib/libc/sys/linux/mntent_r.c
newlib/libc/sys/linux/mq_close.c
newlib/libc/sys/linux/mq_getattr.c
newlib/libc/sys/linux/mq_notify.c
newlib/libc/sys/linux/mq_open.c
newlib/libc/sys/linux/mq_receive.c
newlib/libc/sys/linux/mq_send.c
newlib/libc/sys/linux/mq_setattr.c
newlib/libc/sys/linux/mq_unlink.c
newlib/libc/sys/linux/mqlocal.h
newlib/libc/sys/linux/msize.c
newlib/libc/sys/linux/msizer.c
newlib/libc/sys/linux/mstats.c
newlib/libc/sys/linux/mtrim.c
newlib/libc/sys/linux/mtrimr.c
newlib/libc/sys/linux/net/Makefile.am
newlib/libc/sys/linux/net/Makefile.in
newlib/libc/sys/linux/net/XXX-lookup.c
newlib/libc/sys/linux/net/addr2ascii.c
newlib/libc/sys/linux/net/alias-lookup.c
newlib/libc/sys/linux/net/aliases.h
newlib/libc/sys/linux/net/ascii2addr.c
newlib/libc/sys/linux/net/base64.c
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/getaddrinfo.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/getnameinfo.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.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.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/ifname.c
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_addr.c
newlib/libc/sys/linux/net/inet_lnaof.c
newlib/libc/sys/linux/net/inet_mkadr.c
newlib/libc/sys/linux/net/inet_net.c
newlib/libc/sys/linux/net/inet_net_ntop.c
newlib/libc/sys/linux/net/inet_net_pton.c
newlib/libc/sys/linux/net/inet_neta.c
newlib/libc/sys/linux/net/inet_netof.c
newlib/libc/sys/linux/net/inet_ntoa.c
newlib/libc/sys/linux/net/inet_ntop.c
newlib/libc/sys/linux/net/inet_pton.c
newlib/libc/sys/linux/net/issetugid-stub.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_name.c
newlib/libc/sys/linux/net/ns_netint.c
newlib/libc/sys/linux/net/ns_parse.c
newlib/libc/sys/linux/net/ns_print.c
newlib/libc/sys/linux/net/ns_samedomain.c
newlib/libc/sys/linux/net/ns_ttl.c
newlib/libc/sys/linux/net/nsap_addr.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/rcmd.c
newlib/libc/sys/linux/net/rcmdsh.c
newlib/libc/sys/linux/net/recv.c
newlib/libc/sys/linux/net/res_comp.c
newlib/libc/sys/linux/net/res_data.c
newlib/libc/sys/linux/net/res_debug.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_init.c
newlib/libc/sys/linux/net/res_libc.c
newlib/libc/sys/linux/net/res_mkquery.c
newlib/libc/sys/linux/net/res_query.c
newlib/libc/sys/linux/net/res_send.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/send.c
newlib/libc/sys/linux/net/service-lookup.c
newlib/libc/sys/linux/net/spwd-lookup.c
newlib/libc/sys/linux/net/un-namespace.h
newlib/libc/sys/linux/ntp_gettime.c
newlib/libc/sys/linux/pathconf.c
newlib/libc/sys/linux/pread.c
newlib/libc/sys/linux/pread64.c
newlib/libc/sys/linux/process.c
newlib/libc/sys/linux/prof-freq.c
newlib/libc/sys/linux/profile.c
newlib/libc/sys/linux/pvallocr.c
newlib/libc/sys/linux/pwrite.c
newlib/libc/sys/linux/pwrite64.c
newlib/libc/sys/linux/raise.c
newlib/libc/sys/linux/readdir64.c
newlib/libc/sys/linux/realloc.c
newlib/libc/sys/linux/reallocr.c
newlib/libc/sys/linux/realpath.c
newlib/libc/sys/linux/rename.c
newlib/libc/sys/linux/resource.c
newlib/libc/sys/linux/scandir64.c
newlib/libc/sys/linux/sched.c
newlib/libc/sys/linux/select.c
newlib/libc/sys/linux/seteuid.c
newlib/libc/sys/linux/sethostid.c
newlib/libc/sys/linux/sethostname.c
newlib/libc/sys/linux/setrlimit64.c
newlib/libc/sys/linux/shared.ld
newlib/libc/sys/linux/shlib-compat.h
newlib/libc/sys/linux/shm_open.c
newlib/libc/sys/linux/shm_unlink.c
newlib/libc/sys/linux/sig.c
newlib/libc/sys/linux/sigaction.c
newlib/libc/sys/linux/siglongjmp.c
newlib/libc/sys/linux/signal.c
newlib/libc/sys/linux/sigqueue.c
newlib/libc/sys/linux/sigset.c
newlib/libc/sys/linux/sigwait.c
newlib/libc/sys/linux/sleep.c
newlib/libc/sys/linux/socket.c
newlib/libc/sys/linux/sockops.h
newlib/libc/sys/linux/stack.c
newlib/libc/sys/linux/statvfs.c
newlib/libc/sys/linux/statvfs64.c
newlib/libc/sys/linux/strsignal.c
newlib/libc/sys/linux/strverscmp.c
newlib/libc/sys/linux/sys/_types.h
newlib/libc/sys/linux/sys/cdefs.h
newlib/libc/sys/linux/sys/dirent.h
newlib/libc/sys/linux/sys/dlfcn.h
newlib/libc/sys/linux/sys/elfclass.h
newlib/libc/sys/linux/sys/errno.h
newlib/libc/sys/linux/sys/event.h
newlib/libc/sys/linux/sys/fcntl.h
newlib/libc/sys/linux/sys/features.h
newlib/libc/sys/linux/sys/file.h
newlib/libc/sys/linux/sys/ioccom.h
newlib/libc/sys/linux/sys/ioctl.h
newlib/libc/sys/linux/sys/libc-lock.h
newlib/libc/sys/linux/sys/libc-tsd.h
newlib/libc/sys/linux/sys/link.h
newlib/libc/sys/linux/sys/linux_time.h
newlib/libc/sys/linux/sys/lock.h
newlib/libc/sys/linux/sys/param.h
newlib/libc/sys/linux/sys/resource.h
newlib/libc/sys/linux/sys/select.h
newlib/libc/sys/linux/sys/signal.h
newlib/libc/sys/linux/sys/socket.h
newlib/libc/sys/linux/sys/sockio.h
newlib/libc/sys/linux/sys/stat.h
newlib/libc/sys/linux/sys/stdint.h
newlib/libc/sys/linux/sys/stdio.h
newlib/libc/sys/linux/sys/string.h
newlib/libc/sys/linux/sys/termios.h
newlib/libc/sys/linux/sys/time.h
newlib/libc/sys/linux/sys/types.h
newlib/libc/sys/linux/sys/unistd.h
newlib/libc/sys/linux/sys/utime.h
newlib/libc/sys/linux/sys/utmp.h
newlib/libc/sys/linux/sys/utsname.h
newlib/libc/sys/linux/sys/wait.h
newlib/libc/sys/linux/sysconf.c
newlib/libc/sys/linux/sysctl.c
newlib/libc/sys/linux/systat.c
newlib/libc/sys/linux/system.c
newlib/libc/sys/linux/tcdrain.c
newlib/libc/sys/linux/tcsendbrk.c
newlib/libc/sys/linux/termios.c
newlib/libc/sys/linux/thread-m.h
newlib/libc/sys/linux/time.c
newlib/libc/sys/linux/ttyname_r.c
newlib/libc/sys/linux/usleep.c
newlib/libc/sys/linux/utimes.c
newlib/libc/sys/linux/vallocr.c
newlib/libc/sys/linux/versionsort.c
newlib/libc/sys/linux/versionsort64.c
newlib/libc/sys/linux/wait.c
newlib/libc/sys/m88kbug/Makefile.am
newlib/libc/sys/m88kbug/Makefile.in
newlib/libc/sys/m88kbug/aclocal.m4
newlib/libc/sys/m88kbug/configure
newlib/libc/sys/m88kbug/configure.in
newlib/libc/sys/m88kbug/crt0.c
newlib/libc/sys/m88kbug/sys/systraps.h
newlib/libc/sys/m88kbug/syscalls.c
newlib/libc/sys/mmixware/Makefile.am
newlib/libc/sys/mmixware/Makefile.in
newlib/libc/sys/mmixware/_exit.c
newlib/libc/sys/mmixware/access.c
newlib/libc/sys/mmixware/aclocal.m4
newlib/libc/sys/mmixware/chmod.c
newlib/libc/sys/mmixware/chown.c
newlib/libc/sys/mmixware/close.c
newlib/libc/sys/mmixware/configure
newlib/libc/sys/mmixware/configure.in
newlib/libc/sys/mmixware/creat.c
newlib/libc/sys/mmixware/crt0.c
newlib/libc/sys/mmixware/execv.c
newlib/libc/sys/mmixware/execve.c
newlib/libc/sys/mmixware/fork.c
newlib/libc/sys/mmixware/fstat.c
newlib/libc/sys/mmixware/getpid.c
newlib/libc/sys/mmixware/gettime.c
newlib/libc/sys/mmixware/isatty.c
newlib/libc/sys/mmixware/kill.c
newlib/libc/sys/mmixware/link.c
newlib/libc/sys/mmixware/lseek.c
newlib/libc/sys/mmixware/open.c
newlib/libc/sys/mmixware/pipe.c
newlib/libc/sys/mmixware/read.c
newlib/libc/sys/mmixware/sbrk.c
newlib/libc/sys/mmixware/setjmp.S
newlib/libc/sys/mmixware/stat.c
newlib/libc/sys/mmixware/sys/syscall.h
newlib/libc/sys/mmixware/time.c
newlib/libc/sys/mmixware/times.c
newlib/libc/sys/mmixware/unlink.c
newlib/libc/sys/mmixware/utime.c
newlib/libc/sys/mmixware/wait.c
newlib/libc/sys/mmixware/write.c
newlib/libc/sys/netware/Makefile.am
newlib/libc/sys/netware/Makefile.in
newlib/libc/sys/netware/aclocal.m4
newlib/libc/sys/netware/configure
newlib/libc/sys/netware/configure.in
newlib/libc/sys/netware/crt0.c
newlib/libc/sys/netware/getpid.c
newlib/libc/sys/netware/link.c
newlib/libc/sys/rdos/Makefile.am
newlib/libc/sys/rdos/Makefile.in
newlib/libc/sys/rdos/aclocal.m4
newlib/libc/sys/rdos/chown.c
newlib/libc/sys/rdos/close.c
newlib/libc/sys/rdos/config.h
newlib/libc/sys/rdos/configure
newlib/libc/sys/rdos/configure.in
newlib/libc/sys/rdos/crt0.S
newlib/libc/sys/rdos/execve.c
newlib/libc/sys/rdos/fork.c
newlib/libc/sys/rdos/fstat.c
newlib/libc/sys/rdos/getenv.c
newlib/libc/sys/rdos/getpid.c
newlib/libc/sys/rdos/gettod.c
newlib/libc/sys/rdos/isatty.c
newlib/libc/sys/rdos/kill.c
newlib/libc/sys/rdos/link.c
newlib/libc/sys/rdos/lseek.c
newlib/libc/sys/rdos/open.c
newlib/libc/sys/rdos/rdos.S
newlib/libc/sys/rdos/rdos.h
newlib/libc/sys/rdos/rdoshelp.c
newlib/libc/sys/rdos/read.c
newlib/libc/sys/rdos/readlink.c
newlib/libc/sys/rdos/sbrk.c
newlib/libc/sys/rdos/stat.c
newlib/libc/sys/rdos/symlink.c
newlib/libc/sys/rdos/times.c
newlib/libc/sys/rdos/unlink.c
newlib/libc/sys/rdos/user.def
newlib/libc/sys/rdos/wait.c
newlib/libc/sys/rdos/write.c
newlib/libc/sys/rtems/Makefile.am
newlib/libc/sys/rtems/Makefile.in
newlib/libc/sys/rtems/aclocal.m4
newlib/libc/sys/rtems/configure
newlib/libc/sys/rtems/configure.in
newlib/libc/sys/rtems/crt0.c
newlib/libc/sys/rtems/dummysys.c
newlib/libc/sys/rtems/include/limits.h
newlib/libc/sys/rtems/machine/_types.h
newlib/libc/sys/rtems/machine/limits.h
newlib/libc/sys/rtems/machine/param.h
newlib/libc/sys/rtems/sys/dirent.h
newlib/libc/sys/rtems/sys/param.h
newlib/libc/sys/rtems/sys/queue.h
newlib/libc/sys/rtems/sys/syslimits.h
newlib/libc/sys/rtems/sys/utime.h
newlib/libc/sys/sh/Makefile.am
newlib/libc/sys/sh/Makefile.in
newlib/libc/sys/sh/aclocal.m4
newlib/libc/sys/sh/configure
newlib/libc/sys/sh/configure.in
newlib/libc/sys/sh/creat.c
newlib/libc/sys/sh/crt0.S
newlib/libc/sys/sh/ftruncate.c
newlib/libc/sys/sh/sys/syscall.h
newlib/libc/sys/sh/syscalls.c
newlib/libc/sys/sh/trap.S
newlib/libc/sys/sh/truncate.c
newlib/libc/sys/sparc64/Makefile.am
newlib/libc/sys/sparc64/Makefile.in
newlib/libc/sys/sparc64/_exit.S
newlib/libc/sys/sparc64/_main.c
newlib/libc/sys/sparc64/aclocal.m4
newlib/libc/sys/sparc64/cerror.S
newlib/libc/sys/sparc64/closedir.c
newlib/libc/sys/sparc64/configure
newlib/libc/sys/sparc64/configure.in
newlib/libc/sys/sparc64/creat.c
newlib/libc/sys/sparc64/crt0.S
newlib/libc/sys/sparc64/dup2.S
newlib/libc/sys/sparc64/execve.S
newlib/libc/sys/sparc64/ieee.c
newlib/libc/sys/sparc64/isatty.c
newlib/libc/sys/sparc64/lstat.S
newlib/libc/sys/sparc64/opendir.c
newlib/libc/sys/sparc64/readdir.c
newlib/libc/sys/sparc64/rewinddir.c
newlib/libc/sys/sparc64/sbrk.S
newlib/libc/sys/sparc64/scandir.c
newlib/libc/sys/sparc64/seekdir.c
newlib/libc/sys/sparc64/sigsetjmp.S
newlib/libc/sys/sparc64/stat.S
newlib/libc/sys/sparc64/sys/dirent.h
newlib/libc/sys/sparc64/sys/fcntl.h
newlib/libc/sys/sparc64/sys/file.h
newlib/libc/sys/sparc64/sys/stat.h
newlib/libc/sys/sparc64/sys/syscall.h
newlib/libc/sys/sparc64/sys/syscallasm.h
newlib/libc/sys/sparc64/sys/termios.h
newlib/libc/sys/sparc64/sys/time.h
newlib/libc/sys/sparc64/sys/utime.h
newlib/libc/sys/sparc64/sys/utmp.h
newlib/libc/sys/sparc64/sys/wait.h
newlib/libc/sys/sparc64/telldir.c
newlib/libc/sys/sparc64/template.S
newlib/libc/sys/sparc64/template_r.S
newlib/libc/sys/sparc64/utime.S
newlib/libc/sys/sparc64/utime2.c
newlib/libc/sys/sparc64/wait.S
newlib/libc/sys/sun4/Makefile.am
newlib/libc/sys/sun4/Makefile.in
newlib/libc/sys/sun4/_main.c
newlib/libc/sys/sun4/aclocal.m4
newlib/libc/sys/sun4/configure
newlib/libc/sys/sun4/configure.in
newlib/libc/sys/sun4/ieee.c
newlib/libc/sys/sun4/sys/dirent.h
newlib/libc/sys/sun4/sys/file.h
newlib/libc/sys/sun4/sys/termios.h
newlib/libc/sys/sun4/sys/utime.h
newlib/libc/sys/sun4/sys/utmp.h
newlib/libc/sys/sun4/sys/wait.h
newlib/libc/sys/sysmec/Makefile.am
newlib/libc/sys/sysmec/Makefile.in
newlib/libc/sys/sysmec/_exit.c
newlib/libc/sys/sysmec/access.c
newlib/libc/sys/sysmec/aclocal.m4
newlib/libc/sys/sysmec/chmod.c
newlib/libc/sys/sysmec/chown.c
newlib/libc/sys/sysmec/close.c
newlib/libc/sys/sysmec/configure
newlib/libc/sys/sysmec/configure.in
newlib/libc/sys/sysmec/creat.c
newlib/libc/sys/sysmec/crt0.S
newlib/libc/sys/sysmec/crt1.c
newlib/libc/sys/sysmec/execv.c
newlib/libc/sys/sysmec/execve.c
newlib/libc/sys/sysmec/fork.c
newlib/libc/sys/sysmec/fstat.c
newlib/libc/sys/sysmec/getpid.c
newlib/libc/sys/sysmec/gettime.c
newlib/libc/sys/sysmec/isatty.c
newlib/libc/sys/sysmec/kill.c
newlib/libc/sys/sysmec/lseek.c
newlib/libc/sys/sysmec/open.c
newlib/libc/sys/sysmec/pipe.c
newlib/libc/sys/sysmec/read.c
newlib/libc/sys/sysmec/sbrk.c
newlib/libc/sys/sysmec/stat.c
newlib/libc/sys/sysmec/sys/syscall.h
newlib/libc/sys/sysmec/time.c
newlib/libc/sys/sysmec/times.c
newlib/libc/sys/sysmec/trap.S
newlib/libc/sys/sysmec/unlink.c
newlib/libc/sys/sysmec/utime.c
newlib/libc/sys/sysmec/wait.c
newlib/libc/sys/sysmec/write.c
newlib/libc/sys/sysnec810/Makefile.am
newlib/libc/sys/sysnec810/Makefile.in
newlib/libc/sys/sysnec810/aclocal.m4
newlib/libc/sys/sysnec810/configure
newlib/libc/sys/sysnec810/configure.in
newlib/libc/sys/sysnec810/crt0.S
newlib/libc/sys/sysnec810/io.S
newlib/libc/sys/sysnec810/misc.c
newlib/libc/sys/sysnec810/sbrk.c
newlib/libc/sys/sysnec810/write.c
newlib/libc/sys/sysnecv850/Makefile.am
newlib/libc/sys/sysnecv850/Makefile.in
newlib/libc/sys/sysnecv850/_exit.c
newlib/libc/sys/sysnecv850/access.c
newlib/libc/sys/sysnecv850/aclocal.m4
newlib/libc/sys/sysnecv850/chmod.c
newlib/libc/sys/sysnecv850/chown.c
newlib/libc/sys/sysnecv850/close.c
newlib/libc/sys/sysnecv850/configure
newlib/libc/sys/sysnecv850/configure.in
newlib/libc/sys/sysnecv850/creat.c
newlib/libc/sys/sysnecv850/crt0.S
newlib/libc/sys/sysnecv850/crt1.c
newlib/libc/sys/sysnecv850/execv.c
newlib/libc/sys/sysnecv850/execve.c
newlib/libc/sys/sysnecv850/fork.c
newlib/libc/sys/sysnecv850/fstat.c
newlib/libc/sys/sysnecv850/getpid.c
newlib/libc/sys/sysnecv850/gettime.c
newlib/libc/sys/sysnecv850/isatty.c
newlib/libc/sys/sysnecv850/kill.c
newlib/libc/sys/sysnecv850/link.c
newlib/libc/sys/sysnecv850/lseek.c
newlib/libc/sys/sysnecv850/open.c
newlib/libc/sys/sysnecv850/pipe.c
newlib/libc/sys/sysnecv850/read.c
newlib/libc/sys/sysnecv850/rename.c
newlib/libc/sys/sysnecv850/sbrk.c
newlib/libc/sys/sysnecv850/stat.c
newlib/libc/sys/sysnecv850/sys/syscall.h
newlib/libc/sys/sysnecv850/time.c
newlib/libc/sys/sysnecv850/times.c
newlib/libc/sys/sysnecv850/trap.S
newlib/libc/sys/sysnecv850/unlink.c
newlib/libc/sys/sysnecv850/utime.c
newlib/libc/sys/sysnecv850/wait.c
newlib/libc/sys/sysnecv850/write.c
newlib/libc/sys/sysvi386/Makefile.am
newlib/libc/sys/sysvi386/Makefile.in
newlib/libc/sys/sysvi386/_exit.S
newlib/libc/sys/sysvi386/_longjmp.S
newlib/libc/sys/sysvi386/_setjmp.S
newlib/libc/sys/sysvi386/access.S
newlib/libc/sys/sysvi386/aclocal.m4
newlib/libc/sys/sysvi386/alarm.S
newlib/libc/sys/sysvi386/brk.S
newlib/libc/sys/sysvi386/cerror.S
newlib/libc/sys/sysvi386/chdir.S
newlib/libc/sys/sysvi386/chmod.S
newlib/libc/sys/sysvi386/close.S
newlib/libc/sys/sysvi386/closedir.c
newlib/libc/sys/sysvi386/configure
newlib/libc/sys/sysvi386/configure.in
newlib/libc/sys/sysvi386/crt0.c
newlib/libc/sys/sysvi386/dup.c
newlib/libc/sys/sysvi386/dup2.c
newlib/libc/sys/sysvi386/exec.c
newlib/libc/sys/sysvi386/execve.S
newlib/libc/sys/sysvi386/fcntl.S
newlib/libc/sys/sysvi386/fork.S
newlib/libc/sys/sysvi386/fpathconf.S
newlib/libc/sys/sysvi386/fps.S
newlib/libc/sys/sysvi386/fpx.c
newlib/libc/sys/sysvi386/fstat.S
newlib/libc/sys/sysvi386/getdents.S
newlib/libc/sys/sysvi386/getegid.S
newlib/libc/sys/sysvi386/geteuid.S
newlib/libc/sys/sysvi386/getgid.S
newlib/libc/sys/sysvi386/getgroups.S
newlib/libc/sys/sysvi386/getpid.S
newlib/libc/sys/sysvi386/getuid.S
newlib/libc/sys/sysvi386/ioctl.S
newlib/libc/sys/sysvi386/isatty.c
newlib/libc/sys/sysvi386/kill.S
newlib/libc/sys/sysvi386/link.S
newlib/libc/sys/sysvi386/lseek.S
newlib/libc/sys/sysvi386/mkdir.S
newlib/libc/sys/sysvi386/open.S
newlib/libc/sys/sysvi386/opendir.c
newlib/libc/sys/sysvi386/pathconf.S
newlib/libc/sys/sysvi386/pause.S
newlib/libc/sys/sysvi386/pipe.S
newlib/libc/sys/sysvi386/read.S
newlib/libc/sys/sysvi386/readdir.c
newlib/libc/sys/sysvi386/rename.S
newlib/libc/sys/sysvi386/rewinddir.c
newlib/libc/sys/sysvi386/rmdir.S
newlib/libc/sys/sysvi386/sbrk.c
newlib/libc/sys/sysvi386/scandir.c
newlib/libc/sys/sysvi386/seekdir.c
newlib/libc/sys/sysvi386/setgid.S
newlib/libc/sys/sysvi386/setuid.S
newlib/libc/sys/sysvi386/sigaction.S
newlib/libc/sys/sysvi386/signal.S
newlib/libc/sys/sysvi386/sigprocmask.S
newlib/libc/sys/sysvi386/sleep.c
newlib/libc/sys/sysvi386/speed.c
newlib/libc/sys/sysvi386/stat.S
newlib/libc/sys/sysvi386/sys/dirent.h
newlib/libc/sys/sysvi386/sys/setjmp.h
newlib/libc/sys/sysvi386/sys/termio.h
newlib/libc/sys/sysvi386/sys/termios.h
newlib/libc/sys/sysvi386/sys/utime.h
newlib/libc/sys/sysvi386/sys/utmp.h
newlib/libc/sys/sysvi386/sys/wait.h
newlib/libc/sys/sysvi386/sysconf.S
newlib/libc/sys/sysvi386/tcgetattr.c
newlib/libc/sys/sysvi386/tcline.c
newlib/libc/sys/sysvi386/tcsetattr.c
newlib/libc/sys/sysvi386/telldir.c
newlib/libc/sys/sysvi386/time.S
newlib/libc/sys/sysvi386/times.S
newlib/libc/sys/sysvi386/unlink.S
newlib/libc/sys/sysvi386/utime.S
newlib/libc/sys/sysvi386/wait.S
newlib/libc/sys/sysvi386/waitpid.S
newlib/libc/sys/sysvi386/write.S
newlib/libc/sys/sysvnecv70/Makefile.am
newlib/libc/sys/sysvnecv70/Makefile.in
newlib/libc/sys/sysvnecv70/aclocal.m4
newlib/libc/sys/sysvnecv70/cerror.S
newlib/libc/sys/sysvnecv70/close.S
newlib/libc/sys/sysvnecv70/configure
newlib/libc/sys/sysvnecv70/configure.in
newlib/libc/sys/sysvnecv70/crt0.S
newlib/libc/sys/sysvnecv70/exit.S
newlib/libc/sys/sysvnecv70/fps.S
newlib/libc/sys/sysvnecv70/fpx.c
newlib/libc/sys/sysvnecv70/fstat.S
newlib/libc/sys/sysvnecv70/ioctl.S
newlib/libc/sys/sysvnecv70/isatty.S
newlib/libc/sys/sysvnecv70/lseek.S
newlib/libc/sys/sysvnecv70/open.S
newlib/libc/sys/sysvnecv70/read.S
newlib/libc/sys/sysvnecv70/sbrk.S
newlib/libc/sys/sysvnecv70/sysv60.S
newlib/libc/sys/sysvnecv70/sysvnecv70.tex
newlib/libc/sys/sysvnecv70/write.S
newlib/libc/sys/tic80/Makefile.am
newlib/libc/sys/tic80/Makefile.in
newlib/libc/sys/tic80/aclocal.m4
newlib/libc/sys/tic80/configure
newlib/libc/sys/tic80/configure.in
newlib/libc/sys/tic80/crt0.c
newlib/libc/sys/w65/Makefile.am
newlib/libc/sys/w65/Makefile.in
newlib/libc/sys/w65/aclocal.m4
newlib/libc/sys/w65/configure
newlib/libc/sys/w65/configure.in
newlib/libc/sys/w65/crt0.c
newlib/libc/sys/w65/sys/syscall.h
newlib/libc/sys/w65/syscalls.c
newlib/libc/sys/w65/trap.c
newlib/libc/sys/z8ksim/Makefile.am
newlib/libc/sys/z8ksim/Makefile.in
newlib/libc/sys/z8ksim/aclocal.m4
newlib/libc/sys/z8ksim/configure
newlib/libc/sys/z8ksim/configure.in
newlib/libc/sys/z8ksim/crt0.c
newlib/libc/sys/z8ksim/glue.c
newlib/libc/sys/z8ksim/sys/syscall.h
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/sysisatty.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/Makefile.am
newlib/libc/time/Makefile.in
newlib/libc/time/asctime.c
newlib/libc/time/asctime_r.c
newlib/libc/time/clock.c
newlib/libc/time/ctime.c
newlib/libc/time/ctime_r.c
newlib/libc/time/difftime.c
newlib/libc/time/gettzinfo.c
newlib/libc/time/gmtime.c
newlib/libc/time/gmtime_r.c
newlib/libc/time/lcltime.c
newlib/libc/time/lcltime_r.c
newlib/libc/time/local.h
newlib/libc/time/mktime.c
newlib/libc/time/mktm_r.c
newlib/libc/time/strftime.c
newlib/libc/time/strptime.c
newlib/libc/time/time.c
newlib/libc/time/time.tex
newlib/libc/time/tzlock.c
newlib/libc/time/tzset.c
newlib/libc/time/tzset_r.c
newlib/libc/time/tzvars.c
newlib/libc/time/wcsftime.c
newlib/libc/unix/Makefile.am
newlib/libc/unix/Makefile.in
newlib/libc/unix/basename.c
newlib/libc/unix/dirname.c
newlib/libc/unix/getcwd.c
newlib/libc/unix/getlogin.c
newlib/libc/unix/getpass.c
newlib/libc/unix/getpwent.c
newlib/libc/unix/getut.c
newlib/libc/unix/pread.c
newlib/libc/unix/pwrite.c
newlib/libc/unix/sigset.c
newlib/libc/unix/ttyname.c
newlib/libc/unix/ttyname.h
newlib/libc/unix/ttyname_r.c
newlib/libc/xdr/Makefile.am
newlib/libc/xdr/Makefile.in
newlib/libc/xdr/README
newlib/libc/xdr/dummy.c
newlib/libc/xdr/xdr.c
newlib/libc/xdr/xdr_array.c
newlib/libc/xdr/xdr_float.c
newlib/libc/xdr/xdr_float_vax.c
newlib/libc/xdr/xdr_mem.c
newlib/libc/xdr/xdr_private.c
newlib/libc/xdr/xdr_private.h
newlib/libc/xdr/xdr_rec.c
newlib/libc/xdr/xdr_reference.c
newlib/libc/xdr/xdr_sizeof.c
newlib/libc/xdr/xdr_stdio.c
newlib/libm/Makefile.am
newlib/libm/Makefile.in
newlib/libm/aclocal.m4
newlib/libm/common/Makefile.am
newlib/libm/common/Makefile.in
newlib/libm/common/acoshl.c
newlib/libm/common/acosl.c
newlib/libm/common/asinhl.c
newlib/libm/common/asinl.c
newlib/libm/common/atan2l.c
newlib/libm/common/atanhl.c
newlib/libm/common/atanl.c
newlib/libm/common/cbrtl.c
newlib/libm/common/ceill.c
newlib/libm/common/copysignl.c
newlib/libm/common/coshl.c
newlib/libm/common/cosl.c
newlib/libm/common/erfcl.c
newlib/libm/common/erfl.c
newlib/libm/common/exp2l.c
newlib/libm/common/expl.c
newlib/libm/common/expm1l.c
newlib/libm/common/fabsl.c
newlib/libm/common/fdiml.c
newlib/libm/common/fdlibm.h
newlib/libm/common/floorl.c
newlib/libm/common/fmal.c
newlib/libm/common/fmaxl.c
newlib/libm/common/fminl.c
newlib/libm/common/fmodl.c
newlib/libm/common/frexpl.c
newlib/libm/common/hypotl.c
newlib/libm/common/ilogbl.c
newlib/libm/common/isgreater.c
newlib/libm/common/ldexpl.c
newlib/libm/common/lgammal.c
newlib/libm/common/llrintl.c
newlib/libm/common/llroundl.c
newlib/libm/common/local.h
newlib/libm/common/log10l.c
newlib/libm/common/log1pl.c
newlib/libm/common/logl.c
newlib/libm/common/lrintl.c
newlib/libm/common/lroundl.c
newlib/libm/common/modfl.c
newlib/libm/common/nanl.c
newlib/libm/common/nearbyintl.c
newlib/libm/common/nextafterl.c
newlib/libm/common/powl.c
newlib/libm/common/remainderl.c
newlib/libm/common/remquol.c
newlib/libm/common/rintl.c
newlib/libm/common/roundl.c
newlib/libm/common/s_cbrt.c
newlib/libm/common/s_copysign.c
newlib/libm/common/s_exp10.c
newlib/libm/common/s_expm1.c
newlib/libm/common/s_fdim.c
newlib/libm/common/s_finite.c
newlib/libm/common/s_fma.c
newlib/libm/common/s_fmax.c
newlib/libm/common/s_fmin.c
newlib/libm/common/s_fpclassify.c
newlib/libm/common/s_ilogb.c
newlib/libm/common/s_infconst.c
newlib/libm/common/s_infinity.c
newlib/libm/common/s_isinf.c
newlib/libm/common/s_isinfd.c
newlib/libm/common/s_isnan.c
newlib/libm/common/s_isnand.c
newlib/libm/common/s_lib_ver.c
newlib/libm/common/s_llrint.c
newlib/libm/common/s_llround.c
newlib/libm/common/s_log1p.c
newlib/libm/common/s_log2.c
newlib/libm/common/s_logb.c
newlib/libm/common/s_lrint.c
newlib/libm/common/s_lround.c
newlib/libm/common/s_matherr.c
newlib/libm/common/s_modf.c
newlib/libm/common/s_nan.c
newlib/libm/common/s_nearbyint.c
newlib/libm/common/s_nextafter.c
newlib/libm/common/s_pow10.c
newlib/libm/common/s_remquo.c
newlib/libm/common/s_rint.c
newlib/libm/common/s_round.c
newlib/libm/common/s_scalbln.c
newlib/libm/common/s_scalbn.c
newlib/libm/common/s_signbit.c
newlib/libm/common/s_trunc.c
newlib/libm/common/scalblnl.c
newlib/libm/common/scalbnl.c
newlib/libm/common/sf_cbrt.c
newlib/libm/common/sf_copysign.c
newlib/libm/common/sf_exp10.c
newlib/libm/common/sf_expm1.c
newlib/libm/common/sf_fdim.c
newlib/libm/common/sf_finite.c
newlib/libm/common/sf_fma.c
newlib/libm/common/sf_fmax.c
newlib/libm/common/sf_fmin.c
newlib/libm/common/sf_fpclassify.c
newlib/libm/common/sf_ilogb.c
newlib/libm/common/sf_infinity.c
newlib/libm/common/sf_isinf.c
newlib/libm/common/sf_isinff.c
newlib/libm/common/sf_isnan.c
newlib/libm/common/sf_isnanf.c
newlib/libm/common/sf_llrint.c
newlib/libm/common/sf_llround.c
newlib/libm/common/sf_log1p.c
newlib/libm/common/sf_log2.c
newlib/libm/common/sf_logb.c
newlib/libm/common/sf_lrint.c
newlib/libm/common/sf_lround.c
newlib/libm/common/sf_modf.c
newlib/libm/common/sf_nan.c
newlib/libm/common/sf_nearbyint.c
newlib/libm/common/sf_nextafter.c
newlib/libm/common/sf_pow10.c
newlib/libm/common/sf_remquo.c
newlib/libm/common/sf_rint.c
newlib/libm/common/sf_round.c
newlib/libm/common/sf_scalbln.c
newlib/libm/common/sf_scalbn.c
newlib/libm/common/sf_trunc.c
newlib/libm/common/sinhl.c
newlib/libm/common/sinl.c
newlib/libm/common/sqrtl.c
newlib/libm/common/tanhl.c
newlib/libm/common/tanl.c
newlib/libm/common/tgammal.c
newlib/libm/common/truncl.c
newlib/libm/complex/Makefile.am
newlib/libm/complex/Makefile.in
newlib/libm/complex/cabs.c
newlib/libm/complex/cabsf.c
newlib/libm/complex/cacos.c
newlib/libm/complex/cacosf.c
newlib/libm/complex/cacosh.c
newlib/libm/complex/cacoshf.c
newlib/libm/complex/carg.c
newlib/libm/complex/cargf.c
newlib/libm/complex/casin.c
newlib/libm/complex/casinf.c
newlib/libm/complex/casinh.c
newlib/libm/complex/casinhf.c
newlib/libm/complex/catan.c
newlib/libm/complex/catanf.c
newlib/libm/complex/catanh.c
newlib/libm/complex/catanhf.c
newlib/libm/complex/ccos.c
newlib/libm/complex/ccosf.c
newlib/libm/complex/ccosh.c
newlib/libm/complex/ccoshf.c
newlib/libm/complex/cephes_subr.c
newlib/libm/complex/cephes_subr.h
newlib/libm/complex/cephes_subrf.c
newlib/libm/complex/cephes_subrf.h
newlib/libm/complex/cexp.c
newlib/libm/complex/cexpf.c
newlib/libm/complex/cimag.c
newlib/libm/complex/cimagf.c
newlib/libm/complex/clog.c
newlib/libm/complex/clogf.c
newlib/libm/complex/complex.tex
newlib/libm/complex/conj.c
newlib/libm/complex/conjf.c
newlib/libm/complex/cpow.c
newlib/libm/complex/cpowf.c
newlib/libm/complex/cproj.c
newlib/libm/complex/cprojf.c
newlib/libm/complex/creal.c
newlib/libm/complex/crealf.c
newlib/libm/complex/csin.c
newlib/libm/complex/csinf.c
newlib/libm/complex/csinh.c
newlib/libm/complex/csinhf.c
newlib/libm/complex/csqrt.c
newlib/libm/complex/csqrtf.c
newlib/libm/complex/ctan.c
newlib/libm/complex/ctanf.c
newlib/libm/complex/ctanh.c
newlib/libm/complex/ctanhf.c
newlib/libm/config.h.in
newlib/libm/configure
newlib/libm/configure.in
newlib/libm/libm.texinfo
newlib/libm/machine/Makefile.am
newlib/libm/machine/Makefile.in
newlib/libm/machine/aclocal.m4
newlib/libm/machine/configure
newlib/libm/machine/configure.in
newlib/libm/machine/i386/Makefile.am
newlib/libm/machine/i386/Makefile.in
newlib/libm/machine/i386/aclocal.m4
newlib/libm/machine/i386/configure
newlib/libm/machine/i386/configure.in
newlib/libm/machine/i386/f_atan2.S
newlib/libm/machine/i386/f_atan2f.S
newlib/libm/machine/i386/f_exp.c
newlib/libm/machine/i386/f_expf.c
newlib/libm/machine/i386/f_frexp.S
newlib/libm/machine/i386/f_frexpf.S
newlib/libm/machine/i386/f_ldexp.S
newlib/libm/machine/i386/f_ldexpf.S
newlib/libm/machine/i386/f_llrint.c
newlib/libm/machine/i386/f_llrintf.c
newlib/libm/machine/i386/f_llrintl.c
newlib/libm/machine/i386/f_log.S
newlib/libm/machine/i386/f_log10.S
newlib/libm/machine/i386/f_log10f.S
newlib/libm/machine/i386/f_logf.S
newlib/libm/machine/i386/f_lrint.c
newlib/libm/machine/i386/f_lrintf.c
newlib/libm/machine/i386/f_lrintl.c
newlib/libm/machine/i386/f_math.h
newlib/libm/machine/i386/f_pow.c
newlib/libm/machine/i386/f_powf.c
newlib/libm/machine/i386/f_rint.c
newlib/libm/machine/i386/f_rintf.c
newlib/libm/machine/i386/f_rintl.c
newlib/libm/machine/i386/f_tan.S
newlib/libm/machine/i386/f_tanf.S
newlib/libm/machine/i386/i386mach.h
newlib/libm/machine/spu/Makefile.am
newlib/libm/machine/spu/Makefile.in
newlib/libm/machine/spu/aclocal.m4
newlib/libm/machine/spu/configure
newlib/libm/machine/spu/configure.in
newlib/libm/machine/spu/fe_dfl_env.c
newlib/libm/machine/spu/feclearexcept.c
newlib/libm/machine/spu/fegetenv.c
newlib/libm/machine/spu/fegetexceptflag.c
newlib/libm/machine/spu/fegetround.c
newlib/libm/machine/spu/feholdexcept.c
newlib/libm/machine/spu/feraiseexcept.c
newlib/libm/machine/spu/fesetenv.c
newlib/libm/machine/spu/fesetexceptflag.c
newlib/libm/machine/spu/fesetround.c
newlib/libm/machine/spu/fetestexcept.c
newlib/libm/machine/spu/feupdateenv.c
newlib/libm/machine/spu/headers/acos.h
newlib/libm/machine/spu/headers/acosd2.h
newlib/libm/machine/spu/headers/acosf.h
newlib/libm/machine/spu/headers/acosf4.h
newlib/libm/machine/spu/headers/acosh.h
newlib/libm/machine/spu/headers/acoshd2.h
newlib/libm/machine/spu/headers/acoshf.h
newlib/libm/machine/spu/headers/acoshf4.h
newlib/libm/machine/spu/headers/asin.h
newlib/libm/machine/spu/headers/asind2.h
newlib/libm/machine/spu/headers/asinf.h
newlib/libm/machine/spu/headers/asinf4.h
newlib/libm/machine/spu/headers/asinh.h
newlib/libm/machine/spu/headers/asinhd2.h
newlib/libm/machine/spu/headers/asinhf.h
newlib/libm/machine/spu/headers/asinhf4.h
newlib/libm/machine/spu/headers/atan.h
newlib/libm/machine/spu/headers/atan2.h
newlib/libm/machine/spu/headers/atan2d2.h
newlib/libm/machine/spu/headers/atan2f.h
newlib/libm/machine/spu/headers/atan2f4.h
newlib/libm/machine/spu/headers/atand2.h
newlib/libm/machine/spu/headers/atanf.h
newlib/libm/machine/spu/headers/atanf4.h
newlib/libm/machine/spu/headers/atanh.h
newlib/libm/machine/spu/headers/atanhd2.h
newlib/libm/machine/spu/headers/atanhf.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/ceil.h
newlib/libm/machine/spu/headers/ceilf.h
newlib/libm/machine/spu/headers/copysign.h
newlib/libm/machine/spu/headers/copysignf.h
newlib/libm/machine/spu/headers/cos.h
newlib/libm/machine/spu/headers/cos_sin.h
newlib/libm/machine/spu/headers/cosd2.h
newlib/libm/machine/spu/headers/cosf.h
newlib/libm/machine/spu/headers/cosf4.h
newlib/libm/machine/spu/headers/cosh.h
newlib/libm/machine/spu/headers/coshd2.h
newlib/libm/machine/spu/headers/coshf.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/dom_chkd_less_than.h
newlib/libm/machine/spu/headers/dom_chkd_negone_one.h
newlib/libm/machine/spu/headers/dom_chkf_less_than.h
newlib/libm/machine/spu/headers/dom_chkf_negone_one.h
newlib/libm/machine/spu/headers/erf.h
newlib/libm/machine/spu/headers/erf_utils.h
newlib/libm/machine/spu/headers/erfc.h
newlib/libm/machine/spu/headers/erfcd2.h
newlib/libm/machine/spu/headers/erfcf.h
newlib/libm/machine/spu/headers/erfcf4.h
newlib/libm/machine/spu/headers/erfd2.h
newlib/libm/machine/spu/headers/erff.h
newlib/libm/machine/spu/headers/erff4.h
newlib/libm/machine/spu/headers/exp.h
newlib/libm/machine/spu/headers/exp2.h
newlib/libm/machine/spu/headers/exp2d2.h
newlib/libm/machine/spu/headers/exp2f.h
newlib/libm/machine/spu/headers/exp2f4.h
newlib/libm/machine/spu/headers/expd2.h
newlib/libm/machine/spu/headers/expf.h
newlib/libm/machine/spu/headers/expf4.h
newlib/libm/machine/spu/headers/expm1.h
newlib/libm/machine/spu/headers/expm1d2.h
newlib/libm/machine/spu/headers/expm1f.h
newlib/libm/machine/spu/headers/expm1f4.h
newlib/libm/machine/spu/headers/fabs.h
newlib/libm/machine/spu/headers/fabsf.h
newlib/libm/machine/spu/headers/fdim.h
newlib/libm/machine/spu/headers/fdimf.h
newlib/libm/machine/spu/headers/feclearexcept.h
newlib/libm/machine/spu/headers/fefpscr.h
newlib/libm/machine/spu/headers/fegetenv.h
newlib/libm/machine/spu/headers/fegetexceptflag.h
newlib/libm/machine/spu/headers/fegetround.h
newlib/libm/machine/spu/headers/feholdexcept.h
newlib/libm/machine/spu/headers/feraiseexcept.h
newlib/libm/machine/spu/headers/fesetenv.h
newlib/libm/machine/spu/headers/fesetexceptflag.h
newlib/libm/machine/spu/headers/fesetround.h
newlib/libm/machine/spu/headers/fetestexcept.h
newlib/libm/machine/spu/headers/feupdateenv.h
newlib/libm/machine/spu/headers/floor.h
newlib/libm/machine/spu/headers/floord2.h
newlib/libm/machine/spu/headers/floorf.h
newlib/libm/machine/spu/headers/floorf4.h
newlib/libm/machine/spu/headers/fma.h
newlib/libm/machine/spu/headers/fmaf.h
newlib/libm/machine/spu/headers/fmax.h
newlib/libm/machine/spu/headers/fmaxf.h
newlib/libm/machine/spu/headers/fmin.h
newlib/libm/machine/spu/headers/fminf.h
newlib/libm/machine/spu/headers/fmod.h
newlib/libm/machine/spu/headers/fmodf.h
newlib/libm/machine/spu/headers/frexp.h
newlib/libm/machine/spu/headers/frexpf.h
newlib/libm/machine/spu/headers/hypot.h
newlib/libm/machine/spu/headers/hypotd2.h
newlib/libm/machine/spu/headers/hypotf.h
newlib/libm/machine/spu/headers/hypotf4.h
newlib/libm/machine/spu/headers/ilogb.h
newlib/libm/machine/spu/headers/ilogbf.h
newlib/libm/machine/spu/headers/isnan.h
newlib/libm/machine/spu/headers/isnand2.h
newlib/libm/machine/spu/headers/isnanf.h
newlib/libm/machine/spu/headers/isnanf4.h
newlib/libm/machine/spu/headers/ldexp.h
newlib/libm/machine/spu/headers/ldexpd2.h
newlib/libm/machine/spu/headers/ldexpf.h
newlib/libm/machine/spu/headers/ldexpf4.h
newlib/libm/machine/spu/headers/lgamma.h
newlib/libm/machine/spu/headers/lgammad2.h
newlib/libm/machine/spu/headers/lgammaf.h
newlib/libm/machine/spu/headers/lgammaf4.h
newlib/libm/machine/spu/headers/llrint.h
newlib/libm/machine/spu/headers/llrintf.h
newlib/libm/machine/spu/headers/llround.h
newlib/libm/machine/spu/headers/llroundf.h
newlib/libm/machine/spu/headers/log.h
newlib/libm/machine/spu/headers/log10.h
newlib/libm/machine/spu/headers/log10d2.h
newlib/libm/machine/spu/headers/log10f.h
newlib/libm/machine/spu/headers/log1p.h
newlib/libm/machine/spu/headers/log1pd2.h
newlib/libm/machine/spu/headers/log1pf.h
newlib/libm/machine/spu/headers/log1pf4.h
newlib/libm/machine/spu/headers/log2.h
newlib/libm/machine/spu/headers/log2d2.h
newlib/libm/machine/spu/headers/log2f.h
newlib/libm/machine/spu/headers/log2f4.h
newlib/libm/machine/spu/headers/logbf.h
newlib/libm/machine/spu/headers/logbf4.h
newlib/libm/machine/spu/headers/logd2.h
newlib/libm/machine/spu/headers/logf.h
newlib/libm/machine/spu/headers/logf4.h
newlib/libm/machine/spu/headers/lrint.h
newlib/libm/machine/spu/headers/lrintf.h
newlib/libm/machine/spu/headers/lround.h
newlib/libm/machine/spu/headers/lroundf.h
newlib/libm/machine/spu/headers/nearbyint.h
newlib/libm/machine/spu/headers/nearbyintf.h
newlib/libm/machine/spu/headers/nearbyintf4.h
newlib/libm/machine/spu/headers/nextafter.h
newlib/libm/machine/spu/headers/nextafterd2.h
newlib/libm/machine/spu/headers/nextafterf.h
newlib/libm/machine/spu/headers/nextafterf4.h
newlib/libm/machine/spu/headers/pow.h
newlib/libm/machine/spu/headers/powd2.h
newlib/libm/machine/spu/headers/powf.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/remainder.h
newlib/libm/machine/spu/headers/remainderf.h
newlib/libm/machine/spu/headers/remquo.h
newlib/libm/machine/spu/headers/remquof.h
newlib/libm/machine/spu/headers/rint.h
newlib/libm/machine/spu/headers/rintf.h
newlib/libm/machine/spu/headers/rintf4.h
newlib/libm/machine/spu/headers/round.h
newlib/libm/machine/spu/headers/roundf.h
newlib/libm/machine/spu/headers/scalbn.h
newlib/libm/machine/spu/headers/scalbnf.h
newlib/libm/machine/spu/headers/scalbnf4.h
newlib/libm/machine/spu/headers/signbit.h
newlib/libm/machine/spu/headers/signbitd2.h
newlib/libm/machine/spu/headers/simdmath.h
newlib/libm/machine/spu/headers/sin.h
newlib/libm/machine/spu/headers/sincos.h
newlib/libm/machine/spu/headers/sincosd2.h
newlib/libm/machine/spu/headers/sincosf.h
newlib/libm/machine/spu/headers/sincosf4.h
newlib/libm/machine/spu/headers/sind2.h
newlib/libm/machine/spu/headers/sinf.h
newlib/libm/machine/spu/headers/sinf4.h
newlib/libm/machine/spu/headers/sinh.h
newlib/libm/machine/spu/headers/sinhd2.h
newlib/libm/machine/spu/headers/sinhf.h
newlib/libm/machine/spu/headers/sinhf4.h
newlib/libm/machine/spu/headers/sqrt.h
newlib/libm/machine/spu/headers/sqrtd2.h
newlib/libm/machine/spu/headers/sqrtf.h
newlib/libm/machine/spu/headers/sqrtf4.h
newlib/libm/machine/spu/headers/tan.h
newlib/libm/machine/spu/headers/tand2.h
newlib/libm/machine/spu/headers/tanf.h
newlib/libm/machine/spu/headers/tanf4.h
newlib/libm/machine/spu/headers/tanh.h
newlib/libm/machine/spu/headers/tanhd2.h
newlib/libm/machine/spu/headers/tanhf.h
newlib/libm/machine/spu/headers/tanhf4.h
newlib/libm/machine/spu/headers/tgamma.h
newlib/libm/machine/spu/headers/tgammad2.h
newlib/libm/machine/spu/headers/tgammaf.h
newlib/libm/machine/spu/headers/tgammaf4.h
newlib/libm/machine/spu/headers/trunc.h
newlib/libm/machine/spu/headers/truncd2.h
newlib/libm/machine/spu/headers/truncf.h
newlib/libm/machine/spu/headers/truncf4.h
newlib/libm/machine/spu/headers/vec_literal.h
newlib/libm/machine/spu/llrint.c
newlib/libm/machine/spu/llrintf.c
newlib/libm/machine/spu/llround.c
newlib/libm/machine/spu/llroundf.c
newlib/libm/machine/spu/log2.c
newlib/libm/machine/spu/log2f.c
newlib/libm/machine/spu/s_asinh.c
newlib/libm/machine/spu/s_atan.c
newlib/libm/machine/spu/s_cbrt.c
newlib/libm/machine/spu/s_ceil.c
newlib/libm/machine/spu/s_copysign.c
newlib/libm/machine/spu/s_cos.c
newlib/libm/machine/spu/s_erf.c
newlib/libm/machine/spu/s_expm1.c
newlib/libm/machine/spu/s_fabs.c
newlib/libm/machine/spu/s_fdim.c
newlib/libm/machine/spu/s_floor.c
newlib/libm/machine/spu/s_fma.c
newlib/libm/machine/spu/s_fmax.c
newlib/libm/machine/spu/s_fmin.c
newlib/libm/machine/spu/s_frexp.c
newlib/libm/machine/spu/s_ilogb.c
newlib/libm/machine/spu/s_isnan.c
newlib/libm/machine/spu/s_ldexp.c
newlib/libm/machine/spu/s_log1p.c
newlib/libm/machine/spu/s_lrint.c
newlib/libm/machine/spu/s_lround.c
newlib/libm/machine/spu/s_nearbyint.c
newlib/libm/machine/spu/s_nextafter.c
newlib/libm/machine/spu/s_remquo.c
newlib/libm/machine/spu/s_rint.c
newlib/libm/machine/spu/s_round.c
newlib/libm/machine/spu/s_scalbn.c
newlib/libm/machine/spu/s_sin.c
newlib/libm/machine/spu/s_tan.c
newlib/libm/machine/spu/s_tanh.c
newlib/libm/machine/spu/s_trunc.c
newlib/libm/machine/spu/sf_asinh.c
newlib/libm/machine/spu/sf_atan.c
newlib/libm/machine/spu/sf_cbrt.c
newlib/libm/machine/spu/sf_ceil.c
newlib/libm/machine/spu/sf_copysign.c
newlib/libm/machine/spu/sf_cos.c
newlib/libm/machine/spu/sf_erf.c
newlib/libm/machine/spu/sf_expm1.c
newlib/libm/machine/spu/sf_fabs.c
newlib/libm/machine/spu/sf_fdim.c
newlib/libm/machine/spu/sf_finite.c
newlib/libm/machine/spu/sf_floor.c
newlib/libm/machine/spu/sf_fma.c
newlib/libm/machine/spu/sf_fmax.c
newlib/libm/machine/spu/sf_fmin.c
newlib/libm/machine/spu/sf_fpclassify.c
newlib/libm/machine/spu/sf_frexp.c
newlib/libm/machine/spu/sf_ilogb.c
newlib/libm/machine/spu/sf_isinf.c
newlib/libm/machine/spu/sf_isinff.c
newlib/libm/machine/spu/sf_isnan.c
newlib/libm/machine/spu/sf_isnanf.c
newlib/libm/machine/spu/sf_ldexp.c
newlib/libm/machine/spu/sf_log1p.c
newlib/libm/machine/spu/sf_logb.c
newlib/libm/machine/spu/sf_lrint.c
newlib/libm/machine/spu/sf_lround.c
newlib/libm/machine/spu/sf_nan.c
newlib/libm/machine/spu/sf_nearbyint.c
newlib/libm/machine/spu/sf_nextafter.c
newlib/libm/machine/spu/sf_remquo.c
newlib/libm/machine/spu/sf_rint.c
newlib/libm/machine/spu/sf_round.c
newlib/libm/machine/spu/sf_scalbn.c
newlib/libm/machine/spu/sf_sin.c
newlib/libm/machine/spu/sf_tan.c
newlib/libm/machine/spu/sf_tanh.c
newlib/libm/machine/spu/sf_trunc.c
newlib/libm/machine/spu/w_acos.c
newlib/libm/machine/spu/w_acosh.c
newlib/libm/machine/spu/w_asin.c
newlib/libm/machine/spu/w_atan2.c
newlib/libm/machine/spu/w_atanh.c
newlib/libm/machine/spu/w_cosh.c
newlib/libm/machine/spu/w_exp.c
newlib/libm/machine/spu/w_exp2.c
newlib/libm/machine/spu/w_fmod.c
newlib/libm/machine/spu/w_hypot.c
newlib/libm/machine/spu/w_lgamma.c
newlib/libm/machine/spu/w_log.c
newlib/libm/machine/spu/w_log10.c
newlib/libm/machine/spu/w_pow.c
newlib/libm/machine/spu/w_remainder.c
newlib/libm/machine/spu/w_sincos.c
newlib/libm/machine/spu/w_sinh.c
newlib/libm/machine/spu/w_sqrt.c
newlib/libm/machine/spu/w_tgamma.c
newlib/libm/machine/spu/wf_acos.c
newlib/libm/machine/spu/wf_acosh.c
newlib/libm/machine/spu/wf_asin.c
newlib/libm/machine/spu/wf_atan2.c
newlib/libm/machine/spu/wf_atanh.c
newlib/libm/machine/spu/wf_cosh.c
newlib/libm/machine/spu/wf_exp.c
newlib/libm/machine/spu/wf_exp2.c
newlib/libm/machine/spu/wf_fmod.c
newlib/libm/machine/spu/wf_hypot.c
newlib/libm/machine/spu/wf_lgamma.c
newlib/libm/machine/spu/wf_log.c
newlib/libm/machine/spu/wf_log10.c
newlib/libm/machine/spu/wf_pow.c
newlib/libm/machine/spu/wf_remainder.c
newlib/libm/machine/spu/wf_sincos.c
newlib/libm/machine/spu/wf_sinh.c
newlib/libm/machine/spu/wf_sqrt.c
newlib/libm/machine/spu/wf_tgamma.c
newlib/libm/math/Makefile.am
newlib/libm/math/Makefile.in
newlib/libm/math/e_acos.c
newlib/libm/math/e_acosh.c
newlib/libm/math/e_asin.c
newlib/libm/math/e_atan2.c
newlib/libm/math/e_atanh.c
newlib/libm/math/e_cosh.c
newlib/libm/math/e_exp.c
newlib/libm/math/e_fmod.c
newlib/libm/math/e_hypot.c
newlib/libm/math/e_j0.c
newlib/libm/math/e_j1.c
newlib/libm/math/e_jn.c
newlib/libm/math/e_log.c
newlib/libm/math/e_log10.c
newlib/libm/math/e_pow.c
newlib/libm/math/e_rem_pio2.c
newlib/libm/math/e_remainder.c
newlib/libm/math/e_scalb.c
newlib/libm/math/e_sinh.c
newlib/libm/math/e_sqrt.c
newlib/libm/math/ef_acos.c
newlib/libm/math/ef_acosh.c
newlib/libm/math/ef_asin.c
newlib/libm/math/ef_atan2.c
newlib/libm/math/ef_atanh.c
newlib/libm/math/ef_cosh.c
newlib/libm/math/ef_exp.c
newlib/libm/math/ef_fmod.c
newlib/libm/math/ef_hypot.c
newlib/libm/math/ef_j0.c
newlib/libm/math/ef_j1.c
newlib/libm/math/ef_jn.c
newlib/libm/math/ef_log.c
newlib/libm/math/ef_log10.c
newlib/libm/math/ef_pow.c
newlib/libm/math/ef_rem_pio2.c
newlib/libm/math/ef_remainder.c
newlib/libm/math/ef_scalb.c
newlib/libm/math/ef_sinh.c
newlib/libm/math/ef_sqrt.c
newlib/libm/math/er_gamma.c
newlib/libm/math/er_lgamma.c
newlib/libm/math/erf_gamma.c
newlib/libm/math/erf_lgamma.c
newlib/libm/math/k_cos.c
newlib/libm/math/k_rem_pio2.c
newlib/libm/math/k_sin.c
newlib/libm/math/k_standard.c
newlib/libm/math/k_tan.c
newlib/libm/math/kf_cos.c
newlib/libm/math/kf_rem_pio2.c
newlib/libm/math/kf_sin.c
newlib/libm/math/kf_tan.c
newlib/libm/math/math.tex
newlib/libm/math/s_asinh.c
newlib/libm/math/s_atan.c
newlib/libm/math/s_ceil.c
newlib/libm/math/s_cos.c
newlib/libm/math/s_erf.c
newlib/libm/math/s_fabs.c
newlib/libm/math/s_floor.c
newlib/libm/math/s_frexp.c
newlib/libm/math/s_ldexp.c
newlib/libm/math/s_signif.c
newlib/libm/math/s_sin.c
newlib/libm/math/s_tan.c
newlib/libm/math/s_tanh.c
newlib/libm/math/sf_asinh.c
newlib/libm/math/sf_atan.c
newlib/libm/math/sf_ceil.c
newlib/libm/math/sf_cos.c
newlib/libm/math/sf_erf.c
newlib/libm/math/sf_fabs.c
newlib/libm/math/sf_floor.c
newlib/libm/math/sf_frexp.c
newlib/libm/math/sf_ldexp.c
newlib/libm/math/sf_signif.c
newlib/libm/math/sf_sin.c
newlib/libm/math/sf_tan.c
newlib/libm/math/sf_tanh.c
newlib/libm/math/w_acos.c
newlib/libm/math/w_acosh.c
newlib/libm/math/w_asin.c
newlib/libm/math/w_atan2.c
newlib/libm/math/w_atanh.c
newlib/libm/math/w_cosh.c
newlib/libm/math/w_drem.c
newlib/libm/math/w_exp.c
newlib/libm/math/w_exp2.c
newlib/libm/math/w_fmod.c
newlib/libm/math/w_gamma.c
newlib/libm/math/w_hypot.c
newlib/libm/math/w_j0.c
newlib/libm/math/w_j1.c
newlib/libm/math/w_jn.c
newlib/libm/math/w_lgamma.c
newlib/libm/math/w_log.c
newlib/libm/math/w_log10.c
newlib/libm/math/w_pow.c
newlib/libm/math/w_remainder.c
newlib/libm/math/w_scalb.c
newlib/libm/math/w_sincos.c
newlib/libm/math/w_sinh.c
newlib/libm/math/w_sqrt.c
newlib/libm/math/w_tgamma.c
newlib/libm/math/wf_acos.c
newlib/libm/math/wf_acosh.c
newlib/libm/math/wf_asin.c
newlib/libm/math/wf_atan2.c
newlib/libm/math/wf_atanh.c
newlib/libm/math/wf_cosh.c
newlib/libm/math/wf_drem.c
newlib/libm/math/wf_exp.c
newlib/libm/math/wf_exp2.c
newlib/libm/math/wf_fmod.c
newlib/libm/math/wf_gamma.c
newlib/libm/math/wf_hypot.c
newlib/libm/math/wf_j0.c
newlib/libm/math/wf_j1.c
newlib/libm/math/wf_jn.c
newlib/libm/math/wf_lgamma.c
newlib/libm/math/wf_log.c
newlib/libm/math/wf_log10.c
newlib/libm/math/wf_pow.c
newlib/libm/math/wf_remainder.c
newlib/libm/math/wf_scalb.c
newlib/libm/math/wf_sincos.c
newlib/libm/math/wf_sinh.c
newlib/libm/math/wf_sqrt.c
newlib/libm/math/wf_tgamma.c
newlib/libm/math/wr_gamma.c
newlib/libm/math/wr_lgamma.c
newlib/libm/math/wrf_gamma.c
newlib/libm/math/wrf_lgamma.c
newlib/libm/mathfp/Makefile.am
newlib/libm/mathfp/Makefile.in
newlib/libm/mathfp/e_acosh.c
newlib/libm/mathfp/e_atanh.c
newlib/libm/mathfp/e_hypot.c
newlib/libm/mathfp/e_j0.c
newlib/libm/mathfp/e_j1.c
newlib/libm/mathfp/e_remainder.c
newlib/libm/mathfp/e_scalb.c
newlib/libm/mathfp/ef_acosh.c
newlib/libm/mathfp/ef_atanh.c
newlib/libm/mathfp/ef_hypot.c
newlib/libm/mathfp/ef_j0.c
newlib/libm/mathfp/ef_j1.c
newlib/libm/mathfp/ef_remainder.c
newlib/libm/mathfp/ef_scalb.c
newlib/libm/mathfp/er_gamma.c
newlib/libm/mathfp/er_lgamma.c
newlib/libm/mathfp/erf_gamma.c
newlib/libm/mathfp/erf_lgamma.c
newlib/libm/mathfp/mathfp.tex
newlib/libm/mathfp/s_acos.c
newlib/libm/mathfp/s_asin.c
newlib/libm/mathfp/s_asine.c
newlib/libm/mathfp/s_asinh.c
newlib/libm/mathfp/s_atan.c
newlib/libm/mathfp/s_atan2.c
newlib/libm/mathfp/s_atangent.c
newlib/libm/mathfp/s_ceil.c
newlib/libm/mathfp/s_cos.c
newlib/libm/mathfp/s_cosh.c
newlib/libm/mathfp/s_erf.c
newlib/libm/mathfp/s_exp.c
newlib/libm/mathfp/s_exp2.c
newlib/libm/mathfp/s_fabs.c
newlib/libm/mathfp/s_floor.c
newlib/libm/mathfp/s_fmod.c
newlib/libm/mathfp/s_frexp.c
newlib/libm/mathfp/s_ispos.c
newlib/libm/mathfp/s_ldexp.c
newlib/libm/mathfp/s_log.c
newlib/libm/mathfp/s_log10.c
newlib/libm/mathfp/s_logarithm.c
newlib/libm/mathfp/s_mathcnst.c
newlib/libm/mathfp/s_numtest.c
newlib/libm/mathfp/s_pow.c
newlib/libm/mathfp/s_signif.c
newlib/libm/mathfp/s_sin.c
newlib/libm/mathfp/s_sincos.c
newlib/libm/mathfp/s_sine.c
newlib/libm/mathfp/s_sineh.c
newlib/libm/mathfp/s_sinf.c
newlib/libm/mathfp/s_sinh.c
newlib/libm/mathfp/s_sqrt.c
newlib/libm/mathfp/s_tan.c
newlib/libm/mathfp/s_tanh.c
newlib/libm/mathfp/s_tgamma.c
newlib/libm/mathfp/sf_acos.c
newlib/libm/mathfp/sf_asin.c
newlib/libm/mathfp/sf_asine.c
newlib/libm/mathfp/sf_asinh.c
newlib/libm/mathfp/sf_atan.c
newlib/libm/mathfp/sf_atan2.c
newlib/libm/mathfp/sf_atangent.c
newlib/libm/mathfp/sf_ceil.c
newlib/libm/mathfp/sf_cos.c
newlib/libm/mathfp/sf_cosh.c
newlib/libm/mathfp/sf_erf.c
newlib/libm/mathfp/sf_exp.c
newlib/libm/mathfp/sf_exp2.c
newlib/libm/mathfp/sf_fabs.c
newlib/libm/mathfp/sf_floor.c
newlib/libm/mathfp/sf_fmod.c
newlib/libm/mathfp/sf_frexp.c
newlib/libm/mathfp/sf_ispos.c
newlib/libm/mathfp/sf_ldexp.c
newlib/libm/mathfp/sf_log.c
newlib/libm/mathfp/sf_log10.c
newlib/libm/mathfp/sf_logarithm.c
newlib/libm/mathfp/sf_numtest.c
newlib/libm/mathfp/sf_pow.c
newlib/libm/mathfp/sf_signif.c
newlib/libm/mathfp/sf_sin.c
newlib/libm/mathfp/sf_sincos.c
newlib/libm/mathfp/sf_sine.c
newlib/libm/mathfp/sf_sineh.c
newlib/libm/mathfp/sf_sinh.c
newlib/libm/mathfp/sf_sqrt.c
newlib/libm/mathfp/sf_tan.c
newlib/libm/mathfp/sf_tanh.c
newlib/libm/mathfp/sf_tgamma.c
newlib/libm/mathfp/w_cabs.c
newlib/libm/mathfp/w_drem.c
newlib/libm/mathfp/w_jn.c
newlib/libm/mathfp/wf_cabs.c
newlib/libm/mathfp/wf_drem.c
newlib/libm/mathfp/wf_jn.c
newlib/libm/mathfp/zmath.h
newlib/libm/test/Makefile.in
newlib/libm/test/acos_vec.c
newlib/libm/test/acosf_vec.c
newlib/libm/test/acosh_vec.c
newlib/libm/test/acoshf_vec.c
newlib/libm/test/asin_vec.c
newlib/libm/test/asinf_vec.c
newlib/libm/test/asinh_vec.c
newlib/libm/test/asinhf_vec.c
newlib/libm/test/atan2_vec.c
newlib/libm/test/atan2f_vec.c
newlib/libm/test/atan_vec.c
newlib/libm/test/atanf_vec.c
newlib/libm/test/atanh_vec.c
newlib/libm/test/atanhf_vec.c
newlib/libm/test/ceil_vec.c
newlib/libm/test/ceilf_vec.c
newlib/libm/test/conv_vec.c
newlib/libm/test/convert.c
newlib/libm/test/cos_vec.c
newlib/libm/test/cosf_vec.c
newlib/libm/test/cosh_vec.c
newlib/libm/test/coshf_vec.c
newlib/libm/test/dcvt.c
newlib/libm/test/dvec.c
newlib/libm/test/erf_vec.c
newlib/libm/test/erfc_vec.c
newlib/libm/test/erfcf_vec.c
newlib/libm/test/erff_vec.c
newlib/libm/test/exp_vec.c
newlib/libm/test/expf_vec.c
newlib/libm/test/fabs_vec.c
newlib/libm/test/fabsf_vec.c
newlib/libm/test/floor_vec.c
newlib/libm/test/floorf_vec.c
newlib/libm/test/fmod_vec.c
newlib/libm/test/fmodf_vec.c
newlib/libm/test/gamma_vec.c
newlib/libm/test/gammaf_vec.c
newlib/libm/test/hypot_vec.c
newlib/libm/test/hypotf_vec.c
newlib/libm/test/iconv_vec.c
newlib/libm/test/j0_vec.c
newlib/libm/test/j0f_vec.c
newlib/libm/test/j1_vec.c
newlib/libm/test/j1f_vec.c
newlib/libm/test/jn_vec.c
newlib/libm/test/jnf_vec.c
newlib/libm/test/log10_vec.c
newlib/libm/test/log10f_vec.c
newlib/libm/test/log1p_vec.c
newlib/libm/test/log1pf_vec.c
newlib/libm/test/log2_vec.c
newlib/libm/test/log2f_vec.c
newlib/libm/test/log_vec.c
newlib/libm/test/logf_vec.c
newlib/libm/test/math.c
newlib/libm/test/math2.c
newlib/libm/test/sin_vec.c
newlib/libm/test/sinf_vec.c
newlib/libm/test/sinh_vec.c
newlib/libm/test/sinhf_vec.c
newlib/libm/test/sprint_ivec.c
newlib/libm/test/sprint_vec.c
newlib/libm/test/sqrt_vec.c
newlib/libm/test/sqrtf_vec.c
newlib/libm/test/string.c
newlib/libm/test/tan_vec.c
newlib/libm/test/tanf_vec.c
newlib/libm/test/tanh_vec.c
newlib/libm/test/tanhf_vec.c
newlib/libm/test/test.c
newlib/libm/test/test.h
newlib/libm/test/test_ieee.c
newlib/libm/test/test_is.c
newlib/libm/test/y0_vec.c
newlib/libm/test/y0f_vec.c
newlib/libm/test/y1_vec.c
newlib/libm/test/y1f_vec.c
newlib/libm/test/yn_vec.c
newlib/libm/test/ynf_vec.c
newlib/newlib.hin
newlib/stamp-h.in
newlib/testsuite/config/default.exp
newlib/testsuite/include/check.h
newlib/testsuite/lib/checkoutput.exp
newlib/testsuite/lib/flags.exp
newlib/testsuite/lib/newlib.exp
newlib/testsuite/lib/passfail.exp
newlib/testsuite/newlib.elix/elix.exp
newlib/testsuite/newlib.elix/tmmap.c
newlib/testsuite/newlib.iconv/iconv.exp
newlib/testsuite/newlib.iconv/iconvjp.c
newlib/testsuite/newlib.iconv/iconvnm.c
newlib/testsuite/newlib.iconv/iconvru.c
newlib/testsuite/newlib.locale/UTF-8.c
newlib/testsuite/newlib.locale/UTF-8.exp
newlib/testsuite/newlib.locale/locale.exp
newlib/testsuite/newlib.search/hsearchtest.c
newlib/testsuite/newlib.search/hsearchtest.exp
newlib/testsuite/newlib.stdio/stdio.exp
newlib/testsuite/newlib.stdio/swprintf.c
newlib/testsuite/newlib.stdlib/atexit.c
newlib/testsuite/newlib.stdlib/atexit.exp
newlib/testsuite/newlib.stdlib/size_max.c
newlib/testsuite/newlib.stdlib/stdlib.exp
newlib/testsuite/newlib.string/memcpy-1.c
newlib/testsuite/newlib.string/memmove1.c
newlib/testsuite/newlib.string/string.exp
newlib/testsuite/newlib.string/tstring.c
newlib/testsuite/newlib.wctype/tiswctype.c
newlib/testsuite/newlib.wctype/twctrans.c
newlib/testsuite/newlib.wctype/twctype.c
newlib/testsuite/newlib.wctype/wctype.exp
winsup/COPYING
winsup/CYGWIN_LICENSE
winsup/ChangeLog
winsup/Makefile.common
winsup/Makefile.in
winsup/README
winsup/acinclude.m4
winsup/aclocal.m4
winsup/configure
winsup/configure.in
winsup/cygserver/ChangeLog
winsup/cygserver/Makefile.in
winsup/cygserver/README
winsup/cygserver/aclocal.m4
winsup/cygserver/bsd_helper.cc
winsup/cygserver/bsd_helper.h
winsup/cygserver/bsd_log.cc
winsup/cygserver/bsd_log.h
winsup/cygserver/bsd_mutex.cc
winsup/cygserver/bsd_mutex.h
winsup/cygserver/client.cc
winsup/cygserver/configure
winsup/cygserver/configure.in
winsup/cygserver/cygserver-config
winsup/cygserver/cygserver.cc
winsup/cygserver/cygserver.conf
winsup/cygserver/msg.cc
winsup/cygserver/process.cc
winsup/cygserver/process.h
winsup/cygserver/sem.cc
winsup/cygserver/setpwd.cc
winsup/cygserver/shm.cc
winsup/cygserver/sysv_msg.cc
winsup/cygserver/sysv_sem.cc
winsup/cygserver/sysv_shm.cc
winsup/cygserver/threaded_queue.cc
winsup/cygserver/threaded_queue.h
winsup/cygserver/transport.cc
winsup/cygserver/transport.h
winsup/cygserver/transport_pipes.cc
winsup/cygserver/transport_pipes.h
winsup/cygserver/woutsup.h
winsup/cygwin/ChangeLog
winsup/cygwin/ChangeLog-1995
winsup/cygwin/ChangeLog-1996
winsup/cygwin/ChangeLog-1997
winsup/cygwin/ChangeLog-1998
winsup/cygwin/ChangeLog-1999
winsup/cygwin/ChangeLog-2000
winsup/cygwin/ChangeLog-2001
winsup/cygwin/ChangeLog-2002
winsup/cygwin/ChangeLog-2003
winsup/cygwin/ChangeLog-2004
winsup/cygwin/ChangeLog-2005
winsup/cygwin/ChangeLog-2006
winsup/cygwin/ChangeLog-2007
winsup/cygwin/ChangeLog-2008
winsup/cygwin/ChangeLog-2009
winsup/cygwin/ChangeLog-2010
winsup/cygwin/Makefile.in
winsup/cygwin/ROADMAP
winsup/cygwin/acconfig.h
winsup/cygwin/aclocal.m4
winsup/cygwin/advapi32.cc
winsup/cygwin/analyze_sigfe
winsup/cygwin/assert.cc
winsup/cygwin/autoload.cc
winsup/cygwin/automode.c
winsup/cygwin/binmode.c
winsup/cygwin/child_info.h
winsup/cygwin/config.h.in
winsup/cygwin/config/i386/profile.h
winsup/cygwin/configure
winsup/cygwin/configure.in
winsup/cygwin/cpuid.h
winsup/cygwin/crt0.c
winsup/cygwin/ctype.cc
winsup/cygwin/cxx.cc
winsup/cygwin/cygerrno.h
winsup/cygwin/cygheap.cc
winsup/cygwin/cygheap.h
winsup/cygwin/cygheap_malloc.h
winsup/cygwin/cyglsa.h
winsup/cygwin/cygmagic
winsup/cygwin/cygmalloc.h
winsup/cygwin/cygprops.h
winsup/cygwin/cygserver.h
winsup/cygwin/cygserver_ipc.h
winsup/cygwin/cygserver_msg.h
winsup/cygwin/cygserver_sem.h
winsup/cygwin/cygserver_setpwd.h
winsup/cygwin/cygserver_shm.h
winsup/cygwin/cygthread.cc
winsup/cygwin/cygthread.h
winsup/cygwin/cygtls.cc
winsup/cygwin/cygtls.h
winsup/cygwin/cygwin-cxx.h
winsup/cygwin/cygwin-shilka
winsup/cygwin/cygwin.din
winsup/cygwin/cygwin.sc
winsup/cygwin/cygwin_version.h
winsup/cygwin/cygxdr.cc
winsup/cygwin/cygxdr.h
winsup/cygwin/dcrt0.cc
winsup/cygwin/debug.cc
winsup/cygwin/debug.h
winsup/cygwin/devices.cc
winsup/cygwin/devices.h
winsup/cygwin/devices.in
winsup/cygwin/dir.cc
winsup/cygwin/dlfcn.cc
winsup/cygwin/dll_init.cc
winsup/cygwin/dll_init.h
winsup/cygwin/dll_init.sgml
winsup/cygwin/dllfixdbg
winsup/cygwin/dlmalloc.c
winsup/cygwin/dlmalloc.h
winsup/cygwin/dtable.cc
winsup/cygwin/dtable.h
winsup/cygwin/dtable.sgml
winsup/cygwin/environ.cc
winsup/cygwin/environ.h
winsup/cygwin/errno.cc
winsup/cygwin/exception.h
winsup/cygwin/exceptions.cc
winsup/cygwin/exec.cc
winsup/cygwin/external.cc
winsup/cygwin/external.sgml
winsup/cygwin/fcntl.cc
winsup/cygwin/fenv.cc
winsup/cygwin/fhandler.cc
winsup/cygwin/fhandler.h
winsup/cygwin/fhandler_clipboard.cc
winsup/cygwin/fhandler_console.cc
winsup/cygwin/fhandler_disk_file.cc
winsup/cygwin/fhandler_dsp.cc
winsup/cygwin/fhandler_fifo.cc
winsup/cygwin/fhandler_floppy.cc
winsup/cygwin/fhandler_mailslot.cc
winsup/cygwin/fhandler_mem.cc
winsup/cygwin/fhandler_netdrive.cc
winsup/cygwin/fhandler_nodevice.cc
winsup/cygwin/fhandler_proc.cc
winsup/cygwin/fhandler_process.cc
winsup/cygwin/fhandler_procnet.cc
winsup/cygwin/fhandler_procsys.cc
winsup/cygwin/fhandler_procsysvipc.cc
winsup/cygwin/fhandler_random.cc
winsup/cygwin/fhandler_raw.cc
winsup/cygwin/fhandler_registry.cc
winsup/cygwin/fhandler_serial.cc
winsup/cygwin/fhandler_socket.cc
winsup/cygwin/fhandler_tape.cc
winsup/cygwin/fhandler_termios.cc
winsup/cygwin/fhandler_tty.cc
winsup/cygwin/fhandler_virtual.cc
winsup/cygwin/fhandler_virtual.h
winsup/cygwin/fhandler_windows.cc
winsup/cygwin/fhandler_zero.cc
winsup/cygwin/flock.cc
winsup/cygwin/fork.cc
winsup/cygwin/gcrt0.c
winsup/cygwin/gendef
winsup/cygwin/gendevices
winsup/cygwin/gentls_offsets
winsup/cygwin/glob.cc
winsup/cygwin/glob_pattern_p.cc
winsup/cygwin/globals.cc
winsup/cygwin/gmon.c
winsup/cygwin/gmon.h
winsup/cygwin/grp.cc
winsup/cygwin/heap.cc
winsup/cygwin/heap.h
winsup/cygwin/hires.h
winsup/cygwin/hookapi.cc
winsup/cygwin/how-autoload-works.txt
winsup/cygwin/how-cygheap-works.txt
winsup/cygwin/how-cygtls-works.txt
winsup/cygwin/how-fhandlers-work.txt
winsup/cygwin/how-signals-work.txt
winsup/cygwin/how-spawn-works.txt
winsup/cygwin/how-startup-shutdown-works.txt
winsup/cygwin/how-to-debug-cygwin.txt
winsup/cygwin/how-vfork-works.txt
winsup/cygwin/include/a.out.h
winsup/cygwin/include/arpa/ftp.h
winsup/cygwin/include/arpa/inet.h
winsup/cygwin/include/arpa/nameser.h
winsup/cygwin/include/arpa/nameser_compat.h
winsup/cygwin/include/arpa/telnet.h
winsup/cygwin/include/asm/byteorder.h
winsup/cygwin/include/asm/socket.h
winsup/cygwin/include/asm/types.h
winsup/cygwin/include/attr/xattr.h
winsup/cygwin/include/bits/endian.h
winsup/cygwin/include/bits/wordsize.h
winsup/cygwin/include/byteswap.h
winsup/cygwin/include/cygwin/_types.h
winsup/cygwin/include/cygwin/acl.h
winsup/cygwin/include/cygwin/config.h
winsup/cygwin/include/cygwin/core_dump.h
winsup/cygwin/include/cygwin/cygwin_dll.h
winsup/cygwin/include/cygwin/fs.h
winsup/cygwin/include/cygwin/grp.h
winsup/cygwin/include/cygwin/hdreg.h
winsup/cygwin/include/cygwin/icmp.h
winsup/cygwin/include/cygwin/if.h
winsup/cygwin/include/cygwin/in.h
winsup/cygwin/include/cygwin/in6.h
winsup/cygwin/include/cygwin/in_systm.h
winsup/cygwin/include/cygwin/ipc.h
winsup/cygwin/include/cygwin/kd.h
winsup/cygwin/include/cygwin/msg.h
winsup/cygwin/include/cygwin/mtio.h
winsup/cygwin/include/cygwin/rdevio.h
winsup/cygwin/include/cygwin/sem.h
winsup/cygwin/include/cygwin/shm.h
winsup/cygwin/include/cygwin/signal.h
winsup/cygwin/include/cygwin/socket.h
winsup/cygwin/include/cygwin/sockios.h
winsup/cygwin/include/cygwin/stat.h
winsup/cygwin/include/cygwin/stdlib.h
winsup/cygwin/include/cygwin/sys_time.h
winsup/cygwin/include/cygwin/sysproto.h
winsup/cygwin/include/cygwin/time.h
winsup/cygwin/include/cygwin/types.h
winsup/cygwin/include/cygwin/utmp.h
winsup/cygwin/include/cygwin/version.h
winsup/cygwin/include/cygwin/wait.h
winsup/cygwin/include/dlfcn.h
winsup/cygwin/include/elf.h
winsup/cygwin/include/endian.h
winsup/cygwin/include/err.h
winsup/cygwin/include/error.h
winsup/cygwin/include/exceptions.h
winsup/cygwin/include/fcntl.h
winsup/cygwin/include/features.h
winsup/cygwin/include/fenv.h
winsup/cygwin/include/fnmatch.h
winsup/cygwin/include/fts.h
winsup/cygwin/include/ftw.h
winsup/cygwin/include/getopt.h
winsup/cygwin/include/glob.h
winsup/cygwin/include/icmp.h
winsup/cygwin/include/ifaddrs.h
winsup/cygwin/include/inttypes.h
winsup/cygwin/include/io.h
winsup/cygwin/include/lastlog.h
winsup/cygwin/include/libgen.h
winsup/cygwin/include/limits.h
winsup/cygwin/include/machine/stdlib.h
winsup/cygwin/include/mapi.h
winsup/cygwin/include/memory.h
winsup/cygwin/include/mntent.h
winsup/cygwin/include/monetary.h
winsup/cygwin/include/mqueue.h
winsup/cygwin/include/net/if.h
winsup/cygwin/include/netdb.h
winsup/cygwin/include/netinet/in.h
winsup/cygwin/include/netinet/in_systm.h
winsup/cygwin/include/netinet/ip.h
winsup/cygwin/include/netinet/ip_icmp.h
winsup/cygwin/include/netinet/tcp.h
winsup/cygwin/include/netinet/udp.h
winsup/cygwin/include/paths.h
winsup/cygwin/include/poll.h
winsup/cygwin/include/pthread.h
winsup/cygwin/include/pty.h
winsup/cygwin/include/regex.h
winsup/cygwin/include/resolv.h
winsup/cygwin/include/search.h
winsup/cygwin/include/semaphore.h
winsup/cygwin/include/stdint.h
winsup/cygwin/include/sys/acl.h
winsup/cygwin/include/sys/copying.dj
winsup/cygwin/include/sys/cygwin.h
winsup/cygwin/include/sys/dirent.h
winsup/cygwin/include/sys/elf32.h
winsup/cygwin/include/sys/elf64.h
winsup/cygwin/include/sys/elf_common.h
winsup/cygwin/include/sys/elf_generic.h
winsup/cygwin/include/sys/file.h
winsup/cygwin/include/sys/ioctl.h
winsup/cygwin/include/sys/ipc.h
winsup/cygwin/include/sys/kd.h
winsup/cygwin/include/sys/lock.h
winsup/cygwin/include/sys/mman.h
winsup/cygwin/include/sys/mount.h
winsup/cygwin/include/sys/msg.h
winsup/cygwin/include/sys/mtio.h
winsup/cygwin/include/sys/param.h
winsup/cygwin/include/sys/poll.h
winsup/cygwin/include/sys/procfs.h
winsup/cygwin/include/sys/queue.h
winsup/cygwin/include/sys/resource.h
winsup/cygwin/include/sys/select.h
winsup/cygwin/include/sys/sem.h
winsup/cygwin/include/sys/shm.h
winsup/cygwin/include/sys/smallprint.h
winsup/cygwin/include/sys/socket.h
winsup/cygwin/include/sys/soundcard.h
winsup/cygwin/include/sys/statfs.h
winsup/cygwin/include/sys/statvfs.h
winsup/cygwin/include/sys/stdio.h
winsup/cygwin/include/sys/strace.h
winsup/cygwin/include/sys/sysinfo.h
winsup/cygwin/include/sys/syslimits.h
winsup/cygwin/include/sys/syslog.h
winsup/cygwin/include/sys/sysmacros.h
winsup/cygwin/include/sys/sysproto.h
winsup/cygwin/include/sys/termio.h
winsup/cygwin/include/sys/termios.h
winsup/cygwin/include/sys/ttychars.h
winsup/cygwin/include/sys/uio.h
winsup/cygwin/include/sys/un.h
winsup/cygwin/include/sys/utime.h
winsup/cygwin/include/sys/utmp.h
winsup/cygwin/include/sys/utsname.h
winsup/cygwin/include/sys/vfs.h
winsup/cygwin/include/sys/wait.h
winsup/cygwin/include/sys/xattr.h
winsup/cygwin/include/sysexits.h
winsup/cygwin/include/syslog.h
winsup/cygwin/include/termio.h
winsup/cygwin/include/tzfile.h
winsup/cygwin/include/utmpx.h
winsup/cygwin/include/wait.h
winsup/cygwin/init.cc
winsup/cygwin/ioctl.cc
winsup/cygwin/ipc.cc
winsup/cygwin/kernel32.cc
winsup/cygwin/lc_era.h
winsup/cygwin/lc_msg.h
winsup/cygwin/lib/_cygwin_crt0_common.cc
winsup/cygwin/lib/crt0.h
winsup/cygwin/lib/cygwin_attach_dll.c
winsup/cygwin/lib/cygwin_crt0.c
winsup/cygwin/lib/dll_entry.c
winsup/cygwin/lib/dll_main.cc
winsup/cygwin/lib/libcmain.c
winsup/cygwin/lib/premain0.c
winsup/cygwin/lib/premain1.c
winsup/cygwin/lib/premain2.c
winsup/cygwin/lib/premain3.c
winsup/cygwin/lib/pseudo-reloc-dummy.c
winsup/cygwin/libc/bsdlib.cc
winsup/cygwin/libc/fnmatch.c
winsup/cygwin/libc/fts.c
winsup/cygwin/libc/ftw.c
winsup/cygwin/libc/getopt.c
winsup/cygwin/libc/inet_addr.c
winsup/cygwin/libc/inet_network.c
winsup/cygwin/libc/minires-os-if.c
winsup/cygwin/libc/minires.c
winsup/cygwin/libc/minires.h
winsup/cygwin/libc/nftw.c
winsup/cygwin/libc/rcmd.cc
winsup/cygwin/libc/rexec.cc
winsup/cygwin/libc/strfmon.c
winsup/cygwin/libc/strptime.cc
winsup/cygwin/libc/xsique.cc
winsup/cygwin/libstdcxx_wrapper.cc
winsup/cygwin/localtime.cc
winsup/cygwin/lsearch.cc
winsup/cygwin/malloc.cc
winsup/cygwin/malloc_wrapper.cc
winsup/cygwin/mcount.c
winsup/cygwin/miscfuncs.cc
winsup/cygwin/miscfuncs.h
winsup/cygwin/mkglobals_h
winsup/cygwin/mkimport
winsup/cygwin/mkstatic
winsup/cygwin/mktemp.cc
winsup/cygwin/mkvers.sh
winsup/cygwin/mmap.cc
winsup/cygwin/mmap_helper.h
winsup/cygwin/mount.cc
winsup/cygwin/mount.h
winsup/cygwin/msg.cc
winsup/cygwin/mtinfo.h
winsup/cygwin/net.cc
winsup/cygwin/netdb.cc
winsup/cygwin/nfs.cc
winsup/cygwin/nfs.h
winsup/cygwin/nlsfuncs.cc
winsup/cygwin/ntdll.h
winsup/cygwin/ntea.cc
winsup/cygwin/passwd.cc
winsup/cygwin/path.cc
winsup/cygwin/path.h
winsup/cygwin/path.sgml
winsup/cygwin/perprocess.h
winsup/cygwin/pinfo.cc
winsup/cygwin/pinfo.h
winsup/cygwin/pipe.cc
winsup/cygwin/poll.cc
winsup/cygwin/posix.sgml
winsup/cygwin/posix_ipc.cc
winsup/cygwin/profil.c
winsup/cygwin/profil.h
winsup/cygwin/pseudo-reloc.cc
winsup/cygwin/pthread.cc
winsup/cygwin/pwdgrp.h
winsup/cygwin/random.cc
winsup/cygwin/regex/COPYRIGHT
winsup/cygwin/regex/cname.h
winsup/cygwin/regex/engine.c
winsup/cygwin/regex/regcomp.c
winsup/cygwin/regex/regerror.c
winsup/cygwin/regex/regex.3
winsup/cygwin/regex/regex.7
winsup/cygwin/regex/regex2.h
winsup/cygwin/regex/regexec.c
winsup/cygwin/regex/regfree.c
winsup/cygwin/regex/utils.h
winsup/cygwin/registry.cc
winsup/cygwin/registry.h
winsup/cygwin/resource.cc
winsup/cygwin/scandir.cc
winsup/cygwin/sched.cc
winsup/cygwin/sec_acl.cc
winsup/cygwin/sec_auth.cc
winsup/cygwin/sec_helper.cc
winsup/cygwin/security.cc
winsup/cygwin/security.h
winsup/cygwin/security.sgml
winsup/cygwin/select.cc
winsup/cygwin/select.h
winsup/cygwin/sem.cc
winsup/cygwin/setlsapwd.cc
winsup/cygwin/shared.cc
winsup/cygwin/shared_info.h
winsup/cygwin/shm.cc
winsup/cygwin/signal.cc
winsup/cygwin/sigproc.cc
winsup/cygwin/sigproc.h
winsup/cygwin/smallprint.cc
winsup/cygwin/sortdin
winsup/cygwin/spawn.cc
winsup/cygwin/speclib
winsup/cygwin/spinlock.h
winsup/cygwin/stackdump.sgml
winsup/cygwin/strace.cc
winsup/cygwin/strfuncs.cc
winsup/cygwin/string.h
winsup/cygwin/strsep.cc
winsup/cygwin/strsig.cc
winsup/cygwin/sync.cc
winsup/cygwin/sync.h
winsup/cygwin/syscalls.cc
winsup/cygwin/sysconf.cc
winsup/cygwin/syslog.cc
winsup/cygwin/termios.cc
winsup/cygwin/textmode.c
winsup/cygwin/textreadmode.c
winsup/cygwin/thread.cc
winsup/cygwin/thread.h
winsup/cygwin/timer.cc
winsup/cygwin/times.cc
winsup/cygwin/tls_pbuf.cc
winsup/cygwin/tls_pbuf.h
winsup/cygwin/tlsoffsets.h
winsup/cygwin/tmpbuf.h
winsup/cygwin/tty.cc
winsup/cygwin/tty.h
winsup/cygwin/tz_posixrules.h
winsup/cygwin/uinfo.cc
winsup/cygwin/uname.cc
winsup/cygwin/wait.cc
winsup/cygwin/wchar.h
winsup/cygwin/winbase.h
winsup/cygwin/wincap.cc
winsup/cygwin/wincap.h
winsup/cygwin/window.cc
winsup/cygwin/winf.cc
winsup/cygwin/winf.h
winsup/cygwin/wininfo.h
winsup/cygwin/winlean.h
winsup/cygwin/winsup.h
winsup/cygwin/winver.rc
winsup/doc/ChangeLog
winsup/doc/Makefile.in
winsup/doc/README
winsup/doc/aclocal.m4
winsup/doc/configure
winsup/doc/configure.in
winsup/doc/cygserver.sgml
winsup/doc/cygwin-api.in.sgml
winsup/doc/cygwin-ug-net.in.sgml
winsup/doc/cygwin-ug.in.sgml
winsup/doc/cygwin.dsl
winsup/doc/cygwinenv.sgml
winsup/doc/dll.sgml
winsup/doc/doctool.c
winsup/doc/doctool.txt
winsup/doc/effectively.sgml
winsup/doc/faq-api.xml
winsup/doc/faq-programming.xml
winsup/doc/faq-resources.xml
winsup/doc/faq-sections.xml
winsup/doc/faq-setup.xml
winsup/doc/faq-using.xml
winsup/doc/faq-what.xml
winsup/doc/faq.xml
winsup/doc/fhandler-tut.txt
winsup/doc/filemodes.sgml
winsup/doc/gcc.sgml
winsup/doc/gdb.sgml
winsup/doc/legal.sgml
winsup/doc/new-features.sgml
winsup/doc/ntsec.sgml
winsup/doc/overview.sgml
winsup/doc/overview2.sgml
winsup/doc/pathnames.sgml
winsup/doc/programming.sgml
winsup/doc/setup-net.sgml
winsup/doc/setup.sgml
winsup/doc/setup2.sgml
winsup/doc/textbinary.sgml
winsup/doc/using.sgml
winsup/doc/windres.sgml
winsup/lsaauth/ChangeLog
winsup/lsaauth/Makefile.in
winsup/lsaauth/aclocal.m4
winsup/lsaauth/configure
winsup/lsaauth/configure.in
winsup/lsaauth/cyglsa-config
winsup/lsaauth/cyglsa.c
winsup/lsaauth/cyglsa.din
winsup/lsaauth/cyglsa64.def
winsup/lsaauth/cyglsa64.dll
winsup/lsaauth/make-64bit-version-with-mingw-w64.sh
winsup/mingw/CONTRIBUTORS
winsup/mingw/CRT_fp10.c
winsup/mingw/CRT_fp8.c
winsup/mingw/CRT_noglob.c
winsup/mingw/CRTfmode.c
winsup/mingw/CRTglob.c
winsup/mingw/CRTinit.c
winsup/mingw/ChangeLog
winsup/mingw/DISCLAIMER
winsup/mingw/Makefile.in
winsup/mingw/README
winsup/mingw/TODO
winsup/mingw/aclocal.m4
winsup/mingw/binmode.c
winsup/mingw/config.guess
winsup/mingw/config.sub
winsup/mingw/configure
winsup/mingw/configure.in
winsup/mingw/cpu_features.c
winsup/mingw/cpu_features.h
winsup/mingw/crt1.c
winsup/mingw/crtdll.def
winsup/mingw/crtmt.c
winsup/mingw/crtst.c
winsup/mingw/dllcrt1.c
winsup/mingw/dllmain.c
winsup/mingw/gccmain.c
winsup/mingw/include/_mingw.h
winsup/mingw/include/assert.h
winsup/mingw/include/complex.h
winsup/mingw/include/conio.h
winsup/mingw/include/ctype.h
winsup/mingw/include/dir.h
winsup/mingw/include/direct.h
winsup/mingw/include/dirent.h
winsup/mingw/include/dos.h
winsup/mingw/include/errno.h
winsup/mingw/include/excpt.h
winsup/mingw/include/fcntl.h
winsup/mingw/include/fenv.h
winsup/mingw/include/float.h
winsup/mingw/include/getopt.h
winsup/mingw/include/inttypes.h
winsup/mingw/include/io.h
winsup/mingw/include/libgen.h
winsup/mingw/include/limits.h
winsup/mingw/include/locale.h
winsup/mingw/include/malloc.h
winsup/mingw/include/math.h
winsup/mingw/include/mbctype.h
winsup/mingw/include/mbstring.h
winsup/mingw/include/mem.h
winsup/mingw/include/memory.h
winsup/mingw/include/process.h
winsup/mingw/include/search.h
winsup/mingw/include/setjmp.h
winsup/mingw/include/share.h
winsup/mingw/include/signal.h
winsup/mingw/include/stdint.h
winsup/mingw/include/stdio.h
winsup/mingw/include/stdlib.h
winsup/mingw/include/string.h
winsup/mingw/include/strings.h
winsup/mingw/include/sys/fcntl.h
winsup/mingw/include/sys/file.h
winsup/mingw/include/sys/locking.h
winsup/mingw/include/sys/param.h
winsup/mingw/include/sys/stat.h
winsup/mingw/include/sys/time.h
winsup/mingw/include/sys/timeb.h
winsup/mingw/include/sys/types.h
winsup/mingw/include/sys/unistd.h
winsup/mingw/include/sys/utime.h
winsup/mingw/include/tchar.h
winsup/mingw/include/time.h
winsup/mingw/include/unistd.h
winsup/mingw/include/utime.h
winsup/mingw/include/values.h
winsup/mingw/include/varargs.h
winsup/mingw/include/wchar.h
winsup/mingw/include/wctype.h
winsup/mingw/init.c
winsup/mingw/install-sh
winsup/mingw/isascii.c
winsup/mingw/iscsym.c
winsup/mingw/iscsymf.c
winsup/mingw/jamfile
winsup/mingw/main.c
winsup/mingw/man/dirname.man
winsup/mingw/mingwex/Makefile.in
winsup/mingw/mingwex/_Exit.c
winsup/mingw/mingwex/atoll.c
winsup/mingw/mingwex/basename.c
winsup/mingw/mingwex/btowc.c
winsup/mingw/mingwex/complex/cabs.c
winsup/mingw/mingwex/complex/cabsf.c
winsup/mingw/mingwex/complex/cabsl.c
winsup/mingw/mingwex/complex/cacos.c
winsup/mingw/mingwex/complex/cacosf.c
winsup/mingw/mingwex/complex/cacosh.c
winsup/mingw/mingwex/complex/cacoshf.c
winsup/mingw/mingwex/complex/cacoshl.c
winsup/mingw/mingwex/complex/cacosl.c
winsup/mingw/mingwex/complex/carg.c
winsup/mingw/mingwex/complex/cargf.c
winsup/mingw/mingwex/complex/cargl.c
winsup/mingw/mingwex/complex/casin.c
winsup/mingw/mingwex/complex/casinf.c
winsup/mingw/mingwex/complex/casinh.c
winsup/mingw/mingwex/complex/casinhf.c
winsup/mingw/mingwex/complex/casinhl.c
winsup/mingw/mingwex/complex/casinl.c
winsup/mingw/mingwex/complex/catan.c
winsup/mingw/mingwex/complex/catanf.c
winsup/mingw/mingwex/complex/catanh.c
winsup/mingw/mingwex/complex/catanhf.c
winsup/mingw/mingwex/complex/catanhl.c
winsup/mingw/mingwex/complex/catanl.c
winsup/mingw/mingwex/complex/ccos.c
winsup/mingw/mingwex/complex/ccosf.c
winsup/mingw/mingwex/complex/ccosh.c
winsup/mingw/mingwex/complex/ccoshf.c
winsup/mingw/mingwex/complex/ccoshl.c
winsup/mingw/mingwex/complex/ccosl.c
winsup/mingw/mingwex/complex/cexp.c
winsup/mingw/mingwex/complex/cexpf.c
winsup/mingw/mingwex/complex/cexpl.c
winsup/mingw/mingwex/complex/cimag.c
winsup/mingw/mingwex/complex/cimagf.c
winsup/mingw/mingwex/complex/cimagl.c
winsup/mingw/mingwex/complex/clog.c
winsup/mingw/mingwex/complex/clogf.c
winsup/mingw/mingwex/complex/clogl.c
winsup/mingw/mingwex/complex/cpow.c
winsup/mingw/mingwex/complex/cpowf.c
winsup/mingw/mingwex/complex/cpowl.c
winsup/mingw/mingwex/complex/cproj.c
winsup/mingw/mingwex/complex/cprojf.c
winsup/mingw/mingwex/complex/cprojl.c
winsup/mingw/mingwex/complex/creal.c
winsup/mingw/mingwex/complex/crealf.c
winsup/mingw/mingwex/complex/creall.c
winsup/mingw/mingwex/complex/csin.c
winsup/mingw/mingwex/complex/csinf.c
winsup/mingw/mingwex/complex/csinh.c
winsup/mingw/mingwex/complex/csinhf.c
winsup/mingw/mingwex/complex/csinhl.c
winsup/mingw/mingwex/complex/csinl.c
winsup/mingw/mingwex/complex/csqrt.c
winsup/mingw/mingwex/complex/csqrtf.c
winsup/mingw/mingwex/complex/csqrtl.c
winsup/mingw/mingwex/complex/ctan.c
winsup/mingw/mingwex/complex/ctanf.c
winsup/mingw/mingwex/complex/ctanh.c
winsup/mingw/mingwex/complex/ctanhf.c
winsup/mingw/mingwex/complex/ctanhl.c
winsup/mingw/mingwex/complex/ctanl.c
winsup/mingw/mingwex/dirent.c
winsup/mingw/mingwex/dirname.c
winsup/mingw/mingwex/feclearexcept.c
winsup/mingw/mingwex/fegetenv.c
winsup/mingw/mingwex/fegetexceptflag.c
winsup/mingw/mingwex/fegetround.c
winsup/mingw/mingwex/feholdexcept.c
winsup/mingw/mingwex/feraiseexcept.c
winsup/mingw/mingwex/fesetenv.c
winsup/mingw/mingwex/fesetexceptflag.c
winsup/mingw/mingwex/fesetround.c
winsup/mingw/mingwex/fetestexcept.c
winsup/mingw/mingwex/feupdateenv.c
winsup/mingw/mingwex/ftruncate.c
winsup/mingw/mingwex/fwide.c
winsup/mingw/mingwex/gdtoa/README
winsup/mingw/mingwex/gdtoa/README.mingw
winsup/mingw/mingwex/gdtoa/arithchk.c
winsup/mingw/mingwex/gdtoa/dmisc.c
winsup/mingw/mingwex/gdtoa/dtoa.c
winsup/mingw/mingwex/gdtoa/g__fmt.c
winsup/mingw/mingwex/gdtoa/g_dfmt.c
winsup/mingw/mingwex/gdtoa/g_ffmt.c
winsup/mingw/mingwex/gdtoa/g_xfmt.c
winsup/mingw/mingwex/gdtoa/gd_arith.h
winsup/mingw/mingwex/gdtoa/gd_qnan.h
winsup/mingw/mingwex/gdtoa/gdtoa.c
winsup/mingw/mingwex/gdtoa/gdtoa.h
winsup/mingw/mingwex/gdtoa/gdtoa_fltrnds.h
winsup/mingw/mingwex/gdtoa/gdtoaimp.h
winsup/mingw/mingwex/gdtoa/gethex.c
winsup/mingw/mingwex/gdtoa/gmisc.c
winsup/mingw/mingwex/gdtoa/hd_init.c
winsup/mingw/mingwex/gdtoa/hexnan.c
winsup/mingw/mingwex/gdtoa/misc.c
winsup/mingw/mingwex/gdtoa/qnan.c
winsup/mingw/mingwex/gdtoa/smisc.c
winsup/mingw/mingwex/gdtoa/strtodg.c
winsup/mingw/mingwex/gdtoa/strtodnrp.c
winsup/mingw/mingwex/gdtoa/strtof.c
winsup/mingw/mingwex/gdtoa/strtopx.c
winsup/mingw/mingwex/gdtoa/sum.c
winsup/mingw/mingwex/gdtoa/ulp.c
winsup/mingw/mingwex/getopt.c
winsup/mingw/mingwex/gettimeofday.c
winsup/mingw/mingwex/imaxabs.c
winsup/mingw/mingwex/imaxdiv.c
winsup/mingw/mingwex/isblank.c
winsup/mingw/mingwex/iswblank.c
winsup/mingw/mingwex/lltoa.c
winsup/mingw/mingwex/lltow.c
winsup/mingw/mingwex/math/acosf.c
winsup/mingw/mingwex/math/acosh.c
winsup/mingw/mingwex/math/acoshf.c
winsup/mingw/mingwex/math/acoshl.c
winsup/mingw/mingwex/math/acosl.c
winsup/mingw/mingwex/math/asinf.c
winsup/mingw/mingwex/math/asinh.c
winsup/mingw/mingwex/math/asinhf.c
winsup/mingw/mingwex/math/asinhl.c
winsup/mingw/mingwex/math/asinl.c
winsup/mingw/mingwex/math/atan2f.c
winsup/mingw/mingwex/math/atan2l.c
winsup/mingw/mingwex/math/atanf.c
winsup/mingw/mingwex/math/atanh.c
winsup/mingw/mingwex/math/atanhf.c
winsup/mingw/mingwex/math/atanhl.c
winsup/mingw/mingwex/math/atanl.c
winsup/mingw/mingwex/math/cbrt.c
winsup/mingw/mingwex/math/cbrtf.c
winsup/mingw/mingwex/math/cbrtl.c
winsup/mingw/mingwex/math/ceilf.S
winsup/mingw/mingwex/math/ceill.S
winsup/mingw/mingwex/math/cephes_mconf.h
winsup/mingw/mingwex/math/copysign.S
winsup/mingw/mingwex/math/copysignf.S
winsup/mingw/mingwex/math/copysignl.S
winsup/mingw/mingwex/math/cosf.S
winsup/mingw/mingwex/math/coshf.c
winsup/mingw/mingwex/math/coshl.c
winsup/mingw/mingwex/math/cosl.S
winsup/mingw/mingwex/math/erfl.c
winsup/mingw/mingwex/math/exp2.S
winsup/mingw/mingwex/math/exp2f.S
winsup/mingw/mingwex/math/exp2l.S
winsup/mingw/mingwex/math/expf.c
winsup/mingw/mingwex/math/expl.c
winsup/mingw/mingwex/math/expm1.c
winsup/mingw/mingwex/math/expm1f.c
winsup/mingw/mingwex/math/expm1l.c
winsup/mingw/mingwex/math/fabs.c
winsup/mingw/mingwex/math/fabsf.c
winsup/mingw/mingwex/math/fabsl.c
winsup/mingw/mingwex/math/fastmath.h
winsup/mingw/mingwex/math/fdim.c
winsup/mingw/mingwex/math/fdimf.c
winsup/mingw/mingwex/math/fdiml.c
winsup/mingw/mingwex/math/floorf.S
winsup/mingw/mingwex/math/floorl.S
winsup/mingw/mingwex/math/fma.S
winsup/mingw/mingwex/math/fmaf.S
winsup/mingw/mingwex/math/fmal.c
winsup/mingw/mingwex/math/fmax.c
winsup/mingw/mingwex/math/fmaxf.c
winsup/mingw/mingwex/math/fmaxl.c
winsup/mingw/mingwex/math/fmin.c
winsup/mingw/mingwex/math/fminf.c
winsup/mingw/mingwex/math/fminl.c
winsup/mingw/mingwex/math/fmodf.c
winsup/mingw/mingwex/math/fmodl.c
winsup/mingw/mingwex/math/fp_consts.c
winsup/mingw/mingwex/math/fp_consts.h
winsup/mingw/mingwex/math/fp_constsf.c
winsup/mingw/mingwex/math/fp_constsl.c
winsup/mingw/mingwex/math/fpclassify.c
winsup/mingw/mingwex/math/fpclassifyf.c
winsup/mingw/mingwex/math/fpclassifyl.c
winsup/mingw/mingwex/math/frexpf.c
winsup/mingw/mingwex/math/frexpl.S
winsup/mingw/mingwex/math/fucom.c
winsup/mingw/mingwex/math/hypotf.c
winsup/mingw/mingwex/math/hypotl.c
winsup/mingw/mingwex/math/ilogb.S
winsup/mingw/mingwex/math/ilogbf.S
winsup/mingw/mingwex/math/ilogbl.S
winsup/mingw/mingwex/math/isnan.c
winsup/mingw/mingwex/math/isnanf.c
winsup/mingw/mingwex/math/isnanl.c
winsup/mingw/mingwex/math/ldexpf.c
winsup/mingw/mingwex/math/ldexpl.c
winsup/mingw/mingwex/math/lgamma.c
winsup/mingw/mingwex/math/lgammaf.c
winsup/mingw/mingwex/math/lgammal.c
winsup/mingw/mingwex/math/llrint.c
winsup/mingw/mingwex/math/llrintf.c
winsup/mingw/mingwex/math/llrintl.c
winsup/mingw/mingwex/math/log10f.S
winsup/mingw/mingwex/math/log10l.S
winsup/mingw/mingwex/math/log1p.S
winsup/mingw/mingwex/math/log1pf.S
winsup/mingw/mingwex/math/log1pl.S
winsup/mingw/mingwex/math/log2.S
winsup/mingw/mingwex/math/log2f.S
winsup/mingw/mingwex/math/log2l.S
winsup/mingw/mingwex/math/logb.c
winsup/mingw/mingwex/math/logbf.c
winsup/mingw/mingwex/math/logbl.c
winsup/mingw/mingwex/math/logf.S
winsup/mingw/mingwex/math/logl.S
winsup/mingw/mingwex/math/lrint.c
winsup/mingw/mingwex/math/lrintf.c
winsup/mingw/mingwex/math/lrintl.c
winsup/mingw/mingwex/math/lround_generic.c
winsup/mingw/mingwex/math/modff.c
winsup/mingw/mingwex/math/modfl.c
winsup/mingw/mingwex/math/nearbyint.S
winsup/mingw/mingwex/math/nearbyintf.S
winsup/mingw/mingwex/math/nearbyintl.S
winsup/mingw/mingwex/math/nextafterf.c
winsup/mingw/mingwex/math/nextafterl.c
winsup/mingw/mingwex/math/nexttoward.c
winsup/mingw/mingwex/math/nexttowardf.c
winsup/mingw/mingwex/math/pow.c
winsup/mingw/mingwex/math/powf.c
winsup/mingw/mingwex/math/powi.c
winsup/mingw/mingwex/math/powif.c
winsup/mingw/mingwex/math/powil.c
winsup/mingw/mingwex/math/powl.c
winsup/mingw/mingwex/math/remainder.S
winsup/mingw/mingwex/math/remainderf.S
winsup/mingw/mingwex/math/remainderl.S
winsup/mingw/mingwex/math/remquo.S
winsup/mingw/mingwex/math/remquof.S
winsup/mingw/mingwex/math/remquol.S
winsup/mingw/mingwex/math/rint.c
winsup/mingw/mingwex/math/rintf.c
winsup/mingw/mingwex/math/rintl.c
winsup/mingw/mingwex/math/round_generic.c
winsup/mingw/mingwex/math/round_internal.h
winsup/mingw/mingwex/math/s_erf.c
winsup/mingw/mingwex/math/scalbn.S
winsup/mingw/mingwex/math/scalbnf.S
winsup/mingw/mingwex/math/scalbnl.S
winsup/mingw/mingwex/math/sf_erf.c
winsup/mingw/mingwex/math/signbit.c
winsup/mingw/mingwex/math/signbitf.c
winsup/mingw/mingwex/math/signbitl.c
winsup/mingw/mingwex/math/sinf.S
winsup/mingw/mingwex/math/sinhf.c
winsup/mingw/mingwex/math/sinhl.c
winsup/mingw/mingwex/math/sinl.S
winsup/mingw/mingwex/math/sqrtf.c
winsup/mingw/mingwex/math/sqrtl.c
winsup/mingw/mingwex/math/tanf.S
winsup/mingw/mingwex/math/tanhf.c
winsup/mingw/mingwex/math/tanhl.c
winsup/mingw/mingwex/math/tanl.S
winsup/mingw/mingwex/math/tgamma.c
winsup/mingw/mingwex/math/tgammaf.c
winsup/mingw/mingwex/math/tgammal.c
winsup/mingw/mingwex/math/trunc.c
winsup/mingw/mingwex/math/truncf.c
winsup/mingw/mingwex/math/truncl.c
winsup/mingw/mingwex/mb_wc_common.h
winsup/mingw/mingwex/mbrtowc.c
winsup/mingw/mingwex/mbsinit.c
winsup/mingw/mingwex/mingw-aligned-malloc.c
winsup/mingw/mingwex/mingw-fseek.c
winsup/mingw/mingwex/sitest.c
winsup/mingw/mingwex/stdio/fopen64.c
winsup/mingw/mingwex/stdio/fprintf.c
winsup/mingw/mingwex/stdio/fseeko64.c
winsup/mingw/mingwex/stdio/ftello64.c
winsup/mingw/mingwex/stdio/lseek64.c
winsup/mingw/mingwex/stdio/pformat.c
winsup/mingw/mingwex/stdio/pformat.h
winsup/mingw/mingwex/stdio/printf.c
winsup/mingw/mingwex/stdio/snprintf.c
winsup/mingw/mingwex/stdio/snwprintf.c
winsup/mingw/mingwex/stdio/sprintf.c
winsup/mingw/mingwex/stdio/vfprintf.c
winsup/mingw/mingwex/stdio/vfscanf.c
winsup/mingw/mingwex/stdio/vfwscanf.c
winsup/mingw/mingwex/stdio/vprintf.c
winsup/mingw/mingwex/stdio/vscanf.c
winsup/mingw/mingwex/stdio/vsnprintf.c
winsup/mingw/mingwex/stdio/vsnwprintf.c
winsup/mingw/mingwex/stdio/vsprintf.c
winsup/mingw/mingwex/stdio/vsscanf.c
winsup/mingw/mingwex/stdio/vswscanf.c
winsup/mingw/mingwex/stdio/vwscanf.c
winsup/mingw/mingwex/strtoimax.c
winsup/mingw/mingwex/strtoumax.c
winsup/mingw/mingwex/tdelete.c
winsup/mingw/mingwex/testwmem.c
winsup/mingw/mingwex/tfind.c
winsup/mingw/mingwex/tsearch.c
winsup/mingw/mingwex/tst-aligned-malloc.c
winsup/mingw/mingwex/twalk.c
winsup/mingw/mingwex/ulltoa.c
winsup/mingw/mingwex/ulltow.c
winsup/mingw/mingwex/usleep.c
winsup/mingw/mingwex/wcrtomb.c
winsup/mingw/mingwex/wcstof.c
winsup/mingw/mingwex/wcstoimax.c
winsup/mingw/mingwex/wcstold.c
winsup/mingw/mingwex/wcstoumax.c
winsup/mingw/mingwex/wctob.c
winsup/mingw/mingwex/wctrans.c
winsup/mingw/mingwex/wctype.c
winsup/mingw/mingwex/wdirent.c
winsup/mingw/mingwex/wmemchr.c
winsup/mingw/mingwex/wmemcmp.c
winsup/mingw/mingwex/wmemcpy.c
winsup/mingw/mingwex/wmemmove.c
winsup/mingw/mingwex/wmemset.c
winsup/mingw/mingwex/wtoll.c
winsup/mingw/mkinstalldirs
winsup/mingw/moldname.def.in
winsup/mingw/msvcrt.def.in
winsup/mingw/mthr.c
winsup/mingw/mthr_init.c
winsup/mingw/ofmt_stub.s
winsup/mingw/profile/COPYING
winsup/mingw/profile/CYGWIN_LICENSE
winsup/mingw/profile/Makefile.in
winsup/mingw/profile/gcrt0.c
winsup/mingw/profile/gmon.c
winsup/mingw/profile/gmon.h
winsup/mingw/profile/mcount.c
winsup/mingw/profile/profil.c
winsup/mingw/profile/profil.h
winsup/mingw/profile/profile.h
winsup/mingw/pseudo-reloc-list.c
winsup/mingw/pseudo-reloc.c
winsup/mingw/readme.txt
winsup/mingw/samples/dirent/jamfile
winsup/mingw/samples/dirent/test.c
winsup/mingw/samples/dirent/wtest.c
winsup/mingw/samples/dlltest/dll.c
winsup/mingw/samples/dlltest/dll.def
winsup/mingw/samples/dlltest/dll.h
winsup/mingw/samples/dlltest/exe.c
winsup/mingw/samples/dlltest/exe.exp
winsup/mingw/samples/dlltest/expexe.c
winsup/mingw/samples/dlltest/expexe.def
winsup/mingw/samples/dlltest/jamfile
winsup/mingw/samples/dlltest/loaddll.c
winsup/mingw/samples/dlltest/loadexe.c
winsup/mingw/samples/dlltest/readme.txt
winsup/mingw/samples/dlltest/silly.cpp
winsup/mingw/samples/dlltest/silly.def
winsup/mingw/samples/dlltest/silly.exp
winsup/mingw/samples/dlltest/silly.h
winsup/mingw/samples/dlltest/sillydll.cpp
winsup/mingw/samples/filehand/filehand.c
winsup/mingw/samples/filehand/jamfile
winsup/mingw/samples/filehand/junk.txt
winsup/mingw/samples/fixargv/fixargv.c
winsup/mingw/samples/fixargv/fixargv.h
winsup/mingw/samples/fixargv/readme.txt
winsup/mingw/samples/fmode/all.c
winsup/mingw/samples/fmode/jamfile
winsup/mingw/samples/fmode/readme.txt
winsup/mingw/samples/fmode/test.c
winsup/mingw/samples/fmode/test2.c
winsup/mingw/samples/globbing/glob.c
winsup/mingw/samples/globbing/jamfile
winsup/mingw/samples/globbing/noglob.c
winsup/mingw/samples/globbing/readme.txt
winsup/mingw/samples/print/jamfile
winsup/mingw/samples/print/prntest.c
winsup/mingw/samples/seh/eh3.c
winsup/mingw/samples/seh/exutil.c
winsup/mingw/samples/seh/exutil.def
winsup/mingw/samples/seh/exutil.h
winsup/mingw/samples/seh/jamfile
winsup/mingw/samples/seh/sehfix.c
winsup/mingw/samples/seh/sehsub.c
winsup/mingw/samples/seh/sehtest.c
winsup/mingw/samples/simpledll/dll.c
winsup/mingw/samples/simpledll/dll.cpp
winsup/mingw/samples/simpledll/dll.def
winsup/mingw/samples/simpledll/exe.c
winsup/mingw/samples/simpledll/jamfile
winsup/mingw/samples/simpledll/makedll.bat
winsup/mingw/samples/test/jamfile
winsup/mingw/samples/test/test.c
winsup/mingw/samples/wintest/jamfile
winsup/mingw/samples/wintest/test.c
winsup/mingw/strcasecmp.c
winsup/mingw/strncasecmp.c
winsup/mingw/test_headers.c
winsup/mingw/tlsmcrt.c
winsup/mingw/tlsmthread.c
winsup/mingw/tlssup.c
winsup/mingw/tlsthrd.c
winsup/mingw/toascii.c
winsup/mingw/txtmode.c
winsup/mingw/wcscmpi.c
winsup/testsuite/ChangeLog
winsup/testsuite/Makefile.in
winsup/testsuite/README
winsup/testsuite/aclocal.m4
winsup/testsuite/config/default.exp
winsup/testsuite/configure
winsup/testsuite/configure.in
winsup/testsuite/cygrun.c
winsup/testsuite/libltp/include/dataascii.h
winsup/testsuite/libltp/include/databin.h
winsup/testsuite/libltp/include/file_lock.h
winsup/testsuite/libltp/include/forker.h
winsup/testsuite/libltp/include/open_flags.h
winsup/testsuite/libltp/include/pattern.h
winsup/testsuite/libltp/include/random_range.h
winsup/testsuite/libltp/include/rmobj.h
winsup/testsuite/libltp/include/search_path.h
winsup/testsuite/libltp/include/str_to_bytes.h
winsup/testsuite/libltp/include/string_to_tokens.h
winsup/testsuite/libltp/include/test.h
winsup/testsuite/libltp/include/tlibio.h
winsup/testsuite/libltp/include/usctest.h
winsup/testsuite/libltp/include/write_log.h
winsup/testsuite/libltp/lib/dataascii.c
winsup/testsuite/libltp/lib/databin.c
winsup/testsuite/libltp/lib/datapid.c
winsup/testsuite/libltp/lib/forker.c
winsup/testsuite/libltp/lib/get_high_address.c
winsup/testsuite/libltp/lib/libtestsuite.c
winsup/testsuite/libltp/lib/open_flags.c
winsup/testsuite/libltp/lib/parse_opts.c
winsup/testsuite/libltp/lib/pattern.c
winsup/testsuite/libltp/lib/rmobj.c
winsup/testsuite/libltp/lib/search_path.c
winsup/testsuite/libltp/lib/str_to_bytes.c
winsup/testsuite/libltp/lib/string_to_tokens.c
winsup/testsuite/libltp/lib/tst_res.c
winsup/testsuite/libltp/lib/tst_sig.c
winsup/testsuite/libltp/lib/tst_tmpdir.c
winsup/testsuite/libltp/lib/write_log.c
winsup/testsuite/winsup.api/checksignal.c
winsup/testsuite/winsup.api/crlf.c
winsup/testsuite/winsup.api/cygload.cc
winsup/testsuite/winsup.api/cygload.exp
winsup/testsuite/winsup.api/cygload.h
winsup/testsuite/winsup.api/devdsp.c
winsup/testsuite/winsup.api/devdsp_okay.h
winsup/testsuite/winsup.api/devzero.c
winsup/testsuite/winsup.api/iospeed.c
winsup/testsuite/winsup.api/known_bugs.tcl
winsup/testsuite/winsup.api/ltp/access01.c
winsup/testsuite/winsup.api/ltp/access03.c
winsup/testsuite/winsup.api/ltp/access04.c
winsup/testsuite/winsup.api/ltp/access05.c
winsup/testsuite/winsup.api/ltp/alarm01.c
winsup/testsuite/winsup.api/ltp/alarm02.c
winsup/testsuite/winsup.api/ltp/alarm03.c
winsup/testsuite/winsup.api/ltp/alarm07.c
winsup/testsuite/winsup.api/ltp/asyncio02.c
winsup/testsuite/winsup.api/ltp/chdir02.c
winsup/testsuite/winsup.api/ltp/chdir04.c
winsup/testsuite/winsup.api/ltp/chmod01.c
winsup/testsuite/winsup.api/ltp/chmod02.c
winsup/testsuite/winsup.api/ltp/chown01.c
winsup/testsuite/winsup.api/ltp/close01.c
winsup/testsuite/winsup.api/ltp/close02.c
winsup/testsuite/winsup.api/ltp/close08.c
winsup/testsuite/winsup.api/ltp/creat01.c
winsup/testsuite/winsup.api/ltp/creat03.c
winsup/testsuite/winsup.api/ltp/creat09.c
winsup/testsuite/winsup.api/ltp/dup01.c
winsup/testsuite/winsup.api/ltp/dup02.c
winsup/testsuite/winsup.api/ltp/dup03.c
winsup/testsuite/winsup.api/ltp/dup04.c
winsup/testsuite/winsup.api/ltp/dup05.c
winsup/testsuite/winsup.api/ltp/execl01.c
winsup/testsuite/winsup.api/ltp/execle01.c
winsup/testsuite/winsup.api/ltp/execlp01.c
winsup/testsuite/winsup.api/ltp/execv01.c
winsup/testsuite/winsup.api/ltp/execve01.c
winsup/testsuite/winsup.api/ltp/execvp01.c
winsup/testsuite/winsup.api/ltp/exit01.c
winsup/testsuite/winsup.api/ltp/exit02.c
winsup/testsuite/winsup.api/ltp/fchdir01.c
winsup/testsuite/winsup.api/ltp/fchdir02.c
winsup/testsuite/winsup.api/ltp/fchmod01.c
winsup/testsuite/winsup.api/ltp/fchown01.c
winsup/testsuite/winsup.api/ltp/fcntl02.c
winsup/testsuite/winsup.api/ltp/fcntl03.c
winsup/testsuite/winsup.api/ltp/fcntl04.c
winsup/testsuite/winsup.api/ltp/fcntl05.c
winsup/testsuite/winsup.api/ltp/fcntl07.c
winsup/testsuite/winsup.api/ltp/fcntl07B.c
winsup/testsuite/winsup.api/ltp/fcntl08.c
winsup/testsuite/winsup.api/ltp/fcntl09.c
winsup/testsuite/winsup.api/ltp/fcntl10.c
winsup/testsuite/winsup.api/ltp/fork01.c
winsup/testsuite/winsup.api/ltp/fork02.c
winsup/testsuite/winsup.api/ltp/fork03.c
winsup/testsuite/winsup.api/ltp/fork04.c
winsup/testsuite/winsup.api/ltp/fork06.c
winsup/testsuite/winsup.api/ltp/fork07.c
winsup/testsuite/winsup.api/ltp/fork09.c
winsup/testsuite/winsup.api/ltp/fork10.c
winsup/testsuite/winsup.api/ltp/fork11.c
winsup/testsuite/winsup.api/ltp/fpathconf01.c
winsup/testsuite/winsup.api/ltp/fstat01.c
winsup/testsuite/winsup.api/ltp/fstat02.c
winsup/testsuite/winsup.api/ltp/fstat03.c
winsup/testsuite/winsup.api/ltp/fstat04.c
winsup/testsuite/winsup.api/ltp/fsync01.c
winsup/testsuite/winsup.api/ltp/ftruncate01.c
winsup/testsuite/winsup.api/ltp/ftruncate02.c
winsup/testsuite/winsup.api/ltp/ftruncate03.c
winsup/testsuite/winsup.api/ltp/getegid01.c
winsup/testsuite/winsup.api/ltp/geteuid01.c
winsup/testsuite/winsup.api/ltp/getgid01.c
winsup/testsuite/winsup.api/ltp/getgid02.c
winsup/testsuite/winsup.api/ltp/getgid03.c
winsup/testsuite/winsup.api/ltp/getgroups01.c
winsup/testsuite/winsup.api/ltp/getgroups02.c
winsup/testsuite/winsup.api/ltp/gethostid01.c
winsup/testsuite/winsup.api/ltp/gethostname01.c
winsup/testsuite/winsup.api/ltp/getpgid01.c
winsup/testsuite/winsup.api/ltp/getpgid02.c
winsup/testsuite/winsup.api/ltp/getpgrp01.c
winsup/testsuite/winsup.api/ltp/getpid01.c
winsup/testsuite/winsup.api/ltp/getpid02.c
winsup/testsuite/winsup.api/ltp/getppid01.c
winsup/testsuite/winsup.api/ltp/getppid02.c
winsup/testsuite/winsup.api/ltp/getuid01.c
winsup/testsuite/winsup.api/ltp/getuid02.c
winsup/testsuite/winsup.api/ltp/getuid03.c
winsup/testsuite/winsup.api/ltp/kill01.c
winsup/testsuite/winsup.api/ltp/kill02.c
winsup/testsuite/winsup.api/ltp/kill03.c
winsup/testsuite/winsup.api/ltp/kill04.c
winsup/testsuite/winsup.api/ltp/kill09.c
winsup/testsuite/winsup.api/ltp/link02.c
winsup/testsuite/winsup.api/ltp/link03.c
winsup/testsuite/winsup.api/ltp/link04.c
winsup/testsuite/winsup.api/ltp/link05.c
winsup/testsuite/winsup.api/ltp/lseek01.c
winsup/testsuite/winsup.api/ltp/lseek02.c
winsup/testsuite/winsup.api/ltp/lseek03.c
winsup/testsuite/winsup.api/ltp/lseek04.c
winsup/testsuite/winsup.api/ltp/lseek05.c
winsup/testsuite/winsup.api/ltp/lseek06.c
winsup/testsuite/winsup.api/ltp/lseek07.c
winsup/testsuite/winsup.api/ltp/lseek08.c
winsup/testsuite/winsup.api/ltp/lseek09.c
winsup/testsuite/winsup.api/ltp/lseek10.c
winsup/testsuite/winsup.api/ltp/lstat02.c
winsup/testsuite/winsup.api/ltp/mkdir01.c
winsup/testsuite/winsup.api/ltp/mkdir08.c
winsup/testsuite/winsup.api/ltp/mknod01.c
winsup/testsuite/winsup.api/ltp/mmap001.c
winsup/testsuite/winsup.api/ltp/mmap02.c
winsup/testsuite/winsup.api/ltp/mmap03.c
winsup/testsuite/winsup.api/ltp/mmap04.c
winsup/testsuite/winsup.api/ltp/mmap05.c
winsup/testsuite/winsup.api/ltp/mmap06.c
winsup/testsuite/winsup.api/ltp/mmap07.c
winsup/testsuite/winsup.api/ltp/mmap08.c
winsup/testsuite/winsup.api/ltp/munmap01.c
winsup/testsuite/winsup.api/ltp/munmap02.c
winsup/testsuite/winsup.api/ltp/nice05.c
winsup/testsuite/winsup.api/ltp/open02.c
winsup/testsuite/winsup.api/ltp/open03.c
winsup/testsuite/winsup.api/ltp/pathconf01.c
winsup/testsuite/winsup.api/ltp/pause01.c
winsup/testsuite/winsup.api/ltp/pipe01.c
winsup/testsuite/winsup.api/ltp/pipe08.c
winsup/testsuite/winsup.api/ltp/pipe09.c
winsup/testsuite/winsup.api/ltp/pipe10.c
winsup/testsuite/winsup.api/ltp/pipe11.c
winsup/testsuite/winsup.api/ltp/poll01.c
winsup/testsuite/winsup.api/ltp/read01.c
winsup/testsuite/winsup.api/ltp/read04.c
winsup/testsuite/winsup.api/ltp/readdir01.c
winsup/testsuite/winsup.api/ltp/readlink01.c
winsup/testsuite/winsup.api/ltp/readlink02.c
winsup/testsuite/winsup.api/ltp/readlink03.c
winsup/testsuite/winsup.api/ltp/rename01.c
winsup/testsuite/winsup.api/ltp/rename02.c
winsup/testsuite/winsup.api/ltp/rename08.c
winsup/testsuite/winsup.api/ltp/rename10.c
winsup/testsuite/winsup.api/ltp/rmdir01.c
winsup/testsuite/winsup.api/ltp/rmdir04.c
winsup/testsuite/winsup.api/ltp/rmdir05.c
winsup/testsuite/winsup.api/ltp/sbrk01.c
winsup/testsuite/winsup.api/ltp/select01.c
winsup/testsuite/winsup.api/ltp/select02.c
winsup/testsuite/winsup.api/ltp/select03.c
winsup/testsuite/winsup.api/ltp/setgid01.c
winsup/testsuite/winsup.api/ltp/setgroups01.c
winsup/testsuite/winsup.api/ltp/setpgid01.c
winsup/testsuite/winsup.api/ltp/setregid01.c
winsup/testsuite/winsup.api/ltp/setreuid01.c
winsup/testsuite/winsup.api/ltp/setuid01.c
winsup/testsuite/winsup.api/ltp/setuid02.c
winsup/testsuite/winsup.api/ltp/signal03.c
winsup/testsuite/winsup.api/ltp/stat01.c
winsup/testsuite/winsup.api/ltp/stat02.c
winsup/testsuite/winsup.api/ltp/stat03.c
winsup/testsuite/winsup.api/ltp/stat05.c
winsup/testsuite/winsup.api/ltp/stat06.c
winsup/testsuite/winsup.api/ltp/symlink01.c
winsup/testsuite/winsup.api/ltp/symlink02.c
winsup/testsuite/winsup.api/ltp/symlink03.c
winsup/testsuite/winsup.api/ltp/symlink04.c
winsup/testsuite/winsup.api/ltp/symlink05.c
winsup/testsuite/winsup.api/ltp/sync01.c
winsup/testsuite/winsup.api/ltp/sync02.c
winsup/testsuite/winsup.api/ltp/time01.c
winsup/testsuite/winsup.api/ltp/time02.c
winsup/testsuite/winsup.api/ltp/times01.c
winsup/testsuite/winsup.api/ltp/times02.c
winsup/testsuite/winsup.api/ltp/times03.c
winsup/testsuite/winsup.api/ltp/truncate01.c
winsup/testsuite/winsup.api/ltp/truncate02.c
winsup/testsuite/winsup.api/ltp/ulimit01.c
winsup/testsuite/winsup.api/ltp/umask01.c
winsup/testsuite/winsup.api/ltp/umask02.c
winsup/testsuite/winsup.api/ltp/umask03.c
winsup/testsuite/winsup.api/ltp/uname01.c
winsup/testsuite/winsup.api/ltp/unlink05.c
winsup/testsuite/winsup.api/ltp/unlink06.c
winsup/testsuite/winsup.api/ltp/unlink07.c
winsup/testsuite/winsup.api/ltp/unlink08.c
winsup/testsuite/winsup.api/ltp/vfork01.c
winsup/testsuite/winsup.api/ltp/wait02.c
winsup/testsuite/winsup.api/ltp/wait401.c
winsup/testsuite/winsup.api/ltp/wait402.c
winsup/testsuite/winsup.api/ltp/write01.c
winsup/testsuite/winsup.api/ltp/write02.c
winsup/testsuite/winsup.api/ltp/write03.c
winsup/testsuite/winsup.api/mmaptest01.c
winsup/testsuite/winsup.api/mmaptest02.c
winsup/testsuite/winsup.api/mmaptest03.c
winsup/testsuite/winsup.api/mmaptest04.c
winsup/testsuite/winsup.api/msgtest.c
winsup/testsuite/winsup.api/nullgetcwd.c
winsup/testsuite/winsup.api/pthread/cancel1.c
winsup/testsuite/winsup.api/pthread/cancel10.c
winsup/testsuite/winsup.api/pthread/cancel11.c
winsup/testsuite/winsup.api/pthread/cancel12.c
winsup/testsuite/winsup.api/pthread/cancel2.c
winsup/testsuite/winsup.api/pthread/cancel3.c
winsup/testsuite/winsup.api/pthread/cancel4.c
winsup/testsuite/winsup.api/pthread/cancel5.c
winsup/testsuite/winsup.api/pthread/cancel6.c
winsup/testsuite/winsup.api/pthread/cancel7.c
winsup/testsuite/winsup.api/pthread/cancel8.c
winsup/testsuite/winsup.api/pthread/cancel9.c
winsup/testsuite/winsup.api/pthread/cleanup2.c
winsup/testsuite/winsup.api/pthread/cleanup3.c
winsup/testsuite/winsup.api/pthread/condvar1.c
winsup/testsuite/winsup.api/pthread/condvar2.c
winsup/testsuite/winsup.api/pthread/condvar2_1.c
winsup/testsuite/winsup.api/pthread/condvar3.c
winsup/testsuite/winsup.api/pthread/condvar3_1.c
winsup/testsuite/winsup.api/pthread/condvar3_2.c
winsup/testsuite/winsup.api/pthread/condvar3_3.c
winsup/testsuite/winsup.api/pthread/condvar4.c
winsup/testsuite/winsup.api/pthread/condvar5.c
winsup/testsuite/winsup.api/pthread/condvar6.c
winsup/testsuite/winsup.api/pthread/condvar7.c
winsup/testsuite/winsup.api/pthread/condvar8.c
winsup/testsuite/winsup.api/pthread/condvar9.c
winsup/testsuite/winsup.api/pthread/count1.c
winsup/testsuite/winsup.api/pthread/create1.c
winsup/testsuite/winsup.api/pthread/create2.c
winsup/testsuite/winsup.api/pthread/equal1.c
winsup/testsuite/winsup.api/pthread/exit1.c
winsup/testsuite/winsup.api/pthread/exit2.c
winsup/testsuite/winsup.api/pthread/exit3.c
winsup/testsuite/winsup.api/pthread/inherit1.c
winsup/testsuite/winsup.api/pthread/join0.c
winsup/testsuite/winsup.api/pthread/join1.c
winsup/testsuite/winsup.api/pthread/join2.c
winsup/testsuite/winsup.api/pthread/mainthreadexits.c
winsup/testsuite/winsup.api/pthread/mutex1.c
winsup/testsuite/winsup.api/pthread/mutex1d.c
winsup/testsuite/winsup.api/pthread/mutex1e.c
winsup/testsuite/winsup.api/pthread/mutex1n.c
winsup/testsuite/winsup.api/pthread/mutex1r.c
winsup/testsuite/winsup.api/pthread/mutex2.c
winsup/testsuite/winsup.api/pthread/mutex3.c
winsup/testsuite/winsup.api/pthread/mutex4.c
winsup/testsuite/winsup.api/pthread/mutex5.c
winsup/testsuite/winsup.api/pthread/mutex6d.c
winsup/testsuite/winsup.api/pthread/mutex6e.c
winsup/testsuite/winsup.api/pthread/mutex6n.c
winsup/testsuite/winsup.api/pthread/mutex6r.c
winsup/testsuite/winsup.api/pthread/mutex7.c
winsup/testsuite/winsup.api/pthread/mutex7d.c
winsup/testsuite/winsup.api/pthread/mutex7e.c
winsup/testsuite/winsup.api/pthread/mutex7n.c
winsup/testsuite/winsup.api/pthread/mutex7r.c
winsup/testsuite/winsup.api/pthread/mutex8e.c
winsup/testsuite/winsup.api/pthread/mutex8n.c
winsup/testsuite/winsup.api/pthread/mutex8r.c
winsup/testsuite/winsup.api/pthread/once1.c
winsup/testsuite/winsup.api/pthread/priority1.c
winsup/testsuite/winsup.api/pthread/priority2.c
winsup/testsuite/winsup.api/pthread/rwlock1.c
winsup/testsuite/winsup.api/pthread/rwlock2.c
winsup/testsuite/winsup.api/pthread/rwlock3.c
winsup/testsuite/winsup.api/pthread/rwlock4.c
winsup/testsuite/winsup.api/pthread/rwlock5.c
winsup/testsuite/winsup.api/pthread/rwlock6.c
winsup/testsuite/winsup.api/pthread/rwlock7.c
winsup/testsuite/winsup.api/pthread/self1.c
winsup/testsuite/winsup.api/pthread/self2.c
winsup/testsuite/winsup.api/pthread/test.h
winsup/testsuite/winsup.api/pthread/threadidafterfork.c
winsup/testsuite/winsup.api/pthread/tsd1.c
winsup/testsuite/winsup.api/resethand.c
winsup/testsuite/winsup.api/samples/sample-fail.c
winsup/testsuite/winsup.api/samples/sample-miscompile.c
winsup/testsuite/winsup.api/samples/sample-pass.c
winsup/testsuite/winsup.api/semtest.c
winsup/testsuite/winsup.api/shmtest.c
winsup/testsuite/winsup.api/sigchld.c
winsup/testsuite/winsup.api/signal-into-win32-api.c
winsup/testsuite/winsup.api/systemcall.c
winsup/testsuite/winsup.api/user_malloc.c
winsup/testsuite/winsup.api/waitpid.c
winsup/testsuite/winsup.api/winsup.exp
winsup/utils/COPYING.dumper
winsup/utils/ChangeLog
winsup/utils/ChangeLog-2000
winsup/utils/Makefile.in
winsup/utils/aclocal.m4
winsup/utils/bloda.cc
winsup/utils/configure
winsup/utils/configure.in
winsup/utils/cygcheck.cc
winsup/utils/cygpath.cc
winsup/utils/cygwin-console-helper.cc
winsup/utils/dump_setup.cc
winsup/utils/dumper.cc
winsup/utils/dumper.h
winsup/utils/getconf.c
winsup/utils/getfacl.c
winsup/utils/kill.cc
winsup/utils/ldd.cc
winsup/utils/ldh.cc
winsup/utils/loadlib.h
winsup/utils/locale.cc
winsup/utils/mingw
winsup/utils/mkgroup.c
winsup/utils/mkpasswd.c
winsup/utils/module_info.cc
winsup/utils/mount.cc
winsup/utils/parse_pe.cc
winsup/utils/passwd.c
winsup/utils/path.cc
winsup/utils/path.h
winsup/utils/ps.cc
winsup/utils/regtool.cc
winsup/utils/setfacl.c
winsup/utils/setmetamode.c
winsup/utils/ssp.c
winsup/utils/ssp.txt
winsup/utils/strace.cc
winsup/utils/testsuite.cc
winsup/utils/testsuite.h
winsup/utils/umount.cc
winsup/utils/utils.sgml
winsup/utils/wide_path.h
winsup/w32api/CONTRIBUTIONS
winsup/w32api/ChangeLog
winsup/w32api/Makefile.in
winsup/w32api/README.w32api
winsup/w32api/TODO
winsup/w32api/aclocal.m4
winsup/w32api/config.guess
winsup/w32api/config.sub
winsup/w32api/configure
winsup/w32api/configure.in
winsup/w32api/include/GL/gl.h
winsup/w32api/include/GL/glext.h
winsup/w32api/include/GL/glu.h
winsup/w32api/include/accctrl.h
winsup/w32api/include/aclapi.h
winsup/w32api/include/aclui.h
winsup/w32api/include/adsprop.h
winsup/w32api/include/afxres.h
winsup/w32api/include/amaudio.h
winsup/w32api/include/amvideo.h
winsup/w32api/include/audevcod.h
winsup/w32api/include/aviriff.h
winsup/w32api/include/aygshell.h
winsup/w32api/include/basetsd.h
winsup/w32api/include/basetyps.h
winsup/w32api/include/bdatypes.h
winsup/w32api/include/cderr.h
winsup/w32api/include/cguid.h
winsup/w32api/include/cmnquery.h
winsup/w32api/include/comcat.h
winsup/w32api/include/commctrl.h
winsup/w32api/include/commdlg.h
winsup/w32api/include/control.h
winsup/w32api/include/cpl.h
winsup/w32api/include/cplext.h
winsup/w32api/include/custcntl.h
winsup/w32api/include/dbt.h
winsup/w32api/include/dde.h
winsup/w32api/include/ddeml.h
winsup/w32api/include/ddk/atm.h
winsup/w32api/include/ddk/batclass.h
winsup/w32api/include/ddk/cfg.h
winsup/w32api/include/ddk/cfgmgr32.h
winsup/w32api/include/ddk/d4drvif.h
winsup/w32api/include/ddk/d4iface.h
winsup/w32api/include/ddk/ddkmapi.h
winsup/w32api/include/ddk/hidclass.h
winsup/w32api/include/ddk/hidpi.h
winsup/w32api/include/ddk/hidsdi.h
winsup/w32api/include/ddk/hidusage.h
winsup/w32api/include/ddk/kbdmou.h
winsup/w32api/include/ddk/mcd.h
winsup/w32api/include/ddk/miniport.h
winsup/w32api/include/ddk/minitape.h
winsup/w32api/include/ddk/mountdev.h
winsup/w32api/include/ddk/mountmgr.h
winsup/w32api/include/ddk/ndis.h
winsup/w32api/include/ddk/ndisguid.h
winsup/w32api/include/ddk/ndistapi.h
winsup/w32api/include/ddk/ndiswan.h
winsup/w32api/include/ddk/netevent.h
winsup/w32api/include/ddk/netpnp.h
winsup/w32api/include/ddk/newdev.h
winsup/w32api/include/ddk/ntapi.h
winsup/w32api/include/ddk/ntdd8042.h
winsup/w32api/include/ddk/ntddbeep.h
winsup/w32api/include/ddk/ntddcdrm.h
winsup/w32api/include/ddk/ntddcdvd.h
winsup/w32api/include/ddk/ntddchgr.h
winsup/w32api/include/ddk/ntdddisk.h
winsup/w32api/include/ddk/ntddk.h
winsup/w32api/include/ddk/ntddkbd.h
winsup/w32api/include/ddk/ntddmou.h
winsup/w32api/include/ddk/ntddndis.h
winsup/w32api/include/ddk/ntddpar.h
winsup/w32api/include/ddk/ntddpcm.h
winsup/w32api/include/ddk/ntddscsi.h
winsup/w32api/include/ddk/ntddser.h
winsup/w32api/include/ddk/ntddstor.h
winsup/w32api/include/ddk/ntddtape.h
winsup/w32api/include/ddk/ntddtdi.h
winsup/w32api/include/ddk/ntddvdeo.h
winsup/w32api/include/ddk/ntddvol.h
winsup/w32api/include/ddk/ntifs.h
winsup/w32api/include/ddk/ntpoapi.h
winsup/w32api/include/ddk/ntstatus.h
winsup/w32api/include/ddk/parallel.h
winsup/w32api/include/ddk/pfhook.h
winsup/w32api/include/ddk/poclass.h
winsup/w32api/include/ddk/scsi.h
winsup/w32api/include/ddk/scsiscan.h
winsup/w32api/include/ddk/scsiwmi.h
winsup/w32api/include/ddk/smbus.h
winsup/w32api/include/ddk/srb.h
winsup/w32api/include/ddk/storport.h
winsup/w32api/include/ddk/tdi.h
winsup/w32api/include/ddk/tdiinfo.h
winsup/w32api/include/ddk/tdikrnl.h
winsup/w32api/include/ddk/tdistat.h
winsup/w32api/include/ddk/tvout.h
winsup/w32api/include/ddk/upssvc.h
winsup/w32api/include/ddk/usb.h
winsup/w32api/include/ddk/usb100.h
winsup/w32api/include/ddk/usbcamdi.h
winsup/w32api/include/ddk/usbdi.h
winsup/w32api/include/ddk/usbioctl.h
winsup/w32api/include/ddk/usbiodef.h
winsup/w32api/include/ddk/usbscan.h
winsup/w32api/include/ddk/usbuser.h
winsup/w32api/include/ddk/video.h
winsup/w32api/include/ddk/videoagp.h
winsup/w32api/include/ddk/win2k.h
winsup/w32api/include/ddk/winddi.h
winsup/w32api/include/ddk/winddk.h
winsup/w32api/include/ddk/winnt4.h
winsup/w32api/include/ddk/winxp.h
winsup/w32api/include/ddk/ws2san.h
winsup/w32api/include/ddk/xfilter.h
winsup/w32api/include/devguid.h
winsup/w32api/include/dhcpcsdk.h
winsup/w32api/include/directx/d3d9.h
winsup/w32api/include/directx/d3d9caps.h
winsup/w32api/include/directx/d3d9types.h
winsup/w32api/include/directx/dxerr8.h
winsup/w32api/include/directx/dxerr9.h
winsup/w32api/include/dlgs.h
winsup/w32api/include/docobj.h
winsup/w32api/include/dsadmin.h
winsup/w32api/include/dsclient.h
winsup/w32api/include/dsgetdc.h
winsup/w32api/include/dshow.h
winsup/w32api/include/dsquery.h
winsup/w32api/include/dsrole.h
winsup/w32api/include/dvdevcod.h
winsup/w32api/include/dvdmedia.h
winsup/w32api/include/edevdefs.h
winsup/w32api/include/errorrep.h
winsup/w32api/include/errors.h
winsup/w32api/include/evcode.h
winsup/w32api/include/exdisp.h
winsup/w32api/include/exdispid.h
winsup/w32api/include/fltdefs.h
winsup/w32api/include/gdiplus.h
winsup/w32api/include/gdiplus/gdiplus.h
winsup/w32api/include/gdiplus/gdiplusbase.h
winsup/w32api/include/gdiplus/gdiplusbrush.h
winsup/w32api/include/gdiplus/gdipluscolor.h
winsup/w32api/include/gdiplus/gdipluscolormatrix.h
winsup/w32api/include/gdiplus/gdipluseffects.h
winsup/w32api/include/gdiplus/gdiplusenums.h
winsup/w32api/include/gdiplus/gdiplusflat.h
winsup/w32api/include/gdiplus/gdiplusgpstubs.h
winsup/w32api/include/gdiplus/gdiplusgraphics.h
winsup/w32api/include/gdiplus/gdiplusheaders.h
winsup/w32api/include/gdiplus/gdiplusimageattributes.h
winsup/w32api/include/gdiplus/gdiplusimagecodec.h
winsup/w32api/include/gdiplus/gdiplusimaging.h
winsup/w32api/include/gdiplus/gdiplusimpl.h
winsup/w32api/include/gdiplus/gdiplusinit.h
winsup/w32api/include/gdiplus/gdipluslinecaps.h
winsup/w32api/include/gdiplus/gdiplusmatrix.h
winsup/w32api/include/gdiplus/gdiplusmem.h
winsup/w32api/include/gdiplus/gdiplusmetafile.h
winsup/w32api/include/gdiplus/gdiplusmetaheader.h
winsup/w32api/include/gdiplus/gdipluspath.h
winsup/w32api/include/gdiplus/gdipluspen.h
winsup/w32api/include/gdiplus/gdipluspixelformats.h
winsup/w32api/include/gdiplus/gdiplusstringformat.h
winsup/w32api/include/gdiplus/gdiplustypes.h
winsup/w32api/include/httpext.h
winsup/w32api/include/icm.h
winsup/w32api/include/idispids.h
winsup/w32api/include/il21dec.h
winsup/w32api/include/imagehlp.h
winsup/w32api/include/imm.h
winsup/w32api/include/initguid.h
winsup/w32api/include/intshcut.h
winsup/w32api/include/ipexport.h
winsup/w32api/include/iphlpapi.h
winsup/w32api/include/ipifcons.h
winsup/w32api/include/ipinfoid.h
winsup/w32api/include/iprtrmib.h
winsup/w32api/include/iptypes.h
winsup/w32api/include/ipxconst.h
winsup/w32api/include/ipxrtdef.h
winsup/w32api/include/ipxtfflt.h
winsup/w32api/include/isguids.h
winsup/w32api/include/ks.h
winsup/w32api/include/ksmedia.h
winsup/w32api/include/largeint.h
winsup/w32api/include/lm.h
winsup/w32api/include/lmaccess.h
winsup/w32api/include/lmalert.h
winsup/w32api/include/lmapibuf.h
winsup/w32api/include/lmat.h
winsup/w32api/include/lmaudit.h
winsup/w32api/include/lmbrowsr.h
winsup/w32api/include/lmchdev.h
winsup/w32api/include/lmconfig.h
winsup/w32api/include/lmcons.h
winsup/w32api/include/lmerr.h
winsup/w32api/include/lmerrlog.h
winsup/w32api/include/lmmsg.h
winsup/w32api/include/lmremutl.h
winsup/w32api/include/lmrepl.h
winsup/w32api/include/lmserver.h
winsup/w32api/include/lmshare.h
winsup/w32api/include/lmsname.h
winsup/w32api/include/lmstats.h
winsup/w32api/include/lmsvc.h
winsup/w32api/include/lmuse.h
winsup/w32api/include/lmuseflg.h
winsup/w32api/include/lmwksta.h
winsup/w32api/include/lzexpand.h
winsup/w32api/include/mapi.h
winsup/w32api/include/mciavi.h
winsup/w32api/include/mcx.h
winsup/w32api/include/mgm.h
winsup/w32api/include/mgmtapi.h
winsup/w32api/include/mlang.h
winsup/w32api/include/mmreg.h
winsup/w32api/include/mmsystem.h
winsup/w32api/include/mpegtype.h
winsup/w32api/include/mprapi.h
winsup/w32api/include/mq.h
winsup/w32api/include/msacm.h
winsup/w32api/include/mshtml.h
winsup/w32api/include/mswsock.h
winsup/w32api/include/nb30.h
winsup/w32api/include/nddeapi.h
winsup/w32api/include/nspapi.h
winsup/w32api/include/ntdef.h
winsup/w32api/include/ntdll.h
winsup/w32api/include/ntdsapi.h
winsup/w32api/include/ntdsbcli.h
winsup/w32api/include/ntldap.h
winsup/w32api/include/ntsecapi.h
winsup/w32api/include/ntsecpkg.h
winsup/w32api/include/oaidl.h
winsup/w32api/include/objbase.h
winsup/w32api/include/objfwd.h
winsup/w32api/include/objidl.h
winsup/w32api/include/objsafe.h
winsup/w32api/include/objsel.h
winsup/w32api/include/ocidl.h
winsup/w32api/include/odbcinst.h
winsup/w32api/include/ole.h
winsup/w32api/include/ole2.h
winsup/w32api/include/ole2ver.h
winsup/w32api/include/oleacc.h
winsup/w32api/include/oleauto.h
winsup/w32api/include/olectl.h
winsup/w32api/include/olectlid.h
winsup/w32api/include/oledlg.h
winsup/w32api/include/oleidl.h
winsup/w32api/include/pbt.h
winsup/w32api/include/poppack.h
winsup/w32api/include/powrprof.h
winsup/w32api/include/prsht.h
winsup/w32api/include/psapi.h
winsup/w32api/include/pshpack1.h
winsup/w32api/include/pshpack2.h
winsup/w32api/include/pshpack4.h
winsup/w32api/include/pshpack8.h
winsup/w32api/include/qedit.h
winsup/w32api/include/rapi.h
winsup/w32api/include/ras.h
winsup/w32api/include/rasdlg.h
winsup/w32api/include/raserror.h
winsup/w32api/include/rassapi.h
winsup/w32api/include/reason.h
winsup/w32api/include/regstr.h
winsup/w32api/include/richedit.h
winsup/w32api/include/richole.h
winsup/w32api/include/routprot.h
winsup/w32api/include/rpc.h
winsup/w32api/include/rpcdce.h
winsup/w32api/include/rpcdce2.h
winsup/w32api/include/rpcdcep.h
winsup/w32api/include/rpcndr.h
winsup/w32api/include/rpcnsi.h
winsup/w32api/include/rpcnsip.h
winsup/w32api/include/rpcnterr.h
winsup/w32api/include/rpcproxy.h
winsup/w32api/include/rtutils.h
winsup/w32api/include/schannel.h
winsup/w32api/include/schnlsp.h
winsup/w32api/include/scrnsave.h
winsup/w32api/include/sddl.h
winsup/w32api/include/secext.h
winsup/w32api/include/security.h
winsup/w32api/include/servprov.h
winsup/w32api/include/setupapi.h
winsup/w32api/include/shellapi.h
winsup/w32api/include/shldisp.h
winsup/w32api/include/shlguid.h
winsup/w32api/include/shlobj.h
winsup/w32api/include/shlwapi.h
winsup/w32api/include/snmp.h
winsup/w32api/include/specstrings.h
winsup/w32api/include/sql.h
winsup/w32api/include/sqlext.h
winsup/w32api/include/sqltypes.h
winsup/w32api/include/sqlucode.h
winsup/w32api/include/sspi.h
winsup/w32api/include/stm.h
winsup/w32api/include/strmif.h
winsup/w32api/include/subauth.h
winsup/w32api/include/svcguid.h
winsup/w32api/include/tlhelp32.h
winsup/w32api/include/tmschema.h
winsup/w32api/include/unknwn.h
winsup/w32api/include/userenv.h
winsup/w32api/include/usp10.h
winsup/w32api/include/uxtheme.h
winsup/w32api/include/vfw.h
winsup/w32api/include/vidcap.h
winsup/w32api/include/vmr9.h
winsup/w32api/include/vptype.h
winsup/w32api/include/w32api.h
winsup/w32api/include/winable.h
winsup/w32api/include/winbase.h
winsup/w32api/include/winber.h
winsup/w32api/include/wincon.h
winsup/w32api/include/wincrypt.h
winsup/w32api/include/windef.h
winsup/w32api/include/windns.h
winsup/w32api/include/windows.h
winsup/w32api/include/windowsx.h
winsup/w32api/include/winerror.h
winsup/w32api/include/wingdi.h
winsup/w32api/include/wininet.h
winsup/w32api/include/winioctl.h
winsup/w32api/include/winldap.h
winsup/w32api/include/winnetwk.h
winsup/w32api/include/winnls.h
winsup/w32api/include/winnt.h
winsup/w32api/include/winperf.h
winsup/w32api/include/winreg.h
winsup/w32api/include/winresrc.h
winsup/w32api/include/winsnmp.h
winsup/w32api/include/winsock.h
winsup/w32api/include/winsock2.h
winsup/w32api/include/winspool.h
winsup/w32api/include/winsvc.h
winsup/w32api/include/winuser.h
winsup/w32api/include/winver.h
winsup/w32api/include/ws2spi.h
winsup/w32api/include/ws2tcpip.h
winsup/w32api/include/wsahelp.h
winsup/w32api/include/wsipx.h
winsup/w32api/include/wsnetbs.h
winsup/w32api/include/wtsapi32.h
winsup/w32api/include/wtypes.h
winsup/w32api/include/xprtdefs.h
winsup/w32api/include/zmouse.h
winsup/w32api/install-sh
winsup/w32api/lib/CheckConflicts.sh
winsup/w32api/lib/Makefile.in
winsup/w32api/lib/aclui.def
winsup/w32api/lib/advapi32.def
winsup/w32api/lib/ativscp-uuid.c
winsup/w32api/lib/avicap32.def
winsup/w32api/lib/avifil32.def
winsup/w32api/lib/bthprops.def
winsup/w32api/lib/cap.def
winsup/w32api/lib/cguid-uuid.c
winsup/w32api/lib/comcat-uuid.c
winsup/w32api/lib/comctl32.def
winsup/w32api/lib/comdlg32.def
winsup/w32api/lib/crypt32.def
winsup/w32api/lib/ctl3d32.def
winsup/w32api/lib/ddk/Makefile.in
winsup/w32api/lib/ddk/apcups.def
winsup/w32api/lib/ddk/cfgmgr32.def
winsup/w32api/lib/ddk/dxapi.def
winsup/w32api/lib/ddk/hal.def
winsup/w32api/lib/ddk/hid.def
winsup/w32api/lib/ddk/hidparse.def
winsup/w32api/lib/ddk/mcd.def
winsup/w32api/lib/ddk/ndis.def
winsup/w32api/lib/ddk/newdev.def
winsup/w32api/lib/ddk/ntoskrnl.def
winsup/w32api/lib/ddk/scsiport.def
winsup/w32api/lib/ddk/tdi.def
winsup/w32api/lib/ddk/usbcamd.def
winsup/w32api/lib/ddk/usbcamd2.def
winsup/w32api/lib/ddk/videoprt.def
winsup/w32api/lib/ddk/win32k.def
winsup/w32api/lib/devguid.c
winsup/w32api/lib/dhcpcsvc.def
winsup/w32api/lib/directx/Makefile.in
winsup/w32api/lib/directx/d3d8.def
winsup/w32api/lib/directx/d3d9.def
winsup/w32api/lib/directx/d3dim.def
winsup/w32api/lib/directx/d3drm.def
winsup/w32api/lib/directx/d3dx8d.def
winsup/w32api/lib/directx/d3dx9d.def
winsup/w32api/lib/directx/d3dxof.def
winsup/w32api/lib/directx/ddraw.def
winsup/w32api/lib/directx/dinput.def
winsup/w32api/lib/directx/dinput8.def
winsup/w32api/lib/directx/dinput_joy.c
winsup/w32api/lib/directx/dinput_joy2.c
winsup/w32api/lib/directx/dinput_kbd.c
winsup/w32api/lib/directx/dinput_mouse.c
winsup/w32api/lib/directx/dinput_mouse2.c
winsup/w32api/lib/directx/dinput_private.h
winsup/w32api/lib/directx/dmoguids.c
winsup/w32api/lib/directx/dplayx.def
winsup/w32api/lib/directx/dpnaddr.def
winsup/w32api/lib/directx/dpnet.def
winsup/w32api/lib/directx/dpnlobby.def
winsup/w32api/lib/directx/dpvoice.def
winsup/w32api/lib/directx/dsetup.def
winsup/w32api/lib/directx/dsound.def
winsup/w32api/lib/directx/dxerr.c
winsup/w32api/lib/directx/dxerr8.c
winsup/w32api/lib/directx/dxerr8w.c
winsup/w32api/lib/directx/dxerr9.c
winsup/w32api/lib/directx/dxerr9w.c
winsup/w32api/lib/directx/dxguid.c
winsup/w32api/lib/directx/ksproxy.def
winsup/w32api/lib/directx/ksuser.c
winsup/w32api/lib/directx/ksuser.def
winsup/w32api/lib/directx/msdmo.def
winsup/w32api/lib/directx/strmiids.c
winsup/w32api/lib/directx/test.c
winsup/w32api/lib/dlcapi.def
winsup/w32api/lib/dnsapi.def
winsup/w32api/lib/docobj-uuid.c
winsup/w32api/lib/exdisp-uuid.c
winsup/w32api/lib/extras-uuid.c
winsup/w32api/lib/faultrep.def
winsup/w32api/lib/gdi32.def
winsup/w32api/lib/gdiplus.c
winsup/w32api/lib/gdiplus.def
winsup/w32api/lib/glaux.def
winsup/w32api/lib/glu32.def
winsup/w32api/lib/hlguids-uuid.c
winsup/w32api/lib/hlink-uuid.c
winsup/w32api/lib/icmui.def
winsup/w32api/lib/igmpagnt.def
winsup/w32api/lib/imagehlp.def
winsup/w32api/lib/imm32.def
winsup/w32api/lib/iphlpapi.def
winsup/w32api/lib/kernel32.def
winsup/w32api/lib/largeint.c
winsup/w32api/lib/lz32.def
winsup/w32api/lib/mapi32.def
winsup/w32api/lib/mfcuia32.def
winsup/w32api/lib/mgmtapi.def
winsup/w32api/lib/mlang-uuid.c
winsup/w32api/lib/mpr.def
winsup/w32api/lib/mprapi.def
winsup/w32api/lib/mqrt.def
winsup/w32api/lib/msacm32.def
winsup/w32api/lib/mscms.def
winsup/w32api/lib/mshtml-uuid.c
winsup/w32api/lib/msimg32.def
winsup/w32api/lib/msvcp60.def
winsup/w32api/lib/msvfw32.def
winsup/w32api/lib/mswsock.def
winsup/w32api/lib/msxml-uuid.c
winsup/w32api/lib/nddeapi.def
winsup/w32api/lib/netapi32.def
winsup/w32api/lib/ntdll.def
winsup/w32api/lib/oaidl-uuid.c
winsup/w32api/lib/objidl-uuid.c
winsup/w32api/lib/objsafe-uuid.c
winsup/w32api/lib/ocidl-uuid.c
winsup/w32api/lib/odbc32.def
winsup/w32api/lib/odbccp32.def
winsup/w32api/lib/ole32.def
winsup/w32api/lib/oleacc-uuid.c
winsup/w32api/lib/oleacc.def
winsup/w32api/lib/oleaut32.def
winsup/w32api/lib/olecli32.def
winsup/w32api/lib/olectlid-uuid.c
winsup/w32api/lib/oledlg.def
winsup/w32api/lib/oleidl-uuid.c
winsup/w32api/lib/olepro32.def
winsup/w32api/lib/olesvr32.def
winsup/w32api/lib/opengl32.def
winsup/w32api/lib/penwin32.def
winsup/w32api/lib/pkpd32.def
winsup/w32api/lib/power-uuid.c
winsup/w32api/lib/powrprof.def
winsup/w32api/lib/psapi.def
winsup/w32api/lib/quartz.def
winsup/w32api/lib/rapi.def
winsup/w32api/lib/rasapi32.def
winsup/w32api/lib/rasdlg.def
winsup/w32api/lib/res.rc
winsup/w32api/lib/rpcdce4.def
winsup/w32api/lib/rpcns4.def
winsup/w32api/lib/rpcrt4.def
winsup/w32api/lib/rtm.def
winsup/w32api/lib/rtutils.def
winsup/w32api/lib/scrnsave.c
winsup/w32api/lib/secur32.def
winsup/w32api/lib/servprov-uuid.c
winsup/w32api/lib/setupapi.def
winsup/w32api/lib/shell32.c
winsup/w32api/lib/shell32.def
winsup/w32api/lib/shfolder.def
winsup/w32api/lib/shlwapi.def
winsup/w32api/lib/snmpapi.def
winsup/w32api/lib/svrapi.def
winsup/w32api/lib/tapi32.def
winsup/w32api/lib/test.c
winsup/w32api/lib/thunk32.def
winsup/w32api/lib/unknwn-uuid.c
winsup/w32api/lib/url.def
winsup/w32api/lib/urlmon-uuid.c
winsup/w32api/lib/user32.def
winsup/w32api/lib/userenv.def
winsup/w32api/lib/usp10.def
winsup/w32api/lib/uxtheme.def
winsup/w32api/lib/vdmdbg.def
winsup/w32api/lib/version.def
winsup/w32api/lib/vfw32.mri
winsup/w32api/lib/win32spl.def
winsup/w32api/lib/wininet.def
winsup/w32api/lib/winmm.def
winsup/w32api/lib/winspool.def
winsup/w32api/lib/winstrm.def
winsup/w32api/lib/wldap32.def
winsup/w32api/lib/wow32.def
winsup/w32api/lib/ws2_32.c
winsup/w32api/lib/ws2_32.def
winsup/w32api/lib/wsnmp32.def
winsup/w32api/lib/wsock32.def
winsup/w32api/lib/wst.def
winsup/w32api/lib/wtsapi32.def
Diffstat (limited to 'newlib/libc/stdio')
131 files changed, 0 insertions, 25785 deletions
diff --git a/newlib/libc/stdio/Makefile.am b/newlib/libc/stdio/Makefile.am deleted file mode 100644 index a1ba475df..000000000 --- a/newlib/libc/stdio/Makefile.am +++ /dev/null @@ -1,395 +0,0 @@ -## Process this file with automake to generate Makefile.in - -AUTOMAKE_OPTIONS = cygnus - -INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) - -GENERAL_SOURCES = \ - clearerr.c \ - fclose.c \ - fdopen.c \ - feof.c \ - ferror.c \ - fflush.c \ - fgetc.c \ - fgetpos.c \ - fgets.c \ - fileno.c \ - findfp.c \ - fiprintf.c \ - flags.c \ - fopen.c \ - fprintf.c \ - fputc.c \ - fputs.c \ - fread.c \ - freopen.c \ - fscanf.c \ - fiscanf.c \ - fseek.c \ - fsetpos.c \ - ftell.c \ - fvwrite.c \ - fwalk.c \ - fwrite.c \ - getc.c \ - getchar.c \ - getc_u.c \ - getchar_u.c \ - getdelim.c \ - getline.c \ - gets.c \ - iprintf.c \ - iscanf.c \ - makebuf.c \ - perror.c \ - printf.c \ - putc.c \ - putchar.c \ - putc_u.c \ - putchar_u.c \ - puts.c \ - refill.c \ - remove.c \ - rename.c \ - rewind.c \ - rget.c \ - scanf.c \ - sccl.c \ - setbuf.c \ - setbuffer.c \ - setlinebuf.c \ - setvbuf.c \ - siprintf.c \ - siscanf.c \ - sniprintf.c \ - snprintf.c \ - sprintf.c \ - sscanf.c \ - stdio.c \ - tmpfile.c \ - tmpnam.c \ - ungetc.c \ - vdiprintf.c \ - vdprintf.c \ - viprintf.c \ - viscanf.c \ - vprintf.c \ - vscanf.c \ - vsiprintf.c \ - vsiscanf.c \ - vsnprintf.c \ - vsniprintf.c \ - vsprintf.c \ - vsscanf.c \ - wbuf.c \ - wsetup.c - -## The following are EL/IX level 2 interfaces -if ELIX_LEVEL_1 -ELIX_2_SOURCES = -else -ELIX_2_SOURCES = \ - asiprintf.c \ - asprintf.c \ - fcloseall.c \ - fseeko.c \ - ftello.c \ - getw.c \ - mktemp.c \ - putw.c \ - vasiprintf.c \ - vasprintf.c -endif - -## The following are EL/IX level 2 interfaces -if ELIX_LEVEL_1 -ELIX_4_SOURCES = -else -if ELIX_LEVEL_2 -ELIX_4_SOURCES = -else -if ELIX_LEVEL_3 -ELIX_4_SOURCES = -else -ELIX_4_SOURCES = \ - asniprintf.c \ - asnprintf.c \ - diprintf.c \ - dprintf.c \ - fgetwc.c \ - fgetws.c \ - fmemopen.c \ - fopencookie.c \ - fpurge.c \ - fputwc.c \ - fputws.c \ - funopen.c \ - fwide.c \ - fwprintf.c \ - fwscanf.c \ - getwc.c \ - getwchar.c \ - open_memstream.c \ - putwc.c \ - putwchar.c \ - swprintf.c \ - swscanf.c \ - ungetwc.c \ - vasniprintf.c \ - vasnprintf.c \ - vfwscanf.c \ - vswprintf.c \ - vswscanf.c \ - vwprintf.c \ - vwscanf.c \ - wprintf.c \ - wscanf.c - -endif !ELIX_LEVEL_3 -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) \ - $(lpfx)svfiwprintf.$(oext) $(lpfx)svfwprintf.$(oext) \ - $(lpfx)vfiwprintf.$(oext) $(lpfx)vfwprintf.$(oext) \ - $(lpfx)svfiwscanf.$(oext) $(lpfx)svfwscanf.$(oext) \ - $(lpfx)vfiwscanf.$(oext) $(lpfx)vfwscanf.$(oext) - -libstdio_la_LDFLAGS = -Xcompiler -nostdlib - -if USE_LIBTOOL -noinst_LTLIBRARIES = libstdio.la -libstdio_la_SOURCES = $(GENERAL_SOURCES) $(ELIX_2_SOURCES) $(ELIX_4_SOURCES) -libstdio_la_LIBADD = $(LIBADD_OBJS) -libstdio_la_DEPENDENCIES = $(LIBADD_OBJS) -LIB_COMPILE = $(LTCOMPILE) -noinst_DATA = objectlist.awk.in -else -noinst_LIBRARIES = lib.a -lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_2_SOURCES) $(ELIX_4_SOURCES) -lib_a_LIBADD = $(LIBADD_OBJS) -lib_a_CFLAGS = $(AM_CFLAGS) -lib_a_DEPENDENCIES = $(LIBADD_OBJS) -LIB_COMPILE = $(COMPILE) -noinst_DATA = -endif # USE_LIBTOOL - -include $(srcdir)/../../Makefile.shared - -# This rule is needed so that libtool compiles vfiprintf before vfprintf. Otherwise -# libtool moves vfprintf.o and subsequently can't find it. - -$(lpfx)vfprintf.$(oext): vfprintf.c - $(LIB_COMPILE) -fshort-enums -c $(srcdir)/vfprintf.c -o $@ - -$(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)vfwprintf.$(oext): vfwprintf.c - $(LIB_COMPILE) -fshort-enums -c $(srcdir)/vfwprintf.c -o $@ - -$(lpfx)vfiwprintf.$(oext): vfwprintf.c - $(LIB_COMPILE) -fshort-enums -DINTEGER_ONLY -c $(srcdir)/vfwprintf.c -o $@ - -$(lpfx)svfwprintf.$(oext): vfwprintf.c - $(LIB_COMPILE) -fshort-enums -DSTRING_ONLY -c $(srcdir)/vfwprintf.c -o $@ - -$(lpfx)svfiwprintf.$(oext): vfwprintf.c - $(LIB_COMPILE) -fshort-enums -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfwprintf.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 $@ - -$(lpfx)vfwscanf.$(oext): vfwscanf.c - $(LIB_COMPILE) -c $(srcdir)/vfwscanf.c -o $@ - -$(lpfx)vfiwscanf.$(oext): vfwscanf.c - $(LIB_COMPILE) -DINTEGER_ONLY -c $(srcdir)/vfwscanf.c -o $@ - -$(lpfx)svfwscanf.$(oext): vfwscanf.c - $(LIB_COMPILE) -DSTRING_ONLY -c $(srcdir)/vfwscanf.c -o $@ - -$(lpfx)svfiwscanf.$(oext): vfwscanf.c - $(LIB_COMPILE) -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfwscanf.c -o $@ - -CHEWOUT_FILES = \ - clearerr.def \ - diprintf.def \ - dprintf.def \ - fclose.def \ - fcloseall.def \ - fdopen.def \ - feof.def \ - ferror.def \ - fflush.def \ - fgetc.def \ - fgetpos.def \ - fgets.def \ - fgetwc.def \ - fgetws.def \ - fileno.def \ - fmemopen.def \ - fopen.def \ - fopencookie.def \ - fpurge.def \ - fputc.def \ - fputs.def \ - fputwc.def \ - fputws.def \ - fread.def \ - freopen.def \ - fseek.def \ - fsetpos.def \ - ftell.def \ - funopen.def \ - fwide.def \ - fwrite.def \ - getc.def \ - getc_u.def \ - getchar.def \ - getchar_u.def \ - getdelim.def \ - getline.def \ - gets.def \ - getw.def \ - getwc.def \ - getwchar.def \ - mktemp.def \ - open_memstream.def \ - perror.def \ - putc.def \ - putc_u.def \ - putchar.def \ - putchar_u.def \ - puts.def \ - putw.def \ - putwc.def \ - putwchar.def \ - remove.def \ - rename.def \ - rewind.def \ - setbuf.def \ - setbuffer.def \ - setlinebuf.def \ - setvbuf.def \ - siprintf.def \ - siscanf.def \ - sprintf.def \ - sscanf.def \ - swprintf.def \ - swscanf.def \ - tmpfile.def \ - tmpnam.def \ - ungetc.def \ - ungetwc.def \ - vfprintf.def \ - vfscanf.def \ - vfwprintf.def \ - vfwscanf.def \ - viprintf.def \ - viscanf.def - -SUFFIXES = .def - -CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str - -.c.def: - $(CHEW) < $< > $*.def 2> $*.ref - touch stmp-def - -TARGETDOC = ../tmp.texi - -doc: $(CHEWOUT_FILES) - cat $(srcdir)/stdio.tex >> $(TARGETDOC) - -CLEANFILES = $(CHEWOUT_FILES) *.ref - -$(lpfx)fclose.$(oext): local.h -$(lpfx)fdopen.$(oext): local.h -$(lpfx)fflush.$(oext): local.h -$(lpfx)fgetwc.$(oext): local.h -$(lpfx)fgetws.$(oext): local.h -$(lpfx)findfp.$(oext): local.h -$(lpfx)fmemopen.$(oext): local.h -$(lpfx)fopen.$(oext): local.h -$(lpfx)fopencookie.$(oext): local.h -$(lpfx)fpurge.$(oext): local.h -$(lpfx)fputs.$(oext): fvwrite.h -$(lpfx)fputwc.$(oext): local.h -$(lpfx)fputws.$(oext): local.h fvwrite.h -$(lpfx)fread.$(oext): local.h -$(lpfx)freopen.$(oext): local.h -$(lpfx)fseek.$(oext): local.h -$(lpfx)ftell.$(oext): local.h -$(lpfx)funopen.$(oext): local.h -$(lpfx)fvwrite.$(oext): local.h fvwrite.h -$(lpfx)fwalk.$(oext): local.h -$(lpfx)fwide.$(oext): local.h -$(lpfx)fwprintf.$(oext): local.h -$(lpfx)fwrite.$(oext): local.h fvwrite.h -$(lpfx)fwscanf.$(oext): local.h -$(lpfx)getwc.$(oext): local.h -$(lpfx)getwchar.$(oext): local.h -$(lpfx)iscanf.$(oext): local.h -$(lpfx)makebuf.$(oext): local.h -$(lpfx)open_memstream.$(oext): local.h -$(lpfx)puts.$(oext): fvwrite.h -$(lpfx)putwc.$(oext): local.h -$(lpfx)putwchar.$(oext): local.h -$(lpfx)refill.$(oext): local.h -$(lpfx)scanf.$(oext): local.h -$(lpfx)setbuf.$(oext): local.h -$(lpfx)setvbuf.$(oext): local.h -$(lpfx)siprintf.$(oext): local.h -$(lpfx)siscanf.$(oext): local.h -$(lpfx)sniprintf.$(oext): local.h -$(lpfx)sprintf.$(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)swprintf.$(oext): local.h -$(lpfx)swscanf.$(oext): local.h -$(lpfx)ungetc.$(oext): local.h -$(lpfx)ungetwc.$(oext): local.h -$(lpfx)vfiprintf.$(oext): local.h -$(lpfx)vfiscanf.$(oext): local.h floatio.h -$(lpfx)vfprintf.$(oext): local.h -$(lpfx)vfscanf.$(oext): local.h floatio.h -$(lpfx)vfwprintf.$(oext): local.h -$(lpfx)vfwscanf.$(oext): local.h -$(lpfx)viscanf.$(oext): local.h -$(lpfx)vscanf.$(oext): local.h -$(lpfx)vsiscanf.$(oext): local.h -$(lpfx)vsniprintf.$(oext): local.h -$(lpfx)vsscanf.$(oext): local.h -$(lpfx)vswprintf.$(oext): local.h -$(lpfx)vswscanf.$(oext): local.h -$(lpfx)vwprintf.$(oext): local.h -$(lpfx)vwscanf.$(oext): local.h -$(lpfx)wbuf.$(oext): local.h fvwrite.h -$(lpfx)wprintf.$(oext): local.h -$(lpfx)wscanf.$(oext): local.h -$(lpfx)wsetup.$(oext): local.h diff --git a/newlib/libc/stdio/Makefile.in b/newlib/libc/stdio/Makefile.in deleted file mode 100644 index c25c8cf30..000000000 --- a/newlib/libc/stdio/Makefile.in +++ /dev/null @@ -1,1701 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/../../Makefile.shared $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am -subdir = stdio -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \ - $(top_srcdir)/../../ltoptions.m4 \ - $(top_srcdir)/../../ltsugar.m4 \ - $(top_srcdir)/../../ltversion.m4 \ - $(top_srcdir)/../../lt~obsolete.m4 \ - $(top_srcdir)/../acinclude.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -lib_a_AR = $(AR) $(ARFLAGS) -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) \ - lib_a-fgetc.$(OBJEXT) lib_a-fgetpos.$(OBJEXT) \ - lib_a-fgets.$(OBJEXT) lib_a-fileno.$(OBJEXT) \ - lib_a-findfp.$(OBJEXT) lib_a-fiprintf.$(OBJEXT) \ - lib_a-flags.$(OBJEXT) lib_a-fopen.$(OBJEXT) \ - lib_a-fprintf.$(OBJEXT) lib_a-fputc.$(OBJEXT) \ - lib_a-fputs.$(OBJEXT) lib_a-fread.$(OBJEXT) \ - lib_a-freopen.$(OBJEXT) lib_a-fscanf.$(OBJEXT) \ - lib_a-fiscanf.$(OBJEXT) lib_a-fseek.$(OBJEXT) \ - lib_a-fsetpos.$(OBJEXT) lib_a-ftell.$(OBJEXT) \ - lib_a-fvwrite.$(OBJEXT) lib_a-fwalk.$(OBJEXT) \ - lib_a-fwrite.$(OBJEXT) lib_a-getc.$(OBJEXT) \ - lib_a-getchar.$(OBJEXT) lib_a-getc_u.$(OBJEXT) \ - lib_a-getchar_u.$(OBJEXT) lib_a-getdelim.$(OBJEXT) \ - lib_a-getline.$(OBJEXT) lib_a-gets.$(OBJEXT) \ - lib_a-iprintf.$(OBJEXT) lib_a-iscanf.$(OBJEXT) \ - lib_a-makebuf.$(OBJEXT) lib_a-perror.$(OBJEXT) \ - lib_a-printf.$(OBJEXT) lib_a-putc.$(OBJEXT) \ - lib_a-putchar.$(OBJEXT) lib_a-putc_u.$(OBJEXT) \ - lib_a-putchar_u.$(OBJEXT) lib_a-puts.$(OBJEXT) \ - lib_a-refill.$(OBJEXT) lib_a-remove.$(OBJEXT) \ - lib_a-rename.$(OBJEXT) lib_a-rewind.$(OBJEXT) \ - lib_a-rget.$(OBJEXT) lib_a-scanf.$(OBJEXT) \ - lib_a-sccl.$(OBJEXT) lib_a-setbuf.$(OBJEXT) \ - lib_a-setbuffer.$(OBJEXT) lib_a-setlinebuf.$(OBJEXT) \ - lib_a-setvbuf.$(OBJEXT) lib_a-siprintf.$(OBJEXT) \ - lib_a-siscanf.$(OBJEXT) lib_a-sniprintf.$(OBJEXT) \ - lib_a-snprintf.$(OBJEXT) lib_a-sprintf.$(OBJEXT) \ - lib_a-sscanf.$(OBJEXT) lib_a-stdio.$(OBJEXT) \ - lib_a-tmpfile.$(OBJEXT) lib_a-tmpnam.$(OBJEXT) \ - lib_a-ungetc.$(OBJEXT) lib_a-vdiprintf.$(OBJEXT) \ - lib_a-vdprintf.$(OBJEXT) lib_a-viprintf.$(OBJEXT) \ - lib_a-viscanf.$(OBJEXT) lib_a-vprintf.$(OBJEXT) \ - lib_a-vscanf.$(OBJEXT) lib_a-vsiprintf.$(OBJEXT) \ - lib_a-vsiscanf.$(OBJEXT) lib_a-vsnprintf.$(OBJEXT) \ - lib_a-vsniprintf.$(OBJEXT) lib_a-vsprintf.$(OBJEXT) \ - lib_a-vsscanf.$(OBJEXT) lib_a-wbuf.$(OBJEXT) \ - lib_a-wsetup.$(OBJEXT) -@ELIX_LEVEL_1_FALSE@am__objects_2 = lib_a-asiprintf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@ lib_a-asprintf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@ lib_a-fcloseall.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@ lib_a-fseeko.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@ lib_a-ftello.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@ lib_a-getw.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@ lib_a-mktemp.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@ lib_a-putw.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@ lib_a-vasiprintf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@ lib_a-vasprintf.$(OBJEXT) -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_3 = lib_a-asniprintf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-asnprintf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-diprintf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-dprintf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fgetwc.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fgetws.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fmemopen.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fopencookie.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fpurge.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fputwc.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fputws.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-funopen.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fwide.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fwprintf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fwscanf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-getwc.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-getwchar.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-open_memstream.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-putwc.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-putwchar.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-swprintf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-swscanf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-ungetwc.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vasniprintf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vasnprintf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vfwscanf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vswprintf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vswscanf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vwprintf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vwscanf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-wprintf.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-wscanf.$(OBJEXT) -@USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_1) \ -@USE_LIBTOOL_FALSE@ $(am__objects_2) $(am__objects_3) -lib_a_OBJECTS = $(am_lib_a_OBJECTS) -LTLIBRARIES = $(noinst_LTLIBRARIES) -am__objects_4 = clearerr.lo fclose.lo fdopen.lo feof.lo ferror.lo \ - fflush.lo fgetc.lo fgetpos.lo fgets.lo fileno.lo findfp.lo \ - fiprintf.lo flags.lo fopen.lo fprintf.lo fputc.lo fputs.lo \ - fread.lo freopen.lo fscanf.lo fiscanf.lo fseek.lo fsetpos.lo \ - ftell.lo fvwrite.lo fwalk.lo fwrite.lo getc.lo getchar.lo \ - getc_u.lo getchar_u.lo getdelim.lo getline.lo gets.lo \ - iprintf.lo iscanf.lo makebuf.lo perror.lo printf.lo putc.lo \ - putchar.lo putc_u.lo putchar_u.lo puts.lo refill.lo remove.lo \ - rename.lo rewind.lo rget.lo scanf.lo sccl.lo setbuf.lo \ - setbuffer.lo setlinebuf.lo setvbuf.lo siprintf.lo siscanf.lo \ - sniprintf.lo snprintf.lo sprintf.lo sscanf.lo stdio.lo \ - tmpfile.lo tmpnam.lo ungetc.lo vdiprintf.lo vdprintf.lo \ - viprintf.lo viscanf.lo vprintf.lo vscanf.lo vsiprintf.lo \ - vsiscanf.lo vsnprintf.lo vsniprintf.lo vsprintf.lo vsscanf.lo \ - wbuf.lo wsetup.lo -@ELIX_LEVEL_1_FALSE@am__objects_5 = asiprintf.lo asprintf.lo \ -@ELIX_LEVEL_1_FALSE@ fcloseall.lo fseeko.lo ftello.lo getw.lo \ -@ELIX_LEVEL_1_FALSE@ mktemp.lo putw.lo vasiprintf.lo \ -@ELIX_LEVEL_1_FALSE@ vasprintf.lo -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_6 = asniprintf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ asnprintf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ diprintf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ dprintf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetwc.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetws.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fmemopen.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fopencookie.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fpurge.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputwc.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputws.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ funopen.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwide.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwprintf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwscanf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwc.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwchar.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ open_memstream.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwc.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwchar.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ swprintf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ swscanf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ ungetwc.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vasniprintf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vasnprintf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vfwscanf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vswprintf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vswscanf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vwprintf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vwscanf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wprintf.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wscanf.lo -@USE_LIBTOOL_TRUE@am_libstdio_la_OBJECTS = $(am__objects_4) \ -@USE_LIBTOOL_TRUE@ $(am__objects_5) $(am__objects_6) -libstdio_la_OBJECTS = $(am_libstdio_la_OBJECTS) -libstdio_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libstdio_la_LDFLAGS) $(LDFLAGS) -o $@ -@USE_LIBTOOL_TRUE@am_libstdio_la_rpath = -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(lib_a_SOURCES) $(libstdio_la_SOURCES) -DATA = $(noinst_DATA) -ETAGS = etags -CTAGS = ctags -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CRT0 = @CRT0@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBC_EXTRA_DEF = @LIBC_EXTRA_DEF@ -LIBC_EXTRA_LIB = @LIBC_EXTRA_LIB@ -LIBC_MACHINE_LIB = @LIBC_MACHINE_LIB@ -LIBC_POSIX_DEF = @LIBC_POSIX_DEF@ -LIBC_POSIX_LIB = @LIBC_POSIX_LIB@ -LIBC_SIGNAL_DEF = @LIBC_SIGNAL_DEF@ -LIBC_SIGNAL_LIB = @LIBC_SIGNAL_LIB@ -LIBC_STDIO64_DEF = @LIBC_STDIO64_DEF@ -LIBC_STDIO64_LIB = @LIBC_STDIO64_LIB@ -LIBC_STDIO_DEF = @LIBC_STDIO_DEF@ -LIBC_STDIO_LIB = @LIBC_STDIO_LIB@ -LIBC_SYSCALL_LIB = @LIBC_SYSCALL_LIB@ -LIBC_SYS_LIB = @LIBC_SYS_LIB@ -LIBC_UNIX_LIB = @LIBC_UNIX_LIB@ -LIBC_XDR_DEF = @LIBC_XDR_DEF@ -LIBC_XDR_LIB = @LIBC_XDR_LIB@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -NEWLIB_CFLAGS = @NEWLIB_CFLAGS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -READELF = @READELF@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -aext = @aext@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -extra_dir = @extra_dir@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -libm_machine_dir = @libm_machine_dir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lpfx = @lpfx@ -machine_dir = @machine_dir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -newlib_basedir = @newlib_basedir@ -oext = @oext@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sys_dir = @sys_dir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = cygnus -INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -GENERAL_SOURCES = \ - clearerr.c \ - fclose.c \ - fdopen.c \ - feof.c \ - ferror.c \ - fflush.c \ - fgetc.c \ - fgetpos.c \ - fgets.c \ - fileno.c \ - findfp.c \ - fiprintf.c \ - flags.c \ - fopen.c \ - fprintf.c \ - fputc.c \ - fputs.c \ - fread.c \ - freopen.c \ - fscanf.c \ - fiscanf.c \ - fseek.c \ - fsetpos.c \ - ftell.c \ - fvwrite.c \ - fwalk.c \ - fwrite.c \ - getc.c \ - getchar.c \ - getc_u.c \ - getchar_u.c \ - getdelim.c \ - getline.c \ - gets.c \ - iprintf.c \ - iscanf.c \ - makebuf.c \ - perror.c \ - printf.c \ - putc.c \ - putchar.c \ - putc_u.c \ - putchar_u.c \ - puts.c \ - refill.c \ - remove.c \ - rename.c \ - rewind.c \ - rget.c \ - scanf.c \ - sccl.c \ - setbuf.c \ - setbuffer.c \ - setlinebuf.c \ - setvbuf.c \ - siprintf.c \ - siscanf.c \ - sniprintf.c \ - snprintf.c \ - sprintf.c \ - sscanf.c \ - stdio.c \ - tmpfile.c \ - tmpnam.c \ - ungetc.c \ - vdiprintf.c \ - vdprintf.c \ - viprintf.c \ - viscanf.c \ - vprintf.c \ - vscanf.c \ - vsiprintf.c \ - vsiscanf.c \ - vsnprintf.c \ - vsniprintf.c \ - vsprintf.c \ - vsscanf.c \ - wbuf.c \ - wsetup.c - -@ELIX_LEVEL_1_FALSE@ELIX_2_SOURCES = \ -@ELIX_LEVEL_1_FALSE@ asiprintf.c \ -@ELIX_LEVEL_1_FALSE@ asprintf.c \ -@ELIX_LEVEL_1_FALSE@ fcloseall.c \ -@ELIX_LEVEL_1_FALSE@ fseeko.c \ -@ELIX_LEVEL_1_FALSE@ ftello.c \ -@ELIX_LEVEL_1_FALSE@ getw.c \ -@ELIX_LEVEL_1_FALSE@ mktemp.c \ -@ELIX_LEVEL_1_FALSE@ putw.c \ -@ELIX_LEVEL_1_FALSE@ vasiprintf.c \ -@ELIX_LEVEL_1_FALSE@ vasprintf.c - -@ELIX_LEVEL_1_TRUE@ELIX_2_SOURCES = -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ELIX_4_SOURCES = \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ asniprintf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ asnprintf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ diprintf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ dprintf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetwc.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetws.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fmemopen.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fopencookie.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fpurge.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputwc.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputws.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ funopen.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwide.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwprintf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwscanf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwc.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwchar.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ open_memstream.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwc.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwchar.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ swprintf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ swscanf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ ungetwc.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vasniprintf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vasnprintf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vfwscanf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vswprintf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vswscanf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vwprintf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vwscanf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wprintf.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wscanf.c - -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_TRUE@ELIX_4_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) \ - $(lpfx)svfiwprintf.$(oext) $(lpfx)svfwprintf.$(oext) \ - $(lpfx)vfiwprintf.$(oext) $(lpfx)vfwprintf.$(oext) \ - $(lpfx)svfiwscanf.$(oext) $(lpfx)svfwscanf.$(oext) \ - $(lpfx)vfiwscanf.$(oext) $(lpfx)vfwscanf.$(oext) - -libstdio_la_LDFLAGS = -Xcompiler -nostdlib -@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libstdio.la -@USE_LIBTOOL_TRUE@libstdio_la_SOURCES = $(GENERAL_SOURCES) $(ELIX_2_SOURCES) $(ELIX_4_SOURCES) -@USE_LIBTOOL_TRUE@libstdio_la_LIBADD = $(LIBADD_OBJS) -@USE_LIBTOOL_TRUE@libstdio_la_DEPENDENCIES = $(LIBADD_OBJS) -@USE_LIBTOOL_FALSE@LIB_COMPILE = $(COMPILE) -@USE_LIBTOOL_TRUE@LIB_COMPILE = $(LTCOMPILE) -@USE_LIBTOOL_FALSE@noinst_DATA = -@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in -@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a -@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_2_SOURCES) $(ELIX_4_SOURCES) -@USE_LIBTOOL_FALSE@lib_a_LIBADD = $(LIBADD_OBJS) -@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS) -@USE_LIBTOOL_FALSE@lib_a_DEPENDENCIES = $(LIBADD_OBJS) -CHEWOUT_FILES = \ - clearerr.def \ - diprintf.def \ - dprintf.def \ - fclose.def \ - fcloseall.def \ - fdopen.def \ - feof.def \ - ferror.def \ - fflush.def \ - fgetc.def \ - fgetpos.def \ - fgets.def \ - fgetwc.def \ - fgetws.def \ - fileno.def \ - fmemopen.def \ - fopen.def \ - fopencookie.def \ - fpurge.def \ - fputc.def \ - fputs.def \ - fputwc.def \ - fputws.def \ - fread.def \ - freopen.def \ - fseek.def \ - fsetpos.def \ - ftell.def \ - funopen.def \ - fwide.def \ - fwrite.def \ - getc.def \ - getc_u.def \ - getchar.def \ - getchar_u.def \ - getdelim.def \ - getline.def \ - gets.def \ - getw.def \ - getwc.def \ - getwchar.def \ - mktemp.def \ - open_memstream.def \ - perror.def \ - putc.def \ - putc_u.def \ - putchar.def \ - putchar_u.def \ - puts.def \ - putw.def \ - putwc.def \ - putwchar.def \ - remove.def \ - rename.def \ - rewind.def \ - setbuf.def \ - setbuffer.def \ - setlinebuf.def \ - setvbuf.def \ - siprintf.def \ - siscanf.def \ - sprintf.def \ - sscanf.def \ - swprintf.def \ - swscanf.def \ - tmpfile.def \ - tmpnam.def \ - ungetc.def \ - ungetwc.def \ - vfprintf.def \ - vfscanf.def \ - vfwprintf.def \ - vfwscanf.def \ - viprintf.def \ - viscanf.def - -SUFFIXES = .def -CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str -TARGETDOC = ../tmp.texi -CLEANFILES = $(CHEWOUT_FILES) *.ref -all: all-am - -.SUFFIXES: -.SUFFIXES: .def .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../Makefile.shared $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus stdio/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --cygnus stdio/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) - -rm -f lib.a - $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD) - $(RANLIB) lib.a - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libstdio.la: $(libstdio_la_OBJECTS) $(libstdio_la_DEPENDENCIES) - $(libstdio_la_LINK) $(am_libstdio_la_rpath) $(libstdio_la_OBJECTS) $(libstdio_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(COMPILE) -c $< - -.c.obj: - $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: - $(LTCOMPILE) -c -o $@ $< - -lib_a-clearerr.o: clearerr.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clearerr.o `test -f 'clearerr.c' || echo '$(srcdir)/'`clearerr.c - -lib_a-clearerr.obj: clearerr.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clearerr.obj `if test -f 'clearerr.c'; then $(CYGPATH_W) 'clearerr.c'; else $(CYGPATH_W) '$(srcdir)/clearerr.c'; fi` - -lib_a-fclose.o: fclose.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fclose.o `test -f 'fclose.c' || echo '$(srcdir)/'`fclose.c - -lib_a-fclose.obj: fclose.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fclose.obj `if test -f 'fclose.c'; then $(CYGPATH_W) 'fclose.c'; else $(CYGPATH_W) '$(srcdir)/fclose.c'; fi` - -lib_a-fdopen.o: fdopen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fdopen.o `test -f 'fdopen.c' || echo '$(srcdir)/'`fdopen.c - -lib_a-fdopen.obj: fdopen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fdopen.obj `if test -f 'fdopen.c'; then $(CYGPATH_W) 'fdopen.c'; else $(CYGPATH_W) '$(srcdir)/fdopen.c'; fi` - -lib_a-feof.o: feof.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feof.o `test -f 'feof.c' || echo '$(srcdir)/'`feof.c - -lib_a-feof.obj: feof.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feof.obj `if test -f 'feof.c'; then $(CYGPATH_W) 'feof.c'; else $(CYGPATH_W) '$(srcdir)/feof.c'; fi` - -lib_a-ferror.o: ferror.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ferror.o `test -f 'ferror.c' || echo '$(srcdir)/'`ferror.c - -lib_a-ferror.obj: ferror.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ferror.obj `if test -f 'ferror.c'; then $(CYGPATH_W) 'ferror.c'; else $(CYGPATH_W) '$(srcdir)/ferror.c'; fi` - -lib_a-fflush.o: fflush.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fflush.o `test -f 'fflush.c' || echo '$(srcdir)/'`fflush.c - -lib_a-fflush.obj: fflush.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fflush.obj `if test -f 'fflush.c'; then $(CYGPATH_W) 'fflush.c'; else $(CYGPATH_W) '$(srcdir)/fflush.c'; fi` - -lib_a-fgetc.o: fgetc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetc.o `test -f 'fgetc.c' || echo '$(srcdir)/'`fgetc.c - -lib_a-fgetc.obj: fgetc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetc.obj `if test -f 'fgetc.c'; then $(CYGPATH_W) 'fgetc.c'; else $(CYGPATH_W) '$(srcdir)/fgetc.c'; fi` - -lib_a-fgetpos.o: fgetpos.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetpos.o `test -f 'fgetpos.c' || echo '$(srcdir)/'`fgetpos.c - -lib_a-fgetpos.obj: fgetpos.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetpos.obj `if test -f 'fgetpos.c'; then $(CYGPATH_W) 'fgetpos.c'; else $(CYGPATH_W) '$(srcdir)/fgetpos.c'; fi` - -lib_a-fgets.o: fgets.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgets.o `test -f 'fgets.c' || echo '$(srcdir)/'`fgets.c - -lib_a-fgets.obj: fgets.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgets.obj `if test -f 'fgets.c'; then $(CYGPATH_W) 'fgets.c'; else $(CYGPATH_W) '$(srcdir)/fgets.c'; fi` - -lib_a-fileno.o: fileno.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fileno.o `test -f 'fileno.c' || echo '$(srcdir)/'`fileno.c - -lib_a-fileno.obj: fileno.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fileno.obj `if test -f 'fileno.c'; then $(CYGPATH_W) 'fileno.c'; else $(CYGPATH_W) '$(srcdir)/fileno.c'; fi` - -lib_a-findfp.o: findfp.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-findfp.o `test -f 'findfp.c' || echo '$(srcdir)/'`findfp.c - -lib_a-findfp.obj: findfp.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-findfp.obj `if test -f 'findfp.c'; then $(CYGPATH_W) 'findfp.c'; else $(CYGPATH_W) '$(srcdir)/findfp.c'; fi` - -lib_a-fiprintf.o: fiprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiprintf.o `test -f 'fiprintf.c' || echo '$(srcdir)/'`fiprintf.c - -lib_a-fiprintf.obj: fiprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiprintf.obj `if test -f 'fiprintf.c'; then $(CYGPATH_W) 'fiprintf.c'; else $(CYGPATH_W) '$(srcdir)/fiprintf.c'; fi` - -lib_a-flags.o: flags.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-flags.o `test -f 'flags.c' || echo '$(srcdir)/'`flags.c - -lib_a-flags.obj: flags.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-flags.obj `if test -f 'flags.c'; then $(CYGPATH_W) 'flags.c'; else $(CYGPATH_W) '$(srcdir)/flags.c'; fi` - -lib_a-fopen.o: fopen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fopen.o `test -f 'fopen.c' || echo '$(srcdir)/'`fopen.c - -lib_a-fopen.obj: fopen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fopen.obj `if test -f 'fopen.c'; then $(CYGPATH_W) 'fopen.c'; else $(CYGPATH_W) '$(srcdir)/fopen.c'; fi` - -lib_a-fprintf.o: fprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fprintf.o `test -f 'fprintf.c' || echo '$(srcdir)/'`fprintf.c - -lib_a-fprintf.obj: fprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fprintf.obj `if test -f 'fprintf.c'; then $(CYGPATH_W) 'fprintf.c'; else $(CYGPATH_W) '$(srcdir)/fprintf.c'; fi` - -lib_a-fputc.o: fputc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputc.o `test -f 'fputc.c' || echo '$(srcdir)/'`fputc.c - -lib_a-fputc.obj: fputc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputc.obj `if test -f 'fputc.c'; then $(CYGPATH_W) 'fputc.c'; else $(CYGPATH_W) '$(srcdir)/fputc.c'; fi` - -lib_a-fputs.o: fputs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputs.o `test -f 'fputs.c' || echo '$(srcdir)/'`fputs.c - -lib_a-fputs.obj: fputs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputs.obj `if test -f 'fputs.c'; then $(CYGPATH_W) 'fputs.c'; else $(CYGPATH_W) '$(srcdir)/fputs.c'; fi` - -lib_a-fread.o: fread.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fread.o `test -f 'fread.c' || echo '$(srcdir)/'`fread.c - -lib_a-fread.obj: fread.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fread.obj `if test -f 'fread.c'; then $(CYGPATH_W) 'fread.c'; else $(CYGPATH_W) '$(srcdir)/fread.c'; fi` - -lib_a-freopen.o: freopen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-freopen.o `test -f 'freopen.c' || echo '$(srcdir)/'`freopen.c - -lib_a-freopen.obj: freopen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-freopen.obj `if test -f 'freopen.c'; then $(CYGPATH_W) 'freopen.c'; else $(CYGPATH_W) '$(srcdir)/freopen.c'; fi` - -lib_a-fscanf.o: fscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fscanf.o `test -f 'fscanf.c' || echo '$(srcdir)/'`fscanf.c - -lib_a-fscanf.obj: fscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fscanf.obj `if test -f 'fscanf.c'; then $(CYGPATH_W) 'fscanf.c'; else $(CYGPATH_W) '$(srcdir)/fscanf.c'; fi` - -lib_a-fiscanf.o: fiscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiscanf.o `test -f 'fiscanf.c' || echo '$(srcdir)/'`fiscanf.c - -lib_a-fiscanf.obj: fiscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiscanf.obj `if test -f 'fiscanf.c'; then $(CYGPATH_W) 'fiscanf.c'; else $(CYGPATH_W) '$(srcdir)/fiscanf.c'; fi` - -lib_a-fseek.o: fseek.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fseek.o `test -f 'fseek.c' || echo '$(srcdir)/'`fseek.c - -lib_a-fseek.obj: fseek.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fseek.obj `if test -f 'fseek.c'; then $(CYGPATH_W) 'fseek.c'; else $(CYGPATH_W) '$(srcdir)/fseek.c'; fi` - -lib_a-fsetpos.o: fsetpos.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fsetpos.o `test -f 'fsetpos.c' || echo '$(srcdir)/'`fsetpos.c - -lib_a-fsetpos.obj: fsetpos.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fsetpos.obj `if test -f 'fsetpos.c'; then $(CYGPATH_W) 'fsetpos.c'; else $(CYGPATH_W) '$(srcdir)/fsetpos.c'; fi` - -lib_a-ftell.o: ftell.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ftell.o `test -f 'ftell.c' || echo '$(srcdir)/'`ftell.c - -lib_a-ftell.obj: ftell.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ftell.obj `if test -f 'ftell.c'; then $(CYGPATH_W) 'ftell.c'; else $(CYGPATH_W) '$(srcdir)/ftell.c'; fi` - -lib_a-fvwrite.o: fvwrite.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fvwrite.o `test -f 'fvwrite.c' || echo '$(srcdir)/'`fvwrite.c - -lib_a-fvwrite.obj: fvwrite.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fvwrite.obj `if test -f 'fvwrite.c'; then $(CYGPATH_W) 'fvwrite.c'; else $(CYGPATH_W) '$(srcdir)/fvwrite.c'; fi` - -lib_a-fwalk.o: fwalk.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwalk.o `test -f 'fwalk.c' || echo '$(srcdir)/'`fwalk.c - -lib_a-fwalk.obj: fwalk.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwalk.obj `if test -f 'fwalk.c'; then $(CYGPATH_W) 'fwalk.c'; else $(CYGPATH_W) '$(srcdir)/fwalk.c'; fi` - -lib_a-fwrite.o: fwrite.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwrite.o `test -f 'fwrite.c' || echo '$(srcdir)/'`fwrite.c - -lib_a-fwrite.obj: fwrite.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwrite.obj `if test -f 'fwrite.c'; then $(CYGPATH_W) 'fwrite.c'; else $(CYGPATH_W) '$(srcdir)/fwrite.c'; fi` - -lib_a-getc.o: getc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getc.o `test -f 'getc.c' || echo '$(srcdir)/'`getc.c - -lib_a-getc.obj: getc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getc.obj `if test -f 'getc.c'; then $(CYGPATH_W) 'getc.c'; else $(CYGPATH_W) '$(srcdir)/getc.c'; fi` - -lib_a-getchar.o: getchar.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getchar.o `test -f 'getchar.c' || echo '$(srcdir)/'`getchar.c - -lib_a-getchar.obj: getchar.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getchar.obj `if test -f 'getchar.c'; then $(CYGPATH_W) 'getchar.c'; else $(CYGPATH_W) '$(srcdir)/getchar.c'; fi` - -lib_a-getc_u.o: getc_u.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getc_u.o `test -f 'getc_u.c' || echo '$(srcdir)/'`getc_u.c - -lib_a-getc_u.obj: getc_u.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getc_u.obj `if test -f 'getc_u.c'; then $(CYGPATH_W) 'getc_u.c'; else $(CYGPATH_W) '$(srcdir)/getc_u.c'; fi` - -lib_a-getchar_u.o: getchar_u.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getchar_u.o `test -f 'getchar_u.c' || echo '$(srcdir)/'`getchar_u.c - -lib_a-getchar_u.obj: getchar_u.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getchar_u.obj `if test -f 'getchar_u.c'; then $(CYGPATH_W) 'getchar_u.c'; else $(CYGPATH_W) '$(srcdir)/getchar_u.c'; fi` - -lib_a-getdelim.o: getdelim.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getdelim.o `test -f 'getdelim.c' || echo '$(srcdir)/'`getdelim.c - -lib_a-getdelim.obj: getdelim.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getdelim.obj `if test -f 'getdelim.c'; then $(CYGPATH_W) 'getdelim.c'; else $(CYGPATH_W) '$(srcdir)/getdelim.c'; fi` - -lib_a-getline.o: getline.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getline.o `test -f 'getline.c' || echo '$(srcdir)/'`getline.c - -lib_a-getline.obj: getline.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getline.obj `if test -f 'getline.c'; then $(CYGPATH_W) 'getline.c'; else $(CYGPATH_W) '$(srcdir)/getline.c'; fi` - -lib_a-gets.o: gets.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gets.o `test -f 'gets.c' || echo '$(srcdir)/'`gets.c - -lib_a-gets.obj: gets.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gets.obj `if test -f 'gets.c'; then $(CYGPATH_W) 'gets.c'; else $(CYGPATH_W) '$(srcdir)/gets.c'; fi` - -lib_a-iprintf.o: iprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iprintf.o `test -f 'iprintf.c' || echo '$(srcdir)/'`iprintf.c - -lib_a-iprintf.obj: iprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iprintf.obj `if test -f 'iprintf.c'; then $(CYGPATH_W) 'iprintf.c'; else $(CYGPATH_W) '$(srcdir)/iprintf.c'; fi` - -lib_a-iscanf.o: iscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iscanf.o `test -f 'iscanf.c' || echo '$(srcdir)/'`iscanf.c - -lib_a-iscanf.obj: iscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iscanf.obj `if test -f 'iscanf.c'; then $(CYGPATH_W) 'iscanf.c'; else $(CYGPATH_W) '$(srcdir)/iscanf.c'; fi` - -lib_a-makebuf.o: makebuf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-makebuf.o `test -f 'makebuf.c' || echo '$(srcdir)/'`makebuf.c - -lib_a-makebuf.obj: makebuf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-makebuf.obj `if test -f 'makebuf.c'; then $(CYGPATH_W) 'makebuf.c'; else $(CYGPATH_W) '$(srcdir)/makebuf.c'; fi` - -lib_a-perror.o: perror.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-perror.o `test -f 'perror.c' || echo '$(srcdir)/'`perror.c - -lib_a-perror.obj: perror.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-perror.obj `if test -f 'perror.c'; then $(CYGPATH_W) 'perror.c'; else $(CYGPATH_W) '$(srcdir)/perror.c'; fi` - -lib_a-printf.o: printf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-printf.o `test -f 'printf.c' || echo '$(srcdir)/'`printf.c - -lib_a-printf.obj: printf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-printf.obj `if test -f 'printf.c'; then $(CYGPATH_W) 'printf.c'; else $(CYGPATH_W) '$(srcdir)/printf.c'; fi` - -lib_a-putc.o: putc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putc.o `test -f 'putc.c' || echo '$(srcdir)/'`putc.c - -lib_a-putc.obj: putc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putc.obj `if test -f 'putc.c'; then $(CYGPATH_W) 'putc.c'; else $(CYGPATH_W) '$(srcdir)/putc.c'; fi` - -lib_a-putchar.o: putchar.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putchar.o `test -f 'putchar.c' || echo '$(srcdir)/'`putchar.c - -lib_a-putchar.obj: putchar.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putchar.obj `if test -f 'putchar.c'; then $(CYGPATH_W) 'putchar.c'; else $(CYGPATH_W) '$(srcdir)/putchar.c'; fi` - -lib_a-putc_u.o: putc_u.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putc_u.o `test -f 'putc_u.c' || echo '$(srcdir)/'`putc_u.c - -lib_a-putc_u.obj: putc_u.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putc_u.obj `if test -f 'putc_u.c'; then $(CYGPATH_W) 'putc_u.c'; else $(CYGPATH_W) '$(srcdir)/putc_u.c'; fi` - -lib_a-putchar_u.o: putchar_u.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putchar_u.o `test -f 'putchar_u.c' || echo '$(srcdir)/'`putchar_u.c - -lib_a-putchar_u.obj: putchar_u.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putchar_u.obj `if test -f 'putchar_u.c'; then $(CYGPATH_W) 'putchar_u.c'; else $(CYGPATH_W) '$(srcdir)/putchar_u.c'; fi` - -lib_a-puts.o: puts.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-puts.o `test -f 'puts.c' || echo '$(srcdir)/'`puts.c - -lib_a-puts.obj: puts.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-puts.obj `if test -f 'puts.c'; then $(CYGPATH_W) 'puts.c'; else $(CYGPATH_W) '$(srcdir)/puts.c'; fi` - -lib_a-refill.o: refill.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-refill.o `test -f 'refill.c' || echo '$(srcdir)/'`refill.c - -lib_a-refill.obj: refill.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-refill.obj `if test -f 'refill.c'; then $(CYGPATH_W) 'refill.c'; else $(CYGPATH_W) '$(srcdir)/refill.c'; fi` - -lib_a-remove.o: remove.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-remove.o `test -f 'remove.c' || echo '$(srcdir)/'`remove.c - -lib_a-remove.obj: remove.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-remove.obj `if test -f 'remove.c'; then $(CYGPATH_W) 'remove.c'; else $(CYGPATH_W) '$(srcdir)/remove.c'; fi` - -lib_a-rename.o: rename.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rename.o `test -f 'rename.c' || echo '$(srcdir)/'`rename.c - -lib_a-rename.obj: rename.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rename.obj `if test -f 'rename.c'; then $(CYGPATH_W) 'rename.c'; else $(CYGPATH_W) '$(srcdir)/rename.c'; fi` - -lib_a-rewind.o: rewind.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rewind.o `test -f 'rewind.c' || echo '$(srcdir)/'`rewind.c - -lib_a-rewind.obj: rewind.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rewind.obj `if test -f 'rewind.c'; then $(CYGPATH_W) 'rewind.c'; else $(CYGPATH_W) '$(srcdir)/rewind.c'; fi` - -lib_a-rget.o: rget.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rget.o `test -f 'rget.c' || echo '$(srcdir)/'`rget.c - -lib_a-rget.obj: rget.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rget.obj `if test -f 'rget.c'; then $(CYGPATH_W) 'rget.c'; else $(CYGPATH_W) '$(srcdir)/rget.c'; fi` - -lib_a-scanf.o: scanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-scanf.o `test -f 'scanf.c' || echo '$(srcdir)/'`scanf.c - -lib_a-scanf.obj: scanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-scanf.obj `if test -f 'scanf.c'; then $(CYGPATH_W) 'scanf.c'; else $(CYGPATH_W) '$(srcdir)/scanf.c'; fi` - -lib_a-sccl.o: sccl.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sccl.o `test -f 'sccl.c' || echo '$(srcdir)/'`sccl.c - -lib_a-sccl.obj: sccl.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sccl.obj `if test -f 'sccl.c'; then $(CYGPATH_W) 'sccl.c'; else $(CYGPATH_W) '$(srcdir)/sccl.c'; fi` - -lib_a-setbuf.o: setbuf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setbuf.o `test -f 'setbuf.c' || echo '$(srcdir)/'`setbuf.c - -lib_a-setbuf.obj: setbuf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setbuf.obj `if test -f 'setbuf.c'; then $(CYGPATH_W) 'setbuf.c'; else $(CYGPATH_W) '$(srcdir)/setbuf.c'; fi` - -lib_a-setbuffer.o: setbuffer.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setbuffer.o `test -f 'setbuffer.c' || echo '$(srcdir)/'`setbuffer.c - -lib_a-setbuffer.obj: setbuffer.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setbuffer.obj `if test -f 'setbuffer.c'; then $(CYGPATH_W) 'setbuffer.c'; else $(CYGPATH_W) '$(srcdir)/setbuffer.c'; fi` - -lib_a-setlinebuf.o: setlinebuf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setlinebuf.o `test -f 'setlinebuf.c' || echo '$(srcdir)/'`setlinebuf.c - -lib_a-setlinebuf.obj: setlinebuf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setlinebuf.obj `if test -f 'setlinebuf.c'; then $(CYGPATH_W) 'setlinebuf.c'; else $(CYGPATH_W) '$(srcdir)/setlinebuf.c'; fi` - -lib_a-setvbuf.o: setvbuf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setvbuf.o `test -f 'setvbuf.c' || echo '$(srcdir)/'`setvbuf.c - -lib_a-setvbuf.obj: setvbuf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setvbuf.obj `if test -f 'setvbuf.c'; then $(CYGPATH_W) 'setvbuf.c'; else $(CYGPATH_W) '$(srcdir)/setvbuf.c'; fi` - -lib_a-siprintf.o: siprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siprintf.o `test -f 'siprintf.c' || echo '$(srcdir)/'`siprintf.c - -lib_a-siprintf.obj: siprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siprintf.obj `if test -f 'siprintf.c'; then $(CYGPATH_W) 'siprintf.c'; else $(CYGPATH_W) '$(srcdir)/siprintf.c'; fi` - -lib_a-siscanf.o: siscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siscanf.o `test -f 'siscanf.c' || echo '$(srcdir)/'`siscanf.c - -lib_a-siscanf.obj: siscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siscanf.obj `if test -f 'siscanf.c'; then $(CYGPATH_W) 'siscanf.c'; else $(CYGPATH_W) '$(srcdir)/siscanf.c'; fi` - -lib_a-sniprintf.o: sniprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sniprintf.o `test -f 'sniprintf.c' || echo '$(srcdir)/'`sniprintf.c - -lib_a-sniprintf.obj: sniprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sniprintf.obj `if test -f 'sniprintf.c'; then $(CYGPATH_W) 'sniprintf.c'; else $(CYGPATH_W) '$(srcdir)/sniprintf.c'; fi` - -lib_a-snprintf.o: snprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-snprintf.o `test -f 'snprintf.c' || echo '$(srcdir)/'`snprintf.c - -lib_a-snprintf.obj: snprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-snprintf.obj `if test -f 'snprintf.c'; then $(CYGPATH_W) 'snprintf.c'; else $(CYGPATH_W) '$(srcdir)/snprintf.c'; fi` - -lib_a-sprintf.o: sprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sprintf.o `test -f 'sprintf.c' || echo '$(srcdir)/'`sprintf.c - -lib_a-sprintf.obj: sprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sprintf.obj `if test -f 'sprintf.c'; then $(CYGPATH_W) 'sprintf.c'; else $(CYGPATH_W) '$(srcdir)/sprintf.c'; fi` - -lib_a-sscanf.o: sscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sscanf.o `test -f 'sscanf.c' || echo '$(srcdir)/'`sscanf.c - -lib_a-sscanf.obj: sscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sscanf.obj `if test -f 'sscanf.c'; then $(CYGPATH_W) 'sscanf.c'; else $(CYGPATH_W) '$(srcdir)/sscanf.c'; fi` - -lib_a-stdio.o: stdio.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-stdio.o `test -f 'stdio.c' || echo '$(srcdir)/'`stdio.c - -lib_a-stdio.obj: stdio.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-stdio.obj `if test -f 'stdio.c'; then $(CYGPATH_W) 'stdio.c'; else $(CYGPATH_W) '$(srcdir)/stdio.c'; fi` - -lib_a-tmpfile.o: tmpfile.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-tmpfile.o `test -f 'tmpfile.c' || echo '$(srcdir)/'`tmpfile.c - -lib_a-tmpfile.obj: tmpfile.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-tmpfile.obj `if test -f 'tmpfile.c'; then $(CYGPATH_W) 'tmpfile.c'; else $(CYGPATH_W) '$(srcdir)/tmpfile.c'; fi` - -lib_a-tmpnam.o: tmpnam.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-tmpnam.o `test -f 'tmpnam.c' || echo '$(srcdir)/'`tmpnam.c - -lib_a-tmpnam.obj: tmpnam.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-tmpnam.obj `if test -f 'tmpnam.c'; then $(CYGPATH_W) 'tmpnam.c'; else $(CYGPATH_W) '$(srcdir)/tmpnam.c'; fi` - -lib_a-ungetc.o: ungetc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ungetc.o `test -f 'ungetc.c' || echo '$(srcdir)/'`ungetc.c - -lib_a-ungetc.obj: ungetc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ungetc.obj `if test -f 'ungetc.c'; then $(CYGPATH_W) 'ungetc.c'; else $(CYGPATH_W) '$(srcdir)/ungetc.c'; fi` - -lib_a-vdiprintf.o: vdiprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdiprintf.o `test -f 'vdiprintf.c' || echo '$(srcdir)/'`vdiprintf.c - -lib_a-vdiprintf.obj: vdiprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdiprintf.obj `if test -f 'vdiprintf.c'; then $(CYGPATH_W) 'vdiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vdiprintf.c'; fi` - -lib_a-vdprintf.o: vdprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdprintf.o `test -f 'vdprintf.c' || echo '$(srcdir)/'`vdprintf.c - -lib_a-vdprintf.obj: vdprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdprintf.obj `if test -f 'vdprintf.c'; then $(CYGPATH_W) 'vdprintf.c'; else $(CYGPATH_W) '$(srcdir)/vdprintf.c'; fi` - -lib_a-viprintf.o: viprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viprintf.o `test -f 'viprintf.c' || echo '$(srcdir)/'`viprintf.c - -lib_a-viprintf.obj: viprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viprintf.obj `if test -f 'viprintf.c'; then $(CYGPATH_W) 'viprintf.c'; else $(CYGPATH_W) '$(srcdir)/viprintf.c'; fi` - -lib_a-viscanf.o: viscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viscanf.o `test -f 'viscanf.c' || echo '$(srcdir)/'`viscanf.c - -lib_a-viscanf.obj: viscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viscanf.obj `if test -f 'viscanf.c'; then $(CYGPATH_W) 'viscanf.c'; else $(CYGPATH_W) '$(srcdir)/viscanf.c'; fi` - -lib_a-vprintf.o: vprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vprintf.o `test -f 'vprintf.c' || echo '$(srcdir)/'`vprintf.c - -lib_a-vprintf.obj: vprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vprintf.obj `if test -f 'vprintf.c'; then $(CYGPATH_W) 'vprintf.c'; else $(CYGPATH_W) '$(srcdir)/vprintf.c'; fi` - -lib_a-vscanf.o: vscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vscanf.o `test -f 'vscanf.c' || echo '$(srcdir)/'`vscanf.c - -lib_a-vscanf.obj: vscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vscanf.obj `if test -f 'vscanf.c'; then $(CYGPATH_W) 'vscanf.c'; else $(CYGPATH_W) '$(srcdir)/vscanf.c'; fi` - -lib_a-vsiprintf.o: vsiprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiprintf.o `test -f 'vsiprintf.c' || echo '$(srcdir)/'`vsiprintf.c - -lib_a-vsiprintf.obj: vsiprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiprintf.obj `if test -f 'vsiprintf.c'; then $(CYGPATH_W) 'vsiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsiprintf.c'; fi` - -lib_a-vsiscanf.o: vsiscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiscanf.o `test -f 'vsiscanf.c' || echo '$(srcdir)/'`vsiscanf.c - -lib_a-vsiscanf.obj: vsiscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiscanf.obj `if test -f 'vsiscanf.c'; then $(CYGPATH_W) 'vsiscanf.c'; else $(CYGPATH_W) '$(srcdir)/vsiscanf.c'; fi` - -lib_a-vsnprintf.o: vsnprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsnprintf.o `test -f 'vsnprintf.c' || echo '$(srcdir)/'`vsnprintf.c - -lib_a-vsnprintf.obj: vsnprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsnprintf.obj `if test -f 'vsnprintf.c'; then $(CYGPATH_W) 'vsnprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsnprintf.c'; fi` - -lib_a-vsniprintf.o: vsniprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsniprintf.o `test -f 'vsniprintf.c' || echo '$(srcdir)/'`vsniprintf.c - -lib_a-vsniprintf.obj: vsniprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsniprintf.obj `if test -f 'vsniprintf.c'; then $(CYGPATH_W) 'vsniprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsniprintf.c'; fi` - -lib_a-vsprintf.o: vsprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsprintf.o `test -f 'vsprintf.c' || echo '$(srcdir)/'`vsprintf.c - -lib_a-vsprintf.obj: vsprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsprintf.obj `if test -f 'vsprintf.c'; then $(CYGPATH_W) 'vsprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsprintf.c'; fi` - -lib_a-vsscanf.o: vsscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsscanf.o `test -f 'vsscanf.c' || echo '$(srcdir)/'`vsscanf.c - -lib_a-vsscanf.obj: vsscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsscanf.obj `if test -f 'vsscanf.c'; then $(CYGPATH_W) 'vsscanf.c'; else $(CYGPATH_W) '$(srcdir)/vsscanf.c'; fi` - -lib_a-wbuf.o: wbuf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wbuf.o `test -f 'wbuf.c' || echo '$(srcdir)/'`wbuf.c - -lib_a-wbuf.obj: wbuf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wbuf.obj `if test -f 'wbuf.c'; then $(CYGPATH_W) 'wbuf.c'; else $(CYGPATH_W) '$(srcdir)/wbuf.c'; fi` - -lib_a-wsetup.o: wsetup.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wsetup.o `test -f 'wsetup.c' || echo '$(srcdir)/'`wsetup.c - -lib_a-wsetup.obj: wsetup.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wsetup.obj `if test -f 'wsetup.c'; then $(CYGPATH_W) 'wsetup.c'; else $(CYGPATH_W) '$(srcdir)/wsetup.c'; fi` - -lib_a-asiprintf.o: asiprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asiprintf.o `test -f 'asiprintf.c' || echo '$(srcdir)/'`asiprintf.c - -lib_a-asiprintf.obj: asiprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asiprintf.obj `if test -f 'asiprintf.c'; then $(CYGPATH_W) 'asiprintf.c'; else $(CYGPATH_W) '$(srcdir)/asiprintf.c'; fi` - -lib_a-asprintf.o: asprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asprintf.o `test -f 'asprintf.c' || echo '$(srcdir)/'`asprintf.c - -lib_a-asprintf.obj: asprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asprintf.obj `if test -f 'asprintf.c'; then $(CYGPATH_W) 'asprintf.c'; else $(CYGPATH_W) '$(srcdir)/asprintf.c'; fi` - -lib_a-fcloseall.o: fcloseall.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fcloseall.o `test -f 'fcloseall.c' || echo '$(srcdir)/'`fcloseall.c - -lib_a-fcloseall.obj: fcloseall.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fcloseall.obj `if test -f 'fcloseall.c'; then $(CYGPATH_W) 'fcloseall.c'; else $(CYGPATH_W) '$(srcdir)/fcloseall.c'; fi` - -lib_a-fseeko.o: fseeko.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fseeko.o `test -f 'fseeko.c' || echo '$(srcdir)/'`fseeko.c - -lib_a-fseeko.obj: fseeko.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fseeko.obj `if test -f 'fseeko.c'; then $(CYGPATH_W) 'fseeko.c'; else $(CYGPATH_W) '$(srcdir)/fseeko.c'; fi` - -lib_a-ftello.o: ftello.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ftello.o `test -f 'ftello.c' || echo '$(srcdir)/'`ftello.c - -lib_a-ftello.obj: ftello.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ftello.obj `if test -f 'ftello.c'; then $(CYGPATH_W) 'ftello.c'; else $(CYGPATH_W) '$(srcdir)/ftello.c'; fi` - -lib_a-getw.o: getw.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getw.o `test -f 'getw.c' || echo '$(srcdir)/'`getw.c - -lib_a-getw.obj: getw.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getw.obj `if test -f 'getw.c'; then $(CYGPATH_W) 'getw.c'; else $(CYGPATH_W) '$(srcdir)/getw.c'; fi` - -lib_a-mktemp.o: mktemp.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mktemp.o `test -f 'mktemp.c' || echo '$(srcdir)/'`mktemp.c - -lib_a-mktemp.obj: mktemp.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mktemp.obj `if test -f 'mktemp.c'; then $(CYGPATH_W) 'mktemp.c'; else $(CYGPATH_W) '$(srcdir)/mktemp.c'; fi` - -lib_a-putw.o: putw.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putw.o `test -f 'putw.c' || echo '$(srcdir)/'`putw.c - -lib_a-putw.obj: putw.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putw.obj `if test -f 'putw.c'; then $(CYGPATH_W) 'putw.c'; else $(CYGPATH_W) '$(srcdir)/putw.c'; fi` - -lib_a-vasiprintf.o: vasiprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasiprintf.o `test -f 'vasiprintf.c' || echo '$(srcdir)/'`vasiprintf.c - -lib_a-vasiprintf.obj: vasiprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasiprintf.obj `if test -f 'vasiprintf.c'; then $(CYGPATH_W) 'vasiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vasiprintf.c'; fi` - -lib_a-vasprintf.o: vasprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasprintf.o `test -f 'vasprintf.c' || echo '$(srcdir)/'`vasprintf.c - -lib_a-vasprintf.obj: vasprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasprintf.obj `if test -f 'vasprintf.c'; then $(CYGPATH_W) 'vasprintf.c'; else $(CYGPATH_W) '$(srcdir)/vasprintf.c'; fi` - -lib_a-asniprintf.o: asniprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asniprintf.o `test -f 'asniprintf.c' || echo '$(srcdir)/'`asniprintf.c - -lib_a-asniprintf.obj: asniprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asniprintf.obj `if test -f 'asniprintf.c'; then $(CYGPATH_W) 'asniprintf.c'; else $(CYGPATH_W) '$(srcdir)/asniprintf.c'; fi` - -lib_a-asnprintf.o: asnprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asnprintf.o `test -f 'asnprintf.c' || echo '$(srcdir)/'`asnprintf.c - -lib_a-asnprintf.obj: asnprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asnprintf.obj `if test -f 'asnprintf.c'; then $(CYGPATH_W) 'asnprintf.c'; else $(CYGPATH_W) '$(srcdir)/asnprintf.c'; fi` - -lib_a-diprintf.o: diprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-diprintf.o `test -f 'diprintf.c' || echo '$(srcdir)/'`diprintf.c - -lib_a-diprintf.obj: diprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-diprintf.obj `if test -f 'diprintf.c'; then $(CYGPATH_W) 'diprintf.c'; else $(CYGPATH_W) '$(srcdir)/diprintf.c'; fi` - -lib_a-dprintf.o: dprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-dprintf.o `test -f 'dprintf.c' || echo '$(srcdir)/'`dprintf.c - -lib_a-dprintf.obj: dprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-dprintf.obj `if test -f 'dprintf.c'; then $(CYGPATH_W) 'dprintf.c'; else $(CYGPATH_W) '$(srcdir)/dprintf.c'; fi` - -lib_a-fgetwc.o: fgetwc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetwc.o `test -f 'fgetwc.c' || echo '$(srcdir)/'`fgetwc.c - -lib_a-fgetwc.obj: fgetwc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetwc.obj `if test -f 'fgetwc.c'; then $(CYGPATH_W) 'fgetwc.c'; else $(CYGPATH_W) '$(srcdir)/fgetwc.c'; fi` - -lib_a-fgetws.o: fgetws.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetws.o `test -f 'fgetws.c' || echo '$(srcdir)/'`fgetws.c - -lib_a-fgetws.obj: fgetws.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetws.obj `if test -f 'fgetws.c'; then $(CYGPATH_W) 'fgetws.c'; else $(CYGPATH_W) '$(srcdir)/fgetws.c'; fi` - -lib_a-fmemopen.o: fmemopen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fmemopen.o `test -f 'fmemopen.c' || echo '$(srcdir)/'`fmemopen.c - -lib_a-fmemopen.obj: fmemopen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fmemopen.obj `if test -f 'fmemopen.c'; then $(CYGPATH_W) 'fmemopen.c'; else $(CYGPATH_W) '$(srcdir)/fmemopen.c'; fi` - -lib_a-fopencookie.o: fopencookie.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fopencookie.o `test -f 'fopencookie.c' || echo '$(srcdir)/'`fopencookie.c - -lib_a-fopencookie.obj: fopencookie.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fopencookie.obj `if test -f 'fopencookie.c'; then $(CYGPATH_W) 'fopencookie.c'; else $(CYGPATH_W) '$(srcdir)/fopencookie.c'; fi` - -lib_a-fpurge.o: fpurge.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fpurge.o `test -f 'fpurge.c' || echo '$(srcdir)/'`fpurge.c - -lib_a-fpurge.obj: fpurge.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fpurge.obj `if test -f 'fpurge.c'; then $(CYGPATH_W) 'fpurge.c'; else $(CYGPATH_W) '$(srcdir)/fpurge.c'; fi` - -lib_a-fputwc.o: fputwc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputwc.o `test -f 'fputwc.c' || echo '$(srcdir)/'`fputwc.c - -lib_a-fputwc.obj: fputwc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputwc.obj `if test -f 'fputwc.c'; then $(CYGPATH_W) 'fputwc.c'; else $(CYGPATH_W) '$(srcdir)/fputwc.c'; fi` - -lib_a-fputws.o: fputws.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputws.o `test -f 'fputws.c' || echo '$(srcdir)/'`fputws.c - -lib_a-fputws.obj: fputws.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputws.obj `if test -f 'fputws.c'; then $(CYGPATH_W) 'fputws.c'; else $(CYGPATH_W) '$(srcdir)/fputws.c'; fi` - -lib_a-funopen.o: funopen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-funopen.o `test -f 'funopen.c' || echo '$(srcdir)/'`funopen.c - -lib_a-funopen.obj: funopen.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-funopen.obj `if test -f 'funopen.c'; then $(CYGPATH_W) 'funopen.c'; else $(CYGPATH_W) '$(srcdir)/funopen.c'; fi` - -lib_a-fwide.o: fwide.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwide.o `test -f 'fwide.c' || echo '$(srcdir)/'`fwide.c - -lib_a-fwide.obj: fwide.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwide.obj `if test -f 'fwide.c'; then $(CYGPATH_W) 'fwide.c'; else $(CYGPATH_W) '$(srcdir)/fwide.c'; fi` - -lib_a-fwprintf.o: fwprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwprintf.o `test -f 'fwprintf.c' || echo '$(srcdir)/'`fwprintf.c - -lib_a-fwprintf.obj: fwprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwprintf.obj `if test -f 'fwprintf.c'; then $(CYGPATH_W) 'fwprintf.c'; else $(CYGPATH_W) '$(srcdir)/fwprintf.c'; fi` - -lib_a-fwscanf.o: fwscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwscanf.o `test -f 'fwscanf.c' || echo '$(srcdir)/'`fwscanf.c - -lib_a-fwscanf.obj: fwscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwscanf.obj `if test -f 'fwscanf.c'; then $(CYGPATH_W) 'fwscanf.c'; else $(CYGPATH_W) '$(srcdir)/fwscanf.c'; fi` - -lib_a-getwc.o: getwc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwc.o `test -f 'getwc.c' || echo '$(srcdir)/'`getwc.c - -lib_a-getwc.obj: getwc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwc.obj `if test -f 'getwc.c'; then $(CYGPATH_W) 'getwc.c'; else $(CYGPATH_W) '$(srcdir)/getwc.c'; fi` - -lib_a-getwchar.o: getwchar.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwchar.o `test -f 'getwchar.c' || echo '$(srcdir)/'`getwchar.c - -lib_a-getwchar.obj: getwchar.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwchar.obj `if test -f 'getwchar.c'; then $(CYGPATH_W) 'getwchar.c'; else $(CYGPATH_W) '$(srcdir)/getwchar.c'; fi` - -lib_a-open_memstream.o: open_memstream.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-open_memstream.o `test -f 'open_memstream.c' || echo '$(srcdir)/'`open_memstream.c - -lib_a-open_memstream.obj: open_memstream.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-open_memstream.obj `if test -f 'open_memstream.c'; then $(CYGPATH_W) 'open_memstream.c'; else $(CYGPATH_W) '$(srcdir)/open_memstream.c'; fi` - -lib_a-putwc.o: putwc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwc.o `test -f 'putwc.c' || echo '$(srcdir)/'`putwc.c - -lib_a-putwc.obj: putwc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwc.obj `if test -f 'putwc.c'; then $(CYGPATH_W) 'putwc.c'; else $(CYGPATH_W) '$(srcdir)/putwc.c'; fi` - -lib_a-putwchar.o: putwchar.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwchar.o `test -f 'putwchar.c' || echo '$(srcdir)/'`putwchar.c - -lib_a-putwchar.obj: putwchar.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwchar.obj `if test -f 'putwchar.c'; then $(CYGPATH_W) 'putwchar.c'; else $(CYGPATH_W) '$(srcdir)/putwchar.c'; fi` - -lib_a-swprintf.o: swprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-swprintf.o `test -f 'swprintf.c' || echo '$(srcdir)/'`swprintf.c - -lib_a-swprintf.obj: swprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-swprintf.obj `if test -f 'swprintf.c'; then $(CYGPATH_W) 'swprintf.c'; else $(CYGPATH_W) '$(srcdir)/swprintf.c'; fi` - -lib_a-swscanf.o: swscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-swscanf.o `test -f 'swscanf.c' || echo '$(srcdir)/'`swscanf.c - -lib_a-swscanf.obj: swscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-swscanf.obj `if test -f 'swscanf.c'; then $(CYGPATH_W) 'swscanf.c'; else $(CYGPATH_W) '$(srcdir)/swscanf.c'; fi` - -lib_a-ungetwc.o: ungetwc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ungetwc.o `test -f 'ungetwc.c' || echo '$(srcdir)/'`ungetwc.c - -lib_a-ungetwc.obj: ungetwc.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ungetwc.obj `if test -f 'ungetwc.c'; then $(CYGPATH_W) 'ungetwc.c'; else $(CYGPATH_W) '$(srcdir)/ungetwc.c'; fi` - -lib_a-vasniprintf.o: vasniprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasniprintf.o `test -f 'vasniprintf.c' || echo '$(srcdir)/'`vasniprintf.c - -lib_a-vasniprintf.obj: vasniprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasniprintf.obj `if test -f 'vasniprintf.c'; then $(CYGPATH_W) 'vasniprintf.c'; else $(CYGPATH_W) '$(srcdir)/vasniprintf.c'; fi` - -lib_a-vasnprintf.o: vasnprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasnprintf.o `test -f 'vasnprintf.c' || echo '$(srcdir)/'`vasnprintf.c - -lib_a-vasnprintf.obj: vasnprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasnprintf.obj `if test -f 'vasnprintf.c'; then $(CYGPATH_W) 'vasnprintf.c'; else $(CYGPATH_W) '$(srcdir)/vasnprintf.c'; fi` - -lib_a-vfwscanf.o: vfwscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vfwscanf.o `test -f 'vfwscanf.c' || echo '$(srcdir)/'`vfwscanf.c - -lib_a-vfwscanf.obj: vfwscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vfwscanf.obj `if test -f 'vfwscanf.c'; then $(CYGPATH_W) 'vfwscanf.c'; else $(CYGPATH_W) '$(srcdir)/vfwscanf.c'; fi` - -lib_a-vswprintf.o: vswprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vswprintf.o `test -f 'vswprintf.c' || echo '$(srcdir)/'`vswprintf.c - -lib_a-vswprintf.obj: vswprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vswprintf.obj `if test -f 'vswprintf.c'; then $(CYGPATH_W) 'vswprintf.c'; else $(CYGPATH_W) '$(srcdir)/vswprintf.c'; fi` - -lib_a-vswscanf.o: vswscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vswscanf.o `test -f 'vswscanf.c' || echo '$(srcdir)/'`vswscanf.c - -lib_a-vswscanf.obj: vswscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vswscanf.obj `if test -f 'vswscanf.c'; then $(CYGPATH_W) 'vswscanf.c'; else $(CYGPATH_W) '$(srcdir)/vswscanf.c'; fi` - -lib_a-vwprintf.o: vwprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vwprintf.o `test -f 'vwprintf.c' || echo '$(srcdir)/'`vwprintf.c - -lib_a-vwprintf.obj: vwprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vwprintf.obj `if test -f 'vwprintf.c'; then $(CYGPATH_W) 'vwprintf.c'; else $(CYGPATH_W) '$(srcdir)/vwprintf.c'; fi` - -lib_a-vwscanf.o: vwscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vwscanf.o `test -f 'vwscanf.c' || echo '$(srcdir)/'`vwscanf.c - -lib_a-vwscanf.obj: vwscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vwscanf.obj `if test -f 'vwscanf.c'; then $(CYGPATH_W) 'vwscanf.c'; else $(CYGPATH_W) '$(srcdir)/vwscanf.c'; fi` - -lib_a-wprintf.o: wprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wprintf.o `test -f 'wprintf.c' || echo '$(srcdir)/'`wprintf.c - -lib_a-wprintf.obj: wprintf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wprintf.obj `if test -f 'wprintf.c'; then $(CYGPATH_W) 'wprintf.c'; else $(CYGPATH_W) '$(srcdir)/wprintf.c'; fi` - -lib_a-wscanf.o: wscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wscanf.o `test -f 'wscanf.c' || echo '$(srcdir)/'`wscanf.c - -lib_a-wscanf.obj: wscanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wscanf.obj `if test -f 'wscanf.c'; then $(CYGPATH_W) 'wscanf.c'; else $(CYGPATH_W) '$(srcdir)/wscanf.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-am: -check: check-am -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - clean-noinstLTLIBRARIES mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ - ctags distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags dvi dvi-am html html-am info \ - info-am install install-am install-data install-data-am \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am - -objectlist.awk.in: $(noinst_LTLIBRARIES) - -rm -f objectlist.awk.in - for i in `ls *.lo` ; \ - do \ - echo $$i `pwd`/$$i >> objectlist.awk.in ; \ - done - -# This rule is needed so that libtool compiles vfiprintf before vfprintf. Otherwise -# libtool moves vfprintf.o and subsequently can't find it. - -$(lpfx)vfprintf.$(oext): vfprintf.c - $(LIB_COMPILE) -fshort-enums -c $(srcdir)/vfprintf.c -o $@ - -$(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)vfwprintf.$(oext): vfwprintf.c - $(LIB_COMPILE) -fshort-enums -c $(srcdir)/vfwprintf.c -o $@ - -$(lpfx)vfiwprintf.$(oext): vfwprintf.c - $(LIB_COMPILE) -fshort-enums -DINTEGER_ONLY -c $(srcdir)/vfwprintf.c -o $@ - -$(lpfx)svfwprintf.$(oext): vfwprintf.c - $(LIB_COMPILE) -fshort-enums -DSTRING_ONLY -c $(srcdir)/vfwprintf.c -o $@ - -$(lpfx)svfiwprintf.$(oext): vfwprintf.c - $(LIB_COMPILE) -fshort-enums -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfwprintf.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 $@ - -$(lpfx)vfwscanf.$(oext): vfwscanf.c - $(LIB_COMPILE) -c $(srcdir)/vfwscanf.c -o $@ - -$(lpfx)vfiwscanf.$(oext): vfwscanf.c - $(LIB_COMPILE) -DINTEGER_ONLY -c $(srcdir)/vfwscanf.c -o $@ - -$(lpfx)svfwscanf.$(oext): vfwscanf.c - $(LIB_COMPILE) -DSTRING_ONLY -c $(srcdir)/vfwscanf.c -o $@ - -$(lpfx)svfiwscanf.$(oext): vfwscanf.c - $(LIB_COMPILE) -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfwscanf.c -o $@ - -.c.def: - $(CHEW) < $< > $*.def 2> $*.ref - touch stmp-def - -doc: $(CHEWOUT_FILES) - cat $(srcdir)/stdio.tex >> $(TARGETDOC) - -$(lpfx)fclose.$(oext): local.h -$(lpfx)fdopen.$(oext): local.h -$(lpfx)fflush.$(oext): local.h -$(lpfx)fgetwc.$(oext): local.h -$(lpfx)fgetws.$(oext): local.h -$(lpfx)findfp.$(oext): local.h -$(lpfx)fmemopen.$(oext): local.h -$(lpfx)fopen.$(oext): local.h -$(lpfx)fopencookie.$(oext): local.h -$(lpfx)fpurge.$(oext): local.h -$(lpfx)fputs.$(oext): fvwrite.h -$(lpfx)fputwc.$(oext): local.h -$(lpfx)fputws.$(oext): local.h fvwrite.h -$(lpfx)fread.$(oext): local.h -$(lpfx)freopen.$(oext): local.h -$(lpfx)fseek.$(oext): local.h -$(lpfx)ftell.$(oext): local.h -$(lpfx)funopen.$(oext): local.h -$(lpfx)fvwrite.$(oext): local.h fvwrite.h -$(lpfx)fwalk.$(oext): local.h -$(lpfx)fwide.$(oext): local.h -$(lpfx)fwprintf.$(oext): local.h -$(lpfx)fwrite.$(oext): local.h fvwrite.h -$(lpfx)fwscanf.$(oext): local.h -$(lpfx)getwc.$(oext): local.h -$(lpfx)getwchar.$(oext): local.h -$(lpfx)iscanf.$(oext): local.h -$(lpfx)makebuf.$(oext): local.h -$(lpfx)open_memstream.$(oext): local.h -$(lpfx)puts.$(oext): fvwrite.h -$(lpfx)putwc.$(oext): local.h -$(lpfx)putwchar.$(oext): local.h -$(lpfx)refill.$(oext): local.h -$(lpfx)scanf.$(oext): local.h -$(lpfx)setbuf.$(oext): local.h -$(lpfx)setvbuf.$(oext): local.h -$(lpfx)siprintf.$(oext): local.h -$(lpfx)siscanf.$(oext): local.h -$(lpfx)sniprintf.$(oext): local.h -$(lpfx)sprintf.$(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)swprintf.$(oext): local.h -$(lpfx)swscanf.$(oext): local.h -$(lpfx)ungetc.$(oext): local.h -$(lpfx)ungetwc.$(oext): local.h -$(lpfx)vfiprintf.$(oext): local.h -$(lpfx)vfiscanf.$(oext): local.h floatio.h -$(lpfx)vfprintf.$(oext): local.h -$(lpfx)vfscanf.$(oext): local.h floatio.h -$(lpfx)vfwprintf.$(oext): local.h -$(lpfx)vfwscanf.$(oext): local.h -$(lpfx)viscanf.$(oext): local.h -$(lpfx)vscanf.$(oext): local.h -$(lpfx)vsiscanf.$(oext): local.h -$(lpfx)vsniprintf.$(oext): local.h -$(lpfx)vsscanf.$(oext): local.h -$(lpfx)vswprintf.$(oext): local.h -$(lpfx)vswscanf.$(oext): local.h -$(lpfx)vwprintf.$(oext): local.h -$(lpfx)vwscanf.$(oext): local.h -$(lpfx)wbuf.$(oext): local.h fvwrite.h -$(lpfx)wprintf.$(oext): local.h -$(lpfx)wscanf.$(oext): local.h -$(lpfx)wsetup.$(oext): local.h - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/newlib/libc/stdio/asiprintf.c b/newlib/libc/stdio/asiprintf.c deleted file mode 100644 index 97474fd1a..000000000 --- a/newlib/libc/stdio/asiprintf.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* This code was copied from asprintf.c */ -/* doc in siprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdarg.h> -#include <limits.h> -#include "local.h" - -int -_DEFUN(_asiprintf_r, (ptr, strp, fmt), - struct _reent *ptr _AND - char **strp _AND - const char *fmt _DOTS) -{ - int ret; - va_list ap; - FILE f; - - /* mark a zero-length reallocatable buffer */ - f._flags = __SWR | __SSTR | __SMBF; - f._bf._base = f._p = NULL; - f._bf._size = f._w = 0; - f._file = -1; /* No file. */ - va_start (ap, fmt); - ret = _svfiprintf_r (ptr, &f, fmt, ap); - va_end (ap); - if (ret >= 0) - { - *f._p = 0; - *strp = f._bf._base; - } - return (ret); -} - -#ifndef _REENT_ONLY - -int -_DEFUN(asiprintf, (strp, fmt), - char **strp _AND - const char *fmt _DOTS) -{ - int ret; - va_list ap; - FILE f; - - /* mark a zero-length reallocatable buffer */ - f._flags = __SWR | __SSTR | __SMBF; - f._bf._base = f._p = NULL; - f._bf._size = f._w = 0; - f._file = -1; /* No file. */ - va_start (ap, fmt); - ret = _svfiprintf_r (_REENT, &f, fmt, ap); - va_end (ap); - if (ret >= 0) - { - *f._p = 0; - *strp = f._bf._base; - } - return (ret); -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/asniprintf.c b/newlib/libc/stdio/asniprintf.c deleted file mode 100644 index 16ccfde63..000000000 --- a/newlib/libc/stdio/asniprintf.c +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 2007, 2008 Eric Blake - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ -/* This code was derived from asprintf.c */ -/* doc in siprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdarg.h> -#include <limits.h> -#include <errno.h> -#include "local.h" - -char * -_DEFUN(_asniprintf_r, (ptr, buf, lenp, fmt), - struct _reent *ptr _AND - char *buf _AND - size_t *lenp _AND - const char *fmt _DOTS) -{ - int ret; - va_list ap; - FILE f; - size_t len = *lenp; - - if (buf && len) - { - /* mark an existing buffer, but allow allocation of larger string */ - f._flags = __SWR | __SSTR | __SOPT; - } - else - { - /* mark a zero-length reallocatable buffer */ - f._flags = __SWR | __SSTR | __SMBF; - len = 0; - buf = NULL; - } - f._bf._base = f._p = (unsigned char *) buf; - /* For now, inherit the 32-bit signed limit of FILE._bf._size. - FIXME - it would be nice to rewrite sys/reent.h to support size_t - for _size. */ - if (len > INT_MAX) - { - ptr->_errno = EOVERFLOW; - return NULL; - } - f._bf._size = f._w = len; - f._file = -1; /* No file. */ - va_start (ap, fmt); - ret = _svfiprintf_r (ptr, &f, fmt, ap); - va_end (ap); - if (ret < 0) - return NULL; - *lenp = ret; - *f._p = '\0'; - return (char *) f._bf._base; -} - -#ifndef _REENT_ONLY - -char * -_DEFUN(asniprintf, (buf, lenp, fmt), - char *buf _AND - size_t *lenp _AND - const char *fmt _DOTS) -{ - int ret; - va_list ap; - FILE f; - size_t len = *lenp; - struct _reent *ptr = _REENT; - - if (buf && len) - { - /* mark an existing buffer, but allow allocation of larger string */ - f._flags = __SWR | __SSTR | __SOPT; - } - else - { - /* mark a zero-length reallocatable buffer */ - f._flags = __SWR | __SSTR | __SMBF; - len = 0; - buf = NULL; - } - f._bf._base = f._p = (unsigned char *) buf; - /* For now, inherit the 32-bit signed limit of FILE._bf._size. - FIXME - it would be nice to rewrite sys/reent.h to support size_t - for _size. */ - if (len > INT_MAX) - { - ptr->_errno = EOVERFLOW; - return NULL; - } - f._bf._size = f._w = len; - f._file = -1; /* No file. */ - va_start (ap, fmt); - ret = _svfiprintf_r (ptr, &f, fmt, ap); - va_end (ap); - if (ret < 0) - return NULL; - *lenp = ret; - *f._p = '\0'; - return (char *) f._bf._base; -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/asnprintf.c b/newlib/libc/stdio/asnprintf.c deleted file mode 100644 index 31e4c7f38..000000000 --- a/newlib/libc/stdio/asnprintf.c +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 2007, 2008 Eric Blake - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ -/* This code was derived from asprintf.c */ -/* doc in sprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdarg.h> -#include <limits.h> -#include <errno.h> -#include "local.h" - -char * -_DEFUN(_asnprintf_r, (ptr, buf, lenp, fmt), - struct _reent *ptr _AND - char *buf _AND - size_t *lenp _AND - const char *fmt _DOTS) -{ - int ret; - va_list ap; - FILE f; - size_t len = *lenp; - - if (buf && len) - { - /* mark an existing buffer, but allow allocation of larger string */ - f._flags = __SWR | __SSTR | __SOPT; - } - else - { - /* mark a zero-length reallocatable buffer */ - f._flags = __SWR | __SSTR | __SMBF; - len = 0; - buf = NULL; - } - f._bf._base = f._p = (unsigned char *) buf; - /* For now, inherit the 32-bit signed limit of FILE._bf._size. - FIXME - it would be nice to rewrite sys/reent.h to support size_t - for _size. */ - if (len > INT_MAX) - { - ptr->_errno = EOVERFLOW; - return NULL; - } - f._bf._size = f._w = len; - f._file = -1; /* No file. */ - va_start (ap, fmt); - ret = _svfprintf_r (ptr, &f, fmt, ap); - va_end (ap); - if (ret < 0) - return NULL; - *lenp = ret; - *f._p = '\0'; - return (char *) f._bf._base; -} - -#ifndef _REENT_ONLY - -char * -_DEFUN(asnprintf, (buf, lenp, fmt), - char *buf _AND - size_t *lenp _AND - const char *fmt _DOTS) -{ - int ret; - va_list ap; - FILE f; - size_t len = *lenp; - struct _reent *ptr = _REENT; - - if (buf && len) - { - /* mark an existing buffer, but allow allocation of larger string */ - f._flags = __SWR | __SSTR | __SOPT; - } - else - { - /* mark a zero-length reallocatable buffer */ - f._flags = __SWR | __SSTR | __SMBF; - len = 0; - buf = NULL; - } - f._bf._base = f._p = (unsigned char *) buf; - /* For now, inherit the 32-bit signed limit of FILE._bf._size. - FIXME - it would be nice to rewrite sys/reent.h to support size_t - for _size. */ - if (len > INT_MAX) - { - ptr->_errno = EOVERFLOW; - return NULL; - } - f._bf._size = f._w = len; - f._file = -1; /* No file. */ - va_start (ap, fmt); - ret = _svfprintf_r (ptr, &f, fmt, ap); - va_end (ap); - if (ret < 0) - return NULL; - *lenp = ret; - *f._p = '\0'; - return (char *) f._bf._base; -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/asprintf.c b/newlib/libc/stdio/asprintf.c deleted file mode 100644 index 59a08c808..000000000 --- a/newlib/libc/stdio/asprintf.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 1990, 2007 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* This code was copied from sprintf.c */ -/* doc in sprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdarg.h> -#include <limits.h> -#include "local.h" - -int -_DEFUN(_asprintf_r, (ptr, strp, fmt), - struct _reent *ptr _AND - char **strp _AND - const char *fmt _DOTS) -{ - int ret; - va_list ap; - FILE f; - - /* mark a zero-length reallocatable buffer */ - f._flags = __SWR | __SSTR | __SMBF; - f._bf._base = f._p = NULL; - f._bf._size = f._w = 0; - f._file = -1; /* No file. */ - va_start (ap, fmt); - ret = _svfprintf_r (ptr, &f, fmt, ap); - va_end (ap); - if (ret >= 0) - { - *f._p = 0; - *strp = f._bf._base; - } - return (ret); -} - -#ifndef _REENT_ONLY - -int -_DEFUN(asprintf, (strp, fmt), - char **strp _AND - const char *fmt _DOTS) -{ - int ret; - va_list ap; - FILE f; - - /* mark a zero-length reallocatable buffer */ - f._flags = __SWR | __SSTR | __SMBF; - f._bf._base = f._p = NULL; - f._bf._size = f._w = 0; - f._file = -1; /* No file. */ - va_start (ap, fmt); - ret = _svfprintf_r (_REENT, &f, fmt, ap); - va_end (ap); - if (ret >= 0) - { - *f._p = 0; - *strp = f._bf._base; - } - return (ret); -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/clearerr.c b/newlib/libc/stdio/clearerr.c deleted file mode 100644 index d3b620bed..000000000 --- a/newlib/libc/stdio/clearerr.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<clearerr>>---clear file or stream error indicator - -INDEX - clearerr - -ANSI_SYNOPSIS - #include <stdio.h> - void clearerr(FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - void clearerr(<[fp]>) - FILE *<[fp]>; - -DESCRIPTION -The <<stdio>> functions maintain an error indicator with each file -pointer <[fp]>, to record whether any read or write errors have -occurred on the associated file or stream. Similarly, it maintains an -end-of-file indicator to record whether there is no more data in the -file. - -Use <<clearerr>> to reset both of these indicators. - -See <<ferror>> and <<feof>> to query the two indicators. - - -RETURNS -<<clearerr>> does not return a result. - -PORTABILITY -ANSI C requires <<clearerr>>. - -No supporting OS subroutines are required. -*/ - -#include <_ansi.h> -#include <stdio.h> -#include "local.h" - -/* A subroutine version of the macro clearerr. */ - -#undef clearerr - -_VOID -_DEFUN(clearerr, (fp), - FILE * fp) -{ - CHECK_INIT(_REENT, fp); - _flockfile (fp); - __sclearerr (fp); - _funlockfile (fp); -} diff --git a/newlib/libc/stdio/diprintf.c b/newlib/libc/stdio/diprintf.c deleted file mode 100644 index e0a5595e1..000000000 --- a/newlib/libc/stdio/diprintf.c +++ /dev/null @@ -1,82 +0,0 @@ -/* Copyright (C) 2005, 2007 Shaun Jackman - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ - -/* -FUNCTION -<<diprintf>>, <<vdiprintf>>---print to a file descriptor (integer only) - -INDEX - diprintf -INDEX - _diprintf_r -INDEX - vdiprintf -INDEX - _vdiprintf_r - -ANSI_SYNOPSIS - #include <stdio.h> - #include <stdarg.h> - int diprintf(int <[fd]>, const char *<[format]>, ...); - int vdiprintf(int <[fd]>, const char *<[format]>, va_list <[ap]>); - int _diprintf_r(struct _reent *<[ptr]>, int <[fd]>, - const char *<[format]>, ...); - int _vdiprintf_r(struct _reent *<[ptr]>, int <[fd]>, - const char *<[format]>, va_list <[ap]>); - -DESCRIPTION -<<diprintf>> and <<vdiprintf>> are similar to <<dprintf>> and <<vdprintf>>, -except that only integer format specifiers are processed. - -The functions <<_diprintf_r>> and <<_vdiprintf_r>> are simply -reentrant versions of the functions above. - -RETURNS -Similar to <<dprintf>> and <<vdprintf>>. - -PORTABILITY -This set of functions is an integer-only extension, and is not portable. - -Supporting OS subroutines required: <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <unistd.h> -#include <stdarg.h> - -int -_DEFUN(_diprintf_r, (ptr, fd, format), - struct _reent *ptr _AND - int fd _AND - const char *format _DOTS) -{ - va_list ap; - int n; - - va_start (ap, format); - n = _vdiprintf_r (ptr, fd, format, ap); - va_end (ap); - return n; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(diprintf, (fd, format), - int fd _AND - const char *format _DOTS) -{ - va_list ap; - int n; - - va_start (ap, format); - n = _vdiprintf_r (_REENT, fd, format, ap); - va_end (ap); - return n; -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/dprintf.c b/newlib/libc/stdio/dprintf.c deleted file mode 100644 index e2d8b36ca..000000000 --- a/newlib/libc/stdio/dprintf.c +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright 2005, 2007 Shaun Jackman - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ - -/* -FUNCTION -<<dprintf>>, <<vdprintf>>---print to a file descriptor - -INDEX - dprintf -INDEX - _dprintf_r -INDEX - vdprintf -INDEX - _vdprintf_r - -ANSI_SYNOPSIS - #include <stdio.h> - #include <stdarg.h> - int dprintf(int <[fd]>, const char *<[format]>, ...); - int vdprintf(int <[fd]>, const char *<[format]>, va_list <[ap]>); - int _dprintf_r(struct _reent *<[ptr]>, int <[fd]>, - const char *<[format]>, ...); - int _vdprintf_r(struct _reent *<[ptr]>, int <[fd]>, - const char *<[format]>, va_list <[ap]>); - -DESCRIPTION -<<dprintf>> and <<vdprintf>> allow printing a format, similarly to -<<printf>>, but write to a file descriptor instead of to a <<FILE>> -stream. - -The functions <<_dprintf_r>> and <<_vdprintf_r>> are simply -reentrant versions of the functions above. - -RETURNS -The return value and errors are exactly as for <<write>>, except that -<<errno>> may also be set to <<ENOMEM>> if the heap is exhausted. - -PORTABILITY -This function is originally a GNU extension in glibc and is not portable. - -Supporting OS subroutines required: <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <unistd.h> -#include <stdarg.h> -#include "local.h" - -int -_DEFUN(_dprintf_r, (ptr, fd, format), - struct _reent *ptr _AND - int fd _AND - const char *format _DOTS) -{ - va_list ap; - int n; - _REENT_SMALL_CHECK_INIT (ptr); - va_start (ap, format); - n = _vdprintf_r (ptr, fd, format, ap); - va_end (ap); - return n; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(dprintf, (fd, format), - int fd _AND - const char *format _DOTS) -{ - va_list ap; - int n; - struct _reent *ptr = _REENT; - - _REENT_SMALL_CHECK_INIT (ptr); - va_start (ap, format); - n = _vdprintf_r (ptr, fd, format, ap); - va_end (ap); - return n; -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/fclose.c b/newlib/libc/stdio/fclose.c deleted file mode 100644 index 3c8868a51..000000000 --- a/newlib/libc/stdio/fclose.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fclose>>---close a file - -INDEX - fclose -INDEX - _fclose_r - -ANSI_SYNOPSIS - #include <stdio.h> - int fclose(FILE *<[fp]>); - int _fclose_r(struct _reent *<[reent]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int fclose(<[fp]>) - FILE *<[fp]>; - - int fclose(<[fp]>) - struct _reent *<[reent]> - FILE *<[fp]>; - -DESCRIPTION -If the file or stream identified by <[fp]> is open, <<fclose>> closes -it, after first ensuring that any pending data is written (by calling -<<fflush(<[fp]>)>>). - -The alternate function <<_fclose_r>> is a reentrant version. -The extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -<<fclose>> returns <<0>> if successful (including when <[fp]> is -<<NULL>> or not an open file); otherwise, it returns <<EOF>>. - -PORTABILITY -<<fclose>> is required by ANSI C. - -Required OS subroutines: <<close>>, <<fstat>>, <<isatty>>, <<lseek>>, -<<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdlib.h> -#include <sys/lock.h> -#include "local.h" - -int -_DEFUN(_fclose_r, (rptr, fp), - struct _reent *rptr _AND - register FILE * fp) -{ - int r; - - if (fp == NULL) - return (0); /* on NULL */ - - CHECK_INIT (rptr, fp); - - _flockfile (fp); - - if (fp->_flags == 0) /* not open! */ - { - _funlockfile (fp); - return (0); - } - /* Unconditionally flush to allow special handling for seekable read - files to reposition file to last byte processed as opposed to - last byte read ahead into the buffer. */ - r = _fflush_r (rptr, fp); - if (fp->_close != NULL && fp->_close (rptr, fp->_cookie) < 0) - r = EOF; - if (fp->_flags & __SMBF) - _free_r (rptr, (char *) fp->_bf._base); - if (HASUB (fp)) - FREEUB (rptr, fp); - if (HASLB (fp)) - FREELB (rptr, fp); - __sfp_lock_acquire (); - fp->_flags = 0; /* release this FILE for reuse */ - _funlockfile (fp); -#ifndef __SINGLE_THREAD__ - __lock_close_recursive (fp->_lock); -#endif - - __sfp_lock_release (); - - return (r); -} - -#ifndef _REENT_ONLY - -int -_DEFUN(fclose, (fp), - register FILE * fp) -{ - return _fclose_r(_REENT, fp); -} - -#endif diff --git a/newlib/libc/stdio/fcloseall.c b/newlib/libc/stdio/fcloseall.c deleted file mode 100644 index 090f3f2c3..000000000 --- a/newlib/libc/stdio/fcloseall.c +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fcloseall>>---close all files - -INDEX - fcloseall -INDEX - _fcloseall_r - -ANSI_SYNOPSIS - #include <stdio.h> - int fcloseall(void); - int _fcloseall_r (struct _reent *<[ptr]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int fcloseall() - - int _fcloseall_r (<[ptr]>) - struct _reent *<[ptr]>; - -DESCRIPTION -<<fcloseall>> closes all files in the current reentrancy struct's domain. -The function <<_fcloseall_r>> is the same function, except the reentrancy -struct is passed in as the <[ptr]> argument. - -This function is not recommended as it closes all streams, including -the std streams. - -RETURNS -<<fclose>> returns <<0>> if all closes are successful. Otherwise, -EOF is returned. - -PORTABILITY -<<fcloseall>> is a glibc extension. - -Required OS subroutines: <<close>>, <<fstat>>, <<isatty>>, <<lseek>>, -<<read>>, <<sbrk>>, <<write>>. -*/ -/* This file based upon fwalk.c. */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> -#include "local.h" - -int -_DEFUN(_fcloseall_r, (ptr), - struct _reent *ptr) -{ - return _fwalk_reent (ptr, _fclose_r); -} - -#ifndef _REENT_ONLY - -int -_DEFUN_VOID(fcloseall) -{ - return _fcloseall_r (_GLOBAL_REENT); -} - -#endif diff --git a/newlib/libc/stdio/fdopen.c b/newlib/libc/stdio/fdopen.c deleted file mode 100644 index aa764c372..000000000 --- a/newlib/libc/stdio/fdopen.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fdopen>>---turn open file into a stream - -INDEX - fdopen -INDEX - _fdopen_r - -ANSI_SYNOPSIS - #include <stdio.h> - FILE *fdopen(int <[fd]>, const char *<[mode]>); - FILE *_fdopen_r(struct _reent *<[reent]>, - int <[fd]>, const char *<[mode]>); - -TRAD_SYNOPSIS - #include <stdio.h> - FILE *fdopen(<[fd]>, <[mode]>) - int <[fd]>; - char *<[mode]>; - - FILE *_fdopen_r(<[reent]>, <[fd]>, <[mode]>) - struct _reent *<[reent]>; - int <[fd]>; - char *<[mode]>); - -DESCRIPTION -<<fdopen>> produces a file descriptor of type <<FILE *>>, from a -descriptor for an already-open file (returned, for example, by the -system subroutine <<open>> rather than by <<fopen>>). -The <[mode]> argument has the same meanings as in <<fopen>>. - -RETURNS -File pointer or <<NULL>>, as for <<fopen>>. - -PORTABILITY -<<fdopen>> is ANSI. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <sys/types.h> -#include <sys/fcntl.h> -#include <stdio.h> -#include <errno.h> -#include "local.h" -#include <_syslist.h> - -FILE * -_DEFUN(_fdopen_r, (ptr, fd, mode), - struct _reent *ptr _AND - int fd _AND - _CONST char *mode) -{ - register FILE *fp; - int flags, oflags; -#ifdef HAVE_FCNTL - int fdflags, fdmode; -#endif - - if ((flags = __sflags (ptr, mode, &oflags)) == 0) - return 0; - - /* make sure the mode the user wants is a subset of the actual mode */ -#ifdef HAVE_FCNTL - if ((fdflags = _fcntl_r (ptr, fd, F_GETFL, 0)) < 0) - return 0; - fdmode = fdflags & O_ACCMODE; - if (fdmode != O_RDWR && (fdmode != (oflags & O_ACCMODE))) - { - ptr->_errno = EBADF; - return 0; - } -#endif - - if ((fp = __sfp (ptr)) == 0) - return 0; - - _flockfile (fp); - - fp->_flags = flags; - /* POSIX recommends setting the O_APPEND bit on fd to match append - streams. Someone may later clear O_APPEND on fileno(fp), but the - stream must still remain in append mode. Rely on __sflags - setting __SAPP properly. */ -#ifdef HAVE_FCNTL - if ((oflags & O_APPEND) && !(fdflags & O_APPEND)) - _fcntl_r (ptr, fd, F_SETFL, fdflags | O_APPEND); -#endif - fp->_file = fd; - fp->_cookie = (_PTR) fp; - -#undef _read -#undef _write -#undef _seek -#undef _close - - fp->_read = __sread; - fp->_write = __swrite; - fp->_seek = __sseek; - fp->_close = __sclose; - -#ifdef __SCLE - /* Explicit given mode results in explicit setting mode on fd */ - if (oflags & O_BINARY) - setmode (fp->_file, O_BINARY); - else if (oflags & O_TEXT) - setmode (fp->_file, O_TEXT); - if (__stextmode (fp->_file)) - fp->_flags |= __SCLE; -#endif - - _funlockfile (fp); - return fp; -} - -#ifndef _REENT_ONLY - -FILE * -_DEFUN(fdopen, (fd, mode), - int fd _AND - _CONST char *mode) -{ - return _fdopen_r (_REENT, fd, mode); -} - -#endif diff --git a/newlib/libc/stdio/feof.c b/newlib/libc/stdio/feof.c deleted file mode 100644 index e8db65b86..000000000 --- a/newlib/libc/stdio/feof.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<feof>>---test for end of file - -INDEX - feof - -ANSI_SYNOPSIS - #include <stdio.h> - int feof(FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int feof(<[fp]>) - FILE *<[fp]>; - -DESCRIPTION -<<feof>> tests whether or not the end of the file identified by <[fp]> -has been reached. - -RETURNS -<<feof>> returns <<0>> if the end of file has not yet been reached; if -at end of file, the result is nonzero. - -PORTABILITY -<<feof>> is required by ANSI C. - -No supporting OS subroutines are required. -*/ - -#include <stdio.h> -#include "local.h" - -/* A subroutine version of the macro feof. */ - -#undef feof - -int -_DEFUN(feof, (fp), - FILE * fp) -{ - int result; - CHECK_INIT(_REENT, fp); - _flockfile (fp); - result = __sfeof (fp); - _funlockfile (fp); - return result; -} diff --git a/newlib/libc/stdio/ferror.c b/newlib/libc/stdio/ferror.c deleted file mode 100644 index 72b7ce2c5..000000000 --- a/newlib/libc/stdio/ferror.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<ferror>>---test whether read/write error has occurred - -INDEX - ferror - -ANSI_SYNOPSIS - #include <stdio.h> - int ferror(FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int ferror(<[fp]>) - FILE *<[fp]>; - -DESCRIPTION -The <<stdio>> functions maintain an error indicator with each file -pointer <[fp]>, to record whether any read or write errors have -occurred on the associated file or stream. -Use <<ferror>> to query this indicator. - -See <<clearerr>> to reset the error indicator. - -RETURNS -<<ferror>> returns <<0>> if no errors have occurred; it returns a -nonzero value otherwise. - -PORTABILITY -ANSI C requires <<ferror>>. - -No supporting OS subroutines are required. -*/ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <stdio.h> -#include "local.h" - -/* A subroutine version of the macro ferror. */ - -#undef ferror - -int -_DEFUN(ferror, (fp), - FILE * fp) -{ - int result; - CHECK_INIT(_REENT, fp); - _flockfile (fp); - result = __sferror (fp); - _funlockfile (fp); - return result; -} diff --git a/newlib/libc/stdio/fflush.c b/newlib/libc/stdio/fflush.c deleted file mode 100644 index 130c148c9..000000000 --- a/newlib/libc/stdio/fflush.c +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fflush>>---flush buffered file output - -INDEX - fflush -INDEX - _fflush_r - -ANSI_SYNOPSIS - #include <stdio.h> - int fflush(FILE *<[fp]>); - - int _fflush_r(struct _reent *<[reent]>, FILE *<[fp]>); - -DESCRIPTION -The <<stdio>> output functions can buffer output before delivering it -to the host system, in order to minimize the overhead of system calls. - -Use <<fflush>> to deliver any such pending output (for the file -or stream identified by <[fp]>) to the host system. - -If <[fp]> is <<NULL>>, <<fflush>> delivers pending output from all -open files. - -Additionally, if <[fp]> is a seekable input stream visiting a file -descriptor, set the position of the file descriptor to match next -unread byte, useful for obeying POSIX semantics when ending a process -without consuming all input from the stream. - -The alternate function <<_fflush_r>> is a reentrant version, where the -extra argument <[reent]> is a pointer to a reentrancy structure, and -<[fp]> must not be NULL. - -RETURNS -<<fflush>> returns <<0>> unless it encounters a write error; in that -situation, it returns <<EOF>>. - -PORTABILITY -ANSI C requires <<fflush>>. The behavior on input streams is only -specified by POSIX, and not all implementations follow POSIX rules. - -No supporting OS subroutines are required. -*/ - -#include <_ansi.h> -#include <stdio.h> -#include <errno.h> -#include "local.h" - -/* Flush a single file, or (if fp is NULL) all files. */ - -/* Core function which does not lock file pointer. This gets called - directly from __srefill. */ -int -_DEFUN(__sflush_r, (ptr, fp), - struct _reent *ptr _AND - register FILE * fp) -{ - register unsigned char *p; - register int n, t; - - t = fp->_flags; - if ((t & __SWR) == 0) - { - /* For a read stream, an fflush causes the next seek to be - unoptimized (i.e. forces a system-level seek). This conforms - to the POSIX and SUSv3 standards. */ - fp->_flags |= __SNPT; - - /* For a seekable stream with buffered read characters, we will attempt - a seek to the current position now. A subsequent read will then get - the next byte from the file rather than the buffer. This conforms - to the POSIX and SUSv3 standards. Note that the standards allow - this seek to be deferred until necessary, but we choose to do it here - to make the change simpler, more contained, and less likely - to miss a code scenario. */ - if ((fp->_r > 0 || fp->_ur > 0) && fp->_seek != NULL) - { - int tmp_errno; -#ifdef __LARGE64_FILES - _fpos64_t curoff; -#else - _fpos_t curoff; -#endif - - /* Save last errno and set errno to 0, so we can check if a device - returns with a valid position -1. We restore the last errno if - no other error condition has been encountered. */ - tmp_errno = ptr->_errno; - ptr->_errno = 0; - /* Get the physical position we are at in the file. */ - if (fp->_flags & __SOFF) - curoff = fp->_offset; - else - { - /* We don't know current physical offset, so ask for it. - Only ESPIPE and EINVAL are ignorable. */ -#ifdef __LARGE64_FILES - if (fp->_flags & __SL64) - curoff = fp->_seek64 (ptr, fp->_cookie, 0, SEEK_CUR); - else -#endif - curoff = fp->_seek (ptr, fp->_cookie, 0, SEEK_CUR); - if (curoff == -1L && ptr->_errno != 0) - { - int result = EOF; - if (ptr->_errno == ESPIPE || ptr->_errno == EINVAL) - { - result = 0; - ptr->_errno = tmp_errno; - } - else - fp->_flags |= __SERR; - return result; - } - } - if (fp->_flags & __SRD) - { - /* Current offset is at end of buffer. Compensate for - characters not yet read. */ - curoff -= fp->_r; - if (HASUB (fp)) - curoff -= fp->_ur; - } - /* Now physically seek to after byte last read. */ -#ifdef __LARGE64_FILES - if (fp->_flags & __SL64) - curoff = fp->_seek64 (ptr, fp->_cookie, curoff, SEEK_SET); - else -#endif - curoff = fp->_seek (ptr, fp->_cookie, curoff, SEEK_SET); - if (curoff != -1 || ptr->_errno == 0 - || ptr->_errno == ESPIPE || ptr->_errno == EINVAL) - { - /* Seek successful or ignorable error condition. - We can clear read buffer now. */ - fp->_flags &= ~__SNPT; - fp->_r = 0; - fp->_p = fp->_bf._base; - if ((fp->_flags & __SOFF) && (curoff != -1 || ptr->_errno == 0)) - fp->_offset = curoff; - ptr->_errno = tmp_errno; - if (HASUB (fp)) - FREEUB (ptr, fp); - } - else - { - fp->_flags |= __SERR; - return EOF; - } - } - return 0; - } - if ((p = fp->_bf._base) == NULL) - { - /* Nothing to flush. */ - return 0; - } - n = fp->_p - p; /* write this much */ - - /* - * Set these immediately to avoid problems with longjmp - * and to allow exchange buffering (via setvbuf) in user - * write function. - */ - fp->_p = p; - fp->_w = t & (__SLBF | __SNBF) ? 0 : fp->_bf._size; - - while (n > 0) - { - t = fp->_write (ptr, fp->_cookie, (char *) p, n); - if (t <= 0) - { - fp->_flags |= __SERR; - return EOF; - } - p += t; - n -= t; - } - return 0; -} - -int -_DEFUN(_fflush_r, (ptr, fp), - struct _reent *ptr _AND - register FILE * fp) -{ - int ret; - -#ifdef _REENT_SMALL - /* For REENT_SMALL platforms, it is possible we are being - called for the first time on a std stream. This std - stream can belong to a reentrant struct that is not - _REENT. If CHECK_INIT gets called below based on _REENT, - we will end up changing said file pointers to the equivalent - std stream off of _REENT. This causes unexpected behavior if - there is any data to flush on the _REENT std stream. There - are two alternatives to fix this: 1) make a reentrant fflush - or 2) simply recognize that this file has nothing to flush - and return immediately before performing a CHECK_INIT. Choice - 2 is implemented here due to its simplicity. */ - if (fp->_bf._base == NULL) - return 0; -#endif /* _REENT_SMALL */ - - CHECK_INIT (ptr, fp); - - if (!fp->_flags) - return 0; - - _flockfile (fp); - ret = __sflush_r (ptr, fp); - _funlockfile (fp); - return ret; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(fflush, (fp), - register FILE * fp) -{ - if (fp == NULL) - return _fwalk_reent (_GLOBAL_REENT, _fflush_r); - - return _fflush_r (_REENT, fp); -} - -#endif /* _REENT_ONLY */ diff --git a/newlib/libc/stdio/fgetc.c b/newlib/libc/stdio/fgetc.c deleted file mode 100644 index e275cfeeb..000000000 --- a/newlib/libc/stdio/fgetc.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fgetc>>---get a character from a file or stream - -INDEX - fgetc -INDEX - _fgetc_r - -ANSI_SYNOPSIS - #include <stdio.h> - int fgetc(FILE *<[fp]>); - - #include <stdio.h> - int _fgetc_r(struct _reent *<[ptr]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int fgetc(<[fp]>) - FILE *<[fp]>; - - #include <stdio.h> - int _fgetc_r(<[ptr]>, <[fp]>) - struct _reent *<[ptr]>; - FILE *<[fp]>; - -DESCRIPTION -Use <<fgetc>> to get the next single character from the file or stream -identified by <[fp]>. As a side effect, <<fgetc>> advances the file's -current position indicator. - -For a macro version of this function, see <<getc>>. - -The function <<_fgetc_r>> is simply a reentrant version of -<<fgetc>> that is passed the additional reentrant structure -pointer argument: <[ptr]>. - -RETURNS -The next character (read as an <<unsigned char>>, and cast to -<<int>>), unless there is no more data, or the host system reports a -read error; in either of these situations, <<fgetc>> returns <<EOF>>. - -You can distinguish the two situations that cause an <<EOF>> result by -using the <<ferror>> and <<feof>> functions. - -PORTABILITY -ANSI C requires <<fgetc>>. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <stdio.h> -#include "local.h" - -int -_DEFUN(_fgetc_r, (ptr, fp), - struct _reent * ptr _AND - FILE * fp) -{ - int result; - CHECK_INIT(ptr, fp); - _flockfile (fp); - result = __sgetc_r (ptr, fp); - _funlockfile (fp); - return result; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(fgetc, (fp), - FILE * fp) -{ -#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__) - int result; - CHECK_INIT(_REENT, fp); - _flockfile (fp); - result = __sgetc_r (_REENT, fp); - _funlockfile (fp); - return result; -#else - return _fgetc_r (_REENT, fp); -#endif -} - -#endif /* !_REENT_ONLY */ - diff --git a/newlib/libc/stdio/fgetpos.c b/newlib/libc/stdio/fgetpos.c deleted file mode 100644 index 21a63789d..000000000 --- a/newlib/libc/stdio/fgetpos.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fgetpos>>---record position in a stream or file - -INDEX - fgetpos -INDEX - _fgetpos_r - -ANSI_SYNOPSIS - #include <stdio.h> - int fgetpos(FILE *<[fp]>, fpos_t *<[pos]>); - int _fgetpos_r(struct _reent *<[ptr]>, FILE *<[fp]>, fpos_t *<[pos]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int fgetpos(<[fp]>, <[pos]>) - FILE *<[fp]>; - fpos_t *<[pos]>; - - int _fgetpos_r(<[ptr]>, <[fp]>, <[pos]>) - struct _reent *<[ptr]>; - FILE *<[fp]>; - fpos_t *<[pos]>; - -DESCRIPTION -Objects of type <<FILE>> can have a ``position'' that records how much -of the file your program has already read. Many of the <<stdio>> functions -depend on this position, and many change it as a side effect. - -You can use <<fgetpos>> to report on the current position for a file -identified by <[fp]>; <<fgetpos>> will write a value -representing that position at <<*<[pos]>>>. Later, you can -use this value with <<fsetpos>> to return the file to this -position. - -In the current implementation, <<fgetpos>> simply uses a character -count to represent the file position; this is the same number that -would be returned by <<ftell>>. - -RETURNS -<<fgetpos>> returns <<0>> when successful. If <<fgetpos>> fails, the -result is <<1>>. Failure occurs on streams that do not support -positioning; the global <<errno>> indicates this condition with the -value <<ESPIPE>>. - -PORTABILITY -<<fgetpos>> is required by the ANSI C standard, but the meaning of the -value it records is not specified beyond requiring that it be -acceptable as an argument to <<fsetpos>>. In particular, other -conforming C implementations may return a different result from -<<ftell>> than what <<fgetpos>> writes at <<*<[pos]>>>. - -No supporting OS subroutines are required. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> - -int -_DEFUN(_fgetpos_r, (ptr, fp, pos), - struct _reent * ptr _AND - FILE * fp _AND - _fpos_t * pos) -{ - *pos = _ftell_r (ptr, fp); - - if (*pos != -1) - { - return 0; - } - return 1; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(fgetpos, (fp, pos), - FILE * fp _AND - _fpos_t * pos) -{ - return _fgetpos_r (_REENT, fp, pos); -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/fgets.c b/newlib/libc/stdio/fgets.c deleted file mode 100644 index 7f02e3fcb..000000000 --- a/newlib/libc/stdio/fgets.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fgets>>---get character string from a file or stream - -INDEX - fgets -INDEX - _fgets_r - -ANSI_SYNOPSIS - #include <stdio.h> - char *fgets(char *<[buf]>, int <[n]>, FILE *<[fp]>); - - #include <stdio.h> - char *_fgets_r(struct _reent *<[ptr]>, char *<[buf]>, int <[n]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - char *fgets(<[buf]>,<[n]>,<[fp]>) - char *<[buf]>; - int <[n]>; - FILE *<[fp]>; - - #include <stdio.h> - char *_fgets_r(<[ptr]>, <[buf]>,<[n]>,<[fp]>) - struct _reent *<[ptr]>; - char *<[buf]>; - int <[n]>; - FILE *<[fp]>; - -DESCRIPTION - Reads at most <[n-1]> characters from <[fp]> until a newline - is found. The characters including to the newline are stored - in <[buf]>. The buffer is terminated with a 0. - - The <<_fgets_r>> function is simply the reentrant version of - <<fgets>> and is passed an additional reentrancy structure - pointer: <[ptr]>. - -RETURNS - <<fgets>> returns the buffer passed to it, with the data - filled in. If end of file occurs with some data already - accumulated, the data is returned with no other indication. If - no data are read, NULL is returned instead. - -PORTABILITY - <<fgets>> should replace all uses of <<gets>>. Note however - that <<fgets>> returns all of the data, while <<gets>> removes - the trailing newline (with no indication that it has done so.) - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <stdio.h> -#include <string.h> -#include "local.h" - -/* - * Read at most n-1 characters from the given file. - * Stop when a newline has been read, or the count runs out. - * Return first argument, or NULL if no characters were read. - */ - -char * -_DEFUN(_fgets_r, (ptr, buf, n, fp), - struct _reent * ptr _AND - char *buf _AND - int n _AND - FILE * fp) -{ - size_t len; - char *s; - unsigned char *p, *t; - - if (n < 2) /* sanity check */ - return 0; - - s = buf; - - CHECK_INIT(ptr, fp); - - _flockfile (fp); -#ifdef __SCLE - if (fp->_flags & __SCLE) - { - int c; - /* Sorry, have to do it the slow way */ - while (--n > 0 && (c = __sgetc_r (ptr, fp)) != EOF) - { - *s++ = c; - if (c == '\n') - break; - } - if (c == EOF && s == buf) - { - _funlockfile (fp); - return NULL; - } - *s = 0; - _funlockfile (fp); - return buf; - } -#endif - - n--; /* leave space for NUL */ - do - { - /* - * If the buffer is empty, refill it. - */ - if ((len = fp->_r) <= 0) - { - if (__srefill_r (ptr, fp)) - { - /* EOF: stop with partial or no line */ - if (s == buf) - { - _funlockfile (fp); - return 0; - } - break; - } - len = fp->_r; - } - p = fp->_p; - - /* - * Scan through at most n bytes of the current buffer, - * looking for '\n'. If found, copy up to and including - * newline, and stop. Otherwise, copy entire chunk - * and loop. - */ - if (len > n) - len = n; - t = (unsigned char *) memchr ((_PTR) p, '\n', len); - if (t != 0) - { - len = ++t - p; - fp->_r -= len; - fp->_p = t; - _CAST_VOID memcpy ((_PTR) s, (_PTR) p, len); - s[len] = 0; - _funlockfile (fp); - return (buf); - } - fp->_r -= len; - fp->_p += len; - _CAST_VOID memcpy ((_PTR) s, (_PTR) p, len); - s += len; - } - while ((n -= len) != 0); - *s = 0; - _funlockfile (fp); - return buf; -} - -#ifndef _REENT_ONLY - -char * -_DEFUN(fgets, (buf, n, fp), - char *buf _AND - int n _AND - FILE * fp) -{ - return _fgets_r (_REENT, buf, n, fp); -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/fgetwc.c b/newlib/libc/stdio/fgetwc.c deleted file mode 100644 index 38a79bc7c..000000000 --- a/newlib/libc/stdio/fgetwc.c +++ /dev/null @@ -1,180 +0,0 @@ -/*- - * Copyright (c) 2002-2004 Tim J. Robbins. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* -FUNCTION -<<fgetwc>>, <<getwc>>---get a wide character from a file or stream - -INDEX - fgetwc -INDEX - _fgetwc_r -INDEX - getwc -INDEX - _getwc_r - -ANSI_SYNOPSIS - #include <stdio.h> - #include <wchar.h> - wint_t fgetwc(FILE *<[fp]>); - - #include <stdio.h> - #include <wchar.h> - wint_t _fgetwc_r(struct _reent *<[ptr]>, FILE *<[fp]>); - - #include <stdio.h> - #include <wchar.h> - wint_t getwc(FILE *<[fp]>); - - #include <stdio.h> - #include <wchar.h> - wint_t _getwc_r(struct _reent *<[ptr]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - #include <wchar.h> - wint_t fgetwc(<[fp]>) - FILE *<[fp]>; - - #include <stdio.h> - #include <wchar.h> - wint_t _fgetwc_r(<[ptr]>, <[fp]>) - struct _reent *<[ptr]>; - FILE *<[fp]>; - - #include <stdio.h> - #include <wchar.h> - wint_t getwc(<[fp]>) - FILE *<[fp]>; - - #include <stdio.h> - #include <wchar.h> - wint_t _getwc_r(<[ptr]>, <[fp]>) - struct _reent *<[ptr]>; - FILE *<[fp]>; - -DESCRIPTION -Use <<fgetwc>> to get the next wide character from the file or stream -identified by <[fp]>. As a side effect, <<fgetwc>> advances the file's -current position indicator. - -The <<getwc>> function or macro functions identically to <<fgetwc>>. It -may be implemented as a macro, and may evaluate its argument more than -once. There is no reason ever to use it. - -<<_fgetwc_r>> and <<_getwc_r>> are simply reentrant versions of -<<fgetwc>> and <<getwc>> that are passed the additional reentrant -structure pointer argument: <[ptr]>. - -RETURNS -The next wide character cast to <<wint_t>>), unless there is no more data, -or the host system reports a read error; in either of these situations, -<<fgetwc>> and <<getwc>> return <<WEOF>>. - -You can distinguish the two situations that cause an <<EOF>> result by -using the <<ferror>> and <<feof>> functions. - -PORTABILITY -C99, POSIX.1-2001 -*/ - -#include <_ansi.h> -#include <reent.h> -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> -#include <wchar.h> -#include "local.h" - -static wint_t -_DEFUN(__fgetwc, (ptr, fp), - struct _reent *ptr _AND - register FILE *fp) -{ - wchar_t wc; - size_t nconv; - - if (fp->_r <= 0 && __srefill_r (ptr, fp)) - return (WEOF); - if (MB_CUR_MAX == 1) - { - /* Fast path for single-byte encodings. */ - wc = *fp->_p++; - fp->_r--; - return (wc); - } - do - { - nconv = _mbrtowc_r (ptr, &wc, (char *) fp->_p, fp->_r, &fp->_mbstate); - if (nconv == (size_t)-1) - break; - else if (nconv == (size_t)-2) - continue; - else if (nconv == 0) - { - /* - * Assume that the only valid representation of - * the null wide character is a single null byte. - */ - fp->_p++; - fp->_r--; - return (L'\0'); - } - else - { - fp->_p += nconv; - fp->_r -= nconv; - return (wc); - } - } - while (__srefill_r(ptr, fp) == 0); - fp->_flags |= __SERR; - errno = EILSEQ; - return (WEOF); -} - -wint_t -_DEFUN(_fgetwc_r, (ptr, fp), - struct _reent *ptr _AND - register FILE *fp) -{ - wint_t r; - - _flockfile (fp); - ORIENT(fp, 1); - r = __fgetwc (ptr, fp); - _funlockfile (fp); - return r; -} - -wint_t -_DEFUN(fgetwc, (fp), - FILE *fp) -{ - CHECK_INIT(_REENT, fp); - return _fgetwc_r (_REENT, fp); -} diff --git a/newlib/libc/stdio/fgetws.c b/newlib/libc/stdio/fgetws.c deleted file mode 100644 index 2784f1513..000000000 --- a/newlib/libc/stdio/fgetws.c +++ /dev/null @@ -1,161 +0,0 @@ -/*- - * Copyright (c) 2002-2004 Tim J. Robbins. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* -FUNCTION -<<fgetws>>---get wide character string from a file or stream - -INDEX - fgetws -INDEX - _fgetws_r - -ANSI_SYNOPSIS - #include <wchar.h> - wchar_t *fgetws(wchar_t *<[ws]>, int <[n]>, FILE *<[fp]>); - - #include <wchar.h> - wchar_t *_fgetws_r(struct _reent *<[ptr]>, wchar_t *<[ws]>, int <[n]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <wchar.h> - wchar_t *fgetws(<[ws]>,<[n]>,<[fp]>) - wchar_t *<[ws]>; - int <[n]>; - FILE *<[fp]>; - - #include <wchar.h> - wchar_t *_fgetws_r(<[ptr]>, <[ws]>,<[n]>,<[fp]>) - struct _reent *<[ptr]>; - wchar_t *<[ws]>; - int <[n]>; - FILE *<[fp]>; - -DESCRIPTION -Reads at most <[n-1]> wide characters from <[fp]> until a newline -is found. The wide characters including to the newline are stored -in <[ws]>. The buffer is terminated with a 0. - -The <<_fgetws_r>> function is simply the reentrant version of -<<fgetws>> and is passed an additional reentrancy structure -pointer: <[ptr]>. - -RETURNS -<<fgetws>> returns the buffer passed to it, with the data -filled in. If end of file occurs with some data already -accumulated, the data is returned with no other indication. If -no data are read, NULL is returned instead. - -PORTABILITY -C99, POSIX.1-2001 -*/ - -#include <_ansi.h> -#include <reent.h> -#include <errno.h> -#include <stdio.h> -#include <string.h> -#include <wchar.h> -#include "local.h" - -wchar_t * -_DEFUN(_fgetws_r, (ptr, ws, n, fp), - struct _reent *ptr _AND - wchar_t * ws _AND - int n _AND - FILE * fp) -{ - wchar_t *wsp; - size_t nconv; - const char *src; - unsigned char *nl; - - _flockfile (fp); - ORIENT (fp, 1); - - if (n <= 0) - { - errno = EINVAL; - goto error; - } - - if (fp->_r <= 0 && __srefill_r (ptr, fp)) - /* EOF */ - goto error; - wsp = ws; - do - { - src = (char *) fp->_p; - nl = memchr (fp->_p, '\n', fp->_r); - nconv = _mbsrtowcs_r (ptr, wsp, &src, - nl != NULL ? (nl - fp->_p + 1) : fp->_r, - &fp->_mbstate); - if (nconv == (size_t) -1) - /* Conversion error */ - goto error; - if (src == NULL) - { - /* - * We hit a null byte. Increment the character count, - * since mbsnrtowcs()'s return value doesn't include - * the terminating null, then resume conversion - * after the null. - */ - nconv++; - src = memchr (fp->_p, '\0', fp->_r); - src++; - } - fp->_r -= (unsigned char *) src - fp->_p; - fp->_p = (unsigned char *) src; - n -= nconv; - wsp += nconv; - } - while (wsp[-1] != L'\n' && n > 1 && (fp->_r > 0 - || __srefill_r (ptr, fp) == 0)); - if (wsp == ws) - /* EOF */ - goto error; - if (!mbsinit (&fp->_mbstate)) - /* Incomplete character */ - goto error; - *wsp++ = L'\0'; - _funlockfile (fp); - return ws; - -error: - _funlockfile (fp); - return NULL; -} - -wchar_t * -_DEFUN(fgetws, (ws, n, fp), - wchar_t *ws _AND - int n _AND - FILE *fp) -{ - CHECK_INIT (_REENT, fp); - return _fgetws_r (_REENT, ws, n, fp); -} diff --git a/newlib/libc/stdio/fileno.c b/newlib/libc/stdio/fileno.c deleted file mode 100644 index db399eb12..000000000 --- a/newlib/libc/stdio/fileno.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fileno>>---return file descriptor associated with stream - -INDEX - fileno - -ANSI_SYNOPSIS - #include <stdio.h> - int fileno(FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int fileno(<[fp]>) - FILE *<[fp]>; - -DESCRIPTION -You can use <<fileno>> to return the file descriptor identified by <[fp]>. - -RETURNS -<<fileno>> returns a non-negative integer when successful. -If <[fp]> is not an open stream, <<fileno>> returns -1. - -PORTABILITY -<<fileno>> is not part of ANSI C. -POSIX requires <<fileno>>. - -Supporting OS subroutines required: none. -*/ - -#include <_ansi.h> -#include <stdio.h> -#include "local.h" - -int -_DEFUN(fileno, (f), - FILE * f) -{ - int result; - CHECK_INIT (_REENT, f); - _flockfile (f); - result = __sfileno (f); - _funlockfile (f); - return result; -} diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c deleted file mode 100644 index 570fd457e..000000000 --- a/newlib/libc/stdio/findfp.c +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* No user fns here. Pesch 15apr92. */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> -#include <string.h> -#include <fcntl.h> -#include <sys/lock.h> -#include "local.h" - -#ifdef _REENT_SMALL -const struct __sFILE_fake __sf_fake_stdin = - {_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL}; -const struct __sFILE_fake __sf_fake_stdout = - {_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL}; -const struct __sFILE_fake __sf_fake_stderr = - {_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL}; -#endif - -static _VOID -_DEFUN(std, (ptr, flags, file, data), - FILE *ptr _AND - int flags _AND - int file _AND - struct _reent *data) -{ - ptr->_p = 0; - ptr->_r = 0; - ptr->_w = 0; - ptr->_flags = flags; - ptr->_flags2 = 0; - ptr->_file = file; - ptr->_bf._base = 0; - ptr->_bf._size = 0; - ptr->_lbfsize = 0; - memset (&ptr->_mbstate, 0, sizeof (_mbstate_t)); - ptr->_cookie = ptr; - ptr->_read = __sread; -#ifndef __LARGE64_FILES - ptr->_write = __swrite; -#else /* __LARGE64_FILES */ - ptr->_write = __swrite64; - ptr->_seek64 = __sseek64; - ptr->_flags |= __SL64; -#endif /* __LARGE64_FILES */ - ptr->_seek = __sseek; - ptr->_close = __sclose; -#if !defined(__SINGLE_THREAD__) && !defined(_REENT_SMALL) - __lock_init_recursive (ptr->_lock); - /* - * #else - * lock is already initialized in __sfp - */ -#endif - -#ifdef __SCLE - if (__stextmode (ptr->_file)) - ptr->_flags |= __SCLE; -#endif -} - -struct _glue * -_DEFUN(__sfmoreglue, (d, n), - struct _reent *d _AND - register int n) -{ - struct _glue *g; - FILE *p; - - g = (struct _glue *) _malloc_r (d, sizeof (*g) + n * sizeof (FILE)); - if (g == NULL) - return NULL; - p = (FILE *) (g + 1); - g->_next = NULL; - g->_niobs = n; - g->_iobs = p; - memset (p, 0, n * sizeof (FILE)); - return g; -} - -/* - * Find a free FILE for fopen et al. - */ - -FILE * -_DEFUN(__sfp, (d), - struct _reent *d) -{ - FILE *fp; - int n; - struct _glue *g; - - __sfp_lock_acquire (); - - if (!_GLOBAL_REENT->__sdidinit) - __sinit (_GLOBAL_REENT); - for (g = &_GLOBAL_REENT->__sglue;; g = g->_next) - { - for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++) - if (fp->_flags == 0) - goto found; - if (g->_next == NULL && - (g->_next = __sfmoreglue (d, NDYNAMIC)) == NULL) - break; - } - __sfp_lock_release (); - d->_errno = ENOMEM; - return NULL; - -found: - fp->_file = -1; /* no file */ - fp->_flags = 1; /* reserve this slot; caller sets real flags */ - fp->_flags2 = 0; -#ifndef __SINGLE_THREAD__ - __lock_init_recursive (fp->_lock); -#endif - __sfp_lock_release (); - - fp->_p = NULL; /* no current pointer */ - fp->_w = 0; /* nothing to read or write */ - fp->_r = 0; - fp->_bf._base = NULL; /* no buffer */ - fp->_bf._size = 0; - fp->_lbfsize = 0; /* not line buffered */ - memset (&fp->_mbstate, 0, sizeof (_mbstate_t)); - /* fp->_cookie = <any>; */ /* caller sets cookie, _read/_write etc */ - fp->_ub._base = NULL; /* no ungetc buffer */ - fp->_ub._size = 0; - fp->_lb._base = NULL; /* no line buffer */ - fp->_lb._size = 0; - - return fp; -} - -/* - * exit() calls _cleanup() through *__cleanup, set whenever we - * open or buffer a file. This chicanery is done so that programs - * that do not use stdio need not link it all in. - * - * The name `_cleanup' is, alas, fairly well known outside stdio. - */ - -_VOID -_DEFUN(_cleanup_r, (ptr), - struct _reent *ptr) -{ - _CAST_VOID _fwalk(ptr, fclose); - /* _CAST_VOID _fwalk (ptr, fflush); */ /* `cheating' */ -} - -#ifndef _REENT_ONLY -_VOID -_DEFUN_VOID(_cleanup) -{ - _cleanup_r (_GLOBAL_REENT); -} -#endif - -/* - * __sinit() is called whenever stdio's internal variables must be set up. - */ - -_VOID -_DEFUN(__sinit, (s), - struct _reent *s) -{ - __sinit_lock_acquire (); - - if (s->__sdidinit) - { - __sinit_lock_release (); - return; - } - - /* make sure we clean up on exit */ - s->__cleanup = _cleanup_r; /* conservative */ - s->__sdidinit = 1; - - s->__sglue._next = NULL; -#ifndef _REENT_SMALL - s->__sglue._niobs = 3; - s->__sglue._iobs = &s->__sf[0]; -#else - s->__sglue._niobs = 0; - s->__sglue._iobs = NULL; - s->_stdin = __sfp(s); - s->_stdout = __sfp(s); - s->_stderr = __sfp(s); -#endif - - std (s->_stdin, __SRD, 0, s); - - /* On platforms that have true file system I/O, we can verify - whether stdout is an interactive terminal or not, as part of - __smakebuf on first use of the stream. For all other platforms, - we will default to line buffered mode here. Technically, POSIX - requires both stdin and stdout to be line-buffered, but tradition - leaves stdin alone on systems without fcntl. */ -#ifdef HAVE_FCNTL - std (s->_stdout, __SWR, 1, s); -#else - std (s->_stdout, __SWR | __SLBF, 1, s); -#endif - - /* POSIX requires stderr to be opened for reading and writing, even - when the underlying fd 2 is write-only. */ - std (s->_stderr, __SRW | __SNBF, 2, s); - - __sinit_lock_release (); -} - -#ifndef __SINGLE_THREAD__ - -__LOCK_INIT_RECURSIVE(static, __sfp_lock); -__LOCK_INIT_RECURSIVE(static, __sinit_lock); - -_VOID -_DEFUN_VOID(__sfp_lock_acquire) -{ - __lock_acquire_recursive (__sfp_lock); -} - -_VOID -_DEFUN_VOID(__sfp_lock_release) -{ - __lock_release_recursive (__sfp_lock); -} - -_VOID -_DEFUN_VOID(__sinit_lock_acquire) -{ - __lock_acquire_recursive (__sinit_lock); -} - -_VOID -_DEFUN_VOID(__sinit_lock_release) -{ - __lock_release_recursive (__sinit_lock); -} - -/* Walkable file locking routine. */ -static int -_DEFUN(__fp_lock, (ptr), - FILE * ptr) -{ - _flockfile (ptr); - - return 0; -} - -/* Walkable file unlocking routine. */ -static int -_DEFUN(__fp_unlock, (ptr), - FILE * ptr) -{ - _funlockfile (ptr); - - return 0; -} - -_VOID -_DEFUN_VOID(__fp_lock_all) -{ - __sfp_lock_acquire (); - - _CAST_VOID _fwalk (_REENT, __fp_lock); -} - -_VOID -_DEFUN_VOID(__fp_unlock_all) -{ - _CAST_VOID _fwalk (_REENT, __fp_unlock); - - __sfp_lock_release (); -} -#endif diff --git a/newlib/libc/stdio/fiprintf.c b/newlib/libc/stdio/fiprintf.c deleted file mode 100644 index 7d417f88c..000000000 --- a/newlib/libc/stdio/fiprintf.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* doc in siprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdarg.h> - -int -_DEFUN(_fiprintf_r, (ptr, fp, fmt), - struct _reent *ptr _AND - FILE * fp _AND - const char *fmt _DOTS) -{ - int ret; - va_list ap; - - va_start (ap, fmt); - ret = _vfiprintf_r (ptr, fp, fmt, ap); - va_end (ap); - return ret; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(fiprintf, (fp, fmt), - FILE * fp _AND - const char *fmt _DOTS) -{ - int ret; - va_list ap; - - va_start (ap, fmt); - ret = _vfiprintf_r (_REENT, fp, fmt, ap); - va_end (ap); - return ret; -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/fiscanf.c b/newlib/libc/stdio/fiscanf.c deleted file mode 100644 index 53fee8454..000000000 --- a/newlib/libc/stdio/fiscanf.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include "local.h" - -#ifndef _REENT_ONLY - -int -#ifdef _HAVE_STDC -fiscanf(FILE *fp, _CONST char *fmt, ...) -#else -fiscanf(FILE *fp, fmt, va_alist) - FILE *fp; - char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = __svfiscanf_r (_REENT, fp, fmt, ap); - va_end (ap); - return ret; -} - -#endif /* !_REENT_ONLY */ - -int -#ifdef _HAVE_STDC -_fiscanf_r(struct _reent *ptr, FILE *fp, _CONST char *fmt, ...) -#else -_fiscanf_r(ptr, FILE *fp, fmt, va_alist) - struct _reent *ptr; - FILE *fp; - char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = __svfiscanf_r (ptr, fp, fmt, ap); - va_end (ap); - return (ret); -} - diff --git a/newlib/libc/stdio/flags.c b/newlib/libc/stdio/flags.c deleted file mode 100644 index 26d2f82fd..000000000 --- a/newlib/libc/stdio/flags.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 1990 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* No user fns here. Pesch 15apr92 */ - -#include <_ansi.h> -#include <stdio.h> -#include <time.h> -#include <fcntl.h> -#include <errno.h> -#include <sys/types.h> - -/* - * Return the (stdio) flags for a given mode. Store the flags - * to be passed to an open() syscall through *optr. - * Return 0 on error. - */ - -int -_DEFUN(__sflags, (ptr, mode, optr), - struct _reent *ptr _AND - register char *mode _AND - int *optr) -{ - register int ret, m, o; - - switch (mode[0]) - { - case 'r': /* open for reading */ - ret = __SRD; - m = O_RDONLY; - o = 0; - break; - - case 'w': /* open for writing */ - ret = __SWR; - m = O_WRONLY; - o = O_CREAT | O_TRUNC; - break; - - case 'a': /* open for appending */ - ret = __SWR | __SAPP; - m = O_WRONLY; - o = O_CREAT | O_APPEND; - break; - default: /* illegal mode */ - ptr->_errno = EINVAL; - return (0); - } - if (mode[1] && (mode[1] == '+' || mode[2] == '+')) - { - ret = (ret & ~(__SRD | __SWR)) | __SRW; - m = O_RDWR; - } - if (mode[1] && (mode[1] == 'b' || mode[2] == 'b')) - { -#ifdef O_BINARY - m |= O_BINARY; -#endif - } -#ifdef __CYGWIN__ - else if (mode[1] && (mode[1] == 't' || mode[2] == 't')) -#else - else -#endif - { -#ifdef O_TEXT - m |= O_TEXT; -#endif - } - *optr = m | o; - return ret; -} diff --git a/newlib/libc/stdio/floatio.h b/newlib/libc/stdio/floatio.h deleted file mode 100644 index 496721b88..000000000 --- a/newlib/libc/stdio/floatio.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * %W% (Berkeley) %G% - */ - -/* - * Floating point scanf/printf (input/output) definitions. - */ - -#ifdef _NO_LONGDBL -/* 11-bit exponent (VAX G floating point) is 308 decimal digits */ -#define MAXEXP 308 -#else /* !_NO_LONGDBL */ -/* 15-bit exponent (Intel extended floating point) is 4932 decimal digits */ -#define MAXEXP 4932 -#endif /* !_NO_LONGDBL */ -/* 128 bit fraction takes up 39 decimal digits; max reasonable precision */ -#define MAXFRACT 39 diff --git a/newlib/libc/stdio/fmemopen.c b/newlib/libc/stdio/fmemopen.c deleted file mode 100644 index 5218e8a98..000000000 --- a/newlib/libc/stdio/fmemopen.c +++ /dev/null @@ -1,371 +0,0 @@ -/* Copyright (C) 2007 Eric Blake - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ - -/* -FUNCTION -<<fmemopen>>---open a stream around a fixed-length string - -INDEX - fmemopen - -ANSI_SYNOPSIS - #include <stdio.h> - FILE *fmemopen(void *restrict <[buf]>, size_t <[size]>, - const char *restrict <[mode]>); - -DESCRIPTION -<<fmemopen>> creates a seekable <<FILE>> stream that wraps a -fixed-length buffer of <[size]> bytes starting at <[buf]>. The stream -is opened with <[mode]> treated as in <<fopen>>, where append mode -starts writing at the first NUL byte. If <[buf]> is NULL, then -<[size]> bytes are automatically provided as if by <<malloc>>, with -the initial size of 0, and <[mode]> must contain <<+>> so that data -can be read after it is written. - -The stream maintains a current position, which moves according to -bytes read or written, and which can be one past the end of the array. -The stream also maintains a current file size, which is never greater -than <[size]>. If <[mode]> starts with <<r>>, the position starts at -<<0>>, and file size starts at <[size]> if <[buf]> was provided. If -<[mode]> starts with <<w>>, the position and file size start at <<0>>, -and if <[buf]> was provided, the first byte is set to NUL. If -<[mode]> starts with <<a>>, the position and file size start at the -location of the first NUL byte, or else <[size]> if <[buf]> was -provided. - -When reading, NUL bytes have no significance, and reads cannot exceed -the current file size. When writing, the file size can increase up to -<[size]> as needed, and NUL bytes may be embedded in the stream (see -<<open_memstream>> for an alternative that automatically enlarges the -buffer). When the stream is flushed or closed after a write that -changed the file size, a NUL byte is written at the current position -if there is still room; if the stream is not also open for reading, a -NUL byte is additionally written at the last byte of <[buf]> when the -stream has exceeded <[size]>, so that a write-only <[buf]> is always -NUL-terminated when the stream is flushed or closed (and the initial -<[size]> should take this into account). It is not possible to seek -outside the bounds of <[size]>. A NUL byte written during a flush is -restored to its previous value when seeking elsewhere in the string. - -RETURNS -The return value is an open FILE pointer on success. On error, -<<NULL>> is returned, and <<errno>> will be set to EINVAL if <[size]> -is zero or <[mode]> is invalid, ENOMEM if <[buf]> was NULL and memory -could not be allocated, or EMFILE if too many streams are already -open. - -PORTABILITY -This function is being added to POSIX 200x, but is not in POSIX 2001. - -Supporting OS subroutines required: <<sbrk>>. -*/ - -#include <stdio.h> -#include <errno.h> -#include <string.h> -#include <sys/lock.h> -#include "local.h" - -/* Describe details of an open memstream. */ -typedef struct fmemcookie { - void *storage; /* storage to free on close */ - char *buf; /* buffer start */ - size_t pos; /* current position */ - size_t eof; /* current file size */ - size_t max; /* maximum file size */ - char append; /* nonzero if appending */ - char writeonly; /* 1 if write-only */ - char saved; /* saved character that lived at pos before write-only NUL */ -} fmemcookie; - -/* Read up to non-zero N bytes into BUF from stream described by - COOKIE; return number of bytes read (0 on EOF). */ -static _READ_WRITE_RETURN_TYPE -_DEFUN(fmemreader, (ptr, cookie, buf, n), - struct _reent *ptr _AND - void *cookie _AND - char *buf _AND - int n) -{ - fmemcookie *c = (fmemcookie *) cookie; - /* Can't read beyond current size, but EOF condition is not an error. */ - if (c->pos > c->eof) - return 0; - if (n >= c->eof - c->pos) - n = c->eof - c->pos; - memcpy (buf, c->buf + c->pos, n); - c->pos += n; - return n; -} - -/* Write up to non-zero N bytes of BUF into the stream described by COOKIE, - returning the number of bytes written or EOF on failure. */ -static _READ_WRITE_RETURN_TYPE -_DEFUN(fmemwriter, (ptr, cookie, buf, n), - struct _reent *ptr _AND - void *cookie _AND - const char *buf _AND - int n) -{ - fmemcookie *c = (fmemcookie *) cookie; - int adjust = 0; /* true if at EOF, but still need to write NUL. */ - - /* Append always seeks to eof; otherwise, if we have previously done - a seek beyond eof, ensure all intermediate bytes are NUL. */ - if (c->append) - c->pos = c->eof; - else if (c->pos > c->eof) - memset (c->buf + c->eof, '\0', c->pos - c->eof); - /* Do not write beyond EOF; saving room for NUL on write-only stream. */ - if (c->pos + n > c->max - c->writeonly) - { - adjust = c->writeonly; - n = c->max - c->pos; - } - /* Now n is the number of bytes being modified, and adjust is 1 if - the last byte is NUL instead of from buf. Write a NUL if - write-only; or if read-write, eof changed, and there is still - room. When we are within the file contents, remember what we - overwrite so we can restore it if we seek elsewhere later. */ - if (c->pos + n > c->eof) - { - c->eof = c->pos + n; - if (c->eof - adjust < c->max) - c->saved = c->buf[c->eof - adjust] = '\0'; - } - else if (c->writeonly) - { - if (n) - { - c->saved = c->buf[c->pos + n - adjust]; - c->buf[c->pos + n - adjust] = '\0'; - } - else - adjust = 0; - } - c->pos += n; - if (n - adjust) - memcpy (c->buf + c->pos - n, buf, n - adjust); - else - { - ptr->_errno = ENOSPC; - return EOF; - } - return n; -} - -/* Seek to position POS relative to WHENCE within stream described by - COOKIE; return resulting position or fail with EOF. */ -static _fpos_t -_DEFUN(fmemseeker, (ptr, cookie, pos, whence), - struct _reent *ptr _AND - void *cookie _AND - _fpos_t pos _AND - int whence) -{ - fmemcookie *c = (fmemcookie *) cookie; -#ifndef __LARGE64_FILES - off_t offset = (off_t) pos; -#else /* __LARGE64_FILES */ - _off64_t offset = (_off64_t) pos; -#endif /* __LARGE64_FILES */ - - if (whence == SEEK_CUR) - offset += c->pos; - else if (whence == SEEK_END) - offset += c->eof; - if (offset < 0) - { - ptr->_errno = EINVAL; - offset = -1; - } - else if (offset > c->max) - { - ptr->_errno = ENOSPC; - offset = -1; - } -#ifdef __LARGE64_FILES - else if ((_fpos_t) offset != offset) - { - ptr->_errno = EOVERFLOW; - offset = -1; - } -#endif /* __LARGE64_FILES */ - else - { - if (c->writeonly && c->pos < c->eof) - { - c->buf[c->pos] = c->saved; - c->saved = '\0'; - } - c->pos = offset; - if (c->writeonly && c->pos < c->eof) - { - c->saved = c->buf[c->pos]; - c->buf[c->pos] = '\0'; - } - } - return (_fpos_t) offset; -} - -/* Seek to position POS relative to WHENCE within stream described by - COOKIE; return resulting position or fail with EOF. */ -#ifdef __LARGE64_FILES -static _fpos64_t -_DEFUN(fmemseeker64, (ptr, cookie, pos, whence), - struct _reent *ptr _AND - void *cookie _AND - _fpos64_t pos _AND - int whence) -{ - _off64_t offset = (_off64_t) pos; - fmemcookie *c = (fmemcookie *) cookie; - if (whence == SEEK_CUR) - offset += c->pos; - else if (whence == SEEK_END) - offset += c->eof; - if (offset < 0) - { - ptr->_errno = EINVAL; - offset = -1; - } - else if (offset > c->max) - { - ptr->_errno = ENOSPC; - offset = -1; - } - else - { - if (c->writeonly && c->pos < c->eof) - { - c->buf[c->pos] = c->saved; - c->saved = '\0'; - } - c->pos = offset; - if (c->writeonly && c->pos < c->eof) - { - c->saved = c->buf[c->pos]; - c->buf[c->pos] = '\0'; - } - } - return (_fpos64_t) offset; -} -#endif /* __LARGE64_FILES */ - -/* Reclaim resources used by stream described by COOKIE. */ -static int -_DEFUN(fmemcloser, (ptr, cookie), - struct _reent *ptr _AND - void *cookie) -{ - fmemcookie *c = (fmemcookie *) cookie; - _free_r (ptr, c->storage); - return 0; -} - -/* Open a memstream around buffer BUF of SIZE bytes, using MODE. - Return the new stream, or fail with NULL. */ -FILE * -_DEFUN(_fmemopen_r, (ptr, buf, size, mode), - struct _reent *ptr _AND - void *buf _AND - size_t size _AND - const char *mode) -{ - FILE *fp; - fmemcookie *c; - int flags; - int dummy; - - if ((flags = __sflags (ptr, mode, &dummy)) == 0) - return NULL; - if (!size || !(buf || flags & __SRW)) - { - ptr->_errno = EINVAL; - return NULL; - } - if ((fp = __sfp (ptr)) == NULL) - return NULL; - if ((c = (fmemcookie *) _malloc_r (ptr, sizeof *c + (buf ? 0 : size))) - == NULL) - { - __sfp_lock_acquire (); - fp->_flags = 0; /* release */ -#ifndef __SINGLE_THREAD__ - __lock_close_recursive (fp->_lock); -#endif - __sfp_lock_release (); - return NULL; - } - - c->storage = c; - c->max = size; - /* 9 modes to worry about. */ - /* w/a, buf or no buf: Guarantee a NUL after any file writes. */ - c->writeonly = (flags & __SWR) != 0; - c->saved = '\0'; - if (!buf) - { - /* r+/w+/a+, and no buf: file starts empty. */ - c->buf = (char *) (c + 1); - c->buf[0] = '\0'; - c->pos = c->eof = 0; - c->append = (flags & __SAPP) != 0; - } - else - { - c->buf = (char *) buf; - switch (*mode) - { - case 'a': - /* a/a+ and buf: position and size at first NUL. */ - buf = memchr (c->buf, '\0', size); - c->eof = c->pos = buf ? (char *) buf - c->buf : size; - if (!buf && c->writeonly) - /* a: guarantee a NUL within size even if no writes. */ - c->buf[size - 1] = '\0'; - c->append = 1; - break; - case 'r': - /* r/r+ and buf: read at beginning, full size available. */ - c->pos = c->append = 0; - c->eof = size; - break; - case 'w': - /* w/w+ and buf: write at beginning, truncate to empty. */ - c->pos = c->append = c->eof = 0; - *c->buf = '\0'; - break; - default: - abort (); - } - } - - _flockfile (fp); - fp->_file = -1; - fp->_flags = flags; - fp->_cookie = c; - fp->_read = flags & (__SRD | __SRW) ? fmemreader : NULL; - fp->_write = flags & (__SWR | __SRW) ? fmemwriter : NULL; - fp->_seek = fmemseeker; -#ifdef __LARGE64_FILES - fp->_seek64 = fmemseeker64; - fp->_flags |= __SL64; -#endif - fp->_close = fmemcloser; - _funlockfile (fp); - return fp; -} - -#ifndef _REENT_ONLY -FILE * -_DEFUN(fmemopen, (buf, size, mode), - void *buf _AND - size_t size _AND - const char *mode) -{ - return _fmemopen_r (_REENT, buf, size, mode); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/fopen.c b/newlib/libc/stdio/fopen.c deleted file mode 100644 index 64c24e7ef..000000000 --- a/newlib/libc/stdio/fopen.c +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fopen>>---open a file - -INDEX - fopen -INDEX - _fopen_r - -ANSI_SYNOPSIS - #include <stdio.h> - FILE *fopen(const char *<[file]>, const char *<[mode]>); - - FILE *_fopen_r(struct _reent *<[reent]>, - const char *<[file]>, const char *<[mode]>); - -TRAD_SYNOPSIS - #include <stdio.h> - FILE *fopen(<[file]>, <[mode]>) - char *<[file]>; - char *<[mode]>; - - FILE *_fopen_r(<[reent]>, <[file]>, <[mode]>) - struct _reent *<[reent]>; - char *<[file]>; - char *<[mode]>; - -DESCRIPTION -<<fopen>> initializes the data structures needed to read or write a -file. Specify the file's name as the string at <[file]>, and the kind -of access you need to the file with the string at <[mode]>. - -The alternate function <<_fopen_r>> is a reentrant version. -The extra argument <[reent]> is a pointer to a reentrancy structure. - -Three fundamental kinds of access are available: read, write, and append. -<<*<[mode]>>> must begin with one of the three characters `<<r>>', -`<<w>>', or `<<a>>', to select one of these: - -o+ -o r -Open the file for reading; the operation will fail if the file does -not exist, or if the host system does not permit you to read it. - -o w -Open the file for writing @emph{from the beginning} of the file: -effectively, this always creates a new file. If the file whose name you -specified already existed, its old contents are discarded. - -o a -Open the file for appending data, that is writing from the end of -file. When you open a file this way, all data always goes to the -current end of file; you cannot change this using <<fseek>>. -o- - -Some host systems distinguish between ``binary'' and ``text'' files. -Such systems may perform data transformations on data written to, or -read from, files opened as ``text''. -If your system is one of these, then you can append a `<<b>>' to any -of the three modes above, to specify that you are opening the file as -a binary file (the default is to open the file as a text file). - -`<<rb>>', then, means ``read binary''; `<<wb>>', ``write binary''; and -`<<ab>>', ``append binary''. - -To make C programs more portable, the `<<b>>' is accepted on all -systems, whether or not it makes a difference. - -Finally, you might need to both read and write from the same file. -You can also append a `<<+>>' to any of the three modes, to permit -this. (If you want to append both `<<b>>' and `<<+>>', you can do it -in either order: for example, <<"rb+">> means the same thing as -<<"r+b">> when used as a mode string.) - -Use <<"r+">> (or <<"rb+">>) to permit reading and writing anywhere in -an existing file, without discarding any data; <<"w+">> (or <<"wb+">>) -to create a new file (or begin by discarding all data from an old one) -that permits reading and writing anywhere in it; and <<"a+">> (or -<<"ab+">>) to permit reading anywhere in an existing file, but writing -only at the end. - -RETURNS -<<fopen>> returns a file pointer which you can use for other file -operations, unless the file you requested could not be opened; in that -situation, the result is <<NULL>>. If the reason for failure was an -invalid string at <[mode]>, <<errno>> is set to <<EINVAL>>. - -PORTABILITY -<<fopen>> is required by ANSI C. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<open>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <errno.h> -#include <sys/lock.h> -#ifdef __CYGWIN__ -#include <fcntl.h> -#endif -#include "local.h" - -FILE * -_DEFUN(_fopen_r, (ptr, file, mode), - struct _reent *ptr _AND - _CONST char *file _AND - _CONST char *mode) -{ - register FILE *fp; - register int f; - int flags, oflags; - - if ((flags = __sflags (ptr, mode, &oflags)) == 0) - return NULL; - if ((fp = __sfp (ptr)) == NULL) - return NULL; - - if ((f = _open_r (ptr, file, oflags, 0666)) < 0) - { - __sfp_lock_acquire (); - fp->_flags = 0; /* release */ -#ifndef __SINGLE_THREAD__ - __lock_close_recursive (fp->_lock); -#endif - __sfp_lock_release (); - return NULL; - } - - _flockfile (fp); - - fp->_file = f; - fp->_flags = flags; - fp->_cookie = (_PTR) fp; - fp->_read = __sread; - fp->_write = __swrite; - fp->_seek = __sseek; - fp->_close = __sclose; - - if (fp->_flags & __SAPP) - _fseek_r (ptr, fp, 0, SEEK_END); - -#ifdef __SCLE - if (__stextmode (fp->_file)) - fp->_flags |= __SCLE; -#endif - - _funlockfile (fp); - return fp; -} - -#ifndef _REENT_ONLY - -FILE * -_DEFUN(fopen, (file, mode), - _CONST char *file _AND - _CONST char *mode) -{ - return _fopen_r (_REENT, file, mode); -} - -#endif diff --git a/newlib/libc/stdio/fopencookie.c b/newlib/libc/stdio/fopencookie.c deleted file mode 100644 index 5148c8a1a..000000000 --- a/newlib/libc/stdio/fopencookie.c +++ /dev/null @@ -1,262 +0,0 @@ -/* Copyright (C) 2007 Eric Blake - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ - -/* -FUNCTION -<<fopencookie>>---open a stream with custom callbacks - -INDEX - fopencookie - -ANSI_SYNOPSIS - #include <stdio.h> - FILE *fopencookie(const void *<[cookie]>, const char *<[mode]>, - cookie_io_functions_t <[functions]>); - -DESCRIPTION -<<fopencookie>> creates a <<FILE>> stream where I/O is performed using -custom callbacks. The callbacks are registered via the structure: - - typedef ssize_t (*cookie_read_function_t)(void *_cookie, char *_buf, - size_t _n); - typedef ssize_t (*cookie_write_function_t)(void *_cookie, - const char *_buf, size_t _n); - typedef int (*cookie_seek_function_t)(void *_cookie, off_t *_off, - int _whence); - typedef int (*cookie_close_function_t)(void *_cookie); - -. typedef struct -. { -. cookie_read_function_t *read; -. cookie_write_function_t *write; -. cookie_seek_function_t *seek; -. cookie_close_function_t *close; -. } cookie_io_functions_t; - -The stream is opened with <[mode]> treated as in <<fopen>>. The -callbacks <[functions.read]> and <[functions.write]> may only be NULL -when <[mode]> does not require them. - -<[functions.read]> should return -1 on failure, or else the number of -bytes read (0 on EOF). It is similar to <<read>>, except that -<[cookie]> will be passed as the first argument. - -<[functions.write]> should return -1 on failure, or else the number of -bytes written. It is similar to <<write>>, except that <[cookie]> -will be passed as the first argument. - -<[functions.seek]> should return -1 on failure, and 0 on success, with -*<[_off]> set to the current file position. It is a cross between -<<lseek>> and <<fseek>>, with the <[_whence]> argument interpreted in -the same manner. A NULL <[functions.seek]> makes the stream behave -similarly to a pipe in relation to stdio functions that require -positioning. - -<[functions.close]> should return -1 on failure, or 0 on success. It -is similar to <<close>>, except that <[cookie]> will be passed as the -first argument. A NULL <[functions.close]> merely flushes all data -then lets <<fclose>> succeed. A failed close will still invalidate -the stream. - -Read and write I/O functions are allowed to change the underlying -buffer on fully buffered or line buffered streams by calling -<<setvbuf>>. They are also not required to completely fill or empty -the buffer. They are not, however, allowed to change streams from -unbuffered to buffered or to change the state of the line buffering -flag. They must also be prepared to have read or write calls occur on -buffers other than the one most recently specified. - -RETURNS -The return value is an open FILE pointer on success. On error, -<<NULL>> is returned, and <<errno>> will be set to EINVAL if a -function pointer is missing or <[mode]> is invalid, ENOMEM if the -stream cannot be created, or EMFILE if too many streams are already -open. - -PORTABILITY -This function is a newlib extension, copying the prototype from Linux. -It is not portable. See also the <<funopen>> interface from BSD. - -Supporting OS subroutines required: <<sbrk>>. -*/ - -#include <stdio.h> -#include <errno.h> -#include <sys/lock.h> -#include "local.h" - -typedef struct fccookie { - void *cookie; - FILE *fp; - cookie_read_function_t *readfn; - cookie_write_function_t *writefn; - cookie_seek_function_t *seekfn; - cookie_close_function_t *closefn; -} fccookie; - -static _READ_WRITE_RETURN_TYPE -_DEFUN(fcreader, (ptr, cookie, buf, n), - struct _reent *ptr _AND - void *cookie _AND - char *buf _AND - int n) -{ - int result; - fccookie *c = (fccookie *) cookie; - errno = 0; - if ((result = c->readfn (c->cookie, buf, n)) < 0 && errno) - ptr->_errno = errno; - return result; -} - -static _READ_WRITE_RETURN_TYPE -_DEFUN(fcwriter, (ptr, cookie, buf, n), - struct _reent *ptr _AND - void *cookie _AND - const char *buf _AND - int n) -{ - int result; - fccookie *c = (fccookie *) cookie; - if (c->fp->_flags & __SAPP && c->fp->_seek) - { -#ifdef __LARGE64_FILES - c->fp->_seek64 (ptr, cookie, 0, SEEK_END); -#else - c->fp->_seek (ptr, cookie, 0, SEEK_END); -#endif - } - errno = 0; - if ((result = c->writefn (c->cookie, buf, n)) < 0 && errno) - ptr->_errno = errno; - return result; -} - -static _fpos_t -_DEFUN(fcseeker, (ptr, cookie, pos, whence), - struct _reent *ptr _AND - void *cookie _AND - _fpos_t pos _AND - int whence) -{ - fccookie *c = (fccookie *) cookie; -#ifndef __LARGE64_FILES - off_t offset = (off_t) pos; -#else /* __LARGE64_FILES */ - _off64_t offset = (_off64_t) pos; -#endif /* __LARGE64_FILES */ - - errno = 0; - if (c->seekfn (c->cookie, &offset, whence) < 0 && errno) - ptr->_errno = errno; -#ifdef __LARGE64_FILES - else if ((_fpos_t)offset != offset) - { - ptr->_errno = EOVERFLOW; - offset = -1; - } -#endif /* __LARGE64_FILES */ - return (_fpos_t) offset; -} - -#ifdef __LARGE64_FILES -static _fpos64_t -_DEFUN(fcseeker64, (ptr, cookie, pos, whence), - struct _reent *ptr _AND - void *cookie _AND - _fpos64_t pos _AND - int whence) -{ - _off64_t offset; - fccookie *c = (fccookie *) cookie; - errno = 0; - if (c->seekfn (c->cookie, &offset, whence) < 0 && errno) - ptr->_errno = errno; - return (_fpos64_t) offset; -} -#endif /* __LARGE64_FILES */ - -static int -_DEFUN(fccloser, (ptr, cookie), - struct _reent *ptr _AND - void *cookie) -{ - int result = 0; - fccookie *c = (fccookie *) cookie; - if (c->closefn) - { - errno = 0; - if ((result = c->closefn (c->cookie)) < 0 && errno) - ptr->_errno = errno; - } - _free_r (ptr, c); - return result; -} - -FILE * -_DEFUN(_fopencookie_r, (ptr, cookie, mode, functions), - struct _reent *ptr _AND - void *cookie _AND - const char *mode _AND - cookie_io_functions_t functions) -{ - FILE *fp; - fccookie *c; - int flags; - int dummy; - - if ((flags = __sflags (ptr, mode, &dummy)) == 0) - return NULL; - if (((flags & (__SRD | __SRW)) && !functions.read) - || ((flags & (__SWR | __SRW)) && !functions.write)) - { - ptr->_errno = EINVAL; - return NULL; - } - if ((fp = __sfp (ptr)) == NULL) - return NULL; - if ((c = (fccookie *) _malloc_r (ptr, sizeof *c)) == NULL) - { - __sfp_lock_acquire (); - fp->_flags = 0; /* release */ -#ifndef __SINGLE_THREAD__ - __lock_close_recursive (fp->_lock); -#endif - __sfp_lock_release (); - return NULL; - } - - _flockfile (fp); - fp->_file = -1; - fp->_flags = flags; - c->cookie = cookie; - c->fp = fp; - fp->_cookie = c; - c->readfn = functions.read; - fp->_read = fcreader; - c->writefn = functions.write; - fp->_write = fcwriter; - c->seekfn = functions.seek; - fp->_seek = functions.seek ? fcseeker : NULL; -#ifdef __LARGE64_FILES - fp->_seek64 = functions.seek ? fcseeker64 : NULL; - fp->_flags |= __SL64; -#endif - c->closefn = functions.close; - fp->_close = fccloser; - _funlockfile (fp); - return fp; -} - -#ifndef _REENT_ONLY -FILE * -_DEFUN(fopencookie, (cookie, mode, functions), - void *cookie _AND - const char *mode _AND - cookie_io_functions_t functions) -{ - return _fopencookie_r (_REENT, cookie, mode, functions); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/fprintf.c b/newlib/libc/stdio/fprintf.c deleted file mode 100644 index a3c089479..000000000 --- a/newlib/libc/stdio/fprintf.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* doc in sprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdarg.h> - -int -_DEFUN(_fprintf_r, (ptr, fp, fmt), - struct _reent *ptr _AND - FILE *fp _AND - const char *fmt _DOTS) -{ - int ret; - va_list ap; - - va_start (ap, fmt); - ret = _vfprintf_r (ptr, fp, fmt, ap); - va_end (ap); - return ret; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(fprintf, (fp, fmt), - FILE *fp _AND - const char *fmt _DOTS) -{ - int ret; - va_list ap; - - va_start (ap, fmt); - ret = _vfprintf_r (_REENT, fp, fmt, ap); - va_end (ap); - return ret; -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/fpurge.c b/newlib/libc/stdio/fpurge.c deleted file mode 100644 index 7e23bb7fd..000000000 --- a/newlib/libc/stdio/fpurge.c +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright (C) 2009 Eric Blake - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ - -/* -FUNCTION -<<fpurge>>---discard pending file I/O - -INDEX - fpurge -INDEX - _fpurge_r -INDEX - __fpurge - -ANSI_SYNOPSIS - #include <stdio.h> - int fpurge(FILE *<[fp]>); - - int _fpurge_r(struct _reent *<[reent]>, FILE *<[fp]>); - - #include <stdio.h> - #include <stdio_ext.h> - void __fpurge(FILE *<[fp]>); - - -DESCRIPTION -Use <<fpurge>> to clear all buffers of the given stream. For output -streams, this discards data not yet written to disk. For input streams, -this discards any data from <<ungetc>> and any data retrieved from disk -but not yet read via <<getc>>. This is more severe than <<fflush>>, -and generally is only needed when manually altering the underlying file -descriptor of a stream. - -<<__fpurge>> behaves exactly like <<fpurge>> but does not return a value. - -The alternate function <<_fpurge_r>> is a reentrant version, where the -extra argument <[reent]> is a pointer to a reentrancy structure, and -<[fp]> must not be NULL. - -RETURNS -<<fpurge>> returns <<0>> unless <[fp]> is not valid, in which case it -returns <<EOF>> and sets <<errno>>. - -PORTABILITY -These functions are not portable to any standard. - -No supporting OS subroutines are required. -*/ - -#include <_ansi.h> -#include <stdio.h> -#ifndef __rtems__ -#include <stdio_ext.h> -#endif -#include <errno.h> -#include "local.h" - -/* Discard I/O from a single file. */ - -int -_DEFUN(_fpurge_r, (ptr, fp), - struct _reent *ptr _AND - register FILE * fp) -{ - int t; - - CHECK_INIT (ptr, fp); - - _flockfile (fp); - - t = fp->_flags; - if (!t) - { - ptr->_errno = EBADF; - _funlockfile (fp); - return EOF; - } - fp->_p = fp->_bf._base; - if ((t & __SWR) == 0) - { - fp->_r = 0; - if (HASUB (fp)) - FREEUB (ptr, fp); - } - else - fp->_w = t & (__SLBF | __SNBF) ? 0 : fp->_bf._size; - _funlockfile (fp); - return 0; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(fpurge, (fp), - register FILE * fp) -{ - return _fpurge_r (_REENT, fp); -} - -#ifndef __rtems__ - -void -_DEFUN(__fpurge, (fp), - register FILE * fp) -{ - _fpurge_r (_REENT, fp); -} - -#endif - -#endif /* _REENT_ONLY */ diff --git a/newlib/libc/stdio/fputc.c b/newlib/libc/stdio/fputc.c deleted file mode 100644 index 777a34242..000000000 --- a/newlib/libc/stdio/fputc.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fputc>>---write a character on a stream or file - -INDEX - fputc -INDEX - _fputc_r - -ANSI_SYNOPSIS - #include <stdio.h> - int fputc(int <[ch]>, FILE *<[fp]>); - - #include <stdio.h> - int _fputc_r(struct _rent *<[ptr]>, int <[ch]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int fputc(<[ch]>, <[fp]>) - int <[ch]>; - FILE *<[fp]>; - - #include <stdio.h> - int _fputc_r(<[ptr]>, <[ch]>, <[fp]>) - struct _reent *<[ptr]>; - int <[ch]>; - FILE *<[fp]>; - -DESCRIPTION -<<fputc>> converts the argument <[ch]> from an <<int>> to an -<<unsigned char>>, then writes it to the file or stream identified by -<[fp]>. - -If the file was opened with append mode (or if the stream cannot -support positioning), then the new character goes at the end of the -file or stream. Otherwise, the new character is written at the -current value of the position indicator, and the position indicator -oadvances by one. - -For a macro version of this function, see <<putc>>. - -The <<_fputc_r>> function is simply a reentrant version of <<fputc>> -that takes an additional reentrant structure argument: <[ptr]>. - -RETURNS -If successful, <<fputc>> returns its argument <[ch]>. If an error -intervenes, the result is <<EOF>>. You can use `<<ferror(<[fp]>)>>' to -query for errors. - -PORTABILITY -<<fputc>> is required by ANSI C. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <stdio.h> -#include "local.h" - -int -_DEFUN(_fputc_r, (ptr, ch, file), - struct _reent *ptr _AND - int ch _AND - FILE * file) -{ - int result; - CHECK_INIT(ptr, file); - _flockfile (file); - result = _putc_r (ptr, ch, file); - _funlockfile (file); - return result; -} - -#ifndef _REENT_ONLY -int -_DEFUN(fputc, (ch, file), - int ch _AND - FILE * file) -{ -#if !defined(__OPTIMIZE_SIZE__) && !defined(PREFER_SIZE_OVER_SPEED) - int result; - CHECK_INIT(_REENT, file); - _flockfile (file); - result = _putc_r (_REENT, ch, file); - _funlockfile (file); - return result; -#else - return _fputc_r (_REENT, ch, file); -#endif -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/fputs.c b/newlib/libc/stdio/fputs.c deleted file mode 100644 index a32dea4e2..000000000 --- a/newlib/libc/stdio/fputs.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fputs>>---write a character string in a file or stream - -INDEX - fputs -INDEX - _fputs_r - -ANSI_SYNOPSIS - #include <stdio.h> - int fputs(const char *<[s]>, FILE *<[fp]>); - - #include <stdio.h> - int _fputs_r(struct _reent *<[ptr]>, const char *<[s]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int fputs(<[s]>, <[fp]>) - char *<[s]>; - FILE *<[fp]>; - - #include <stdio.h> - int _fputs_r(<[ptr]>, <[s]>, <[fp]>) - struct _reent *<[ptr]>; - char *<[s]>; - FILE *<[fp]>; - -DESCRIPTION -<<fputs>> writes the string at <[s]> (but without the trailing null) -to the file or stream identified by <[fp]>. - -<<_fputs_r>> is simply the reentrant version of <<fputs>> that takes -an additional reentrant struct pointer argument: <[ptr]>. - -RETURNS -If successful, the result is <<0>>; otherwise, the result is <<EOF>>. - -PORTABILITY -ANSI C requires <<fputs>>, but does not specify that the result on -success must be <<0>>; any non-negative value is permitted. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <stdio.h> -#include <string.h> -#include "fvwrite.h" -#include "local.h" - -/* - * Write the given string to the given file. - */ - -int -_DEFUN(_fputs_r, (ptr, s, fp), - struct _reent * ptr _AND - char _CONST * s _AND - FILE * fp) -{ - int result; - struct __suio uio; - struct __siov iov; - - iov.iov_base = s; - iov.iov_len = uio.uio_resid = strlen (s); - uio.uio_iov = &iov; - uio.uio_iovcnt = 1; - - CHECK_INIT(ptr, fp); - - _flockfile (fp); - ORIENT (fp, -1); - result = __sfvwrite_r (ptr, fp, &uio); - _funlockfile (fp); - return result; -} - -#ifndef _REENT_ONLY -int -_DEFUN(fputs, (s, fp), - char _CONST * s _AND - FILE * fp) -{ - return _fputs_r (_REENT, s, fp); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/fputwc.c b/newlib/libc/stdio/fputwc.c deleted file mode 100644 index f32d56675..000000000 --- a/newlib/libc/stdio/fputwc.c +++ /dev/null @@ -1,177 +0,0 @@ -/*- - * Copyright (c) 2002-2004 Tim J. Robbins. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* -FUNCTION -<<fputwc>>, <<putwc>>---write a wide character on a stream or file - -INDEX - fputwc -INDEX - _fputwc_r -INDEX - putwc -INDEX - _putwc_r - -ANSI_SYNOPSIS - #include <stdio.h> - #include <wchar.h> - wint_t fputwc(wchar_t <[wc]>, FILE *<[fp]>); - - #include <stdio.h> - #include <wchar.h> - wint_t _fputwc_r(struct _reent *<[ptr]>, wchar_t <[wc]>, FILE *<[fp]>); - - #include <stdio.h> - #include <wchar.h> - wint_t putwc(wchar_t <[wc]>, FILE *<[fp]>); - - #include <stdio.h> - #include <wchar.h> - wint_t _putwc_r(struct _reent *<[ptr]>, wchar_t <[wc]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - #include <wchar.h> - wint_t fputwc(<[wc]>, <[fp]>) - wchar_t <[wc]>; - FILE *<[fp]>; - - #include <stdio.h> - #include <wchar.h> - wint_t _fputwc_r(<[ptr]>, <[wc]>, <[fp]>) - struct _reent *<[ptr]>; - wchar_t <[wc]>; - FILE *<[fp]>; - - #include <stdio.h> - #include <wchar.h> - wint_t putwc(<[wc]>, <[fp]>) - wchar_t <[wc]>; - FILE *<[fp]>; - - #include <stdio.h> - #include <wchar.h> - wint_t _putwc_r(<[ptr]>, <[wc]>, <[fp]>) - struct _reent *<[ptr]>; - wchar_t <[wc]>; - FILE *<[fp]>; - -DESCRIPTION -<<fputwc>> writes the wide character argument <[wc]> to the file or -stream identified by <[fp]>. - -If the file was opened with append mode (or if the stream cannot -support positioning), then the new wide character goes at the end of the -file or stream. Otherwise, the new wide character is written at the -current value of the position indicator, and the position indicator -oadvances by one. - -The <<putwc>> function or macro functions identically to <<fputwc>>. It -may be implemented as a macro, and may evaluate its argument more than -once. There is no reason ever to use it. - -The <<_fputwc_r>> and <<_putwc_r>> functions are simply reentrant versions -of <<fputwc>> and <<putwc>> that take an additional reentrant structure -argument: <[ptr]>. - -RETURNS -If successful, <<fputwc>> and <<putwc>> return their argument <[wc]>. -If an error intervenes, the result is <<EOF>>. You can use -`<<ferror(<[fp]>)>>' to query for errors. - -PORTABILITY -C99, POSIX.1-2001 -*/ - -#include <_ansi.h> -#include <reent.h> -#include <errno.h> -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <wchar.h> -#include "local.h" - -static wint_t -_DEFUN(__fputwc, (ptr, wc, fp), - struct _reent *ptr _AND - wchar_t wc _AND - FILE *fp) -{ - char buf[MB_LEN_MAX]; - size_t i, len; - - if (MB_CUR_MAX == 1 && wc > 0 && wc <= UCHAR_MAX) - { - /* - * Assume single-byte locale with no special encoding. - * A more careful test would be to check - * _CurrentRuneLocale->encoding. - */ - *buf = (unsigned char)wc; - len = 1; - } - else - { - if ((len = _wcrtomb_r (ptr, buf, wc, &fp->_mbstate)) == (size_t) -1) - { - fp->_flags |= __SERR; - return WEOF; - } - } - - for (i = 0; i < len; i++) - if (__sputc_r (ptr, (unsigned char) buf[i], fp) == EOF) - return WEOF; - - return (wint_t) wc; -} - -wint_t -_DEFUN(_fputwc_r, (ptr, wc, fp), - struct _reent *ptr _AND - wchar_t wc _AND - FILE *fp) -{ - wint_t r; - - _flockfile (fp); - ORIENT(fp, 1); - r = __fputwc(ptr, wc, fp); - _funlockfile (fp); - return r; -} - -wint_t -_DEFUN(fputwc, (wc, fp), - wchar_t wc _AND - FILE *fp) -{ - CHECK_INIT(_REENT, fp); - return _fputwc_r (_REENT, wc, fp); -} diff --git a/newlib/libc/stdio/fputws.c b/newlib/libc/stdio/fputws.c deleted file mode 100644 index b8e5d1e0b..000000000 --- a/newlib/libc/stdio/fputws.c +++ /dev/null @@ -1,122 +0,0 @@ -/*- - * Copyright (c) 2002-2004 Tim J. Robbins. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* -FUNCTION -<<fputws>>---write a wide character string in a file or stream - -INDEX - fputws -INDEX - _fputws_r - -ANSI_SYNOPSIS - #include <wchar.h> - int fputws(const wchar_t *<[ws]>, FILE *<[fp]>); - - #include <wchar.h> - int _fputws_r(struct _reent *<[ptr]>, const wchar_t *<[ws]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <wchar.h> - int fputws(<[ws]>, <[fp]>) - wchar_t *<[ws]>; - FILE *<[fp]>; - - #include <wchar.h> - int _fputws_r(<[ptr]>, <[ws]>, <[fp]>) - struct _reent *<[ptr]>; - wchar_t *<[ws]>; - FILE *<[fp]>; - -DESCRIPTION -<<fputws>> writes the wide character string at <[ws]> (but without the -trailing null) to the file or stream identified by <[fp]>. - -<<_fputws_r>> is simply the reentrant version of <<fputws>> that takes -an additional reentrant struct pointer argument: <[ptr]>. - -RETURNS -If successful, the result is a non-negative integer; otherwise, the result -is <<-1>> to indicate an error. - -PORTABILITY -C99, POSIX.1-2001 -*/ - -#include <_ansi.h> -#include <reent.h> -#include <errno.h> -#include <limits.h> -#include <stdio.h> -#include <wchar.h> -#include "fvwrite.h" -#include "local.h" - -int -_DEFUN(_fputws_r, (ptr, ws, fp), - struct _reent *ptr _AND - const wchar_t *ws _AND - FILE *fp) -{ - size_t nbytes; - char buf[BUFSIZ]; - struct __suio uio; - struct __siov iov; - - _flockfile (fp); - ORIENT (fp, 1); - if (cantwrite (ptr, fp) != 0) - goto error; - uio.uio_iov = &iov; - uio.uio_iovcnt = 1; - iov.iov_base = buf; - do - { - nbytes = _wcsrtombs_r(ptr, buf, &ws, sizeof (buf), &fp->_mbstate); - if (nbytes == (size_t) -1) - goto error; - iov.iov_len = uio.uio_resid = nbytes; - if (__sfvwrite_r(ptr, fp, &uio) != 0) - goto error; - } - while (ws != NULL); - _funlockfile (fp); - return (0); - -error: - _funlockfile(fp); - return (-1); -} - -int -_DEFUN(fputws, (ws, fp), - const wchar_t *ws _AND - FILE *fp) -{ - CHECK_INIT (_REENT, fp); - return _fputws_r (_REENT, ws, fp); -} diff --git a/newlib/libc/stdio/fread.c b/newlib/libc/stdio/fread.c deleted file mode 100644 index a39e9d85f..000000000 --- a/newlib/libc/stdio/fread.c +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright (c) 1990, 2007 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fread>>---read array elements from a file - -INDEX - fread -INDEX - _fread_r - -ANSI_SYNOPSIS - #include <stdio.h> - size_t fread(void *<[buf]>, size_t <[size]>, size_t <[count]>, - FILE *<[fp]>); - - #include <stdio.h> - size_t _fread_r(struct _reent *<[ptr]>, void *<[buf]>, - size_t <[size]>, size_t <[count]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - size_t fread(<[buf]>, <[size]>, <[count]>, <[fp]>) - char *<[buf]>; - size_t <[size]>; - size_t <[count]>; - FILE *<[fp]>; - - #include <stdio.h> - size_t _fread_r(<[ptr]>, <[buf]>, <[size]>, <[count]>, <[fp]>) - struct _reent *<[ptr]>; - char *<[buf]>; - size_t <[size]>; - size_t <[count]>; - FILE *<[fp]>; - -DESCRIPTION -<<fread>> attempts to copy, from the file or stream identified by -<[fp]>, <[count]> elements (each of size <[size]>) into memory, -starting at <[buf]>. <<fread>> may copy fewer elements than -<[count]> if an error, or end of file, intervenes. - -<<fread>> also advances the file position indicator (if any) for -<[fp]> by the number of @emph{characters} actually read. - -<<_fread_r>> is simply the reentrant version of <<fread>> that -takes an additional reentrant structure pointer argument: <[ptr]>. - -RETURNS -The result of <<fread>> is the number of elements it succeeded in -reading. - -PORTABILITY -ANSI C requires <<fread>>. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <stdio.h> -#include <string.h> -#include <malloc.h> -#include "local.h" - -#ifdef __SCLE -static size_t -_DEFUN(crlf_r, (ptr, fp, buf, count, eof), - struct _reent * ptr _AND - FILE * fp _AND - char * buf _AND - size_t count _AND - int eof) -{ - int r; - char *s, *d, *e; - - if (count == 0) - return 0; - - e = buf + count; - for (s=d=buf; s<e-1; s++) - { - if (*s == '\r' && s[1] == '\n') - s++; - *d++ = *s; - } - if (s < e) - { - if (*s == '\r') - { - int c = __sgetc_raw_r (ptr, fp); - if (c == '\n') - *s = '\n'; - else - ungetc (c, fp); - } - *d++ = *s++; - } - - - while (d < e) - { - r = _getc_r (ptr, fp); - if (r == EOF) - return count - (e-d); - *d++ = r; - } - - return count; - -} - -#endif - -size_t -_DEFUN(_fread_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; - - CHECK_INIT(ptr, fp); - - _flockfile (fp); - ORIENT (fp, -1); - if (fp->_r < 0) - fp->_r = 0; - total = resid; - p = buf; - -#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__) - - /* Optimize unbuffered I/O. */ - if (fp->_flags & __SNBF) - { - /* First copy any available characters from ungetc buffer. */ - int copy_size = resid > fp->_r ? fp->_r : resid; - _CAST_VOID memcpy ((_PTR) p, (_PTR) fp->_p, (size_t) copy_size); - fp->_p += copy_size; - fp->_r -= copy_size; - p += copy_size; - resid -= copy_size; - - /* If still more data needed, free any allocated ungetc buffer. */ - if (HASUB (fp) && resid > 0) - FREEUB (ptr, fp); - - /* Finally read directly into user's buffer if needed. */ - while (resid > 0) - { - int rc = 0; - /* save fp buffering state */ - void *old_base = fp->_bf._base; - void * old_p = fp->_p; - int old_size = fp->_bf._size; - /* allow __refill to use user's buffer */ - fp->_bf._base = (unsigned char *) p; - fp->_bf._size = resid; - fp->_p = (unsigned char *) p; - rc = __srefill_r (ptr, fp); - /* restore fp buffering back to original state */ - fp->_bf._base = old_base; - fp->_bf._size = old_size; - fp->_p = old_p; - resid -= fp->_r; - p += fp->_r; - fp->_r = 0; - if (rc) - { -#ifdef __SCLE - if (fp->_flags & __SCLE) - { - _funlockfile (fp); - return crlf_r (ptr, fp, buf, total-resid, 1) / size; - } -#endif - _funlockfile (fp); - return (total - resid) / size; - } - } - } - else -#endif /* !PREFER_SIZE_OVER_SPEED && !__OPTIMIZE_SIZE__ */ - { - while (resid > (r = fp->_r)) - { - _CAST_VOID memcpy ((_PTR) p, (_PTR) fp->_p, (size_t) r); - fp->_p += r; - /* fp->_r = 0 ... done in __srefill */ - p += r; - resid -= r; - if (__srefill_r (ptr, fp)) - { - /* no more input: return partial result */ -#ifdef __SCLE - if (fp->_flags & __SCLE) - { - _funlockfile (fp); - return crlf_r (ptr, fp, buf, total-resid, 1) / size; - } -#endif - _funlockfile (fp); - return (total - resid) / size; - } - } - _CAST_VOID memcpy ((_PTR) p, (_PTR) fp->_p, resid); - fp->_r -= resid; - fp->_p += resid; - } - - /* Perform any CR/LF clean-up if necessary. */ -#ifdef __SCLE - if (fp->_flags & __SCLE) - { - _funlockfile (fp); - return crlf_r(ptr, fp, buf, total, 0) / size; - } -#endif - _funlockfile (fp); - return count; -} - -#ifndef _REENT_ONLY -size_t -_DEFUN(fread, (buf, size, count, fp), - _PTR buf _AND - size_t size _AND - size_t count _AND - FILE * fp) -{ - return _fread_r (_REENT, buf, size, count, fp); -} -#endif diff --git a/newlib/libc/stdio/freopen.c b/newlib/libc/stdio/freopen.c deleted file mode 100644 index 172006259..000000000 --- a/newlib/libc/stdio/freopen.c +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright (c) 1990, 2007 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<freopen>>---open a file using an existing file descriptor - -INDEX - freopen -INDEX - _freopen_r - -ANSI_SYNOPSIS - #include <stdio.h> - FILE *freopen(const char *<[file]>, const char *<[mode]>, - FILE *<[fp]>); - FILE *_freopen_r(struct _reent *<[ptr]>, const char *<[file]>, - const char *<[mode]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - FILE *freopen(<[file]>, <[mode]>, <[fp]>) - char *<[file]>; - char *<[mode]>; - FILE *<[fp]>; - - FILE *_freopen_r(<[ptr]>, <[file]>, <[mode]>, <[fp]>) - struct _reent *<[ptr]>; - char *<[file]>; - char *<[mode]>; - FILE *<[fp]>; - -DESCRIPTION -Use this variant of <<fopen>> if you wish to specify a particular file -descriptor <[fp]> (notably <<stdin>>, <<stdout>>, or <<stderr>>) for -the file. - -If <[fp]> was associated with another file or stream, <<freopen>> -closes that other file or stream (but ignores any errors while closing -it). - -<[file]> and <[mode]> are used just as in <<fopen>>. - -If <[file]> is <<NULL>>, the underlying stream is modified rather than -closed. The file cannot be given a more permissive access mode (for -example, a <[mode]> of "w" will fail on a read-only file descriptor), -but can change status such as append or binary mode. If modification -is not possible, failure occurs. - -RETURNS -If successful, the result is the same as the argument <[fp]>. If the -file cannot be opened as specified, the result is <<NULL>>. - -PORTABILITY -ANSI C requires <<freopen>>. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<open>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <time.h> -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <fcntl.h> -#include <stdlib.h> -#include <sys/lock.h> -#include "local.h" - -/* - * Re-direct an existing, open (probably) file to some other file. - */ - -FILE * -_DEFUN(_freopen_r, (ptr, file, mode, fp), - struct _reent *ptr _AND - const char *file _AND - const char *mode _AND - register FILE *fp) -{ - register int f; - int flags, oflags; - int e = 0; - - CHECK_INIT (ptr, fp); - - _flockfile (fp); - - if ((flags = __sflags (ptr, mode, &oflags)) == 0) - { - _funlockfile (fp); - _fclose_r (ptr, fp); - return NULL; - } - - /* - * Remember whether the stream was open to begin with, and - * which file descriptor (if any) was associated with it. - * If it was attached to a descriptor, defer closing it, - * so that, e.g., freopen("/dev/stdin", "r", stdin) works. - * This is unnecessary if it was not a Unix file. - */ - - if (fp->_flags == 0) - fp->_flags = __SEOF; /* hold on to it */ - else - { - if (fp->_flags & __SWR) - _fflush_r (ptr, fp); - /* - * If close is NULL, closing is a no-op, hence pointless. - * If file is NULL, the file should not be closed. - */ - if (fp->_close != NULL && file != NULL) - fp->_close (ptr, fp->_cookie); - } - - /* - * Now get a new descriptor to refer to the new file, or reuse the - * existing file descriptor if file is NULL. - */ - - if (file != NULL) - { - f = _open_r (ptr, (char *) file, oflags, 0666); - e = ptr->_errno; - } - else - { -#ifdef HAVE_FCNTL - int oldflags; - /* - * Reuse the file descriptor, but only if the new access mode is - * equal or less permissive than the old. F_SETFL correctly - * ignores creation flags. - */ - f = fp->_file; - if ((oldflags = _fcntl_r (ptr, f, F_GETFL, 0)) == -1 - || ! ((oldflags & O_ACCMODE) == O_RDWR - || ((oldflags ^ oflags) & O_ACCMODE) == 0) - || _fcntl_r (ptr, f, F_SETFL, oflags) == -1) - f = -1; -#else - /* We cannot modify without fcntl support. */ - f = -1; -#endif - -#ifdef __SCLE - /* - * F_SETFL doesn't change textmode. Don't mess with modes of ttys. - */ - if (0 <= f && ! _isatty_r (ptr, f) - && setmode (f, oflags & (O_BINARY | O_TEXT)) == -1) - f = -1; -#endif - - if (f < 0) - { - e = EBADF; - if (fp->_close != NULL) - fp->_close (ptr, fp->_cookie); - } - } - - /* - * Finish closing fp. Even if the open succeeded above, - * we cannot keep fp->_base: it may be the wrong size. - * This loses the effect of any setbuffer calls, - * but stdio has always done this before. - */ - - if (fp->_flags & __SMBF) - _free_r (ptr, (char *) fp->_bf._base); - fp->_w = 0; - fp->_r = 0; - fp->_p = NULL; - fp->_bf._base = NULL; - fp->_bf._size = 0; - fp->_lbfsize = 0; - if (HASUB (fp)) - FREEUB (ptr, fp); - fp->_ub._size = 0; - if (HASLB (fp)) - FREELB (ptr, fp); - fp->_lb._size = 0; - fp->_flags & ~__SORD; - fp->_flags2 = 0; - memset (&fp->_mbstate, 0, sizeof (_mbstate_t)); - - if (f < 0) - { /* did not get it after all */ - __sfp_lock_acquire (); - fp->_flags = 0; /* set it free */ - ptr->_errno = e; /* restore in case _close clobbered */ - _funlockfile (fp); -#ifndef __SINGLE_THREAD__ - __lock_close_recursive (fp->_lock); -#endif - __sfp_lock_release (); - return NULL; - } - - fp->_flags = flags; - fp->_file = f; - fp->_cookie = (_PTR) fp; - fp->_read = __sread; - fp->_write = __swrite; - fp->_seek = __sseek; - fp->_close = __sclose; - -#ifdef __SCLE - if (__stextmode (fp->_file)) - fp->_flags |= __SCLE; -#endif - - _funlockfile (fp); - return fp; -} - -#ifndef _REENT_ONLY - -FILE * -_DEFUN(freopen, (file, mode, fp), - _CONST char *file _AND - _CONST char *mode _AND - register FILE *fp) -{ - return _freopen_r (_REENT, file, mode, fp); -} - -#endif /*!_REENT_ONLY */ diff --git a/newlib/libc/stdio/fscanf.c b/newlib/libc/stdio/fscanf.c deleted file mode 100644 index afbc2f0e8..000000000 --- a/newlib/libc/stdio/fscanf.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include "local.h" - -#ifndef _REENT_ONLY - -int -#ifdef _HAVE_STDC -fscanf(FILE *fp, _CONST char *fmt, ...) -#else -fscanf(FILE *fp, fmt, va_alist) - FILE *fp; - char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = _vfscanf_r (_REENT, fp, fmt, ap); - va_end (ap); - return ret; -} - -#endif /* !_REENT_ONLY */ - -int -#ifdef _HAVE_STDC -_fscanf_r(struct _reent *ptr, FILE *fp, _CONST char *fmt, ...) -#else -_fscanf_r(ptr, FILE *fp, fmt, va_alist) - struct _reent *ptr; - FILE *fp; - char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = _vfscanf_r (ptr, fp, fmt, ap); - va_end (ap); - return (ret); -} - diff --git a/newlib/libc/stdio/fseek.c b/newlib/libc/stdio/fseek.c deleted file mode 100644 index c78d2b26c..000000000 --- a/newlib/libc/stdio/fseek.c +++ /dev/null @@ -1,397 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fseek>>, <<fseeko>>---set file position - -INDEX - fseek -INDEX - fseeko -INDEX - _fseek_r -INDEX - _fseeko_r - -ANSI_SYNOPSIS - #include <stdio.h> - int fseek(FILE *<[fp]>, long <[offset]>, int <[whence]>) - int fseeko(FILE *<[fp]>, off_t <[offset]>, int <[whence]>) - int _fseek_r(struct _reent *<[ptr]>, FILE *<[fp]>, - long <[offset]>, int <[whence]>) - int _fseeko_r(struct _reent *<[ptr]>, FILE *<[fp]>, - off_t <[offset]>, int <[whence]>) - -TRAD_SYNOPSIS - #include <stdio.h> - int fseek(<[fp]>, <[offset]>, <[whence]>) - FILE *<[fp]>; - long <[offset]>; - int <[whence]>; - - int fseeko(<[fp]>, <[offset]>, <[whence]>) - FILE *<[fp]>; - off_t <[offset]>; - int <[whence]>; - - int _fseek_r(<[ptr]>, <[fp]>, <[offset]>, <[whence]>) - struct _reent *<[ptr]>; - FILE *<[fp]>; - long <[offset]>; - int <[whence]>; - - int _fseeko_r(<[ptr]>, <[fp]>, <[offset]>, <[whence]>) - struct _reent *<[ptr]>; - FILE *<[fp]>; - off_t <[offset]>; - int <[whence]>; - -DESCRIPTION -Objects of type <<FILE>> can have a ``position'' that records how much -of the file your program has already read. Many of the <<stdio>> functions -depend on this position, and many change it as a side effect. - -You can use <<fseek>>/<<fseeko>> to set the position for the file identified by -<[fp]>. The value of <[offset]> determines the new position, in one -of three ways selected by the value of <[whence]> (defined as macros -in `<<stdio.h>>'): - -<<SEEK_SET>>---<[offset]> is the absolute file position (an offset -from the beginning of the file) desired. <[offset]> must be positive. - -<<SEEK_CUR>>---<[offset]> is relative to the current file position. -<[offset]> can meaningfully be either positive or negative. - -<<SEEK_END>>---<[offset]> is relative to the current end of file. -<[offset]> can meaningfully be either positive (to increase the size -of the file) or negative. - -See <<ftell>>/<<ftello>> to determine the current file position. - -RETURNS -<<fseek>>/<<fseeko>> return <<0>> when successful. On failure, the -result is <<EOF>>. The reason for failure is indicated in <<errno>>: -either <<ESPIPE>> (the stream identified by <[fp]> doesn't support -repositioning) or <<EINVAL>> (invalid file position). - -PORTABILITY -ANSI C requires <<fseek>>. - -<<fseeko>> is defined by the Single Unix specification. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <string.h> -#include <time.h> -#include <fcntl.h> -#include <stdlib.h> -#include <errno.h> -#include <sys/stat.h> -#include "local.h" - -#define POS_ERR (-(_fpos_t)1) - -/* - * Seek the given file to the given offset. - * `Whence' must be one of the three SEEK_* macros. - */ - -int -_DEFUN(_fseek_r, (ptr, fp, offset, whence), - struct _reent *ptr _AND - register FILE *fp _AND - long offset _AND - int whence) -{ - _fpos_t _EXFNPTR(seekfn, (struct _reent *, _PTR, _fpos_t, int)); - _fpos_t target; - _fpos_t curoff = 0; - size_t n; -#ifdef __USE_INTERNAL_STAT64 - struct stat64 st; -#else - struct stat st; -#endif - int havepos; - - /* Make sure stdio is set up. */ - - CHECK_INIT (ptr, fp); - - _flockfile (fp); - - /* If we've been doing some writing, and we're in append mode - then we don't really know where the filepos is. */ - - if (fp->_flags & __SAPP && fp->_flags & __SWR) - { - /* So flush the buffer and seek to the end. */ - _fflush_r (ptr, fp); - } - - /* Have to be able to seek. */ - - if ((seekfn = fp->_seek) == NULL) - { - ptr->_errno = ESPIPE; /* ??? */ - _funlockfile (fp); - return EOF; - } - - /* - * Change any SEEK_CUR to SEEK_SET, and check `whence' argument. - * After this, whence is either SEEK_SET or SEEK_END. - */ - - switch (whence) - { - case SEEK_CUR: - /* - * In order to seek relative to the current stream offset, - * we have to first find the current stream offset a la - * ftell (see ftell for details). - */ - _fflush_r (ptr, fp); /* may adjust seek offset on append stream */ - if (fp->_flags & __SOFF) - curoff = fp->_offset; - else - { - curoff = seekfn (ptr, fp->_cookie, (_fpos_t) 0, SEEK_CUR); - if (curoff == -1L) - { - _funlockfile (fp); - return EOF; - } - } - if (fp->_flags & __SRD) - { - curoff -= fp->_r; - if (HASUB (fp)) - curoff -= fp->_ur; - } - else if (fp->_flags & __SWR && fp->_p != NULL) - curoff += fp->_p - fp->_bf._base; - - offset += curoff; - whence = SEEK_SET; - havepos = 1; - break; - - case SEEK_SET: - case SEEK_END: - havepos = 0; - break; - - default: - ptr->_errno = EINVAL; - _funlockfile (fp); - return (EOF); - } - - /* - * Can only optimise if: - * reading (and not reading-and-writing); - * not unbuffered; and - * this is a `regular' Unix file (and hence seekfn==__sseek). - * We must check __NBF first, because it is possible to have __NBF - * and __SOPT both set. - */ - - if (fp->_bf._base == NULL) - __smakebuf_r (ptr, fp); - if (fp->_flags & (__SWR | __SRW | __SNBF | __SNPT)) - goto dumb; - if ((fp->_flags & __SOPT) == 0) - { - if (seekfn != __sseek - || fp->_file < 0 -#ifdef __USE_INTERNAL_STAT64 - || _fstat64_r (ptr, fp->_file, &st) -#else - || _fstat_r (ptr, fp->_file, &st) -#endif - || (st.st_mode & S_IFMT) != S_IFREG) - { - fp->_flags |= __SNPT; - goto dumb; - } -#ifdef HAVE_BLKSIZE - fp->_blksize = st.st_blksize; -#else - fp->_blksize = 1024; -#endif - fp->_flags |= __SOPT; - } - - /* - * We are reading; we can try to optimise. - * Figure out where we are going and where we are now. - */ - - if (whence == SEEK_SET) - target = offset; - else - { -#ifdef __USE_INTERNAL_STAT64 - if (_fstat64_r (ptr, fp->_file, &st)) -#else - if (_fstat_r (ptr, fp->_file, &st)) -#endif - goto dumb; - target = st.st_size + offset; - } - if ((long)target != target) - { - ptr->_errno = EOVERFLOW; - _funlockfile (fp); - return EOF; - } - - if (!havepos) - { - if (fp->_flags & __SOFF) - curoff = fp->_offset; - else - { - curoff = seekfn (ptr, fp->_cookie, 0L, SEEK_CUR); - if (curoff == POS_ERR) - goto dumb; - } - curoff -= fp->_r; - if (HASUB (fp)) - curoff -= fp->_ur; - } - - /* - * Compute the number of bytes in the input buffer (pretending - * that any ungetc() input has been discarded). Adjust current - * offset backwards by this count so that it represents the - * file offset for the first byte in the current input buffer. - */ - - if (HASUB (fp)) - { - curoff += fp->_r; /* kill off ungetc */ - n = fp->_up - fp->_bf._base; - curoff -= n; - n += fp->_ur; - } - else - { - n = fp->_p - fp->_bf._base; - curoff -= n; - n += fp->_r; - } - - /* - * If the target offset is within the current buffer, - * simply adjust the pointers, clear EOF, undo ungetc(), - * and return. - */ - - if (target >= curoff && target < curoff + n) - { - register int o = target - curoff; - - fp->_p = fp->_bf._base + o; - fp->_r = n - o; - if (HASUB (fp)) - FREEUB (ptr, fp); - fp->_flags &= ~__SEOF; - memset (&fp->_mbstate, 0, sizeof (_mbstate_t)); - _funlockfile (fp); - return 0; - } - - /* - * The place we want to get to is not within the current buffer, - * but we can still be kind to the kernel copyout mechanism. - * By aligning the file offset to a block boundary, we can let - * the kernel use the VM hardware to map pages instead of - * copying bytes laboriously. Using a block boundary also - * ensures that we only read one block, rather than two. - */ - - curoff = target & ~(fp->_blksize - 1); - if (seekfn (ptr, fp->_cookie, curoff, SEEK_SET) == POS_ERR) - goto dumb; - fp->_r = 0; - fp->_p = fp->_bf._base; - if (HASUB (fp)) - FREEUB (ptr, fp); - fp->_flags &= ~__SEOF; - n = target - curoff; - if (n) - { - if (__srefill_r (ptr, fp) || fp->_r < n) - goto dumb; - fp->_p += n; - fp->_r -= n; - } - memset (&fp->_mbstate, 0, sizeof (_mbstate_t)); - _funlockfile (fp); - return 0; - - /* - * We get here if we cannot optimise the seek ... just - * do it. Allow the seek function to change fp->_bf._base. - */ - -dumb: - if (_fflush_r (ptr, fp) - || seekfn (ptr, fp->_cookie, offset, whence) == POS_ERR) - { - _funlockfile (fp); - return EOF; - } - /* success: clear EOF indicator and discard ungetc() data */ - if (HASUB (fp)) - FREEUB (ptr, fp); - fp->_p = fp->_bf._base; - fp->_r = 0; - /* fp->_w = 0; *//* unnecessary (I think...) */ - fp->_flags &= ~__SEOF; - /* Reset no-optimization flag after successful seek. The - no-optimization flag may be set in the case of a read - stream that is flushed which by POSIX/SUSv3 standards, - means that a corresponding seek must not optimize. The - optimization is then allowed if no subsequent flush - is performed. */ - fp->_flags &= ~__SNPT; - memset (&fp->_mbstate, 0, sizeof (_mbstate_t)); - _funlockfile (fp); - return 0; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(fseek, (fp, offset, whence), - register FILE *fp _AND - long offset _AND - int whence) -{ - return _fseek_r (_REENT, fp, offset, whence); -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/fseeko.c b/newlib/libc/stdio/fseeko.c deleted file mode 100644 index 0d655d0e7..000000000 --- a/newlib/libc/stdio/fseeko.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2002, Red Hat Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> - -int -_DEFUN(_fseeko_r, (ptr, fp, offset, whence), - struct _reent *ptr _AND - register FILE *fp _AND - _off_t offset _AND - int whence) -{ - return _fseek_r (ptr, fp, (long)offset, whence); -} - -#ifndef _REENT_ONLY - -int -_DEFUN(fseeko, (fp, offset, whence), - register FILE *fp _AND - _off_t offset _AND - int whence) -{ - /* for now we simply cast since off_t should be long */ - return _fseek_r (_REENT, fp, (long)offset, whence); -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/fsetpos.c b/newlib/libc/stdio/fsetpos.c deleted file mode 100644 index d1596293b..000000000 --- a/newlib/libc/stdio/fsetpos.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fsetpos>>---restore position of a stream or file - -INDEX - fsetpos -INDEX - _fsetpos_r - -ANSI_SYNOPSIS - #include <stdio.h> - int fsetpos(FILE *<[fp]>, const fpos_t *<[pos]>); - int _fsetpos_r(struct _reent *<[ptr]>, FILE *<[fp]>, - const fpos_t *<[pos]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int fsetpos(<[fp]>, <[pos]>) - FILE *<[fp]>; - fpos_t *<[pos]>; - - int _fsetpos_r(<[ptr]>, <[fp]>, <[pos]>) - struct _reent *<[ptr]>; - FILE *<[fp]>; - fpos_t *<[pos]>; - -DESCRIPTION -Objects of type <<FILE>> can have a ``position'' that records how much -of the file your program has already read. Many of the <<stdio>> functions -depend on this position, and many change it as a side effect. - -You can use <<fsetpos>> to return the file identified by <[fp]> to a previous -position <<*<[pos]>>> (after first recording it with <<fgetpos>>). - -See <<fseek>> for a similar facility. - -RETURNS -<<fgetpos>> returns <<0>> when successful. If <<fgetpos>> fails, the -result is <<1>>. The reason for failure is indicated in <<errno>>: -either <<ESPIPE>> (the stream identified by <[fp]> doesn't support -repositioning) or <<EINVAL>> (invalid file position). - -PORTABILITY -ANSI C requires <<fsetpos>>, but does not specify the nature of -<<*<[pos]>>> beyond identifying it as written by <<fgetpos>>. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> - -int -_DEFUN(_fsetpos_r, (ptr, iop, pos), - struct _reent * ptr _AND - FILE * iop _AND - _CONST _fpos_t * pos) -{ - int x = _fseek_r (ptr, iop, *pos, SEEK_SET); - - if (x != 0) - return 1; - return 0; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(fsetpos, (iop, pos), - FILE * iop _AND - _CONST _fpos_t * pos) -{ - return _fsetpos_r (_REENT, iop, pos); -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/ftell.c b/newlib/libc/stdio/ftell.c deleted file mode 100644 index 816cafa76..000000000 --- a/newlib/libc/stdio/ftell.c +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<ftell>>, <<ftello>>---return position in a stream or file - -INDEX - ftell -INDEX - ftello -INDEX - _ftell_r -INDEX - _ftello_r - -ANSI_SYNOPSIS - #include <stdio.h> - long ftell(FILE *<[fp]>); - off_t ftello(FILE *<[fp]>); - long _ftell_r(struct _reent *<[ptr]>, FILE *<[fp]>); - off_t _ftello_r(struct _reent *<[ptr]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - long ftell(<[fp]>) - FILE *<[fp]>; - - off_t ftello(<[fp]>) - FILE *<[fp]>; - - long _ftell_r(<[ptr]>, <[fp]>) - struct _reent *<[ptr]>; - FILE *<[fp]>; - - off_t _ftello_r(<[ptr]>, <[fp]>) - struct _reent *<[ptr]>; - FILE *<[fp]>; - -DESCRIPTION -Objects of type <<FILE>> can have a ``position'' that records how much -of the file your program has already read. Many of the <<stdio>> functions -depend on this position, and many change it as a side effect. - -The result of <<ftell>>/<<ftello>> is the current position for a file -identified by <[fp]>. If you record this result, you can later -use it with <<fseek>>/<<fseeko>> to return the file to this -position. The difference between <<ftell>> and <<ftello>> is that -<<ftell>> returns <<long>> and <<ftello>> returns <<off_t>>. - -In the current implementation, <<ftell>>/<<ftello>> simply uses a character -count to represent the file position; this is the same number that -would be recorded by <<fgetpos>>. - -RETURNS -<<ftell>>/<<ftello>> return the file position, if possible. If they cannot do -this, they return <<-1L>>. Failure occurs on streams that do not support -positioning; the global <<errno>> indicates this condition with the -value <<ESPIPE>>. - -PORTABILITY -<<ftell>> is required by the ANSI C standard, but the meaning of its -result (when successful) is not specified beyond requiring that it be -acceptable as an argument to <<fseek>>. In particular, other -conforming C implementations may return a different result from -<<ftell>> than what <<fgetpos>> records. - -<<ftello>> is defined by the Single Unix specification. - -No supporting OS subroutines are required. -*/ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -/* - * ftell: return current offset. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <errno.h> -#include "local.h" - -long -_DEFUN(_ftell_r, (ptr, fp), - struct _reent *ptr _AND - register FILE * fp) -{ - _fpos_t pos; - - /* Ensure stdio is set up. */ - - CHECK_INIT (ptr, fp); - - _flockfile (fp); - - if (fp->_seek == NULL) - { - ptr->_errno = ESPIPE; - _funlockfile (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); - if (fp->_flags & __SOFF) - pos = fp->_offset; - else - { - pos = fp->_seek (ptr, fp->_cookie, (_fpos_t) 0, SEEK_CUR); - if (pos == -1L) - { - _funlockfile (fp); - return pos; - } - } - if (fp->_flags & __SRD) - { - /* - * Reading. Any unread characters (including - * those from ungetc) cause the position to be - * smaller than that in the underlying object. - */ - pos -= fp->_r; - if (HASUB (fp)) - pos -= fp->_ur; - } - else if ((fp->_flags & __SWR) && fp->_p != NULL) - { - /* - * Writing. Any buffered characters cause the - * position to be greater than that in the - * underlying object. - */ - pos += fp->_p - fp->_bf._base; - } - - _funlockfile (fp); - if ((long)pos != pos) - { - pos = -1; - ptr->_errno = EOVERFLOW; - } - return pos; -} - -#ifndef _REENT_ONLY - -long -_DEFUN(ftell, (fp), - register FILE * fp) -{ - return _ftell_r (_REENT, fp); -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/ftello.c b/newlib/libc/stdio/ftello.c deleted file mode 100644 index 216d88453..000000000 --- a/newlib/libc/stdio/ftello.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2002, Red Hat Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> - -_off_t -_DEFUN(_ftello_r, (ptr, fp), - struct _reent * ptr _AND - register FILE * fp) -{ - /* for now we simply cast since off_t should be long */ - return (_off_t)_ftell_r (ptr, fp); -} - -#ifndef _REENT_ONLY - -_off_t -_DEFUN(ftello, (fp), - register FILE * fp) -{ - return (_off_t)_ftell_r (_REENT, fp); -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/funopen.c b/newlib/libc/stdio/funopen.c deleted file mode 100644 index 35a274f7b..000000000 --- a/newlib/libc/stdio/funopen.c +++ /dev/null @@ -1,278 +0,0 @@ -/* Copyright (C) 2007 Eric Blake - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ - -/* -FUNCTION -<<funopen>>, <<fropen>>, <<fwopen>>---open a stream with custom callbacks - -INDEX - funopen -INDEX - fropen -INDEX - fwopen - -ANSI_SYNOPSIS - #include <stdio.h> - FILE *funopen(const void *<[cookie]>, - int (*<[readfn]>) (void *cookie, char *buf, int n), - int (*<[writefn]>) (void *cookie, const char *buf, int n), - fpos_t (*<[seekfn]>) (void *cookie, fpos_t off, int whence), - int (*<[closefn]>) (void *cookie)); - FILE *fropen(const void *<[cookie]>, - int (*<[readfn]>) (void *cookie, char *buf, int n)); - FILE *fwopen(const void *<[cookie]>, - int (*<[writefn]>) (void *cookie, const char *buf, int n)); - -DESCRIPTION -<<funopen>> creates a <<FILE>> stream where I/O is performed using -custom callbacks. At least one of <[readfn]> and <[writefn]> must be -provided, which determines whether the stream behaves with mode <"r">, -<"w">, or <"r+">. - -<[readfn]> should return -1 on failure, or else the number of bytes -read (0 on EOF). It is similar to <<read>>, except that <int> rather -than <size_t> bounds a transaction size, and <[cookie]> will be passed -as the first argument. A NULL <[readfn]> makes attempts to read the -stream fail. - -<[writefn]> should return -1 on failure, or else the number of bytes -written. It is similar to <<write>>, except that <int> rather than -<size_t> bounds a transaction size, and <[cookie]> will be passed as -the first argument. A NULL <[writefn]> makes attempts to write the -stream fail. - -<[seekfn]> should return (fpos_t)-1 on failure, or else the current -file position. It is similar to <<lseek>>, except that <[cookie]> -will be passed as the first argument. A NULL <[seekfn]> makes the -stream behave similarly to a pipe in relation to stdio functions that -require positioning. This implementation assumes fpos_t and off_t are -the same type. - -<[closefn]> should return -1 on failure, or 0 on success. It is -similar to <<close>>, except that <[cookie]> will be passed as the -first argument. A NULL <[closefn]> merely flushes all data then lets -<<fclose>> succeed. A failed close will still invalidate the stream. - -Read and write I/O functions are allowed to change the underlying -buffer on fully buffered or line buffered streams by calling -<<setvbuf>>. They are also not required to completely fill or empty -the buffer. They are not, however, allowed to change streams from -unbuffered to buffered or to change the state of the line buffering -flag. They must also be prepared to have read or write calls occur on -buffers other than the one most recently specified. - -The functions <<fropen>> and <<fwopen>> are convenience macros around -<<funopen>> that only use the specified callback. - -RETURNS -The return value is an open FILE pointer on success. On error, -<<NULL>> is returned, and <<errno>> will be set to EINVAL if a -function pointer is missing, ENOMEM if the stream cannot be created, -or EMFILE if too many streams are already open. - -PORTABILITY -This function is a newlib extension, copying the prototype from BSD. -It is not portable. See also the <<fopencookie>> interface from Linux. - -Supporting OS subroutines required: <<sbrk>>. -*/ - -#include <stdio.h> -#include <errno.h> -#include <sys/lock.h> -#include "local.h" - -typedef int (*funread)(void *_cookie, char *_buf, int _n); -typedef int (*funwrite)(void *_cookie, const char *_buf, int _n); -#ifdef __LARGE64_FILES -typedef _fpos64_t (*funseek)(void *_cookie, _fpos64_t _off, int _whence); -#else -typedef fpos_t (*funseek)(void *_cookie, fpos_t _off, int _whence); -#endif -typedef int (*funclose)(void *_cookie); - -typedef struct funcookie { - void *cookie; - funread readfn; - funwrite writefn; - funseek seekfn; - funclose closefn; -} funcookie; - -static _READ_WRITE_RETURN_TYPE -_DEFUN(funreader, (ptr, cookie, buf, n), - struct _reent *ptr _AND - void *cookie _AND - char *buf _AND - int n) -{ - int result; - funcookie *c = (funcookie *) cookie; - errno = 0; - if ((result = c->readfn (c->cookie, buf, n)) < 0 && errno) - ptr->_errno = errno; - return result; -} - -static _READ_WRITE_RETURN_TYPE -_DEFUN(funwriter, (ptr, cookie, buf, n), - struct _reent *ptr _AND - void *cookie _AND - const char *buf _AND - int n) -{ - int result; - funcookie *c = (funcookie *) cookie; - errno = 0; - if ((result = c->writefn (c->cookie, buf, n)) < 0 && errno) - ptr->_errno = errno; - return result; -} - -static _fpos_t -_DEFUN(funseeker, (ptr, cookie, off, whence), - struct _reent *ptr _AND - void *cookie _AND - _fpos_t off _AND - int whence) -{ - funcookie *c = (funcookie *) cookie; -#ifndef __LARGE64_FILES - fpos_t result; - errno = 0; - if ((result = c->seekfn (c->cookie, (fpos_t) off, whence)) < 0 && errno) - ptr->_errno = errno; -#else /* __LARGE64_FILES */ - _fpos64_t result; - errno = 0; - if ((result = c->seekfn (c->cookie, (_fpos64_t) off, whence)) < 0 && errno) - ptr->_errno = errno; - else if ((_fpos_t)result != result) - { - ptr->_errno = EOVERFLOW; - result = -1; - } -#endif /* __LARGE64_FILES */ - return result; -} - -#ifdef __LARGE64_FILES -static _fpos64_t -_DEFUN(funseeker64, (ptr, cookie, off, whence), - struct _reent *ptr _AND - void *cookie _AND - _fpos64_t off _AND - int whence) -{ - _fpos64_t result; - funcookie *c = (funcookie *) cookie; - errno = 0; - if ((result = c->seekfn (c->cookie, off, whence)) < 0 && errno) - ptr->_errno = errno; - return result; -} -#endif /* __LARGE64_FILES */ - -static int -_DEFUN(funcloser, (ptr, cookie), - struct _reent *ptr _AND - void *cookie) -{ - int result = 0; - funcookie *c = (funcookie *) cookie; - if (c->closefn) - { - errno = 0; - if ((result = c->closefn (c->cookie)) < 0 && errno) - ptr->_errno = errno; - } - _free_r (ptr, c); - return result; -} - -FILE * -_DEFUN(_funopen_r, (ptr, cookie, readfn, writefn, seekfn, closefn), - struct _reent *ptr _AND - const void *cookie _AND - funread readfn _AND - funwrite writefn _AND - funseek seekfn _AND - funclose closefn) -{ - FILE *fp; - funcookie *c; - - if (!readfn && !writefn) - { - ptr->_errno = EINVAL; - return NULL; - } - if ((fp = __sfp (ptr)) == NULL) - return NULL; - if ((c = (funcookie *) _malloc_r (ptr, sizeof *c)) == NULL) - { - __sfp_lock_acquire (); - fp->_flags = 0; /* release */ -#ifndef __SINGLE_THREAD__ - __lock_close_recursive (fp->_lock); -#endif - __sfp_lock_release (); - return NULL; - } - - _flockfile (fp); - fp->_file = -1; - c->cookie = (void *) cookie; /* cast away const */ - fp->_cookie = c; - if (readfn) - { - c->readfn = readfn; - fp->_read = funreader; - if (writefn) - { - fp->_flags = __SRW; - c->writefn = writefn; - fp->_write = funwriter; - } - else - { - fp->_flags = __SRD; - c->writefn = NULL; - fp->_write = NULL; - } - } - else - { - fp->_flags = __SWR; - c->writefn = writefn; - fp->_write = funwriter; - c->readfn = NULL; - fp->_read = NULL; - } - c->seekfn = seekfn; - fp->_seek = seekfn ? funseeker : NULL; -#ifdef __LARGE64_FILES - fp->_seek64 = seekfn ? funseeker64 : NULL; - fp->_flags |= __SL64; -#endif - c->closefn = closefn; - fp->_close = funcloser; - _funlockfile (fp); - return fp; -} - -#ifndef _REENT_ONLY -FILE * -_DEFUN(funopen, (cookie, readfn, writefn, seekfn, closefn), - const void *cookie _AND - funread readfn _AND - funwrite writefn _AND - funseek seekfn _AND - funclose closefn) -{ - return _funopen_r (_REENT, cookie, readfn, writefn, seekfn, closefn); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/fvwrite.c b/newlib/libc/stdio/fvwrite.c deleted file mode 100644 index f196b3cfe..000000000 --- a/newlib/libc/stdio/fvwrite.c +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* No user fns here. Pesch 15apr92. */ - -#include <_ansi.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <errno.h> -#include "local.h" -#include "fvwrite.h" - -#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define COPY(n) _CAST_VOID memmove ((_PTR) fp->_p, (_PTR) p, (size_t) (n)) - -#define GETIOV(extra_work) \ - while (len == 0) \ - { \ - extra_work; \ - p = iov->iov_base; \ - len = iov->iov_len; \ - iov++; \ - } - -/* - * Write some memory regions. Return zero on success, EOF on error. - * - * This routine is large and unsightly, but most of the ugliness due - * to the three different kinds of output buffering is handled here. - */ - -int -_DEFUN(__sfvwrite_r, (ptr, fp, uio), - struct _reent *ptr _AND - register FILE *fp _AND - register struct __suio *uio) -{ - register size_t len; - register _CONST char *p = NULL; - register struct __siov *iov; - register int w, s; - char *nl; - int nlknown, nldist; - - if ((len = uio->uio_resid) == 0) - return 0; - - /* make sure we can write */ - if (cantwrite (ptr, fp)) - return EOF; - - iov = uio->uio_iov; - len = 0; - -#ifdef __SCLE - if (fp->_flags & __SCLE) /* text mode */ - { - do - { - GETIOV (;); - while (len > 0) - { - if (putc (*p, fp) == EOF) - return EOF; - p++; - len--; - uio->uio_resid--; - } - } - while (uio->uio_resid > 0); - return 0; - } -#endif - - if (fp->_flags & __SNBF) - { - /* - * Unbuffered: write up to BUFSIZ bytes at a time. - */ - do - { - GETIOV (;); - w = fp->_write (ptr, fp->_cookie, p, MIN (len, BUFSIZ)); - if (w <= 0) - goto err; - p += w; - len -= w; - } - while ((uio->uio_resid -= w) != 0); - } - else if ((fp->_flags & __SLBF) == 0) - { - /* - * Fully buffered: fill partially full buffer, if any, - * and then flush. If there is no partial buffer, write - * one _bf._size byte chunk directly (without copying). - * - * String output is a special case: write as many bytes - * as fit, but pretend we wrote everything. This makes - * snprintf() return the number of bytes needed, rather - * than the number used, and avoids its write function - * (so that the write function can be invalid). If - * we are dealing with the asprintf routines, we will - * dynamically increase the buffer size as needed. - */ - do - { - GETIOV (;); - w = fp->_w; - if (fp->_flags & __SSTR) - { - 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 buffer which is no longer used. */ - _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; - COPY (w); /* copy MIN(fp->_w,len), */ - fp->_w -= w; - fp->_p += w; - w = len; /* but pretend copied all */ - } - else if (fp->_p > fp->_bf._base && len > w) - { - /* fill and flush */ - COPY (w); - /* fp->_w -= w; *//* unneeded */ - fp->_p += w; - if (_fflush_r (ptr, fp)) - goto err; - } - else if (len >= (w = fp->_bf._size)) - { - /* write directly */ - w = fp->_write (ptr, fp->_cookie, p, w); - if (w <= 0) - goto err; - } - else - { - /* fill and done */ - w = len; - COPY (w); - fp->_w -= w; - fp->_p += w; - } - p += w; - len -= w; - } - while ((uio->uio_resid -= w) != 0); - } - else - { - /* - * Line buffered: like fully buffered, but we - * must check for newlines. Compute the distance - * to the first newline (including the newline), - * or `infinity' if there is none, then pretend - * that the amount to write is MIN(len,nldist). - */ - nlknown = 0; - nldist = 0; - do - { - GETIOV (nlknown = 0); - if (!nlknown) - { - nl = memchr ((_PTR) p, '\n', len); - nldist = nl ? nl + 1 - p : len + 1; - nlknown = 1; - } - s = MIN (len, nldist); - w = fp->_w + fp->_bf._size; - if (fp->_p > fp->_bf._base && s > w) - { - COPY (w); - /* fp->_w -= w; */ - fp->_p += w; - if (_fflush_r (ptr, fp)) - goto err; - } - else if (s >= (w = fp->_bf._size)) - { - w = fp->_write (ptr, fp->_cookie, p, w); - if (w <= 0) - goto err; - } - else - { - w = s; - COPY (w); - fp->_w -= w; - fp->_p += w; - } - if ((nldist -= w) == 0) - { - /* copied the newline: flush and forget */ - if (_fflush_r (ptr, fp)) - goto err; - nlknown = 0; - } - p += w; - len -= w; - } - while ((uio->uio_resid -= w) != 0); - } - return 0; - -err: - fp->_flags |= __SERR; - return EOF; -} diff --git a/newlib/libc/stdio/fvwrite.h b/newlib/libc/stdio/fvwrite.h deleted file mode 100644 index 848d5b261..000000000 --- a/newlib/libc/stdio/fvwrite.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 1990, 2007 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* %W% (Berkeley) %G% */ -#include <_ansi.h> - -/* - * I/O descriptors for __sfvwrite_r(). - */ -struct __siov { - _CONST _PTR iov_base; - size_t iov_len; -}; -struct __suio { - struct __siov *uio_iov; - int uio_iovcnt; - int uio_resid; -}; - - -extern int _EXFUN(__sfvwrite_r,(struct _reent *, FILE *, struct __suio *)); -extern int _EXFUN(__swsetup_r,(struct _reent *, FILE *)); diff --git a/newlib/libc/stdio/fwalk.c b/newlib/libc/stdio/fwalk.c deleted file mode 100644 index df92d1d81..000000000 --- a/newlib/libc/stdio/fwalk.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* No user fns here. Pesch 15apr92. */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> -#include "local.h" - -int -_DEFUN(_fwalk, (ptr, function), - struct _reent *ptr _AND - register int (*function) (FILE *)) -{ - register FILE *fp; - register int n, ret = 0; - register struct _glue *g; - - /* - * It should be safe to walk the list without locking it; - * new nodes are only added to the end and none are ever - * removed. - * - * Avoid locking this list while walking it or else you will - * introduce a potential deadlock in [at least] refill.c. - */ - for (g = &ptr->__sglue; g != NULL; g = g->_next) - for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++) - if (fp->_flags != 0) - { - if (fp->_flags != 0 && fp->_flags != 1 && fp->_file != -1) - ret |= (*function) (fp); - } - - return ret; -} - -/* Special version of __fwalk where the function pointer is a reentrant - I/O function (e.g. _fclose_r). */ -int -_DEFUN(_fwalk_reent, (ptr, reent_function), - struct _reent *ptr _AND - register int (*reent_function) (struct _reent *, FILE *)) -{ - register FILE *fp; - register int n, ret = 0; - register struct _glue *g; - - /* - * It should be safe to walk the list without locking it; - * new nodes are only added to the end and none are ever - * removed. - * - * Avoid locking this list while walking it or else you will - * introduce a potential deadlock in [at least] refill.c. - */ - for (g = &ptr->__sglue; g != NULL; g = g->_next) - for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++) - if (fp->_flags != 0) - { - if (fp->_flags != 0 && fp->_flags != 1 && fp->_file != -1) - ret |= (*reent_function) (ptr, fp); - } - - return ret; -} diff --git a/newlib/libc/stdio/fwide.c b/newlib/libc/stdio/fwide.c deleted file mode 100644 index e298f911a..000000000 --- a/newlib/libc/stdio/fwide.c +++ /dev/null @@ -1,89 +0,0 @@ -/* -FUNCTION -<<fwide>>---set and determine the orientation of a FILE stream - -INDEX - fwide -INDEX - _fwide_r - -ANSI_SYNOPSIS - #include <wchar.h> - int fwide(FILE *<[fp]>, int <[mode]>) - - int _fwide_r(struct _reent *<[ptr]>, FILE *<[fp]>, int <[mode]>) - -TRAD_SYNOPSIS - #include <wchar.h> - int fwide(<[fp]>, <[mode]>) - FILE *<[fp]>; - int <[mode]>; - - int _fwide_r(<[ptr]>, <[fp]>, <[mode]>) - struct _reent *<[ptr]>; - FILE *<[fp]>; - int <[mode]>; - -DESCRIPTION -When <[mode]> is zero, the <<fwide>> function determines the current -orientation of <[fp]>. It returns a value > 0 if <[fp]> is -wide-character oriented, i.e. if wide character I/O is permitted but -char I/O is disallowed. It returns a value < 0 if <[fp]> is byte -oriented, i.e. if char I/O is permitted but wide character I/O is -disallowed. It returns zero if <[fp]> has no orientation yet; in -this case the next I/O operation might change the orientation (to byte -oriented if it is a char I/O operation, or to wide-character oriented -if it is a wide character I/O operation). - -Once a stream has an orientation, it cannot be changed and persists -until the stream is closed, unless the stream is re-opened with freopen, -which removes the orientation of the stream. - -When <[mode]> is non-zero, the <<fwide>> function first attempts to set -<[fp]>'s orientation (to wide-character oriented if <[mode]> > 0, or to -byte oriented if <[mode]> < 0). It then returns a value denoting the -current orientation, as above. - -RETURNS -The <<fwide>> function returns <[fp]>'s orientation, after possibly -changing it. A return value > 0 means wide-character oriented. A return -value < 0 means byte oriented. A return value of zero means undecided. - -PORTABILITY -C99, POSIX.1-2001. - -*/ - -#include <_ansi.h> -#include <wchar.h> -#include "local.h" - -int -_DEFUN(_fwide_r, (ptr, fp, mode), - struct _reent *ptr _AND - FILE *fp _AND - int mode) -{ - int ret; - - CHECK_INIT(ptr, fp); - - _flockfile (fp); - if (mode != 0) { - ORIENT (fp, mode); - } - if (!(fp->_flags & __SORD)) - ret = 0; - else - ret = (fp->_flags2 & __SWID) ? 1 : -1; - _funlockfile (fp); - return ret; -} - -int -_DEFUN(fwide, (fp, mode), - FILE *fp _AND - int mode) -{ - return _fwide_r (_REENT, fp, mode); -} diff --git a/newlib/libc/stdio/fwprintf.c b/newlib/libc/stdio/fwprintf.c deleted file mode 100644 index 76065e965..000000000 --- a/newlib/libc/stdio/fwprintf.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* doc in swprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <wchar.h> -#include <stdarg.h> - -int -_DEFUN(_fwprintf_r, (ptr, fp, fmt), - struct _reent *ptr _AND - FILE *fp _AND - const wchar_t *fmt _DOTS) -{ - int ret; - va_list ap; - - va_start (ap, fmt); - ret = _vfwprintf_r (ptr, fp, fmt, ap); - va_end (ap); - return ret; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(fwprintf, (fp, fmt), - FILE *fp _AND - const wchar_t *fmt _DOTS) -{ - int ret; - va_list ap; - - va_start (ap, fmt); - ret = _vfwprintf_r (_REENT, fp, fmt, ap); - va_end (ap); - return ret; -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/fwrite.c b/newlib/libc/stdio/fwrite.c deleted file mode 100644 index ce77c8dc1..000000000 --- a/newlib/libc/stdio/fwrite.c +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<fwrite>>---write array elements - -INDEX - fwrite -INDEX - _fwrite_r - -ANSI_SYNOPSIS - #include <stdio.h> - size_t fwrite(const void *<[buf]>, size_t <[size]>, - size_t <[count]>, FILE *<[fp]>); - - #include <stdio.h> - size_t _fwrite_r(struct _reent *<[ptr]>, const void *<[buf]>, size_t <[size]>, - size_t <[count]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - size_t fwrite(<[buf]>, <[size]>, <[count]>, <[fp]>) - char *<[buf]>; - size_t <[size]>; - size_t <[count]>; - FILE *<[fp]>; - - #include <stdio.h> - size_t _fwrite_r(<[ptr]>, <[buf]>, <[size]>, <[count]>, <[fp]>) - struct _reent *<[ptr]>; - char *<[buf]>; - size_t <[size]>; - size_t <[count]>; - FILE *<[fp]>; - -DESCRIPTION -<<fwrite>> attempts to copy, starting from the memory location -<[buf]>, <[count]> elements (each of size <[size]>) into the file or -stream identified by <[fp]>. <<fwrite>> may copy fewer elements than -<[count]> if an error intervenes. - -<<fwrite>> also advances the file position indicator (if any) for -<[fp]> by the number of @emph{characters} actually written. - -<<_fwrite_r>> is simply the reentrant version of <<fwrite>> that -takes an additional reentrant structure argument: <[ptr]>. - -RETURNS -If <<fwrite>> succeeds in writing all the elements you specify, the -result is the same as the argument <[count]>. In any event, the -result is the number of complete elements that <<fwrite>> copied to -the file. - -PORTABILITY -ANSI C requires <<fwrite>>. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <stdio.h> -#include <string.h> -#if 0 -#include <sys/stdc.h> -#endif -#include "local.h" -#if 1 -#include "fvwrite.h" -#endif - -/* - * Write `count' objects (each size `size') from memory to the given file. - * Return the number of whole objects written. - */ - -size_t -_DEFUN(_fwrite_r, (ptr, buf, size, count, fp), - struct _reent * ptr _AND - _CONST _PTR buf _AND - size_t size _AND - size_t count _AND - FILE * fp) -{ - size_t n; - struct __suio uio; - struct __siov iov; - - iov.iov_base = buf; - uio.uio_resid = iov.iov_len = n = count * size; - uio.uio_iov = &iov; - uio.uio_iovcnt = 1; - - /* - * The usual case is success (__sfvwrite_r returns 0); - * skip the divide if this happens, since divides are - * generally slow and since this occurs whenever size==0. - */ - - CHECK_INIT(ptr, fp); - - _flockfile (fp); - ORIENT (fp, -1); - if (__sfvwrite_r (ptr, fp, &uio) == 0) - { - _funlockfile (fp); - return count; - } - _funlockfile (fp); - return (n - uio.uio_resid) / size; -} - -#ifndef _REENT_ONLY -size_t -_DEFUN(fwrite, (buf, size, count, fp), - _CONST _PTR buf _AND - size_t size _AND - size_t count _AND - FILE * fp) -{ - return _fwrite_r (_REENT, buf, size, count, fp); -} -#endif diff --git a/newlib/libc/stdio/fwscanf.c b/newlib/libc/stdio/fwscanf.c deleted file mode 100644 index f013cb8f9..000000000 --- a/newlib/libc/stdio/fwscanf.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <wchar.h> -#include <stdarg.h> -#include "local.h" - -#ifndef _REENT_ONLY - -int -fwscanf (FILE *fp, _CONST wchar_t *fmt, ...) -{ - int ret; - va_list ap; - - va_start (ap, fmt); - ret = _vfwscanf_r (_REENT, fp, fmt, ap); - va_end (ap); - return ret; -} - -#endif /* !_REENT_ONLY */ - -int -_fwscanf_r (struct _reent *ptr, FILE *fp, _CONST wchar_t *fmt, ...) -{ - int ret; - va_list ap; - - va_start (ap, fmt); - ret = _vfwscanf_r (ptr, fp, fmt, ap); - va_end (ap); - return (ret); -} - diff --git a/newlib/libc/stdio/getc.c b/newlib/libc/stdio/getc.c deleted file mode 100644 index 5b1fa888a..000000000 --- a/newlib/libc/stdio/getc.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<getc>>---read a character (macro) - -INDEX - getc -INDEX - _getc_r - -ANSI_SYNOPSIS - #include <stdio.h> - int getc(FILE *<[fp]>); - - #include <stdio.h> - int _getc_r(struct _reent *<[ptr]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int getc(<[fp]>) - FILE *<[fp]>; - - #include <stdio.h> - int _getc_r(<[ptr]>, <[fp]>) - struct _reent *<[ptr]>; - FILE *<[fp]>; - -DESCRIPTION -<<getc>> is a macro, defined in <<stdio.h>>. You can use <<getc>> -to get the next single character from the file or stream -identified by <[fp]>. As a side effect, <<getc>> advances the file's -current position indicator. - -For a subroutine version of this macro, see <<fgetc>>. - -The <<_getc_r>> function is simply the reentrant version of <<getc>> -which passes an additional reentrancy structure pointer argument: <[ptr]>. - -RETURNS -The next character (read as an <<unsigned char>>, and cast to -<<int>>), unless there is no more data, or the host system reports a -read error; in either of these situations, <<getc>> returns <<EOF>>. - -You can distinguish the two situations that cause an <<EOF>> result by -using the <<ferror>> and <<feof>> functions. - -PORTABILITY -ANSI C requires <<getc>>; it suggests, but does not require, that -<<getc>> be implemented as a macro. The standard explicitly permits -macro implementations of <<getc>> to use the argument more than once; -therefore, in a portable program, you should not use an expression -with side effects as the <<getc>> argument. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <stdio.h> -#include "local.h" - -/* - * A subroutine version of the macro getc. - */ - -#undef getc - -int -_DEFUN(_getc_r, (ptr, fp), - struct _reent *ptr _AND - register FILE *fp) -{ - int result; - CHECK_INIT (ptr, fp); - _flockfile (fp); - result = __sgetc_r (ptr, fp); - _funlockfile (fp); - return result; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(getc, (fp), - register FILE *fp) -{ - int result; - CHECK_INIT (_REENT, fp); - _flockfile (fp); - result = __sgetc_r (_REENT, fp); - _funlockfile (fp); - return result; -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/getc_u.c b/newlib/libc/stdio/getc_u.c deleted file mode 100644 index 6b71ce52d..000000000 --- a/newlib/libc/stdio/getc_u.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<getc_unlocked>>---non-thread-safe version of getc (macro) - -INDEX - getc_unlocked -INDEX - _getc_unlocked_r - -SYNOPSIS - #include <stdio.h> - int getc_unlocked(FILE *<[fp]>); - - #include <stdio.h> - int _getc_unlocked_r(FILE *<[fp]>); - -DESCRIPTION -<<getc_unlocked>> is a non-thread-safe version of <<getc>> declared in -<<stdio.h>>. <<getc_unlocked>> may only safely be used within a scope -protected by flockfile() (or ftrylockfile()) and funlockfile(). These -functions may safely be used in a multi-threaded program if and only -if they are called while the invoking thread owns the ( FILE *) -object, as is the case after a successful call to the flockfile() or -ftrylockfile() functions. If threads are disabled, then -<<getc_unlocked>> is equivalent to <<getc>>. - -The <<_getc_unlocked_r>> function is simply the reentrant version of -<<get_unlocked>> which passes an additional reentrancy structure pointer -argument: <[ptr]>. - -RETURNS -See <<getc>>. - -PORTABILITY -POSIX 1003.1 requires <<getc_unlocked>>. <<getc_unlocked>> may be -implemented as a macro, so arguments should not have side-effects. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <stdio.h> - -/* - * A subroutine version of the macro getc_unlocked. - */ - -#undef getc_unlocked - -int -_DEFUN(_getc_unlocked_r, (ptr, fp), - struct _reent *ptr _AND - register FILE *fp) -{ - /* CHECK_INIT is called (eventually) by __srefill_r. */ - - return __sgetc_r (ptr, fp); -} - -#ifndef _REENT_ONLY - -int -_DEFUN(getc_unlocked, (fp), - register FILE *fp) -{ - return __sgetc_r (_REENT, fp); -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/getchar.c b/newlib/libc/stdio/getchar.c deleted file mode 100644 index da2f5dfaf..000000000 --- a/newlib/libc/stdio/getchar.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<getchar>>---read a character (macro) - -INDEX - getchar -INDEX - _getchar_r - -ANSI_SYNOPSIS - #include <stdio.h> - int getchar(void); - - int _getchar_r(struct _reent *<[reent]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int getchar(); - - int _getchar_r(<[reent]>) - char * <[reent]>; - -DESCRIPTION -<<getchar>> is a macro, defined in <<stdio.h>>. You can use <<getchar>> -to get the next single character from the standard input stream. -As a side effect, <<getchar>> advances the standard input's -current position indicator. - -The alternate function <<_getchar_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - - -RETURNS -The next character (read as an <<unsigned char>>, and cast to -<<int>>), unless there is no more data, or the host system reports a -read error; in either of these situations, <<getchar>> returns <<EOF>>. - -You can distinguish the two situations that cause an <<EOF>> result by -using `<<ferror(stdin)>>' and `<<feof(stdin)>>'. - -PORTABILITY -ANSI C requires <<getchar>>; it suggests, but does not require, that -<<getchar>> be implemented as a macro. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -/* - * A subroutine version of the macro getchar. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include "local.h" - -#undef getchar - -int -_DEFUN(_getchar_r, (reent), - struct _reent *reent) -{ - _REENT_SMALL_CHECK_INIT (reent); - return _getc_r (reent, _stdin_r (reent)); -} - -#ifndef _REENT_ONLY - -int -_DEFUN_VOID(getchar) -{ - /* CHECK_INIT is called (eventually) by __srefill_r. */ - _REENT_SMALL_CHECK_INIT (_REENT); - return _getc_r (_REENT, _stdin_r (_REENT)); -} - -#endif diff --git a/newlib/libc/stdio/getchar_u.c b/newlib/libc/stdio/getchar_u.c deleted file mode 100644 index 22254cbf5..000000000 --- a/newlib/libc/stdio/getchar_u.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<getchar_unlocked>>---non-thread-safe version of getchar (macro) - -INDEX - getchar_unlocked -INDEX - _getchar_unlocked_r - -SYNOPSIS - #include <stdio.h> - int getchar_unlocked(); - - #include <stdio.h> - int _getchar_unlocked_r(struct _reent *<[ptr]>); - -DESCRIPTION -<<getchar_unlocked>> is a non-thread-safe version of <<getchar>> -declared in <<stdio.h>>. <<getchar_unlocked>> may only safely be used -within a scope protected by flockfile() (or ftrylockfile()) and -funlockfile(). These functions may safely be used in a multi-threaded -program if and only if they are called while the invoking thread owns -the ( FILE *) object, as is the case after a successful call to the -flockfile() or ftrylockfile() functions. If threads are disabled, -then <<getchar_unlocked>> is equivalent to <<getchar>>. - -The <<_getchar_unlocked_r>> function is simply the reentrant version of -<<getchar_unlocked>> which passes an addtional reentrancy structure pointer -argument: <[ptr]>. - -RETURNS -See <<getchar>>. - -PORTABILITY -POSIX 1003.1 requires <<getchar_unlocked>>. <<getchar_unlocked>> may -be implemented as a macro. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -/* - * A subroutine version of the macro getchar_unlocked. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> - -#undef getchar_unlocked - -int -_DEFUN(_getchar_unlocked_r, (ptr), - struct _reent *ptr) -{ - return _getc_unlocked_r (ptr, _stdin_r (ptr)); -} - -#ifndef _REENT_ONLY - -int -_DEFUN_VOID(getchar_unlocked) -{ - /* CHECK_INIT is called (eventually) by __srefill_r. */ - - return _getc_unlocked_r (_REENT, _stdin_r (_REENT)); -} - -#endif diff --git a/newlib/libc/stdio/getdelim.c b/newlib/libc/stdio/getdelim.c deleted file mode 100644 index 23fc50218..000000000 --- a/newlib/libc/stdio/getdelim.c +++ /dev/null @@ -1,142 +0,0 @@ -/* Copyright 2002, Red Hat Inc. - all rights reserved */ -/* -FUNCTION -<<getdelim>>---read a line up to a specified line delimiter - -INDEX - getdelim - -ANSI_SYNOPSIS - #include <stdio.h> - int getdelim(char **<[bufptr]>, size_t *<[n]>, - int <[delim]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int getdelim(<[bufptr]>, <[n]>, <[delim]>, <[fp]>) - char **<[bufptr]>; - size_t *<[n]>; - int <[delim]>; - FILE *<[fp]>; - -DESCRIPTION -<<getdelim>> reads a file <[fp]> up to and possibly including a specified -delimiter <[delim]>. The line is read into a buffer pointed to -by <[bufptr]> and designated with size *<[n]>. If the buffer is -not large enough, it will be dynamically grown by <<getdelim>>. -As the buffer is grown, the pointer to the size <[n]> will be -updated. - -RETURNS -<<getdelim>> returns <<-1>> if no characters were successfully read; -otherwise, it returns the number of bytes successfully read. -At end of file, the result is nonzero. - -PORTABILITY -<<getdelim>> is a glibc extension. - -No supporting OS subroutines are directly required. -*/ - -#include <_ansi.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> -#include "local.h" - -#define MIN_LINE_SIZE 4 -#define DEFAULT_LINE_SIZE 128 - -ssize_t -_DEFUN(__getdelim, (bufptr, n, delim, fp), - char **bufptr _AND - size_t *n _AND - int delim _AND - FILE *fp) -{ - char *buf; - char *ptr; - size_t newsize, numbytes; - int pos; - int ch; - int cont; - - if (fp == NULL || bufptr == NULL || n == NULL) - { - errno = EINVAL; - return -1; - } - - buf = *bufptr; - if (buf == NULL || *n < MIN_LINE_SIZE) - { - buf = (char *)realloc (*bufptr, DEFAULT_LINE_SIZE); - if (buf == NULL) - { - return -1; - } - *bufptr = buf; - *n = DEFAULT_LINE_SIZE; - } - - CHECK_INIT (_REENT, fp); - - _flockfile (fp); - - numbytes = *n; - ptr = buf; - - cont = 1; - - while (cont) - { - /* fill buffer - leaving room for nul-terminator */ - while (--numbytes > 0) - { - if ((ch = getc_unlocked (fp)) == EOF) - { - cont = 0; - break; - } - else - { - *ptr++ = ch; - if (ch == delim) - { - cont = 0; - break; - } - } - } - - if (cont) - { - /* Buffer is too small so reallocate a larger buffer. */ - pos = ptr - buf; - newsize = (*n << 1); - buf = realloc (buf, newsize); - if (buf == NULL) - { - cont = 0; - break; - } - - /* After reallocating, continue in new buffer */ - *bufptr = buf; - *n = newsize; - ptr = buf + pos; - numbytes = newsize - pos; - } - } - - _funlockfile (fp); - - /* if no input data, return failure */ - if (ptr == buf) - return -1; - - /* otherwise, nul-terminate and return number of bytes read */ - *ptr = '\0'; - return (ssize_t)(ptr - buf); -} - diff --git a/newlib/libc/stdio/getline.c b/newlib/libc/stdio/getline.c deleted file mode 100644 index c758ae964..000000000 --- a/newlib/libc/stdio/getline.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright 2002, Red Hat Inc. - all rights reserved */ -/* -FUNCTION -<<getline>>---read a line from a file - -INDEX - getline - -ANSI_SYNOPSIS - #include <stdio.h> - ssize_t getline(char **<[bufptr]>, size_t *<[n]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - ssize_t getline(<[bufptr]>, <[n]>, <[fp]>) - char **<[bufptr]>; - size_t *<[n]>; - FILE *<[fp]>; - -DESCRIPTION -<<getline>> reads a file <[fp]> up to and possibly including the -newline character. The line is read into a buffer pointed to -by <[bufptr]> and designated with size *<[n]>. If the buffer is -not large enough, it will be dynamically grown by <<getdelim>>. -As the buffer is grown, the pointer to the size <[n]> will be -updated. - -<<getline>> is equivalent to getdelim(bufptr, n, '\n', fp); - -RETURNS -<<getline>> returns <<-1>> if no characters were successfully read, -otherwise, it returns the number of bytes successfully read. -at end of file, the result is nonzero. - -PORTABILITY -<<getline>> is a glibc extension. - -No supporting OS subroutines are directly required. -*/ - -#include <_ansi.h> -#include <stdio.h> - -extern ssize_t _EXFUN(__getdelim, (char **, size_t *, int, FILE *)); - -ssize_t -_DEFUN(__getline, (lptr, n, fp), - char **lptr _AND - size_t *n _AND - FILE *fp) -{ - return __getdelim (lptr, n, '\n', fp); -} - diff --git a/newlib/libc/stdio/gets.c b/newlib/libc/stdio/gets.c deleted file mode 100644 index 17d144316..000000000 --- a/newlib/libc/stdio/gets.c +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<gets>>---get character string (obsolete, use <<fgets>> instead) - -INDEX - gets -INDEX - _gets_r - -ANSI_SYNOPSIS - #include <stdio.h> - - char *gets(char *<[buf]>); - - char *_gets_r(struct _reent *<[reent]>, char *<[buf]>); - -TRAD_SYNOPSIS - #include <stdio.h> - - char *gets(<[buf]>) - char *<[buf]>; - - char *_gets_r(<[reent]>, <[buf]>) - struct _reent *<[reent]>; - char *<[buf]>; - -DESCRIPTION - Reads characters from standard input until a newline is found. - The characters up to the newline are stored in <[buf]>. The - newline is discarded, and the buffer is terminated with a 0. - - This is a @emph{dangerous} function, as it has no way of checking - the amount of space available in <[buf]>. One of the attacks - used by the Internet Worm of 1988 used this to overrun a - buffer allocated on the stack of the finger daemon and - overwrite the return address, causing the daemon to execute - code downloaded into it over the connection. - - The alternate function <<_gets_r>> is a reentrant version. The extra - argument <[reent]> is a pointer to a reentrancy structure. - - -RETURNS - <<gets>> returns the buffer passed to it, with the data filled - in. If end of file occurs with some data already accumulated, - the data is returned with no other indication. If end of file - occurs with no data in the buffer, NULL is returned. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> - -char * -_DEFUN(_gets_r, (ptr, buf), - struct _reent *ptr _AND - char *buf) -{ - register int c; - register char *s = buf; - - _flockfile (stdin); - while ((c = __sgetc_r (ptr, stdin)) != '\n') - if (c == EOF) - if (s == buf) - { - _funlockfile (stdin); - return NULL; - } - else - break; - else - *s++ = c; - *s = 0; - _funlockfile (stdin); - return buf; -} - -#ifndef _REENT_ONLY - -char * -_DEFUN(gets, (buf), - char *buf) -{ - return _gets_r (_REENT, buf); -} - -#endif diff --git a/newlib/libc/stdio/getw.c b/newlib/libc/stdio/getw.c deleted file mode 100644 index 210c5939a..000000000 --- a/newlib/libc/stdio/getw.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<getw>>---read a word (int) - -INDEX - getw - -ANSI_SYNOPSIS - #include <stdio.h> - int getw(FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int getw(<[fp]>) - FILE *<[fp]>; - -DESCRIPTION -<<getw>> is a function, defined in <<stdio.h>>. You can use <<getw>> -to get the next word from the file or stream identified by <[fp]>. As -a side effect, <<getw>> advances the file's current position -indicator. - -RETURNS -The next word (read as an <<int>>), unless there is no more -data or the host system reports a read error; in either of these -situations, <<getw>> returns <<EOF>>. Since <<EOF>> is a valid -<<int>>, you must use <<ferror>> or <<feof>> to distinguish these -situations. - -PORTABILITY -<<getw>> is a remnant of K&R C; it is not part of any ISO C Standard. -<<fread>> should be used instead. In fact, this implementation of -<<getw>> is based upon <<fread>>. - -Supporting OS subroutines required: <<fread>>. */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <stdio.h> - -int -_DEFUN(getw, (fp), - register FILE *fp) -{ - int result; - if (fread ((char*)&result, sizeof (result), 1, fp) != 1) - return EOF; - return result; -} diff --git a/newlib/libc/stdio/getwc.c b/newlib/libc/stdio/getwc.c deleted file mode 100644 index 6d88fa869..000000000 --- a/newlib/libc/stdio/getwc.c +++ /dev/null @@ -1,52 +0,0 @@ -/*- - * Copyright (c) 2002 Tim J. Robbins. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <wchar.h> -#include "local.h" - -#undef getwc - -wint_t -_DEFUN(_getwc_r, (ptr, fp), - struct _reent *ptr _AND - FILE *fp) -{ - return _fgetwc_r (ptr, fp); -} - -/* - * Synonym for fgetwc(). The only difference is that getwc(), if it is a - * macro, may evaluate `fp' more than once. - */ -wint_t -_DEFUN(getwc, (fp), - FILE *fp) -{ - return fgetwc(fp); -} diff --git a/newlib/libc/stdio/getwchar.c b/newlib/libc/stdio/getwchar.c deleted file mode 100644 index f559c7677..000000000 --- a/newlib/libc/stdio/getwchar.c +++ /dev/null @@ -1,93 +0,0 @@ -/*- - * Copyright (c) 2002 Tim J. Robbins. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* -FUNCTION -<<getwchar>>---read a wide character from standard input - -INDEX - getwchar -INDEX - _getwchar_r - -ANSI_SYNOPSIS - #include <wchar.h> - wint_t getwchar(void); - - wint_t _getwchar_r(struct _reent *<[reent]>); - -TRAD_SYNOPSIS - #include <wchar.h> - wint_t getwchar(); - - wint_t _getwchar_r(<[reent]>) - char * <[reent]>; - -DESCRIPTION -<<getwchar>> function or macro is the wide character equivalent of -the <<getchar>> function. You can use <<getwchar>> to get the next -wide character from the standard input stream. As a side effect, -<<getwchar>> advances the standard input's current position indicator. - -The alternate function <<_getwchar_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -The next wide character cast to <<wint_t>>, unless there is no more -data, or the host system reports a read error; in either of these -situations, <<getwchar>> returns <<WEOF>>. - -You can distinguish the two situations that cause an <<WEOF>> result by -using `<<ferror(stdin)>>' and `<<feof(stdin)>>'. - -PORTABILITY -C99 -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <wchar.h> -#include "local.h" - -#undef getwchar - -wint_t -_DEFUN (_getwchar_r, (ptr), - struct _reent *ptr) -{ - return _fgetwc_r (ptr, stdin); -} - -/* - * Synonym for fgetwc(stdin). - */ -wint_t -_DEFUN_VOID (getwchar) -{ - _REENT_SMALL_CHECK_INIT (_REENT); - return fgetwc (stdin); -} diff --git a/newlib/libc/stdio/iprintf.c b/newlib/libc/stdio/iprintf.c deleted file mode 100644 index c55f7ce17..000000000 --- a/newlib/libc/stdio/iprintf.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* doc in siprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdarg.h> -#include "local.h" - -#ifndef _REENT_ONLY - -int -_DEFUN(iprintf, (fmt), - const char *fmt _DOTS) -{ - int ret; - va_list ap; - struct _reent *ptr = _REENT; - - _REENT_SMALL_CHECK_INIT (ptr); - va_start (ap, fmt); - ret = _vfiprintf_r (ptr, _stdout_r (ptr), fmt, ap); - va_end (ap); - return ret; -} - -#endif /* ! _REENT_ONLY */ - -int -_DEFUN(_iprintf_r, (ptr, fmt), - struct _reent *ptr _AND - const char *fmt _DOTS) -{ - int ret; - va_list ap; - - _REENT_SMALL_CHECK_INIT (ptr); - va_start (ap, fmt); - ret = _vfiprintf_r (ptr, _stdout_r (ptr), fmt, ap); - va_end (ap); - return ret; -} diff --git a/newlib/libc/stdio/iscanf.c b/newlib/libc/stdio/iscanf.c deleted file mode 100644 index f35acd2ed..000000000 --- a/newlib/libc/stdio/iscanf.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include "local.h" - -#ifndef _REENT_ONLY - -int -#ifdef _HAVE_STDC -iscanf(_CONST char *fmt, ...) -#else -iscanf(fmt, va_alist) - char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - - _REENT_SMALL_CHECK_INIT (_REENT); -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = __svfiscanf_r (_REENT, _stdin_r (_REENT), fmt, ap); - va_end (ap); - return ret; -} - -#endif /* !_REENT_ONLY */ - -int -#ifdef _HAVE_STDC -_iscanf_r(struct _reent *ptr, _CONST char *fmt, ...) -#else -_iscanf_r(ptr, fmt, va_alist) - struct _reent *ptr; - char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - - _REENT_SMALL_CHECK_INIT (ptr); -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = __svfiscanf_r (ptr, _stdin_r (ptr), fmt, ap); - va_end (ap); - return (ret); -} - diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h deleted file mode 100644 index 187f7d858..000000000 --- a/newlib/libc/stdio/local.h +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Copyright (c) 1990, 2007 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * %W% (UofMD/Berkeley) %G% - */ - -/* - * Information local to this implementation of stdio, - * in particular, macros and private variables. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdarg.h> -#include <stdlib.h> -#include <unistd.h> -#include <stdio.h> -#ifdef __SCLE -# include <io.h> -#endif - - -extern u_char *_EXFUN(__sccl, (char *, u_char *fmt)); -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)); -extern int _EXFUN(__svfwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,va_list)); -extern int _EXFUN(__ssvfwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,va_list)); -extern int _EXFUN(__svfiwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,va_list)); -extern int _EXFUN(__ssvfiwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,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)))); -int _EXFUN(_svfwprintf_r,(struct _reent *, FILE *, const wchar_t *, - va_list)); -int _EXFUN(_svfiwprintf_r,(struct _reent *, FILE *, const wchar_t *, - va_list)); -extern FILE *_EXFUN(__sfp,(struct _reent *)); -extern int _EXFUN(__sflags,(struct _reent *,_CONST char*, int*)); -extern int _EXFUN(__sflush_r,(struct _reent *,FILE *)); -extern int _EXFUN(__srefill_r,(struct _reent *,FILE *)); -extern _READ_WRITE_RETURN_TYPE _EXFUN(__sread,(struct _reent *, void *, char *, - int)); -extern _READ_WRITE_RETURN_TYPE _EXFUN(__seofread,(struct _reent *, void *, - char *, int)); -extern _READ_WRITE_RETURN_TYPE _EXFUN(__swrite,(struct _reent *, void *, - const char *, int)); -extern _fpos_t _EXFUN(__sseek,(struct _reent *, void *, _fpos_t, int)); -extern int _EXFUN(__sclose,(struct _reent *, void *)); -extern int _EXFUN(__stextmode,(int)); -extern _VOID _EXFUN(__sinit,(struct _reent *)); -extern _VOID _EXFUN(_cleanup_r,(struct _reent *)); -extern _VOID _EXFUN(__smakebuf_r,(struct _reent *, FILE *)); -extern int _EXFUN(_fwalk,(struct _reent *, int (*)(FILE *))); -extern int _EXFUN(_fwalk_reent,(struct _reent *, int (*)(struct _reent *, FILE *))); -struct _glue * _EXFUN(__sfmoreglue,(struct _reent *,int n)); -extern int _EXFUN(__submore, (struct _reent *, FILE *)); - -#ifdef __LARGE64_FILES -extern _fpos64_t _EXFUN(__sseek64,(struct _reent *, void *, _fpos64_t, int)); -extern _READ_WRITE_RETURN_TYPE _EXFUN(__swrite64,(struct _reent *, void *, - const char *, int)); -#endif - -/* Called by the main entry point fns to ensure stdio has been initialized. */ - -#ifdef _REENT_SMALL -#define CHECK_INIT(ptr, fp) \ - do \ - { \ - if ((ptr) && !(ptr)->__sdidinit) \ - __sinit (ptr); \ - if ((fp) == (FILE *)&__sf_fake_stdin) \ - (fp) = _stdin_r(ptr); \ - else if ((fp) == (FILE *)&__sf_fake_stdout) \ - (fp) = _stdout_r(ptr); \ - else if ((fp) == (FILE *)&__sf_fake_stderr) \ - (fp) = _stderr_r(ptr); \ - } \ - while (0) -#else /* !_REENT_SMALL */ -#define CHECK_INIT(ptr, fp) \ - do \ - { \ - if ((ptr) && !(ptr)->__sdidinit) \ - __sinit (ptr); \ - } \ - while (0) -#endif /* !_REENT_SMALL */ - -#define CHECK_STD_INIT(ptr) \ - do \ - { \ - if ((ptr) && !(ptr)->__sdidinit) \ - __sinit (ptr); \ - } \ - while (0) - -/* Return true and set errno and stream error flag iff the given FILE - cannot be written now. */ - -#define cantwrite(ptr, fp) \ - ((((fp)->_flags & __SWR) == 0 || (fp)->_bf._base == NULL) && \ - __swsetup_r(ptr, fp)) - -/* Test whether the given stdio file has an active ungetc buffer; - release such a buffer, without restoring ordinary unread data. */ - -#define HASUB(fp) ((fp)->_ub._base != NULL) -#define FREEUB(ptr, fp) { \ - if ((fp)->_ub._base != (fp)->_ubuf) \ - _free_r(ptr, (char *)(fp)->_ub._base); \ - (fp)->_ub._base = NULL; \ -} - -/* Test for an fgetline() buffer. */ - -#define HASLB(fp) ((fp)->_lb._base != NULL) -#define FREELB(ptr, fp) { _free_r(ptr,(char *)(fp)->_lb._base); \ - (fp)->_lb._base = NULL; } - -/* - * Set the orientation for a stream. If o > 0, the stream has wide- - * orientation. If o < 0, the stream has byte-orientation. - */ -#define ORIENT(fp,ori) \ - do \ - { \ - if (!((fp)->_flags & __SORD)) \ - { \ - (fp)->_flags |= __SORD; \ - if (ori > 0) \ - (fp)->_flags2 |= __SWID; \ - else \ - (fp)->_flags2 &= ~__SWID; \ - } \ - } \ - while (0) - -/* WARNING: _dcvt is defined in the stdlib directory, not here! */ - -char *_EXFUN(_dcvt,(struct _reent *, char *, double, int, int, char, int)); -char *_EXFUN(_sicvt,(char *, short, char)); -char *_EXFUN(_icvt,(char *, int, char)); -char *_EXFUN(_licvt,(char *, long, char)); -#ifdef __GNUC__ -char *_EXFUN(_llicvt,(char *, long long, char)); -#endif - -#define CVT_BUF_SIZE 128 - -#define NDYNAMIC 4 /* add four more whenever necessary */ - -#ifdef __SINGLE_THREAD__ -#define __sfp_lock_acquire() -#define __sfp_lock_release() -#define __sinit_lock_acquire() -#define __sinit_lock_release() -#else -_VOID _EXFUN(__sfp_lock_acquire,(_VOID)); -_VOID _EXFUN(__sfp_lock_release,(_VOID)); -_VOID _EXFUN(__sinit_lock_acquire,(_VOID)); -_VOID _EXFUN(__sinit_lock_release,(_VOID)); -#endif - -/* Types used in positional argument support in vfprinf/vfwprintf. - The implementation is char/wchar_t dependent but the class and state - tables are only defined once in vfprintf.c. */ -typedef enum { - ZERO, /* '0' */ - DIGIT, /* '1-9' */ - DOLLAR, /* '$' */ - MODFR, /* spec modifier */ - SPEC, /* format specifier */ - DOT, /* '.' */ - STAR, /* '*' */ - FLAG, /* format flag */ - OTHER, /* all other chars */ - MAX_CH_CLASS /* place-holder */ -} __CH_CLASS; - -typedef enum { - START, /* start */ - SFLAG, /* seen a flag */ - WDIG, /* seen digits in width area */ - WIDTH, /* processed width */ - SMOD, /* seen spec modifier */ - 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 */ -} __STATE; - -typedef enum { - NOOP, /* do nothing */ - NUMBER, /* build a number from digits */ - SKIPNUM, /* skip over digits */ - GETMOD, /* get and process format modifier */ - GETARG, /* get and process argument */ - GETPW, /* get variable precision or width */ - GETPWB, /* get variable precision or width and pushback fmt char */ - GETPOS, /* get positional parameter value */ - PWPOS, /* get positional parameter value for variable width or precision */ -} __ACTION; - -extern _CONST __CH_CLASS __chclass[256]; -extern _CONST __STATE __state_table[MAX_STATE][MAX_CH_CLASS]; -extern _CONST __ACTION __action_table[MAX_STATE][MAX_CH_CLASS]; diff --git a/newlib/libc/stdio/makebuf.c b/newlib/libc/stdio/makebuf.c deleted file mode 100644 index a3f47e2f7..000000000 --- a/newlib/libc/stdio/makebuf.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 1990, 2007 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* No user fns here. Pesch 15apr92. */ - -#include <_ansi.h> -#include <stdio.h> -#include <stdlib.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <sys/unistd.h> -#include "local.h" - -#define _DEFAULT_ASPRINTF_BUFSIZE 64 - -/* - * Allocate a file buffer, or switch to unbuffered I/O. - * Per the ANSI C standard, ALL tty devices default to line buffered. - * - * As a side effect, we set __SOPT or __SNPT (en/dis-able fseek - * optimization) right after the _fstat() that finds the buffer size. - */ - -_VOID -_DEFUN(__smakebuf_r, (ptr, fp), - struct _reent *ptr _AND - register FILE *fp) -{ - register size_t size, couldbetty; - register _PTR p; -#ifdef __USE_INTERNAL_STAT64 - struct stat64 st; -#else - struct stat st; -#endif - - if (fp->_flags & __SNBF) - { - fp->_bf._base = fp->_p = fp->_nbuf; - fp->_bf._size = 1; - return; - } -#ifdef __USE_INTERNAL_STAT64 - if (fp->_file < 0 || _fstat64_r (ptr, fp->_file, &st) < 0) -#else - if (fp->_file < 0 || _fstat_r (ptr, fp->_file, &st) < 0) -#endif - { - couldbetty = 0; - /* Check if we are be called by asprintf family for initial buffer. */ - if (fp->_flags & __SMBF) - size = _DEFAULT_ASPRINTF_BUFSIZE; - else - size = BUFSIZ; - /* do not try to optimise fseek() */ - fp->_flags |= __SNPT; - } - else - { - couldbetty = (st.st_mode & S_IFMT) == S_IFCHR; -#ifdef HAVE_BLKSIZE - size = st.st_blksize <= 0 ? BUFSIZ : st.st_blksize; -#else - size = BUFSIZ; -#endif - /* - * Optimize fseek() only if it is a regular file. - * (The test for __sseek is mainly paranoia.) - */ - if ((st.st_mode & S_IFMT) == S_IFREG && fp->_seek == __sseek) - { - fp->_flags |= __SOPT; -#ifdef HAVE_BLKSIZE - fp->_blksize = st.st_blksize; -#else - fp->_blksize = 1024; -#endif - } - else - fp->_flags |= __SNPT; - } - if ((p = _malloc_r (ptr, size)) == NULL) - { - if (!(fp->_flags & __SSTR)) - { - fp->_flags |= __SNBF; - fp->_bf._base = fp->_p = fp->_nbuf; - fp->_bf._size = 1; - } - } - else - { - ptr->__cleanup = _cleanup_r; - fp->_flags |= __SMBF; - fp->_bf._base = fp->_p = (unsigned char *) p; - fp->_bf._size = size; - if (couldbetty && _isatty_r (ptr, fp->_file)) - fp->_flags |= __SLBF; - } -} diff --git a/newlib/libc/stdio/mktemp.c b/newlib/libc/stdio/mktemp.c deleted file mode 100644 index 1c5d76db4..000000000 --- a/newlib/libc/stdio/mktemp.c +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Copyright (c) 1987 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that: (1) source distributions retain this entire copyright - * notice and comment, and (2) distributions including binaries display - * the following acknowledgement: ``This product includes software - * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* This is file MKTEMP.C */ -/* This file may have been modified by DJ Delorie (Jan 1991). If so, -** these modifications are Copyright (C) 1991 DJ Delorie. -*/ - -/* -FUNCTION -<<mktemp>>, <<mkstemp>>, <<mkostemp>>, <<mkstemps>>, -<<mkostemps>>---generate unused file name -<<mkdtemp>>---generate unused directory - -INDEX - mktemp -INDEX - mkdtemp -INDEX - mkstemp -INDEX - mkstemps -INDEX - mkostemp -INDEX - mkostemps -INDEX - _mktemp_r -INDEX - _mkdtemp_r -INDEX - _mkstemp_r -INDEX - _mkstemps_r -INDEX - _mkostemp_r -INDEX - _mkostemps_r - -ANSI_SYNOPSIS - #include <stdlib.h> - char *mktemp(char *<[path]>); - char *mkdtemp(char *<[path]>); - int mkstemp(char *<[path]>); - int mkstemps(char *<[path]>, int <[suffixlen]>); - int mkostemp(char *<[path]>, int <[flags]>); - int mkostemps(char *<[path]>, int <[suffixlen]>, int <[flags]>); - - char *_mktemp_r(struct _reent *<[reent]>, char *<[path]>); - char *_mkdtemp_r(struct _reent *<[reent]>, char *<[path]>); - int *_mkstemp_r(struct _reent *<[reent]>, char *<[path]>); - int *_mkstemps_r(struct _reent *<[reent]>, char *<[path]>, int <[len]>); - int *_mkostemp_r(struct _reent *<[reent]>, char *<[path]>, - int <[flags]>); - int *_mkostemps_r(struct _reent *<[reent]>, char *<[path]>, int <[len]>, - int <[flags]>); - -DESCRIPTION -<<mktemp>>, <<mkstemp>>, and <<mkstemps>> attempt to generate a file name -that is not yet in use for any existing file. <<mkstemp>> and <<mkstemps>> -create the file and open it for reading and writing; <<mktemp>> simply -generates the file name (making <<mktemp>> a security risk). <<mkostemp>> -and <<mkostemps>> allow the addition of other <<open>> flags, such -as <<O_CLOEXEC>>, <<O_APPEND>>, or <<O_SYNC>>. On platforms with a -separate text mode, <<mkstemp>> forces <<O_BINARY>>, while <<mkostemp>> -allows the choice between <<O_BINARY>>, <<O_TEXT>>, or 0 for default. -<<mkdtemp>> attempts to create a directory instead of a file, with a -permissions mask of 0700. - -You supply a simple pattern for the generated file name, as the string -at <[path]>. The pattern should be a valid filename (including path -information if you wish) ending with at least six `<<X>>' -characters. The generated filename will match the leading part of the -name you supply, with the trailing `<<X>>' characters replaced by some -combination of digits and letters. With <<mkstemps>>, the `<<X>>' -characters end <[suffixlen]> bytes before the end of the string. - -The alternate functions <<_mktemp_r>>, <<_mkdtemp_r>>, <<_mkstemp_r>>, -<<_mkostemp_r>>, <<_mkostemps_r>>, and <<_mkstemps_r>> are reentrant -versions. The extra argument <[reent]> is a pointer to a reentrancy -structure. - -RETURNS -<<mktemp>> returns the pointer <[path]> to the modified string -representing an unused filename, unless it could not generate one, or -the pattern you provided is not suitable for a filename; in that case, -it returns <<NULL>>. Be aware that there is an inherent race between -generating the name and attempting to create a file by that name; -you are advised to use <<O_EXCL|O_CREAT>>. - -<<mkdtemp>> returns the pointer <[path]> to the modified string if the -directory was created, otherwise it returns <<NULL>>. - -<<mkstemp>>, <<mkstemps>>, <<mkostemp>>, and <<mkostemps>> return a file -descriptor to the newly created file, unless it could not generate an -unused filename, or the pattern you provided is not suitable for a -filename; in that case, it returns <<-1>>. - -NOTES -Never use <<mktemp>>. The generated filenames are easy to guess and -there's a race between the test if the file exists and the creation -of the file. In combination this makes <<mktemp>> prone to attacks -and using it is a security risk. Whenever possible use <<mkstemp>> -instead. It doesn't suffer the race condition. - -PORTABILITY -ANSI C does not require either <<mktemp>> or <<mkstemp>>; the System -V Interface Definition requires <<mktemp>> as of Issue 2. POSIX 2001 -requires <<mkstemp>>, and POSIX 2008 requires <<mkdtemp>> while -deprecating <<mktemp>>. <<mkstemps>>, <<mkostemp>>, and <<mkostemps>> -are not standardized. - -Supporting OS subroutines required: <<getpid>>, <<mkdir>>, <<open>>, <<stat>>. -*/ - -#include <_ansi.h> -#include <stdlib.h> -#include <reent.h> -#include <sys/types.h> -#include <fcntl.h> -#include <sys/stat.h> -#include <errno.h> -#include <stdio.h> -#include <ctype.h> - -static int -_DEFUN(_gettemp, (ptr, path, doopen, domkdir, suffixlen, flags), - struct _reent *ptr _AND - char *path _AND - register int *doopen _AND - int domkdir _AND - size_t suffixlen _AND - int flags) -{ - register char *start, *trv; - char *end; -#ifdef __USE_INTERNAL_STAT64 - struct stat64 sbuf; -#else - struct stat sbuf; -#endif - unsigned int pid; - - pid = _getpid_r (ptr); - for (trv = path; *trv; ++trv) /* extra X's get set to 0's */ - continue; - if (trv - path < suffixlen) - { - ptr->_errno = EINVAL; - return 0; - } - trv -= suffixlen; - end = trv; - while (path < trv && *--trv == 'X') - { - *trv = (pid % 10) + '0'; - pid /= 10; - } - if (end - trv < 6) - { - ptr->_errno = EINVAL; - return 0; - } - - /* - * Check the target directory; if you have six X's and it - * doesn't exist this runs for a *very* long time. - */ - - for (start = trv + 1;; --trv) - { - if (trv <= path) - break; - if (*trv == '/') - { - *trv = '\0'; -#ifdef __USE_INTERNAL_STAT64 - if (_stat64_r (ptr, path, &sbuf)) -#else - if (_stat_r (ptr, path, &sbuf)) -#endif - return (0); - if (!(sbuf.st_mode & S_IFDIR)) - { - ptr->_errno = ENOTDIR; - return (0); - } - *trv = '/'; - break; - } - } - - for (;;) - { -#if !defined _ELIX_LEVEL || _ELIX_LEVEL >= 4 - if (domkdir) - { -#ifdef HAVE_MKDIR - if (_mkdir_r (ptr, path, 0700) == 0) - return 1; - if (ptr->_errno != EEXIST) - return 0; -#else /* !HAVE_MKDIR */ - ptr->_errno = ENOSYS; - return 0; -#endif /* !HAVE_MKDIR */ - } - else -#endif /* _ELIX_LEVEL */ - if (doopen) - { - if ((*doopen = _open_r (ptr, path, O_CREAT | O_EXCL | O_RDWR | flags, - 0600)) >= 0) - return 1; - if (ptr->_errno != EEXIST) - return 0; - } -#ifdef __USE_INTERNAL_STAT64 - else if (_stat64_r (ptr, path, &sbuf)) -#else - else if (_stat_r (ptr, path, &sbuf)) -#endif - return (ptr->_errno == ENOENT ? 1 : 0); - - /* tricky little algorithm for backward compatibility */ - for (trv = start;;) - { - if (trv == end) - return 0; - if (*trv == 'z') - *trv++ = 'a'; - else - { - /* Safe, since it only encounters 7-bit characters. */ - if (isdigit (*trv)) - *trv = 'a'; - else - ++ * trv; - break; - } - } - } - /*NOTREACHED*/ -} - -#ifndef O_BINARY -# define O_BINARY 0 -#endif - -int -_DEFUN(_mkstemp_r, (ptr, path), - struct _reent *ptr _AND - char *path) -{ - int fd; - - return (_gettemp (ptr, path, &fd, 0, 0, O_BINARY) ? fd : -1); -} - -#if !defined _ELIX_LEVEL || _ELIX_LEVEL >= 4 -char * -_DEFUN(_mkdtemp_r, (ptr, path), - struct _reent *ptr _AND - char *path) -{ - return (_gettemp (ptr, path, (int *) NULL, 1, 0, 0) ? path : NULL); -} - -int -_DEFUN(_mkstemps_r, (ptr, path, len), - struct _reent *ptr _AND - char *path _AND - int len) -{ - int fd; - - return (_gettemp (ptr, path, &fd, 0, len, O_BINARY) ? fd : -1); -} - -int -_DEFUN(_mkostemp_r, (ptr, path, flags), - struct _reent *ptr _AND - char *path _AND - int flags) -{ - int fd; - - return (_gettemp (ptr, path, &fd, 0, 0, flags & ~O_ACCMODE) ? fd : -1); -} - -int -_DEFUN(_mkostemps_r, (ptr, path, len, flags), - struct _reent *ptr _AND - char *path _AND - int len _AND - int flags) -{ - int fd; - - return (_gettemp (ptr, path, &fd, 0, len, flags & ~O_ACCMODE) ? fd : -1); -} -#endif /* _ELIX_LEVEL */ - -char * -_DEFUN(_mktemp_r, (ptr, path), - struct _reent *ptr _AND - char *path) -{ - return (_gettemp (ptr, path, (int *) NULL, 0, 0, 0) ? path : (char *) NULL); -} - -#ifndef _REENT_ONLY - -int -_DEFUN(mkstemp, (path), - char *path) -{ - int fd; - - return (_gettemp (_REENT, path, &fd, 0, 0, O_BINARY) ? fd : -1); -} - -# if !defined _ELIX_LEVEL || _ELIX_LEVEL >= 4 -char * -_DEFUN(mkdtemp, (path), - char *path) -{ - return (_gettemp (_REENT, path, (int *) NULL, 1, 0, 0) ? path : NULL); -} - -int -_DEFUN(mkstemps, (path, len), - char *path _AND - int len) -{ - int fd; - - return (_gettemp (_REENT, path, &fd, 0, len, O_BINARY) ? fd : -1); -} - -int -_DEFUN(mkostemp, (path, flags), - char *path _AND - int flags) -{ - int fd; - - return (_gettemp (_REENT, path, &fd, 0, 0, flags & ~O_ACCMODE) ? fd : -1); -} - -int -_DEFUN(mkostemps, (path, len, flags), - char *path _AND - int len _AND - int flags) -{ - int fd; - - return (_gettemp (_REENT, path, &fd, 0, len, flags & ~O_ACCMODE) ? fd : -1); -} -# endif /* _ELIX_LEVEL */ - -char * -_DEFUN(mktemp, (path), - char *path) -{ - return (_gettemp (_REENT, path, (int *) NULL, 0, 0, 0) ? path : (char *) NULL); -} - -#endif /* ! defined (_REENT_ONLY) */ diff --git a/newlib/libc/stdio/open_memstream.c b/newlib/libc/stdio/open_memstream.c deleted file mode 100644 index a53bdef2f..000000000 --- a/newlib/libc/stdio/open_memstream.c +++ /dev/null @@ -1,413 +0,0 @@ -/* Copyright (C) 2007 Eric Blake - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ - -/* -FUNCTION -<<open_memstream>>, <<open_wmemstream>>---open a write stream around an arbitrary-length string - -INDEX - open_memstream -INDEX - open_wmemstream - -ANSI_SYNOPSIS - #include <stdio.h> - FILE *open_memstream(char **restrict <[buf]>, - size_t *restrict <[size]>); - - #include <wchar.h> - FILE *open_wmemstream(wchar_t **restrict <[buf]>, - size_t *restrict <[size]>); - -DESCRIPTION -<<open_memstream>> creates a seekable, byte-oriented <<FILE>> stream that -wraps an arbitrary-length buffer, created as if by <<malloc>>. The current -contents of *<[buf]> are ignored; this implementation uses *<[size]> -as a hint of the maximum size expected, but does not fail if the hint -was wrong. The parameters <[buf]> and <[size]> are later stored -through following any call to <<fflush>> or <<fclose>>, set to the -current address and usable size of the allocated string; although -after fflush, the pointer is only valid until another stream operation -that results in a write. Behavior is undefined if the user alters -either *<[buf]> or *<[size]> prior to <<fclose>>. - -<<open_wmemstream>> is like <<open_memstream>> just with the associated -stream being wide-oriented. The size set in <[size]> in subsequent -operations is the number of wide characters. - -The stream is write-only, since the user can directly read *<[buf]> -after a flush; see <<fmemopen>> for a way to wrap a string with a -readable stream. The user is responsible for calling <<free>> on -the final *<[buf]> after <<fclose>>. - -Any time the stream is flushed, a NUL byte is written at the current -position (but is not counted in the buffer length), so that the string -is always NUL-terminated after at most *<[size]> bytes (or wide characters -in case of <<open_wmemstream>>). However, data previously written beyond -the current stream offset is not lost, and the NUL value written during a -flush is restored to its previous value when seeking elsewhere in the string. - -RETURNS -The return value is an open FILE pointer on success. On error, -<<NULL>> is returned, and <<errno>> will be set to EINVAL if <[buf]> -or <[size]> is NULL, ENOMEM if memory could not be allocated, or -EMFILE if too many streams are already open. - -PORTABILITY -POSIX.1-2008 - -Supporting OS subroutines required: <<sbrk>>. -*/ - -#include <stdio.h> -#include <wchar.h> -#include <errno.h> -#include <string.h> -#include <sys/lock.h> -#include <stdint.h> -#include "local.h" - -#ifndef __LARGE64_FILES -# define OFF_T off_t -#else -# define OFF_T _off64_t -#endif - -/* Describe details of an open memstream. */ -typedef struct memstream { - void *storage; /* storage to free on close */ - char **pbuf; /* pointer to the current buffer */ - size_t *psize; /* pointer to the current size, smaller of pos or eof */ - size_t pos; /* current position */ - size_t eof; /* current file size */ - size_t max; /* current malloc buffer size, always > eof */ - union { - char c; - wchar_t w; - } saved; /* saved character that lived at *psize before NUL */ - int8_t wide; /* wide-oriented (>0) or byte-oriented (<0) */ -} memstream; - -/* Write up to non-zero N bytes of BUF into the stream described by COOKIE, - returning the number of bytes written or EOF on failure. */ -static _READ_WRITE_RETURN_TYPE -_DEFUN(memwriter, (ptr, cookie, buf, n), - struct _reent *ptr _AND - void *cookie _AND - const char *buf _AND - int n) -{ - memstream *c = (memstream *) cookie; - char *cbuf = *c->pbuf; - - /* size_t is unsigned, but off_t is signed. Don't let stream get so - big that user cannot do ftello. */ - if (sizeof (OFF_T) == sizeof (size_t) && (ssize_t) (c->pos + n) < 0) - { - ptr->_errno = EFBIG; - return EOF; - } - /* Grow the buffer, if necessary. Choose a geometric growth factor - to avoid quadratic realloc behavior, but use a rate less than - (1+sqrt(5))/2 to accomodate malloc overhead. Overallocate, so - that we can add a trailing \0 without reallocating. The new - allocation should thus be max(prev_size*1.5, c->pos+n+1). */ - if (c->pos + n >= c->max) - { - size_t newsize = c->max * 3 / 2; - if (newsize < c->pos + n + 1) - newsize = c->pos + n + 1; - cbuf = _realloc_r (ptr, cbuf, newsize); - if (! cbuf) - return EOF; /* errno already set to ENOMEM */ - *c->pbuf = cbuf; - c->max = newsize; - } - /* If we have previously done a seek beyond eof, ensure all - intermediate bytes are NUL. */ - if (c->pos > c->eof) - memset (cbuf + c->eof, '\0', c->pos - c->eof); - memcpy (cbuf + c->pos, buf, n); - c->pos += n; - /* If the user has previously written further, remember what the - trailing NUL is overwriting. Otherwise, extend the stream. */ - if (c->pos > c->eof) - c->eof = c->pos; - else if (c->wide > 0) - c->saved.w = *(wchar_t *)(cbuf + c->pos); - else - c->saved.c = cbuf[c->pos]; - cbuf[c->pos] = '\0'; - *c->psize = (c->wide > 0) ? c->pos / sizeof (wchar_t) : c->pos; - return n; -} - -/* Seek to position POS relative to WHENCE within stream described by - COOKIE; return resulting position or fail with EOF. */ -static _fpos_t -_DEFUN(memseeker, (ptr, cookie, pos, whence), - struct _reent *ptr _AND - void *cookie _AND - _fpos_t pos _AND - int whence) -{ - memstream *c = (memstream *) cookie; - OFF_T offset = (OFF_T) pos; - - if (whence == SEEK_CUR) - offset += c->pos; - else if (whence == SEEK_END) - offset += c->eof; - if (offset < 0) - { - ptr->_errno = EINVAL; - offset = -1; - } - else if ((size_t) offset != offset) - { - ptr->_errno = ENOSPC; - offset = -1; - } -#ifdef __LARGE64_FILES - else if ((_fpos_t) offset != offset) - { - ptr->_errno = EOVERFLOW; - offset = -1; - } -#endif /* __LARGE64_FILES */ - else - { - if (c->pos < c->eof) - { - if (c->wide > 0) - *(wchar_t *)((*c->pbuf) + c->pos) = c->saved.w; - else - (*c->pbuf)[c->pos] = c->saved.c; - c->saved.w = L'\0'; - } - c->pos = offset; - if (c->pos < c->eof) - { - if (c->wide > 0) - { - c->saved.w = *(wchar_t *)((*c->pbuf) + c->pos); - *(wchar_t *)((*c->pbuf) + c->pos) = L'\0'; - *c->psize = c->pos / sizeof (wchar_t); - } - else - { - c->saved.c = (*c->pbuf)[c->pos]; - (*c->pbuf)[c->pos] = '\0'; - *c->psize = c->pos; - } - } - else if (c->wide > 0) - *c->psize = c->eof / sizeof (wchar_t); - else - *c->psize = c->eof; - } - return (_fpos_t) offset; -} - -/* Seek to position POS relative to WHENCE within stream described by - COOKIE; return resulting position or fail with EOF. */ -#ifdef __LARGE64_FILES -static _fpos64_t -_DEFUN(memseeker64, (ptr, cookie, pos, whence), - struct _reent *ptr _AND - void *cookie _AND - _fpos64_t pos _AND - int whence) -{ - _off64_t offset = (_off64_t) pos; - memstream *c = (memstream *) cookie; - - if (whence == SEEK_CUR) - offset += c->pos; - else if (whence == SEEK_END) - offset += c->eof; - if (offset < 0) - { - ptr->_errno = EINVAL; - offset = -1; - } - else if ((size_t) offset != offset) - { - ptr->_errno = ENOSPC; - offset = -1; - } - else - { - if (c->pos < c->eof) - { - if (c->wide > 0) - *(wchar_t *)((*c->pbuf) + c->pos) = c->saved.w; - else - (*c->pbuf)[c->pos] = c->saved.c; - c->saved.w = L'\0'; - } - c->pos = offset; - if (c->pos < c->eof) - { - if (c->wide > 0) - { - c->saved.w = *(wchar_t *)((*c->pbuf) + c->pos); - *(wchar_t *)((*c->pbuf) + c->pos) = L'\0'; - *c->psize = c->pos / sizeof (wchar_t); - } - else - { - c->saved.c = (*c->pbuf)[c->pos]; - (*c->pbuf)[c->pos] = '\0'; - *c->psize = c->pos; - } - } - else if (c->wide > 0) - *c->psize = c->eof / sizeof (wchar_t); - else - *c->psize = c->eof; - } - return (_fpos64_t) offset; -} -#endif /* __LARGE64_FILES */ - -/* Reclaim resources used by stream described by COOKIE. */ -static int -_DEFUN(memcloser, (ptr, cookie), - struct _reent *ptr _AND - void *cookie) -{ - memstream *c = (memstream *) cookie; - char *buf; - - /* Be nice and try to reduce any unused memory. */ - buf = _realloc_r (ptr, *c->pbuf, - c->wide > 0 ? (*c->psize + 1) * sizeof (wchar_t) - : *c->psize + 1); - if (buf) - *c->pbuf = buf; - _free_r (ptr, c->storage); - return 0; -} - -/* Open a memstream that tracks a dynamic buffer in BUF and SIZE. - Return the new stream, or fail with NULL. */ -static FILE * -_DEFUN(internal_open_memstream_r, (ptr, buf, size, wide), - struct _reent *ptr _AND - char **buf _AND - size_t *size _AND - int wide) -{ - FILE *fp; - memstream *c; - - if (!buf || !size) - { - ptr->_errno = EINVAL; - return NULL; - } - if ((fp = __sfp (ptr)) == NULL) - return NULL; - if ((c = (memstream *) _malloc_r (ptr, sizeof *c)) == NULL) - { - __sfp_lock_acquire (); - fp->_flags = 0; /* release */ -#ifndef __SINGLE_THREAD__ - __lock_close_recursive (fp->_lock); -#endif - __sfp_lock_release (); - return NULL; - } - /* Use *size as a hint for initial sizing, but bound the initial - malloc between 64 bytes (same as asprintf, to avoid frequent - mallocs on small strings) and 64k bytes (to avoid overusing the - heap if *size was garbage). */ - c->max = *size; - if (wide == 1) - c->max *= sizeof(wchar_t); - if (c->max < 64) - c->max = 64; -#if (SIZE_MAX >= 64 * 1024) - else if (c->max > 64 * 1024) - c->max = 64 * 1024; -#endif - *size = 0; - *buf = _malloc_r (ptr, c->max); - if (!*buf) - { - __sfp_lock_acquire (); - fp->_flags = 0; /* release */ -#ifndef __SINGLE_THREAD__ - __lock_close_recursive (fp->_lock); -#endif - __sfp_lock_release (); - _free_r (ptr, c); - return NULL; - } - if (wide == 1) - **((wchar_t **)buf) = L'\0'; - else - **buf = '\0'; - - c->storage = c; - c->pbuf = buf; - c->psize = size; - c->eof = 0; - c->saved.w = L'\0'; - c->wide = (int8_t) wide; - - _flockfile (fp); - fp->_file = -1; - fp->_flags = __SWR; - fp->_cookie = c; - fp->_read = NULL; - fp->_write = memwriter; - fp->_seek = memseeker; -#ifdef __LARGE64_FILES - fp->_seek64 = memseeker64; - fp->_flags |= __SL64; -#endif - fp->_close = memcloser; - ORIENT (fp, wide); - _funlockfile (fp); - return fp; -} - -FILE * -_DEFUN(_open_memstream_r, (ptr, buf, size), - struct _reent *ptr _AND - char **buf _AND - size_t *size) -{ - return internal_open_memstream_r (ptr, buf, size, -1); -} - -FILE * -_DEFUN(_open_wmemstream_r, (ptr, buf, size), - struct _reent *ptr _AND - wchar_t **buf _AND - size_t *size) -{ - return internal_open_memstream_r (ptr, (char **)buf, size, 1); -} - -#ifndef _REENT_ONLY -FILE * -_DEFUN(open_memstream, (buf, size), - char **buf _AND - size_t *size) -{ - return _open_memstream_r (_REENT, buf, size); -} - -FILE * -_DEFUN(open_wmemstream, (buf, size), - wchar_t **buf _AND - size_t *size) -{ - return _open_wmemstream_r (_REENT, buf, size); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/perror.c b/newlib/libc/stdio/perror.c deleted file mode 100644 index 14b4d2173..000000000 --- a/newlib/libc/stdio/perror.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<perror>>---print an error message on standard error - -INDEX - perror -INDEX - _perror_r - -ANSI_SYNOPSIS - #include <stdio.h> - void perror(char *<[prefix]>); - - void _perror_r(struct _reent *<[reent]>, char *<[prefix]>); - -TRAD_SYNOPSIS - #include <stdio.h> - void perror(<[prefix]>) - char *<[prefix]>; - - void _perror_r(<[reent]>, <[prefix]>) - struct _reent *<[reent]>; - char *<[prefix]>; - -DESCRIPTION -Use <<perror>> to print (on standard error) an error message -corresponding to the current value of the global variable <<errno>>. -Unless you use <<NULL>> as the value of the argument <[prefix]>, the -error message will begin with the string at <[prefix]>, followed by a -colon and a space (<<: >>). The remainder of the error message is one -of the strings described for <<strerror>>. - -The alternate function <<_perror_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -<<perror>> returns no result. - -PORTABILITY -ANSI C requires <<perror>>, but the strings issued vary from one -implementation to another. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <string.h> -#include "local.h" - -_VOID -_DEFUN(_perror_r, (ptr, s), - struct _reent *ptr _AND - _CONST char *s) -{ - char *error; - int dummy; - - _REENT_SMALL_CHECK_INIT (ptr); - if (s != NULL && *s != '\0') - { - fputs (s, _stderr_r (ptr)); - fputs (": ", _stderr_r (ptr)); - } - - if ((error = _strerror_r (ptr, ptr->_errno, 1, &dummy)) != NULL) - fputs (error, _stderr_r (ptr)); - - fputc ('\n', _stderr_r (ptr)); -} - -#ifndef _REENT_ONLY - -_VOID -_DEFUN(perror, (s), - _CONST char *s) -{ - _perror_r (_REENT, s); -} - -#endif diff --git a/newlib/libc/stdio/printf.c b/newlib/libc/stdio/printf.c deleted file mode 100644 index 998b6b45b..000000000 --- a/newlib/libc/stdio/printf.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* doc in sprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdarg.h> -#include "local.h" - -int -_DEFUN(_printf_r, (ptr, fmt), - struct _reent *ptr _AND - const char *fmt _DOTS) -{ - int ret; - va_list ap; - - _REENT_SMALL_CHECK_INIT (ptr); - va_start (ap, fmt); - ret = _vfprintf_r (ptr, _stdout_r (ptr), fmt, ap); - va_end (ap); - return ret; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(printf, (fmt), - const char *fmt _DOTS) -{ - int ret; - va_list ap; - struct _reent *ptr = _REENT; - - _REENT_SMALL_CHECK_INIT (ptr); - va_start (ap, fmt); - ret = _vfprintf_r (ptr, _stdout_r (ptr), fmt, ap); - va_end (ap); - return ret; -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/putc.c b/newlib/libc/stdio/putc.c deleted file mode 100644 index 667324d9d..000000000 --- a/newlib/libc/stdio/putc.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<putc>>---write a character (macro) - -INDEX - putc -INDEX - _putc_r - -ANSI_SYNOPSIS - #include <stdio.h> - int putc(int <[ch]>, FILE *<[fp]>); - - #include <stdio.h> - int _putc_r(struct _reent *<[ptr]>, int <[ch]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int putc(<[ch]>, <[fp]>) - int <[ch]>; - FILE *<[fp]>; - - #include <stdio.h> - int _putc_r(<[ptr]>, <[ch]>, <[fp]>) - struct _reent *<[ptr]>; - int <[ch]>; - FILE *<[fp]>; - -DESCRIPTION -<<putc>> is a macro, defined in <<stdio.h>>. <<putc>> -writes the argument <[ch]> to the file or stream identified by -<[fp]>, after converting it from an <<int>> to an <<unsigned char>>. - -If the file was opened with append mode (or if the stream cannot -support positioning), then the new character goes at the end of the -file or stream. Otherwise, the new character is written at the -current value of the position indicator, and the position indicator -advances by one. - -For a subroutine version of this macro, see <<fputc>>. - -The <<_putc_r>> function is simply the reentrant version of -<<putc>> that takes an additional reentrant structure argument: <[ptr]>. - -RETURNS -If successful, <<putc>> returns its argument <[ch]>. If an error -intervenes, the result is <<EOF>>. You can use `<<ferror(<[fp]>)>>' to -query for errors. - -PORTABILITY -ANSI C requires <<putc>>; it suggests, but does not require, that -<<putc>> be implemented as a macro. The standard explicitly permits -macro implementations of <<putc>> to use the <[fp]> argument more than once; -therefore, in a portable program, you should not use an expression -with side effects as this argument. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <stdio.h> -#include "local.h" - -/* - * A subroutine version of the macro putc. - */ - -#undef putc - -int -_DEFUN(_putc_r, (ptr, c, fp), - struct _reent *ptr _AND - int c _AND - register FILE *fp) -{ - int result; - CHECK_INIT (ptr, fp); - _flockfile (fp); - result = __sputc_r (ptr, c, fp); - _funlockfile (fp); - return result; -} - -#ifndef _REENT_ONLY -int -_DEFUN(putc, (c, fp), - int c _AND - register FILE *fp) -{ -#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__) - int result; - CHECK_INIT (_REENT, fp); - _flockfile (fp); - result = __sputc_r (_REENT, c, fp); - _funlockfile (fp); - return result; -#else - return _putc_r (_REENT, c, fp); -#endif -} -#endif /* !_REENT_ONLY */ - diff --git a/newlib/libc/stdio/putc_u.c b/newlib/libc/stdio/putc_u.c deleted file mode 100644 index f710aaf57..000000000 --- a/newlib/libc/stdio/putc_u.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<putc_unlocked>>---non-thread-safe version of putc (macro) - -INDEX - putc_unlocked -INDEX - _putc_unlocked_r - -SYNOPSIS - #include <stdio.h> - int putc_unlocked(int <[ch]>, FILE *<[fp]>); - - #include <stdio.h> - int _putc_unlocked_r(struct _reent *<[ptr]>, int <[ch]>, FILE *<[fp]>); - -DESCRIPTION -<<putc_unlocked>> is a non-thread-safe version of <<putc>> declared in -<<stdio.h>>. <<putc_unlocked>> may only safely be used within a scope -protected by flockfile() (or ftrylockfile()) and funlockfile(). These -functions may safely be used in a multi-threaded program if and only -if they are called while the invoking thread owns the ( FILE *) -object, as is the case after a successful call to the flockfile() or -ftrylockfile() functions. If threads are disabled, then -<<putc_unlocked>> is equivalent to <<putc>>. - -The function <<_putc_unlocked_r>> is simply the reentrant version of -<<putc_unlocked>> that takes an additional reentrant structure pointer -argument: <[ptr]>. - -RETURNS -See <<putc>>. - -PORTABILITY -POSIX 1003.1 requires <<putc_unlocked>>. <<putc_unlocked>> may be -implemented as a macro, so arguments should not have side-effects. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <stdio.h> - -/* - * A subroutine version of the macro putc_unlocked. - */ - -#undef putc_unlocked - -int -_DEFUN(_putc_unlocked_r, (ptr, c, fp), - struct _reent *ptr _AND - int c _AND - register FILE *fp) -{ - /* CHECK_INIT is (eventually) called by __swbuf. */ - - return __sputc_r (ptr, c, fp); -} - -#ifndef _REENT_ONLY -int -_DEFUN(putc_unlocked, (c, fp), - int c _AND - register FILE *fp) -{ - /* CHECK_INIT is (eventually) called by __swbuf. */ - - return __sputc_r (_REENT, c, fp); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/putchar.c b/newlib/libc/stdio/putchar.c deleted file mode 100644 index 06bcbb46e..000000000 --- a/newlib/libc/stdio/putchar.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<putchar>>---write a character (macro) - -INDEX - putchar -INDEX - _putchar_r - -ANSI_SYNOPSIS - #include <stdio.h> - int putchar(int <[ch]>); - - int _putchar_r(struct _reent *<[reent]>, int <[ch]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int putchar(<[ch]>) - int <[ch]>; - - int _putchar_r(<[reent]>, <[ch]>) - struct _reent *<[reent]>; - int <[ch]>; - -DESCRIPTION -<<putchar>> is a macro, defined in <<stdio.h>>. <<putchar>> -writes its argument to the standard output stream, -after converting it from an <<int>> to an <<unsigned char>>. - -The alternate function <<_putchar_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -If successful, <<putchar>> returns its argument <[ch]>. If an error -intervenes, the result is <<EOF>>. You can use `<<ferror(stdin)>>' to -query for errors. - -PORTABILITY -ANSI C requires <<putchar>>; it suggests, but does not require, that -<<putchar>> be implemented as a macro. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -/* - * A subroutine version of the macro putchar. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include "local.h" - -#undef putchar - -int -_DEFUN(_putchar_r, (ptr, c), - struct _reent *ptr _AND - int c) -{ - _REENT_SMALL_CHECK_INIT (ptr); - return _putc_r (ptr, c, _stdout_r (ptr)); -} - -#ifndef _REENT_ONLY - -int -_DEFUN(putchar, (c), - int c) -{ - _REENT_SMALL_CHECK_INIT (_REENT); - return _putc_r (_REENT, c, _stdout_r (_REENT)); -} - -#endif diff --git a/newlib/libc/stdio/putchar_u.c b/newlib/libc/stdio/putchar_u.c deleted file mode 100644 index a866c7799..000000000 --- a/newlib/libc/stdio/putchar_u.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<putchar_unlocked>>---non-thread-safe version of putchar (macro) - -INDEX - putchar_unlocked - -SYNOPSIS - #include <stdio.h> - int putchar_unlocked(int <[ch]>); - -DESCRIPTION -<<putchar_unlocked>> is a non-thread-safe version of <<putchar>> -declared in <<stdio.h>>. <<putchar_unlocked>> may only safely be used -within a scope protected by flockfile() (or ftrylockfile()) and -funlockfile(). These functions may safely be used in a multi-threaded -program if and only if they are called while the invoking thread owns -the ( FILE *) object, as is the case after a successful call to the -flockfile() or ftrylockfile() functions. If threads are disabled, -then <<putchar_unlocked>> is equivalent to <<putchar>>. - -RETURNS -See <<putchar>>. - -PORTABILITY -POSIX 1003.1 requires <<putchar_unlocked>>. <<putchar_unlocked>> may -be implemented as a macro. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -/* - * A subroutine version of the macro putchar_unlocked. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> - -#undef putchar_unlocked - -int -_DEFUN(_putchar_unlocked_r, (ptr, c), - struct _reent *ptr _AND - int c) -{ - return putc_unlocked (c, _stdout_r (ptr)); -} - -#ifndef _REENT_ONLY - -int -_DEFUN(putchar_unlocked, (c), - int c) -{ - /* CHECK_INIT is (eventually) called by __swbuf. */ - - return _putchar_unlocked_r (_REENT, c); -} - -#endif diff --git a/newlib/libc/stdio/puts.c b/newlib/libc/stdio/puts.c deleted file mode 100644 index 66291cd13..000000000 --- a/newlib/libc/stdio/puts.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<puts>>---write a character string - -INDEX - puts -INDEX - _puts_r - -ANSI_SYNOPSIS - #include <stdio.h> - int puts(const char *<[s]>); - - int _puts_r(struct _reent *<[reent]>, const char *<[s]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int puts(<[s]>) - char *<[s]>; - - int _puts_r(<[reent]>, <[s]>) - struct _reent *<[reent]>; - char *<[s]>; - -DESCRIPTION -<<puts>> writes the string at <[s]> (followed by a newline, instead of -the trailing null) to the standard output stream. - -The alternate function <<_puts_r>> is a reentrant version. The extra -argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -If successful, the result is a nonnegative integer; otherwise, the -result is <<EOF>>. - -PORTABILITY -ANSI C requires <<puts>>, but does not specify that the result on -success must be <<0>>; any non-negative value is permitted. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <string.h> -#include "fvwrite.h" -#include "local.h" - -/* - * Write the given string to stdout, appending a newline. - */ - -int -_DEFUN(_puts_r, (ptr, s), - struct _reent *ptr _AND - _CONST char * s) -{ - size_t c = strlen (s); - struct __suio uio; - struct __siov iov[2]; - - iov[0].iov_base = s; - iov[0].iov_len = c; - iov[1].iov_base = "\n"; - iov[1].iov_len = 1; - uio.uio_resid = c + 1; - uio.uio_iov = &iov[0]; - uio.uio_iovcnt = 2; - _REENT_SMALL_CHECK_INIT (ptr); - ORIENT (stdout, -1); - return (__sfvwrite_r (ptr, _stdout_r (ptr), &uio) ? EOF : '\n'); -} - -#ifndef _REENT_ONLY - -int -_DEFUN(puts, (s), - char _CONST * s) -{ - return _puts_r (_REENT, s); -} - -#endif diff --git a/newlib/libc/stdio/putw.c b/newlib/libc/stdio/putw.c deleted file mode 100644 index 682015c0a..000000000 --- a/newlib/libc/stdio/putw.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<putw>>---write a word (int) - -INDEX - putw - -ANSI_SYNOPSIS - #include <stdio.h> - int putw(int <[w]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int putw(<w>, <[fp]>) - int <w>; - FILE *<[fp]>; - -DESCRIPTION -<<putw>> is a function, defined in <<stdio.h>>. You can use <<putw>> -to write a word to the file or stream identified by <[fp]>. As a side -effect, <<putw>> advances the file's current position indicator. - -RETURNS -Zero on success, <<EOF>> on failure. - -PORTABILITY -<<putw>> is a remnant of K&R C; it is not part of any ISO C Standard. -<<fwrite>> should be used instead. In fact, this implementation of -<<putw>> is based upon <<fwrite>>. - -Supporting OS subroutines required: <<fwrite>>. -*/ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <stdio.h> - -int -_DEFUN(putw, (w, fp), - int w _AND - register FILE *fp) -{ - if (fwrite ((_CONST char*)&w, sizeof (w), 1, fp) != 1) - return EOF; - return 0; -} diff --git a/newlib/libc/stdio/putwc.c b/newlib/libc/stdio/putwc.c deleted file mode 100644 index 9a84f35fb..000000000 --- a/newlib/libc/stdio/putwc.c +++ /dev/null @@ -1,53 +0,0 @@ -/*- - * Copyright (c) 2002 Tim J. Robbins. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <wchar.h> -#include "local.h" - -#undef putwc - -wint_t -_DEFUN(_putwc_r, (ptr, wc, fp), - struct _reent *ptr _AND - wchar_t wc _AND - FILE *fp) -{ - return _fputwc_r (ptr, wc, fp); -} -/* - * Synonym for fputwc(). The only difference is that putwc(), if it is a - * macro, may evaluate `fp' more than once. - */ -wint_t -_DEFUN(putwc, (wc, fp), - wchar_t wc _AND - FILE *fp) -{ - return fputwc (wc, fp); -} diff --git a/newlib/libc/stdio/putwchar.c b/newlib/libc/stdio/putwchar.c deleted file mode 100644 index fcb0a7dba..000000000 --- a/newlib/libc/stdio/putwchar.c +++ /dev/null @@ -1,92 +0,0 @@ -/*- - * Copyright (c) 2002 Tim J. Robbins. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* -FUNCTION -<<putwchar>>---write a wide character to standard output - -INDEX - putwchar -INDEX - _putwchar_r - -ANSI_SYNOPSIS - #include <wchar.h> - wint_t putwchar(wchar_t <[wc]>); - - wint_t _putwchar_r(struct _reent *<[reent]>, wchar_t <[wc]>); - -TRAD_SYNOPSIS - #include <wchar.h> - wint_t putwchar(<[wc]>) - wchar_t <[wc]>; - - wint_t _putwchar_r(<[reent]>, <[wc]>) - struct _reent *<[reent]>; - wchar_t <[wc]>; - -DESCRIPTION -The <<putwchar>> function or macro is the wide-character equivalent of -the <<putchar>> function. It writes the wide character wc to stdout. - -The alternate function <<_putwchar_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -If successful, <<putwchar>> returns its argument <[wc]>. If an error -intervenes, the result is <<EOF>>. You can use `<<ferror(stdin)>>' to -query for errors. - -PORTABILITY -C99 -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <wchar.h> -#include "local.h" - -#undef putwchar - -wint_t -_DEFUN(_putwchar_r, (ptr, wc), - struct _reent *ptr _AND - wchar_t wc) -{ - return _fputwc_r (ptr, wc, stdout); -} - -/* - * Synonym for fputwc(wc, stdout). - */ -wint_t -_DEFUN(putwchar, (wc), - wchar_t wc) -{ - _REENT_SMALL_CHECK_INIT (_REENT); - return fputwc (wc, stdout); -} diff --git a/newlib/libc/stdio/refill.c b/newlib/libc/stdio/refill.c deleted file mode 100644 index 9d853f94d..000000000 --- a/newlib/libc/stdio/refill.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* No user fns here. Pesch 15apr92. */ - -#include <_ansi.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> -#include "local.h" - -static int -_DEFUN(lflush, (fp), - FILE *fp) -{ - if ((fp->_flags & (__SLBF | __SWR)) == (__SLBF | __SWR)) - return fflush (fp); - return 0; -} - -/* - * Refill a stdio buffer. - * Return EOF on eof or error, 0 otherwise. - */ - -int -_DEFUN(__srefill_r, (ptr, fp), - struct _reent * ptr _AND - register FILE * fp) -{ - /* make sure stdio is set up */ - - CHECK_INIT (ptr, fp); - - ORIENT (fp, -1); - - fp->_r = 0; /* largely a convenience for callers */ - -#ifndef __CYGWIN__ - /* SysV does not make this test; take it out for compatibility */ - if (fp->_flags & __SEOF) - return EOF; -#endif - - /* if not already reading, have to be reading and writing */ - if ((fp->_flags & __SRD) == 0) - { - if ((fp->_flags & __SRW) == 0) - { - ptr->_errno = EBADF; - fp->_flags |= __SERR; - return EOF; - } - /* switch to reading */ - if (fp->_flags & __SWR) - { - if (_fflush_r (ptr, fp)) - return EOF; - fp->_flags &= ~__SWR; - fp->_w = 0; - fp->_lbfsize = 0; - } - fp->_flags |= __SRD; - } - else - { - /* - * We were reading. If there is an ungetc buffer, - * we must have been reading from that. Drop it, - * restoring the previous buffer (if any). If there - * is anything in that buffer, return. - */ - if (HASUB (fp)) - { - FREEUB (ptr, fp); - if ((fp->_r = fp->_ur) != 0) - { - fp->_p = fp->_up; - return 0; - } - } - } - - if (fp->_bf._base == NULL) - __smakebuf_r (ptr, fp); - - /* - * Before reading from a line buffered or unbuffered file, - * flush all line buffered output files, per the ANSI C - * standard. - */ - if (fp->_flags & (__SLBF | __SNBF)) - { - /* Ignore this file in _fwalk to avoid potential deadlock. */ - short orig_flags = fp->_flags; - fp->_flags = 1; - _CAST_VOID _fwalk (_GLOBAL_REENT, lflush); - fp->_flags = orig_flags; - - /* Now flush this file without locking it. */ - if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR)) - __sflush_r (ptr, fp); - } - - fp->_p = fp->_bf._base; - fp->_r = fp->_read (ptr, fp->_cookie, (char *) fp->_p, fp->_bf._size); -#ifndef __CYGWIN__ - if (fp->_r <= 0) -#else - if (fp->_r > 0) - fp->_flags &= ~__SEOF; - else -#endif - { - if (fp->_r == 0) - fp->_flags |= __SEOF; - else - { - fp->_r = 0; - fp->_flags |= __SERR; - } - return EOF; - } - return 0; -} diff --git a/newlib/libc/stdio/remove.c b/newlib/libc/stdio/remove.c deleted file mode 100644 index 5a3e16be9..000000000 --- a/newlib/libc/stdio/remove.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<remove>>---delete a file's name - -INDEX - remove -INDEX - _remove_r - -ANSI_SYNOPSIS - #include <stdio.h> - int remove(char *<[filename]>); - - int _remove_r(struct _reent *<[reent]>, char *<[filename]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int remove(<[filename]>) - char *<[filename]>; - - int _remove_r(<[reent]>, <[filename]>) - struct _reent *<[reent]>; - char *<[filename]>; - -DESCRIPTION -Use <<remove>> to dissolve the association between a particular -filename (the string at <[filename]>) and the file it represents. -After calling <<remove>> with a particular filename, you will no -longer be able to open the file by that name. - -In this implementation, you may use <<remove>> on an open file without -error; existing file descriptors for the file will continue to access -the file's data until the program using them closes the file. - -The alternate function <<_remove_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -<<remove>> returns <<0>> if it succeeds, <<-1>> if it fails. - -PORTABILITY -ANSI C requires <<remove>>, but only specifies that the result on -failure be nonzero. The behavior of <<remove>> when you call it on an -open file may vary among implementations. - -Supporting OS subroutine required: <<unlink>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> - -int -_DEFUN(_remove_r, (ptr, filename), - struct _reent *ptr _AND - _CONST char *filename) -{ - if (_unlink_r (ptr, filename) == -1) - return -1; - - return 0; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(remove, (filename), - _CONST char *filename) -{ - return _remove_r (_REENT, filename); -} - -#endif diff --git a/newlib/libc/stdio/rename.c b/newlib/libc/stdio/rename.c deleted file mode 100644 index 6eb1f7d19..000000000 --- a/newlib/libc/stdio/rename.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<rename>>---rename a file - -INDEX - rename - -ANSI_SYNOPSIS - #include <stdio.h> - int rename(const char *<[old]>, const char *<[new]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int rename(<[old]>, <[new]>) - char *<[old]>; - char *<[new]>; - -DESCRIPTION -Use <<rename>> to establish a new name (the string at <[new]>) for a -file now known by the string at <[old]>. After a successful -<<rename>>, the file is no longer accessible by the string at <[old]>. - -If <<rename>> fails, the file named <<*<[old]>>> is unaffected. The -conditions for failure depend on the host operating system. - -RETURNS -The result is either <<0>> (when successful) or <<-1>> (when the file -could not be renamed). - -PORTABILITY -ANSI C requires <<rename>>, but only specifies that the result on -failure be nonzero. The effects of using the name of an existing file -as <<*<[new]>>> may vary from one implementation to another. - -Supporting OS subroutines required: <<link>>, <<unlink>>, or <<rename>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <sys/unistd.h> - -#ifndef _REENT_ONLY - -int -_DEFUN(rename, (old, new), - _CONST char *old _AND - _CONST char *new) -{ - return _rename_r (_REENT, old, new); -} - -#endif diff --git a/newlib/libc/stdio/rewind.c b/newlib/libc/stdio/rewind.c deleted file mode 100644 index fb03e5be7..000000000 --- a/newlib/libc/stdio/rewind.c +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<rewind>>---reinitialize a file or stream - -INDEX - rewind -INDEX - _rewind_r - -ANSI_SYNOPSIS - #include <stdio.h> - void rewind(FILE *<[fp]>); - void _rewind_r(struct _reent *<[ptr]>, FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - void rewind(<[fp]>) - FILE *<[fp]>; - - void _rewind_r(<[ptr]>, <[fp]>) - struct _reent *<[ptr]>; - FILE *<[fp]>; - -DESCRIPTION -<<rewind>> returns the file position indicator (if any) for the file -or stream identified by <[fp]> to the beginning of the file. It also -clears any error indicator and flushes any pending output. - -RETURNS -<<rewind>> does not return a result. - -PORTABILITY -ANSI C requires <<rewind>>. - -No supporting OS subroutines are required. -*/ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> - -_VOID -_DEFUN(_rewind_r, (ptr, fp), - struct _reent * ptr _AND - register FILE * fp) -{ - _CAST_VOID _fseek_r (ptr, fp, 0L, SEEK_SET); - clearerr (fp); -} - -#ifndef _REENT_ONLY - -_VOID -_DEFUN(rewind, (fp), - register FILE * fp) -{ - _rewind_r (_REENT, fp); -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/rget.c b/newlib/libc/stdio/rget.c deleted file mode 100644 index 9474bd9f6..000000000 --- a/newlib/libc/stdio/rget.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* No user fns here. Pesch 15apr92. */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <stdio.h> -#include <errno.h> -#include "local.h" - -/* - * Handle getc() when the buffer ran out: - * Refill, then return the first character - * in the newly-filled buffer. - */ - -int -_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--; - return *fp->_p++; - } - return EOF; -} - -/* This function isn't any longer declared in stdio.h, but it's - required for backward compatibility with applications built against - earlier dynamically built newlib libraries. */ -int -_DEFUN(__srget, (fp), - register FILE *fp) -{ - return __srget_r (_REENT, fp); -} diff --git a/newlib/libc/stdio/scanf.c b/newlib/libc/stdio/scanf.c deleted file mode 100644 index 68fd8fb65..000000000 --- a/newlib/libc/stdio/scanf.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include "local.h" - -#ifndef _REENT_ONLY - -int -#ifdef _HAVE_STDC -scanf(_CONST char *fmt, ...) -#else -scanf(fmt, va_alist) - char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - - _REENT_SMALL_CHECK_INIT (_REENT); -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = _vfscanf_r (_REENT, _stdin_r (_REENT), fmt, ap); - va_end (ap); - return ret; -} - -#endif /* !_REENT_ONLY */ - -int -#ifdef _HAVE_STDC -_scanf_r(struct _reent *ptr, _CONST char *fmt, ...) -#else -_scanf_r(ptr, fmt, va_alist) - struct _reent *ptr; - char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - - _REENT_SMALL_CHECK_INIT (ptr); -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = _vfscanf_r (ptr, _stdin_r (ptr), fmt, ap); - va_end (ap); - return (ret); -} - diff --git a/newlib/libc/stdio/sccl.c b/newlib/libc/stdio/sccl.c deleted file mode 100644 index b01801145..000000000 --- a/newlib/libc/stdio/sccl.c +++ /dev/null @@ -1,127 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* Split from vfscanf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <newlib.h> -#include <stdio.h> -#include "local.h" - -/* - * Fill in the given table from the scanset at the given format - * (just after `['). Return a pointer to the character past the - * closing `]'. The table has a 1 wherever characters should be - * considered part of the scanset. - */ - -u_char * -_DEFUN(__sccl, (tab, fmt), - register char *tab _AND - register u_char *fmt) -{ - register int c, n, v; - - /* first `clear' the whole table */ - c = *fmt++; /* first char hat => negated scanset */ - if (c == '^') - { - v = 1; /* default => accept */ - c = *fmt++; /* get new first char */ - } - else - v = 0; /* default => reject */ - /* should probably use memset here */ - for (n = 0; n < 256; n++) - tab[n] = v; - if (c == 0) - return fmt - 1; /* format ended before closing ] */ - - /* - * Now set the entries corresponding to the actual scanset to the - * opposite of the above. - * - * The first character may be ']' (or '-') without being special; the - * last character may be '-'. - */ - - v = 1 - v; - for (;;) - { - tab[c] = v; /* take character c */ - doswitch: - n = *fmt++; /* and examine the next */ - switch (n) - { - - case 0: /* format ended too soon */ - return fmt - 1; - - case '-': - /* - * A scanset of the form [01+-] is defined as `the digit 0, the - * digit 1, the character +, the character -', but the effect of a - * scanset such as [a-zA-Z0-9] is implementation defined. The V7 - * Unix scanf treats `a-z' as `the letters a through z', but treats - * `a-a' as `the letter a, the character -, and the letter a'. - * - * For compatibility, the `-' is not considerd to define a range if - * the character following it is either a close bracket (required by - * ANSI) or is not numerically greater than the character we just - * stored in the table (c). - */ - n = *fmt; - if (n == ']' || n < c) - { - c = '-'; - break; /* resume the for(;;) */ - } - fmt++; - do - { /* fill in the range */ - tab[++c] = v; - } - while (c < n); -#if 1 /* XXX another disgusting compatibility hack */ - /* - * Alas, the V7 Unix scanf also treats formats such - * as [a-c-e] as `the letters a through e'. This too - * is permitted by the standard.... - */ - goto doswitch; -#else - c = *fmt++; - if (c == 0) - return fmt - 1; - if (c == ']') - return fmt; -#endif - - break; - - - case ']': /* end of scanset */ - return fmt; - - default: /* just another character */ - c = n; - break; - } - } - /* NOTREACHED */ -} diff --git a/newlib/libc/stdio/setbuf.c b/newlib/libc/stdio/setbuf.c deleted file mode 100644 index 1a8bc6de1..000000000 --- a/newlib/libc/stdio/setbuf.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<setbuf>>---specify full buffering for a file or stream - -INDEX - setbuf - -ANSI_SYNOPSIS - #include <stdio.h> - void setbuf(FILE *<[fp]>, char *<[buf]>); - -TRAD_SYNOPSIS - #include <stdio.h> - void setbuf(<[fp]>, <[buf]>) - FILE *<[fp]>; - char *<[buf]>; - -DESCRIPTION -<<setbuf>> specifies that output to the file or stream identified by <[fp]> -should be fully buffered. All output for this file will go to a -buffer (of size <<BUFSIZ>>, specified in `<<stdio.h>>'). Output will -be passed on to the host system only when the buffer is full, or when -an input operation intervenes. - -You may, if you wish, supply your own buffer by passing a pointer to -it as the argument <[buf]>. It must have size <<BUFSIZ>>. You can -also use <<NULL>> as the value of <[buf]>, to signal that the -<<setbuf>> function is to allocate the buffer. - -WARNINGS -You may only use <<setbuf>> before performing any file operation other -than opening the file. - -If you supply a non-null <[buf]>, you must ensure that the associated -storage continues to be available until you close the stream -identified by <[fp]>. - -RETURNS -<<setbuf>> does not return a result. - -PORTABILITY -Both ANSI C and the System V Interface Definition (Issue 2) require -<<setbuf>>. However, they differ on the meaning of a <<NULL>> buffer -pointer: the SVID issue 2 specification says that a <<NULL>> buffer -pointer requests unbuffered output. For maximum portability, avoid -<<NULL>> buffer pointers. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <stdio.h> -#include "local.h" - -_VOID -_DEFUN(setbuf, (fp, buf), - FILE * fp _AND - char *buf) -{ - _CAST_VOID setvbuf (fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ); -} diff --git a/newlib/libc/stdio/setbuffer.c b/newlib/libc/stdio/setbuffer.c deleted file mode 100644 index e88187446..000000000 --- a/newlib/libc/stdio/setbuffer.c +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* -Modified copy of setbuf.c to support the setbuffer function -defined as part of BSD. -Modifications by Gareth Pearce, 2001. -*/ - -/* -FUNCTION -<<setbuffer>>---specify full buffering for a file or stream with size - -INDEX - setbuffer - -ANSI_SYNOPSIS - #include <stdio.h> - void setbuffer(FILE *<[fp]>, char *<[buf]>, int <[size]>); - -TRAD_SYNOPSIS - #include <stdio.h> - void setbuffer(<[fp]>, <[buf]>, <[size]>) - FILE *<[fp]>; - char *<[buf]>; - int <[size]>; - -DESCRIPTION -<<setbuffer>> specifies that output to the file or stream identified by -<[fp]> should be fully buffered. All output for this file will go to a -buffer (of size <[size]>). Output will be passed on to the host system -only when the buffer is full, or when an input operation intervenes. - -You may, if you wish, supply your own buffer by passing a pointer to -it as the argument <[buf]>. It must have size <[size]>. You can -also use <<NULL>> as the value of <[buf]>, to signal that the -<<setbuffer>> function is to allocate the buffer. - -WARNINGS -You may only use <<setbuffer>> before performing any file operation -other than opening the file. - -If you supply a non-null <[buf]>, you must ensure that the associated -storage continues to be available until you close the stream -identified by <[fp]>. - -RETURNS -<<setbuffer>> does not return a result. - -PORTABILITY -This function comes from BSD not ANSI or POSIX. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <stdio.h> -#include "local.h" - -_VOID -_DEFUN(setbuffer, (fp, buf, size), - FILE * fp _AND - char *buf _AND - int size) -{ - _CAST_VOID setvbuf (fp, buf, buf ? _IOFBF : _IONBF, (size_t) size); -} diff --git a/newlib/libc/stdio/setlinebuf.c b/newlib/libc/stdio/setlinebuf.c deleted file mode 100644 index 0df6a579a..000000000 --- a/newlib/libc/stdio/setlinebuf.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* -Modified copy of setbuf.c to support setlinebuf function -defined as part of BSD. -Modifications by Gareth Pearce, 2001. -*/ - -/* -FUNCTION -<<setlinebuf>>---specify line buffering for a file or stream - -INDEX - setlinebuf - -ANSI_SYNOPSIS - #include <stdio.h> - void setlinebuf(FILE *<[fp]>); - -TRAD_SYNOPSIS - #include <stdio.h> - void setlinebuf(<[fp]>) - FILE *<[fp]>; - -DESCRIPTION -<<setlinebuf>> specifies that output to the file or stream identified by -<[fp]> should be line buffered. This causes the file or stream to pass -on output to the host system at every newline, as well as when the -buffer is full, or when an input operation intervenes. - -WARNINGS -You may only use <<setlinebuf>> before performing any file operation -other than opening the file. - -RETURNS -<<setlinebuf>> returns as per setvbuf. - -PORTABILITY -This function comes from BSD not ANSI or POSIX. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <stdio.h> -#include "local.h" - -int -_DEFUN(setlinebuf, (fp), - FILE * fp) -{ - return (setvbuf (fp, (char *) NULL, _IOLBF, (size_t) 0)); -} diff --git a/newlib/libc/stdio/setvbuf.c b/newlib/libc/stdio/setvbuf.c deleted file mode 100644 index 583a081f4..000000000 --- a/newlib/libc/stdio/setvbuf.c +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<setvbuf>>---specify file or stream buffering - -INDEX - setvbuf - -ANSI_SYNOPSIS - #include <stdio.h> - int setvbuf(FILE *<[fp]>, char *<[buf]>, - int <[mode]>, size_t <[size]>); - -TRAD_SYNOPSIS - #include <stdio.h> - int setvbuf(<[fp]>, <[buf]>, <[mode]>, <[size]>) - FILE *<[fp]>; - char *<[buf]>; - int <[mode]>; - size_t <[size]>; - -DESCRIPTION -Use <<setvbuf>> to specify what kind of buffering you want for the -file or stream identified by <[fp]>, by using one of the following -values (from <<stdio.h>>) as the <[mode]> argument: - -o+ -o _IONBF -Do not use a buffer: send output directly to the host system for the -file or stream identified by <[fp]>. - -o _IOFBF -Use full output buffering: output will be passed on to the host system -only when the buffer is full, or when an input operation intervenes. - -o _IOLBF -Use line buffering: pass on output to the host system at every -newline, as well as when the buffer is full, or when an input -operation intervenes. -o- - -Use the <[size]> argument to specify how large a buffer you wish. You -can supply the buffer itself, if you wish, by passing a pointer to a -suitable area of memory as <[buf]>. Otherwise, you may pass <<NULL>> -as the <[buf]> argument, and <<setvbuf>> will allocate the buffer. - -WARNINGS -You may only use <<setvbuf>> before performing any file operation other -than opening the file. - -If you supply a non-null <[buf]>, you must ensure that the associated -storage continues to be available until you close the stream -identified by <[fp]>. - -RETURNS -A <<0>> result indicates success, <<EOF>> failure (invalid <[mode]> or -<[size]> can cause failure). - -PORTABILITY -Both ANSI C and the System V Interface Definition (Issue 2) require -<<setvbuf>>. However, they differ on the meaning of a <<NULL>> buffer -pointer: the SVID issue 2 specification says that a <<NULL>> buffer -pointer requests unbuffered output. For maximum portability, avoid -<<NULL>> buffer pointers. - -Both specifications describe the result on failure only as a -nonzero value. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <stdio.h> -#include <stdlib.h> -#include "local.h" - -/* - * Set one of the three kinds of buffering, optionally including a buffer. - */ - -int -_DEFUN(setvbuf, (fp, buf, mode, size), - register FILE * fp _AND - char *buf _AND - register int mode _AND - register size_t size) -{ - int ret = 0; - - CHECK_INIT (_REENT, fp); - - _flockfile (fp); - - /* - * Verify arguments. The `int' limit on `size' is due to this - * particular implementation. - */ - - if ((mode != _IOFBF && mode != _IOLBF && mode != _IONBF) || (int)(_POINTER_INT) size < 0) - { - _funlockfile (fp); - return (EOF); - } - - /* - * Write current buffer, if any; drop read count, if any. - * Make sure putc() will not think fp is line buffered. - * Free old buffer if it was from malloc(). Clear line and - * non buffer flags, and clear malloc flag. - */ - - _fflush_r (_REENT, fp); - fp->_r = 0; - fp->_lbfsize = 0; - if (fp->_flags & __SMBF) - _free_r (_REENT, (_PTR) fp->_bf._base); - fp->_flags &= ~(__SLBF | __SNBF | __SMBF); - - if (mode == _IONBF) - goto nbf; - - /* - * Allocate buffer if needed. */ - if (buf == NULL) - { - /* we need this here because malloc() may return a pointer - even if size == 0 */ - if (!size) size = BUFSIZ; - if ((buf = malloc (size)) == NULL) - { - ret = EOF; - /* Try another size... */ - buf = malloc (BUFSIZ); - size = BUFSIZ; - } - if (buf == NULL) - { - /* Can't allocate it, let's try another approach */ -nbf: - fp->_flags |= __SNBF; - fp->_w = 0; - fp->_bf._base = fp->_p = fp->_nbuf; - fp->_bf._size = 1; - _funlockfile (fp); - return (ret); - } - fp->_flags |= __SMBF; - } - /* - * Now put back whichever flag is needed, and fix _lbfsize - * if line buffered. Ensure output flush on exit if the - * stream will be buffered at all. - * If buf is NULL then make _lbfsize 0 to force the buffer - * to be flushed and hence malloced on first use - */ - - switch (mode) - { - case _IOLBF: - fp->_flags |= __SLBF; - fp->_lbfsize = buf ? -size : 0; - /* FALLTHROUGH */ - - case _IOFBF: - /* no flag */ - _REENT->__cleanup = _cleanup_r; - fp->_bf._base = fp->_p = (unsigned char *) buf; - fp->_bf._size = size; - break; - } - - /* - * Patch up write count if necessary. - */ - - if (fp->_flags & __SWR) - fp->_w = fp->_flags & (__SLBF | __SNBF) ? 0 : size; - - _funlockfile (fp); - return 0; -} diff --git a/newlib/libc/stdio/siprintf.c b/newlib/libc/stdio/siprintf.c deleted file mode 100644 index f0a80980c..000000000 --- a/newlib/libc/stdio/siprintf.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<siprintf>>, <<fiprintf>>, <<iprintf>>, <<sniprintf>>, <<asiprintf>>, <<asniprintf>>---format output (integer only) - -INDEX - fiprintf -INDEX - _fiprintf_r -INDEX - iprintf -INDEX - _iprintf_r -INDEX - siprintf -INDEX - _siprintf_r -INDEX - sniprintf -INDEX - _sniprintf_r -INDEX - asiprintf -INDEX - _asiprintf_r -INDEX - asniprintf -INDEX - _asniprintf_r - -ANSI_SYNOPSIS - #include <stdio.h> - - int iprintf(const char *<[format]>, ...); - int fiprintf(FILE *<[fd]>, const char *<[format]> , ...); - int siprintf(char *<[str]>, const char *<[format]>, ...); - int sniprintf(char *<[str]>, size_t <[size]>, const char *<[format]>, - ...); - int asiprintf(char **<[strp]>, const char *<[format]>, ...); - char *asniprintf(char *<[str]>, size_t *<[size]>, - const char *<[format]>, ...); - - int _iprintf_r(struct _reent *<[ptr]>, const char *<[format]>, ...); - int _fiprintf_r(struct _reent *<[ptr]>, FILE *<[fd]>, - const char *<[format]>, ...); - int _siprintf_r(struct _reent *<[ptr]>, char *<[str]>, - const char *<[format]>, ...); - int _sniprintf_r(struct _reent *<[ptr]>, char *<[str]>, size_t <[size]>, - const char *<[format]>, ...); - int _asiprintf_r(struct _reent *<[ptr]>, char **<[strp]>, - const char *<[format]>, ...); - char *_asniprintf_r(struct _reent *<[ptr]>, char *<[str]>, - size_t *<[size]>, const char *<[format]>, ...); - -DESCRIPTION - <<iprintf>>, <<fiprintf>>, <<siprintf>>, <<sniprintf>>, - <<asiprintf>>, and <<asniprintf>> are the same as <<printf>>, - <<fprintf>>, <<sprintf>>, <<snprintf>>, <<asprintf>>, and - <<asnprintf>>, respectively, except that they restrict usage - to non-floating-point format specifiers. - - <<_iprintf_r>>, <<_fiprintf_r>>, <<_asiprintf_r>>, - <<_siprintf_r>>, <<_sniprintf_r>>, <<_asniprintf_r>> are - simply reentrant versions of the functions above. - -RETURNS -Similar to <<printf>>, <<fprintf>>, <<sprintf>>, <<snprintf>>, <<asprintf>>, -and <<asnprintf>>. - -PORTABILITY -<<iprintf>>, <<fiprintf>>, <<siprintf>>, <<sniprintf>>, <<asiprintf>>, -and <<asniprintf>> are newlib extensions. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include <limits.h> -#include "local.h" - -int -#ifdef _HAVE_STDC -_DEFUN(_siprintf_r, (ptr, str, fmt), - struct _reent *ptr _AND - char *str _AND - _CONST char *fmt _DOTS) -#else -_siprintf_r(ptr, str, fmt, va_alist) - struct _reent *ptr; - char *str; - _CONST char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - FILE f; - - f._flags = __SWR | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._w = INT_MAX; - f._file = -1; /* No file. */ -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = _svfiprintf_r (ptr, &f, fmt, ap); - va_end (ap); - *f._p = 0; - return (ret); -} - -#ifndef _REENT_ONLY - -int -#ifdef _HAVE_STDC -_DEFUN(siprintf, (str, fmt), - char *str _AND - _CONST char *fmt _DOTS) -#else -siprintf(str, fmt, va_alist) - char *str; - _CONST char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - FILE f; - - f._flags = __SWR | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._w = INT_MAX; - f._file = -1; /* No file. */ -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = _svfiprintf_r (_REENT, &f, fmt, ap); - va_end (ap); - *f._p = 0; - return (ret); -} - -#endif diff --git a/newlib/libc/stdio/siscanf.c b/newlib/libc/stdio/siscanf.c deleted file mode 100644 index a6a812670..000000000 --- a/newlib/libc/stdio/siscanf.c +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<siscanf>>, <<fiscanf>>, <<iscanf>>---scan and format non-floating input - -INDEX - iscanf -INDEX - _iscanf_r -INDEX - fiscanf -INDEX - _fiscanf_r -INDEX - siscanf -INDEX - _siscanf_r - -ANSI_SYNOPSIS - #include <stdio.h> - - int iscanf(const char *<[format]>, ...); - int fiscanf(FILE *<[fd]>, const char *<[format]>, ...); - int siscanf(const char *<[str]>, const char *<[format]>, ...); - - int _iscanf_r(struct _reent *<[ptr]>, const char *<[format]>, ...); - int _fiscanf_r(struct _reent *<[ptr]>, FILE *<[fd]>, - const char *<[format]>, ...); - int _siscanf_r(struct _reent *<[ptr]>, const char *<[str]>, - const char *<[format]>, ...); - - -TRAD_SYNOPSIS - #include <stdio.h> - - int iscanf(<[format]> [, <[arg]>, ...]) - char *<[format]>; - - int fiscanf(<[fd]>, <[format]> [, <[arg]>, ...]); - FILE *<[fd]>; - char *<[format]>; - - int siscanf(<[str]>, <[format]> [, <[arg]>, ...]); - char *<[str]>; - char *<[format]>; - - int _iscanf_r(<[ptr]>, <[format]> [, <[arg]>, ...]) - struct _reent *<[ptr]>; - char *<[format]>; - - int _fiscanf_r(<[ptr]>, <[fd]>, <[format]> [, <[arg]>, ...]); - struct _reent *<[ptr]>; - FILE *<[fd]>; - char *<[format]>; - - int _siscanf_r(<[ptr]>, <[str]>, <[format]> [, <[arg]>, ...]); - struct _reent *<[ptr]>; - char *<[str]>; - char *<[format]>; - - -DESCRIPTION - <<iscanf>>, <<fiscanf>>, and <<siscanf>> are the same as - <<scanf>>, <<fscanf>>, and <<sscanf>> respectively, only that - they restrict the available formats to non-floating-point - format specifiers. - - The routines <<_iscanf_r>>, <<_fiscanf_r>>, and <<_siscanf_r>> are reentrant - versions of <<iscanf>>, <<fiscanf>>, and <<siscanf>> that take an additional - first argument pointing to a reentrancy structure. - -RETURNS - <<iscanf>> returns the number of input fields successfully - scanned, converted and stored; the return value does - not include scanned fields which were not stored. - - If <<iscanf>> attempts to read at end-of-file, the return - value is <<EOF>>. - - If no fields were stored, the return value is <<0>>. - -PORTABILITY -<<iscanf>>, <<fiscanf>>, and <<siscanf>> are newlib extensions. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <string.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include "local.h" - -#ifndef _REENT_ONLY - -#ifdef _HAVE_STDC -int -_DEFUN(siscanf, (str, fmt), - _CONST char *str _AND - _CONST char *fmt _DOTS) -#else -int -siscanf(str, fmt, va_alist) - _CONST char *str; - _CONST char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - FILE f; - - f._flags = __SRD | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._r = strlen (str); - f._read = __seofread; - f._ub._base = NULL; - f._lb._base = NULL; - f._file = -1; /* No file. */ -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = __ssvfiscanf_r (_REENT, &f, fmt, ap); - va_end (ap); - return ret; -} - -#endif /* !_REENT_ONLY */ - -#ifdef _HAVE_STDC -int -_DEFUN(_siscanf_r, (ptr, str, fmt), - struct _reent *ptr _AND - _CONST char *str _AND - _CONST char *fmt _DOTS) -#else -int -_siscanf_r(ptr, str, fmt, va_alist) - struct _reent *ptr; - _CONST char *str; - _CONST char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - FILE f; - - f._flags = __SRD | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._r = strlen (str); - f._read = __seofread; - f._ub._base = NULL; - f._lb._base = NULL; - f._file = -1; /* No file. */ -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = __ssvfiscanf_r (ptr, &f, fmt, ap); - va_end (ap); - return ret; -} diff --git a/newlib/libc/stdio/sniprintf.c b/newlib/libc/stdio/sniprintf.c deleted file mode 100644 index 98a2c2509..000000000 --- a/newlib/libc/stdio/sniprintf.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 1990, 2007 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* This code created by modifying snprintf.c so copyright inherited. */ -/* doc in siprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include <limits.h> -#include <errno.h> -#include "local.h" - -int -#ifdef _HAVE_STDC -_DEFUN (_sniprintf_r, (ptr, str, size, fmt), - struct _reent *ptr _AND - char *str _AND - size_t size _AND - _CONST char *fmt _DOTS) -#else -_sniprintf_r (ptr, str, size, fmt, va_alist) - struct _reent *ptr; - char *str; - size_t size; - _CONST char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - FILE f; - - if (size > INT_MAX) - { - ptr->_errno = EOVERFLOW; - return EOF; - } - f._flags = __SWR | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._w = (size > 0 ? size - 1 : 0); - f._file = -1; /* No file. */ -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = _svfiprintf_r (ptr, &f, fmt, ap); - va_end (ap); - if (ret < EOF) - ptr->_errno = EOVERFLOW; - if (size > 0) - *f._p = 0; - return (ret); -} - -#ifndef _REENT_ONLY - -int -#ifdef _HAVE_STDC -_DEFUN (sniprintf, (str, size, fmt), - char *str _AND - size_t size _AND - _CONST char *fmt _DOTS) -#else -sniprintf (str, size, fmt, va_alist) - char *str; - size_t size; - _CONST char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - FILE f; - struct _reent *ptr = _REENT; - - if (size > INT_MAX) - { - ptr->_errno = EOVERFLOW; - return EOF; - } - f._flags = __SWR | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._w = (size > 0 ? size - 1 : 0); - f._file = -1; /* No file. */ -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = _svfiprintf_r (ptr, &f, fmt, ap); - va_end (ap); - if (ret < EOF) - ptr->_errno = EOVERFLOW; - if (size > 0) - *f._p = 0; - return (ret); -} - -#endif diff --git a/newlib/libc/stdio/snprintf.c b/newlib/libc/stdio/snprintf.c deleted file mode 100644 index 13414e3d1..000000000 --- a/newlib/libc/stdio/snprintf.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 1990, 2007 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* doc in sprintf.c */ -/* This code created by modifying sprintf.c so copyright inherited. */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include <limits.h> -#include <errno.h> -#include "local.h" - -int -#ifdef _HAVE_STDC -_DEFUN(_snprintf_r, (ptr, str, size, fmt), - struct _reent *ptr _AND - char *str _AND - size_t size _AND - _CONST char *fmt _DOTS) -#else -_snprintf_r(ptr, str, size, fmt, va_alist) - struct _reent *ptr; - char *str; - size_t size; - _CONST char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - FILE f; - - if (size > INT_MAX) - { - ptr->_errno = EOVERFLOW; - return EOF; - } - f._flags = __SWR | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._w = (size > 0 ? size - 1 : 0); - f._file = -1; /* No file. */ -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = _svfprintf_r (ptr, &f, fmt, ap); - va_end (ap); - if (ret < EOF) - ptr->_errno = EOVERFLOW; - if (size > 0) - *f._p = 0; - return (ret); -} - -#ifndef _REENT_ONLY - -int -#ifdef _HAVE_STDC -_DEFUN(snprintf, (str, size, fmt), - char *str _AND - size_t size _AND - _CONST char *fmt _DOTS) -#else -snprintf(str, size, fmt, va_alist) - char *str; - size_t size; - _CONST char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - FILE f; - struct _reent *ptr = _REENT; - - if (size > INT_MAX) - { - ptr->_errno = EOVERFLOW; - return EOF; - } - f._flags = __SWR | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._w = (size > 0 ? size - 1 : 0); - f._file = -1; /* No file. */ -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = _svfprintf_r (ptr, &f, fmt, ap); - va_end (ap); - if (ret < EOF) - ptr->_errno = EOVERFLOW; - if (size > 0) - *f._p = 0; - return (ret); -} - -#endif diff --git a/newlib/libc/stdio/sprintf.c b/newlib/libc/stdio/sprintf.c deleted file mode 100644 index 072622e75..000000000 --- a/newlib/libc/stdio/sprintf.c +++ /dev/null @@ -1,640 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<sprintf>>, <<fprintf>>, <<printf>>, <<snprintf>>, <<asprintf>>, <<asnprintf>>---format output - -INDEX - fprintf -INDEX - _fprintf_r -INDEX - printf -INDEX - _printf_r -INDEX - asprintf -INDEX - _asprintf_r -INDEX - sprintf -INDEX - _sprintf_r -INDEX - snprintf -INDEX - _snprintf_r -INDEX - asnprintf -INDEX - _asnprintf_r - -ANSI_SYNOPSIS - #include <stdio.h> - - int printf(const char *<[format]>, ...); - int fprintf(FILE *<[fd]>, const char *<[format]>, ...); - int sprintf(char *<[str]>, const char *<[format]>, ...); - int snprintf(char *<[str]>, size_t <[size]>, const char *<[format]>, - ...); - int asprintf(char **<[strp]>, const char *<[format]>, ...); - char *asnprintf(char *<[str]>, size_t *<[size]>, const char *<[format]>, - ...); - - int _printf_r(struct _reent *<[ptr]>, const char *<[format]>, ...); - int _fprintf_r(struct _reent *<[ptr]>, FILE *<[fd]>, - const char *<[format]>, ...); - int _sprintf_r(struct _reent *<[ptr]>, char *<[str]>, - const char *<[format]>, ...); - int _snprintf_r(struct _reent *<[ptr]>, char *<[str]>, size_t <[size]>, - const char *<[format]>, ...); - int _asprintf_r(struct _reent *<[ptr]>, char **<[strp]>, - const char *<[format]>, ...); - char *_asnprintf_r(struct _reent *<[ptr]>, char *<[str]>, - size_t *<[size]>, const char *<[format]>, ...); - -DESCRIPTION - <<printf>> accepts a series of arguments, applies to each a - format specifier from <<*<[format]>>>, and writes the - formatted data to <<stdout>>, without a terminating NUL - character. The behavior of <<printf>> is undefined if there - are not enough arguments for the format. <<printf>> returns - when it reaches the end of the format string. If there are - more arguments than the format requires, excess arguments are - ignored. - - <<fprintf>> is like <<printf>>, except that output is directed - to the stream <[fd]> rather than <<stdout>>. - - <<sprintf>> is like <<printf>>, except that output is directed - to the buffer <[str]>, and a terminating NUL is output. - Behavior is undefined if more output is generated than the - buffer can hold. - - <<snprintf>> is like <<sprintf>>, except that output is - limited to at most <[size]> bytes, including the terminating - <<NUL>>. As a special case, if <[size]> is 0, <[str]> can be - NULL, and <<snprintf>> merely calculates how many bytes would - be printed. - - <<asprintf>> is like <<sprintf>>, except that the output is - stored in a dynamically allocated buffer, <[pstr]>, which - should be freed later with <<free>>. - - <<asnprintf>> is like <<sprintf>>, except that the return type - is either the original <[str]> if it was large enough, or a - dynamically allocated string if the output exceeds *<[size]>; - the length of the result is returned in *<[size]>. When - dynamic allocation occurs, the contents of the original - <[str]> may have been modified. - - For <<sprintf>>, <<snprintf>>, and <<asnprintf>>, the behavior - is undefined if the output <<*<[str]>>> overlaps with one of - the arguments. Behavior is also undefined if the argument for - <<%n>> within <<*<[format]>>> overlaps another argument. - - <[format]> is a pointer to a character string containing two - types of objects: ordinary characters (other than <<%>>), - which are copied unchanged to the output, and conversion - specifications, each of which is introduced by <<%>>. (To - include <<%>> in the output, use <<%%>> in the format string.) - A conversion specification has the following form: - -. %[<[pos]>][<[flags]>][<[width]>][.<[prec]>][<[size]>]<[type]> - - The fields of the conversion specification have the following - meanings: - - O+ - o <[pos]> - - Conversions normally consume arguments in the order that they - are presented. However, it is possible to consume arguments - out of order, and reuse an argument for more than one - conversion specification (although the behavior is undefined - if the same argument is requested with different types), by - specifying <[pos]>, which is a decimal integer followed by - '$'. The integer must be between 1 and <NL_ARGMAX> from - limits.h, and if argument <<%n$>> is requested, all earlier - arguments must be requested somewhere within <[format]>. If - positional parameters are used, then all conversion - specifications except for <<%%>> must specify a position. - This positional parameters method is a POSIX extension to the C - standard definition for the functions. - - o <[flags]> - - <[flags]> is an optional sequence of characters which control - output justification, numeric signs, decimal points, trailing - zeros, and octal and hex prefixes. The flag characters are - minus (<<->>), plus (<<+>>), space ( ), zero (<<0>>), sharp - (<<#>>), and quote (<<'>>). They can appear in any - combination, although not all flags can be used for all - conversion specification types. - - o+ - o ' - A POSIX extension to the C standard. However, this - implementation presently treats it as a no-op, which - is the default behavior for the C locale, anyway. (If - it did what it is supposed to, when <[type]> were <<i>>, - <<d>>, <<u>>, <<f>>, <<F>>, <<g>>, or <<G>>, the - integer portion of the conversion would be formatted - with thousands' grouping wide characters.) - - o - - The result of the conversion is left - justified, and the right is padded with - blanks. If you do not use this flag, the - result is right justified, and padded on the - left. - - o + - The result of a signed conversion (as - determined by <[type]> of <<d>>, <<i>>, <<a>>, - <<A>>, <<e>>, <<E>>, <<f>>, <<F>>, <<g>>, or - <<G>>) will always begin with a plus or minus - sign. (If you do not use this flag, positive - values do not begin with a plus sign.) - - o " " (space) - If the first character of a signed conversion - specification is not a sign, or if a signed - conversion results in no characters, the - result will begin with a space. If the space - ( ) flag and the plus (<<+>>) flag both - appear, the space flag is ignored. - - o 0 - If the <[type]> character is <<d>>, <<i>>, - <<o>>, <<u>>, <<x>>, <<X>>, <<a>>, <<A>>, - <<e>>, <<E>>, <<f>>, <<F>>, <<g>>, or <<G>>: leading - zeros are used to pad the field width - (following any indication of sign or base); no - spaces are used for padding. If the zero - (<<0>>) and minus (<<->>) flags both appear, - the zero (<<0>>) flag will be ignored. For - <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, and <<X>> - conversions, if a precision <[prec]> is - specified, the zero (<<0>>) flag is ignored. - - Note that <<0>> is interpreted as a flag, not - as the beginning of a field width. - - o # - The result is to be converted to an - alternative form, according to the <[type]> - character: - - o+ - o o - Increases precision to force the first - digit of the result to be a zero. - - o x - A non-zero result will have a <<0x>> - prefix. - - o X - A non-zero result will have a <<0X>> - prefix. - - o a, A, e, E, f, or F - The result will always contain a - decimal point even if no digits follow - the point. (Normally, a decimal point - appears only if a digit follows it.) - Trailing zeros are removed. - - o g or G - The result will always contain a - decimal point even if no digits follow - the point. Trailing zeros are not - removed. - - o all others - Undefined. - - o- - o- - - o <[width]> - - <[width]> is an optional minimum field width. You can - either specify it directly as a decimal integer, or - indirectly by using instead an asterisk (<<*>>), in - which case an <<int>> argument is used as the field - width. If positional arguments are used, then the - width must also be specified positionally as <<*m$>>, - with m as a decimal integer. Negative field widths - are treated as specifying the minus (<<->>) flag for - left justfication, along with a positive field width. - The resulting format may be wider than the specified - width. - - o <[prec]> - - <[prec]> is an optional field; if present, it is - introduced with `<<.>>' (a period). You can specify - the precision either directly as a decimal integer or - indirectly by using an asterisk (<<*>>), in which case - an <<int>> argument is used as the precision. If - positional arguments are used, then the precision must - also be specified positionally as <<*m$>>, with m as a - decimal integer. Supplying a negative precision is - equivalent to omitting the precision. If only a - period is specified the precision is zero. The effect - depends on the conversion <[type]>. - - o+ - o d, i, o, u, x, or X - Minimum number of digits to appear. If no - precision is given, defaults to 1. - - o a or A - Number of digits to appear after the decimal - point. If no precision is given, the - precision defaults to the minimum needed for - an exact representation. - - o e, E, f or F - Number of digits to appear after the decimal - point. If no precision is given, the - precision defaults to 6. - - o g or G - Maximum number of significant digits. A - precision of 0 is treated the same as a - precision of 1. If no precision is given, the - precision defaults to 6. - - o s or S - Maximum number of characters to print from the - string. If no precision is given, the entire - string is printed. - - o all others - undefined. - - o- - - o <[size]> - - <[size]> is an optional modifier that changes the data - type that the corresponding argument has. Behavior is - unspecified if a size is given that does not match the - <[type]>. - - o+ - o hh - With <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, or - <<X>>, specifies that the argument should be - converted to a <<signed char>> or <<unsigned - char>> before printing. - - With <<n>>, specifies that the argument is a - pointer to a <<signed char>>. - - o h - With <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, or - <<X>>, specifies that the argument should be - converted to a <<short>> or <<unsigned short>> - before printing. - - With <<n>>, specifies that the argument is a - pointer to a <<short>>. - - o l - With <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, or - <<X>>, specifies that the argument is a - <<long>> or <<unsigned long>>. - - With <<c>>, specifies that the argument has - type <<wint_t>>. - - With <<s>>, specifies that the argument is a - pointer to <<wchar_t>>. - - With <<n>>, specifies that the argument is a - pointer to a <<long>>. - - With <<a>>, <<A>>, <<e>>, <<E>>, <<f>>, <<F>>, - <<g>>, or <<G>>, has no effect (because of - vararg promotion rules, there is no need to - distinguish between <<float>> and <<double>>). - - o ll - With <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, or - <<X>>, specifies that the argument is a - <<long long>> or <<unsigned long long>>. - - With <<n>>, specifies that the argument is a - pointer to a <<long long>>. - - o j - With <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, or - <<X>>, specifies that the argument is an - <<intmax_t>> or <<uintmax_t>>. - - With <<n>>, specifies that the argument is a - pointer to an <<intmax_t>>. - - o z - With <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, or - <<X>>, specifies that the argument is a <<size_t>>. - - With <<n>>, specifies that the argument is a - pointer to a <<size_t>>. - - o t - With <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, or - <<X>>, specifies that the argument is a - <<ptrdiff_t>>. - - With <<n>>, specifies that the argument is a - pointer to a <<ptrdiff_t>>. - - o L - With <<a>>, <<A>>, <<e>>, <<E>>, <<f>>, <<F>>, - <<g>>, or <<G>>, specifies that the argument - is a <<long double>>. - - o- - - o <[type]> - - <[type]> specifies what kind of conversion <<printf>> - performs. Here is a table of these: - - o+ - o % - Prints the percent character (<<%>>). - - o c - Prints <[arg]> as single character. If the - <<l>> size specifier is in effect, a multibyte - character is printed. - - o C - Short for <<%lc>>. A POSIX extension to the C standard. - - o s - Prints the elements of a pointer to <<char>> - until the precision or a null character is - reached. If the <<l>> size specifier is in - effect, the pointer is to an array of - <<wchar_t>>, and the string is converted to - multibyte characters before printing. - - o S - Short for <<%ls>>. A POSIX extension to the C standard. - - o d or i - Prints a signed decimal integer; takes an - <<int>>. Leading zeros are inserted as - necessary to reach the precision. A value of 0 with - a precision of 0 produces an empty string. - - o D - Newlib extension, short for <<%ld>>. - - o o - Prints an unsigned octal integer; takes an - <<unsigned>>. Leading zeros are inserted as - necessary to reach the precision. A value of 0 with - a precision of 0 produces an empty string. - - o O - Newlib extension, short for <<%lo>>. - - o u - Prints an unsigned decimal integer; takes an - <<unsigned>>. Leading zeros are inserted as - necessary to reach the precision. A value of 0 with - a precision of 0 produces an empty string. - - o U - Newlib extension, short for <<%lu>>. - - o x - Prints an unsigned hexadecimal integer (using - <<abcdef>> as digits beyond <<9>>); takes an - <<unsigned>>. Leading zeros are inserted as - necessary to reach the precision. A value of 0 with - a precision of 0 produces an empty string. - - o X - Like <<x>>, but uses <<ABCDEF>> as digits - beyond <<9>>. - - o f - Prints a signed value of the form - <<[-]9999.9999>>, with the precision - determining how many digits follow the decimal - point; takes a <<double>> (remember that - <<float>> promotes to <<double>> as a vararg). - The low order digit is rounded to even. If - the precision results in at most DECIMAL_DIG - digits, the result is rounded correctly; if - more than DECIMAL_DIG digits are printed, the - result is only guaranteed to round back to the - original value. - - If the value is infinite, the result is - <<inf>>, and no zero padding is performed. If - the value is not a number, the result is - <<nan>>, and no zero padding is performed. - - o F - Like <<f>>, but uses <<INF>> and <<NAN>> for - non-finite numbers. - - o e - Prints a signed value of the form - <<[-]9.9999e[+|-]999>>; takes a <<double>>. - The digit before the decimal point is non-zero - if the value is non-zero. The precision - determines how many digits appear between - <<.>> and <<e>>, and the exponent always - contains at least two digits. The value zero - has an exponent of zero. If the value is not - finite, it is printed like <<f>>. - - o E - Like <<e>>, but using <<E>> to introduce the - exponent, and like <<F>> for non-finite - values. - - o g - Prints a signed value in either <<f>> or <<e>> - form, based on the given value and - precision---an exponent less than -4 or - greater than the precision selects the <<e>> - form. Trailing zeros and the decimal point - are printed only if necessary; takes a - <<double>>. - - o G - Like <<g>>, except use <<F>> or <<E>> form. - - o a - Prints a signed value of the form - <<[-]0x1.ffffp[+|-]9>>; takes a <<double>>. - The letters <<abcdef>> are used for digits - beyond <<9>>. The precision determines how - many digits appear after the decimal point. - The exponent contains at least one digit, and - is a decimal value representing the power of - 2; a value of 0 has an exponent of 0. - Non-finite values are printed like <<f>>. - - o A - Like <<a>>, except uses <<X>>, <<P>>, and - <<ABCDEF>> instead of lower case. - - o n - Takes a pointer to <<int>>, and stores a count - of the number of bytes written so far. No - output is created. - - o p - Takes a pointer to <<void>>, and prints it in - an implementation-defined format. This - implementation is similar to <<%#tx>>), except - that <<0x>> appears even for the NULL pointer. - - o- - O- - - <<_printf_r>>, <<_fprintf_r>>, <<_asprintf_r>>, - <<_sprintf_r>>, <<_snprintf_r>>, <<_asnprintf_r>> are simply - reentrant versions of the functions above. - -RETURNS -On success, <<sprintf>> and <<asprintf>> return the number of bytes in -the output string, except the concluding <<NUL>> is not counted. -<<snprintf>> returns the number of bytes that would be in the output -string, except the concluding <<NUL>> is not counted. <<printf>> and -<<fprintf>> return the number of characters transmitted. -<<asnprintf>> returns the original <[str]> if there was enough room, -otherwise it returns an allocated string. - -If an error occurs, the result of <<printf>>, <<fprintf>>, -<<snprintf>>, and <<asprintf>> is a negative value, and the result of -<<asnprintf>> is NULL. No error returns occur for <<sprintf>>. For -<<printf>> and <<fprintf>>, <<errno>> may be set according to -<<fputc>>. For <<asprintf>> and <<asnprintf>>, <<errno>> may be set -to ENOMEM if allocation fails, and for <<snprintf>>, <<errno>> may be -set to EOVERFLOW if <[size]> or the output length exceeds INT_MAX. - -BUGS -The ``''' (quote) flag does not work when locale's thousands_sep is not empty. - -PORTABILITY -ANSI C requires <<printf>>, <<fprintf>>, <<sprintf>>, and -<<snprintf>>. <<asprintf>> and <<asnprintf>> are newlib extensions. - -The ANSI C standard specifies that implementations must support at -least formatted output of up to 509 characters. This implementation -has no inherent limit. - -Depending on how newlib was configured, not all format specifiers are -supported. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include <limits.h> -#include "local.h" - -int -#ifdef _HAVE_STDC -_DEFUN(_sprintf_r, (ptr, str, fmt), - struct _reent *ptr _AND - char *str _AND - _CONST char *fmt _DOTS) -#else -_sprintf_r(ptr, str, fmt, va_alist) - struct _reent *ptr; - char *str; - _CONST char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - FILE f; - - f._flags = __SWR | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._w = INT_MAX; - f._file = -1; /* No file. */ -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = _svfprintf_r (ptr, &f, fmt, ap); - va_end (ap); - *f._p = '\0'; /* terminate the string */ - return (ret); -} - -#ifndef _REENT_ONLY - -int -#ifdef _HAVE_STDC -_DEFUN(sprintf, (str, fmt), - char *str _AND - _CONST char *fmt _DOTS) -#else -sprintf(str, fmt, va_alist) - char *str; - _CONST char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - FILE f; - - f._flags = __SWR | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._w = INT_MAX; - f._file = -1; /* No file. */ -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = _svfprintf_r (_REENT, &f, fmt, ap); - va_end (ap); - *f._p = '\0'; /* terminate the string */ - return (ret); -} - -#endif diff --git a/newlib/libc/stdio/sscanf.c b/newlib/libc/stdio/sscanf.c deleted file mode 100644 index 974ae812b..000000000 --- a/newlib/libc/stdio/sscanf.c +++ /dev/null @@ -1,469 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<sscanf>>, <<fscanf>>, <<scanf>>---scan and format input - -INDEX - scanf -INDEX - _scanf_r -INDEX - fscanf -INDEX - _fscanf_r -INDEX - sscanf -INDEX - _sscanf_r - -ANSI_SYNOPSIS - #include <stdio.h> - - int scanf(const char *<[format]>, ...); - int fscanf(FILE *<[fd]>, const char *<[format]>, ...); - int sscanf(const char *<[str]>, const char *<[format]>, ...); - - int _scanf_r(struct _reent *<[ptr]>, const char *<[format]>, ...); - int _fscanf_r(struct _reent *<[ptr]>, FILE *<[fd]>, - const char *<[format]>, ...); - int _sscanf_r(struct _reent *<[ptr]>, const char *<[str]>, - const char *<[format]>, ...); - - -TRAD_SYNOPSIS - #include <stdio.h> - - int scanf(<[format]> [, <[arg]>, ...]) - char *<[format]>; - - int fscanf(<[fd]>, <[format]> [, <[arg]>, ...]); - FILE *<[fd]>; - char *<[format]>; - - int sscanf(<[str]>, <[format]> [, <[arg]>, ...]); - char *<[str]>; - char *<[format]>; - - int _scanf_r(<[ptr]>, <[format]> [, <[arg]>, ...]) - struct _reent *<[ptr]>; - char *<[format]>; - - int _fscanf_r(<[ptr]>, <[fd]>, <[format]> [, <[arg]>, ...]); - struct _reent *<[ptr]>; - FILE *<[fd]>; - char *<[format]>; - - int _sscanf_r(<[ptr]>, <[str]>, <[format]> [, <[arg]>, ...]); - struct _reent *<[ptr]>; - char *<[str]>; - char *<[format]>; - - -DESCRIPTION - <<scanf>> scans a series of input fields from standard input, - one character at a time. Each field is interpreted according to - a format specifier passed to <<scanf>> in the format string at - <<*<[format]>>>. <<scanf>> stores the interpreted input from - each field at the address passed to it as the corresponding argument - following <[format]>. You must supply the same number of - format specifiers and address arguments as there are input fields. - - There must be sufficient address arguments for the given format - specifiers; if not the results are unpredictable and likely - disasterous. Excess address arguments are merely ignored. - - <<scanf>> often produces unexpected results if the input diverges from - an expected pattern. Since the combination of <<gets>> or <<fgets>> - followed by <<sscanf>> is safe and easy, that is the preferred way - to be certain that a program is synchronized with input at the end - of a line. - - <<fscanf>> and <<sscanf>> are identical to <<scanf>>, other than the - source of input: <<fscanf>> reads from a file, and <<sscanf>> - from a string. - - The routines <<_scanf_r>>, <<_fscanf_r>>, and <<_sscanf_r>> are reentrant - versions of <<scanf>>, <<fscanf>>, and <<sscanf>> that take an additional - first argument pointing to a reentrancy structure. - - The string at <<*<[format]>>> is a character sequence composed - of zero or more directives. Directives are composed of - one or more whitespace characters, non-whitespace characters, - and format specifications. - - Whitespace characters are blank (<< >>), tab (<<\t>>), or - newline (<<\n>>). - When <<scanf>> encounters a whitespace character in the format string - it will read (but not store) all consecutive whitespace characters - up to the next non-whitespace character in the input. - - Non-whitespace characters are all other ASCII characters except the - percent sign (<<%>>). When <<scanf>> encounters a non-whitespace - character in the format string it will read, but not store - a matching non-whitespace character. - - Format specifications tell <<scanf>> to read and convert characters - from the input field into specific types of values, and store then - in the locations specified by the address arguments. - - Trailing whitespace is left unread unless explicitly - matched in the format string. - - The format specifiers must begin with a percent sign (<<%>>) - and have the following form: - -. %[*][<[width]>][<[size]>]<[type]> - - Each format specification begins with the percent character (<<%>>). - The other fields are: - o+ - o * - an optional marker; if present, it suppresses interpretation and - assignment of this input field. - - o <[width]> - an optional maximum field width: a decimal integer, - which controls the maximum number of characters that - will be read before converting the current input field. If the - input field has fewer than <[width]> characters, <<scanf>> - reads all the characters in the field, and then - proceeds with the next field and its format specification. - - If a whitespace or a non-convertable character occurs - before <[width]> character are read, the characters up - to that character are read, converted, and stored. - Then <<scanf>> proceeds to the next format specification. - - o size - <<h>>, <<j>>, <<l>>, <<L>>, <<t>>, and <<z>> are optional size - characters which override the default way that <<scanf>> - interprets the data type of the corresponding argument. - - -.Modifier Type(s) -. hh d, i, o, u, x, n convert input to char, -. store in char object -. -. h d, i, o, u, x, n convert input to short, -. store in short object -. -. h D, I, O, U, X no effect -. e, f, c, s, p -. -. j d, i, o, u, x, n convert input to intmax_t, -. store in intmax_t object -. -. j all others no effect -. -. l d, i, o, u, x, n convert input to long, -. store in long object -. -. l e, f, g convert input to double -. store in a double object -. -. l D, I, O, U, X no effect -. c, s, p -. -. ll d, i, o, u, x, n convert to long long, -. store in long long -. -. L d, i, o, u, x, n convert to long long, -. store in long long -. -. L e, f, g, E, G convert to long double, -. store in long double -. -. L all others no effect -. -. t d, i, o, u, x, n convert input to ptrdiff_t, -. store in ptrdiff_t object -. -. t all others no effect -. -. z d, i, o, u, x, n convert input to size_t, -. store in size_t object -. -. z all others no effect -. - - - o <[type]> - - A character to specify what kind of conversion - <<scanf>> performs. Here is a table of the conversion - characters: - - o+ - o % - No conversion is done; the percent character (<<%>>) is stored. - - o c - Scans one character. Corresponding <[arg]>: <<(char *arg)>>. - - o s - Reads a character string into the array supplied. - Corresponding <[arg]>: <<(char arg[])>>. - - o [<[pattern]>] - Reads a non-empty character string into memory - starting at <[arg]>. This area must be large - enough to accept the sequence and a - terminating null character which will be added - automatically. (<[pattern]> is discussed in the paragraph following - this table). Corresponding <[arg]>: <<(char *arg)>>. - - o d - Reads a decimal integer into the corresponding <[arg]>: <<(int *arg)>>. - - o D - Reads a decimal integer into the corresponding - <[arg]>: <<(long *arg)>>. - - o o - Reads an octal integer into the corresponding <[arg]>: <<(int *arg)>>. - - o O - Reads an octal integer into the corresponding <[arg]>: <<(long *arg)>>. - - o u - Reads an unsigned decimal integer into the corresponding - <[arg]>: <<(unsigned int *arg)>>. - - - o U - Reads an unsigned decimal integer into the corresponding <[arg]>: - <<(unsigned long *arg)>>. - - o x,X - Read a hexadecimal integer into the corresponding <[arg]>: - <<(int *arg)>>. - - o e, f, g - Read a floating-point number into the corresponding <[arg]>: - <<(float *arg)>>. - - o E, F, G - Read a floating-point number into the corresponding <[arg]>: - <<(double *arg)>>. - - o i - Reads a decimal, octal or hexadecimal integer into the - corresponding <[arg]>: <<(int *arg)>>. - - o I - Reads a decimal, octal or hexadecimal integer into the - corresponding <[arg]>: <<(long *arg)>>. - - o n - Stores the number of characters read in the corresponding - <[arg]>: <<(int *arg)>>. - - o p - Stores a scanned pointer. ANSI C leaves the details - to each implementation; this implementation treats - <<%p>> exactly the same as <<%U>>. Corresponding - <[arg]>: <<(void **arg)>>. - o- - - A <[pattern]> of characters surrounded by square brackets can be used - instead of the <<s>> type character. <[pattern]> is a set of - characters which define a search set of possible characters making up - the <<scanf>> input field. If the first character in the brackets is a - caret (<<^>>), the search set is inverted to include all ASCII characters - except those between the brackets. There is also a range facility - which you can use as a shortcut. <<%[0-9] >> matches all decimal digits. - The hyphen must not be the first or last character in the set. - The character prior to the hyphen must be lexically less than the - character after it. - - Here are some <[pattern]> examples: - o+ - o %[abcd] - matches strings containing only <<a>>, <<b>>, <<c>>, and <<d>>. - - o %[^abcd] - matches strings containing any characters except <<a>>, <<b>>, - <<c>>, or <<d>> - - o %[A-DW-Z] - matches strings containing <<A>>, <<B>>, <<C>>, <<D>>, <<W>>, - <<X>>, <<Y>>, <<Z>> - - o %[z-a] - matches the characters <<z>>, <<->>, and <<a>> - o- - - Floating point numbers (for field types <<e>>, <<f>>, <<g>>, <<E>>, - <<F>>, <<G>>) must correspond to the following general form: - -. [+/-] ddddd[.]ddd [E|e[+|-]ddd] - - where objects inclosed in square brackets are optional, and <<ddd>> - represents decimal, octal, or hexadecimal digits. - o- - -RETURNS - <<scanf>> returns the number of input fields successfully - scanned, converted and stored; the return value does - not include scanned fields which were not stored. - - If <<scanf>> attempts to read at end-of-file, the return - value is <<EOF>>. - - If no fields were stored, the return value is <<0>>. - - <<scanf>> might stop scanning a particular field before - reaching the normal field end character, or may - terminate entirely. - - <<scanf>> stops scanning and storing the current field - and moves to the next input field (if any) - in any of the following situations: - - O+ - o The assignment suppressing character (<<*>>) appears - after the <<%>> in the format specification; the current - input field is scanned but not stored. - - o <[width]> characters have been read (<[width]> is a - width specification, a positive decimal integer). - - o The next character read cannot be converted - under the the current format (for example, - if a <<Z>> is read when the format is decimal). - - o The next character in the input field does not appear - in the search set (or does appear in the inverted search set). - O- - - When <<scanf>> stops scanning the current input field for one of - these reasons, the next character is considered unread and - used as the first character of the following input field, or the - first character in a subsequent read operation on the input. - - <<scanf>> will terminate under the following circumstances: - - O+ - o The next character in the input field conflicts - with a corresponding non-whitespace character in the - format string. - - o The next character in the input field is <<EOF>>. - - o The format string has been exhausted. - O- - - When the format string contains a character sequence that is - not part of a format specification, the same character - sequence must appear in the input; <<scanf>> will - scan but not store the matched characters. If a - conflict occurs, the first conflicting character remains in the input - as if it had never been read. - -PORTABILITY -<<scanf>> is ANSI C. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <string.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include "local.h" - -#ifndef _REENT_ONLY - -#ifdef _HAVE_STDC -int -_DEFUN(sscanf, (str, fmt), - _CONST char *str _AND - _CONST char *fmt _DOTS) -#else -int -sscanf(str, fmt, va_alist) - _CONST char *str; - _CONST char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - FILE f; - - f._flags = __SRD | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._r = strlen (str); - f._read = __seofread; - f._ub._base = NULL; - f._lb._base = NULL; - f._file = -1; /* No file. */ -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = __ssvfscanf_r (_REENT, &f, fmt, ap); - va_end (ap); - return ret; -} - -#endif /* !_REENT_ONLY */ - -#ifdef _HAVE_STDC -int -_DEFUN(_sscanf_r, (ptr, str, fmt), - struct _reent *ptr _AND - _CONST char *str _AND - _CONST char *fmt _DOTS) -#else -int -_sscanf_r(ptr, str, fmt, va_alist) - struct _reent *ptr; - _CONST char *str; - _CONST char *fmt; - va_dcl -#endif -{ - int ret; - va_list ap; - FILE f; - - f._flags = __SRD | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._r = strlen (str); - f._read = __seofread; - f._ub._base = NULL; - f._lb._base = NULL; - f._file = -1; /* No file. */ -#ifdef _HAVE_STDC - va_start (ap, fmt); -#else - va_start (ap); -#endif - ret = __ssvfscanf_r (ptr, &f, fmt, ap); - va_end (ap); - return ret; -} diff --git a/newlib/libc/stdio/stdio.c b/newlib/libc/stdio/stdio.c deleted file mode 100644 index 31b787bf8..000000000 --- a/newlib/libc/stdio/stdio.c +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* No user fns here. Pesch 15apr92. */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <sys/types.h> -#include <fcntl.h> -#include <sys/unistd.h> -#include "local.h" - -/* - * Small standard I/O/seek/close functions. - * These maintain the `known seek offset' for seek optimisation. - */ - -_READ_WRITE_RETURN_TYPE -_DEFUN(__sread, (ptr, cookie, buf, n), - struct _reent *ptr _AND - void *cookie _AND - char *buf _AND - int n) -{ - register FILE *fp = (FILE *) cookie; - register int ret; - -#ifdef __SCLE - int oldmode = 0; - if (fp->_flags & __SCLE) - oldmode = setmode (fp->_file, O_BINARY); -#endif - - ret = _read_r (ptr, fp->_file, buf, n); - -#ifdef __SCLE - if (oldmode) - setmode (fp->_file, oldmode); -#endif - - /* If the read succeeded, update the current offset. */ - - if (ret >= 0) - fp->_offset += ret; - else - fp->_flags &= ~__SOFF; /* paranoia */ - return ret; -} - -/* Dummy function used in sscanf/swscanf. */ -_READ_WRITE_RETURN_TYPE -_DEFUN(__seofread, (ptr, cookie, buf, len), - struct _reent *_ptr _AND - _PTR cookie _AND - char *buf _AND - int len) -{ - return 0; -} - -_READ_WRITE_RETURN_TYPE -_DEFUN(__swrite, (ptr, cookie, buf, n), - struct _reent *ptr _AND - void *cookie _AND - char const *buf _AND - int n) -{ - register FILE *fp = (FILE *) cookie; - int w; -#ifdef __SCLE - int oldmode=0; -#endif - - if (fp->_flags & __SAPP) - _lseek_r (ptr, fp->_file, (_off_t) 0, SEEK_END); - fp->_flags &= ~__SOFF; /* in case O_APPEND mode is set */ - -#ifdef __SCLE - if (fp->_flags & __SCLE) - oldmode = setmode (fp->_file, O_BINARY); -#endif - - w = _write_r (ptr, fp->_file, buf, n); - -#ifdef __SCLE - if (oldmode) - setmode (fp->_file, oldmode); -#endif - - return w; -} - -_fpos_t -_DEFUN(__sseek, (ptr, cookie, offset, whence), - struct _reent *ptr _AND - void *cookie _AND - _fpos_t offset _AND - int whence) -{ - register FILE *fp = (FILE *) cookie; - register _off_t ret; - - ret = _lseek_r (ptr, fp->_file, (_off_t) offset, whence); - if (ret == -1L) - fp->_flags &= ~__SOFF; - else - { - fp->_flags |= __SOFF; - fp->_offset = ret; - } - return ret; -} - -int -_DEFUN(__sclose, (ptr, cookie), - struct _reent *ptr _AND - void *cookie) -{ - FILE *fp = (FILE *) cookie; - - return _close_r (ptr, fp->_file); -} - -#ifdef __SCLE -int -_DEFUN(__stextmode, (fd), - int fd) -{ -#ifdef __CYGWIN__ - extern int _cygwin_istext_for_stdio (int); - return _cygwin_istext_for_stdio (fd); -#else - return 0; -#endif -} -#endif diff --git a/newlib/libc/stdio/stdio.tex b/newlib/libc/stdio/stdio.tex deleted file mode 100644 index 2088d74ed..000000000 --- a/newlib/libc/stdio/stdio.tex +++ /dev/null @@ -1,319 +0,0 @@ -@node Stdio -@chapter Input and Output (@file{stdio.h}) - -This chapter comprises functions to manage files -or other input/output streams. Among these functions are subroutines -to generate or scan strings according to specifications from a format string. - -The underlying facilities for input and output depend on the host -system, but these functions provide a uniform interface. - -The corresponding declarations are in @file{stdio.h}. - -The reentrant versions of these functions use macros - -@example -_stdin_r(@var{reent}) -_stdout_r(@var{reent}) -_stderr_r(@var{reent}) -@end example - -@noindent -instead of the globals @code{stdin}, @code{stdout}, and -@code{stderr}. The argument <[reent]> is a pointer to a reentrancy -structure. - -@menu -* clearerr:: Clear file or stream error indicator -* diprintf:: Print to a file descriptor (integer only) -* dprintf:: Print to a file descriptor -* fclose:: Close a file -* fcloseall:: Close all files -* fdopen:: Turn an open file into a stream -* feof:: Test for end of file -* ferror:: Test whether read/write error has occurred -* fflush:: Flush buffered file output -* fgetc:: Get a character from a file or stream -* fgetpos:: Record position in a stream or file -* fgets:: Get character string from a file or stream -* fgetwc:: Get a wide character from a file or stream -* fgetws:: Get a wide character string from a file or stream -* fileno:: Get file descriptor associated with stream -* fmemopen:: Open a stream around a fixed-length buffer -* fopen:: Open a file -* fopencookie:: Open a stream with custom callbacks -* fpurge:: Discard all pending I/O on a stream -* fputc:: Write a character on a stream or file -* fputs:: Write a character string in a file or stream -* fputwc:: Write a wide character to a file or stream -* fputws:: Write a wide character string to a file or stream -* fread:: Read array elements from a file -* freopen:: Open a file using an existing file descriptor -* fseek:: Set file position -* fsetpos:: Restore position of a stream or file -* ftell:: Return position in a stream or file -* funopen:: Open a stream with custom callbacks -* fwide:: Set and determine the orientation of a FILE stream -* fwrite:: Write array elements from memory to a file or stream -* getc:: Get a character from a file or stream (macro) -* getc_unlocked:: Get a character from a file or stream (macro) -* getchar:: Get a character from standard input (macro) -* getchar_unlocked:: Get a character from standard input (macro) -* getdelim:: Get character string from a file or stream -* getline:: Get character string from a file or stream -* gets:: Get character string from standard input (obsolete) -* getw:: Get a word (int) from a file or stream -* getwchar:: Get a wide character from standard input -* mktemp:: Generate unused file name -* open_memstream:: Open a write stream around an arbitrary-length buffer -* perror:: Print an error message on standard error -* putc:: Write a character on a stream or file (macro) -* putc_unlocked:: Write a character on a stream or file (macro) -* putchar:: Write a character on standard output (macro) -* putchar_unlocked:: Write a character on standard output (macro) -* puts:: Write a character string on standard output -* putw:: Write a word (int) to a file or stream -* putwchar:: Write a wide character to standard output -* remove:: Delete a file's name -* rename:: Rename a file -* rewind:: Reinitialize a file or stream -* setbuf:: Specify full buffering for a file or stream -* setbuffer:: Specify full buffering for a file or stream with size -* setlinebuf:: Specify line buffering for a file or stream -* setvbuf:: Specify buffering for a file or stream -* siprintf:: Write formatted output (integer only) -* siscanf:: Scan and format input (integer only) -* sprintf:: Write formatted output -* sscanf:: Scan and format input -* swprintf:: Write formatted wide character output -* swscanf:: Scan and format wide character input -* tmpfile:: Create a temporary file -* tmpnam:: Generate name for a temporary file -* ungetc:: Push data back into a stream -* ungetwc:: Push wide character data back into a stream -* vfprintf:: Format variable argument list -* vfscanf:: Scan variable argument list -* vfwprintf:: Format variable wide character argument list -* vfwscanf:: Scan and format argument list from wide character input -* viprintf:: Format variable argument list (integer only) -* viscanf:: Scan variable format list (integer only) -@end menu - -@page -@include stdio/clearerr.def - -@page -@include stdio/diprintf.def - -@page -@include stdio/dprintf.def - -@page -@include stdio/fclose.def - -@page -@include stdio/fcloseall.def - -@page -@include stdio/fdopen.def - -@page -@include stdio/feof.def - -@page -@include stdio/ferror.def - -@page -@include stdio/fflush.def - -@page -@include stdio/fgetc.def - -@page -@include stdio/fgetpos.def - -@page -@include stdio/fgets.def - -@page -@include stdio/fgetwc.def - -@page -@include stdio/fgetws.def - -@page -@include stdio/fileno.def - -@page -@include stdio/fmemopen.def - -@page -@include stdio/fopen.def - -@page -@include stdio/fopencookie.def - -@page -@include stdio/fpurge.def - -@page -@include stdio/fputc.def - -@page -@include stdio/fputs.def - -@page -@include stdio/fputwc.def - -@page -@include stdio/fputws.def - -@page -@include stdio/fread.def - -@page -@include stdio/freopen.def - -@page -@include stdio/fseek.def - -@page -@include stdio/fsetpos.def - -@page -@include stdio/ftell.def - -@page -@include stdio/funopen.def - -@page -@include stdio/fwide.def - -@page -@include stdio/fwrite.def - -@page -@include stdio/getc.def - -@page -@include stdio/getc_u.def - -@page -@include stdio/getchar.def - -@page -@include stdio/getchar_u.def - -@page -@include stdio/getdelim.def - -@page -@include stdio/getline.def - -@page -@include stdio/gets.def - -@page -@include stdio/getw.def - -@page -@include stdio/getwchar.def - -@page -@include stdio/mktemp.def - -@page -@include stdio/open_memstream.def - -@page -@include stdio/perror.def - -@page -@include stdio/putc.def - -@page -@include stdio/putc_u.def - -@page -@include stdio/putchar.def - -@page -@include stdio/putchar_u.def - -@page -@include stdio/puts.def - -@page -@include stdio/putw.def - -@page -@include stdio/putwchar.def - -@page -@include stdio/remove.def - -@page -@include stdio/rename.def - -@page -@include stdio/rewind.def - -@page -@include stdio/setbuf.def - -@page -@include stdio/setbuffer.def - -@page -@include stdio/setlinebuf.def - -@page -@include stdio/setvbuf.def - -@page -@include stdio/siprintf.def - -@page -@include stdio/siscanf.def - -@page -@include stdio/sprintf.def - -@page -@include stdio/sscanf.def - -@page -@include stdio/swprintf.def - -@page -@include stdio/swscanf.def - -@page -@include stdio/tmpfile.def - -@page -@include stdio/tmpnam.def - -@page -@include stdio/ungetc.def - -@page -@include stdio/ungetwc.def - -@page -@include stdio/vfprintf.def - -@page -@include stdio/vfscanf.def - -@page -@include stdio/vfwprintf.def - -@page -@include stdio/vfwscanf.def - -@page -@include stdio/viprintf.def - -@page -@include stdio/viscanf.def diff --git a/newlib/libc/stdio/swprintf.c b/newlib/libc/stdio/swprintf.c deleted file mode 100644 index 63480176a..000000000 --- a/newlib/libc/stdio/swprintf.c +++ /dev/null @@ -1,626 +0,0 @@ -/* - * Copyright (c) 1990, 2007 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<swprintf>>, <<fwprintf>>, <<wprintf>>---wide character format output - -INDEX - fwprintf -INDEX - _fwprintf_r -INDEX - wprintf -INDEX - _wprintf_r -INDEX - swprintf -INDEX - _swprintf_r - -ANSI_SYNOPSIS - #include <wchar.h> - - int wprintf(const wchar_t *<[format]>, ...); - int fwprintf(FILE *<[fd]>, const wchar_t *<[format]>, ...); - int swprintf(wchar_t *<[str]>, size_t <[size]>, - const wchar_t *<[format]>, ...); - - int _wprintf_r(struct _reent *<[ptr]>, const wchar_t *<[format]>, ...); - int _fwprintf_r(struct _reent *<[ptr]>, FILE *<[fd]>, - const wchar_t *<[format]>, ...); - int _swprintf_r(struct _reent *<[ptr]>, wchar_t *<[str]>, - size_t <[size]>, const wchar_t *<[format]>, ...); - -DESCRIPTION - <<wprintf>> accepts a series of arguments, applies to each a - format specifier from <<*<[format]>>>, and writes the - formatted data to <<stdout>>, without a terminating NUL - wide character. The behavior of <<wprintf>> is undefined if there - are not enough arguments for the format or if any argument is not the - right type for the corresponding conversion specifier. <<wprintf>> - returns when it reaches the end of the format string. If there are - more arguments than the format requires, excess arguments are - ignored. - - <<fwprintf>> is like <<wprintf>>, except that output is directed - to the stream <[fd]> rather than <<stdout>>. - - <<swprintf>> is like <<wprintf>>, except that output is directed - to the buffer <[str]> with a terminating wide <<NUL>>, and the - resulting string length is limited to at most <[size]> wide characters, - including the terminating <<NUL>>. It is considered an error if the - output (including the terminating wide-<<NULL>>) does not fit into - <[size]> wide characters. (This error behavior is not the same as for - <<snprintf>>, which <<swprintf>> is otherwise completely analogous to. - While <<snprintf>> allows the needed size to be known simply by giving - <[size]>=0, <<swprintf>> does not, giving an error instead.) - - For <<swprintf>> the behavior is undefined if the output - <<*<[str]>>> overlaps with one of the arguments. Behavior is also - undefined if the argument for <<%n>> within <<*<[format]>>> - overlaps another argument. - - <[format]> is a pointer to a wide character string containing two - types of objects: ordinary characters (other than <<%>>), - which are copied unchanged to the output, and conversion - specifications, each of which is introduced by <<%>>. (To - include <<%>> in the output, use <<%%>> in the format string.) - A conversion specification has the following form: - -. %[<[pos]>][<[flags]>][<[width]>][.<[prec]>][<[size]>]<[type]> - - The fields of the conversion specification have the following - meanings: - - O+ - o <[pos]> - - Conversions normally consume arguments in the order that they - are presented. However, it is possible to consume arguments - out of order, and reuse an argument for more than one - conversion specification (although the behavior is undefined - if the same argument is requested with different types), by - specifying <[pos]>, which is a decimal integer followed by - '$'. The integer must be between 1 and <NL_ARGMAX> from - limits.h, and if argument <<%n$>> is requested, all earlier - arguments must be requested somewhere within <[format]>. If - positional parameters are used, then all conversion - specifications except for <<%%>> must specify a position. - This positional parameters method is a POSIX extension to the C - standard definition for the functions. - - o <[flags]> - - <[flags]> is an optional sequence of characters which control - output justification, numeric signs, decimal points, trailing - zeros, and octal and hex prefixes. The flag characters are - minus (<<->>), plus (<<+>>), space ( ), zero (<<0>>), sharp - (<<#>>), and quote (<<'>>). They can appear in any - combination, although not all flags can be used for all - conversion specification types. - - o+ - o ' - A POSIX extension to the C standard. However, this - implementation presently treats it as a no-op, which - is the default behavior for the C locale, anyway. (If - it did what it is supposed to, when <[type]> were <<i>>, - <<d>>, <<u>>, <<f>>, <<F>>, <<g>>, or <<G>>, the - integer portion of the conversion would be formatted - with thousands' grouping wide characters.) - - o - - The result of the conversion is left - justified, and the right is padded with - blanks. If you do not use this flag, the - result is right justified, and padded on the - left. - - o + - The result of a signed conversion (as - determined by <[type]> of <<d>>, <<i>>, <<a>>, - <<A>>, <<e>>, <<E>>, <<f>>, <<F>>, <<g>>, or - <<G>>) will always begin with a plus or minus - sign. (If you do not use this flag, positive - values do not begin with a plus sign.) - - o " " (space) - If the first character of a signed conversion - specification is not a sign, or if a signed - conversion results in no characters, the - result will begin with a space. If the space - ( ) flag and the plus (<<+>>) flag both - appear, the space flag is ignored. - - o 0 - If the <[type]> character is <<d>>, <<i>>, - <<o>>, <<u>>, <<x>>, <<X>>, <<a>>, <<A>>, - <<e>>, <<E>>, <<f>>, <<F>>, <<g>>, or <<G>>: leading - zeros are used to pad the field width - (following any indication of sign or base); no - spaces are used for padding. If the zero - (<<0>>) and minus (<<->>) flags both appear, - the zero (<<0>>) flag will be ignored. For - <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, and <<X>> - conversions, if a precision <[prec]> is - specified, the zero (<<0>>) flag is ignored. - - Note that <<0>> is interpreted as a flag, not - as the beginning of a field width. - - o # - The result is to be converted to an - alternative form, according to the <[type]> - character: - - o+ - o o - Increases precision to force the first - digit of the result to be a zero. - - o x - A non-zero result will have a <<0x>> - prefix. - - o X - A non-zero result will have a <<0X>> - prefix. - - o a, A, e, E, f, or F - The result will always contain a - decimal point even if no digits follow - the point. (Normally, a decimal point - appears only if a digit follows it.) - Trailing zeros are removed. - - o g or G - The result will always contain a - decimal point even if no digits follow - the point. Trailing zeros are not - removed. - - o all others - Undefined. - - o- - o- - - o <[width]> - - <[width]> is an optional minimum field width. You can - either specify it directly as a decimal integer, or - indirectly by using instead an asterisk (<<*>>), in - which case an <<int>> argument is used as the field - width. If positional arguments are used, then the - width must also be specified positionally as <<*m$>>, - with m as a decimal integer. Negative field widths - are treated as specifying the minus (<<->>) flag for - left justfication, along with a positive field width. - The resulting format may be wider than the specified - width. - - o <[prec]> - - <[prec]> is an optional field; if present, it is - introduced with `<<.>>' (a period). You can specify - the precision either directly as a decimal integer or - indirectly by using an asterisk (<<*>>), in which case - an <<int>> argument is used as the precision. If - positional arguments are used, then the precision must - also be specified positionally as <<*m$>>, with m as a - decimal integer. Supplying a negative precision is - equivalent to omitting the precision. If only a - period is specified the precision is zero. The effect - depends on the conversion <[type]>. - - o+ - o d, i, o, u, x, or X - Minimum number of digits to appear. If no - precision is given, defaults to 1. - - o a or A - Number of digits to appear after the decimal - point. If no precision is given, the - precision defaults to the minimum needed for - an exact representation. - - o e, E, f or F - Number of digits to appear after the decimal - point. If no precision is given, the - precision defaults to 6. - - o g or G - Maximum number of significant digits. A - precision of 0 is treated the same as a - precision of 1. If no precision is given, the - precision defaults to 6. - - o s or S - Maximum number of characters to print from the - string. If no precision is given, the entire - string is printed. - - o all others - undefined. - - o- - - o <[size]> - - <[size]> is an optional modifier that changes the data - type that the corresponding argument has. Behavior is - unspecified if a size is given that does not match the - <[type]>. - - o+ - o hh - With <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, or - <<X>>, specifies that the argument should be - converted to a <<signed char>> or <<unsigned - char>> before printing. - - With <<n>>, specifies that the argument is a - pointer to a <<signed char>>. - - o h - With <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, or - <<X>>, specifies that the argument should be - converted to a <<short>> or <<unsigned short>> - before printing. - - With <<n>>, specifies that the argument is a - pointer to a <<short>>. - - o l - With <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, or - <<X>>, specifies that the argument is a - <<long>> or <<unsigned long>>. - - With <<c>>, specifies that the argument has - type <<wint_t>>. - - With <<s>>, specifies that the argument is a - pointer to <<wchar_t>>. - - With <<n>>, specifies that the argument is a - pointer to a <<long>>. - - With <<a>>, <<A>>, <<e>>, <<E>>, <<f>>, <<F>>, - <<g>>, or <<G>>, has no effect (because of - vararg promotion rules, there is no need to - distinguish between <<float>> and <<double>>). - - o ll - With <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, or - <<X>>, specifies that the argument is a - <<long long>> or <<unsigned long long>>. - - With <<n>>, specifies that the argument is a - pointer to a <<long long>>. - - o j - With <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, or - <<X>>, specifies that the argument is an - <<intmax_t>> or <<uintmax_t>>. - - With <<n>>, specifies that the argument is a - pointer to an <<intmax_t>>. - - o z - With <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, or - <<X>>, specifies that the argument is a <<size_t>>. - - With <<n>>, specifies that the argument is a - pointer to a <<size_t>>. - - o t - With <<d>>, <<i>>, <<o>>, <<u>>, <<x>>, or - <<X>>, specifies that the argument is a - <<ptrdiff_t>>. - - With <<n>>, specifies that the argument is a - pointer to a <<ptrdiff_t>>. - - o L - With <<a>>, <<A>>, <<e>>, <<E>>, <<f>>, <<F>>, - <<g>>, or <<G>>, specifies that the argument - is a <<long double>>. - - o- - - o <[type]> - - <[type]> specifies what kind of conversion <<wprintf>> - performs. Here is a table of these: - - o+ - o % - Prints the percent character (<<%>>). - - o c - If no <<l>> qualifier is present, the int argument shall - be converted to a wide character as if by calling - the btowc() function and the resulting wide character - shall be written. Otherwise, the wint_t argument - shall be converted to wchar_t, and written. - - o C - Short for <<%lc>>. A POSIX extension to the C standard. - - o s - If no <<l>> qualifier is present, the application - shall ensure that the argument is a pointer to a - character array containing a character sequence - beginning in the initial shift state. Characters - from the array shall be converted as if by repeated - calls to the mbrtowc() function, with the conversion - state described by an mbstate_t object initialized to - zero before the first character is converted, and - written up to (but not including) the terminating - null wide character. If the precision is specified, - no more than that many wide characters shall be - written. If the precision is not specified, or is - greater than the size of the array, the application - shall ensure that the array contains a null wide - character. - - If an <<l>> qualifier is present, the application - shall ensure that the argument is a pointer to an - array of type wchar_t. Wide characters from the array - shall be written up to (but not including) a - terminating null wide character. If no precision is - specified, or is greater than the size of the array, - the application shall ensure that the array contains - a null wide character. If a precision is specified, - no more than that many wide characters shall be - written. - - o S - Short for <<%ls>>. A POSIX extension to the C standard. - - o d or i - Prints a signed decimal integer; takes an - <<int>>. Leading zeros are inserted as - necessary to reach the precision. A value of 0 with - a precision of 0 produces an empty string. - - o o - Prints an unsigned octal integer; takes an - <<unsigned>>. Leading zeros are inserted as - necessary to reach the precision. A value of 0 with - a precision of 0 produces an empty string. - - o u - Prints an unsigned decimal integer; takes an - <<unsigned>>. Leading zeros are inserted as - necessary to reach the precision. A value of 0 with - a precision of 0 produces an empty string. - - o x - Prints an unsigned hexadecimal integer (using - <<abcdef>> as digits beyond <<9>>); takes an - <<unsigned>>. Leading zeros are inserted as - necessary to reach the precision. A value of 0 with - a precision of 0 produces an empty string. - - o X - Like <<x>>, but uses <<ABCDEF>> as digits - beyond <<9>>. - - o f - Prints a signed value of the form - <<[-]9999.9999>>, with the precision - determining how many digits follow the decimal - point; takes a <<double>> (remember that - <<float>> promotes to <<double>> as a vararg). - The low order digit is rounded to even. If - the precision results in at most DECIMAL_DIG - digits, the result is rounded correctly; if - more than DECIMAL_DIG digits are printed, the - result is only guaranteed to round back to the - original value. - - If the value is infinite, the result is - <<inf>>, and no zero padding is performed. If - the value is not a number, the result is - <<nan>>, and no zero padding is performed. - - o F - Like <<f>>, but uses <<INF>> and <<NAN>> for - non-finite numbers. - - o e - Prints a signed value of the form - <<[-]9.9999e[+|-]999>>; takes a <<double>>. - The digit before the decimal point is non-zero - if the value is non-zero. The precision - determines how many digits appear between - <<.>> and <<e>>, and the exponent always - contains at least two digits. The value zero - has an exponent of zero. If the value is not - finite, it is printed like <<f>>. - - o E - Like <<e>>, but using <<E>> to introduce the - exponent, and like <<F>> for non-finite - values. - - o g - Prints a signed value in either <<f>> or <<e>> - form, based on the given value and - precision---an exponent less than -4 or - greater than the precision selects the <<e>> - form. Trailing zeros and the decimal point - are printed only if necessary; takes a - <<double>>. - - o G - Like <<g>>, except use <<F>> or <<E>> form. - - o a - Prints a signed value of the form - <<[-]0x1.ffffp[+|-]9>>; takes a <<double>>. - The letters <<abcdef>> are used for digits - beyond <<9>>. The precision determines how - many digits appear after the decimal point. - The exponent contains at least one digit, and - is a decimal value representing the power of - 2; a value of 0 has an exponent of 0. - Non-finite values are printed like <<f>>. - - o A - Like <<a>>, except uses <<X>>, <<P>>, and - <<ABCDEF>> instead of lower case. - - o n - Takes a pointer to <<int>>, and stores a count - of the number of bytes written so far. No - output is created. - - o p - Takes a pointer to <<void>>, and prints it in - an implementation-defined format. This - implementation is similar to <<%#tx>>), except - that <<0x>> appears even for the NULL pointer. - - o- - O- - - <<_wprintf_r>>, <<_fwprintf_r>>, <<_swprintf_r>>, are simply - reentrant versions of the functions above. - -RETURNS -On success, <<swprintf>> return the number of wide characters in -the output string, except the concluding <<NUL>> is not counted. -<<wprintf>> and <<fwprintf>> return the number of characters transmitted. - -If an error occurs, the result of <<wprintf>>, <<fwprintf>>, and -<<swprintf>> is a negative value. For <<wprintf>> and <<fwprintf>>, -<<errno>> may be set according to <<fputwc>>. For <<swprintf>>, <<errno>> -may be set to EOVERFLOW if <[size]> is greater than INT_MAX / sizeof (wchar_t), -or when the output does not fit into <[size]> wide characters (including the -terminating wide <<NULL>>). - -BUGS -The ``''' (quote) flag does not work when locale's thousands_sep is not empty. - -PORTABILITY -POSIX-1.2008 with extensions; C99 (compliant except for POSIX extensions). - -Depending on how newlib was configured, not all format specifiers are -supported. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <wchar.h> -#include <stdarg.h> -#include <limits.h> -#include <errno.h> -#include "local.h" - -/* NOTE: _swprintf_r() should be identical to swprintf() except for the - * former having ptr as a parameter and the latter needing to declare it as - * a variable set to _REENT. */ - -int -_DEFUN(_swprintf_r, (ptr, str, size, fmt), - struct _reent *ptr _AND - wchar_t *str _AND - size_t size _AND - _CONST wchar_t *fmt _DOTS) -{ - int ret; - va_list ap; - FILE f; - - if (size > INT_MAX / sizeof (wchar_t)) - { - ptr->_errno = EOVERFLOW; /* POSIX extension */ - return EOF; - } - f._flags = __SWR | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._w = (size > 0 ? (size - 1) * sizeof (wchar_t) : 0); - f._file = -1; /* No file. */ - va_start (ap, fmt); - ret = _svfwprintf_r (ptr, &f, fmt, ap); - va_end (ap); - /* _svfwprintf_r() does not put in a terminating NUL, so add one if - * appropriate, which is whenever size is > 0. _svfwprintf_r() stops - * after n-1, so always just put at the end. */ - if (size > 0) { - *(wchar_t *)f._p = L'\0'; /* terminate the string */ - } - if(ret >= size) { - /* _svfwprintf_r() returns how many wide characters it would have printed - * if there were enough space. Return an error if too big to fit in str, - * unlike snprintf, which returns the size needed. */ - ptr->_errno = EOVERFLOW; /* POSIX extension */ - ret = -1; - } - return (ret); -} - -#ifndef _REENT_ONLY - -int -_DEFUN(swprintf, (str, size, fmt), - wchar_t *str _AND - size_t size _AND - _CONST wchar_t *fmt _DOTS) -{ - int ret; - va_list ap; - FILE f; - struct _reent *ptr = _REENT; - - if (size > INT_MAX / sizeof (wchar_t)) - { - ptr->_errno = EOVERFLOW; /* POSIX extension */ - return EOF; - } - f._flags = __SWR | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._w = (size > 0 ? (size - 1) * sizeof (wchar_t) : 0); - f._file = -1; /* No file. */ - va_start (ap, fmt); - ret = _svfwprintf_r (ptr, &f, fmt, ap); - va_end (ap); - /* _svfwprintf_r() does not put in a terminating NUL, so add one if - * appropriate, which is whenever size is > 0. _svfwprintf_r() stops - * after n-1, so always just put at the end. */ - if (size > 0) { - *(wchar_t *)f._p = L'\0'; /* terminate the string */ - } - if(ret >= size) { - /* _svfwprintf_r() returns how many wide characters it would have printed - * if there were enough space. Return an error if too big to fit in str, - * unlike snprintf, which returns the size needed. */ - ptr->_errno = EOVERFLOW; /* POSIX extension */ - ret = -1; - } - return (ret); -} - -#endif diff --git a/newlib/libc/stdio/swscanf.c b/newlib/libc/stdio/swscanf.c deleted file mode 100644 index 273f59b32..000000000 --- a/newlib/libc/stdio/swscanf.c +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<swscanf>>, <<fwscanf>>, <<wscanf>>---scan and format wide character input - -INDEX - wscanf -INDEX - _wscanf_r -INDEX - fwscanf -INDEX - _fwscanf_r -INDEX - swscanf -INDEX - _swscanf_r - -ANSI_SYNOPSIS - #include <stdio.h> - - int wscanf(const wchar_t *<[format]>, ...); - int fwscanf(FILE *<[fd]>, const wchar_t *<[format]>, ...); - int swscanf(const wchar_t *<[str]>, const wchar_t *<[format]>, ...); - - int _wscanf_r(struct _reent *<[ptr]>, const wchar_t *<[format]>, ...); - int _fwscanf_r(struct _reent *<[ptr]>, FILE *<[fd]>, - const wchar_t *<[format]>, ...); - int _swscanf_r(struct _reent *<[ptr]>, const wchar_t *<[str]>, - const wchar_t *<[format]>, ...); - - -TRAD_SYNOPSIS - #include <stdio.h> - - int wscanf(<[format]> [, <[arg]>, ...]) - wchar_t *<[format]>; - - int fwscanf(<[fd]>, <[format]> [, <[arg]>, ...]); - FILE *<[fd]>; - wchar_t *<[format]>; - - int swscanf(<[str]>, <[format]> [, <[arg]>, ...]); - wchar_t *<[str]>; - wchar_t *<[format]>; - - int _wscanf_r(<[ptr]>, <[format]> [, <[arg]>, ...]) - struct _reent *<[ptr]>; - wchar_t *<[format]>; - - int _fwscanf_r(<[ptr]>, <[fd]>, <[format]> [, <[arg]>, ...]); - struct _reent *<[ptr]>; - FILE *<[fd]>; - wchar_t *<[format]>; - - int _swscanf_r(<[ptr]>, <[str]>, <[format]> [, <[arg]>, ...]); - struct _reent *<[ptr]>; - wchar_t *<[str]>; - wchar_t *<[format]>; - - -DESCRIPTION - <<wscanf>> scans a series of input fields from standard input, - one wide character at a time. Each field is interpreted according to - a format specifier passed to <<wscanf>> in the format string at - <<*<[format]>>>. <<wscanf>> stores the interpreted input from - each field at the address passed to it as the corresponding argument - following <[format]>. You must supply the same number of - format specifiers and address arguments as there are input fields. - - There must be sufficient address arguments for the given format - specifiers; if not the results are unpredictable and likely - disasterous. Excess address arguments are merely ignored. - - <<wscanf>> often produces unexpected results if the input diverges from - an expected pattern. Since the combination of <<gets>> or <<fgets>> - followed by <<swscanf>> is safe and easy, that is the preferred way - to be certain that a program is synchronized with input at the end - of a line. - - <<fwscanf>> and <<swscanf>> are identical to <<wscanf>>, other than the - source of input: <<fwscanf>> reads from a file, and <<swscanf>> - from a string. - - The routines <<_wscanf_r>>, <<_fwscanf_r>>, and <<_swscanf_r>> are reentrant - versions of <<wscanf>>, <<fwscanf>>, and <<swscanf>> that take an additional - first argument pointing to a reentrancy structure. - - The string at <<*<[format]>>> is a wide character sequence composed - of zero or more directives. Directives are composed of - one or more whitespace characters, non-whitespace characters, - and format specifications. - - Whitespace characters are blank (<< >>), tab (<<\t>>), or - newline (<<\n>>). - When <<wscanf>> encounters a whitespace character in the format string - it will read (but not store) all consecutive whitespace characters - up to the next non-whitespace character in the input. - - Non-whitespace characters are all other ASCII characters except the - percent sign (<<%>>). When <<wscanf>> encounters a non-whitespace - character in the format string it will read, but not store - a matching non-whitespace character. - - Format specifications tell <<wscanf>> to read and convert characters - from the input field into specific types of values, and store then - in the locations specified by the address arguments. - - Trailing whitespace is left unread unless explicitly - matched in the format string. - - The format specifiers must begin with a percent sign (<<%>>) - and have the following form: - -. %[*][<[width]>][<[size]>]<[type]> - - Each format specification begins with the percent character (<<%>>). - The other fields are: - o+ - o * - an optional marker; if present, it suppresses interpretation and - assignment of this input field. - - o <[width]> - an optional maximum field width: a decimal integer, - which controls the maximum number of characters that - will be read before converting the current input field. If the - input field has fewer than <[width]> characters, <<wscanf>> - reads all the characters in the field, and then - proceeds with the next field and its format specification. - - If a whitespace or a non-convertable wide character occurs - before <[width]> character are read, the characters up - to that character are read, converted, and stored. - Then <<wscanf>> proceeds to the next format specification. - - o size - <<h>>, <<j>>, <<l>>, <<L>>, <<t>>, and <<z>> are optional size - characters which override the default way that <<wscanf>> - interprets the data type of the corresponding argument. - - -.Modifier Type(s) -. hh d, i, o, u, x, n convert input to char, -. store in char object -. -. h d, i, o, u, x, n convert input to short, -. store in short object -. -. h e, f, c, s, p no effect -. -. j d, i, o, u, x, n convert input to intmax_t, -. store in intmax_t object -. -. j all others no effect -. -. l d, i, o, u, x, n convert input to long, -. store in long object -. -. l e, f, g convert input to double -. store in a double object -. -. l c, s, [ the input is stored in a wchar_t object -. -. l p no effect -. -. ll d, i, o, u, x, n convert to long long, -. store in long long -. -. L d, i, o, u, x, n convert to long long, -. store in long long -. -. L e, f, g, E, G convert to long double, -. store in long double -. -. L all others no effect -. -. t d, i, o, u, x, n convert input to ptrdiff_t, -. store in ptrdiff_t object -. -. t all others no effect -. -. z d, i, o, u, x, n convert input to size_t, -. store in size_t object -. -. z all others no effect -. - - - o <[type]> - - A character to specify what kind of conversion - <<wscanf>> performs. Here is a table of the conversion - characters: - - o+ - o % - No conversion is done; the percent character (<<%>>) is stored. - - o c - Scans one wide character. Corresponding <[arg]>: <<(char *arg)>>. - Otherwise, if an <<l>> specifier is present, the corresponding - <[arg]> is a <<(wchar_t *arg)>>. - - o s - Reads a character string into the array supplied. - Corresponding <[arg]>: <<(char arg[])>>. - If an <<l>> specifier is present, the corresponding <[arg]> is a <<(wchar_t *arg)>>. - - o [<[pattern]>] - Reads a non-empty character string into memory - starting at <[arg]>. This area must be large - enough to accept the sequence and a - terminating null character which will be added - automatically. (<[pattern]> is discussed in the paragraph following - this table). Corresponding <[arg]>: <<(char *arg)>>. - If an <<l>> specifier is present, the corresponding <[arg]> is - a <<(wchar_t *arg)>>. - - o d - Reads a decimal integer into the corresponding <[arg]>: <<(int *arg)>>. - - o o - Reads an octal integer into the corresponding <[arg]>: <<(int *arg)>>. - - o u - Reads an unsigned decimal integer into the corresponding - <[arg]>: <<(unsigned int *arg)>>. - - o x,X - Read a hexadecimal integer into the corresponding <[arg]>: - <<(int *arg)>>. - - o e, f, g - Read a floating-point number into the corresponding <[arg]>: - <<(float *arg)>>. - - o E, F, G - Read a floating-point number into the corresponding <[arg]>: - <<(double *arg)>>. - - o i - Reads a decimal, octal or hexadecimal integer into the - corresponding <[arg]>: <<(int *arg)>>. - - o n - Stores the number of characters read in the corresponding - <[arg]>: <<(int *arg)>>. - - o p - Stores a scanned pointer. ANSI C leaves the details - to each implementation; this implementation treats - <<%p>> exactly the same as <<%U>>. Corresponding - <[arg]>: <<(void **arg)>>. - o- - - A <[pattern]> of characters surrounded by square brackets can be used - instead of the <<s>> type character. <[pattern]> is a set of - characters which define a search set of possible characters making up - the <<wscanf>> input field. If the first character in the brackets is a - caret (<<^>>), the search set is inverted to include all ASCII characters - except those between the brackets. There is no range facility as is - defined in the corresponding non-wide character scanf functions. - Ranges are not part of the POSIX standard. - - Here are some <[pattern]> examples: - o+ - o %[abcd] - matches wide character strings containing only - <<a>>, <<b>>, <<c>>, and <<d>>. - - o %[^abcd] - matches wide character strings containing any characters except - <<a>>, <<b>>, <<c>>, or <<d>>. - - o %[A-DW-Z] - Note: No wide character ranges, so this expression matches wide - character strings containing <<A>>, <<->>, <<D>>, <<W>>, <<Z>>. - o- - - Floating point numbers (for field types <<e>>, <<f>>, <<g>>, <<E>>, - <<F>>, <<G>>) must correspond to the following general form: - -. [+/-] ddddd[.]ddd [E|e[+|-]ddd] - - where objects inclosed in square brackets are optional, and <<ddd>> - represents decimal, octal, or hexadecimal digits. - o- - -RETURNS - <<wscanf>> returns the number of input fields successfully - scanned, converted and stored; the return value does - not include scanned fields which were not stored. - - If <<wscanf>> attempts to read at end-of-file, the return - value is <<EOF>>. - - If no fields were stored, the return value is <<0>>. - - <<wscanf>> might stop scanning a particular field before - reaching the normal field end character, or may - terminate entirely. - - <<wscanf>> stops scanning and storing the current field - and moves to the next input field (if any) - in any of the following situations: - - O+ - o The assignment suppressing character (<<*>>) appears - after the <<%>> in the format specification; the current - input field is scanned but not stored. - - o <[width]> characters have been read (<[width]> is a - width specification, a positive decimal integer). - - o The next wide character read cannot be converted - under the the current format (for example, - if a <<Z>> is read when the format is decimal). - - o The next wide character in the input field does not appear - in the search set (or does appear in the inverted search set). - O- - - When <<wscanf>> stops scanning the current input field for one of - these reasons, the next character is considered unread and - used as the first character of the following input field, or the - first character in a subsequent read operation on the input. - - <<wscanf>> will terminate under the following circumstances: - - O+ - o The next wide character in the input field conflicts - with a corresponding non-whitespace character in the - format string. - - o The next wide character in the input field is <<WEOF>>. - - o The format string has been exhausted. - O- - - When the format string contains a wide character sequence that is - not part of a format specification, the same wide character - sequence must appear in the input; <<wscanf>> will - scan but not store the matched characters. If a - conflict occurs, the first conflicting wide character remains in the - input as if it had never been read. - -PORTABILITY -<<wscanf>> is C99, POSIX-1.2008. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <wchar.h> -#include <stdarg.h> -#include "local.h" - -#ifndef _REENT_ONLY - -int -swscanf (_CONST wchar_t *str, _CONST wchar_t *fmt, ...) -{ - int ret; - va_list ap; - FILE f; - - f._flags = __SRD | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._r = wcslen (str) * sizeof (wchar_t); - f._read = __seofread; - f._ub._base = NULL; - f._lb._base = NULL; - f._file = -1; /* No file. */ - va_start (ap, fmt); - ret = __ssvfwscanf_r (_REENT, &f, fmt, ap); - va_end (ap); - return ret; -} - -#endif /* !_REENT_ONLY */ - -int -_swscanf_r (struct _reent *ptr, _CONST wchar_t *str, _CONST wchar_t *fmt, ...) -{ - int ret; - va_list ap; - FILE f; - - f._flags = __SRD | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._r = wcslen (str) * sizeof (wchar_t); - f._read = __seofread; - f._ub._base = NULL; - f._lb._base = NULL; - f._file = -1; /* No file. */ - va_start (ap, fmt); - ret = __ssvfwscanf_r (ptr, &f, fmt, ap); - va_end (ap); - return ret; -} diff --git a/newlib/libc/stdio/tmpfile.c b/newlib/libc/stdio/tmpfile.c deleted file mode 100644 index eca4ec735..000000000 --- a/newlib/libc/stdio/tmpfile.c +++ /dev/null @@ -1,96 +0,0 @@ -/* -FUNCTION -<<tmpfile>>---create a temporary file - -INDEX - tmpfile -INDEX - _tmpfile_r - -ANSI_SYNOPSIS - #include <stdio.h> - FILE *tmpfile(void); - - FILE *_tmpfile_r(struct _reent *<[reent]>); - -TRAD_SYNOPSIS - #include <stdio.h> - FILE *tmpfile(); - - FILE *_tmpfile_r(<[reent]>) - struct _reent *<[reent]>; - -DESCRIPTION -Create a temporary file (a file which will be deleted automatically), -using a name generated by <<tmpnam>>. The temporary file is opened with -the mode <<"wb+">>, permitting you to read and write anywhere in it -as a binary file (without any data transformations the host system may -perform for text files). - -The alternate function <<_tmpfile_r>> is a reentrant version. The -argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -<<tmpfile>> normally returns a pointer to the temporary file. If no -temporary file could be created, the result is NULL, and <<errno>> -records the reason for failure. - -PORTABILITY -Both ANSI C and the System V Interface Definition (Issue 2) require -<<tmpfile>>. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<getpid>>, -<<isatty>>, <<lseek>>, <<open>>, <<read>>, <<sbrk>>, <<write>>. - -<<tmpfile>> also requires the global pointer <<environ>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <errno.h> -#include <fcntl.h> -#include <sys/stat.h> - -#ifndef O_BINARY -# define O_BINARY 0 -#endif - -FILE * -_DEFUN(_tmpfile_r, (ptr), - struct _reent *ptr) -{ - FILE *fp; - int e; - char *f; - char buf[L_tmpnam]; - int fd; - - do - { - if ((f = _tmpnam_r (ptr, buf)) == NULL) - return NULL; - fd = _open_r (ptr, f, O_RDWR | O_CREAT | O_EXCL | O_BINARY, - S_IRUSR | S_IWUSR); - } - while (fd < 0 && ptr->_errno == EEXIST); - if (fd < 0) - return NULL; - fp = _fdopen_r (ptr, fd, "wb+"); - e = ptr->_errno; - if (!fp) - _close_r (ptr, fd); - _CAST_VOID _remove_r (ptr, f); - ptr->_errno = e; - return fp; -} - -#ifndef _REENT_ONLY - -FILE * -_DEFUN_VOID(tmpfile) -{ - return _tmpfile_r (_REENT); -} - -#endif diff --git a/newlib/libc/stdio/tmpnam.c b/newlib/libc/stdio/tmpnam.c deleted file mode 100644 index ee722e630..000000000 --- a/newlib/libc/stdio/tmpnam.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - * tmpname.c - * Original Author: G. Haley - */ -/* -FUNCTION -<<tmpnam>>, <<tempnam>>---name for a temporary file - -INDEX - tmpnam -INDEX - tempnam -INDEX - _tmpnam_r -INDEX - _tempnam_r - -ANSI_SYNOPSIS - #include <stdio.h> - char *tmpnam(char *<[s]>); - char *tempnam(char *<[dir]>, char *<[pfx]>); - char *_tmpnam_r(struct _reent *<[reent]>, char *<[s]>); - char *_tempnam_r(struct _reent *<[reent]>, char *<[dir]>, char *<[pfx]>); - -TRAD_SYNOPSIS - #include <stdio.h> - char *tmpnam(<[s]>) - char *<[s]>; - - char *tempnam(<[dir]>, <[pfx]>) - char *<[dir]>; - char *<[pfx]>; - - char *_tmpnam_r(<[reent]>, <[s]>) - struct _reent *<[reent]>; - char *<[s]>; - - char *_tempnam_r(<[reent]>, <[dir]>, <[pfx]>) - struct *<[reent]>; - char *<[dir]>; - char *<[pfx]>; - -DESCRIPTION -Use either of these functions to generate a name for a temporary file. -The generated name is guaranteed to avoid collision with other files -(for up to <<TMP_MAX>> calls of either function). - -<<tmpnam>> generates file names with the value of <<P_tmpdir>> -(defined in `<<stdio.h>>') as the leading directory component of the path. - -You can use the <<tmpnam>> argument <[s]> to specify a suitable area -of memory for the generated filename; otherwise, you can call -<<tmpnam(NULL)>> to use an internal static buffer. - -<<tempnam>> allows you more control over the generated filename: you -can use the argument <[dir]> to specify the path to a directory for -temporary files, and you can use the argument <[pfx]> to specify a -prefix for the base filename. - -If <[dir]> is <<NULL>>, <<tempnam>> will attempt to use the value of -environment variable <<TMPDIR>> instead; if there is no such value, -<<tempnam>> uses the value of <<P_tmpdir>> (defined in `<<stdio.h>>'). - -If you don't need any particular prefix to the basename of temporary -files, you can pass <<NULL>> as the <[pfx]> argument to <<tempnam>>. - -<<_tmpnam_r>> and <<_tempnam_r>> are reentrant versions of <<tmpnam>> -and <<tempnam>> respectively. The extra argument <[reent]> is a -pointer to a reentrancy structure. - -WARNINGS -The generated filenames are suitable for temporary files, but do not -in themselves make files temporary. Files with these names must still -be explicitly removed when you no longer want them. - -If you supply your own data area <[s]> for <<tmpnam>>, you must ensure -that it has room for at least <<L_tmpnam>> elements of type <<char>>. - -RETURNS -Both <<tmpnam>> and <<tempnam>> return a pointer to the newly -generated filename. - -PORTABILITY -ANSI C requires <<tmpnam>>, but does not specify the use of -<<P_tmpdir>>. The System V Interface Definition (Issue 2) requires -both <<tmpnam>> and <<tempnam>>. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<getpid>>, -<<isatty>>, <<lseek>>, <<open>>, <<read>>, <<sbrk>>, <<write>>. - -The global pointer <<environ>> is also required. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <fcntl.h> -#include <reent.h> -#include <errno.h> - -/* Try to open the file specified, if it can't be opened then try - another one. Return nonzero if successful, otherwise zero. */ - -static int -_DEFUN(worker, (ptr, result, part1, part2, part3, part4), - struct _reent *ptr _AND - char *result _AND - _CONST char *part1 _AND - _CONST char *part2 _AND - int part3 _AND - int *part4) -{ - /* Generate the filename and make sure that there isn't one called - it already. */ - - while (1) - { - int t; - _sprintf_r (ptr, result, "%s/%s%x.%x", part1, part2, part3, *part4); - (*part4)++; - t = _open_r (ptr, result, O_RDONLY, 0); - if (t == -1) - { - if (ptr->_errno == ENOSYS) - { - result[0] = '\0'; - return 0; - } - break; - } - _close_r (ptr, t); - } - return 1; -} - -char * -_DEFUN(_tmpnam_r, (p, s), - struct _reent *p _AND - char *s) -{ - char *result; - int pid; - - if (s == NULL) - { - /* ANSI states we must use an internal static buffer if s is NULL */ - _REENT_CHECK_EMERGENCY(p); - result = _REENT_EMERGENCY(p); - } - else - { - result = s; - } - pid = _getpid_r (p); - - if (worker (p, result, P_tmpdir, "t", pid, &p->_inc)) - { - p->_inc++; - return result; - } - - return NULL; -} - -char * -_DEFUN(_tempnam_r, (p, dir, pfx), - struct _reent *p _AND - _CONST char *dir _AND - _CONST char *pfx) -{ - char *filename; - int length; - _CONST char *prefix = (pfx) ? pfx : ""; - if (dir == NULL && (dir = getenv ("TMPDIR")) == NULL) - dir = P_tmpdir; - - /* two 8 digit numbers + . / */ - length = strlen (dir) + strlen (prefix) + (4 * sizeof (int)) + 2 + 1; - - filename = _malloc_r (p, length); - if (filename) - { - if (! worker (p, filename, dir, prefix, - _getpid_r (p) ^ (int) (_POINTER_INT) p, &p->_inc)) - return NULL; - } - return filename; -} - -#ifndef _REENT_ONLY - -char * -_DEFUN(tempnam, (dir, pfx), - _CONST char *dir _AND - _CONST char *pfx) -{ - return _tempnam_r (_REENT, dir, pfx); -} - -char * -_DEFUN(tmpnam, (s), - char *s) -{ - return _tmpnam_r (_REENT, s); -} - -#endif diff --git a/newlib/libc/stdio/ungetc.c b/newlib/libc/stdio/ungetc.c deleted file mode 100644 index 0339a3d0c..000000000 --- a/newlib/libc/stdio/ungetc.c +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* -FUNCTION -<<ungetc>>---push data back into a stream - -INDEX - ungetc -INDEX - _ungetc_r - -ANSI_SYNOPSIS - #include <stdio.h> - int ungetc(int <[c]>, FILE *<[stream]>); - - int _ungetc_r(struct _reent *<[reent]>, int <[c]>, FILE *<[stream]>); - -DESCRIPTION -<<ungetc>> is used to return bytes back to <[stream]> to be read again. -If <[c]> is EOF, the stream is unchanged. Otherwise, the unsigned -char <[c]> is put back on the stream, and subsequent reads will see -the bytes pushed back in reverse order. Pushed byes are lost if the -stream is repositioned, such as by <<fseek>>, <<fsetpos>>, or -<<rewind>>. - -The underlying file is not changed, but it is possible to push back -something different than what was originally read. Ungetting a -character will clear the end-of-stream marker, and decrement the file -position indicator. Pushing back beyond the beginning of a file gives -unspecified behavior. - -The alternate function <<_ungetc_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -The character pushed back, or <<EOF>> on error. - -PORTABILITY -ANSI C requires <<ungetc>>, but only requires a pushback buffer of one -byte; although this implementation can handle multiple bytes, not all -can. Pushing back a signed char is a common application bug. - -Supporting OS subroutines required: <<sbrk>>. -*/ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "local.h" - -/* - * Expand the ungetc buffer `in place'. That is, adjust fp->_p when - * the buffer moves, so that it points the same distance from the end, - * and move the bytes in the buffer around as necessary so that they - * are all at the end (stack-style). - */ - -/*static*/ -int -_DEFUN(__submore, (rptr, fp), - struct _reent *rptr _AND - register FILE *fp) -{ - register int i; - register unsigned char *p; - - if (fp->_ub._base == fp->_ubuf) - { - /* - * Get a new buffer (rather than expanding the old one). - */ - if ((p = (unsigned char *) _malloc_r (rptr, (size_t) BUFSIZ)) == NULL) - return EOF; - fp->_ub._base = p; - fp->_ub._size = BUFSIZ; - p += BUFSIZ - sizeof (fp->_ubuf); - for (i = sizeof (fp->_ubuf); --i >= 0;) - p[i] = fp->_ubuf[i]; - fp->_p = p; - return 0; - } - i = fp->_ub._size; - p = (unsigned char *) _realloc_r (rptr, (_PTR) (fp->_ub._base), i << 1); - if (p == NULL) - return EOF; - _CAST_VOID memcpy ((_PTR) (p + i), (_PTR) p, (size_t) i); - fp->_p = p + i; - fp->_ub._base = p; - fp->_ub._size = i << 1; - return 0; -} - -int -_DEFUN(_ungetc_r, (rptr, c, fp), - struct _reent *rptr _AND - int c _AND - register FILE *fp) -{ - if (c == EOF) - return (EOF); - - /* Ensure stdio has been initialized. - ??? Might be able to remove this as some other stdio routine should - have already been called to get the char we are un-getting. */ - - CHECK_INIT (rptr, fp); - - _flockfile (fp); - - ORIENT (fp, -1); - - /* After ungetc, we won't be at eof anymore */ - fp->_flags &= ~__SEOF; - - if ((fp->_flags & __SRD) == 0) - { - /* - * Not already reading: no good unless reading-and-writing. - * Otherwise, flush any current write stuff. - */ - if ((fp->_flags & __SRW) == 0) - { - _funlockfile (fp); - return EOF; - } - if (fp->_flags & __SWR) - { - if (_fflush_r (rptr, fp)) - { - _funlockfile (fp); - return EOF; - } - fp->_flags &= ~__SWR; - fp->_w = 0; - fp->_lbfsize = 0; - } - fp->_flags |= __SRD; - } - 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 (rptr, fp)) - { - _funlockfile (fp); - return EOF; - } - *--fp->_p = c; - fp->_r++; - _funlockfile (fp); - 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++; - _funlockfile (fp); - 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; - _funlockfile (fp); - return c; -} - -#ifndef _REENT_ONLY -int -_DEFUN(ungetc, (c, fp), - int c _AND - register FILE *fp) -{ - return _ungetc_r (_REENT, c, fp); -} -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/ungetwc.c b/newlib/libc/stdio/ungetwc.c deleted file mode 100644 index 234d2f7ef..000000000 --- a/newlib/libc/stdio/ungetwc.c +++ /dev/null @@ -1,115 +0,0 @@ -/*- - * Copyright (c) 2002-2004 Tim J. Robbins. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* -FUNCTION -<<ungetwc>>---push wide character data back into a stream - -INDEX - ungetwc -INDEX - _ungetwc_r - -ANSI_SYNOPSIS - #include <stdio.h> - #include <wchar.h> - wint_t ungetwc(wint_t <[wc]>, FILE *<[stream]>); - - wint_t _ungetwc_r(struct _reent *<[reent]>, wint_t <[wc]>, FILE *<[stream]>); - -DESCRIPTION -<<ungetwc>> is used to return wide characters back to <[stream]> to be -read again. If <[wc]> is WEOF, the stream is unchanged. Otherwise, the -wide character <[wc]> is put back on the stream, and subsequent reads will see -the wide chars pushed back in reverse order. Pushed wide chars are lost if the -stream is repositioned, such as by <<fseek>>, <<fsetpos>>, or -<<rewind>>. - -The underlying file is not changed, but it is possible to push back -something different than what was originally read. Ungetting a -character will clear the end-of-stream marker, and decrement the file -position indicator. Pushing back beyond the beginning of a file gives -unspecified behavior. - -The alternate function <<_ungetwc_r>> is a reentrant version. The -extra argument <[reent]> is a pointer to a reentrancy structure. - -RETURNS -The wide character pushed back, or <<WEOF>> on error. - -PORTABILITY -C99 -*/ - -#include <_ansi.h> -#include <reent.h> -#include <errno.h> -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <wchar.h> -#include "local.h" - -wint_t -_DEFUN(_ungetwc_r, (ptr, wc, fp), - struct _reent *ptr _AND - wint_t wc _AND - register FILE *fp) -{ - char buf[MB_LEN_MAX]; - size_t len; - - _flockfile (fp); - ORIENT (fp, 1); - if (wc == WEOF) - wc = WEOF; - else if ((len = _wcrtomb_r(ptr, buf, wc, &fp->_mbstate)) == (size_t)-1) - { - fp->_flags |= __SERR; - wc = WEOF; - } - else - while (len-- != 0) - if (_ungetc_r(ptr, (unsigned char)buf[len], fp) == EOF) - { - wc = WEOF; - break; - } - _funlockfile (fp); - return wc; -} - -/* - * MT-safe version. - */ -wint_t -_DEFUN(ungetwc, (wint_t wc, FILE *fp), - wint_t wc _AND - FILE *fp) -{ - CHECK_INIT (_REENT, fp); - return _ungetwc_r (_REENT, wc, fp); -} diff --git a/newlib/libc/stdio/vasiprintf.c b/newlib/libc/stdio/vasiprintf.c deleted file mode 100644 index 15310cce9..000000000 --- a/newlib/libc/stdio/vasiprintf.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 1990, 2007 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* This code was based on vsiprintf.c */ -/* doc in vfprintf.c */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <stdio.h> -#include <limits.h> -#include <stdarg.h> - -#include "local.h" - -#ifndef _REENT_ONLY - -int -_DEFUN(vasiprintf, (strp, fmt, ap), - char **strp _AND - const char *fmt _AND - va_list ap) -{ - return _vasiprintf_r (_REENT, strp, fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_vasiprintf_r, (ptr, strp, fmt, ap), - struct _reent *ptr _AND - char **strp _AND - const char *fmt _AND - va_list ap) -{ - int ret; - FILE f; - - f._flags = __SWR | __SSTR | __SMBF ; - f._bf._base = f._p = NULL; - f._bf._size = f._w = 0; - f._file = -1; /* No file. */ - ret = _svfiprintf_r (ptr, &f, fmt, ap); - if (ret >= 0) - { - *f._p = 0; - *strp = f._bf._base; - } - return ret; -} diff --git a/newlib/libc/stdio/vasniprintf.c b/newlib/libc/stdio/vasniprintf.c deleted file mode 100644 index 56db45ec0..000000000 --- a/newlib/libc/stdio/vasniprintf.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (C) 2007, 2008 Eric Blake - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ -/* This code was derived from asprintf.c */ -/* doc in viprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdarg.h> -#include <limits.h> -#include <errno.h> -#include "local.h" - -char * -_DEFUN(_vasniprintf_r, (ptr, buf, lenp, fmt, ap), - struct _reent *ptr _AND - char *buf _AND - size_t *lenp _AND - const char *fmt _AND - va_list ap) -{ - int ret; - FILE f; - size_t len = *lenp; - - if (buf && len) - { - /* mark an existing buffer, but allow allocation of larger string */ - f._flags = __SWR | __SSTR | __SOPT; - } - else - { - /* mark a zero-length reallocatable buffer */ - f._flags = __SWR | __SSTR | __SMBF; - len = 0; - buf = NULL; - } - f._bf._base = f._p = (unsigned char *) buf; - /* For now, inherit the 32-bit signed limit of FILE._bf._size. - FIXME - it would be nice to rewrite sys/reent.h to support size_t - for _size. */ - if (len > INT_MAX) - { - ptr->_errno = EOVERFLOW; - return NULL; - } - f._bf._size = f._w = len; - f._file = -1; /* No file. */ - ret = _svfiprintf_r (ptr, &f, fmt, ap); - if (ret < 0) - return NULL; - *lenp = ret; - *f._p = '\0'; - return (char *) f._bf._base; -} - -#ifndef _REENT_ONLY - -char * -_DEFUN(vasniprintf, (buf, lenp, fmt, ap), - char *buf _AND - size_t *lenp _AND - const char *fmt _AND - va_list ap) -{ - return _vasniprintf_r (_REENT, buf, lenp, fmt, ap); -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/vasnprintf.c b/newlib/libc/stdio/vasnprintf.c deleted file mode 100644 index cab89beff..000000000 --- a/newlib/libc/stdio/vasnprintf.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (C) 2007 Eric Blake - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ -/* This code was derived from asprintf.c */ -/* doc in vfprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdarg.h> -#include <limits.h> -#include <errno.h> -#include "local.h" - -char * -_DEFUN(_vasnprintf_r, (ptr, buf, lenp, fmt, ap), - struct _reent *ptr _AND - char *buf _AND - size_t *lenp _AND - const char *fmt _AND - va_list ap) -{ - int ret; - FILE f; - size_t len = *lenp; - - if (buf && len) - { - /* mark an existing buffer, but allow allocation of larger string */ - f._flags = __SWR | __SSTR | __SOPT; - } - else - { - /* mark a zero-length reallocatable buffer */ - f._flags = __SWR | __SSTR | __SMBF; - len = 0; - buf = NULL; - } - f._bf._base = f._p = (unsigned char *) buf; - /* For now, inherit the 32-bit signed limit of FILE._bf._size. - FIXME - it would be nice to rewrite sys/reent.h to support size_t - for _size. */ - if (len > INT_MAX) - { - ptr->_errno = EOVERFLOW; - return NULL; - } - f._bf._size = f._w = len; - f._file = -1; /* No file. */ - ret = _svfprintf_r (ptr, &f, fmt, ap); - if (ret < 0) - return NULL; - *lenp = ret; - *f._p = '\0'; - return (char *) f._bf._base; -} - -#ifndef _REENT_ONLY - -char * -_DEFUN(vasnprintf, (buf, lenp, fmt, ap), - char *buf _AND - size_t *lenp _AND - const char *fmt _AND - va_list ap) -{ - return _vasnprintf_r (_REENT, buf, lenp, fmt, ap); -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/vasprintf.c b/newlib/libc/stdio/vasprintf.c deleted file mode 100644 index b89f4dbd7..000000000 --- a/newlib/libc/stdio/vasprintf.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 1990, 2007 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* This code was based on vsprintf.c */ -/* doc in vfprintf.c */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <stdio.h> -#include <limits.h> -#include <stdarg.h> - -#include "local.h" - -#ifndef _REENT_ONLY - -int -_DEFUN(vasprintf, (strp, fmt, ap), - char **strp _AND - const char *fmt _AND - va_list ap) -{ - return _vasprintf_r (_REENT, strp, fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_vasprintf_r, (ptr, strp, fmt, ap), - struct _reent *ptr _AND - char **strp _AND - const char *fmt _AND - va_list ap) -{ - int ret; - FILE f; - - f._flags = __SWR | __SSTR | __SMBF ; - f._bf._base = f._p = NULL; - f._bf._size = f._w = 0; - f._file = -1; /* No file. */ - ret = _svfprintf_r (ptr, &f, fmt, ap); - if (ret >= 0) - { - *f._p = 0; - *strp = f._bf._base; - } - return ret; -} diff --git a/newlib/libc/stdio/vdiprintf.c b/newlib/libc/stdio/vdiprintf.c deleted file mode 100644 index 51bdb000e..000000000 --- a/newlib/libc/stdio/vdiprintf.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright 2005, 2007 Shaun Jackman - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ -/* doc in diprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <stdarg.h> -#include "local.h" - -int -_DEFUN(_vdiprintf_r, (ptr, fd, format, ap), - struct _reent *ptr _AND - int fd _AND - const char *format _AND - va_list ap) -{ - char *p; - char buf[512]; - size_t n = sizeof buf; - - _REENT_SMALL_CHECK_INIT (ptr); - p = _vasniprintf_r (ptr, buf, &n, format, ap); - if (!p) - return -1; - n = _write_r (ptr, fd, p, n); - if (p != buf) - _free_r (ptr, p); - return n; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(vdiprintf, (fd, format, ap), - int fd _AND - const char *format _AND - va_list ap) -{ - return _vdiprintf_r (_REENT, fd, format, ap); -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/vdprintf.c b/newlib/libc/stdio/vdprintf.c deleted file mode 100644 index bfb19c95b..000000000 --- a/newlib/libc/stdio/vdprintf.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright 2005, 2007 Shaun Jackman - * Permission to use, copy, modify, and distribute this software - * is freely granted, provided that this notice is preserved. - */ -/* doc in dprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <stdarg.h> -#include "local.h" - -int -_DEFUN(_vdprintf_r, (ptr, fd, format, ap), - struct _reent *ptr _AND - int fd _AND - const char *format _AND - va_list ap) -{ - char *p; - char buf[512]; - size_t n = sizeof buf; - - _REENT_SMALL_CHECK_INIT (ptr); - p = _vasnprintf_r (ptr, buf, &n, format, ap); - if (!p) - return -1; - n = _write_r (ptr, fd, p, n); - if (p != buf) - _free_r (ptr, p); - return n; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(vdprintf, (fd, format, ap), - int fd _AND - const char *format _AND - va_list ap) -{ - return _vdprintf_r (_REENT, fd, format, ap); -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/vfieeefp.h b/newlib/libc/stdio/vfieeefp.h deleted file mode 100644 index c13f9e8dc..000000000 --- a/newlib/libc/stdio/vfieeefp.h +++ /dev/null @@ -1,283 +0,0 @@ -/**************************************************************** - * - * The author of this software is David M. Gay. - * - * Copyright (c) 1991 by AT&T. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose without fee is hereby granted, provided that this entire notice - * is included in all copies of any software which is or includes a copy - * or modification of this software and in all copies of the supporting - * documentation for such software. - * - * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY - * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY - * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - * - ***************************************************************/ - -/* Please send bug reports to - David M. Gay - AT&T Bell Laboratories, Room 2C-463 - 600 Mountain Avenue - Murray Hill, NJ 07974-2070 - U.S.A. - dmg@research.att.com or research!dmg - */ - -/* This header file is a modification of mprec.h that only contains floating - point union code. */ - -#include <newlib.h> -#include <ieeefp.h> -#include <math.h> -#include <float.h> -#include <errno.h> -#include <sys/config.h> - -#ifdef __IEEE_LITTLE_ENDIAN -#define IEEE_8087 -#endif - -#ifdef __IEEE_BIG_ENDIAN -#define IEEE_MC68k -#endif - -#ifdef __Z8000__ -#define Just_16 -#endif - -#ifdef Unsigned_Shifts -#define Sign_Extend(a,b) if (b < 0) a |= (__uint32_t)0xffff0000; -#else -#define Sign_Extend(a,b) /*no-op*/ -#endif - -#if defined(IEEE_8087) + defined(IEEE_MC68k) + defined(VAX) + defined(IBM) != 1 -Exactly one of IEEE_8087, IEEE_MC68k, VAX, or IBM should be defined. -#endif - -#ifdef _WANT_IO_LONG_DOUBLE -/* If we are going to examine or modify specific bits in a long double using - the lword0 or lwordx macros, then we must wrap the long double inside - a union. This is necessary to avoid undefined behavior according to - the ANSI C spec. */ - -#ifdef IEEE_8087 -#if LDBL_MANT_DIG == 24 -struct ldieee -{ - unsigned manh:23; - unsigned exp:8; - unsigned sign:1; -}; -#elif LDBL_MANT_DIG == 53 -struct ldieee -{ - unsigned manl:20; - unsigned manh:32; - unsigned exp:11; - unsigned sign:1; -}; -#elif LDBL_MANT_DIG == 64 -struct ldieee -{ - unsigned manl:32; - unsigned manh:32; - unsigned exp:15; - unsigned sign:1; -}; -#elif LDBL_MANT_DIG > 64 -struct ldieee -{ - unsigned manl3:16; - unsigned manl2:32; - unsigned manl:32; - unsigned manh:32; - unsigned exp:15; - unsigned sign:1; -}; -#endif /* LDBL_MANT_DIG */ -#else /* !IEEE_8087 */ -#if LDBL_MANT_DIG == 24 -struct ldieee -{ - unsigned sign:1; - unsigned exp:8; - unsigned manh:23; -}; -#elif LDBL_MANT_DIG == 53 -struct ldieee -{ - unsigned sign:1; - unsigned exp:11; - unsigned manh:32; - unsigned manl:20; -}; -#elif LDBL_MANT_DIG == 64 -struct ldieee -{ - unsigned sign:1; - unsigned exp:15; - unsigned manh:32; - unsigned manl:32; -}; -#elif LDBL_MANT_DIG > 64 -struct ldieee -{ - unsigned sign:1; - unsigned exp:15; - unsigned manh:32; - unsigned manl:32; - unsigned manl2:32; - unsigned manl3;16; -}; -#endif /* LDBL_MANT_DIG */ -#endif /* !IEEE_8087 */ -#endif /* _WANT_IO_LONG_DOUBLE */ - -/* If we are going to examine or modify specific bits in a double using - the word0 and/or word1 macros, then we must wrap the double inside - a union. This is necessary to avoid undefined behavior according to - the ANSI C spec. */ -union double_union -{ - double d; - __uint32_t i[2]; -}; - -#ifdef IEEE_8087 -#define word0(x) (x.i[1]) -#define word1(x) (x.i[0]) -#else -#define word0(x) (x.i[0]) -#define word1(x) (x.i[1]) -#endif - -/* #define P DBL_MANT_DIG */ -/* Ten_pmax = floor(P*log(2)/log(5)) */ -/* Bletch = (highest power of 2 < DBL_MAX_10_EXP) / 16 */ -/* Quick_max = floor((P-1)*log(FLT_RADIX)/log(10) - 1) */ -/* Int_max = floor(P*log(FLT_RADIX)/log(10) - 1) */ - -#if defined(IEEE_8087) + defined(IEEE_MC68k) -#if defined (_DOUBLE_IS_32BITS) -#define Exp_shift 23 -#define Exp_shift1 23 -#define Exp_msk1 ((__uint32_t)0x00800000L) -#define Exp_msk11 ((__uint32_t)0x00800000L) -#define Exp_mask ((__uint32_t)0x7f800000L) -#define P 24 -#define Bias 127 -#define IEEE_Arith -#define Emin (-126) -#define Exp_1 ((__uint32_t)0x3f800000L) -#define Exp_11 ((__uint32_t)0x3f800000L) -#define Ebits 8 -#define Frac_mask ((__uint32_t)0x007fffffL) -#define Frac_mask1 ((__uint32_t)0x007fffffL) -#define Ten_pmax 10 -#define Sign_bit ((__uint32_t)0x80000000L) -#define Ten_pmax 10 -#define Bletch 2 -#define Bndry_mask ((__uint32_t)0x007fffffL) -#define Bndry_mask1 ((__uint32_t)0x007fffffL) -#define LSB 1 -#define Sign_bit ((__uint32_t)0x80000000L) -#define Log2P 1 -#define Tiny0 0 -#define Tiny1 1 -#define Quick_max 5 -#define Int_max 6 -#define Infinite(x) (word0(x) == ((__uint32_t)0x7f800000L)) -#undef word0 -#undef word1 - -#define word0(x) (x.i[0]) -#define word1(x) 0 -#else - -#define Exp_shift 20 -#define Exp_shift1 20 -#define Exp_msk1 ((__uint32_t)0x100000L) -#define Exp_msk11 ((__uint32_t)0x100000L) -#define Exp_mask ((__uint32_t)0x7ff00000L) -#define P 53 -#define Bias 1023 -#define IEEE_Arith -#define Emin (-1022) -#define Exp_1 ((__uint32_t)0x3ff00000L) -#define Exp_11 ((__uint32_t)0x3ff00000L) -#define Ebits 11 -#define Frac_mask ((__uint32_t)0xfffffL) -#define Frac_mask1 ((__uint32_t)0xfffffL) -#define Ten_pmax 22 -#define Bletch 0x10 -#define Bndry_mask ((__uint32_t)0xfffffL) -#define Bndry_mask1 ((__uint32_t)0xfffffL) -#define LSB 1 -#define Sign_bit ((__uint32_t)0x80000000L) -#define Log2P 1 -#define Tiny0 0 -#define Tiny1 1 -#define Quick_max 14 -#define Int_max 14 -#define Infinite(x) (word0(x) == ((__uint32_t)0x7ff00000L)) /* sufficient test for here */ -#endif - -#else -#undef Sudden_Underflow -#define Sudden_Underflow -#ifdef IBM -#define Exp_shift 24 -#define Exp_shift1 24 -#define Exp_msk1 ((__uint32_t)0x1000000L) -#define Exp_msk11 ((__uint32_t)0x1000000L) -#define Exp_mask ((__uint32_t)0x7f000000L) -#define P 14 -#define Bias 65 -#define Exp_1 ((__uint32_t)0x41000000L) -#define Exp_11 ((__uint32_t)0x41000000L) -#define Ebits 8 /* exponent has 7 bits, but 8 is the right value in b2d */ -#define Frac_mask ((__uint32_t)0xffffffL) -#define Frac_mask1 ((__uint32_t)0xffffffL) -#define Bletch 4 -#define Ten_pmax 22 -#define Bndry_mask ((__uint32_t)0xefffffL) -#define Bndry_mask1 ((__uint32_t)0xffffffL) -#define LSB 1 -#define Sign_bit ((__uint32_t)0x80000000L) -#define Log2P 4 -#define Tiny0 ((__uint32_t)0x100000L) -#define Tiny1 0 -#define Quick_max 14 -#define Int_max 15 -#else /* VAX */ -#define Exp_shift 23 -#define Exp_shift1 7 -#define Exp_msk1 0x80 -#define Exp_msk11 ((__uint32_t)0x800000L) -#define Exp_mask ((__uint32_t)0x7f80L) -#define P 56 -#define Bias 129 -#define Exp_1 ((__uint32_t)0x40800000L) -#define Exp_11 ((__uint32_t)0x4080L) -#define Ebits 8 -#define Frac_mask ((__uint32_t)0x7fffffL) -#define Frac_mask1 ((__uint32_t)0xffff007fL) -#define Ten_pmax 24 -#define Bletch 2 -#define Bndry_mask ((__uint32_t)0xffff007fL) -#define Bndry_mask1 ((__uint32_t)0xffff007fL) -#define LSB ((__uint32_t)0x10000L) -#define Sign_bit ((__uint32_t)0x8000L) -#define Log2P 1 -#define Tiny0 0x80 -#define Tiny1 0 -#define Quick_max 15 -#define Int_max 15 -#endif -#endif - - diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c deleted file mode 100644 index be35d248c..000000000 --- a/newlib/libc/stdio/vfprintf.c +++ /dev/null @@ -1,2190 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chris Torek. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* -FUNCTION -<<vfprintf>>, <<vprintf>>, <<vsprintf>>, <<vsnprintf>>, <<vasprintf>>, <<vasnprintf>>---format argument list - -INDEX - vfprintf -INDEX - _vfprintf_r -INDEX - vprintf -INDEX - _vprintf_r -INDEX - vsprintf -INDEX - _vsprintf_r -INDEX - vsnprintf -INDEX - _vsnprintf_r -INDEX - vasprintf -INDEX - _vasprintf_r -INDEX - vasnprintf -INDEX - _vasnprintf_r - -ANSI_SYNOPSIS - #include <stdio.h> - #include <stdarg.h> - int vprintf(const char *<[fmt]>, va_list <[list]>); - int vfprintf(FILE *<[fp]>, const char *<[fmt]>, va_list <[list]>); - int vsprintf(char *<[str]>, const char *<[fmt]>, va_list <[list]>); - int vsnprintf(char *<[str]>, size_t <[size]>, const char *<[fmt]>, - va_list <[list]>); - int vasprintf(char **<[strp]>, const char *<[fmt]>, va_list <[list]>); - char *vasnprintf(char *<[str]>, size_t *<[size]>, const char *<[fmt]>, - va_list <[list]>); - - int _vprintf_r(struct _reent *<[reent]>, const char *<[fmt]>, - va_list <[list]>); - int _vfprintf_r(struct _reent *<[reent]>, FILE *<[fp]>, - const char *<[fmt]>, va_list <[list]>); - int _vsprintf_r(struct _reent *<[reent]>, char *<[str]>, - const char *<[fmt]>, va_list <[list]>); - int _vasprintf_r(struct _reent *<[reent]>, char **<[str]>, - const char *<[fmt]>, va_list <[list]>); - int _vsnprintf_r(struct _reent *<[reent]>, char *<[str]>, - size_t <[size]>, const char *<[fmt]>, va_list <[list]>); - char *_vasnprintf_r(struct _reent *<[reent]>, char *<[str]>, - size_t *<[size]>, const char *<[fmt]>, va_list <[list]>); - -DESCRIPTION -<<vprintf>>, <<vfprintf>>, <<vasprintf>>, <<vsprintf>>, <<vsnprintf>>, -and <<vasnprintf>> are (respectively) variants of <<printf>>, -<<fprintf>>, <<asprintf>>, <<sprintf>>, <<snprintf>>, and -<<asnprintf>>. They differ only in allowing their caller to pass the -variable argument list as a <<va_list>> object (initialized by -<<va_start>>) rather than directly accepting a variable number of -arguments. The caller is responsible for calling <<va_end>>. - -<<_vprintf_r>>, <<_vfprintf_r>>, <<_vasprintf_r>>, <<_vsprintf_r>>, -<<_vsnprintf_r>>, and <<_vasnprintf_r>> are reentrant versions of the -above. - -RETURNS -The return values are consistent with the corresponding functions. - -PORTABILITY -ANSI C requires <<vprintf>>, <<vfprintf>>, <<vsprintf>>, and -<<vsnprintf>>. The remaining functions are newlib extensions. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#if defined(LIBC_SCCS) && !defined(lint) -/*static char *sccsid = "from: @(#)vfprintf.c 5.50 (Berkeley) 12/16/92";*/ -static char *rcsid = "$Id$"; -#endif /* LIBC_SCCS and not lint */ - -/* - * Actual printf innards. - * - * This code is large and complicated... - */ -#include <newlib.h> - -#ifdef INTEGER_ONLY -# define VFPRINTF vfiprintf -# ifdef STRING_ONLY -# define _VFPRINTF_R _svfiprintf_r -# else -# define _VFPRINTF_R _vfiprintf_r -# endif -#else -# define VFPRINTF vfprintf -# ifdef STRING_ONLY -# define _VFPRINTF_R _svfprintf_r -# else -# define _VFPRINTF_R _vfprintf_r -# endif -# ifndef NO_FLOATING_POINT -# define FLOATING_POINT -# endif -#endif - -#define _NO_POS_ARGS -#ifdef _WANT_IO_POS_ARGS -# undef _NO_POS_ARGS -#endif - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <limits.h> -#include <stdint.h> -#include <wchar.h> -#include <sys/lock.h> -#include <stdarg.h> -#include "local.h" -#include "../stdlib/local.h" -#include "fvwrite.h" -#include "vfieeefp.h" - -/* Currently a test is made to see if long double processing is warranted. - This could be changed in the future should the _ldtoa_r code be - preferred over _dtoa_r. */ -#define _NO_LONGDBL -#if defined _WANT_IO_LONG_DOUBLE && (LDBL_MANT_DIG > DBL_MANT_DIG) -#undef _NO_LONGDBL -#endif - -#define _NO_LONGLONG -#if defined _WANT_IO_LONG_LONG \ - && (defined __GNUC__ || __STDC_VERSION__ >= 199901L) -# undef _NO_LONGLONG -#endif - -#ifdef STRING_ONLY -#define __SPRINT __ssprint_r -#else -#define __SPRINT __sprint_r -#endif - -/* The __sprint_r/__ssprint_r functions are shared between all versions of - vfprintf and vfwprintf. They must only be defined once, which we do in - the INTEGER_ONLY versions here. */ -#ifdef STRING_ONLY -#ifdef INTEGER_ONLY -int -_DEFUN(__ssprint_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 /* !INTEGER_ONLY */ -int __ssprint_r (struct _reent *, FILE *, register struct __suio *); -#endif /* !INTEGER_ONLY */ - -#else /* !STRING_ONLY */ -#ifdef INTEGER_ONLY -/* - * Flush out all the vectors defined by the given uio, - * then reset it so that it can be reused. - */ -int -_DEFUN(__sprint_r, (ptr, fp, uio), - struct _reent *ptr _AND - FILE *fp _AND - register struct __suio *uio) -{ - register int err = 0; - - if (uio->uio_resid == 0) { - uio->uio_iovcnt = 0; - return (0); - } - if (fp->_flags2 & __SWID) { - struct __siov *iov; - wchar_t *p; - int i, len; - - iov = uio->uio_iov; - for (; uio->uio_resid != 0; - uio->uio_resid -= len * sizeof (wchar_t), iov++) { - p = (wchar_t *) iov->iov_base; - len = iov->iov_len / sizeof (wchar_t); - for (i = 0; i < len; i++) { - if (_fputwc_r (ptr, p[i], fp) == WEOF) { - err = -1; - goto out; - } - } - } - } else - err = __sfvwrite_r(ptr, fp, uio); -out: - uio->uio_resid = 0; - uio->uio_iovcnt = 0; - return (err); -} -#else /* !INTEGER_ONLY */ -int __sprint_r (struct _reent *, FILE *, register struct __suio *); -#endif /* !INTEGER_ONLY */ - -/* - * Helper function for `fprintf to unbuffered unix file': creates a - * temporary buffer. We only work on write-only files; this avoids - * worries about ungetc buffers and so forth. - */ -static int -_DEFUN(__sbprintf, (rptr, fp, fmt, ap), - struct _reent *rptr _AND - register FILE *fp _AND - _CONST char *fmt _AND - va_list ap) -{ - int ret; - FILE fake; - unsigned char buf[BUFSIZ]; - - /* copy the important variables */ - fake._flags = fp->_flags & ~__SNBF; - fake._flags2 = fp->_flags2; - fake._file = fp->_file; - fake._cookie = fp->_cookie; - fake._write = fp->_write; - - /* set up the buffer */ - fake._bf._base = fake._p = buf; - fake._bf._size = fake._w = sizeof (buf); - fake._lbfsize = 0; /* not actually used, but Just In Case */ -#ifndef __SINGLE_THREAD__ - __lock_init_recursive (fake._lock); -#endif - - /* do the work, then copy any error status */ - ret = _VFPRINTF_R (rptr, &fake, fmt, ap); - if (ret >= 0 && _fflush_r (rptr, &fake)) - ret = EOF; - if (fake._flags & __SERR) - fp->_flags |= __SERR; - -#ifndef __SINGLE_THREAD__ - __lock_close_recursive (fake._lock); -#endif - return (ret); -} -#endif /* !STRING_ONLY */ - - -#if defined (FLOATING_POINT) || defined (_WANT_IO_C99_FORMATS) -# include <locale.h> -#endif -#ifdef FLOATING_POINT -# include <math.h> - -/* For %La, an exponent of 15 bits occupies the exponent character, a - sign, and up to 5 digits. */ -# define MAXEXPLEN 7 -# define DEFPREC 6 - -# ifdef _NO_LONGDBL - -extern char *_dtoa_r _PARAMS((struct _reent *, double, int, - int, int *, int *, char **)); - -# define _PRINTF_FLOAT_TYPE double -# define _DTOA_R _dtoa_r -# define FREXP frexp - -# else /* !_NO_LONGDBL */ - -extern char *_ldtoa_r _PARAMS((struct _reent *, _LONG_DOUBLE, int, - int, int *, int *, char **)); - -extern int _EXFUN(_ldcheck,(_LONG_DOUBLE *)); - -# define _PRINTF_FLOAT_TYPE _LONG_DOUBLE -# define _DTOA_R _ldtoa_r -/* FIXME - frexpl is not yet supported; and cvt infloops if (double)f - converts a finite value into infinity. */ -/* # define FREXP frexpl */ -# define FREXP(f,e) ((_LONG_DOUBLE) frexp ((double)f, e)) -# endif /* !_NO_LONGDBL */ - -static char *cvt(struct _reent *, _PRINTF_FLOAT_TYPE, int, int, char *, int *, - int, int *, char *); - -static int exponent(char *, int, int); - -#endif /* FLOATING_POINT */ - -/* BUF must be big enough for the maximum %#llo (assuming long long is - at most 64 bits, this would be 23 characters), the maximum - multibyte character %C, and the maximum default precision of %La - (assuming long double is at most 128 bits with 113 bits of - mantissa, this would be 29 characters). %e, %f, and %g use - reentrant storage shared with mprec. All other formats that use - buf get by with fewer characters. Making BUF slightly bigger - reduces the need for malloc in %.*a and %S, when large precision or - long strings are processed. - The bigger size of 100 bytes is used on systems which allow number - strings using the locale's grouping character. Since that's a multibyte - value, we should use a conservative value. - */ -#ifdef _WANT_IO_C99_FORMATS -#define BUF 100 -#else -#define BUF 40 -#endif -#if defined _MB_CAPABLE && MB_LEN_MAX > BUF -# undef BUF -# define BUF MB_LEN_MAX -#endif - -#ifndef _NO_LONGLONG -# define quad_t long long -# define u_quad_t unsigned long long -#else -# define quad_t long -# define u_quad_t unsigned long -#endif - -typedef quad_t * quad_ptr_t; -typedef _PTR void_ptr_t; -typedef char * char_ptr_t; -typedef long * long_ptr_t; -typedef int * int_ptr_t; -typedef short * short_ptr_t; - -#ifndef _NO_POS_ARGS -# ifdef NL_ARGMAX -# define MAX_POS_ARGS NL_ARGMAX -# else -# define MAX_POS_ARGS 32 -# endif - -union arg_val -{ - int val_int; - u_int val_u_int; - long val_long; - u_long val_u_long; - float val_float; - double val_double; - _LONG_DOUBLE val__LONG_DOUBLE; - int_ptr_t val_int_ptr_t; - short_ptr_t val_short_ptr_t; - long_ptr_t val_long_ptr_t; - char_ptr_t val_char_ptr_t; - quad_ptr_t val_quad_ptr_t; - void_ptr_t val_void_ptr_t; - quad_t val_quad_t; - u_quad_t val_u_quad_t; - wint_t val_wint_t; -}; - -static union arg_val * -_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 */ - -/* - * Macros for converting digits to letters and vice versa - */ -#define to_digit(c) ((c) - '0') -#define is_digit(c) ((unsigned)to_digit (c) <= 9) -#define to_char(n) ((n) + '0') - -/* - * Flags used during conversion. - */ -#define ALT 0x001 /* alternate form */ -#define HEXPREFIX 0x002 /* add 0x or 0X prefix */ -#define LADJUST 0x004 /* left adjustment */ -#define LONGDBL 0x008 /* long double */ -#define LONGINT 0x010 /* long integer */ -#ifndef _NO_LONGLONG -# define QUADINT 0x020 /* quad integer */ -#else /* ifdef _NO_LONGLONG, make QUADINT equivalent to LONGINT, so - that %lld behaves the same as %ld, not as %d, as expected if: - sizeof (long long) = sizeof long > sizeof int */ -# define QUADINT LONGINT -#endif -#define SHORTINT 0x040 /* short integer */ -#define ZEROPAD 0x080 /* zero (as opposed to blank) pad */ -#define FPT 0x100 /* Floating point number */ -#ifdef _WANT_IO_C99_FORMATS -# define CHARINT 0x200 /* char as integer */ -#else /* define as 0, to make SARG and UARG occupy fewer instructions */ -# define CHARINT 0 -#endif -#ifdef _WANT_IO_C99_FORMATS -# define GROUPING 0x400 /* use grouping ("'" flag) */ -#endif - -int _EXFUN(_VFPRINTF_R, (struct _reent *, FILE *, _CONST char *, va_list)); - -#ifndef STRING_ONLY -int -_DEFUN(VFPRINTF, (fp, fmt0, ap), - FILE * fp _AND - _CONST char *fmt0 _AND - va_list ap) -{ - int result; - result = _VFPRINTF_R (_REENT, fp, fmt0, ap); - return result; -} -#endif /* STRING_ONLY */ - -int -_DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap), - struct _reent *data _AND - FILE * fp _AND - _CONST char *fmt0 _AND - va_list ap) -{ - register char *fmt; /* format string */ - register int ch; /* character from fmt */ - register int n, m; /* handy integers (short term usage) */ - register char *cp; /* handy char pointer (short term usage) */ - register struct __siov *iovp;/* for PRINT macro */ - register int flags; /* flags as above */ - char *fmt_anchor; /* current format spec being processed */ -#ifndef _NO_POS_ARGS - int N; /* arg number */ - int arg_index; /* index into args processed directly */ - int numargs; /* number of varargs read */ - char *saved_fmt; /* saved fmt pointer */ - union arg_val args[MAX_POS_ARGS]; - int arg_type[MAX_POS_ARGS]; - int is_pos_arg; /* is current format positional? */ - int old_is_pos_arg; /* is current format positional? */ -#endif - int ret; /* return value accumulator */ - int width; /* width from format (%8d), or 0 */ - int prec; /* precision from format (%.3d), or -1 */ - char sign; /* sign prefix (' ', '+', '-', or \0) */ -#ifdef _WANT_IO_C99_FORMATS - /* locale specific numeric grouping */ - char *thousands_sep; - size_t thsnd_len; - const char *grouping; -#endif -#ifdef FLOATING_POINT - char *decimal_point = _localeconv_r (data)->decimal_point; - size_t decp_len = strlen (decimal_point); - char softsign; /* temporary negative sign for floats */ - union { int i; _PRINTF_FLOAT_TYPE fp; } _double_ = {0}; -# define _fpvalue (_double_.fp) - int expt; /* integer value of exponent */ - int expsize = 0; /* character count for expstr */ - char expstr[MAXEXPLEN]; /* buffer for exponent string */ - int lead; /* sig figs before decimal or group sep */ -#endif /* FLOATING_POINT */ -#if defined (FLOATING_POINT) || defined (_WANT_IO_C99_FORMATS) - int ndig = 0; /* actual number of digits returned by cvt */ -#endif -#ifdef _WANT_IO_C99_FORMATS - int nseps; /* number of group separators with ' */ - int nrepeats; /* number of repeats of the last group */ -#endif - u_quad_t _uquad; /* integer arguments %[diouxX] */ - enum { OCT, DEC, HEX } base;/* base for [diouxX] conversion */ - int dprec; /* a copy of prec if [diouxX], 0 otherwise */ - int realsz; /* field size expanded by dprec */ - int size; /* size of converted field or string */ - char *xdigs = NULL; /* digits for [xX] conversion */ -#define NIOV 8 - struct __suio uio; /* output information: summary */ - struct __siov iov[NIOV];/* ... and individual io vectors */ - char buf[BUF]; /* space for %c, %S, %[diouxX], %[aA] */ - char ox[2]; /* space for 0x hex-prefix */ -#ifdef _MB_CAPABLE - wchar_t wc; - mbstate_t state; /* mbtowc calls from library must not change state */ -#endif - char *malloc_buf = NULL;/* handy pointer for malloced buffers */ - - /* - * Choose PADSIZE to trade efficiency vs. size. If larger printf - * fields occur frequently, increase PADSIZE and make the initialisers - * below longer. - */ -#define PADSIZE 16 /* pad chunk size */ - static _CONST char blanks[PADSIZE] = - {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}; - static _CONST char zeroes[PADSIZE] = - {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}; - -#ifdef _MB_CAPABLE - memset (&state, '\0', sizeof (state)); -#endif - /* - * BEWARE, these `goto error' on error, and PAD uses `n'. - */ -#define PRINT(ptr, len) { \ - iovp->iov_base = (ptr); \ - iovp->iov_len = (len); \ - uio.uio_resid += (len); \ - iovp++; \ - if (++uio.uio_iovcnt >= NIOV) { \ - if (__SPRINT(data, fp, &uio)) \ - goto error; \ - iovp = iov; \ - } \ -} -#define PAD(howmany, with) { \ - if ((n = (howmany)) > 0) { \ - while (n > PADSIZE) { \ - PRINT (with, PADSIZE); \ - n -= PADSIZE; \ - } \ - PRINT (with, n); \ - } \ -} -#define PRINTANDPAD(p, ep, len, with) { \ - int n = (ep) - (p); \ - if (n > (len)) \ - n = (len); \ - if (n > 0) \ - PRINT((p), n); \ - PAD((len) - (n > 0 ? n : 0), (with)); \ -} -#define FLUSH() { \ - if (uio.uio_resid && __SPRINT(data, fp, &uio)) \ - goto error; \ - uio.uio_iovcnt = 0; \ - iovp = iov; \ -} - - /* Macros to support positional arguments */ -#ifndef _NO_POS_ARGS -# define GET_ARG(n, ap, type) \ - (is_pos_arg \ - ? (n < numargs \ - ? args[n].val_##type \ - : get_arg (data, n, fmt_anchor, &ap, &numargs, args, \ - arg_type, &saved_fmt)->val_##type) \ - : (arg_index++ < numargs \ - ? args[n].val_##type \ - : (numargs < MAX_POS_ARGS \ - ? args[numargs++].val_##type = va_arg (ap, type) \ - : va_arg (ap, type)))) -#else -# define GET_ARG(n, ap, type) (va_arg (ap, type)) -#endif - - /* - * To extend shorts properly, we need both signed and unsigned - * argument extraction methods. - */ -#ifndef _NO_LONGLONG -#define SARG() \ - (flags&QUADINT ? GET_ARG (N, ap, quad_t) : \ - flags&LONGINT ? GET_ARG (N, ap, long) : \ - flags&SHORTINT ? (long)(short)GET_ARG (N, ap, int) : \ - flags&CHARINT ? (long)(signed char)GET_ARG (N, ap, int) : \ - (long)GET_ARG (N, ap, int)) -#define UARG() \ - (flags&QUADINT ? GET_ARG (N, ap, u_quad_t) : \ - flags&LONGINT ? GET_ARG (N, ap, u_long) : \ - flags&SHORTINT ? (u_long)(u_short)GET_ARG (N, ap, int) : \ - flags&CHARINT ? (u_long)(unsigned char)GET_ARG (N, ap, int) : \ - (u_long)GET_ARG (N, ap, u_int)) -#else -#define SARG() \ - (flags&LONGINT ? GET_ARG (N, ap, long) : \ - flags&SHORTINT ? (long)(short)GET_ARG (N, ap, int) : \ - flags&CHARINT ? (long)(signed char)GET_ARG (N, ap, int) : \ - (long)GET_ARG (N, ap, int)) -#define UARG() \ - (flags&LONGINT ? GET_ARG (N, ap, u_long) : \ - flags&SHORTINT ? (u_long)(u_short)GET_ARG (N, ap, int) : \ - flags&CHARINT ? (u_long)(unsigned char)GET_ARG (N, ap, int) : \ - (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); - - ORIENT(fp, -1); - - /* sorry, fprintf(read_only_file, "") returns EOF, not 0 */ - if (cantwrite (data, fp)) { - _funlockfile (fp); - return (EOF); - } - - /* optimise fprintf(stderr) (and other unbuffered Unix files) */ - if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) && - fp->_file >= 0) { - _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; - uio.uio_resid = 0; - uio.uio_iovcnt = 0; - ret = 0; -#ifndef _NO_POS_ARGS - arg_index = 0; - saved_fmt = NULL; - arg_type[0] = -1; - numargs = 0; - is_pos_arg = 0; -#endif - - /* - * Scan the format for conversions (`%' character). - */ - for (;;) { - cp = fmt; -#ifdef _MB_CAPABLE - while ((n = __mbtowc (data, &wc, fmt, MB_CUR_MAX, - __locale_charset (), &state)) != 0) { - if (n < 0) { - /* Wave invalid chars through. */ - memset (&state, 0, sizeof state); - n = 1; - } - else if (wc == '%') - break; - fmt += n; - } -#else - while (*fmt != '\0' && *fmt != '%') - fmt += 1; -#endif - if ((m = fmt - cp) != 0) { - PRINT (cp, m); - ret += m; - } -#ifdef _MB_CAPABLE - if (n <= 0) - goto done; -#else - if (*fmt == '\0') - goto done; -#endif - fmt_anchor = fmt; - fmt++; /* skip over '%' */ - - flags = 0; - dprec = 0; - width = 0; - prec = -1; - sign = '\0'; -#ifdef FLOATING_POINT - lead = 0; -#endif -#ifdef _WANT_IO_C99_FORMATS - nseps = nrepeats = 0; -#endif -#ifndef _NO_POS_ARGS - N = arg_index; - is_pos_arg = 0; -#endif - -rflag: ch = *fmt++; -reswitch: switch (ch) { -#ifdef _WANT_IO_C99_FORMATS - case '\'': - thousands_sep = _localeconv_r (data)->thousands_sep; - thsnd_len = strlen (thousands_sep); - grouping = _localeconv_r (data)->grouping; - if (thsnd_len > 0 && grouping && *grouping) - flags |= GROUPING; - goto rflag; -#endif - case ' ': - /* - * ``If the space and + flags both appear, the space - * flag will be ignored.'' - * -- ANSI X3J11 - */ - if (!sign) - sign = ' '; - goto rflag; - case '#': - flags |= ALT; - goto rflag; - case '*': -#ifndef _NO_POS_ARGS - /* we must check for positional arg used for dynamic width */ - n = N; - old_is_pos_arg = is_pos_arg; - is_pos_arg = 0; - if (is_digit (*fmt)) { - char *old_fmt = fmt; - - n = 0; - ch = *fmt++; - do { - n = 10 * n + to_digit (ch); - ch = *fmt++; - } while (is_digit (ch)); - - if (ch == '$') { - if (n <= MAX_POS_ARGS) { - n -= 1; - is_pos_arg = 1; - } - else - goto error; - } - else { - fmt = old_fmt; - goto rflag; - } - } -#endif /* !_NO_POS_ARGS */ - - /* - * ``A negative field width argument is taken as a - * - flag followed by a positive field width.'' - * -- ANSI X3J11 - * They don't exclude field widths read from args. - */ - width = GET_ARG (n, ap, int); -#ifndef _NO_POS_ARGS - is_pos_arg = old_is_pos_arg; -#endif - if (width >= 0) - goto rflag; - width = -width; - /* FALLTHROUGH */ - case '-': - flags |= LADJUST; - goto rflag; - case '+': - sign = '+'; - goto rflag; - case '.': - if ((ch = *fmt++) == '*') { -#ifndef _NO_POS_ARGS - /* we must check for positional arg used for dynamic width */ - n = N; - old_is_pos_arg = is_pos_arg; - is_pos_arg = 0; - if (is_digit (*fmt)) { - char *old_fmt = fmt; - - n = 0; - ch = *fmt++; - do { - n = 10 * n + to_digit (ch); - ch = *fmt++; - } while (is_digit (ch)); - - if (ch == '$') { - if (n <= MAX_POS_ARGS) { - n -= 1; - is_pos_arg = 1; - } - else - goto error; - } - else { - fmt = old_fmt; - goto rflag; - } - } -#endif /* !_NO_POS_ARGS */ - prec = GET_ARG (n, ap, int); -#ifndef _NO_POS_ARGS - is_pos_arg = old_is_pos_arg; -#endif - if (prec < 0) - prec = -1; - goto rflag; - } - n = 0; - while (is_digit (ch)) { - n = 10 * n + to_digit (ch); - ch = *fmt++; - } - prec = n < 0 ? -1 : n; - goto reswitch; - case '0': - /* - * ``Note that 0 is taken as a flag, not as the - * beginning of a field width.'' - * -- ANSI X3J11 - */ - flags |= ZEROPAD; - goto rflag; - case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - n = 0; - do { - n = 10 * n + to_digit (ch); - ch = *fmt++; - } while (is_digit (ch)); -#ifndef _NO_POS_ARGS - if (ch == '$') { - if (n <= MAX_POS_ARGS) { - N = n - 1; - is_pos_arg = 1; - goto rflag; - } - else - goto error; - } -#endif /* !_NO_POS_ARGS */ - width = n; - goto reswitch; -#ifdef FLOATING_POINT - case 'L': - flags |= LONGDBL; - goto rflag; -#endif - case 'h': -#ifdef _WANT_IO_C99_FORMATS - if (*fmt == 'h') { - fmt++; - flags |= CHARINT; - } else -#endif - flags |= SHORTINT; - goto rflag; - case 'l': -#if defined _WANT_IO_C99_FORMATS || !defined _NO_LONGLONG - if (*fmt == 'l') { - fmt++; - flags |= QUADINT; - } else -#endif - flags |= LONGINT; - goto rflag; - case 'q': /* extension */ - flags |= QUADINT; - goto rflag; -#ifdef _WANT_IO_C99_FORMATS - case 'j': - if (sizeof (intmax_t) == sizeof (long)) - flags |= LONGINT; - else - flags |= QUADINT; - goto rflag; - case 'z': - if (sizeof (size_t) < sizeof (int)) - /* POSIX states size_t is 16 or more bits, as is short. */ - flags |= SHORTINT; - else if (sizeof (size_t) == sizeof (int)) - /* no flag needed */; - else if (sizeof (size_t) <= sizeof (long)) - flags |= LONGINT; - else - /* POSIX states that at least one programming - environment must support size_t no wider than - long, but that means other environments can - have size_t as wide as long long. */ - flags |= QUADINT; - goto rflag; - case 't': - if (sizeof (ptrdiff_t) < sizeof (int)) - /* POSIX states ptrdiff_t is 16 or more bits, as - is short. */ - flags |= SHORTINT; - else if (sizeof (ptrdiff_t) == sizeof (int)) - /* no flag needed */; - else if (sizeof (ptrdiff_t) <= sizeof (long)) - flags |= LONGINT; - else - /* POSIX states that at least one programming - environment must support ptrdiff_t no wider than - long, but that means other environments can - have ptrdiff_t as wide as long long. */ - flags |= QUADINT; - goto rflag; - case 'C': -#endif /* _WANT_IO_C99_FORMATS */ - case 'c': - cp = buf; -#ifdef _MB_CAPABLE - if (ch == 'C' || (flags & LONGINT)) { - mbstate_t ps; - - memset ((_PTR)&ps, '\0', sizeof (mbstate_t)); - if ((size = (int)_wcrtomb_r (data, cp, - (wchar_t)GET_ARG (N, ap, wint_t), - &ps)) == -1) { - fp->_flags |= __SERR; - goto error; - } - } - else -#endif /* _MB_CAPABLE */ - { - *cp = GET_ARG (N, ap, int); - size = 1; - } - sign = '\0'; - break; - case 'D': /* extension */ - flags |= LONGINT; - /*FALLTHROUGH*/ - case 'd': - case 'i': - _uquad = SARG (); -#ifndef _NO_LONGLONG - if ((quad_t)_uquad < 0) -#else - if ((long) _uquad < 0) -#endif - { - - _uquad = -_uquad; - sign = '-'; - } - base = DEC; - goto number; -#ifdef FLOATING_POINT -# ifdef _WANT_IO_C99_FORMATS - case 'a': - case 'A': - case 'F': -# endif - case 'e': - case 'E': - case 'f': - case 'g': - case 'G': -# ifdef _NO_LONGDBL - if (flags & LONGDBL) { - _fpvalue = (double) GET_ARG (N, ap, _LONG_DOUBLE); - } else { - _fpvalue = GET_ARG (N, ap, double); - } - - /* do this before tricky precision changes - - If the output is infinite or NaN, leading - zeros are not permitted. Otherwise, scanf - could not read what printf wrote. - */ - if (isinf (_fpvalue)) { - if (_fpvalue < 0) - sign = '-'; - if (ch <= 'G') /* 'A', 'E', 'F', or 'G' */ - cp = "INF"; - else - cp = "inf"; - size = 3; - flags &= ~ZEROPAD; - break; - } - if (isnan (_fpvalue)) { - if (ch <= 'G') /* 'A', 'E', 'F', or 'G' */ - cp = "NAN"; - else - cp = "nan"; - size = 3; - flags &= ~ZEROPAD; - break; - } - -# else /* !_NO_LONGDBL */ - - if (flags & LONGDBL) { - _fpvalue = GET_ARG (N, ap, _LONG_DOUBLE); - } else { - _fpvalue = (_LONG_DOUBLE)GET_ARG (N, ap, double); - } - - /* do this before tricky precision changes */ - expt = _ldcheck (&_fpvalue); - if (expt == 2) { - if (_fpvalue < 0) - sign = '-'; - if (ch <= 'G') /* 'A', 'E', 'F', or 'G' */ - cp = "INF"; - else - cp = "inf"; - size = 3; - flags &= ~ZEROPAD; - break; - } - if (expt == 1) { - if (ch <= 'G') /* 'A', 'E', 'F', or 'G' */ - cp = "NAN"; - else - cp = "nan"; - size = 3; - flags &= ~ZEROPAD; - break; - } -# endif /* !_NO_LONGDBL */ - -# ifdef _WANT_IO_C99_FORMATS - if (ch == 'a' || ch == 'A') { - ox[0] = '0'; - ox[1] = ch == 'a' ? 'x' : 'X'; - flags |= HEXPREFIX; - if (prec >= BUF) - { - if ((malloc_buf = - (char *)_malloc_r (data, prec + 1)) - == NULL) - { - fp->_flags |= __SERR; - goto error; - } - cp = malloc_buf; - } - else - cp = buf; - } else -# endif /* _WANT_IO_C99_FORMATS */ - if (prec == -1) { - prec = DEFPREC; - } else if ((ch == 'g' || ch == 'G') && prec == 0) { - prec = 1; - } - - flags |= FPT; - - cp = cvt (data, _fpvalue, prec, flags, &softsign, - &expt, ch, &ndig, cp); - - if (ch == 'g' || ch == 'G') { - if (expt <= -4 || expt > prec) - ch -= 2; /* 'e' or 'E' */ - else - ch = 'g'; - } -# ifdef _WANT_IO_C99_FORMATS - else if (ch == 'F') - ch = 'f'; -# endif - if (ch <= 'e') { /* 'a', 'A', 'e', or 'E' fmt */ - --expt; - expsize = exponent (expstr, expt, ch); - size = expsize + ndig; - if (ndig > 1 || flags & ALT) - ++size; -# ifdef _WANT_IO_C99_FORMATS - flags &= ~GROUPING; -# endif - } else { - if (ch == 'f') { /* f fmt */ - if (expt > 0) { - size = expt; - if (prec || flags & ALT) - size += prec + 1; - } else /* "0.X" */ - size = (prec || flags & ALT) - ? prec + 2 - : 1; - } else if (expt >= ndig) { /* fixed g fmt */ - size = expt; - if (flags & ALT) - ++size; - } else - size = ndig + (expt > 0 ? - 1 : 2 - expt); -# ifdef _WANT_IO_C99_FORMATS - if ((flags & GROUPING) && expt > 0) { - /* space for thousands' grouping */ - nseps = nrepeats = 0; - lead = expt; - while (*grouping != CHAR_MAX) { - if (lead <= *grouping) - break; - lead -= *grouping; - if (grouping[1]) { - nseps++; - grouping++; - } else - nrepeats++; - } - size += (nseps + nrepeats) * thsnd_len; - } else -# endif - lead = expt; - } - - if (softsign) - sign = '-'; - break; -#endif /* FLOATING_POINT */ - case 'n': -#ifndef _NO_LONGLONG - if (flags & QUADINT) - *GET_ARG (N, ap, quad_ptr_t) = ret; - else -#endif - if (flags & LONGINT) - *GET_ARG (N, ap, long_ptr_t) = ret; - else if (flags & SHORTINT) - *GET_ARG (N, ap, short_ptr_t) = ret; -#ifdef _WANT_IO_C99_FORMATS - else if (flags & CHARINT) - *GET_ARG (N, ap, char_ptr_t) = ret; -#endif - else - *GET_ARG (N, ap, int_ptr_t) = ret; - continue; /* no output */ - case 'O': /* extension */ - flags |= LONGINT; - /*FALLTHROUGH*/ - case 'o': - _uquad = UARG (); - base = OCT; -#ifdef _WANT_IO_C99_FORMATS - flags &= ~GROUPING; -#endif - goto nosign; - case 'p': - /* - * ``The argument shall be a pointer to void. The - * value of the pointer is converted to a sequence - * of printable characters, in an implementation- - * defined manner.'' - * -- ANSI X3J11 - */ - /* NOSTRICT */ - _uquad = (uintptr_t) GET_ARG (N, ap, void_ptr_t); - base = HEX; - xdigs = "0123456789abcdef"; - flags |= HEXPREFIX; - ox[0] = '0'; - ox[1] = ch = 'x'; - goto nosign; - case 's': -#ifdef _WANT_IO_C99_FORMATS - case 'S': -#endif - sign = '\0'; - cp = GET_ARG (N, ap, char_ptr_t); -#ifndef __OPTIMIZE_SIZE__ - /* Behavior is undefined if the user passed a - NULL string when precision is not 0. - However, if we are not optimizing for size, - we might as well mirror glibc behavior. */ - if (cp == NULL) { - cp = "(null)"; - size = ((unsigned) prec > 6U) ? 6 : prec; - } - else -#endif /* __OPTIMIZE_SIZE__ */ -#ifdef _MB_CAPABLE - if (ch == 'S' || (flags & LONGINT)) { - mbstate_t ps; - _CONST wchar_t *wcp; - - wcp = (_CONST wchar_t *)cp; - size = m = 0; - memset ((_PTR)&ps, '\0', sizeof (mbstate_t)); - - /* Count number of bytes needed for multibyte - string that will be produced from widechar - string. */ - if (prec >= 0) { - while (1) { - if (wcp[m] == L'\0') - break; - if ((n = (int)_wcrtomb_r (data, - buf, wcp[m], &ps)) == -1) { - fp->_flags |= __SERR; - goto error; - } - if (n + size > prec) - break; - m += 1; - size += n; - if (size == prec) - break; - } - } - else { - if ((size = (int)_wcsrtombs_r (data, - NULL, &wcp, 0, &ps)) == -1) { - fp->_flags |= __SERR; - goto error; - } - wcp = (_CONST wchar_t *)cp; - } - - if (size == 0) - break; - - if (size >= BUF) { - if ((malloc_buf = - (char *)_malloc_r (data, size + 1)) - == NULL) { - fp->_flags |= __SERR; - goto error; - } - cp = malloc_buf; - } else - cp = buf; - - /* Convert widechar string to multibyte string. */ - memset ((_PTR)&ps, '\0', sizeof (mbstate_t)); - if (_wcsrtombs_r (data, cp, &wcp, size, &ps) - != size) { - fp->_flags |= __SERR; - goto error; - } - cp[size] = '\0'; - } - else -#endif /* _MB_CAPABLE */ - if (prec >= 0) { - /* - * can't use strlen; can only look for the - * NUL in the first `prec' characters, and - * strlen () will go further. - */ - char *p = memchr (cp, 0, prec); - - if (p != NULL) { - size = p - cp; - if (size > prec) - size = prec; - } else - size = prec; - } else - size = strlen (cp); - - break; - case 'U': /* extension */ - flags |= LONGINT; - /*FALLTHROUGH*/ - case 'u': - _uquad = UARG (); - base = DEC; - goto nosign; - case 'X': - xdigs = "0123456789ABCDEF"; - goto hex; - case 'x': - xdigs = "0123456789abcdef"; -hex: _uquad = UARG (); - base = HEX; - /* leading 0x/X only if non-zero */ - if (flags & ALT && _uquad != 0) { - ox[0] = '0'; - ox[1] = ch; - flags |= HEXPREFIX; - } - -#ifdef _WANT_IO_C99_FORMATS - flags &= ~GROUPING; -#endif - /* unsigned conversions */ -nosign: sign = '\0'; - /* - * ``... diouXx conversions ... if a precision is - * specified, the 0 flag will be ignored.'' - * -- ANSI X3J11 - */ -number: if ((dprec = prec) >= 0) - flags &= ~ZEROPAD; - - /* - * ``The result of converting a zero value with an - * explicit precision of zero is no characters.'' - * -- ANSI X3J11 - */ - cp = buf + BUF; - if (_uquad != 0 || prec != 0) { - /* - * Unsigned mod is hard, and unsigned mod - * by a constant is easier than that by - * a variable; hence this switch. - */ - switch (base) { - case OCT: - do { - *--cp = to_char (_uquad & 7); - _uquad >>= 3; - } while (_uquad); - /* handle octal leading 0 */ - if (flags & ALT && *cp != '0') - *--cp = '0'; - break; - - case DEC: - /* many numbers are 1 digit */ - if (_uquad < 10) { - *--cp = to_char(_uquad); - break; - } -#ifdef _WANT_IO_C99_FORMATS - ndig = 0; -#endif - do { - *--cp = to_char (_uquad % 10); -#ifdef _WANT_IO_C99_FORMATS - ndig++; - /* If (*grouping == CHAR_MAX) then no - more grouping */ - if ((flags & GROUPING) - && ndig == *grouping - && *grouping != CHAR_MAX - && _uquad > 9) { - cp -= thsnd_len; - strncpy (cp, thousands_sep, - thsnd_len); - ndig = 0; - /* If (grouping[1] == '\0') then we - have to use *grouping character - (last grouping rule) for all - next cases. */ - if (grouping[1] != '\0') - grouping++; - } -#endif - _uquad /= 10; - } while (_uquad != 0); - break; - - case HEX: - do { - *--cp = xdigs[_uquad & 15]; - _uquad >>= 4; - } while (_uquad); - break; - - default: - cp = "bug in vfprintf: bad base"; - size = strlen (cp); - goto skipsize; - } - } - /* - * ...result is to be converted to an 'alternate form'. - * For o conversion, it increases the precision to force - * the first digit of the result to be a zero." - * -- ANSI X3J11 - * - * To demonstrate this case, compile and run: - * printf ("%#.0o",0); - */ - else if (base == OCT && (flags & ALT)) - *--cp = '0'; - - size = buf + BUF - cp; - skipsize: - break; - default: /* "%?" prints ?, unless ? is NUL */ - if (ch == '\0') - goto done; - /* pretend it was %c with argument ch */ - cp = buf; - *cp = ch; - size = 1; - sign = '\0'; - break; - } - - /* - * All reasonable formats wind up here. At this point, `cp' - * points to a string which (if not flags&LADJUST) should be - * padded out to `width' places. If flags&ZEROPAD, it should - * first be prefixed by any sign or other prefix; otherwise, - * it should be blank padded before the prefix is emitted. - * After any left-hand padding and prefixing, emit zeroes - * required by a decimal [diouxX] precision, then print the - * string proper, then emit zeroes required by any leftover - * floating precision; finally, if LADJUST, pad with blanks. - * If flags&FPT, ch must be in [aAeEfg]. - * - * Compute actual size, so we know how much to pad. - * size excludes decimal prec; realsz includes it. - */ - realsz = dprec > size ? dprec : size; - if (sign) - realsz++; - if (flags & HEXPREFIX) - realsz+= 2; - - /* right-adjusting blank padding */ - if ((flags & (LADJUST|ZEROPAD)) == 0) - PAD (width - realsz, blanks); - - /* prefix */ - if (sign) - PRINT (&sign, 1); - if (flags & HEXPREFIX) - PRINT (ox, 2); - - /* right-adjusting zero padding */ - if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD) - PAD (width - realsz, zeroes); - - /* leading zeroes from decimal precision */ - PAD (dprec - size, zeroes); - - /* the string or number proper */ -#ifdef FLOATING_POINT - if ((flags & FPT) == 0) { - PRINT (cp, size); - } else { /* glue together f_p fragments */ - if (ch >= 'f') { /* 'f' or 'g' */ - if (_fpvalue == 0) { - /* kludge for __dtoa irregularity */ - PRINT ("0", 1); - if (expt < ndig || flags & ALT) { - PRINT (decimal_point, decp_len); - PAD (ndig - 1, zeroes); - } - } else if (expt <= 0) { - PRINT ("0", 1); - if (expt || ndig || flags & ALT) { - PRINT (decimal_point, decp_len); - PAD (-expt, zeroes); - PRINT (cp, ndig); - } - } else { - char *convbuf = cp; - PRINTANDPAD(cp, convbuf + ndig, - lead, zeroes); - cp += lead; -#ifdef _WANT_IO_C99_FORMATS - if (flags & GROUPING) { - while (nseps > 0 || nrepeats > 0) { - if (nrepeats > 0) - nrepeats--; - else { - grouping--; - nseps--; - } - PRINT(thousands_sep, thsnd_len); - PRINTANDPAD (cp, convbuf + ndig, - *grouping, zeroes); - cp += *grouping; - } - if (cp > convbuf + ndig) - cp = convbuf + ndig; - } -#endif - if (expt < ndig || flags & ALT) - PRINT (decimal_point, decp_len); - PRINTANDPAD (cp, convbuf + ndig, - ndig - expt, zeroes); - } - } else { /* 'a', 'A', 'e', or 'E' */ - if (ndig > 1 || flags & ALT) { - PRINT (cp, 1); - cp++; - PRINT (decimal_point, decp_len); - if (_fpvalue) { - PRINT (cp, ndig - 1); - } else /* 0.[0..] */ - /* __dtoa irregularity */ - PAD (ndig - 1, zeroes); - } else /* XeYYY */ - PRINT (cp, 1); - PRINT (expstr, expsize); - } - } -#else /* !FLOATING_POINT */ - PRINT (cp, size); -#endif - /* left-adjusting padding (always blank) */ - if (flags & LADJUST) - PAD (width - realsz, blanks); - - /* finally, adjust ret */ - ret += width > realsz ? width : realsz; - - FLUSH (); /* copy out the I/O vectors */ - - if (malloc_buf != NULL) { - _free_r (data, malloc_buf); - malloc_buf = NULL; - } - } -done: - FLUSH (); -error: - if (malloc_buf != NULL) - _free_r (data, malloc_buf); -#ifndef STRING_ONLY - _funlockfile (fp); -#endif - return (__sferror (fp) ? EOF : ret); - /* NOTREACHED */ -} - -#ifdef FLOATING_POINT - -/* Using reentrant DATA, convert finite VALUE into a string of digits - with no decimal point, using NDIGITS precision and FLAGS as guides - to whether trailing zeros must be included. Set *SIGN to nonzero - if VALUE was negative. Set *DECPT to the exponent plus one. Set - *LENGTH to the length of the returned string. CH must be one of - [aAeEfFgG]; if it is [aA], then the return string lives in BUF, - otherwise the return value shares the mprec reentrant storage. */ -static char * -cvt(struct _reent *data, _PRINTF_FLOAT_TYPE value, int ndigits, int flags, - char *sign, int *decpt, int ch, int *length, char *buf) -{ - int mode, dsgn; - char *digits, *bp, *rve; -# ifdef _NO_LONGDBL - union double_union tmp; - - tmp.d = value; - if (word0 (tmp) & Sign_bit) { /* this will check for < 0 and -0.0 */ - value = -value; - *sign = '-'; - } else - *sign = '\000'; -# else /* !_NO_LONGDBL */ - union - { - struct ldieee ieee; - _LONG_DOUBLE val; - } ld; - - ld.val = value; - if (ld.ieee.sign) { /* this will check for < 0 and -0.0 */ - value = -value; - *sign = '-'; - } else - *sign = '\000'; -# endif /* !_NO_LONGDBL */ - -# ifdef _WANT_IO_C99_FORMATS - if (ch == 'a' || ch == 'A') { - /* This code assumes FLT_RADIX is a power of 2. The initial - division ensures the digit before the decimal will be less - than FLT_RADIX (unless it is rounded later). There is no - loss of precision in these calculations. */ - value = FREXP (value, decpt) / 8; - if (!value) - *decpt = 1; - digits = ch == 'a' ? "0123456789abcdef" : "0123456789ABCDEF"; - bp = buf; - do { - value *= 16; - mode = (int) value; - value -= mode; - *bp++ = digits[mode]; - } while (ndigits-- && value); - if (value > 0.5 || (value == 0.5 && mode & 1)) { - /* round to even */ - rve = bp; - while (*--rve == digits[0xf]) { - *rve = '0'; - } - *rve = *rve == '9' ? digits[0xa] : *rve + 1; - } else { - while (ndigits-- >= 0) { - *bp++ = '0'; - } - } - *length = bp - buf; - return buf; - } -# endif /* _WANT_IO_C99_FORMATS */ - if (ch == 'f' || ch == 'F') { - mode = 3; /* ndigits after the decimal point */ - } else { - /* To obtain ndigits after the decimal point for the 'e' - * and 'E' formats, round to ndigits + 1 significant - * figures. - */ - if (ch == 'e' || ch == 'E') { - ndigits++; - } - mode = 2; /* ndigits significant digits */ - } - - digits = _DTOA_R (data, value, mode, ndigits, decpt, &dsgn, &rve); - - if ((ch != 'g' && ch != 'G') || flags & ALT) { /* Print trailing zeros */ - bp = digits + ndigits; - if (ch == 'f' || ch == 'F') { - if (*digits == '0' && value) - *decpt = -ndigits + 1; - bp += *decpt; - } - if (value == 0) /* kludge for __dtoa irregularity */ - rve = bp; - while (rve < bp) - *rve++ = '0'; - } - *length = rve - digits; - return (digits); -} - -static int -exponent(char *p0, int exp, int fmtch) -{ - register char *p, *t; - char expbuf[MAXEXPLEN]; -# ifdef _WANT_IO_C99_FORMATS - int isa = fmtch == 'a' || fmtch == 'A'; -# else -# define isa 0 -# endif - - p = p0; - *p++ = isa ? 'p' - 'a' + fmtch : fmtch; - if (exp < 0) { - exp = -exp; - *p++ = '-'; - } - else - *p++ = '+'; - t = expbuf + MAXEXPLEN; - if (exp > 9) { - do { - *--t = to_char (exp % 10); - } while ((exp /= 10) > 9); - *--t = to_char (exp); - for (; t < expbuf + MAXEXPLEN; *p++ = *t++); - } - else { - if (!isa) - *p++ = '0'; - *p++ = to_char (exp); - } - return (p - p0); -} -#endif /* FLOATING_POINT */ - - -#ifndef _NO_POS_ARGS - -/* Positional argument support. - Written by Jeff Johnston - - Copyright (c) 2002 Red Hat Incorporated. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 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. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL RED HAT INCORPORATED BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* The below constant state tables are shared between all versions of - vfprintf and vfwprintf. They must only be defined once, which we do in - the STRING_ONLY/INTEGER_ONLY versions here. */ -#if defined (STRING_ONLY) && defined(INTEGER_ONLY) - -_CONST __CH_CLASS __chclass[256] = { - /* 00-07 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* 08-0f */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* 10-17 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* 18-1f */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* 20-27 */ FLAG, OTHER, OTHER, FLAG, DOLLAR, OTHER, OTHER, FLAG, - /* 28-2f */ OTHER, OTHER, STAR, FLAG, OTHER, FLAG, DOT, OTHER, - /* 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, - /* 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, - /* 68-6f */ MODFR, SPEC, MODFR, OTHER, MODFR, OTHER, SPEC, SPEC, - /* 70-77 */ SPEC, MODFR, OTHER, SPEC, MODFR, SPEC, OTHER, OTHER, - /* 78-7f */ SPEC, OTHER, MODFR, OTHER, OTHER, OTHER, OTHER, OTHER, - /* 80-87 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* 88-8f */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* 90-97 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* 98-9f */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* a0-a7 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* a8-af */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* b0-b7 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* b8-bf */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* c0-c7 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* c8-cf */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* d0-d7 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* d8-df */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* e0-e7 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* e8-ef */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* f0-f7 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* f8-ff */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, -}; - -_CONST __STATE __state_table[MAX_STATE][MAX_CH_CLASS] = { - /* '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 }, - /* WIDTH */ { DONE, DONE, DONE, SMOD, DONE, SDOT, DONE, DONE, DONE }, - /* SMOD */ { DONE, DONE, DONE, DONE, DONE, DONE, DONE, DONE, DONE }, - /* SDOT */ { SDOT, PREC, DONE, SMOD, DONE, DONE, VARP, DONE, DONE }, - /* VARW */ { DONE, VWDIG, DONE, SMOD, DONE, SDOT, DONE, DONE, DONE }, - /* VARP */ { DONE, VPDIG, DONE, SMOD, DONE, DONE, DONE, DONE, DONE }, - /* PREC */ { DONE, DONE, DONE, SMOD, DONE, DONE, DONE, DONE, DONE }, - /* VWDIG */ { DONE, DONE, WIDTH, DONE, DONE, DONE, DONE, DONE, DONE }, - /* VPDIG */ { DONE, DONE, PREC, DONE, DONE, DONE, DONE, DONE, DONE }, -}; - -_CONST __ACTION __action_table[MAX_STATE][MAX_CH_CLASS] = { - /* '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 }, - /* WIDTH */ { NOOP, NOOP, NOOP, GETMOD, GETARG, NOOP, NOOP, NOOP, NOOP }, - /* SMOD */ { NOOP, NOOP, NOOP, NOOP, GETARG, NOOP, NOOP, NOOP, NOOP }, - /* SDOT */ { NOOP, SKIPNUM, NOOP, GETMOD, GETARG, NOOP, NOOP, NOOP, NOOP }, - /* VARW */ { NOOP, NUMBER, NOOP, GETPW, GETPWB, GETPW, NOOP, NOOP, NOOP }, - /* VARP */ { NOOP, NUMBER, NOOP, GETPW, GETPWB, NOOP, NOOP, NOOP, NOOP }, - /* PREC */ { NOOP, NOOP, NOOP, GETMOD, GETARG, NOOP, NOOP, NOOP, NOOP }, - /* VWDIG */ { NOOP, NOOP, PWPOS, NOOP, NOOP, NOOP, NOOP, NOOP, NOOP }, - /* VPDIG */ { NOOP, NOOP, PWPOS, NOOP, NOOP, NOOP, NOOP, NOOP, NOOP }, -}; - -#endif /* STRING_ONLY && INTEGER_ONLY */ - -/* function to get positional parameter N where n = N - 1 */ -static union arg_val * -_DEFUN(get_arg, (data, n, fmt, ap, numargs_p, args, arg_type, last_fmt), - struct _reent *data _AND - int n _AND - char *fmt _AND - va_list *ap _AND - int *numargs_p _AND - union arg_val *args _AND - int *arg_type _AND - char **last_fmt) -{ - int ch; - int number, flags; - int spec_type; - int numargs = *numargs_p; - __CH_CLASS chtype; - __STATE state, next_state; - __ACTION action; - int pos, last_arg; - int max_pos_arg = n; - /* Only need types that can be reached via vararg promotions. */ - enum types { INT, LONG_INT, QUAD_INT, CHAR_PTR, DOUBLE, LONG_DOUBLE, WIDE_CHAR }; -# ifdef _MB_CAPABLE - wchar_t wc; - mbstate_t wc_state; - int nbytes; -# endif - - /* if this isn't the first call, pick up where we left off last time */ - if (*last_fmt != NULL) - fmt = *last_fmt; - -# ifdef _MB_CAPABLE - memset (&wc_state, '\0', sizeof (wc_state)); -# endif - - /* we need to process either to end of fmt string or until we have actually - read the desired parameter from the vararg list. */ - while (*fmt && n >= numargs) - { -# ifdef _MB_CAPABLE - while ((nbytes = __mbtowc (data, &wc, fmt, MB_CUR_MAX, - __locale_charset (), &wc_state)) > 0) - { - fmt += nbytes; - if (wc == '%') - break; - } - - if (nbytes <= 0) - break; -# else - while (*fmt != '\0' && *fmt != '%') - fmt += 1; - - if (*fmt == '\0') - break; -# endif /* ! _MB_CAPABLE */ - state = START; - flags = 0; - pos = -1; - number = 0; - spec_type = INT; - - /* Use state/action table to process format specifiers. We ignore invalid - formats and we are only interested in information that tells us how to - read the vararg list. */ - while (state != DONE) - { - ch = *fmt++; - chtype = __chclass[ch]; - next_state = __state_table[state][chtype]; - action = __action_table[state][chtype]; - state = next_state; - - switch (action) - { - case GETMOD: /* we have format modifier */ - switch (ch) - { - case 'h': - /* No flag needed, since short and char promote to int. */ - break; - case 'L': - flags |= LONGDBL; - break; - case 'q': - flags |= QUADINT; - break; -# ifdef _WANT_IO_C99_FORMATS - case 'j': - if (sizeof (intmax_t) == sizeof (long)) - flags |= LONGINT; - else - flags |= QUADINT; - break; - case 'z': - if (sizeof (size_t) <= sizeof (int)) - /* no flag needed */; - else if (sizeof (size_t) <= sizeof (long)) - flags |= LONGINT; - else - /* POSIX states that at least one programming - environment must support size_t no wider than - long, but that means other environments can - have size_t as wide as long long. */ - flags |= QUADINT; - break; - case 't': - if (sizeof (ptrdiff_t) <= sizeof (int)) - /* no flag needed */; - else if (sizeof (ptrdiff_t) <= sizeof (long)) - flags |= LONGINT; - else - /* POSIX states that at least one programming - environment must support ptrdiff_t no wider than - long, but that means other environments can - have ptrdiff_t as wide as long long. */ - flags |= QUADINT; - break; -# endif /* _WANT_IO_C99_FORMATS */ - case 'l': - default: -# if defined _WANT_IO_C99_FORMATS || !defined _NO_LONGLONG - if (*fmt == 'l') - { - flags |= QUADINT; - ++fmt; - } - else -# endif - flags |= LONGINT; - break; - } - break; - case GETARG: /* we have format specifier */ - { - numargs &= (MAX_POS_ARGS - 1); - /* process the specifier and translate it to a type to fetch from varargs */ - switch (ch) - { - case 'd': - case 'i': - case 'o': - case 'x': - case 'X': - case 'u': - if (flags & LONGINT) - spec_type = LONG_INT; -# ifndef _NO_LONGLONG - else if (flags & QUADINT) - spec_type = QUAD_INT; -# endif - else - spec_type = INT; - break; - case 'D': - case 'U': - case 'O': - spec_type = LONG_INT; - break; -# ifdef _WANT_IO_C99_FORMATS - case 'a': - case 'A': - case 'F': -# endif - case 'f': - case 'g': - case 'G': - case 'E': - case 'e': -# ifndef _NO_LONGDBL - if (flags & LONGDBL) - spec_type = LONG_DOUBLE; - else -# endif - spec_type = DOUBLE; - break; - case 's': -# ifdef _WANT_IO_C99_FORMATS - case 'S': -# endif - case 'p': - case 'n': - spec_type = CHAR_PTR; - break; - case 'c': -# ifdef _WANT_IO_C99_FORMATS - if (flags & LONGINT) - spec_type = WIDE_CHAR; - else -# endif - spec_type = INT; - break; -# ifdef _WANT_IO_C99_FORMATS - case 'C': - spec_type = WIDE_CHAR; - break; -# endif - } - - /* if we have a positional parameter, just store the type, otherwise - fetch the parameter from the vararg list */ - if (pos != -1) - arg_type[pos] = spec_type; - else - { - switch (spec_type) - { - case LONG_INT: - args[numargs++].val_long = va_arg (*ap, long); - break; - case QUAD_INT: - args[numargs++].val_quad_t = va_arg (*ap, quad_t); - break; - case WIDE_CHAR: - args[numargs++].val_wint_t = va_arg (*ap, wint_t); - break; - case INT: - args[numargs++].val_int = va_arg (*ap, int); - break; - case CHAR_PTR: - args[numargs++].val_char_ptr_t = va_arg (*ap, char *); - break; - case DOUBLE: - args[numargs++].val_double = va_arg (*ap, double); - break; - case LONG_DOUBLE: - args[numargs++].val__LONG_DOUBLE = va_arg (*ap, _LONG_DOUBLE); - break; - } - } - } - break; - case GETPOS: /* we have positional specifier */ - if (arg_type[0] == -1) - memset (arg_type, 0, sizeof (int) * MAX_POS_ARGS); - pos = number - 1; - max_pos_arg = (max_pos_arg > pos ? max_pos_arg : pos); - break; - case PWPOS: /* we have positional specifier for width or precision */ - if (arg_type[0] == -1) - memset (arg_type, 0, sizeof (int) * MAX_POS_ARGS); - number -= 1; - arg_type[number] = INT; - max_pos_arg = (max_pos_arg > number ? max_pos_arg : number); - break; - case GETPWB: /* we require format pushback */ - --fmt; - /* fallthrough */ - case GETPW: /* we have a variable precision or width to acquire */ - args[numargs++].val_int = va_arg (*ap, int); - break; - case NUMBER: /* we have a number to process */ - number = (ch - '0'); - while ((ch = *fmt) != '\0' && is_digit (ch)) - { - number = number * 10 + (ch - '0'); - ++fmt; - } - break; - case SKIPNUM: /* we have a number to skip */ - while ((ch = *fmt) != '\0' && is_digit (ch)) - ++fmt; - break; - case NOOP: - default: - break; /* do nothing */ - } - } - } - - /* process all arguments up to at least the one we are looking for and if we - have seen the end of the string, then process up to the max argument needed */ - if (*fmt == '\0') - last_arg = max_pos_arg; - else - last_arg = n; - - while (numargs <= last_arg) - { - switch (arg_type[numargs]) - { - case LONG_INT: - args[numargs++].val_long = va_arg (*ap, long); - break; - case QUAD_INT: - args[numargs++].val_quad_t = va_arg (*ap, quad_t); - break; - case CHAR_PTR: - args[numargs++].val_char_ptr_t = va_arg (*ap, char *); - break; - case DOUBLE: - args[numargs++].val_double = va_arg (*ap, double); - break; - case LONG_DOUBLE: - args[numargs++].val__LONG_DOUBLE = va_arg (*ap, _LONG_DOUBLE); - break; - case WIDE_CHAR: - args[numargs++].val_wint_t = va_arg (*ap, wint_t); - break; - case INT: - default: - args[numargs++].val_int = va_arg (*ap, int); - break; - } - } - - /* alter the global numargs value and keep a reference to the last bit of the fmt - string we processed here because the caller will continue processing where we started */ - *numargs_p = numargs; - *last_fmt = fmt; - return &args[n]; -} -#endif /* !_NO_POS_ARGS */ diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c deleted file mode 100644 index 32a132a93..000000000 --- a/newlib/libc/stdio/vfscanf.c +++ /dev/null @@ -1,1620 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<vfscanf>>, <<vscanf>>, <<vsscanf>>---format argument list - -INDEX - vfscanf -INDEX - _vfscanf_r -INDEX - vscanf -INDEX - _vscanf_r -INDEX - vsscanf -INDEX - _vsscanf_r - -ANSI_SYNOPSIS - #include <stdio.h> - #include <stdarg.h> - int vscanf(const char *<[fmt]>, va_list <[list]>); - int vfscanf(FILE *<[fp]>, const char *<[fmt]>, va_list <[list]>); - int vsscanf(const char *<[str]>, const char *<[fmt]>, va_list <[list]>); - - int _vscanf_r(struct _reent *<[reent]>, const char *<[fmt]>, - va_list <[list]>); - int _vfscanf_r(struct _reent *<[reent]>, FILE *<[fp]>, const char *<[fmt]>, - va_list <[list]>); - int _vsscanf_r(struct _reent *<[reent]>, const char *<[str]>, - const char *<[fmt]>, va_list <[list]>); - -TRAD_SYNOPSIS - #include <stdio.h> - #include <varargs.h> - int vscanf( <[fmt]>, <[ist]>) - char *<[fmt]>; - va_list <[list]>; - - int vfscanf( <[fp]>, <[fmt]>, <[list]>) - FILE *<[fp]>; - char *<[fmt]>; - va_list <[list]>; - - int vsscanf( <[str]>, <[fmt]>, <[list]>) - char *<[str]>; - char *<[fmt]>; - va_list <[list]>; - - int _vscanf_r( <[reent]>, <[fmt]>, <[ist]>) - struct _reent *<[reent]>; - char *<[fmt]>; - va_list <[list]>; - - int _vfscanf_r( <[reent]>, <[fp]>, <[fmt]>, <[list]>) - struct _reent *<[reent]>; - FILE *<[fp]>; - char *<[fmt]>; - va_list <[list]>; - - int _vsscanf_r( <[reent]>, <[str]>, <[fmt]>, <[list]>) - struct _reent *<[reent]>; - char *<[str]>; - char *<[fmt]>; - va_list <[list]>; - -DESCRIPTION -<<vscanf>>, <<vfscanf>>, and <<vsscanf>> are (respectively) variants -of <<scanf>>, <<fscanf>>, and <<sscanf>>. They differ only in -allowing their caller to pass the variable argument list as a -<<va_list>> object (initialized by <<va_start>>) rather than -directly accepting a variable number of arguments. - -RETURNS -The return values are consistent with the corresponding functions: -<<vscanf>> returns the number of input fields successfully scanned, -converted, and stored; the return value does not include scanned -fields which were not stored. - -If <<vscanf>> attempts to read at end-of-file, the return value -is <<EOF>>. - -If no fields were stored, the return value is <<0>>. - -The routines <<_vscanf_r>>, <<_vfscanf_f>>, and <<_vsscanf_r>> are -reentrant versions which take an additional first parameter which points to the -reentrancy structure. - -PORTABILITY -These are GNU extensions. - -Supporting OS subroutines required: -*/ - -#include <_ansi.h> -#include <reent.h> -#include <newlib.h> -#include <ctype.h> -#include <wctype.h> -#include <stdio.h> -#include <stdlib.h> -#include <stdint.h> -#include <limits.h> -#include <wchar.h> -#include <string.h> -#include <stdarg.h> -#include <errno.h> -#include "local.h" -#include "../stdlib/local.h" - -#ifdef INTEGER_ONLY -#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 -#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 -#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> - -/* Currently a test is made to see if long double processing is warranted. - This could be changed in the future should the _ldtoa_r code be - preferred over _dtoa_r. */ -#define _NO_LONGDBL -#if defined _WANT_IO_LONG_DOUBLE && (LDBL_MANT_DIG > DBL_MANT_DIG) -#undef _NO_LONGDBL -extern _LONG_DOUBLE _strtold _PARAMS((char *s, char **sptr)); -#endif - -#include "floatio.h" - -#if ((MAXEXP+MAXFRACT+3) > MB_LEN_MAX) -# define BUF (MAXEXP+MAXFRACT+3) /* 3 = sign + decimal point + NUL */ -#else -# define BUF MB_LEN_MAX -#endif - -/* An upper bound for how long a long prints in decimal. 4 / 13 approximates - log (2). Add one char for roundoff compensation and one for the sign. */ -#define MAX_LONG_LEN ((CHAR_BIT * sizeof (long) - 1) * 4 / 13 + 2) -#else -#define BUF 40 -#endif - -#define _NO_LONGLONG -#if defined _WANT_IO_LONG_LONG \ - && (defined __GNUC__ || __STDC_VERSION__ >= 199901L) -# undef _NO_LONGLONG -#endif - -#define _NO_POS_ARGS -#ifdef _WANT_IO_POS_ARGS -# undef _NO_POS_ARGS -# ifdef NL_ARGMAX -# define MAX_POS_ARGS NL_ARGMAX -# else -# define MAX_POS_ARGS 32 -# endif - -static void * get_arg (int, va_list *, int *, void **); -#endif /* _WANT_IO_POS_ARGS */ - -/* - * Flags used during conversion. - */ - -#define LONG 0x01 /* l: long or double */ -#define LONGDBL 0x02 /* L/ll: long double or long long */ -#define SHORT 0x04 /* h: short */ -#define CHAR 0x08 /* hh: 8 bit integer */ -#define SUPPRESS 0x10 /* suppress assignment */ -#define POINTER 0x20 /* weird %p pointer (`fake hex') */ -#define NOSKIP 0x40 /* do not skip blanks */ - -/* - * The following are used in numeric conversions only: - * SIGNOK, NDIGITS, DPTOK, and EXPOK are for floating point; - * SIGNOK, NDIGITS, PFXOK, and NZDIGITS are for integral. - */ - -#define SIGNOK 0x80 /* +/- is (still) legal */ -#define NDIGITS 0x100 /* no digits detected */ - -#define DPTOK 0x200 /* (float) decimal point is still legal */ -#define EXPOK 0x400 /* (float) exponent (e+3, etc) still legal */ - -#define PFXOK 0x200 /* 0x prefix is (still) legal */ -#define NZDIGITS 0x400 /* no zero digits detected */ -#define NNZDIGITS 0x800 /* no non-zero digits detected */ - -/* - * Conversion types. - */ - -#define CT_CHAR 0 /* %c conversion */ -#define CT_CCL 1 /* %[...] conversion */ -#define CT_STRING 2 /* %s conversion */ -#define CT_INT 3 /* integer, i.e., strtol or strtoul */ -#define CT_FLOAT 4 /* floating, i.e., strtod */ - -#if 0 -#define u_char unsigned char -#endif -#define u_char char -#define u_long unsigned long - -#ifndef _NO_LONGLONG -typedef unsigned long long u_long_long; -#endif - -/* - * vfscanf - */ - -#define BufferEmpty (fp->_r <= 0 && __srefill_r(rptr, fp)) - -#ifndef STRING_ONLY - -#ifndef _REENT_ONLY - -int -_DEFUN(VFSCANF, (fp, fmt, ap), - register FILE *fp _AND - _CONST char *fmt _AND - va_list ap) -{ - CHECK_INIT(_REENT, fp); - return __SVFSCANF_R (_REENT, fp, fmt, ap); -} - -int -_DEFUN(__SVFSCANF, (fp, fmt0, ap), - register FILE *fp _AND - char _CONST *fmt0 _AND - va_list ap) -{ - return __SVFSCANF_R (_REENT, fp, fmt0, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_VFSCANF_R, (data, fp, fmt, ap), - struct _reent *data _AND - register FILE *fp _AND - _CONST char *fmt _AND - va_list ap) -{ - CHECK_INIT(data, fp); - return __SVFSCANF_R (data, fp, fmt, ap); -} -#endif /* !STRING_ONLY */ - -#if defined (STRING_ONLY) && defined (INTEGER_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. */ -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. */ -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 |= __SEOF; - return EOF; -} - -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; -} -#else /* !STRING_ONLY || !INTEGER_ONLY */ -int _EXFUN (_sungetc_r, (struct _reent *, int, register FILE *)); -int _EXFUN (__ssrefill_r, (struct _reent *, register FILE *)); -size_t _EXFUN (_sfread_r, (struct _reent *, _PTR buf, size_t, size_t, FILE *)); -#endif /* !STRING_ONLY || !INTEGER_ONLY */ - -int -_DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap), - struct _reent *rptr _AND - register FILE *fp _AND - char _CONST *fmt0 _AND - va_list ap) -{ - register u_char *fmt = (u_char *) fmt0; - register int c; /* character from format, or conversion */ - register size_t width; /* field width, or 0 */ - register char *p; /* points into all kinds of strings */ - register int n; /* handy integer */ - register int flags; /* flags as defined above */ - register char *p0; /* saves original value of p when necessary */ - int nassigned; /* number of fields assigned */ - int nread; /* number of characters consumed from fp */ -#ifndef _NO_POS_ARGS - int N; /* arg number */ - int arg_index = 0; /* index into args processed directly */ - int numargs = 0; /* number of varargs read */ - void *args[MAX_POS_ARGS]; /* positional args read */ - int is_pos_arg; /* is current format positional? */ -#endif - int base = 0; /* base argument to strtol/strtoul */ - int nbytes = 1; /* number of bytes read from fmt string */ - wchar_t wc; /* wchar to use to read format string */ - wchar_t *wcp; /* handy wide character pointer */ - size_t mbslen; /* length of converted multibyte sequence */ -#ifdef _MB_CAPABLE - mbstate_t state; /* value to keep track of multibyte state */ -#endif - - #define CCFN_PARAMS _PARAMS((struct _reent *, const char *, char **, int)) - u_long (*ccfn)CCFN_PARAMS=0; /* conversion function (strtol/strtoul) */ - char ccltab[256]; /* character class table for %[...] */ - char buf[BUF]; /* buffer for numeric conversions */ - unsigned char *lptr; /* literal pointer */ - - char *cp; - short *sp; - int *ip; -#ifdef FLOATING_POINT - float *flp; - _LONG_DOUBLE *ldp; - double *dp; -#endif - long *lp; -#ifndef _NO_LONGLONG - long long *llp; -#endif - - /* `basefix' is used to avoid `if' tests in the integer scanner */ - static _CONST short basefix[17] = - {10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - - /* Macro to support positional arguments */ -#ifndef _NO_POS_ARGS -# define GET_ARG(n, ap, type) \ - ((type) (is_pos_arg \ - ? (n < numargs \ - ? args[n] \ - : get_arg (n, &ap, &numargs, args)) \ - : (arg_index++ < numargs \ - ? args[n] \ - : (numargs < MAX_POS_ARGS \ - ? args[numargs++] = va_arg (ap, void *) \ - : va_arg (ap, void *))))) -#else -# define GET_ARG(n, ap, type) (va_arg (ap, type)) -#endif - - _flockfile (fp); - - ORIENT (fp, -1); - - nassigned = 0; - nread = 0; -#ifdef _MB_CAPABLE - memset (&state, 0, sizeof (state)); -#endif - - for (;;) - { -#ifndef _MB_CAPABLE - wc = *fmt; -#else - nbytes = __mbtowc (rptr, &wc, fmt, MB_CUR_MAX, __locale_charset (), - &state); - if (nbytes < 0) { - wc = 0xFFFD; /* Unicode replacement character */ - nbytes = 1; - memset (&state, 0, sizeof (state)); - } -#endif - fmt += nbytes; - - if (wc == 0) - goto all_done; - if (nbytes == 1 && isspace (wc)) - { - for (;;) - { - if (BufferEmpty || !isspace (*fp->_p)) - break; - nread++, fp->_r--, fp->_p++; - } - continue; - } - if (wc != '%') - goto literal; - width = 0; - flags = 0; -#ifndef _NO_POS_ARGS - N = arg_index; - is_pos_arg = 0; -#endif - - /* - * switch on the format. continue if done; break once format - * type is derived. - */ - - again: - c = *fmt++; - - switch (c) - { - case '%': - literal: - lptr = fmt - nbytes; - for (n = 0; n < nbytes; ++n) - { - if (BufferEmpty) - goto input_failure; - if (*fp->_p != *lptr) - goto match_failure; - fp->_r--, fp->_p++; - nread++; - ++lptr; - } - continue; - - case '*': - flags |= SUPPRESS; - goto again; - case 'l': -#if defined _WANT_IO_C99_FORMATS || !defined _NO_LONGLONG - if (*fmt == 'l') /* Check for 'll' = long long (SUSv3) */ - { - ++fmt; - flags |= LONGDBL; - } - else -#endif - flags |= LONG; - goto again; - case 'L': - flags |= LONGDBL; - goto again; - case 'h': -#ifdef _WANT_IO_C99_FORMATS - if (*fmt == 'h') /* Check for 'hh' = char int (SUSv3) */ - { - ++fmt; - flags |= CHAR; - } - else -#endif - flags |= SHORT; - goto again; -#ifdef _WANT_IO_C99_FORMATS - case 'j': /* intmax_t */ - if (sizeof (intmax_t) == sizeof (long)) - flags |= LONG; - else - flags |= LONGDBL; - goto again; - case 't': /* ptrdiff_t */ - if (sizeof (ptrdiff_t) < sizeof (int)) - /* POSIX states ptrdiff_t is 16 or more bits, as - is short. */ - flags |= SHORT; - else if (sizeof (ptrdiff_t) == sizeof (int)) - /* no flag needed */; - else if (sizeof (ptrdiff_t) <= sizeof (long)) - flags |= LONG; - else - /* POSIX states that at least one programming - environment must support ptrdiff_t no wider than - long, but that means other environments can - have ptrdiff_t as wide as long long. */ - flags |= LONGDBL; - goto again; - case 'z': /* size_t */ - if (sizeof (size_t) < sizeof (int)) - /* POSIX states size_t is 16 or more bits, as is short. */ - flags |= SHORT; - else if (sizeof (size_t) == sizeof (int)) - /* no flag needed */; - else if (sizeof (size_t) <= sizeof (long)) - flags |= LONG; - else - /* POSIX states that at least one programming - environment must support size_t no wider than - long, but that means other environments can - have size_t as wide as long long. */ - flags |= LONGDBL; - goto again; -#endif /* _WANT_IO_C99_FORMATS */ - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - width = width * 10 + c - '0'; - goto again; - -#ifndef _NO_POS_ARGS - case '$': - if (width <= MAX_POS_ARGS) - { - N = width - 1; - is_pos_arg = 1; - width = 0; - goto again; - } - rptr->_errno = EINVAL; - goto input_failure; -#endif /* !_NO_POS_ARGS */ - - /* - * Conversions. Those marked `compat' are for - * 4.[123]BSD compatibility. - * - * (According to ANSI, E and X formats are supposed to - * the same as e and x. Sorry about that.) - */ - - case 'D': /* compat */ - flags |= LONG; - /* FALLTHROUGH */ - case 'd': - c = CT_INT; - ccfn = (u_long (*)CCFN_PARAMS)_strtol_r; - base = 10; - break; - - case 'i': - c = CT_INT; - ccfn = (u_long (*)CCFN_PARAMS)_strtol_r; - base = 0; - break; - - case 'O': /* compat */ - flags |= LONG; - /* FALLTHROUGH */ - case 'o': - c = CT_INT; - ccfn = _strtoul_r; - base = 8; - break; - - case 'u': - c = CT_INT; - ccfn = _strtoul_r; - base = 10; - break; - - case 'X': - case 'x': - flags |= PFXOK; /* enable 0x prefixing */ - c = CT_INT; - ccfn = _strtoul_r; - base = 16; - break; - -#ifdef FLOATING_POINT -# ifdef _WANT_IO_C99_FORMATS - case 'a': - case 'A': - case 'F': -# endif - case 'E': - case 'G': - case 'e': - case 'f': - case 'g': - c = CT_FLOAT; - break; -#endif - -#ifdef _WANT_IO_C99_FORMATS - case 'S': - flags |= LONG; - /* FALLTHROUGH */ -#endif - - case 's': - c = CT_STRING; - break; - - case '[': - fmt = (u_char *) __sccl (ccltab, (unsigned char *) fmt); - flags |= NOSKIP; - c = CT_CCL; - break; - -#ifdef _WANT_IO_C99_FORMATS - case 'C': - flags |= LONG; - /* FALLTHROUGH */ -#endif - - case 'c': - flags |= NOSKIP; - c = CT_CHAR; - break; - - case 'p': /* pointer format is like hex */ - flags |= POINTER | PFXOK; - c = CT_INT; - ccfn = _strtoul_r; - base = 16; - break; - - case 'n': - if (flags & SUPPRESS) /* ??? */ - continue; -#ifdef _WANT_IO_C99_FORMATS - if (flags & CHAR) - { - cp = GET_ARG (N, ap, char *); - *cp = nread; - } - else -#endif - if (flags & SHORT) - { - sp = GET_ARG (N, ap, short *); - *sp = nread; - } - else if (flags & LONG) - { - lp = GET_ARG (N, ap, long *); - *lp = nread; - } -#ifndef _NO_LONGLONG - else if (flags & LONGDBL) - { - llp = GET_ARG (N, ap, long long*); - *llp = nread; - } -#endif - else - { - ip = GET_ARG (N, ap, int *); - *ip = nread; - } - continue; - - /* - * Disgusting backwards compatibility hacks. XXX - */ - case '\0': /* compat */ - _funlockfile (fp); - return EOF; - - default: /* compat */ - if (isupper (c)) - flags |= LONG; - c = CT_INT; - ccfn = (u_long (*)CCFN_PARAMS)_strtol_r; - base = 10; - break; - } - - /* - * We have a conversion that requires input. - */ - if (BufferEmpty) - goto input_failure; - - /* - * Consume leading white space, except for formats that - * suppress this. - */ - if ((flags & NOSKIP) == 0) - { - while (isspace (*fp->_p)) - { - nread++; - if (--fp->_r > 0) - fp->_p++; - else - if (__srefill_r (rptr, fp)) - goto input_failure; - } - /* - * Note that there is at least one character in the - * buffer, so conversions that do not set NOSKIP ca - * no longer result in an input failure. - */ - } - - /* - * Do the conversion. - */ - switch (c) - { - - case CT_CHAR: - /* scan arbitrary characters (sets NOSKIP) */ - if (width == 0) - width = 1; -#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2 - if (flags & LONG) - { - mbstate_t state; - memset (&state, 0, sizeof (mbstate_t)); - if ((flags & SUPPRESS) == 0) - wcp = GET_ARG (N, ap, wchar_t *); - else - wcp = NULL; - n = 0; - while (width != 0) - { - if (n == MB_CUR_MAX) - goto input_failure; - buf[n++] = *fp->_p; - fp->_r -= 1; - fp->_p += 1; - if ((mbslen = _mbrtowc_r (rptr, wcp, buf, n, &state)) - == (size_t)-1) - goto input_failure; /* Invalid sequence */ - if (mbslen == 0 && !(flags & SUPPRESS)) - *wcp = L'\0'; - if (mbslen != (size_t)-2) /* Incomplete sequence */ - { - nread += n; - width -= 1; - if (!(flags & SUPPRESS)) - wcp += 1; - n = 0; - } - if (BufferEmpty) - { - if (n != 0) - goto input_failure; - break; - } - } - if (!(flags & SUPPRESS)) - nassigned++; - } - else -#endif - if (flags & SUPPRESS) - { - size_t sum = 0; - for (;;) - { - if ((n = fp->_r) < (int)width) - { - sum += n; - width -= n; - fp->_p += n; - if (__srefill_r (rptr, fp)) - { - if (sum == 0) - goto input_failure; - break; - } - } - else - { - sum += width; - fp->_r -= width; - fp->_p += width; - break; - } - } - nread += sum; - } - else - { - size_t r = _fread_r (rptr, (_PTR) GET_ARG (N, ap, char *), 1, width, fp); - - if (r == 0) - goto input_failure; - nread += r; - nassigned++; - } - break; - - case CT_CCL: - /* scan a (nonempty) character class (sets NOSKIP) */ - if (width == 0) - width = ~0; /* `infinity' */ - /* take only those things in the class */ - if (flags & SUPPRESS) - { - n = 0; - while (ccltab[*fp->_p]) - { - n++, fp->_r--, fp->_p++; - if (--width == 0) - break; - if (BufferEmpty) - { - if (n == 0) - goto input_failure; - break; - } - } - if (n == 0) - goto match_failure; - } - else - { - p0 = p = GET_ARG (N, ap, char *); - while (ccltab[*fp->_p]) - { - fp->_r--; - *p++ = *fp->_p++; - if (--width == 0) - break; - if (BufferEmpty) - { - if (p == p0) - goto input_failure; - break; - } - } - n = p - p0; - if (n == 0) - goto match_failure; - *p = 0; - nassigned++; - } - nread += n; - break; - - case CT_STRING: - /* like CCL, but zero-length string OK, & no NOSKIP */ - if (width == 0) - width = (size_t)~0; -#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2 - if (flags & LONG) - { - /* Process %S and %ls placeholders */ - mbstate_t state; - memset (&state, 0, sizeof (mbstate_t)); - if ((flags & SUPPRESS) == 0) - wcp = GET_ARG (N, ap, wchar_t *); - else - wcp = &wc; - n = 0; - while (!isspace (*fp->_p) && width != 0) - { - if (n == MB_CUR_MAX) - goto input_failure; - buf[n++] = *fp->_p; - fp->_r -= 1; - fp->_p += 1; - if ((mbslen = _mbrtowc_r (rptr, wcp, buf, n, &state)) - == (size_t)-1) - goto input_failure; - if (mbslen == 0) - *wcp = L'\0'; - if (mbslen != (size_t)-2) /* Incomplete sequence */ - { - if (iswspace(*wcp)) - { - while (n != 0) - _ungetc_r (rptr, (unsigned char) buf[--n], fp); - break; - } - nread += n; - width -= 1; - if ((flags & SUPPRESS) == 0) - wcp += 1; - n = 0; - } - if (BufferEmpty) - { - if (n != 0) - goto input_failure; - break; - } - } - if (!(flags & SUPPRESS)) - { - *wcp = L'\0'; - nassigned++; - } - } - else -#endif - if (flags & SUPPRESS) - { - n = 0; - while (!isspace (*fp->_p)) - { - n++, fp->_r--, fp->_p++; - if (--width == 0) - break; - if (BufferEmpty) - break; - } - nread += n; - } - else - { - p0 = p = GET_ARG (N, ap, char *); - while (!isspace (*fp->_p)) - { - fp->_r--; - *p++ = *fp->_p++; - if (--width == 0) - break; - if (BufferEmpty) - break; - } - *p = 0; - nread += p - p0; - nassigned++; - } - continue; - - case CT_INT: - { - /* scan an integer as if by strtol/strtoul */ - unsigned width_left = 0; - int skips = 0; -#ifdef hardway - if (width == 0 || width > sizeof (buf) - 1) -#else - /* size_t is unsigned, hence this optimisation */ - if (width - 1 > sizeof (buf) - 2) -#endif - { - width_left = width - (sizeof (buf) - 1); - width = sizeof (buf) - 1; - } - flags |= SIGNOK | NDIGITS | NZDIGITS | NNZDIGITS; - for (p = buf; width; width--) - { - c = *fp->_p; - /* - * Switch on the character; `goto ok' if we - * accept it as a part of number. - */ - switch (c) - { - /* - * The digit 0 is always legal, but is special. - * For %i conversions, if no digits (zero or nonzero) - * have been scanned (only signs), we will have base==0. - * In that case, we should set it to 8 and enable 0x - * prefixing. Also, if we have not scanned zero digits - * before this, do not turn off prefixing (someone else - * will turn it off if we have scanned any nonzero digits). - */ - case '0': - if (! (flags & NNZDIGITS)) - goto ok; - if (base == 0) - { - base = 8; - flags |= PFXOK; - } - if (flags & NZDIGITS) - { - flags &= ~(SIGNOK | NZDIGITS | NDIGITS); - goto ok; - } - flags &= ~(SIGNOK | PFXOK | NDIGITS); - if (width_left) - { - width_left--; - width++; - } - ++skips; - goto skip; - - /* 1 through 7 always legal */ - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - base = basefix[base]; - flags &= ~(SIGNOK | PFXOK | NDIGITS | NNZDIGITS); - goto ok; - - /* digits 8 and 9 ok iff decimal or hex */ - case '8': - case '9': - base = basefix[base]; - if (base <= 8) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS | NNZDIGITS); - goto ok; - - /* letters ok iff hex */ - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - /* no need to fix base here */ - if (base <= 10) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS | NNZDIGITS); - goto ok; - - /* sign ok only as first character */ - case '+': - case '-': - if (flags & SIGNOK) - { - flags &= ~SIGNOK; - goto ok; - } - break; - - /* x ok iff flag still set & single 0 seen */ - case 'x': - case 'X': - if ((flags & (PFXOK | NZDIGITS)) == PFXOK) - { - base = 16;/* if %i */ - flags &= ~PFXOK; - /* We must reset the NZDIGITS and NDIGITS - flags that would have been unset by seeing - the zero that preceded the X or x. */ - flags |= NZDIGITS | NDIGITS; - goto ok; - } - break; - } - - /* - * If we got here, c is not a legal character - * for a number. Stop accumulating digits. - */ - break; - ok: - /* - * c is legal: store it and look at the next. - */ - *p++ = c; - skip: - if (--fp->_r > 0) - fp->_p++; - else - if (__srefill_r (rptr, fp)) - break; /* EOF */ - } - /* - * If we had only a sign, it is no good; push back the sign. - * If the number ends in `x', it was [sign] '0' 'x', so push back - * the x and treat it as [sign] '0'. - * Use of ungetc here and below assumes ASCII encoding; we are only - * pushing back 7-bit characters, so casting to unsigned char is - * not necessary. - */ - if (flags & NDIGITS) - { - if (p > buf) - _ungetc_r (rptr, *--p, fp); /* [-+xX] */ - if (p == buf) - goto match_failure; - } - if ((flags & SUPPRESS) == 0) - { - u_long res; - - *p = 0; - res = (*ccfn) (rptr, buf, (char **) NULL, base); - if (flags & POINTER) - { - void **vp = GET_ARG (N, ap, void **); -#ifndef _NO_LONGLONG - if (sizeof (uintptr_t) > sizeof (u_long)) - { - u_long_long resll; - resll = _strtoull_r (rptr, buf, (char **) NULL, base); - *vp = (void *) (uintptr_t) resll; - } - else -#endif /* !_NO_LONGLONG */ - *vp = (void *) (uintptr_t) res; - } -#ifdef _WANT_IO_C99_FORMATS - else if (flags & CHAR) - { - cp = GET_ARG (N, ap, char *); - *cp = res; - } -#endif - else if (flags & SHORT) - { - sp = GET_ARG (N, ap, short *); - *sp = res; - } - else if (flags & LONG) - { - lp = GET_ARG (N, ap, long *); - *lp = res; - } -#ifndef _NO_LONGLONG - else if (flags & LONGDBL) - { - u_long_long resll; - if (ccfn == _strtoul_r) - resll = _strtoull_r (rptr, buf, (char **) NULL, base); - else - resll = _strtoll_r (rptr, buf, (char **) NULL, base); - llp = GET_ARG (N, ap, long long*); - *llp = resll; - } -#endif - else - { - ip = GET_ARG (N, ap, int *); - *ip = res; - } - nassigned++; - } - nread += p - buf + skips; - break; - } -#ifdef FLOATING_POINT - case CT_FLOAT: - { - /* scan a floating point number as if by strtod */ - /* This code used to assume that the number of digits is reasonable. - However, ANSI / ISO C makes no such stipulation; we have to get - exact results even when there is an unreasonable amount of - leading zeroes. */ - long leading_zeroes = 0; - long zeroes, exp_adjust; - char *exp_start = NULL; - unsigned width_left = 0; - char nancount = 0; - char infcount = 0; -#ifdef hardway - if (width == 0 || width > sizeof (buf) - 1) -#else - /* size_t is unsigned, hence this optimisation */ - if (width - 1 > sizeof (buf) - 2) -#endif - { - width_left = width - (sizeof (buf) - 1); - width = sizeof (buf) - 1; - } - flags |= SIGNOK | NDIGITS | DPTOK | EXPOK; - zeroes = 0; - exp_adjust = 0; - for (p = buf; width; ) - { - c = *fp->_p; - /* - * This code mimicks the integer conversion - * code, but is much simpler. - */ - switch (c) - { - case '0': - if (flags & NDIGITS) - { - flags &= ~SIGNOK; - zeroes++; - if (width_left) - { - width_left--; - width++; - } - goto fskip; - } - /* Fall through. */ - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (nancount + infcount == 0) - { - flags &= ~(SIGNOK | NDIGITS); - goto fok; - } - break; - - case '+': - case '-': - if (flags & SIGNOK) - { - flags &= ~SIGNOK; - goto fok; - } - break; - case 'n': - case 'N': - if (nancount == 0 && zeroes == 0 - && (flags & (NDIGITS | DPTOK | EXPOK)) == - (NDIGITS | DPTOK | EXPOK)) - { - flags &= ~(SIGNOK | DPTOK | EXPOK | NDIGITS); - nancount = 1; - goto fok; - } - if (nancount == 2) - { - nancount = 3; - goto fok; - } - if (infcount == 1 || infcount == 4) - { - infcount++; - goto fok; - } - break; - case 'a': - case 'A': - if (nancount == 1) - { - nancount = 2; - goto fok; - } - break; - case 'i': - case 'I': - if (infcount == 0 && zeroes == 0 - && (flags & (NDIGITS | DPTOK | EXPOK)) == - (NDIGITS | DPTOK | EXPOK)) - { - flags &= ~(SIGNOK | DPTOK | EXPOK | NDIGITS); - infcount = 1; - goto fok; - } - if (infcount == 3 || infcount == 5) - { - infcount++; - goto fok; - } - break; - case 'f': - case 'F': - if (infcount == 2) - { - infcount = 3; - goto fok; - } - break; - case 't': - case 'T': - if (infcount == 6) - { - infcount = 7; - goto fok; - } - break; - case 'y': - case 'Y': - if (infcount == 7) - { - infcount = 8; - goto fok; - } - break; - case '.': - if (flags & DPTOK) - { - flags &= ~(SIGNOK | DPTOK); - leading_zeroes = zeroes; - goto fok; - } - break; - case 'e': - case 'E': - /* no exponent without some digits */ - if ((flags & (NDIGITS | EXPOK)) == EXPOK - || ((flags & EXPOK) && zeroes)) - { - if (! (flags & DPTOK)) - { - exp_adjust = zeroes - leading_zeroes; - exp_start = p; - } - flags = - (flags & ~(EXPOK | DPTOK)) | - SIGNOK | NDIGITS; - zeroes = 0; - goto fok; - } - break; - } - break; - fok: - *p++ = c; - fskip: - width--; - ++nread; - if (--fp->_r > 0) - fp->_p++; - else - if (__srefill_r (rptr, fp)) - break; /* EOF */ - } - if (zeroes) - flags &= ~NDIGITS; - /* We may have a 'N' or possibly even [sign] 'N' 'a' as the - start of 'NaN', only to run out of chars before it was - complete (or having encountered a non-matching char). So - check here if we have an outstanding nancount, and if so - put back the chars we did swallow and treat as a failed - match. - - FIXME - we still don't handle NAN([0xdigits]). */ - if (nancount - 1U < 2U) /* nancount && nancount < 3 */ - { - /* Newlib's ungetc works even if we called __srefill in - the middle of a partial parse, but POSIX does not - guarantee that in all implementations of ungetc. */ - while (p > buf) - { - _ungetc_r (rptr, *--p, fp); /* [-+nNaA] */ - --nread; - } - goto match_failure; - } - /* Likewise for 'inf' and 'infinity'. But be careful that - 'infinite' consumes only 3 characters, leaving the stream - at the second 'i'. */ - if (infcount - 1U < 7U) /* infcount && infcount < 8 */ - { - if (infcount >= 3) /* valid 'inf', but short of 'infinity' */ - while (infcount-- > 3) - { - _ungetc_r (rptr, *--p, fp); /* [iInNtT] */ - --nread; - } - else - { - while (p > buf) - { - _ungetc_r (rptr, *--p, fp); /* [-+iInN] */ - --nread; - } - goto match_failure; - } - } - /* - * If no digits, might be missing exponent digits - * (just give back the exponent) or might be missing - * regular digits, but had sign and/or decimal point. - */ - if (flags & NDIGITS) - { - if (flags & EXPOK) - { - /* no digits at all */ - while (p > buf) - { - _ungetc_r (rptr, *--p, fp); /* [-+.] */ - --nread; - } - goto match_failure; - } - /* just a bad exponent (e and maybe sign) */ - c = *--p; - --nread; - if (c != 'e' && c != 'E') - { - _ungetc_r (rptr, c, fp); /* [-+] */ - c = *--p; - --nread; - } - _ungetc_r (rptr, c, fp); /* [eE] */ - } - if ((flags & SUPPRESS) == 0) - { - double res = 0; -#ifdef _NO_LONGDBL -#define QUAD_RES res; -#else /* !_NO_LONG_DBL */ - long double qres = 0; -#define QUAD_RES qres; -#endif /* !_NO_LONG_DBL */ - long new_exp = 0; - - *p = 0; - if ((flags & (DPTOK | EXPOK)) == EXPOK) - { - exp_adjust = zeroes - leading_zeroes; - new_exp = -exp_adjust; - exp_start = p; - } - else if (exp_adjust) - new_exp = _strtol_r (rptr, (exp_start + 1), NULL, 10) - exp_adjust; - if (exp_adjust) - { - - /* If there might not be enough space for the new exponent, - truncate some trailing digits to make room. */ - if (exp_start >= buf + sizeof (buf) - MAX_LONG_LEN) - exp_start = buf + sizeof (buf) - MAX_LONG_LEN - 1; - sprintf (exp_start, "e%ld", new_exp); - } - - /* Current _strtold routine is markedly slower than - _strtod_r. Only use it if we have a long double - result. */ -#ifndef _NO_LONGDBL /* !_NO_LONGDBL */ - if (flags & LONGDBL) - qres = _strtold (buf, NULL); - else -#endif - res = _strtod_r (rptr, buf, NULL); - - if (flags & LONG) - { - dp = GET_ARG (N, ap, double *); - *dp = res; - } - else if (flags & LONGDBL) - { - ldp = GET_ARG (N, ap, _LONG_DOUBLE *); - *ldp = QUAD_RES; - } - else - { - flp = GET_ARG (N, ap, float *); - if (isnan (res)) - *flp = nanf (NULL); - else - *flp = res; - } - nassigned++; - } - break; - } -#endif /* FLOATING_POINT */ - } - } -input_failure: - /* On read failure, return EOF failure regardless of matches; errno - should have been set prior to here. On EOF failure (including - invalid format string), return EOF if no matches yet, else number - of matches made prior to failure. */ - _funlockfile (fp); - return nassigned && !(fp->_flags & __SERR) ? nassigned : EOF; -match_failure: -all_done: - /* Return number of matches, which can be 0 on match failure. */ - _funlockfile (fp); - return nassigned; -} - -#ifndef _NO_POS_ARGS -/* Process all intermediate arguments. Fortunately, with scanf, all - intermediate arguments are sizeof(void*), so we don't need to scan - ahead in the format string. */ -static void * -get_arg (int n, va_list *ap, int *numargs_p, void **args) -{ - int numargs = *numargs_p; - while (n >= numargs) - args[numargs++] = va_arg (*ap, void *); - *numargs_p = numargs; - return args[n]; -} -#endif /* !_NO_POS_ARGS */ diff --git a/newlib/libc/stdio/vfwprintf.c b/newlib/libc/stdio/vfwprintf.c deleted file mode 100644 index 79020f386..000000000 --- a/newlib/libc/stdio/vfwprintf.c +++ /dev/null @@ -1,1942 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chris Torek. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* -FUNCTION -<<vfwprintf>>, <<vwprintf>>, <<vswprintf>>---wide character format argument list - -INDEX - vfwprintf -INDEX - _vfwprintf_r -INDEX - vwprintf -INDEX - _vwprintf_r -INDEX - vswprintf -INDEX - _vswprintf_r - -ANSI_SYNOPSIS - #include <stdio.h> - #include <stdarg.h> - #include <wchar.h> - int vwprintf(const wchar_t *<[fmt]>, va_list <[list]>); - int vfwprintf(FILE *<[fp]>, const wchar_t *<[fmt]>, va_list <[list]>); - int vswprintf(wchar_t *<[str]>, size_t <[size]>, const wchar_t *<[fmt]>, - va_list <[list]>); - - int _vwprintf_r(struct _reent *<[reent]>, const wchar_t *<[fmt]>, - va_list <[list]>); - int _vfwprintf_r(struct _reent *<[reent]>, FILE *<[fp]>, - const wchar_t *<[fmt]>, va_list <[list]>); - int _vswprintf_r(struct _reent *<[reent]>, wchar_t *<[str]>, - size_t <[size]>, const wchar_t *<[fmt]>, va_list <[list]>); - -DESCRIPTION -<<vwprintf>>, <<vfwprintf>> and <<vswprintf>> are (respectively) variants -of <<wprintf>>, <<fwprintf>> and <<swprintf>>. They differ only in allowing -their caller to pass the variable argument list as a <<va_list>> object -(initialized by <<va_start>>) rather than directly accepting a variable -number of arguments. The caller is responsible for calling <<va_end>>. - -<<_vwprintf_r>>, <<_vfwprintf_r>> and <<_vswprintf_r>> are reentrant -versions of the above. - -RETURNS -The return values are consistent with the corresponding functions. - -PORTABILITY -POSIX-1.2008 with extensions; C99 (compliant except for POSIX extensions). - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. - -SEEALSO -<<wprintf>>, <<fwprintf>> and <<swprintf>>. -*/ - -/* - * Actual wprintf innards. - * - * This code is large and complicated... - */ -#include <newlib.h> - -#ifdef INTEGER_ONLY -# define VFWPRINTF vfiwprintf -# ifdef STRING_ONLY -# define _VFWPRINTF_R _svfiwprintf_r -# else -# define _VFWPRINTF_R _vfiwprintf_r -# endif -#else -# define VFWPRINTF vfwprintf -# ifdef STRING_ONLY -# define _VFWPRINTF_R _svfwprintf_r -# else -# define _VFWPRINTF_R _vfwprintf_r -# endif -# ifndef NO_FLOATING_POINT -# define FLOATING_POINT -# endif -#endif - -#define _NO_POS_ARGS -#ifdef _WANT_IO_POS_ARGS -# undef _NO_POS_ARGS -#endif - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <limits.h> -#include <stdint.h> -#include <wchar.h> -#include <sys/lock.h> -#include <stdarg.h> -#include "local.h" -#include "fvwrite.h" -#include "vfieeefp.h" -#ifdef __HAVE_LOCALE_INFO_EXTENDED__ -#include "../locale/lnumeric.h" -#endif - -/* Currently a test is made to see if long double processing is warranted. - This could be changed in the future should the _ldtoa_r code be - preferred over _dtoa_r. */ -#define _NO_LONGDBL -#if defined _WANT_IO_LONG_DOUBLE && (LDBL_MANT_DIG > DBL_MANT_DIG) -#undef _NO_LONGDBL -#endif - -#define _NO_LONGLONG -#if defined _WANT_IO_LONG_LONG \ - && (defined __GNUC__ || __STDC_VERSION__ >= 199901L) -# undef _NO_LONGLONG -#endif - -int _EXFUN(_VFWPRINTF_R, (struct _reent *, FILE *, _CONST wchar_t *, va_list)); -/* Defined in vfprintf.c. */ -#ifdef STRING_ONLY -#define __SPRINT __ssprint_r -#else -#define __SPRINT __sprint_r -#endif -int _EXFUN(__SPRINT, (struct _reent *, FILE *, register struct __suio *)); - -#ifndef STRING_ONLY -/* - * Helper function for `fprintf to unbuffered unix file': creates a - * temporary buffer. We only work on write-only files; this avoids - * worries about ungetc buffers and so forth. - */ -static int -_DEFUN(__sbwprintf, (rptr, fp, fmt, ap), - struct _reent *rptr _AND - register FILE *fp _AND - _CONST wchar_t *fmt _AND - va_list ap) -{ - int ret; - FILE fake; - unsigned char buf[BUFSIZ]; - - /* copy the important variables */ - fake._flags = fp->_flags & ~__SNBF; - fake._flags2 = fp->_flags2; - fake._file = fp->_file; - fake._cookie = fp->_cookie; - fake._write = fp->_write; - - /* set up the buffer */ - fake._bf._base = fake._p = buf; - fake._bf._size = fake._w = sizeof (buf); - fake._lbfsize = 0; /* not actually used, but Just In Case */ -#ifndef __SINGLE_THREAD__ - __lock_init_recursive (fake._lock); -#endif - - /* do the work, then copy any error status */ - ret = _VFWPRINTF_R (rptr, &fake, fmt, ap); - if (ret >= 0 && _fflush_r (rptr, &fake)) - ret = EOF; - if (fake._flags & __SERR) - fp->_flags |= __SERR; - -#ifndef __SINGLE_THREAD__ - __lock_close_recursive (fake._lock); -#endif - return (ret); -} -#endif /* !STRING_ONLY */ - - -#if defined (FLOATING_POINT) || defined (_WANT_IO_C99_FORMATS) -# include <locale.h> -#endif -#ifdef FLOATING_POINT -# include <math.h> - -/* For %La, an exponent of 15 bits occupies the exponent character, a - sign, and up to 5 digits. */ -# define MAXEXPLEN 7 -# define DEFPREC 6 - -# ifdef _NO_LONGDBL - -extern char *_dtoa_r _PARAMS((struct _reent *, double, int, - int, int *, int *, char **)); - -# define _PRINTF_FLOAT_TYPE double -# define _DTOA_R _dtoa_r -# define FREXP frexp - -# else /* !_NO_LONGDBL */ - -extern char *_ldtoa_r _PARAMS((struct _reent *, _LONG_DOUBLE, int, - int, int *, int *, char **)); - -extern int _EXFUN(_ldcheck,(_LONG_DOUBLE *)); - -# define _PRINTF_FLOAT_TYPE _LONG_DOUBLE -# define _DTOA_R _ldtoa_r -/* FIXME - frexpl is not yet supported; and cvt infloops if (double)f - converts a finite value into infinity. */ -/* # define FREXP frexpl */ -# define FREXP(f,e) ((_LONG_DOUBLE) frexp ((double)f, e)) -# endif /* !_NO_LONGDBL */ - -static wchar_t *wcvt(struct _reent *, _PRINTF_FLOAT_TYPE, int, int, wchar_t *, - int *, int, int *, wchar_t *, int); - -static int wexponent(wchar_t *, int, int); - -#endif /* FLOATING_POINT */ - -/* BUF must be big enough for the maximum %#llo (assuming long long is - at most 64 bits, this would be 23 characters), the maximum - multibyte character %C, and the maximum default precision of %La - (assuming long double is at most 128 bits with 113 bits of - mantissa, this would be 29 characters). %e, %f, and %g use - reentrant storage shared with mprec. All other formats that use - buf get by with fewer characters. Making BUF slightly bigger - reduces the need for malloc in %.*a and %ls/%S, when large precision or - long strings are processed. - The bigger size of 100 bytes is used on systems which allow number - strings using the locale's grouping character. Since that's a multibyte - value, we should use a conservative value. - */ -#ifdef _WANT_IO_C99_FORMATS -#define BUF 100 -#else -#define BUF 40 -#endif -#if defined _MB_CAPABLE && MB_LEN_MAX > BUF -# undef BUF -# define BUF MB_LEN_MAX -#endif - -#ifndef _NO_LONGLONG -# define quad_t long long -# define u_quad_t unsigned long long -#else -# define quad_t long -# define u_quad_t unsigned long -#endif - -typedef quad_t * quad_ptr_t; -typedef _PTR void_ptr_t; -typedef char * char_ptr_t; -typedef wchar_t* wchar_ptr_t; -typedef long * long_ptr_t; -typedef int * int_ptr_t; -typedef short * short_ptr_t; - -#ifndef _NO_POS_ARGS -# ifdef NL_ARGMAX -# define MAX_POS_ARGS NL_ARGMAX -# else -# define MAX_POS_ARGS 32 -# endif - -union arg_val -{ - int val_int; - u_int val_u_int; - long val_long; - u_long val_u_long; - float val_float; - double val_double; - _LONG_DOUBLE val__LONG_DOUBLE; - int_ptr_t val_int_ptr_t; - short_ptr_t val_short_ptr_t; - long_ptr_t val_long_ptr_t; - char_ptr_t val_char_ptr_t; - wchar_ptr_t val_wchar_ptr_t; - quad_ptr_t val_quad_ptr_t; - void_ptr_t val_void_ptr_t; - quad_t val_quad_t; - u_quad_t val_u_quad_t; - wint_t val_wint_t; -}; - -static union arg_val * -_EXFUN(get_arg, (struct _reent *data, int n, wchar_t *fmt, - va_list *ap, int *numargs, union arg_val *args, - int *arg_type, wchar_t **last_fmt)); -#endif /* !_NO_POS_ARGS */ - -/* - * Macros for converting digits to letters and vice versa - */ -#define to_digit(c) ((c) - L'0') -#define is_digit(c) ((unsigned)to_digit (c) <= 9) -#define to_char(n) ((n) + L'0') - -/* - * Flags used during conversion. - */ -#define ALT 0x001 /* alternate form */ -#define HEXPREFIX 0x002 /* add 0x or 0X prefix */ -#define LADJUST 0x004 /* left adjustment */ -#define LONGDBL 0x008 /* long double */ -#define LONGINT 0x010 /* long integer */ -#ifndef _NO_LONGLONG -# define QUADINT 0x020 /* quad integer */ -#else /* ifdef _NO_LONGLONG, make QUADINT equivalent to LONGINT, so - that %lld behaves the same as %ld, not as %d, as expected if: - sizeof (long long) = sizeof long > sizeof int */ -# define QUADINT LONGINT -#endif -#define SHORTINT 0x040 /* short integer */ -#define ZEROPAD 0x080 /* zero (as opposed to blank) pad */ -#define FPT 0x100 /* Floating point number */ -#ifdef _WANT_IO_C99_FORMATS -# define CHARINT 0x200 /* char as integer */ -#else /* define as 0, to make SARG and UARG occupy fewer instructions */ -# define CHARINT 0 -#endif -#ifdef _WANT_IO_C99_FORMATS -# define GROUPING 0x400 /* use grouping ("'" flag) */ -#endif - -#ifndef STRING_ONLY -int -_DEFUN(VFWPRINTF, (fp, fmt0, ap), - FILE * fp _AND - _CONST wchar_t *fmt0 _AND - va_list ap) -{ - int result; - result = _VFWPRINTF_R (_REENT, fp, fmt0, ap); - return result; -} -#endif /* STRING_ONLY */ - -int -_DEFUN(_VFWPRINTF_R, (data, fp, fmt0, ap), - struct _reent *data _AND - FILE * fp _AND - _CONST wchar_t *fmt0 _AND - va_list ap) -{ - register wchar_t *fmt; /* format string */ - register wint_t ch; /* character from fmt */ - register int n, m; /* handy integers (short term usage) */ - register wchar_t *cp; /* handy char pointer (short term usage) */ - register struct __siov *iovp;/* for PRINT macro */ - register int flags; /* flags as above */ - wchar_t *fmt_anchor; /* current format spec being processed */ -#ifndef _NO_POS_ARGS - int N; /* arg number */ - int arg_index; /* index into args processed directly */ - int numargs; /* number of varargs read */ - wchar_t *saved_fmt; /* saved fmt pointer */ - union arg_val args[MAX_POS_ARGS]; - int arg_type[MAX_POS_ARGS]; - int is_pos_arg; /* is current format positional? */ - int old_is_pos_arg; /* is current format positional? */ -#endif - int ret; /* return value accumulator */ - int width; /* width from format (%8d), or 0 */ - int prec; /* precision from format (%.3d), or -1 */ - wchar_t sign; /* sign prefix (' ', '+', '-', or \0) */ -#ifdef _WANT_IO_C99_FORMATS - /* locale specific numeric grouping */ - wchar_t thousands_sep; - const char *grouping; -#endif -#ifdef _MB_CAPABLE - mbstate_t state; /* mbtowc calls from library must not change state */ -#endif -#ifdef FLOATING_POINT - wchar_t decimal_point; - wchar_t softsign; /* temporary negative sign for floats */ - union { int i; _PRINTF_FLOAT_TYPE fp; } _double_ = {0}; -# define _fpvalue (_double_.fp) - int expt; /* integer value of exponent */ - int expsize = 0; /* character count for expstr */ - wchar_t expstr[MAXEXPLEN]; /* buffer for exponent string */ - int lead; /* sig figs before decimal or group sep */ -#endif /* FLOATING_POINT */ -#if defined (FLOATING_POINT) || defined (_WANT_IO_C99_FORMATS) - int ndig = 0; /* actual number of digits returned by cvt */ -#endif -#ifdef _WANT_IO_C99_FORMATS - int nseps; /* number of group separators with ' */ - int nrepeats; /* number of repeats of the last group */ -#endif - u_quad_t _uquad; /* integer arguments %[diouxX] */ - enum { OCT, DEC, HEX } base;/* base for [diouxX] conversion */ - int dprec; /* a copy of prec if [diouxX], 0 otherwise */ - int realsz; /* field size expanded by dprec */ - int size = 0; /* size of converted field or string */ - wchar_t *xdigs = NULL; /* digits for [xX] conversion */ -#define NIOV 8 - struct __suio uio; /* output information: summary */ - struct __siov iov[NIOV];/* ... and individual io vectors */ - wchar_t buf[BUF]; /* space for %c, %ls/%S, %[diouxX], %[aA] */ - wchar_t ox[2]; /* space for 0x hex-prefix */ - wchar_t *malloc_buf = NULL;/* handy pointer for malloced buffers */ - - /* - * Choose PADSIZE to trade efficiency vs. size. If larger printf - * fields occur frequently, increase PADSIZE and make the initialisers - * below longer. - */ -#define PADSIZE 16 /* pad chunk size */ - static _CONST wchar_t blanks[PADSIZE] = - {L' ',L' ',L' ',L' ',L' ',L' ',L' ',L' ', - L' ',L' ',L' ',L' ',L' ',L' ',L' ',L' '}; - static _CONST wchar_t zeroes[PADSIZE] = - {L'0',L'0',L'0',L'0',L'0',L'0',L'0',L'0', - L'0',L'0',L'0',L'0',L'0',L'0',L'0',L'0'}; - -#ifdef FLOATING_POINT -#ifdef _MB_CAPABLE -#ifdef __HAVE_LOCALE_INFO_EXTENDED__ - decimal_point = *__get_current_numeric_locale ()->wdecimal_point; -#else - { - size_t nconv; - - memset (&state, '\0', sizeof (state)); - nconv = _mbrtowc_r (data, &decimal_point, - _localeconv_r (data)->decimal_point, - MB_CUR_MAX, &state); - if (nconv == (size_t) -1 || nconv == (size_t) -2) - decimal_point = L'.'; - } -#endif -#else - decimal_point = (wchar_t) *_localeconv_r (data)->decimal_point; -#endif -#endif - /* - * BEWARE, these `goto error' on error, and PAD uses `n'. - */ -#define PRINT(ptr, len) { \ - iovp->iov_base = (char *) (ptr); \ - iovp->iov_len = (len) * sizeof (wchar_t); \ - uio.uio_resid += (len) * sizeof (wchar_t); \ - iovp++; \ - if (++uio.uio_iovcnt >= NIOV) { \ - if (__SPRINT(data, fp, &uio)) \ - goto error; \ - iovp = iov; \ - } \ -} -#define PAD(howmany, with) { \ - if ((n = (howmany)) > 0) { \ - while (n > PADSIZE) { \ - PRINT (with, PADSIZE); \ - n -= PADSIZE; \ - } \ - PRINT (with, n); \ - } \ -} -#define PRINTANDPAD(p, ep, len, with) { \ - int n = (ep) - (p); \ - if (n > (len)) \ - n = (len); \ - if (n > 0) \ - PRINT((p), n); \ - PAD((len) - (n > 0 ? n : 0), (with)); \ -} -#define FLUSH() { \ - if (uio.uio_resid && __SPRINT(data, fp, &uio)) \ - goto error; \ - uio.uio_iovcnt = 0; \ - iovp = iov; \ -} - - /* Macros to support positional arguments */ -#ifndef _NO_POS_ARGS -# define GET_ARG(n, ap, type) \ - (is_pos_arg \ - ? (n < numargs \ - ? args[n].val_##type \ - : get_arg (data, n, fmt_anchor, &ap, &numargs, args, \ - arg_type, &saved_fmt)->val_##type) \ - : (arg_index++ < numargs \ - ? args[n].val_##type \ - : (numargs < MAX_POS_ARGS \ - ? args[numargs++].val_##type = va_arg (ap, type) \ - : va_arg (ap, type)))) -#else -# define GET_ARG(n, ap, type) (va_arg (ap, type)) -#endif - - /* - * To extend shorts properly, we need both signed and unsigned - * argument extraction methods. - */ -#ifndef _NO_LONGLONG -#define SARG() \ - (flags&QUADINT ? GET_ARG (N, ap, quad_t) : \ - flags&LONGINT ? GET_ARG (N, ap, long) : \ - flags&SHORTINT ? (long)(short)GET_ARG (N, ap, int) : \ - flags&CHARINT ? (long)(signed char)GET_ARG (N, ap, int) : \ - (long)GET_ARG (N, ap, int)) -#define UARG() \ - (flags&QUADINT ? GET_ARG (N, ap, u_quad_t) : \ - flags&LONGINT ? GET_ARG (N, ap, u_long) : \ - flags&SHORTINT ? (u_long)(u_short)GET_ARG (N, ap, int) : \ - flags&CHARINT ? (u_long)(unsigned char)GET_ARG (N, ap, int) : \ - (u_long)GET_ARG (N, ap, u_int)) -#else -#define SARG() \ - (flags&LONGINT ? GET_ARG (N, ap, long) : \ - flags&SHORTINT ? (long)(short)GET_ARG (N, ap, int) : \ - flags&CHARINT ? (long)(signed char)GET_ARG (N, ap, int) : \ - (long)GET_ARG (N, ap, int)) -#define UARG() \ - (flags&LONGINT ? GET_ARG (N, ap, u_long) : \ - flags&SHORTINT ? (u_long)(u_short)GET_ARG (N, ap, int) : \ - flags&CHARINT ? (u_long)(unsigned char)GET_ARG (N, ap, int) : \ - (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); - - ORIENT(fp, 1); - - /* sorry, fwprintf(read_only_file, "") returns EOF, not 0 */ - if (cantwrite (data, fp)) { - _funlockfile (fp); - return (EOF); - } - - /* optimise fwprintf(stderr) (and other unbuffered Unix files) */ - if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) && - fp->_file >= 0) { - _funlockfile (fp); - return (__sbwprintf (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 = (wchar_t *)fmt0; - uio.uio_iov = iovp = iov; - uio.uio_resid = 0; - uio.uio_iovcnt = 0; - ret = 0; -#ifndef _NO_POS_ARGS - arg_index = 0; - saved_fmt = NULL; - arg_type[0] = -1; - numargs = 0; - is_pos_arg = 0; -#endif - - /* - * Scan the format for conversions (`%' character). - */ - for (;;) { - cp = fmt; - while (*fmt != L'\0' && *fmt != L'%') - ++fmt; - if ((m = fmt - cp) != 0) { - PRINT (cp, m); - ret += m; - } - if (*fmt == L'\0') - goto done; - fmt_anchor = fmt; - fmt++; /* skip over '%' */ - - flags = 0; - dprec = 0; - width = 0; - prec = -1; - sign = L'\0'; -#ifdef FLOATING_POINT - lead = 0; -#endif -#ifdef _WANT_IO_C99_FORMATS - nseps = nrepeats = 0; -#endif -#ifndef _NO_POS_ARGS - N = arg_index; - is_pos_arg = 0; -#endif - -rflag: ch = *fmt++; -reswitch: switch (ch) { -#ifdef _WANT_IO_C99_FORMATS - case L'\'': -#ifdef _MB_CAPABLE -#ifdef __HAVE_LOCALE_INFO_EXTENDED__ - thousands_sep = *__get_current_numeric_locale ()->wthousands_sep; -#else - { - size_t nconv; - - memset (&state, '\0', sizeof (state)); - nconv = _mbrtowc_r (data, &thousands_sep, - _localeconv_r (data)->thousands_sep, - MB_CUR_MAX, &state); - if (nconv == (size_t) -1 || nconv == (size_t) -2) - thousands_sep = L'\0'; - } -#endif -#else - thousands_sep = (wchar_t) *_localeconv_r(data)->thousands_sep; -#endif - grouping = _localeconv_r (data)->grouping; - if (thousands_sep && grouping && *grouping) - flags |= GROUPING; - goto rflag; -#endif - case L' ': - /* - * ``If the space and + flags both appear, the space - * flag will be ignored.'' - * -- ANSI X3J11 - */ - if (!sign) - sign = L' '; - goto rflag; - case L'#': - flags |= ALT; - goto rflag; - case L'*': -#ifndef _NO_POS_ARGS - /* we must check for positional arg used for dynamic width */ - n = N; - old_is_pos_arg = is_pos_arg; - is_pos_arg = 0; - if (is_digit (*fmt)) { - wchar_t *old_fmt = fmt; - - n = 0; - ch = *fmt++; - do { - n = 10 * n + to_digit (ch); - ch = *fmt++; - } while (is_digit (ch)); - - if (ch == L'$') { - if (n <= MAX_POS_ARGS) { - n -= 1; - is_pos_arg = 1; - } - else - goto error; - } - else { - fmt = old_fmt; - goto rflag; - } - } -#endif /* !_NO_POS_ARGS */ - - /* - * ``A negative field width argument is taken as a - * - flag followed by a positive field width.'' - * -- ANSI X3J11 - * They don't exclude field widths read from args. - */ - width = GET_ARG (n, ap, int); -#ifndef _NO_POS_ARGS - is_pos_arg = old_is_pos_arg; -#endif - if (width >= 0) - goto rflag; - width = -width; - /* FALLTHROUGH */ - case L'-': - flags |= LADJUST; - goto rflag; - case L'+': - sign = L'+'; - goto rflag; - case L'.': - if ((ch = *fmt++) == L'*') { -#ifndef _NO_POS_ARGS - /* we must check for positional arg used for dynamic width */ - n = N; - old_is_pos_arg = is_pos_arg; - is_pos_arg = 0; - if (is_digit (*fmt)) { - wchar_t *old_fmt = fmt; - - n = 0; - ch = *fmt++; - do { - n = 10 * n + to_digit (ch); - ch = *fmt++; - } while (is_digit (ch)); - - if (ch == L'$') { - if (n <= MAX_POS_ARGS) { - n -= 1; - is_pos_arg = 1; - } - else - goto error; - } - else { - fmt = old_fmt; - goto rflag; - } - } -#endif /* !_NO_POS_ARGS */ - prec = GET_ARG (n, ap, int); -#ifndef _NO_POS_ARGS - is_pos_arg = old_is_pos_arg; -#endif - if (prec < 0) - prec = -1; - goto rflag; - } - n = 0; - while (is_digit (ch)) { - n = 10 * n + to_digit (ch); - ch = *fmt++; - } - prec = n < 0 ? -1 : n; - goto reswitch; - case L'0': - /* - * ``Note that 0 is taken as a flag, not as the - * beginning of a field width.'' - * -- ANSI X3J11 - */ - flags |= ZEROPAD; - goto rflag; - case L'1': case L'2': case L'3': case L'4': - case L'5': case L'6': case L'7': case L'8': case L'9': - n = 0; - do { - n = 10 * n + to_digit (ch); - ch = *fmt++; - } while (is_digit (ch)); -#ifndef _NO_POS_ARGS - if (ch == L'$') { - if (n <= MAX_POS_ARGS) { - N = n - 1; - is_pos_arg = 1; - goto rflag; - } - else - goto error; - } -#endif /* !_NO_POS_ARGS */ - width = n; - goto reswitch; -#ifdef FLOATING_POINT - case L'L': - flags |= LONGDBL; - goto rflag; -#endif - case L'h': -#ifdef _WANT_IO_C99_FORMATS - if (*fmt == L'h') { - fmt++; - flags |= CHARINT; - } else -#endif - flags |= SHORTINT; - goto rflag; - case L'l': -#if defined _WANT_IO_C99_FORMATS || !defined _NO_LONGLONG - if (*fmt == L'l') { - fmt++; - flags |= QUADINT; - } else -#endif - flags |= LONGINT; - goto rflag; - case L'q': /* GNU extension */ - flags |= QUADINT; - goto rflag; -#ifdef _WANT_IO_C99_FORMATS - case L'j': - if (sizeof (intmax_t) == sizeof (long)) - flags |= LONGINT; - else - flags |= QUADINT; - goto rflag; - case L'z': - if (sizeof (size_t) < sizeof (int)) - /* POSIX states size_t is 16 or more bits, as is short. */ - flags |= SHORTINT; - else if (sizeof (size_t) == sizeof (int)) - /* no flag needed */; - else if (sizeof (size_t) <= sizeof (long)) - flags |= LONGINT; - else - /* POSIX states that at least one programming - environment must support size_t no wider than - long, but that means other environments can - have size_t as wide as long long. */ - flags |= QUADINT; - goto rflag; - case L't': - if (sizeof (ptrdiff_t) < sizeof (int)) - /* POSIX states ptrdiff_t is 16 or more bits, as - is short. */ - flags |= SHORTINT; - else if (sizeof (ptrdiff_t) == sizeof (int)) - /* no flag needed */; - else if (sizeof (ptrdiff_t) <= sizeof (long)) - flags |= LONGINT; - else - /* POSIX states that at least one programming - environment must support ptrdiff_t no wider than - long, but that means other environments can - have ptrdiff_t as wide as long long. */ - flags |= QUADINT; - goto rflag; - case L'C': /* POSIX extension */ -#endif /* _WANT_IO_C99_FORMATS */ - case L'c': - cp = buf; - if (ch == L'c' && !(flags & LONGINT)) { - wint_t wc = btowc ((int) GET_ARG (N, ap, int)); - if (wc == WEOF) { - fp->_flags |= __SERR; - goto error; - } - cp[0] = (wchar_t) wc; - } - else - { - cp[0] = GET_ARG (N, ap, int); - } - cp[1] = L'\0'; - size = 1; - sign = L'\0'; - break; - case L'd': - case L'i': - _uquad = SARG (); -#ifndef _NO_LONGLONG - if ((quad_t)_uquad < 0) -#else - if ((long) _uquad < 0) -#endif - { - - _uquad = -_uquad; - sign = L'-'; - } - base = DEC; - goto number; -#ifdef FLOATING_POINT -# ifdef _WANT_IO_C99_FORMATS - case L'a': - case L'A': - case L'F': -# endif - case L'e': - case L'E': - case L'f': - case L'g': - case L'G': -# ifdef _NO_LONGDBL - if (flags & LONGDBL) { - _fpvalue = (double) GET_ARG (N, ap, _LONG_DOUBLE); - } else { - _fpvalue = GET_ARG (N, ap, double); - } - - /* do this before tricky precision changes - - If the output is infinite or NaN, leading - zeros are not permitted. Otherwise, scanf - could not read what printf wrote. - */ - if (isinf (_fpvalue)) { - if (_fpvalue < 0) - sign = '-'; - if (ch <= L'G') /* 'A', 'E', 'F', or 'G' */ - cp = L"INF"; - else - cp = L"inf"; - size = 3; - flags &= ~ZEROPAD; - break; - } - if (isnan (_fpvalue)) { - if (ch <= L'G') /* 'A', 'E', 'F', or 'G' */ - cp = L"NAN"; - else - cp = L"nan"; - size = 3; - flags &= ~ZEROPAD; - break; - } - -# else /* !_NO_LONGDBL */ - - if (flags & LONGDBL) { - _fpvalue = GET_ARG (N, ap, _LONG_DOUBLE); - } else { - _fpvalue = (_LONG_DOUBLE)GET_ARG (N, ap, double); - } - - /* do this before tricky precision changes */ - expt = _ldcheck (&_fpvalue); - if (expt == 2) { - if (_fpvalue < 0) - sign = L'-'; - if (ch <= L'G') /* 'A', 'E', 'F', or 'G' */ - cp = L"INF"; - else - cp = L"inf"; - size = 3; - flags &= ~ZEROPAD; - break; - } - if (expt == 1) { - if (ch <= L'G') /* 'A', 'E', 'F', or 'G' */ - cp = L"NAN"; - else - cp = L"nan"; - size = 3; - flags &= ~ZEROPAD; - break; - } -# endif /* !_NO_LONGDBL */ - - cp = buf; -# ifdef _WANT_IO_C99_FORMATS - if (ch == L'a' || ch == L'A') { - ox[0] = L'0'; - ox[1] = ch == L'a' ? L'x' : L'X'; - flags |= HEXPREFIX; - if (prec >= BUF) - { - if ((malloc_buf = - (wchar_t *)_malloc_r (data, (prec + 1) * sizeof (wchar_t))) - == NULL) - { - fp->_flags |= __SERR; - goto error; - } - cp = malloc_buf; - } - } else -# endif /* _WANT_IO_C99_FORMATS */ - if (prec == -1) { - prec = DEFPREC; - } else if ((ch == L'g' || ch == L'G') && prec == 0) { - prec = 1; - } - - flags |= FPT; - - cp = wcvt (data, _fpvalue, prec, flags, &softsign, - &expt, ch, &ndig, cp, BUF); - - /* If buf is not large enough for the converted wchar_t - sequence, call wcvt again with a malloced new buffer. - This should happen fairly rarely. - */ - if (cp == buf && ndig > BUF && malloc_buf == NULL) { - if ((malloc_buf = - (wchar_t *)_malloc_r (data, ndig * sizeof (wchar_t))) - == NULL) - { - fp->_flags |= __SERR; - goto error; - } - cp = wcvt (data, _fpvalue, prec, flags, &softsign, - &expt, ch, &ndig, malloc_buf, ndig); - } - - if (ch == L'g' || ch == L'G') { - if (expt <= -4 || expt > prec) - ch -= 2; /* 'e' or 'E' */ - else - ch = L'g'; - } -# ifdef _WANT_IO_C99_FORMATS - else if (ch == L'F') - ch = L'f'; -# endif - if (ch <= L'e') { /* 'a', 'A', 'e', or 'E' fmt */ - --expt; - expsize = wexponent (expstr, expt, ch); - size = expsize + ndig; - if (ndig > 1 || flags & ALT) - ++size; -# ifdef _WANT_IO_C99_FORMATS - flags &= ~GROUPING; -# endif - } else { - if (ch == L'f') { /* f fmt */ - if (expt > 0) { - size = expt; - if (prec || flags & ALT) - size += prec + 1; - } else /* "0.X" */ - size = (prec || flags & ALT) - ? prec + 2 - : 1; - } else if (expt >= ndig) { /* fixed g fmt */ - size = expt; - if (flags & ALT) - ++size; - } else - size = ndig + (expt > 0 ? - 1 : 2 - expt); -# ifdef _WANT_IO_C99_FORMATS - if ((flags & GROUPING) && expt > 0) { - /* space for thousands' grouping */ - nseps = nrepeats = 0; - lead = expt; - while (*grouping != CHAR_MAX) { - if (lead <= *grouping) - break; - lead -= *grouping; - if (grouping[1]) { - nseps++; - grouping++; - } else - nrepeats++; - } - size += nseps + nrepeats; - } else -# endif - lead = expt; - } - if (softsign) - sign = L'-'; - break; -#endif /* FLOATING_POINT */ - case L'n': -#ifndef _NO_LONGLONG - if (flags & QUADINT) - *GET_ARG (N, ap, quad_ptr_t) = ret; - else -#endif - if (flags & LONGINT) - *GET_ARG (N, ap, long_ptr_t) = ret; - else if (flags & SHORTINT) - *GET_ARG (N, ap, short_ptr_t) = ret; -#ifdef _WANT_IO_C99_FORMATS - else if (flags & CHARINT) - *GET_ARG (N, ap, char_ptr_t) = ret; -#endif - else - *GET_ARG (N, ap, int_ptr_t) = ret; - continue; /* no output */ - case L'o': - _uquad = UARG (); - base = OCT; -#ifdef _WANT_IO_C99_FORMATS - flags &= ~GROUPING; -#endif - goto nosign; - case L'p': - /* - * ``The argument shall be a pointer to void. The - * value of the pointer is converted to a sequence - * of printable characters, in an implementation- - * defined manner.'' - * -- ANSI X3J11 - */ - /* NOSTRICT */ - _uquad = (uintptr_t) GET_ARG (N, ap, void_ptr_t); - base = HEX; - xdigs = L"0123456789abcdef"; - flags |= HEXPREFIX; - ox[0] = L'0'; - ox[1] = ch = L'x'; - goto nosign; - case L's': -#ifdef _WANT_IO_C99_FORMATS - case L'S': /* POSIX extension */ -#endif - sign = '\0'; - cp = GET_ARG (N, ap, wchar_ptr_t); -#ifndef __OPTIMIZE_SIZE__ - /* Behavior is undefined if the user passed a - NULL string when precision is not 0. - However, if we are not optimizing for size, - we might as well mirror glibc behavior. */ - if (cp == NULL) { - cp = L"(null)"; - size = ((unsigned) prec > 6U) ? 6 : prec; - } - else -#endif /* __OPTIMIZE_SIZE__ */ -#ifdef _MB_CAPABLE - if (ch == L's' && !(flags & LONGINT)) { - char *arg = (char *) cp; - size_t insize = 0, nchars = 0, nconv = 0; - mbstate_t ps; - wchar_t *p; - - if (prec >= 0) { - char *p = arg; - memset ((_PTR)&ps, '\0', sizeof (mbstate_t)); - while (nchars < (size_t)prec) { - nconv = mbrlen (p, MB_CUR_MAX, &ps); - if (nconv == 0 || nconv == (size_t)-1 || - nconv == (size_t)-2) - break; - p += nconv; - ++nchars; - insize += nconv; - } - if (nconv == (size_t) -1 || nconv == (size_t) -2) { - fp->_flags |= __SERR; - goto error; - } - } else - insize = strlen(arg); - if (insize >= BUF) { - if ((malloc_buf = (wchar_t *) _malloc_r (data, (insize + 1) * sizeof (wchar_t))) - == NULL) { - fp->_flags |= __SERR; - goto error; - } - cp = malloc_buf; - } else - cp = buf; - memset ((_PTR)&ps, '\0', sizeof (mbstate_t)); - p = cp; - while (insize != 0) { - nconv = _mbrtowc_r (data, p, arg, insize, &ps); - if (nconv == 0 || nconv == (size_t)-1 || nconv == (size_t)-2) - break; - ++p; - arg += nconv; - insize -= nconv; - } - if (nconv == (size_t) -1 || nconv == (size_t) -2) { - fp->_flags |= __SERR; - goto error; - } - *p = L'\0'; - size = p - cp; - } - else -#endif /* _MB_CAPABLE */ - if (prec >= 0) { - /* - * can't use wcslen; can only look for the - * NUL in the first `prec' characters, and - * strlen () will go further. - */ - wchar_t *p = wmemchr (cp, L'\0', prec); - - if (p != NULL) { - size = p - cp; - if (size > prec) - size = prec; - } else - size = prec; - } else - size = wcslen (cp); - - break; - case L'u': - _uquad = UARG (); - base = DEC; - goto nosign; - case L'X': - xdigs = L"0123456789ABCDEF"; - goto hex; - case 'x': - xdigs = L"0123456789abcdef"; -hex: _uquad = UARG (); - base = HEX; - /* leading 0x/X only if non-zero */ - if (flags & ALT && _uquad != 0) { - ox[0] = L'0'; - ox[1] = ch; - flags |= HEXPREFIX; - } - -#ifdef _WANT_IO_C99_FORMATS - flags &= ~GROUPING; -#endif - /* unsigned conversions */ -nosign: sign = L'\0'; - /* - * ``... diouXx conversions ... if a precision is - * specified, the 0 flag will be ignored.'' - * -- ANSI X3J11 - */ -number: if ((dprec = prec) >= 0) - flags &= ~ZEROPAD; - - /* - * ``The result of converting a zero value with an - * explicit precision of zero is no characters.'' - * -- ANSI X3J11 - */ - cp = buf + BUF; - if (_uquad != 0 || prec != 0) { - /* - * Unsigned mod is hard, and unsigned mod - * by a constant is easier than that by - * a variable; hence this switch. - */ - switch (base) { - case OCT: - do { - *--cp = to_char (_uquad & 7); - _uquad >>= 3; - } while (_uquad); - /* handle octal leading 0 */ - if (flags & ALT && *cp != L'0') - *--cp = L'0'; - break; - - case DEC: - /* many numbers are 1 digit */ - if (_uquad < 10) { - *--cp = to_char(_uquad); - break; - } -#ifdef _WANT_IO_C99_FORMATS - ndig = 0; -#endif - do { - *--cp = to_char (_uquad % 10); -#ifdef _WANT_IO_C99_FORMATS - ndig++; - /* If (*grouping == CHAR_MAX) then no - more grouping */ - if ((flags & GROUPING) - && ndig == *grouping - && *grouping != CHAR_MAX - && _uquad > 9) { - *--cp = thousands_sep; - ndig = 0; - /* If (grouping[1] == '\0') then we - have to use *grouping character - (last grouping rule) for all - next cases. */ - if (grouping[1] != '\0') - grouping++; - } -#endif - _uquad /= 10; - } while (_uquad != 0); - break; - - case HEX: - do { - *--cp = xdigs[_uquad & 15]; - _uquad >>= 4; - } while (_uquad); - break; - - default: - cp = L"bug in vfprintf: bad base"; - size = wcslen (cp); - goto skipsize; - } - } - /* - * ...result is to be converted to an 'alternate form'. - * For o conversion, it increases the precision to force - * the first digit of the result to be a zero." - * -- ANSI X3J11 - * - * To demonstrate this case, compile and run: - * printf ("%#.0o",0); - */ - else if (base == OCT && (flags & ALT)) - *--cp = L'0'; - - size = buf + BUF - cp; - skipsize: - break; - default: /* "%?" prints ?, unless ? is NUL */ - if (ch == L'\0') - goto done; - /* pretend it was %c with argument ch */ - cp = buf; - *cp = ch; - size = 1; - sign = L'\0'; - break; - } - - /* - * All reasonable formats wind up here. At this point, `cp' - * points to a string which (if not flags&LADJUST) should be - * padded out to `width' places. If flags&ZEROPAD, it should - * first be prefixed by any sign or other prefix; otherwise, - * it should be blank padded before the prefix is emitted. - * After any left-hand padding and prefixing, emit zeroes - * required by a decimal [diouxX] precision, then print the - * string proper, then emit zeroes required by any leftover - * floating precision; finally, if LADJUST, pad with blanks. - * If flags&FPT, ch must be in [aAeEfg]. - * - * Compute actual size, so we know how much to pad. - * size excludes decimal prec; realsz includes it. - */ - realsz = dprec > size ? dprec : size; - if (sign) - realsz++; - if (flags & HEXPREFIX) - realsz+= 2; - - /* right-adjusting blank padding */ - if ((flags & (LADJUST|ZEROPAD)) == 0) - PAD (width - realsz, blanks); - - /* prefix */ - if (sign) - PRINT (&sign, 1); - if (flags & HEXPREFIX) - PRINT (ox, 2); - - /* right-adjusting zero padding */ - if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD) - PAD (width - realsz, zeroes); - - /* leading zeroes from decimal precision */ - PAD (dprec - size, zeroes); - - /* the string or number proper */ -#ifdef FLOATING_POINT - if ((flags & FPT) == 0) { - PRINT (cp, size); - } else { /* glue together f_p fragments */ - if (ch >= L'f') { /* 'f' or 'g' */ - if (_fpvalue == 0) { - /* kludge for __dtoa irregularity */ - PRINT (L"0", 1); - if (expt < ndig || flags & ALT) { - PRINT (&decimal_point, 1); - PAD (ndig - 1, zeroes); - } - } else if (expt <= 0) { - PRINT (L"0", 1); - if (expt || ndig || flags & ALT) { - PRINT (&decimal_point, 1); - PAD (-expt, zeroes); - PRINT (cp, ndig); - } - } else { - wchar_t *convbuf = cp; - PRINTANDPAD(cp, convbuf + ndig, - lead, zeroes); - cp += lead; -#ifdef _WANT_IO_C99_FORMATS - if (flags & GROUPING) { - while (nseps > 0 || nrepeats > 0) { - if (nrepeats > 0) - nrepeats--; - else { - grouping--; - nseps--; - } - PRINT (&thousands_sep, 1); - PRINTANDPAD (cp, convbuf + ndig, - *grouping, zeroes); - cp += *grouping; - } - if (cp > convbuf + ndig) - cp = convbuf + ndig; - } -#endif - if (expt < ndig || flags & ALT) - PRINT (&decimal_point, 1); - PRINTANDPAD (cp, convbuf + ndig, - ndig - expt, zeroes); - } - - } else { /* 'a', 'A', 'e', or 'E' */ - if (ndig > 1 || flags & ALT) { - PRINT (cp, 1); - cp++; - PRINT (&decimal_point, 1); - if (_fpvalue) { - PRINT (cp, ndig - 1); - } else /* 0.[0..] */ - /* __dtoa irregularity */ - PAD (ndig - 1, zeroes); - } else /* XeYYY */ - PRINT (cp, 1); - PRINT (expstr, expsize); - } - } -#else /* !FLOATING_POINT */ - PRINT (cp, size); -#endif - /* left-adjusting padding (always blank) */ - if (flags & LADJUST) - PAD (width - realsz, blanks); - - /* finally, adjust ret */ - ret += width > realsz ? width : realsz; - - FLUSH (); /* copy out the I/O vectors */ - - if (malloc_buf != NULL) { - _free_r (data, malloc_buf); - malloc_buf = NULL; - } - } -done: - FLUSH (); -error: - if (malloc_buf != NULL) - _free_r (data, malloc_buf); -#ifndef STRING_ONLY - _funlockfile (fp); -#endif - return (__sferror (fp) ? EOF : ret); - /* NOTREACHED */ -} - -#ifdef FLOATING_POINT - -/* Using reentrant DATA, convert finite VALUE into a string of digits - with no decimal point, using NDIGITS precision and FLAGS as guides - to whether trailing zeros must be included. Set *SIGN to nonzero - if VALUE was negative. Set *DECPT to the exponent plus one. Set - *LENGTH to the length of the returned string. CH must be one of - [aAeEfFgG]; different from vfprintf.c:cvt(), the return string - lives in BUF regardless of CH. LEN is the length of BUF, except - when CH is [aA], in which case LEN is not in use. If BUF is not - large enough for the converted string, only the first LEN number - of characters will be returned in BUF, but *LENGTH will be set to - the full length of the string before the truncation. */ -static wchar_t * -wcvt(struct _reent *data, _PRINTF_FLOAT_TYPE value, int ndigits, int flags, - wchar_t *sign, int *decpt, int ch, int *length, wchar_t *buf, int len) -{ - int mode, dsgn; -# ifdef _NO_LONGDBL - union double_union tmp; - - tmp.d = value; - if (word0 (tmp) & Sign_bit) { /* this will check for < 0 and -0.0 */ - value = -value; - *sign = L'-'; - } else - *sign = L'\0'; -# else /* !_NO_LONGDBL */ - union - { - struct ldieee ieee; - _LONG_DOUBLE val; - } ld; - - ld.val = value; - if (ld.ieee.sign) { /* this will check for < 0 and -0.0 */ - value = -value; - *sign = L'-'; - } else - *sign = L'\0'; -# endif /* !_NO_LONGDBL */ - -# ifdef _WANT_IO_C99_FORMATS - if (ch == L'a' || ch == L'A') { - wchar_t *digits, *bp, *rve; - /* This code assumes FLT_RADIX is a power of 2. The initial - division ensures the digit before the decimal will be less - than FLT_RADIX (unless it is rounded later). There is no - loss of precision in these calculations. */ - value = FREXP (value, decpt) / 8; - if (!value) - *decpt = 1; - digits = ch == L'a' ? L"0123456789abcdef" : L"0123456789ABCDEF"; - bp = buf; - do { - value *= 16; - mode = (int) value; - value -= mode; - *bp++ = digits[mode]; - } while (ndigits-- && value); - if (value > 0.5 || (value == 0.5 && mode & 1)) { - /* round to even */ - rve = bp; - while (*--rve == digits[0xf]) { - *rve = L'0'; - } - *rve = *rve == L'9' ? digits[0xa] : *rve + 1; - } else { - while (ndigits-- >= 0) { - *bp++ = L'0'; - } - } - *length = bp - buf; - return buf; - } -# endif /* _WANT_IO_C99_FORMATS */ - if (ch == L'f' || ch == L'F') { - mode = 3; /* ndigits after the decimal point */ - } else { - /* To obtain ndigits after the decimal point for the 'e' - * and 'E' formats, round to ndigits + 1 significant - * figures. - */ - if (ch == L'e' || ch == L'E') { - ndigits++; - } - mode = 2; /* ndigits significant digits */ - } - - { - char *digits, *bp, *rve; -#ifndef _MB_CAPABLE - int i; -#endif - - digits = _DTOA_R (data, value, mode, ndigits, decpt, &dsgn, &rve); - - if ((ch != L'g' && ch != L'G') || flags & ALT) { /* Print trailing zeros */ - bp = digits + ndigits; - if (ch == L'f' || ch == L'F') { - if (*digits == L'0' && value) - *decpt = -ndigits + 1; - bp += *decpt; - } - if (value == 0) /* kludge for __dtoa irregularity */ - rve = bp; - while (rve < bp) - *rve++ = '0'; - } - - *length = rve - digits; /* full length of the string */ -#ifdef _MB_CAPABLE - _mbsnrtowcs_r (data, buf, (const char **) &digits, *length, - len, NULL); -#else - for (i = 0; i < *length && i < len; ++i) - buf[i] = (wchar_t) digits[i]; -#endif - return buf; - } -} - -static int -wexponent(wchar_t *p0, int exp, int fmtch) -{ - register wchar_t *p, *t; - wchar_t expbuf[MAXEXPLEN]; -# ifdef _WANT_IO_C99_FORMATS - int isa = fmtch == L'a' || fmtch == L'A'; -# else -# define isa 0 -# endif - - p = p0; - *p++ = isa ? L'p' - L'a' + fmtch : fmtch; - if (exp < 0) { - exp = -exp; - *p++ = L'-'; - } - else - *p++ = L'+'; - t = expbuf + MAXEXPLEN; - if (exp > 9) { - do { - *--t = to_char (exp % 10); - } while ((exp /= 10) > 9); - *--t = to_char (exp); - for (; t < expbuf + MAXEXPLEN; *p++ = *t++); - } - else { - if (!isa) - *p++ = L'0'; - *p++ = to_char (exp); - } - return (p - p0); -} -#endif /* FLOATING_POINT */ - - -#ifndef _NO_POS_ARGS - -/* Positional argument support. - Written by Jeff Johnston - - Copyright (c) 2002 Red Hat Incorporated. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 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. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL RED HAT INCORPORATED BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* function to get positional parameter N where n = N - 1 */ -static union arg_val * -_DEFUN(get_arg, (data, n, fmt, ap, numargs_p, args, arg_type, last_fmt), - struct _reent *data _AND - int n _AND - wchar_t *fmt _AND - va_list *ap _AND - int *numargs_p _AND - union arg_val *args _AND - int *arg_type _AND - wchar_t **last_fmt) -{ - wchar_t ch; - int number, flags; - int spec_type; - int numargs = *numargs_p; - __CH_CLASS chtype; - __STATE state, next_state; - __ACTION action; - int pos, last_arg; - int max_pos_arg = n; - /* Only need types that can be reached via vararg promotions. */ - enum types { INT, LONG_INT, QUAD_INT, CHAR_PTR, DOUBLE, LONG_DOUBLE, WIDE_CHAR }; - - /* if this isn't the first call, pick up where we left off last time */ - if (*last_fmt != NULL) - fmt = *last_fmt; - - /* we need to process either to end of fmt string or until we have actually - read the desired parameter from the vararg list. */ - while (*fmt && n >= numargs) - { - while (*fmt != L'\0' && *fmt != L'%') - fmt += 1; - - if (*fmt == L'\0') - break; - state = START; - flags = 0; - pos = -1; - number = 0; - spec_type = INT; - - /* Use state/action table to process format specifiers. We ignore invalid - formats and we are only interested in information that tells us how to - read the vararg list. */ - while (state != DONE) - { - ch = *fmt++; - chtype = ch < (wchar_t) 256 ? __chclass[ch] : OTHER; - next_state = __state_table[state][chtype]; - action = __action_table[state][chtype]; - state = next_state; - - switch (action) - { - case GETMOD: /* we have format modifier */ - switch (ch) - { - case L'h': - /* No flag needed, since short and char promote to int. */ - break; - case L'L': - flags |= LONGDBL; - break; - case L'q': - flags |= QUADINT; - break; -# ifdef _WANT_IO_C99_FORMATS - case L'j': - if (sizeof (intmax_t) == sizeof (long)) - flags |= LONGINT; - else - flags |= QUADINT; - break; - case L'z': - if (sizeof (size_t) <= sizeof (int)) - /* no flag needed */; - else if (sizeof (size_t) <= sizeof (long)) - flags |= LONGINT; - else - /* POSIX states that at least one programming - environment must support size_t no wider than - long, but that means other environments can - have size_t as wide as long long. */ - flags |= QUADINT; - break; - case L't': - if (sizeof (ptrdiff_t) <= sizeof (int)) - /* no flag needed */; - else if (sizeof (ptrdiff_t) <= sizeof (long)) - flags |= LONGINT; - else - /* POSIX states that at least one programming - environment must support ptrdiff_t no wider than - long, but that means other environments can - have ptrdiff_t as wide as long long. */ - flags |= QUADINT; - break; -# endif /* _WANT_IO_C99_FORMATS */ - case L'l': - default: -# if defined _WANT_IO_C99_FORMATS || !defined _NO_LONGLONG - if (*fmt == L'l') - { - flags |= QUADINT; - ++fmt; - } - else -# endif - flags |= LONGINT; - break; - } - break; - case GETARG: /* we have format specifier */ - { - numargs &= (MAX_POS_ARGS - 1); - /* process the specifier and translate it to a type to fetch from varargs */ - switch (ch) - { - case L'd': - case L'i': - case L'o': - case L'x': - case L'X': - case L'u': - if (flags & LONGINT) - spec_type = LONG_INT; -# ifndef _NO_LONGLONG - else if (flags & QUADINT) - spec_type = QUAD_INT; -# endif - else - spec_type = INT; - break; -# ifdef _WANT_IO_C99_FORMATS - case L'a': - case L'A': - case L'F': -# endif - case L'f': - case L'g': - case L'G': - case L'E': - case L'e': -# ifndef _NO_LONGDBL - if (flags & LONGDBL) - spec_type = LONG_DOUBLE; - else -# endif - spec_type = DOUBLE; - break; - case L's': -# ifdef _WANT_IO_C99_FORMATS - case L'S': /* POSIX extension */ -# endif - case L'p': - case L'n': - spec_type = CHAR_PTR; - break; - case L'c': -# ifdef _WANT_IO_C99_FORMATS - if (flags & LONGINT) - spec_type = WIDE_CHAR; - else -# endif - spec_type = INT; - break; -# ifdef _WANT_IO_C99_FORMATS - case L'C': /* POSIX extension */ - spec_type = WIDE_CHAR; - break; -# endif - } - - /* if we have a positional parameter, just store the type, otherwise - fetch the parameter from the vararg list */ - if (pos != -1) - arg_type[pos] = spec_type; - else - { - switch (spec_type) - { - case LONG_INT: - args[numargs++].val_long = va_arg (*ap, long); - break; - case QUAD_INT: - args[numargs++].val_quad_t = va_arg (*ap, quad_t); - break; - case WIDE_CHAR: - args[numargs++].val_wint_t = va_arg (*ap, wint_t); - break; - case INT: - args[numargs++].val_int = va_arg (*ap, int); - break; - case CHAR_PTR: - args[numargs++].val_wchar_ptr_t = va_arg (*ap, wchar_t *); - break; - case DOUBLE: - args[numargs++].val_double = va_arg (*ap, double); - break; - case LONG_DOUBLE: - args[numargs++].val__LONG_DOUBLE = va_arg (*ap, _LONG_DOUBLE); - break; - } - } - } - break; - case GETPOS: /* we have positional specifier */ - if (arg_type[0] == -1) - memset (arg_type, 0, sizeof (int) * MAX_POS_ARGS); - pos = number - 1; - max_pos_arg = (max_pos_arg > pos ? max_pos_arg : pos); - break; - case PWPOS: /* we have positional specifier for width or precision */ - if (arg_type[0] == -1) - memset (arg_type, 0, sizeof (int) * MAX_POS_ARGS); - number -= 1; - arg_type[number] = INT; - max_pos_arg = (max_pos_arg > number ? max_pos_arg : number); - break; - case GETPWB: /* we require format pushback */ - --fmt; - /* fallthrough */ - case GETPW: /* we have a variable precision or width to acquire */ - args[numargs++].val_int = va_arg (*ap, int); - break; - case NUMBER: /* we have a number to process */ - number = (ch - '0'); - while ((ch = *fmt) != '\0' && is_digit (ch)) - { - number = number * 10 + (ch - '0'); - ++fmt; - } - break; - case SKIPNUM: /* we have a number to skip */ - while ((ch = *fmt) != '\0' && is_digit (ch)) - ++fmt; - break; - case NOOP: - default: - break; /* do nothing */ - } - } - } - - /* process all arguments up to at least the one we are looking for and if we - have seen the end of the string, then process up to the max argument needed */ - if (*fmt == '\0') - last_arg = max_pos_arg; - else - last_arg = n; - - while (numargs <= last_arg) - { - switch (arg_type[numargs]) - { - case LONG_INT: - args[numargs++].val_long = va_arg (*ap, long); - break; - case QUAD_INT: - args[numargs++].val_quad_t = va_arg (*ap, quad_t); - break; - case CHAR_PTR: - args[numargs++].val_wchar_ptr_t = va_arg (*ap, wchar_t *); - break; - case DOUBLE: - args[numargs++].val_double = va_arg (*ap, double); - break; - case LONG_DOUBLE: - args[numargs++].val__LONG_DOUBLE = va_arg (*ap, _LONG_DOUBLE); - break; - case WIDE_CHAR: - args[numargs++].val_wint_t = va_arg (*ap, wint_t); - break; - case INT: - default: - args[numargs++].val_int = va_arg (*ap, int); - break; - } - } - - /* alter the global numargs value and keep a reference to the last bit of the fmt - string we processed here because the caller will continue processing where we started */ - *numargs_p = numargs; - *last_fmt = fmt; - return &args[n]; -} -#endif /* !_NO_POS_ARGS */ diff --git a/newlib/libc/stdio/vfwscanf.c b/newlib/libc/stdio/vfwscanf.c deleted file mode 100644 index 49ccf2f4b..000000000 --- a/newlib/libc/stdio/vfwscanf.c +++ /dev/null @@ -1,1465 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<vfwscanf>>, <<vwscanf>>, <<vswscanf>>---scan and format argument list from wide character input - -INDEX - vfwscanf -INDEX - _vfwscanf -INDEX - vwscanf -INDEX - _vwscanf -INDEX - vswscanf -INDEX - _vswscanf - -ANSI_SYNOPSIS - #include <stdio.h> - #include <stdarg.h> - int vwscanf(const wchar_t *<[fmt]>, va_list <[list]>); - int vfwscanf(FILE *<[fp]>, const wchar_t *<[fmt]>, va_list <[list]>); - int vswscanf(const wchar_t *<[str]>, const wchar_t *<[fmt]>, va_list <[list]>); - - int _vwscanf(struct _reent *<[reent]>, const wchar_t *<[fmt]>, - va_list <[list]>); - int _vfwscanf(struct _reent *<[reent]>, FILE *<[fp]>, const wchar_t *<[fmt]>, - va_list <[list]>); - int _vswscanf(struct _reent *<[reent]>, const wchar_t *<[str]>, - const wchar_t *<[fmt]>, va_list <[list]>); - -TRAD_SYNOPSIS - #include <stdio.h> - #include <varargs.h> - int vwscanf( <[fmt]>, <[ist]>) - wchar_t *<[fmt]>; - va_list <[list]>; - - int vfwscanf( <[fp]>, <[fmt]>, <[list]>) - FILE *<[fp]>; - wchar_t *<[fmt]>; - va_list <[list]>; - - int vswscanf( <[str]>, <[fmt]>, <[list]>) - wchar_t *<[str]>; - wchar_t *<[fmt]>; - va_list <[list]>; - - int _vwscanf( <[reent]>, <[fmt]>, <[ist]>) - struct _reent *<[reent]>; - wchar_t *<[fmt]>; - va_list <[list]>; - - int _vfwscanf( <[reent]>, <[fp]>, <[fmt]>, <[list]>) - struct _reent *<[reent]>; - FILE *<[fp]>; - wchar_t *<[fmt]>; - va_list <[list]>; - - int _vswscanf( <[reent]>, <[str]>, <[fmt]>, <[list]>) - struct _reent *<[reent]>; - wchar_t *<[str]>; - wchar_t *<[fmt]>; - va_list <[list]>; - -DESCRIPTION -<<vwscanf>>, <<vfwscanf>>, and <<vswscanf>> are (respectively) variants -of <<wscanf>>, <<fwscanf>>, and <<swscanf>>. They differ only in -allowing their caller to pass the variable argument list as a -<<va_list>> object (initialized by <<va_start>>) rather than -directly accepting a variable number of arguments. - -RETURNS -The return values are consistent with the corresponding functions: -<<vwscanf>> returns the number of input fields successfully scanned, -converted, and stored; the return value does not include scanned -fields which were not stored. - -If <<vwscanf>> attempts to read at end-of-file, the return value -is <<EOF>>. - -If no fields were stored, the return value is <<0>>. - -The routines <<_vwscanf>>, <<_vfwscanf>>, and <<_vswscanf>> are -reentrant versions which take an additional first parameter which points -to the reentrancy structure. - -PORTABILITY -C99, POSIX-1.2008 -*/ - -#include <_ansi.h> -#include <reent.h> -#include <newlib.h> -#include <ctype.h> -#include <wctype.h> -#include <stdio.h> -#include <stdlib.h> -#include <stdint.h> -#include <limits.h> -#include <wchar.h> -#include <string.h> -#include <stdarg.h> -#include <errno.h> -#include "local.h" - -#ifdef INTEGER_ONLY -#define VFWSCANF vfiwscanf -#define _VFWSCANF_R _vfiwscanf_r -#define __SVFWSCANF __svfiwscanf -#ifdef STRING_ONLY -# define __SVFWSCANF_R __ssvfiwscanf_r -#else -# define __SVFWSCANF_R __svfiwscanf_r -#endif -#else -#define VFWSCANF vfwscanf -#define _VFWSCANF_R _vfwscanf_r -#define __SVFWSCANF __svfwscanf -#ifdef STRING_ONLY -# define __SVFWSCANF_R __ssvfwscanf_r -#else -# define __SVFWSCANF_R __svfwscanf_r -#endif -#ifndef NO_FLOATING_POINT -#define FLOATING_POINT -#endif -#endif - -#ifdef STRING_ONLY -#undef _flockfile -#undef _funlockfile -#define _flockfile(x) {} -#define _funlockfile(x) {} -#define _ungetwc_r _sungetwc_r -#define __srefill_r __ssrefill_r -#define _fgetwc_r _sfgetwc_r -#endif - -#ifdef FLOATING_POINT -#include <math.h> -#include <float.h> - -/* Currently a test is made to see if long double processing is warranted. - This could be changed in the future should the _ldtoa_r code be - preferred over _dtoa_r. */ -#define _NO_LONGDBL -#if defined _WANT_IO_LONG_DOUBLE && (LDBL_MANT_DIG > DBL_MANT_DIG) -#undef _NO_LONGDBL -extern _LONG_DOUBLE _wcstold_r _PARAMS((wchar_t *s, wchar_t **sptr)); -#endif - -#include "floatio.h" - -#if ((MAXEXP+MAXFRACT+3) > MB_LEN_MAX) -# define BUF (MAXEXP+MAXFRACT+3) /* 3 = sign + decimal point + NUL */ -#else -# define BUF MB_LEN_MAX -#endif - -/* An upper bound for how long a long prints in decimal. 4 / 13 approximates - log (2). Add one char for roundoff compensation and one for the sign. */ -#define MAX_LONG_LEN ((CHAR_BIT * sizeof (long) - 1) * 4 / 13 + 2) -#else -#define BUF 40 -#endif - -#define _NO_LONGLONG -#if defined _WANT_IO_LONG_LONG \ - && (defined __GNUC__ || __STDC_VERSION__ >= 199901L) -# undef _NO_LONGLONG -#endif - -#define _NO_POS_ARGS -#ifdef _WANT_IO_POS_ARGS -# undef _NO_POS_ARGS -# ifdef NL_ARGMAX -# define MAX_POS_ARGS NL_ARGMAX -# else -# define MAX_POS_ARGS 32 -# endif - -static void * get_arg (int, va_list *, int *, void **); -#endif /* _WANT_IO_POS_ARGS */ - -/* - * Flags used during conversion. - */ - -#define LONG 0x01 /* l: long or double */ -#define LONGDBL 0x02 /* L/ll: long double or long long */ -#define SHORT 0x04 /* h: short */ -#define CHAR 0x08 /* hh: 8 bit integer */ -#define SUPPRESS 0x10 /* suppress assignment */ -#define POINTER 0x20 /* weird %p pointer (`fake hex') */ -#define NOSKIP 0x40 /* do not skip blanks */ - -/* - * The following are used in numeric conversions only: - * SIGNOK, NDIGITS, DPTOK, and EXPOK are for floating point; - * SIGNOK, NDIGITS, PFXOK, and NZDIGITS are for integral. - */ - -#define SIGNOK 0x80 /* +/- is (still) legal */ -#define NDIGITS 0x100 /* no digits detected */ - -#define DPTOK 0x200 /* (float) decimal point is still legal */ -#define EXPOK 0x400 /* (float) exponent (e+3, etc) still legal */ - -#define PFXOK 0x200 /* 0x prefix is (still) legal */ -#define NZDIGITS 0x400 /* no zero digits detected */ -#define HAVESIGN 0x10000 /* sign detected */ - -/* - * Conversion types. - */ - -#define CT_CHAR 0 /* %c conversion */ -#define CT_CCL 1 /* %[...] conversion */ -#define CT_STRING 2 /* %s conversion */ -#define CT_INT 3 /* integer, i.e., wcstol or wcstoul */ -#define CT_FLOAT 4 /* floating, i.e., wcstod */ - -#define INCCL(_c) \ - (cclcompl ? (wmemchr(ccls, (_c), ccle - ccls) == NULL) : \ - (wmemchr(ccls, (_c), ccle - ccls) != NULL)) - -/* - * vfwscanf - */ - -#ifndef STRING_ONLY - -#ifndef _REENT_ONLY - -int -_DEFUN(VFWSCANF, (fp, fmt, ap), - register FILE *fp _AND - _CONST wchar_t *fmt _AND - va_list ap) -{ - CHECK_INIT(_REENT, fp); - return __SVFWSCANF_R (_REENT, fp, fmt, ap); -} - -int -_DEFUN(__SVFWSCANF, (fp, fmt0, ap), - register FILE *fp _AND - wchar_t _CONST *fmt0 _AND - va_list ap) -{ - return __SVFWSCANF_R (_REENT, fp, fmt0, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_VFWSCANF_R, (data, fp, fmt, ap), - struct _reent *data _AND - register FILE *fp _AND - _CONST wchar_t *fmt _AND - va_list ap) -{ - CHECK_INIT(data, fp); - return __SVFWSCANF_R (data, fp, fmt, ap); -} -#endif /* !STRING_ONLY */ - -#ifdef STRING_ONLY -/* When dealing with the swscanf family, we don't want to use the - * regular ungetwc which will drag in file I/O items we don't need. - * So, we create our own trimmed-down version. */ -static wint_t -_DEFUN(_sungetwc_r, (data, fp, ch), - struct _reent *data _AND - wint_t wc _AND - register FILE *fp) -{ - if (wc == WEOF) - return (WEOF); - - /* After ungetc, we won't be at eof anymore */ - fp->_flags &= ~__SEOF; - - /* - * If we are in the middle of ungetwc'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 -= sizeof (wchar_t); - *fp->_p = (wchar_t) wc; - fp->_r += sizeof (wchar_t); - return wc; - } - - /* - * If we can handle this by simply backing up, do so, - * but never replace the original character. - * (This makes swscanf() work when scanning `const' data.) - */ - - if (fp->_bf._base != NULL && fp->_p > fp->_bf._base - && ((wchar_t *)fp->_p)[-1] == wc) - { - fp->_p -= sizeof (wchar_t); - fp->_r += sizeof (wchar_t); - return wc; - } - - /* - * 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->_p = &fp->_ubuf[sizeof (fp->_ubuf) - sizeof (wchar_t)]; - *(wchar_t *) fp->_p = wc; - fp->_r = 2; - return wc; -} - -extern int __ssrefill_r _PARAMS ((struct _reent *ptr, register FILE * fp)); - -static size_t -_DEFUN(_sfgetwc_r, (ptr, fp), - struct _reent * ptr _AND - FILE * fp) -{ - wchar_t wc; - - if (fp->_r <= 0 && __ssrefill_r (ptr, fp)) - return (WEOF); - wc = *(wchar_t *) fp->_p; - fp->_p += sizeof (wchar_t); - fp->_r -= sizeof (wchar_t); - return (wc); -} -#endif /* STRING_ONLY */ - -int -_DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap), - struct _reent *rptr _AND - register FILE *fp _AND - wchar_t _CONST *fmt0 _AND - va_list ap) -{ - register wchar_t *fmt = (wchar_t *) fmt0; - register wint_t c; /* character from format, or conversion */ - register size_t width; /* field width, or 0 */ - register wchar_t *p = NULL; /* points into all kinds of strings */ - register int n; /* handy integer */ - register int flags; /* flags as defined above */ - register wchar_t *p0; /* saves original value of p when necessary */ - int nassigned; /* number of fields assigned */ - int nread; /* number of characters consumed from fp */ -#ifndef _NO_POS_ARGS - int N; /* arg number */ - int arg_index = 0; /* index into args processed directly */ - int numargs = 0; /* number of varargs read */ - void *args[MAX_POS_ARGS]; /* positional args read */ - int is_pos_arg; /* is current format positional? */ -#endif - int base = 0; /* base argument to wcstol/wcstoul */ - - mbstate_t mbs; /* value to keep track of multibyte state */ - - #define CCFN_PARAMS _PARAMS((struct _reent *, const wchar_t *, wchar_t **, int)) - unsigned long (*ccfn)CCFN_PARAMS=0; /* conversion function (wcstol/wcstoul) */ - wchar_t buf[BUF]; /* buffer for numeric conversions */ - const wchar_t *ccls; /* character class start */ - const wchar_t *ccle; /* character class end */ - int cclcompl = 0; /* ccl is complemented? */ - wint_t wi; /* handy wint_t */ - char *mbp = NULL; /* multibyte string pointer for %c %s %[ */ - size_t nconv; /* number of bytes in mb. conversion */ - char mbbuf[MB_LEN_MAX]; /* temporary mb. character buffer */ - - char *cp; - short *sp; - int *ip; -#ifdef FLOATING_POINT - float *flp; - _LONG_DOUBLE *ldp; - double *dp; -#endif - long *lp; -#ifndef _NO_LONGLONG - long long *llp; -#endif - - /* `basefix' is used to avoid `if' tests in the integer scanner */ - static _CONST short basefix[17] = - {10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - - /* Macro to support positional arguments */ -#ifndef _NO_POS_ARGS -# define GET_ARG(n, ap, type) \ - ((type) (is_pos_arg \ - ? (n < numargs \ - ? args[n] \ - : get_arg (n, &ap, &numargs, args)) \ - : (arg_index++ < numargs \ - ? args[n] \ - : (numargs < MAX_POS_ARGS \ - ? args[numargs++] = va_arg (ap, void *) \ - : va_arg (ap, void *))))) -#else -# define GET_ARG(n, ap, type) (va_arg (ap, type)) -#endif - - _flockfile (fp); - - ORIENT (fp, 1); - - nassigned = 0; - nread = 0; - ccls = ccle = NULL; - for (;;) - { - c = *fmt++; - if (c == L'\0') - goto all_done; - if (iswspace (c)) - { - while ((c = _fgetwc_r (rptr, fp)) != WEOF && iswspace(c)) - ; - if (c != WEOF) - _ungetwc_r (rptr, c, fp); - continue; - } - if (c != L'%') - goto literal; - width = 0; - flags = 0; -#ifndef _NO_POS_ARGS - N = arg_index; - is_pos_arg = 0; -#endif - - /* - * switch on the format. continue if done; break once format - * type is derived. - */ - - again: - c = *fmt++; - - switch (c) - { - case L'%': - literal: - if ((wi = _fgetwc_r (rptr, fp)) == WEOF) - goto input_failure; - if (wi != c) - { - _ungetwc_r (rptr, wi, fp); - goto input_failure; - } - nread++; - continue; - - case L'*': - flags |= SUPPRESS; - goto again; - case L'l': -#if defined _WANT_IO_C99_FORMATS || !defined _NO_LONGLONG - if (*fmt == L'l') /* Check for 'll' = long long (SUSv3) */ - { - ++fmt; - flags |= LONGDBL; - } - else -#endif - flags |= LONG; - goto again; - case L'L': - flags |= LONGDBL; - goto again; - case L'h': -#ifdef _WANT_IO_C99_FORMATS - if (*fmt == 'h') /* Check for 'hh' = char int (SUSv3) */ - { - ++fmt; - flags |= CHAR; - } - else -#endif - flags |= SHORT; - goto again; -#ifdef _WANT_IO_C99_FORMATS - case L'j': /* intmax_t */ - if (sizeof (intmax_t) == sizeof (long)) - flags |= LONG; - else - flags |= LONGDBL; - goto again; - case L't': /* ptrdiff_t */ - if (sizeof (ptrdiff_t) < sizeof (int)) - /* POSIX states ptrdiff_t is 16 or more bits, as - is short. */ - flags |= SHORT; - else if (sizeof (ptrdiff_t) == sizeof (int)) - /* no flag needed */; - else if (sizeof (ptrdiff_t) <= sizeof (long)) - flags |= LONG; - else - /* POSIX states that at least one programming - environment must support ptrdiff_t no wider than - long, but that means other environments can - have ptrdiff_t as wide as long long. */ - flags |= LONGDBL; - goto again; - case L'z': /* size_t */ - if (sizeof (size_t) < sizeof (int)) - /* POSIX states size_t is 16 or more bits, as is short. */ - flags |= SHORT; - else if (sizeof (size_t) == sizeof (int)) - /* no flag needed */; - else if (sizeof (size_t) <= sizeof (long)) - flags |= LONG; - else - /* POSIX states that at least one programming - environment must support size_t no wider than - long, but that means other environments can - have size_t as wide as long long. */ - flags |= LONGDBL; - goto again; -#endif /* _WANT_IO_C99_FORMATS */ - - case L'0': - case L'1': - case L'2': - case L'3': - case L'4': - case L'5': - case L'6': - case L'7': - case L'8': - case L'9': - width = width * 10 + c - L'0'; - goto again; - -#ifndef _NO_POS_ARGS - case L'$': - if (width <= MAX_POS_ARGS) - { - N = width - 1; - is_pos_arg = 1; - width = 0; - goto again; - } - rptr->_errno = EINVAL; - goto input_failure; -#endif /* !_NO_POS_ARGS */ - - case L'd': - c = CT_INT; - ccfn = (unsigned long (*)CCFN_PARAMS)_wcstol_r; - base = 10; - break; - - case L'i': - c = CT_INT; - ccfn = (unsigned long (*)CCFN_PARAMS)_wcstol_r; - base = 0; - break; - - case L'o': - c = CT_INT; - ccfn = _wcstoul_r; - base = 8; - break; - - case L'u': - c = CT_INT; - ccfn = _wcstoul_r; - base = 10; - break; - - case L'X': - case L'x': - flags |= PFXOK; /* enable 0x prefixing */ - c = CT_INT; - ccfn = _wcstoul_r; - base = 16; - break; - -#ifdef FLOATING_POINT -# ifdef _WANT_IO_C99_FORMATS - case L'A': - case L'a': - case L'F': -# endif - case L'E': - case L'G': - case L'e': - case L'f': - case L'g': - c = CT_FLOAT; - break; -#endif - -#ifdef _WANT_IO_C99_FORMATS - case L'S': - flags |= LONG; - /* FALLTHROUGH */ -#endif - - case L's': - c = CT_STRING; - break; - - case L'[': - ccls = fmt; - if (*fmt == '^') - { - cclcompl = 1; - ++fmt; - } - else - cclcompl = 0; - if (*fmt == ']') - fmt++; - while (*fmt != '\0' && *fmt != ']') - fmt++; - ccle = fmt; - fmt++; - flags |= NOSKIP; - c = CT_CCL; - break; - -#ifdef _WANT_IO_C99_FORMATS - case 'C': - flags |= LONG; - /* FALLTHROUGH */ -#endif - - case 'c': - flags |= NOSKIP; - c = CT_CHAR; - break; - - case 'p': /* pointer format is like hex */ - flags |= POINTER | PFXOK; - c = CT_INT; - ccfn = _wcstoul_r; - base = 16; - break; - - case 'n': - if (flags & SUPPRESS) /* ??? */ - continue; -#ifdef _WANT_IO_C99_FORMATS - if (flags & CHAR) - { - cp = GET_ARG (N, ap, char *); - *cp = nread; - } - else -#endif - if (flags & SHORT) - { - sp = GET_ARG (N, ap, short *); - *sp = nread; - } - else if (flags & LONG) - { - lp = GET_ARG (N, ap, long *); - *lp = nread; - } -#ifndef _NO_LONGLONG - else if (flags & LONGDBL) - { - llp = GET_ARG (N, ap, long long*); - *llp = nread; - } -#endif - else - { - ip = GET_ARG (N, ap, int *); - *ip = nread; - } - continue; - - /* - * Disgusting backwards compatibility hacks. XXX - */ - case L'\0': /* compat */ - _funlockfile (fp); - return EOF; - - default: /* compat */ - goto match_failure; - } - - /* - * Consume leading white space, except for formats that - * suppress this. - */ - if ((flags & NOSKIP) == 0) - { - while ((wi = _fgetwc_r (rptr, fp)) != WEOF && iswspace (wi)) - nread++; - if (wi == WEOF) - goto input_failure; - _ungetwc_r (rptr, wi, fp); - } - - /* - * Do the conversion. - */ - switch (c) - { - - case CT_CHAR: - /* scan arbitrary characters (sets NOSKIP) */ - if (width == 0) - width = 1; - if (flags & LONG) - { - if (!(flags & SUPPRESS)) - p = va_arg(ap, wchar_t *); - n = 0; - while (width-- != 0 && (wi = _fgetwc_r (rptr, fp)) != WEOF) - { - if (!(flags & SUPPRESS)) - *p++ = (wchar_t) wi; - n++; - } - if (n == 0) - goto input_failure; - nread += n; - if (!(flags & SUPPRESS)) - nassigned++; - } - else - { - if (!(flags & SUPPRESS)) - mbp = va_arg(ap, char *); - n = 0; - memset ((_PTR)&mbs, '\0', sizeof (mbstate_t)); - while (width != 0 && (wi = _fgetwc_r (rptr, fp)) != WEOF) - { - if (width >= MB_CUR_MAX && !(flags & SUPPRESS)) - { - nconv = _wcrtomb_r (rptr, mbp, wi, &mbs); - if (nconv == (size_t) -1) - goto input_failure; - } - else - { - nconv = _wcrtomb_r (rptr, mbbuf, wi, &mbs); - if (nconv == (size_t) -1) - goto input_failure; - if (nconv > width) - { - _ungetwc_r (rptr, wi, fp); - break; - } - if (!(flags & SUPPRESS)) - memcpy(mbp, mbbuf, nconv); - } - if (!(flags & SUPPRESS)) - mbp += nconv; - width -= nconv; - n++; - } - if (n == 0) - goto input_failure; - nread += n; - if (!(flags & SUPPRESS)) - nassigned++; - } - break; - - case CT_CCL: - /* scan a (nonempty) character class (sets NOSKIP) */ - if (width == 0) - width = (size_t) ~0; /* `infinity' */ - /* take only those things in the class */ - if ((flags & SUPPRESS) && (flags & LONG)) - { - n = 0; - while ((wi = _fgetwc_r (rptr, fp)) != WEOF - && width-- != 0 && INCCL (wi)) - n++; - if (wi != WEOF) - _ungetwc_r (rptr, wi, fp); - if (n == 0) - goto match_failure; - } - else if (flags & LONG) - { - p0 = p = va_arg(ap, wchar_t *); - while ((wi = _fgetwc_r (rptr, fp)) != WEOF - && width-- != 0 && INCCL (wi)) - *p++ = (wchar_t) wi; - if (wi != WEOF) - _ungetwc_r (rptr, wi, fp); - n = p - p0; - if (n == 0) - goto match_failure; - } - else - { - if (!(flags & SUPPRESS)) - mbp = va_arg(ap, char *); - n = 0; - memset ((_PTR) &mbs, '\0', sizeof (mbstate_t)); - while ((wi = _fgetwc_r (rptr, fp)) != WEOF - && width-- != 0 && INCCL (wi)) - { - if (width >= MB_CUR_MAX && !(flags & SUPPRESS)) - { - nconv = _wcrtomb_r (rptr, mbp, wi, &mbs); - if (nconv == (size_t) -1) - goto input_failure; - } - else - { - nconv = wcrtomb(mbbuf, wi, &mbs); - if (nconv == (size_t) -1) - goto input_failure; - if (nconv > width) - break; - if (!(flags & SUPPRESS)) - memcpy(mbp, mbbuf, nconv); - } - if (!(flags & SUPPRESS)) - mbp += nconv; - width -= nconv; - n++; - } - if (wi != WEOF) - _ungetwc_r (rptr, wi, fp); - if (!(flags & SUPPRESS)) - { - *mbp = 0; - nassigned++; - } - } - nread += n; - break; - - case CT_STRING: - /* like CCL, but zero-length string OK, & no NOSKIP */ - if (width == 0) - width = (size_t)~0; - if ((flags & SUPPRESS) && (flags & LONG)) - { - while ((wi = _fgetwc_r (rptr, fp)) != WEOF - && width-- != 0 && !iswspace (wi)) - nread++; - if (wi != WEOF) - _ungetwc_r (rptr, wi, fp); - } - else if (flags & LONG) - { - p0 = p = va_arg(ap, wchar_t *); - while ((wi = _fgetwc_r (rptr, fp)) != WEOF - && width-- != 0 && !iswspace (wi)) - { - *p++ = (wchar_t) wi; - nread++; - } - if (wi != WEOF) - _ungetwc_r (rptr, wi, fp); - *p = '\0'; - nassigned++; - } - else - { - if (!(flags & SUPPRESS)) - mbp = va_arg(ap, char *); - memset ((_PTR) &mbs, '\0', sizeof (mbstate_t)); - while ((wi = _fgetwc_r (rptr, fp)) != WEOF - && width != 0 && !iswspace (wi)) - { - if (width >= MB_CUR_MAX && !(flags & SUPPRESS)) - { - nconv = wcrtomb(mbp, wi, &mbs); - if (nconv == (size_t)-1) - goto input_failure; - } - else - { - nconv = wcrtomb(mbbuf, wi, &mbs); - if (nconv == (size_t)-1) - goto input_failure; - if (nconv > width) - break; - if (!(flags & SUPPRESS)) - memcpy(mbp, mbbuf, nconv); - } - if (!(flags & SUPPRESS)) - mbp += nconv; - width -= nconv; - nread++; - } - if (wi != WEOF) - _ungetwc_r (rptr, wi, fp); - if (!(flags & SUPPRESS)) - { - *mbp = 0; - nassigned++; - } - } - continue; - - case CT_INT: - { - /* scan an integer as if by wcstol/wcstoul */ - if (width == 0 || width > sizeof (buf) / sizeof (*buf) - 1) - width = sizeof(buf) / sizeof (*buf) - 1; - flags |= SIGNOK | NDIGITS | NZDIGITS; - for (p = buf; width; width--) - { - c = _fgetwc_r (rptr, fp); - /* - * Switch on the character; `goto ok' if we - * accept it as a part of number. - */ - switch (c) - { - /* - * The digit 0 is always legal, but is special. - * For %i conversions, if no digits (zero or nonzero) - * have been scanned (only signs), we will have base==0. - * In that case, we should set it to 8 and enable 0x - * prefixing. Also, if we have not scanned zero digits - * before this, do not turn off prefixing (someone else - * will turn it off if we have scanned any nonzero digits). - */ - case L'0': - if (base == 0) - { - base = 8; - flags |= PFXOK; - } - if (flags & NZDIGITS) - flags &= ~(SIGNOK | NZDIGITS | NDIGITS); - else - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* 1 through 7 always legal */ - case L'1': - case L'2': - case L'3': - case L'4': - case L'5': - case L'6': - case L'7': - base = basefix[base]; - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* digits 8 and 9 ok iff decimal or hex */ - case L'8': - case L'9': - base = basefix[base]; - if (base <= 8) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* letters ok iff hex */ - case L'A': - case L'B': - case L'C': - case L'D': - case L'E': - case L'F': - case L'a': - case L'b': - case L'c': - case L'd': - case L'e': - case L'f': - /* no need to fix base here */ - if (base <= 10) - break; /* not legal here */ - flags &= ~(SIGNOK | PFXOK | NDIGITS); - goto ok; - - /* sign ok only as first character */ - case L'+': - case L'-': - if (flags & SIGNOK) - { - flags &= ~SIGNOK; - flags |= HAVESIGN; - goto ok; - } - break; - - /* x ok iff flag still set & single 0 seen */ - case L'x': - case L'X': - if ((flags & PFXOK) && p == buf + 1 + !!(flags & HAVESIGN)) - { - base = 16;/* if %i */ - flags &= ~PFXOK; - goto ok; - } - break; - } - - /* - * If we got here, c is not a legal character - * for a number. Stop accumulating digits. - */ - if (c != WEOF) - _ungetwc_r (rptr, c, fp); - break; - ok: - /* - * c is legal: store it and look at the next. - */ - *p++ = (wchar_t) c; - } - /* - * If we had only a sign, it is no good; push back the sign. - * If the number ends in `x', it was [sign] '0' 'x', so push back - * the x and treat it as [sign] '0'. - * Use of ungetc here and below assumes ASCII encoding; we are only - * pushing back 7-bit characters, so casting to unsigned char is - * not necessary. - */ - if (flags & NDIGITS) - { - if (p > buf) - _ungetwc_r (rptr, *--p, fp); /* [-+xX] */ - goto match_failure; - } - c = p[-1]; - if (c == L'x' || c == L'X') - { - --p; - _ungetwc_r (rptr, c, fp); - } - if ((flags & SUPPRESS) == 0) - { - unsigned long res; - - *p = 0; - res = (*ccfn) (rptr, buf, (wchar_t **) NULL, base); - if (flags & POINTER) - { - void **vp = GET_ARG (N, ap, void **); -#ifndef _NO_LONGLONG - if (sizeof (uintptr_t) > sizeof (unsigned long)) - { - unsigned long long resll; - resll = _wcstoull_r (rptr, buf, (wchar_t **) NULL, base); - *vp = (void *) (uintptr_t) resll; - } - else -#endif /* !_NO_LONGLONG */ - *vp = (void *) (uintptr_t) res; - } -#ifdef _WANT_IO_C99_FORMATS - else if (flags & CHAR) - { - cp = GET_ARG (N, ap, char *); - *cp = res; - } -#endif - else if (flags & SHORT) - { - sp = GET_ARG (N, ap, short *); - *sp = res; - } - else if (flags & LONG) - { - lp = GET_ARG (N, ap, long *); - *lp = res; - } -#ifndef _NO_LONGLONG - else if (flags & LONGDBL) - { - unsigned long long resll; - if (ccfn == _wcstoul_r) - resll = _wcstoull_r (rptr, buf, (wchar_t **) NULL, base); - else - resll = _wcstoll_r (rptr, buf, (wchar_t **) NULL, base); - llp = GET_ARG (N, ap, long long*); - *llp = resll; - } -#endif - else - { - ip = GET_ARG (N, ap, int *); - *ip = res; - } - nassigned++; - } - nread += p - buf; - break; - } -#ifdef FLOATING_POINT - case CT_FLOAT: - { - /* scan a floating point number as if by wcstod */ - /* This code used to assume that the number of digits is reasonable. - However, ANSI / ISO C makes no such stipulation; we have to get - exact results even when there is an unreasonable amount of - leading zeroes. */ - long leading_zeroes = 0; - long zeroes, exp_adjust; - wchar_t *exp_start = NULL; - unsigned width_left = 0; - char nancount = 0; - char infcount = 0; -#ifdef hardway - if (width == 0 || width > sizeof (buf) - 1) -#else - /* size_t is unsigned, hence this optimisation */ - if (width - 1 > sizeof (buf) - 2) -#endif - { - width_left = width - (sizeof (buf) - 1); - width = sizeof (buf) - 1; - } - flags |= SIGNOK | NDIGITS | DPTOK | EXPOK; - zeroes = 0; - exp_adjust = 0; - for (p = buf; width; ) - { - c = _fgetwc_r (rptr, fp); - /* - * This code mimicks the integer conversion - * code, but is much simpler. - */ - switch (c) - { - case L'0': - if (flags & NDIGITS) - { - flags &= ~SIGNOK; - zeroes++; - if (width_left) - { - width_left--; - width++; - } - goto fskip; - } - /* Fall through. */ - case L'1': - case L'2': - case L'3': - case L'4': - case L'5': - case L'6': - case L'7': - case L'8': - case L'9': - if (nancount + infcount == 0) - { - flags &= ~(SIGNOK | NDIGITS); - goto fok; - } - break; - - case L'+': - case L'-': - if (flags & SIGNOK) - { - flags &= ~SIGNOK; - goto fok; - } - break; - case L'n': - case L'N': - if (nancount == 0 && zeroes == 0 - && (flags & (NDIGITS | DPTOK | EXPOK)) == - (NDIGITS | DPTOK | EXPOK)) - { - flags &= ~(SIGNOK | DPTOK | EXPOK | NDIGITS); - nancount = 1; - goto fok; - } - if (nancount == 2) - { - nancount = 3; - goto fok; - } - if (infcount == 1 || infcount == 4) - { - infcount++; - goto fok; - } - break; - case L'a': - case L'A': - if (nancount == 1) - { - nancount = 2; - goto fok; - } - break; - case L'i': - if (infcount == 0 && zeroes == 0 - && (flags & (NDIGITS | DPTOK | EXPOK)) == - (NDIGITS | DPTOK | EXPOK)) - { - flags &= ~(SIGNOK | DPTOK | EXPOK | NDIGITS); - infcount = 1; - goto fok; - } - if (infcount == 3 || infcount == 5) - { - infcount++; - goto fok; - } - break; - case L'f': - case L'F': - if (infcount == 2) - { - infcount = 3; - goto fok; - } - break; - case L't': - case L'T': - if (infcount == 6) - { - infcount = 7; - goto fok; - } - break; - case L'y': - case L'Y': - if (infcount == 7) - { - infcount = 8; - goto fok; - } - break; - case L'.': - if (flags & DPTOK) - { - flags &= ~(SIGNOK | DPTOK); - leading_zeroes = zeroes; - goto fok; - } - break; - case L'e': - case L'E': - /* no exponent without some digits */ - if ((flags & (NDIGITS | EXPOK)) == EXPOK - || ((flags & EXPOK) && zeroes)) - { - if (! (flags & DPTOK)) - { - exp_adjust = zeroes - leading_zeroes; - exp_start = p; - } - flags = - (flags & ~(EXPOK | DPTOK)) | - SIGNOK | NDIGITS; - zeroes = 0; - goto fok; - } - break; - } - if (c != WEOF) - _ungetwc_r (rptr, c, fp); - break; - fok: - *p++ = c; - fskip: - width--; - ++nread; - } - if (zeroes) - flags &= ~NDIGITS; - /* We may have a 'N' or possibly even [sign] 'N' 'a' as the - start of 'NaN', only to run out of chars before it was - complete (or having encountered a non-matching char). So - check here if we have an outstanding nancount, and if so - put back the chars we did swallow and treat as a failed - match. - - FIXME - we still don't handle NAN([0xdigits]). */ - if (nancount - 1U < 2U) /* nancount && nancount < 3 */ - { - /* Newlib's ungetc works even if we called __srefill in - the middle of a partial parse, but POSIX does not - guarantee that in all implementations of ungetc. */ - while (p > buf) - { - _ungetwc_r (rptr, *--p, fp); /* [-+nNaA] */ - --nread; - } - goto match_failure; - } - /* Likewise for 'inf' and 'infinity'. But be careful that - 'infinite' consumes only 3 characters, leaving the stream - at the second 'i'. */ - if (infcount - 1U < 7U) /* infcount && infcount < 8 */ - { - if (infcount >= 3) /* valid 'inf', but short of 'infinity' */ - while (infcount-- > 3) - { - _ungetwc_r (rptr, *--p, fp); /* [iInNtT] */ - --nread; - } - else - { - while (p > buf) - { - _ungetwc_r (rptr, *--p, fp); /* [-+iInN] */ - --nread; - } - goto match_failure; - } - } - /* - * If no digits, might be missing exponent digits - * (just give back the exponent) or might be missing - * regular digits, but had sign and/or decimal point. - */ - if (flags & NDIGITS) - { - if (flags & EXPOK) - { - /* no digits at all */ - while (p > buf) - { - _ungetwc_r (rptr, *--p, fp); /* [-+.] */ - --nread; - } - goto match_failure; - } - /* just a bad exponent (e and maybe sign) */ - c = *--p; - --nread; - if (c != L'e' && c != L'E') - { - _ungetwc_r (rptr, c, fp); /* [-+] */ - c = *--p; - --nread; - } - _ungetwc_r (rptr, c, fp); /* [eE] */ - } - if ((flags & SUPPRESS) == 0) - { - double res = 0; -#ifdef _NO_LONGDBL -#define QUAD_RES res; -#else /* !_NO_LONG_DBL */ - long double qres = 0; -#define QUAD_RES qres; -#endif /* !_NO_LONG_DBL */ - long new_exp = 0; - - *p = 0; - if ((flags & (DPTOK | EXPOK)) == EXPOK) - { - exp_adjust = zeroes - leading_zeroes; - new_exp = -exp_adjust; - exp_start = p; - } - else if (exp_adjust) - new_exp = _wcstol_r (rptr, (exp_start + 1), NULL, 10) - exp_adjust; - if (exp_adjust) - { - - /* If there might not be enough space for the new exponent, - truncate some trailing digits to make room. */ - if (exp_start >= buf + sizeof (buf) - MAX_LONG_LEN) - exp_start = buf + sizeof (buf) - MAX_LONG_LEN - 1; - swprintf (exp_start, MAX_LONG_LEN, L"e%ld", new_exp); - } - - /* FIXME: We don't have wcstold yet. */ -#if 0//ndef _NO_LONGDBL /* !_NO_LONGDBL */ - if (flags & LONGDBL) - qres = _wcstold_r (rptr, buf, NULL); - else -#endif - res = _wcstod_r (rptr, buf, NULL); - - if (flags & LONG) - { - dp = GET_ARG (N, ap, double *); - *dp = res; - } - else if (flags & LONGDBL) - { - ldp = GET_ARG (N, ap, _LONG_DOUBLE *); - *ldp = QUAD_RES; - } - else - { - flp = GET_ARG (N, ap, float *); - if (isnan (res)) - *flp = nanf (NULL); - else - *flp = res; - } - nassigned++; - } - break; - } -#endif /* FLOATING_POINT */ - } - } -input_failure: - /* On read failure, return EOF failure regardless of matches; errno - should have been set prior to here. On EOF failure (including - invalid format string), return EOF if no matches yet, else number - of matches made prior to failure. */ - _funlockfile (fp); - return nassigned && !(fp->_flags & __SERR) ? nassigned : EOF; -match_failure: -all_done: - /* Return number of matches, which can be 0 on match failure. */ - _funlockfile (fp); - return nassigned; -} - -#ifndef _NO_POS_ARGS -/* Process all intermediate arguments. Fortunately, with wscanf, all - intermediate arguments are sizeof(void*), so we don't need to scan - ahead in the format string. */ -static void * -get_arg (int n, va_list *ap, int *numargs_p, void **args) -{ - int numargs = *numargs_p; - while (n >= numargs) - args[numargs++] = va_arg (*ap, void *); - *numargs_p = numargs; - return args[n]; -} -#endif /* !_NO_POS_ARGS */ diff --git a/newlib/libc/stdio/viprintf.c b/newlib/libc/stdio/viprintf.c deleted file mode 100644 index 3717f3a08..000000000 --- a/newlib/libc/stdio/viprintf.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<viprintf>>, <<vfiprintf>>, <<vsiprintf>>, <<vsniprintf>>, <<vasiprintf>>, <<vasniprintf>>---format argument list (integer only) - -INDEX - viprintf -INDEX - _viprintf_r -INDEX - vfiprintf -INDEX - _vfiprintf_r -INDEX - vsiprintf -INDEX - _vsiprintf_r -INDEX - vsniprintf -INDEX - _vsniprintf_r -INDEX - vasiprintf -INDEX - _vasiprintf_r -INDEX - vasniprintf -INDEX - _vasniprintf_r - -ANSI_SYNOPSIS - #include <stdio.h> - #include <stdarg.h> - int viprintf(const char *<[fmt]>, va_list <[list]>); - int vfiprintf(FILE *<[fp]>, const char *<[fmt]>, va_list <[list]>); - int vsiprintf(char *<[str]>, const char *<[fmt]>, va_list <[list]>); - int vsniprintf(char *<[str]>, size_t <[size]>, const char *<[fmt]>, - va_list <[list]>); - int vasiprintf(char **<[strp]>, const char *<[fmt]>, va_list <[list]>); - char *vasniprintf(char *<[str]>, size_t *<[size]>, const char *<[fmt]>, - va_list <[list]>); - - int _viprintf_r(struct _reent *<[reent]>, const char *<[fmt]>, - va_list <[list]>); - int _vfiprintf_r(struct _reent *<[reent]>, FILE *<[fp]>, - const char *<[fmt]>, va_list <[list]>); - int _vsiprintf_r(struct _reent *<[reent]>, char *<[str]>, - const char *<[fmt]>, va_list <[list]>); - int _vsniprintf_r(struct _reent *<[reent]>, char *<[str]>, - size_t <[size]>, const char *<[fmt]>, va_list <[list]>); - int _vasiprintf_r(struct _reent *<[reent]>, char **<[str]>, - const char *<[fmt]>, va_list <[list]>); - char *_vasniprintf_r(struct _reent *<[reent]>, char *<[str]>, - size_t *<[size]>, const char *<[fmt]>, va_list <[list]>); - -DESCRIPTION -<<viprintf>>, <<vfiprintf>>, <<vasiprintf>>, <<vsiprintf>>, -<<vsniprintf>>, and <<vasniprintf>> are (respectively) variants of -<<iprintf>>, <<fiprintf>>, <<asiprintf>>, <<siprintf>>, <<sniprintf>>, -and <<asniprintf>>. They differ only in allowing their caller to pass -the variable argument list as a <<va_list>> object (initialized by -<<va_start>>) rather than directly accepting a variable number of -arguments. The caller is responsible for calling <<va_end>>. - -<<_viprintf_r>>, <<_vfiprintf_r>>, <<_vasiprintf_r>>, -<<_vsiprintf_r>>, <<_vsniprintf_r>>, and <<_vasniprintf_r>> are -reentrant versions of the above. - -RETURNS -The return values are consistent with the corresponding functions: - -PORTABILITY -All of these functions are newlib extensions. - -Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, -<<lseek>>, <<read>>, <<sbrk>>, <<write>>. -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include "local.h" - -#ifndef _REENT_ONLY - -int -_DEFUN(viprintf, (fmt, ap), - _CONST char *fmt _AND - va_list ap) -{ - _REENT_SMALL_CHECK_INIT (_REENT); - return _vfiprintf_r (_REENT, _stdout_r (_REENT), fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_viprintf_r, (ptr, fmt, ap), - struct _reent *ptr _AND - _CONST char *fmt _AND - va_list ap) -{ - _REENT_SMALL_CHECK_INIT (ptr); - return _vfiprintf_r (ptr, _stdout_r (ptr), fmt, ap); -} diff --git a/newlib/libc/stdio/viscanf.c b/newlib/libc/stdio/viscanf.c deleted file mode 100644 index a60c32ff0..000000000 --- a/newlib/libc/stdio/viscanf.c +++ /dev/null @@ -1,145 +0,0 @@ -/*- - * Code created by modifying iscanf.c which has following copyright. - * - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -FUNCTION -<<viscanf>>, <<vfiscanf>>, <<vsiscanf>>---format argument list - -INDEX - viscanf -INDEX - _viscanf_r -INDEX - vfiscanf -INDEX - _vfiscanf_r -INDEX - vsiscanf -INDEX - _vsiscanf_r - -ANSI_SYNOPSIS - #include <stdio.h> - #include <stdarg.h> - int viscanf(const char *<[fmt]>, va_list <[list]>); - int vfiscanf(FILE *<[fp]>, const char *<[fmt]>, va_list <[list]>); - int vsiscanf(const char *<[str]>, const char *<[fmt]>, va_list <[list]>); - - int _viscanf_r(struct _reent *<[reent]>, const char *<[fmt]>, - va_list <[list]>); - int _vfiscanf_r(struct _reent *<[reent]>, FILE *<[fp]>, const char *<[fmt]>, - va_list <[list]>); - int _vsiscanf_r(struct _reent *<[reent]>, const char *<[str]>, - const char *<[fmt]>, va_list <[list]>); - -TRAD_SYNOPSIS - #include <stdio.h> - #include <varargs.h> - int viscanf( <[fmt]>, <[ist]>) - char *<[fmt]>; - va_list <[list]>; - - int vfiscanf( <[fp]>, <[fmt]>, <[list]>) - FILE *<[fp]>; - char *<[fmt]>; - va_list <[list]>; - - int vsiscanf( <[str]>, <[fmt]>, <[list]>) - char *<[str]>; - char *<[fmt]>; - va_list <[list]>; - - int _viscanf_r( <[reent]>, <[fmt]>, <[ist]>) - struct _reent *<[reent]>; - char *<[fmt]>; - va_list <[list]>; - - int _vfiscanf_r( <[reent]>, <[fp]>, <[fmt]>, <[list]>) - struct _reent *<[reent]>; - FILE *<[fp]>; - char *<[fmt]>; - va_list <[list]>; - - int _vsiscanf_r( <[reent]>, <[str]>, <[fmt]>, <[list]>) - struct _reent *<[reent]>; - char *<[str]>; - char *<[fmt]>; - va_list <[list]>; - -DESCRIPTION -<<viscanf>>, <<vfiscanf>>, and <<vsiscanf>> are (respectively) variants -of <<iscanf>>, <<fiscanf>>, and <<siscanf>>. They differ only in -allowing their caller to pass the variable argument list as a -<<va_list>> object (initialized by <<va_start>>) rather than -directly accepting a variable number of arguments. - -RETURNS -The return values are consistent with the corresponding functions: -<<viscanf>> returns the number of input fields successfully scanned, -converted, and stored; the return value does not include scanned -fields which were not stored. - -If <<viscanf>> attempts to read at end-of-file, the return value -is <<EOF>>. - -If no fields were stored, the return value is <<0>>. - -The routines <<_viscanf_r>>, <<_vfiscanf_f>>, and <<_vsiscanf_r>> are -reentrant versions which take an additional first parameter which points to the -reentrancy structure. - -PORTABILITY -These are newlib extensions. - -Supporting OS subroutines required: -*/ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include "local.h" - -#ifndef _REENT_ONLY - -int -_DEFUN(viscanf, (fmt, ap), - _CONST char *fmt _AND - va_list ap) -{ - _REENT_SMALL_CHECK_INIT (_REENT); - return __svfiscanf_r (_REENT, _stdin_r (_REENT), fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_viscanf_r, (ptr, fmt, ap), - struct _reent *ptr _AND - _CONST char *fmt _AND - va_list ap) -{ - _REENT_SMALL_CHECK_INIT (ptr); - return __svfiscanf_r (ptr, _stdin_r (ptr), fmt, ap); -} - diff --git a/newlib/libc/stdio/vprintf.c b/newlib/libc/stdio/vprintf.c deleted file mode 100644 index 69edc87ae..000000000 --- a/newlib/libc/stdio/vprintf.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* doc in vfprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include "local.h" - -#ifndef _REENT_ONLY - -int -_DEFUN(vprintf, (fmt, ap), - _CONST char *fmt _AND - va_list ap) -{ - _REENT_SMALL_CHECK_INIT (_REENT); - return _vfprintf_r (_REENT, _stdout_r (_REENT), fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_vprintf_r, (ptr, fmt, ap), - struct _reent *ptr _AND - _CONST char *fmt _AND - va_list ap) -{ - _REENT_SMALL_CHECK_INIT (ptr); - return _vfprintf_r (ptr, _stdout_r (ptr), fmt, ap); -} diff --git a/newlib/libc/stdio/vscanf.c b/newlib/libc/stdio/vscanf.c deleted file mode 100644 index e559b77a8..000000000 --- a/newlib/libc/stdio/vscanf.c +++ /dev/null @@ -1,52 +0,0 @@ -/*- - * Code created by modifying scanf.c which has following copyright. - * - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include "local.h" - -#ifndef _REENT_ONLY - -int -_DEFUN(vscanf, (fmt, ap), - _CONST char *fmt _AND - va_list ap) -{ - _REENT_SMALL_CHECK_INIT (_REENT); - return __svfscanf_r (_REENT, _stdin_r (_REENT), fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_vscanf_r, (ptr, fmt, ap), - struct _reent *ptr _AND - _CONST char *fmt _AND - va_list ap) -{ - _REENT_SMALL_CHECK_INIT (ptr); - return __svfscanf_r (ptr, _stdin_r (ptr), fmt, ap); -} - diff --git a/newlib/libc/stdio/vsiprintf.c b/newlib/libc/stdio/vsiprintf.c deleted file mode 100644 index 150b4e7d0..000000000 --- a/newlib/libc/stdio/vsiprintf.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* doc in viprintf.c */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <limits.h> -#include <stdarg.h> - -#include "local.h" - -#ifndef _REENT_ONLY - -int -_DEFUN(vsiprintf, (str, fmt, ap), - char *str _AND - const char *fmt _AND - va_list ap) -{ - return _vsiprintf_r (_REENT, str, fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_vsiprintf_r, (ptr, str, fmt, ap), - struct _reent *ptr _AND - char *str _AND - const char *fmt _AND - va_list ap) -{ - int ret; - FILE f; - - f._flags = __SWR | __SSTR; - 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); - *f._p = 0; - return ret; -} diff --git a/newlib/libc/stdio/vsiscanf.c b/newlib/libc/stdio/vsiscanf.c deleted file mode 100644 index 01295995e..000000000 --- a/newlib/libc/stdio/vsiscanf.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Code created by modifying iscanf.c which has following copyright. - * - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <string.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include "local.h" - -/* - * vsiscanf - */ - -#ifndef _REENT_ONLY - -int -_DEFUN(vsiscanf, (str, fmt, ap), - _CONST char *str _AND - _CONST char *fmt _AND - va_list ap) -{ - return _vsiscanf_r (_REENT, str, fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_vsiscanf_r, (ptr, str, fmt, ap), - struct _reent *ptr _AND - _CONST char *str _AND - _CONST char *fmt _AND - va_list ap) -{ - FILE f; - - f._flags = __SRD | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._r = strlen (str); - f._read = __seofread; - f._ub._base = NULL; - f._lb._base = NULL; - f._file = -1; /* No file. */ - return __ssvfiscanf_r (ptr, &f, fmt, ap); -} diff --git a/newlib/libc/stdio/vsniprintf.c b/newlib/libc/stdio/vsniprintf.c deleted file mode 100644 index c4305c1a9..000000000 --- a/newlib/libc/stdio/vsniprintf.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 1990, 2007 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* doc in viprintf.c */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <limits.h> -#include <stdarg.h> -#include <errno.h> - -#include "local.h" - -#ifndef _REENT_ONLY - -int -_DEFUN(vsniprintf, (str, size, fmt, ap), - char *str _AND - size_t size _AND - const char *fmt _AND - va_list ap) -{ - return _vsniprintf_r (_REENT, str, size, fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_vsniprintf_r, (ptr, str, size, fmt, ap), - struct _reent *ptr _AND - char *str _AND - size_t size _AND - const char *fmt _AND - va_list ap) -{ - int ret; - FILE f; - - if (size > INT_MAX) - { - ptr->_errno = EOVERFLOW; - return EOF; - } - f._flags = __SWR | __SSTR; - 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); - if (ret < EOF) - ptr->_errno = EOVERFLOW; - if (size > 0) - *f._p = 0; - return ret; -} diff --git a/newlib/libc/stdio/vsnprintf.c b/newlib/libc/stdio/vsnprintf.c deleted file mode 100644 index 58106b676..000000000 --- a/newlib/libc/stdio/vsnprintf.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* doc in vfprintf.c */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <limits.h> -#include <stdarg.h> -#include <errno.h> - -#include "local.h" - -#ifndef _REENT_ONLY - -int -_DEFUN(vsnprintf, (str, size, fmt, ap), - char *str _AND - size_t size _AND - const char *fmt _AND - va_list ap) -{ - return _vsnprintf_r (_REENT, str, size, fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_vsnprintf_r, (ptr, str, size, fmt, ap), - struct _reent *ptr _AND - char *str _AND - size_t size _AND - const char *fmt _AND - va_list ap) -{ - int ret; - FILE f; - - if (size > INT_MAX) - { - ptr->_errno = EOVERFLOW; - return EOF; - } - f._flags = __SWR | __SSTR; - 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); - if (ret < EOF) - ptr->_errno = EOVERFLOW; - if (size > 0) - *f._p = 0; - return ret; -} diff --git a/newlib/libc/stdio/vsprintf.c b/newlib/libc/stdio/vsprintf.c deleted file mode 100644 index 9ab0c73a1..000000000 --- a/newlib/libc/stdio/vsprintf.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* doc in vfprintf.c */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <limits.h> -#include <stdarg.h> - -#include "local.h" - -#ifndef _REENT_ONLY - -int -_DEFUN(vsprintf, (str, fmt, ap), - char *str _AND - const char *fmt _AND - va_list ap) -{ - return _vsprintf_r (_REENT, str, fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_vsprintf_r, (ptr, str, fmt, ap), - struct _reent *ptr _AND - char *str _AND - const char *fmt _AND - va_list ap) -{ - int ret; - FILE f; - - f._flags = __SWR | __SSTR; - 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); - *f._p = 0; - return ret; -} diff --git a/newlib/libc/stdio/vsscanf.c b/newlib/libc/stdio/vsscanf.c deleted file mode 100644 index 2b9aeaf5b..000000000 --- a/newlib/libc/stdio/vsscanf.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Code created by modifying scanf.c which has following copyright. - * - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <string.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include "local.h" - -/* - * vsscanf - */ - -#ifndef _REENT_ONLY - -int -_DEFUN(vsscanf, (str, fmt, ap), - _CONST char *str _AND - _CONST char *fmt _AND - va_list ap) -{ - return _vsscanf_r (_REENT, str, fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_vsscanf_r, (ptr, str, fmt, ap), - struct _reent *ptr _AND - _CONST char *str _AND - _CONST char *fmt _AND - va_list ap) -{ - FILE f; - - f._flags = __SRD | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._r = strlen (str); - f._read = __seofread; - f._ub._base = NULL; - f._lb._base = NULL; - f._file = -1; /* No file. */ - return __ssvfscanf_r (ptr, &f, fmt, ap); -} diff --git a/newlib/libc/stdio/vswprintf.c b/newlib/libc/stdio/vswprintf.c deleted file mode 100644 index 2d9096c15..000000000 --- a/newlib/libc/stdio/vswprintf.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* doc in vfwprintf.c */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <wchar.h> -#include <limits.h> -#include <stdarg.h> -#include <errno.h> - -#include "local.h" - -int -_DEFUN(_vswprintf_r, (ptr, str, size, fmt, ap), - struct _reent *ptr _AND - wchar_t *str _AND - size_t size _AND - const wchar_t *fmt _AND - va_list ap) -{ - int ret; - FILE f; - - if (size > INT_MAX / sizeof (wchar_t)) - { - ptr->_errno = EOVERFLOW; /* POSIX extension */ - return EOF; - } - f._flags = __SWR | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._w = (size > 0 ? (size - 1) * sizeof (wchar_t) : 0); - f._file = -1; /* No file. */ - ret = _svfwprintf_r (ptr, &f, fmt, ap); - /* _svfwprintf_r() does not put in a terminating NUL, so add one if - * appropriate, which is whenever size is > 0. _svfwprintf_r() stops - * after n-1, so always just put at the end. */ - if (size > 0) { - *(wchar_t *)f._p = L'\0'; /* terminate the string */ - } - if(ret >= size) { - /* _svfwprintf_r() returns how many wide characters it would have printed - * if there were enough space. Return an error if too big to fit in str, - * unlike snprintf, which returns the size needed. */ - ptr->_errno = EOVERFLOW; /* POSIX extension */ - ret = -1; - } - return ret; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(vswprintf, (str, size, fmt, ap), - wchar_t *str _AND - size_t size _AND - const wchar_t *fmt _AND - va_list ap) -{ - return _vswprintf_r (_REENT, str, size, fmt, ap); -} - -#endif /* !_REENT_ONLY */ diff --git a/newlib/libc/stdio/vswscanf.c b/newlib/libc/stdio/vswscanf.c deleted file mode 100644 index 08108173a..000000000 --- a/newlib/libc/stdio/vswscanf.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Code created by modifying scanf.c which has following copyright. - * - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <wchar.h> -#include <string.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include "local.h" - -/* - * vsscanf - */ - -#ifndef _REENT_ONLY - -int -vswscanf (_CONST wchar_t *str, _CONST wchar_t *fmt, va_list ap) -{ - return _vswscanf_r (_REENT, str, fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_vswscanf_r (struct _reent *ptr, _CONST wchar_t *str, _CONST wchar_t *fmt, - va_list ap) -{ - FILE f; - - f._flags = __SRD | __SSTR; - f._bf._base = f._p = (unsigned char *) str; - f._bf._size = f._r = wcslen (str) * sizeof (wchar_t); - f._read = __seofread; - f._ub._base = NULL; - f._lb._base = NULL; - f._file = -1; /* No file. */ - return __ssvfwscanf_r (ptr, &f, fmt, ap); -} diff --git a/newlib/libc/stdio/vwprintf.c b/newlib/libc/stdio/vwprintf.c deleted file mode 100644 index ce28fdabb..000000000 --- a/newlib/libc/stdio/vwprintf.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* doc in vfwprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <wchar.h> -#include <stdarg.h> -#include "local.h" - -#ifndef _REENT_ONLY - -int -_DEFUN(vwprintf, (fmt, ap), - _CONST wchar_t *fmt _AND - va_list ap) -{ - _REENT_SMALL_CHECK_INIT (_REENT); - return _vfwprintf_r (_REENT, _stdout_r (_REENT), fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_DEFUN(_vwprintf_r, (ptr, fmt, ap), - struct _reent *ptr _AND - _CONST wchar_t *fmt _AND - va_list ap) -{ - _REENT_SMALL_CHECK_INIT (ptr); - return _vfwprintf_r (ptr, _stdout_r (ptr), fmt, ap); -} diff --git a/newlib/libc/stdio/vwscanf.c b/newlib/libc/stdio/vwscanf.c deleted file mode 100644 index 3c60fbb73..000000000 --- a/newlib/libc/stdio/vwscanf.c +++ /dev/null @@ -1,48 +0,0 @@ -/*- - * Code created by modifying scanf.c which has following copyright. - * - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <wchar.h> -#ifdef _HAVE_STDC -#include <stdarg.h> -#else -#include <varargs.h> -#endif -#include "local.h" - -#ifndef _REENT_ONLY - -int -vwscanf (_CONST wchar_t *fmt, va_list ap) -{ - _REENT_SMALL_CHECK_INIT (_REENT); - return __svfwscanf_r (_REENT, _stdin_r (_REENT), fmt, ap); -} - -#endif /* !_REENT_ONLY */ - -int -_vwscanf_r (struct _reent *ptr, _CONST wchar_t *fmt, va_list ap) -{ - _REENT_SMALL_CHECK_INIT (ptr); - return __svfwscanf_r (ptr, _stdin_r (ptr), fmt, ap); -} - diff --git a/newlib/libc/stdio/wbuf.c b/newlib/libc/stdio/wbuf.c deleted file mode 100644 index f9197ea9e..000000000 --- a/newlib/libc/stdio/wbuf.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* No user fns here. Pesch 15apr92. */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "%W% (Berkeley) %G%"; -#endif /* LIBC_SCCS and not lint */ - -#include <_ansi.h> -#include <stdio.h> -#include <errno.h> -#include "local.h" -#include "fvwrite.h" - -/* - * Write the given character into the (probably full) buffer for - * the given file. Flush the buffer out if it is or becomes full, - * or if c=='\n' and the file is line buffered. - */ - -int -_DEFUN(__swbuf_r, (ptr, c, fp), - struct _reent *ptr _AND - register int c _AND - register FILE *fp) -{ - register int n; - - /* Ensure stdio has been initialized. */ - - CHECK_INIT (ptr, fp); - - /* - * In case we cannot write, or longjmp takes us out early, - * make sure _w is 0 (if fully- or un-buffered) or -_bf._size - * (if line buffered) so that we will get called again. - * If we did not do this, a sufficient number of putc() - * calls might wrap _w from negative to positive. - */ - - fp->_w = fp->_lbfsize; - if (cantwrite (ptr, fp)) - return EOF; - c = (unsigned char) c; - - ORIENT (fp, -1); - - /* - * If it is completely full, flush it out. Then, in any case, - * stuff c into the buffer. If this causes the buffer to fill - * completely, or if c is '\n' and the file is line buffered, - * flush it (perhaps a second time). The second flush will always - * happen on unbuffered streams, where _bf._size==1; fflush() - * guarantees that putc() will always call wbuf() by setting _w - * to 0, so we need not do anything else. - */ - - n = fp->_p - fp->_bf._base; - if (n >= fp->_bf._size) - { - if (_fflush_r (ptr, fp)) - return EOF; - n = 0; - } - fp->_w--; - *fp->_p++ = c; - if (++n == fp->_bf._size || (fp->_flags & __SLBF && c == '\n')) - if (_fflush_r (ptr, fp)) - return EOF; - return c; -} - -/* This function isn't any longer declared in stdio.h, but it's - required for backward compatibility with applications built against - earlier dynamically built newlib libraries. */ -int -_DEFUN(__swbuf, (c, fp), - register int c _AND - register FILE *fp) -{ - return __swbuf_r (_REENT, c, fp); -} diff --git a/newlib/libc/stdio/wprintf.c b/newlib/libc/stdio/wprintf.c deleted file mode 100644 index 69dea53c6..000000000 --- a/newlib/libc/stdio/wprintf.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ -/* doc in swprintf.c */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <wchar.h> -#include <stdarg.h> -#include "local.h" - -int -_DEFUN(_wprintf_r, (ptr, fmt), - struct _reent *ptr _AND - const wchar_t *fmt _DOTS) -{ - int ret; - va_list ap; - - _REENT_SMALL_CHECK_INIT (ptr); - va_start (ap, fmt); - ret = _vfwprintf_r (ptr, _stdout_r (ptr), fmt, ap); - va_end (ap); - return ret; -} - -#ifndef _REENT_ONLY - -int -_DEFUN(wprintf, (fmt), - const wchar_t *fmt _DOTS) -{ - int ret; - va_list ap; - struct _reent *ptr = _REENT; - - _REENT_SMALL_CHECK_INIT (ptr); - va_start (ap, fmt); - ret = _vfwprintf_r (ptr, _stdout_r (ptr), fmt, ap); - va_end (ap); - return ret; -} - -#endif /* ! _REENT_ONLY */ diff --git a/newlib/libc/stdio/wscanf.c b/newlib/libc/stdio/wscanf.c deleted file mode 100644 index abe8dc07a..000000000 --- a/newlib/libc/stdio/wscanf.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include <reent.h> -#include <stdio.h> -#include <wchar.h> -#include <stdarg.h> -#include "local.h" - -#ifndef _REENT_ONLY - -int -wscanf(_CONST wchar_t *fmt, ...) -{ - int ret; - va_list ap; - - _REENT_SMALL_CHECK_INIT (_REENT); - va_start (ap, fmt); - ret = _vfwscanf_r (_REENT, _stdin_r (_REENT), fmt, ap); - va_end (ap); - return ret; -} - -#endif /* !_REENT_ONLY */ - -int -_wscanf_r(struct _reent *ptr, _CONST wchar_t *fmt, ...) -{ - int ret; - va_list ap; - - _REENT_SMALL_CHECK_INIT (ptr); - va_start (ap, fmt); - ret = _vfwscanf_r (ptr, _stdin_r (ptr), fmt, ap); - va_end (ap); - return (ret); -} - diff --git a/newlib/libc/stdio/wsetup.c b/newlib/libc/stdio/wsetup.c deleted file mode 100644 index 08ae70f2c..000000000 --- a/newlib/libc/stdio/wsetup.c +++ /dev/null @@ -1,94 +0,0 @@ -/* No user fns here. Pesch 15apr92. */ - -/* - * Copyright (c) 1990, 2007 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include <_ansi.h> -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> -#include "local.h" - -/* - * Various output routines call wsetup to be sure it is safe to write, - * because either _flags does not include __SWR, or _buf is NULL. - * _wsetup returns 0 if OK to write, nonzero and set errno otherwise. - */ - -int -_DEFUN(__swsetup_r, (ptr, fp), - struct _reent *ptr _AND - register FILE * fp) -{ - /* Make sure stdio is set up. */ - - CHECK_INIT (_REENT, fp); - - /* - * If we are not writing, we had better be reading and writing. - */ - - if ((fp->_flags & __SWR) == 0) - { - if ((fp->_flags & __SRW) == 0) - { - ptr->_errno = EBADF; - fp->_flags |= __SERR; - return EOF; - } - if (fp->_flags & __SRD) - { - /* clobber any ungetc data */ - if (HASUB (fp)) - FREEUB (ptr, fp); - fp->_flags &= ~(__SRD | __SEOF); - fp->_r = 0; - fp->_p = fp->_bf._base; - } - fp->_flags |= __SWR; - } - - /* - * Make a buffer if necessary, then set _w. - * A string I/O file should not explicitly allocate a buffer - * unless asprintf is being used. - */ - if (fp->_bf._base == NULL - && (!(fp->_flags & __SSTR) || (fp->_flags & __SMBF))) - __smakebuf_r (ptr, fp); - - if (fp->_flags & __SLBF) - { - /* - * It is line buffered, so make _lbfsize be -_bufsize - * for the putc() macro. We will change _lbfsize back - * to 0 whenever we turn off __SWR. - */ - fp->_w = 0; - fp->_lbfsize = -fp->_bf._size; - } - else - fp->_w = fp->_flags & __SNBF ? 0 : fp->_bf._size; - - if (!fp->_bf._base && (fp->_flags & __SMBF)) - { - /* __smakebuf_r set errno, but not flag */ - fp->_flags |= __SERR; - return EOF; - } - return 0; -} |