aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-12-20 01:39:50 +0000
committerUlrich Drepper <drepper@redhat.com>1996-12-20 01:39:50 +0000
commit6d52618b15cbe25ed4822ac51321db292f28ccda (patch)
treebafef072c0f5cb67c09d7c1789888d4310ac568f
parent10dc2a90b7f86d9bc1be9d1b9305a781882f7ac5 (diff)
downloadglibc-6d52618b15cbe25ed4822ac51321db292f28ccda.tar
glibc-6d52618b15cbe25ed4822ac51321db292f28ccda.tar.gz
glibc-6d52618b15cbe25ed4822ac51321db292f28ccda.tar.bz2
glibc-6d52618b15cbe25ed4822ac51321db292f28ccda.zip
Update from main archive 961219cvs/libc-961220
Thu Dec 19 23:28:33 1996 Ulrich Drepper <drepper@cygnus.com> * resolv/resolv.h: Update from BIND 4.9.5-P1. * resolv/res_comp.c: Likewise. * resolv/res_debug.c: Likewise. * resolv/Banner: Update version number. Thu Dec 19 20:58:53 1996 Ulrich Drepper <drepper@cygnus.com> * elf/dlfcn.h: Add extern "C" wrapper. * io/utime.h: Don't define NULL since this isn't allowed in POSIX. * io/sys/stat.h: Declare `lstat' only if __USE_BSD || __USE_XOPEN_EXTENDED. * locale/locale.h: Define NULL. * math/math.c: Don't include <errno.h> to define math errors. * stdlib/stdlib.h: Likewise. * posix/unistd.h: Don't declare environ. * posix/sys/utsname.h (struct utsname): Declare member domainname as __domainname is !__USE_GNU. * signal/signal.h: Declare size_t only if __USE_BSD || __USE_XOPEN_EXTENDED. * stdio/stdio.h: Don't declare cuserid when __USE_POSIX, but instead when __USE_XOPEN. * string/string.h: Define strndup only if __USE_GNU. * sysdeps/unix/sysv/linux/clock.c: New file. * sysdeps/unix/sysv/linux/timebits.h: Define CLOCKS_PER_SEC as 1000000 per X/Open standard. * features.h: Add code to recognize _POSIX_C_SOURCE value 199309. Define __USE_POSIX199309. * posix/unistd.h: Declare fdatasync only if __USE_POSIX199309. * time/time.c: Declare nanosleep only if __USE_POSIX199309. Patches by Rüdiger Helsch <rh@unifix.de>. * locale/locale.h: Add declaration of newlocale and freelocale. * new-malloc/Makefile (distibute): Add mtrace.awk. (dist-routines): Add mcheck and mtrace. (install-lib, non-lib.a): Define as libmcheck.a. * new-malloc/malloc.h: Add declaration of __malloc_initialized. * new-malloc/mcheck.c: New file. * new-malloc/mcheck.h: New file. * new-malloc/mtrace.c: New file. * new-malloc/mtrace.awk: New file. * posix/unistd.h: Correct prototype for usleep. * sysdeps/unix/bsd/usleep.c: De-ANSI-declfy. Correct return type. * sysdeps/unix/sysv/linux/usleep.c: Real implementation based on nanosleep. * signal/signal.h: Change protoype of __sigpause to take two arguments. Remove prototype for sigpause. Add two different macros named sigpause selected when __USE_BSD or __USE_XOPEN are defined. This is necessary since the old BSD definition of theis function collides with the X/Open definition. * sysdeps/posix/sigpause.c: Change function definition to also fit X/Open definition. * sysdeps/libm-i387/e_exp.S: Make sure stack is empty when the function is left. * sysdeps/libm-i387/e_expl.S: Likewise. Patch by HJ Lu. 1996-12-17 Paul Eggert <eggert@twinsun.com> * many, many files: Spelling corrections. * catgets/catgetsinfo.h (mmapped): Renamed from mmaped (in struct catalog_info.status). * mach/err_kern.sub (err_codes_unix), string/stratcliff.c (main): Fix spelling in message. * po/libc.pot: Fix spelling in message for `zic'; this anticipates a fix in the tzcode distribution. Wed Dec 18 15:48:02 1996 Ulrich Drepper <drepper@cygnus.com> * time/strftime.c: Implement ^ flag to cause output be converted to use upper case characters. * time/zic.c: Update from ADO tzcode1996n. Wed Dec 18 14:29:24 1996 Erik Naggum <erik@naggum.no> * time/strftime.c (add): Don't change global `i' until all is over. Define NULL is not already defined. Tue Dec 17 09:49:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * libio/iovsprintf.c (_IO_vsprintf): Change `&sf' to `&sf._sbf._f' to avoid the need for a cast. * libio/iovsscanf.c (_IO_vsscanf): Likewise. * sunrpc/rpc/xdr.h: Add prototype for xdr_free.
-rw-r--r--ChangeLog93
-rw-r--r--Makeconfig2
-rw-r--r--NEWS4
-rw-r--r--PROJECTS17
-rw-r--r--Rules2
-rw-r--r--catgets/catgets.c2
-rw-r--r--catgets/catgetsinfo.h30
-rw-r--r--catgets/gencat.c4
-rw-r--r--catgets/open_catalog.c4
-rw-r--r--csu/Makefile9
-rw-r--r--csu/gmon-start.c30
-rw-r--r--csu/initfini.c2
-rw-r--r--db/btree/bt_seq.c4
-rw-r--r--db/btree/bt_utils.c2
-rw-r--r--db/btree/btree.h2
-rw-r--r--db/hash/hash.h2
-rw-r--r--db/recno/rec_utils.c2
-rw-r--r--dirent/dirent.h2
-rw-r--r--elf/dlfcn.h4
-rw-r--r--elf/ldd.bash.in2
-rw-r--r--elf/ldd.sh.in2
-rw-r--r--features.h18
-rw-r--r--gmon/Makefile2
-rw-r--r--hurd/hurd.h2
-rw-r--r--hurd/hurd/lookup.h2
-rw-r--r--hurd/hurdmalloc.c35
-rw-r--r--hurd/hurdmalloc.h2
-rw-r--r--hurd/path-lookup.c2
-rw-r--r--hurd/report-wait.c2
-rw-r--r--inet/arpa/telnet.h4
-rw-r--r--inet/protocols/talkd.h2
-rw-r--r--interp.c2
-rw-r--r--intl/dcgettext.c2
-rw-r--r--intl/explodename.c2
-rw-r--r--intl/finddomain.c2
-rw-r--r--intl/l10nflist.c4
-rw-r--r--intl/localealias.c2
-rw-r--r--io/fstat.c2
-rw-r--r--io/lstat.c2
-rw-r--r--io/mknod.c2
-rw-r--r--io/stat.c2
-rw-r--r--io/sys/stat.h2
-rw-r--r--io/utime.h5
-rw-r--r--libio/fileops.c2
-rw-r--r--libio/genops.c4
-rw-r--r--libio/iofgetpos.c2
-rw-r--r--libio/iofsetpos.c3
-rw-r--r--libio/iovsprintf.c11
-rw-r--r--libio/iovsscanf.c10
-rw-r--r--libio/libioP.h16
-rw-r--r--libio/strops.c2
-rw-r--r--locale/C-collate.c30
-rw-r--r--locale/C-ctype.c30
-rw-r--r--locale/iso-4217.def4
-rw-r--r--locale/locale.h66
-rw-r--r--locale/programs/charset.h30
-rw-r--r--locale/programs/ld-collate.c40
-rw-r--r--locale/programs/ld-ctype.c23
-rw-r--r--locale/programs/ld-time.c30
-rw-r--r--locale/programs/locale.c36
-rw-r--r--locale/programs/localedef.c8
-rw-r--r--locale/programs/locfile.c30
-rw-r--r--locale/programs/locfile.h30
-rw-r--r--locale/weight.h32
-rw-r--r--login/logwtmp.c2
-rw-r--r--login/pty.h36
-rw-r--r--mach/Makefile2
-rw-r--r--mach/err_kern.sub32
-rw-r--r--mach/mach/error.h40
-rw-r--r--mach/mach/mach_traps.h34
-rw-r--r--mach/msgserver.c38
-rw-r--r--malloc/Makefile18
-rw-r--r--malloc/malloc.c21
-rw-r--r--malloc/malloc.h3
-rw-r--r--malloc/mcheck-init.c30
-rw-r--r--malloc/mcheck.c232
-rw-r--r--malloc/mcheck.h70
-rw-r--r--malloc/mtrace.awk50
-rw-r--r--malloc/mtrace.c211
-rw-r--r--manual/arith.texi12
-rw-r--r--manual/creature.texi10
-rw-r--r--manual/errno.texi2
-rw-r--r--manual/filesys.texi6
-rw-r--r--manual/intro.texi2
-rw-r--r--manual/job.texi50
-rw-r--r--manual/libc.texinfo2
-rw-r--r--manual/locale.texi2
-rw-r--r--manual/math.texi2
-rw-r--r--manual/nss.texi6
-rw-r--r--manual/pattern.texi22
-rw-r--r--manual/signal.texi12
-rw-r--r--manual/startup.texi2
-rw-r--r--manual/stdio.texi4
-rw-r--r--manual/terminal.texi16
-rw-r--r--manual/users.texi18
-rw-r--r--math/math.h3
-rw-r--r--math/mathcalls.h2
-rw-r--r--misc/getpass.c30
-rw-r--r--misc/hsearch_r.c2
-rw-r--r--misc/search.h2
-rw-r--r--misc/syslog.c2
-rw-r--r--misc/tsearch.c30
-rw-r--r--nss/XXX-lookup.c2
-rw-r--r--nss/nss_files/files-netgrp.c2
-rw-r--r--nss/nsswitch.h6
-rw-r--r--posix/fnmatch.c2
-rw-r--r--posix/posix1_lim.h2
-rw-r--r--posix/sys/utsname.h4
-rw-r--r--posix/unistd.h15
-rw-r--r--resolv/Banner2
-rw-r--r--resolv/arpa/nameser.h4
-rw-r--r--resolv/inet_net_pton.c2
-rw-r--r--resolv/netdb.h4
-rw-r--r--resolv/nss_dns/dns-network.c2
-rw-r--r--resolv/res_comp.c55
-rw-r--r--resolv/res_debug.c2
-rw-r--r--resolv/res_init.c2
-rw-r--r--resolv/res_send.c2
-rw-r--r--resolv/resolv.h20
-rw-r--r--signal/signal.h29
-rw-r--r--stdio-common/_itoa.c40
-rw-r--r--stdio-common/printf_fp.c8
-rw-r--r--stdio-common/vfprintf.c4
-rw-r--r--stdio-common/vfscanf.c2
-rw-r--r--stdio/internals.c2
-rw-r--r--stdio/stdio.h6
-rw-r--r--stdlib/grouping.h4
-rw-r--r--stdlib/monetary.h30
-rw-r--r--stdlib/qsort.c83
-rw-r--r--stdlib/random.c16
-rw-r--r--stdlib/random_r.c12
-rw-r--r--stdlib/stdlib.h3
-rw-r--r--stdlib/strfmon.c42
-rw-r--r--stdlib/strtod.c2
-rw-r--r--string/envz.c2
-rw-r--r--string/envz.h2
-rw-r--r--string/stratcliff.c2
-rw-r--r--string/strerror.c30
-rw-r--r--string/strerror_r.c2
-rw-r--r--string/string.h8
-rw-r--r--string/strxfrm.c30
-rw-r--r--sunrpc/clnt_raw.c6
-rw-r--r--sunrpc/clnt_tcp.c2
-rw-r--r--sunrpc/clnt_udp.c2
-rw-r--r--sunrpc/pmap_rmt.c2
-rw-r--r--sunrpc/rpc/auth.h2
-rw-r--r--sunrpc/rpc/auth_des.h4
-rw-r--r--sunrpc/rpc/clnt.h6
-rw-r--r--sunrpc/rpc/svc.h4
-rw-r--r--sunrpc/rpc/xdr.h6
-rw-r--r--sunrpc/rpc_clntout.c31
-rw-r--r--sunrpc/rpc_cout.c2
-rw-r--r--sunrpc/rpcsvc/mount.x26
-rw-r--r--sunrpc/rpcsvc/nfs_prot.x35
-rw-r--r--sunrpc/rpcsvc/rex.x16
-rw-r--r--sunrpc/rpcsvc/rusers.x16
-rw-r--r--sunrpc/rpcsvc/sm_inter.x18
-rw-r--r--sunrpc/svc.c2
-rw-r--r--sunrpc/svc_auth.c18
-rw-r--r--sunrpc/svc_raw.c18
-rw-r--r--sunrpc/svc_tcp.c6
-rw-r--r--sunrpc/xdr.c2
-rw-r--r--sunrpc/xdr_array.c21
-rw-r--r--sunrpc/xdr_float.c2
-rw-r--r--sunrpc/xdr_rec.c32
-rw-r--r--sunrpc/xdr_ref.c16
-rw-r--r--sunrpc/xdr_stdio.c18
-rw-r--r--sysdeps/alpha/dl-machine.h2
-rw-r--r--sysdeps/alpha/elf/crtbegin.S2
-rw-r--r--sysdeps/alpha/strrchr.S2
-rw-r--r--sysdeps/generic/crypt-entry.c34
-rw-r--r--sysdeps/generic/crypt.h2
-rw-r--r--sysdeps/generic/memchr.c28
-rw-r--r--sysdeps/generic/memmove.c30
-rw-r--r--sysdeps/generic/strcasecmp.c30
-rw-r--r--sysdeps/generic/strchr.c38
-rw-r--r--sysdeps/generic/strcmp.c39
-rw-r--r--sysdeps/generic/strcspn.c31
-rw-r--r--sysdeps/generic/strncmp.c37
-rw-r--r--sysdeps/generic/strpbrk.c36
-rw-r--r--sysdeps/generic/strrchr.c30
-rw-r--r--sysdeps/generic/strstr.c32
-rw-r--r--sysdeps/gnu/errlist.c2
-rw-r--r--sysdeps/i386/i486/strcat.S42
-rw-r--r--sysdeps/i386/i586/lshift.S34
-rw-r--r--sysdeps/i386/i586/rshift.S6
-rw-r--r--sysdeps/i386/i586/strchr.S40
-rw-r--r--sysdeps/i386/i586/strlen.S40
-rw-r--r--sysdeps/i386/memchr.S62
-rw-r--r--sysdeps/i386/stpcpy.S40
-rw-r--r--sysdeps/i386/stpncpy.S50
-rw-r--r--sysdeps/i386/strchr.S44
-rw-r--r--sysdeps/i386/strcspn.S44
-rw-r--r--sysdeps/i386/strrchr.S44
-rw-r--r--sysdeps/i386/strspn.S44
-rw-r--r--sysdeps/ieee754/ieee754.h30
-rw-r--r--sysdeps/libm-i387/e_exp.S1
-rw-r--r--sysdeps/libm-i387/e_expl.S1
-rw-r--r--sysdeps/libm-i387/s_ceil.S2
-rw-r--r--sysdeps/libm-i387/s_ceilf.S2
-rw-r--r--sysdeps/libm-i387/s_ceill.S2
-rw-r--r--sysdeps/libm-i387/s_floor.S2
-rw-r--r--sysdeps/libm-i387/s_floorf.S2
-rw-r--r--sysdeps/libm-i387/s_floorl.S2
-rw-r--r--sysdeps/libm-ieee754/e_log.c40
-rw-r--r--sysdeps/libm-ieee754/e_sqrt.c95
-rw-r--r--sysdeps/libm-ieee754/k_rem_pio2.c62
-rw-r--r--sysdeps/m68k/lshift.S2
-rw-r--r--sysdeps/m68k/rshift.S4
-rw-r--r--sysdeps/mach/hurd/dirfd.c30
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.c30
-rw-r--r--sysdeps/mach/hurd/getlogin_r.c30
-rw-r--r--sysdeps/mach/hurd/pipe.c30
-rw-r--r--sysdeps/mach/hurd/select.c38
-rw-r--r--sysdeps/mach/thread_state.h30
-rw-r--r--sysdeps/mips/dl-machine.h10
-rw-r--r--sysdeps/posix/sigpause.c36
-rw-r--r--sysdeps/standalone/i960/i960ca.h85
-rw-r--r--sysdeps/standalone/m68k/m68020/mvme136/console.c56
-rw-r--r--sysdeps/stub/dirfd.c30
-rw-r--r--sysdeps/stub/getlogin_r.c2
-rw-r--r--sysdeps/stub/libc-lock.h2
-rw-r--r--sysdeps/stub/local_lim.h2
-rw-r--r--sysdeps/stub/pipe.c28
-rw-r--r--sysdeps/stub/sigpause.c35
-rw-r--r--sysdeps/stub/sys/sem_buf.h34
-rw-r--r--sysdeps/stub/sys/shm_buf.h32
-rw-r--r--sysdeps/stub/tcsetattr.c28
-rw-r--r--sysdeps/stub/tempname.c28
-rw-r--r--sysdeps/unix/bsd/osf/sigaction.h27
-rw-r--r--sysdeps/unix/bsd/sys/reboot.h2
-rw-r--r--sysdeps/unix/bsd/usleep.c36
-rw-r--r--sysdeps/unix/dirfd.c30
-rw-r--r--sysdeps/unix/getlogin_r.c2
-rw-r--r--sysdeps/unix/sysv/linux/clock.c39
-rw-r--r--sysdeps/unix/sysv/linux/configure2
-rw-r--r--sysdeps/unix/sysv/linux/configure.in2
-rw-r--r--sysdeps/unix/sysv/linux/gethostid.c2
-rw-r--r--sysdeps/unix/sysv/linux/m68k/mremap.S29
-rw-r--r--sysdeps/unix/sysv/linux/sigaction.h30
-rw-r--r--sysdeps/unix/sysv/linux/signum.h2
-rw-r--r--sysdeps/unix/sysv/linux/sleep.c32
-rw-r--r--sysdeps/unix/sysv/linux/sys/module.h2
-rw-r--r--sysdeps/unix/sysv/linux/sys/mtio.h2
-rw-r--r--sysdeps/unix/sysv/linux/sys/sem_buf.h2
-rw-r--r--sysdeps/unix/sysv/linux/sys/shm_buf.h2
-rw-r--r--sysdeps/unix/sysv/linux/termbits.h2
-rw-r--r--sysdeps/unix/sysv/linux/timebits.h11
-rw-r--r--sysdeps/unix/sysv/linux/usleep.c32
-rw-r--r--sysdeps/vax/memchr.s2
-rw-r--r--sysdeps/vax/strchr.s4
-rw-r--r--sysdeps/vax/strncmp.s4
-rw-r--r--sysdeps/vax/strrchr.s2
-rw-r--r--time/strftime.c87
-rw-r--r--time/time.h2
-rw-r--r--time/zic.c18
-rw-r--r--values.h2
-rw-r--r--wcsmbs/wchar.h8
-rw-r--r--wcsmbs/wcschr.c28
-rw-r--r--wcsmbs/wcsncmp.c30
-rw-r--r--wcsmbs/wcspbrk.c30
-rw-r--r--wcsmbs/wcsrchr.c30
262 files changed, 2870 insertions, 1991 deletions
diff --git a/ChangeLog b/ChangeLog
index 2cdf7b4cbe..19d6230b9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,94 @@
+Thu Dec 19 23:28:33 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * resolv/resolv.h: Update from BIND 4.9.5-P1.
+ * resolv/res_comp.c: Likewise.
+ * resolv/res_debug.c: Likewise.
+ * resolv/Banner: Update version number.
+
+Thu Dec 19 20:58:53 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * elf/dlfcn.h: Add extern "C" wrapper.
+
+ * io/utime.h: Don't define NULL since this isn't allowed in POSIX.
+ * io/sys/stat.h: Declare `lstat' only if __USE_BSD ||
+ __USE_XOPEN_EXTENDED.
+ * locale/locale.h: Define NULL.
+ * math/math.c: Don't include <errno.h> to define math errors.
+ * stdlib/stdlib.h: Likewise.
+ * posix/unistd.h: Don't declare environ.
+ * posix/sys/utsname.h (struct utsname): Declare member domainname
+ as __domainname is !__USE_GNU.
+ * signal/signal.h: Declare size_t only if __USE_BSD ||
+ __USE_XOPEN_EXTENDED.
+ * stdio/stdio.h: Don't declare cuserid when __USE_POSIX, but
+ instead when __USE_XOPEN.
+ * string/string.h: Define strndup only if __USE_GNU.
+ * sysdeps/unix/sysv/linux/clock.c: New file.
+ * sysdeps/unix/sysv/linux/timebits.h: Define CLOCKS_PER_SEC as
+ 1000000 per X/Open standard.
+ * features.h: Add code to recognize _POSIX_C_SOURCE value 199309.
+ Define __USE_POSIX199309.
+ * posix/unistd.h: Declare fdatasync only if __USE_POSIX199309.
+ * time/time.c: Declare nanosleep only if __USE_POSIX199309.
+ Patches by Rüdiger Helsch <rh@unifix.de>.
+
+ * locale/locale.h: Add declaration of newlocale and freelocale.
+
+ * new-malloc/Makefile (distibute): Add mtrace.awk.
+ (dist-routines): Add mcheck and mtrace.
+ (install-lib, non-lib.a): Define as libmcheck.a.
+ * new-malloc/malloc.h: Add declaration of __malloc_initialized.
+ * new-malloc/mcheck.c: New file.
+ * new-malloc/mcheck.h: New file.
+ * new-malloc/mtrace.c: New file.
+ * new-malloc/mtrace.awk: New file.
+
+ * posix/unistd.h: Correct prototype for usleep.
+ * sysdeps/unix/bsd/usleep.c: De-ANSI-declfy. Correct return type.
+ * sysdeps/unix/sysv/linux/usleep.c: Real implementation based on
+ nanosleep.
+
+ * signal/signal.h: Change protoype of __sigpause to take two
+ arguments. Remove prototype for sigpause. Add two different
+ macros named sigpause selected when __USE_BSD or __USE_XOPEN
+ are defined. This is necessary since the old BSD definition
+ of theis function collides with the X/Open definition.
+ * sysdeps/posix/sigpause.c: Change function definition to also
+ fit X/Open definition.
+
+ * sysdeps/libm-i387/e_exp.S: Make sure stack is empty when the
+ function is left.
+ * sysdeps/libm-i387/e_expl.S: Likewise.
+ Patch by HJ Lu.
+
+1996-12-17 Paul Eggert <eggert@twinsun.com>
+
+ * many, many files: Spelling corrections.
+ * catgets/catgetsinfo.h (mmapped):
+ Renamed from mmaped (in struct catalog_info.status).
+ * mach/err_kern.sub (err_codes_unix), string/stratcliff.c (main):
+ Fix spelling in message.
+ * po/libc.pot: Fix spelling in message for `zic'; this anticipates
+ a fix in the tzcode distribution.
+
+Wed Dec 18 15:48:02 1996 Ulrich Drepper <drepper@cygnus.com>
+
+ * time/strftime.c: Implement ^ flag to cause output be converted
+ to use upper case characters.
+
+ * time/zic.c: Update from ADO tzcode1996n.
+
+Wed Dec 18 14:29:24 1996 Erik Naggum <erik@naggum.no>
+
+ * time/strftime.c (add): Don't change global `i' until all is over.
+ Define NULL is not already defined.
+
+Tue Dec 17 09:49:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * libio/iovsprintf.c (_IO_vsprintf): Change `&sf' to `&sf._sbf._f'
+ to avoid the need for a cast.
+ * libio/iovsscanf.c (_IO_vsscanf): Likewise.
+
Wed Dec 18 03:31:58 1996 Ulrich Drepper <drepper@cygnus.com>
* dirent/scandir.c: Undo change from Mon Dec 2 15:32:15 1996.
@@ -21,7 +112,7 @@ Wed Dec 18 03:31:58 1996 Ulrich Drepper <drepper@cygnus.com>
* new-malloc/malloc.h: Likewise.
* nis/ypclnt.c: Remove prototype for xdr_free.
- * snrpc/rpc/xdr.h: Add prototype for xdr_free.
+ * sunrpc/rpc/xdr.h: Add prototype for xdr_free.
* manual/nss.texi: Correct description of default values and don't
meantion NSS as an add-on.
diff --git a/Makeconfig b/Makeconfig
index b61af28b0b..4f65e6d476 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -403,7 +403,7 @@ M4 = m4
.NOEXPORT:
# We want to echo the commands we're running without
-# umpteem zillion filenames along with it (we use `...' instead)
+# umpteen zillion filenames along with it (we use `...' instead)
# but we don't want this echoing done when the user has said
# he doesn't want to see commands echoed by using -s.
ifneq "$(findstring s,$(MAKEFLAGS))" "" # if -s
diff --git a/NEWS b/NEWS
index 0828e574ea..37678e12c7 100644
--- a/NEWS
+++ b/NEWS
@@ -190,7 +190,7 @@ Version 2.0
`struct sockaddr *' type, does not generate a type-clash warning.
* New function `error' declared in header file <error.h> is a convenient
- function for printing error messages and optionally exitting; this is the
+ function for printing error messages and optionally exiting; this is the
canonical function used in GNU programs. The new functions `err', `warn',
and friends in header file <err.h> are the canonical 4.4 BSD interface for
doing the same thing.
@@ -205,7 +205,7 @@ Version 2.0
* We have incorporated the 4.4 BSD `db' library (version 1.85). New header
files <db.h> and <mpool.h> provide a rich set of functions for several
types of simple databases stored in memory and in files, and <ndbm.h> is
- an old `ndbm'-compatbile interface using the `db' functions. Link with
+ an old `ndbm'-compatible interface using the `db' functions. Link with
`-ldb' to get these functions.
* New macro `strdupa' copies a string like `strdup', but uses local stack
diff --git a/PROJECTS b/PROJECTS
index fb3897c7d3..b7272eee90 100644
--- a/PROJECTS
+++ b/PROJECTS
@@ -74,26 +74,13 @@ contact <bug-glibc@prep.ai.mit.edu>
It is planed to do a complete rewrite.
-[10] Add mmap() support to malloc().
- Doug Lea's malloc implementation might give some ideas. Perhaps
- switching completly to his implementation is an option if it
- a) can work without mmap() support (not all system GNU libc
- is running on have mmap)
- b) is without mmap support at least as fast as the current
- implementation
- c) will be extended with the current hooks and additional functions
-
- Please contact bug-glibc@prep.ai.mit.edu before starting to avoid
- duplicated work.
-
-
-[11] Write access function for netmasks, bootparams, and automount
+[10] Write access function for netmasks, bootparams, and automount
databases for nss_files and nss_db module.
The functions should be embedded in the nss scheme. This is not
hard and not all services must be supported at once.
-[12] Rewrite utmp/wtmp functions to use database functions. This is much
+[11] Rewrite utmp/wtmp functions to use database functions. This is much
better than the normal flat file format.
Please contact bug-glibc@prep.ai.mit.edu before starting to avoid
diff --git a/Rules b/Rules
index a06dc041df..0cf6c002c0 100644
--- a/Rules
+++ b/Rules
@@ -77,7 +77,7 @@ $(common-objpfx)empty.c:
cp -f /dev/null $@
common-generated := $(common-generated) dummy.o dummy.c empty.c empty.o
-# This makes all the auxilliary and test programs.
+# This makes all the auxiliary and test programs.
.PHONY: others tests
others: $(addprefix $(objpfx),$(others) $(extra-objs))
diff --git a/catgets/catgets.c b/catgets/catgets.c
index ab7d28a682..b8e5bf0750 100644
--- a/catgets/catgets.c
+++ b/catgets/catgets.c
@@ -154,7 +154,7 @@ catclose (nl_catd catalog_desc)
catalog = (__nl_catd) catalog_desc;
- if (catalog->status == mmaped)
+ if (catalog->status == mmapped)
munmap ((void *) catalog->file_ptr, catalog->file_size);
else if (catalog->status == malloced)
free ((void *) catalog->file_ptr);
diff --git a/catgets/catgetsinfo.h b/catgets/catgetsinfo.h
index 7e0a26f798..292572decf 100644
--- a/catgets/catgetsinfo.h
+++ b/catgets/catgetsinfo.h
@@ -1,21 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sys/types.h>
@@ -34,7 +34,7 @@ struct catalog_obj
/* This structure will be filled after loading the catalog. */
typedef struct catalog_info
{
- enum { closed, nonexisting, mmaped, malloced } status;
+ enum { closed, nonexisting, mmapped, malloced } status;
const char *cat_name;
const char *env_var;
diff --git a/catgets/gencat.c b/catgets/gencat.c
index 9e7404295e..561b0e5230 100644
--- a/catgets/gencat.c
+++ b/catgets/gencat.c
@@ -353,7 +353,7 @@ read_input_file (struct catalog *current, const char *fname)
}
else
{
- /* We have found seomthing which looks like a
+ /* We have found seomthing that looks like a
correct identifier. */
struct set_list *runp;
@@ -980,7 +980,7 @@ read_old (struct catalog *catalog, const char *file_name)
/* Try to open catalog, but don't look through the NLSPATH. */
__open_catalog (&old_cat_obj, 0);
- if (old_cat_obj.status != mmaped && old_cat_obj.status != malloced)
+ if (old_cat_obj.status != mmapped && old_cat_obj.status != malloced)
if (errno == ENOENT)
/* No problem, the catalog simply does not exist. */
return;
diff --git a/catgets/open_catalog.c b/catgets/open_catalog.c
index 5335b433c7..80d2899a36 100644
--- a/catgets/open_catalog.c
+++ b/catgets/open_catalog.c
@@ -185,7 +185,7 @@ __open_catalog (__nl_catd catalog, int with_path)
MAP_FILE|MAP_COPY|MAP_INHERIT, fd, 0);
if (catalog->file_ptr != (struct catalog_obj *) -1)
/* Tell the world we managed to mmap the file. */
- catalog->status = mmaped;
+ catalog->status = mmapped;
else
{
/* mmap failed perhaps because the system call is not
@@ -229,7 +229,7 @@ __open_catalog (__nl_catd catalog, int with_path)
{
/* Illegal file. Free he resources and mark catalog as not
usable. */
- if (catalog->status == mmaped)
+ if (catalog->status == mmapped)
__munmap ((void *) catalog->file_ptr, catalog->file_size);
else
free (catalog->file_ptr);
diff --git a/csu/Makefile b/csu/Makefile
index b61b1d74a3..790a8feb8c 100644
--- a/csu/Makefile
+++ b/csu/Makefile
@@ -14,9 +14,9 @@
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If
-# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-# Cambridge, MA 02139, USA.
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
# This directory contains the C startup code (that which calls main). This
# consists of the startfile, built from start.c and installed as crt0.o
@@ -71,7 +71,7 @@ generated += $(crtstuff:=.s)
omit-deps += $(crtstuff)
# Compile initfini.c to assembly code, which contains embedded shell
-# commands that prodice crti.s-new and crtn.s-new when run. We need to
+# commands that produce crti.s-new and crtn.s-new when run. We need to
# disable emission of .size directives and debugging information, since
# they will get confused by the splitting of the output we do.
$(objpfx)cr%i.s $(objpfx)cr%n.s: initfini.c; $(initfini)
@@ -113,4 +113,3 @@ $(addprefix $(objpfx),$(filter-out $(start-installed-name),$(csu-dummies))):
cp /dev/null $(@:.o=.c)
$(COMPILE.c) $(@:.o=.c) $(OUTPUT_OPTION)
rm -f $(@:.o=.c)
-
diff --git a/csu/gmon-start.c b/csu/gmon-start.c
index 9139306575..02c44e2fcf 100644
--- a/csu/gmon-start.c
+++ b/csu/gmon-start.c
@@ -1,21 +1,21 @@
/* Code to enable profiling at program startup.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sys/types.h>
#include <sys/gmon.h>
@@ -52,7 +52,7 @@ __gmon_start__ (void)
/* Start keeping profiling records. */
monstartup ((u_long) &_start, (u_long) &etext);
- /* Call _mcleanup before exitting; it will write out gmon.out from the
+ /* Call _mcleanup before exiting; it will write out gmon.out from the
collected data. */
atexit (&_mcleanup);
}
diff --git a/csu/initfini.c b/csu/initfini.c
index dc78e84c2d..0fdfe5dcb8 100644
--- a/csu/initfini.c
+++ b/csu/initfini.c
@@ -11,7 +11,7 @@
License, the Free Software Foundation gives you unlimited
permission to link the compiled version of this file with other
programs, and to distribute those programs without any restriction
- coming from the use of this file. (The Libraty General Public
+ coming from the use of this file. (The Library General Public
License restrictions do apply in other respects; for example, they
cover modification of the file, and distribution when not linked
into another program.)
diff --git a/db/btree/bt_seq.c b/db/btree/bt_seq.c
index eacef2998f..90f896036f 100644
--- a/db/btree/bt_seq.c
+++ b/db/btree/bt_seq.c
@@ -92,7 +92,7 @@ __bt_seq(dbp, key, data, flags)
}
/*
- * If scan unitialized as yet, or starting at a specific record, set
+ * If scan uninitialized as yet, or starting at a specific record, set
* the scan to a specific key. Both __bt_seqset and __bt_seqadv pin
* the page the cursor references if they're successful.
*/
@@ -364,7 +364,7 @@ __bt_first(t, key, erval, exactp)
*erval = *ep;
return (RET_SUCCESS);
}
-
+
/*
* Walk backwards, as long as the entry matches and there are
* keys left in the tree. Save a copy of each match in case
diff --git a/db/btree/bt_utils.c b/db/btree/bt_utils.c
index 9c1438eb84..1416c7862d 100644
--- a/db/btree/bt_utils.c
+++ b/db/btree/bt_utils.c
@@ -76,7 +76,7 @@ __bt_ret(t, e, key, rkey, data, rdata, copy)
bl = GETBLEAF(e->page, e->index);
/*
- * We must copy big keys/data to make them contigous. Otherwise,
+ * We must copy big keys/data to make them contiguous. Otherwise,
* leave the page pinned and don't copy unless the user specified
* concurrent access.
*/
diff --git a/db/btree/btree.h b/db/btree/btree.h
index 36d35c998b..ab4c5b5ec4 100644
--- a/db/btree/btree.h
+++ b/db/btree/btree.h
@@ -161,7 +161,7 @@ typedef struct _rinternal {
#define NRINTERNAL \
LALIGN(sizeof(recno_t) + sizeof(pgno_t))
-/* Copy a RINTERAL entry to the page. */
+/* Copy a RINTERNAL entry to the page. */
#define WR_RINTERNAL(p, nrecs, pgno) { \
*(recno_t *)p = nrecs; \
p += sizeof(recno_t); \
diff --git a/db/hash/hash.h b/db/hash/hash.h
index 1c599c112c..62176d7b1f 100644
--- a/db/hash/hash.h
+++ b/db/hash/hash.h
@@ -104,7 +104,7 @@ typedef struct htab { /* Memory resident data structure */
int cbucket; /* Current bucket */
int cndx; /* Index of next item on cpage */
int errnum; /* Error Number -- for DBM
- * compatability */
+ * compatibility */
int new_file; /* Indicates if fd is backing store
* or no */
int save_file; /* Indicates whether we need to flush
diff --git a/db/recno/rec_utils.c b/db/recno/rec_utils.c
index baea3fad50..c4c0380461 100644
--- a/db/recno/rec_utils.c
+++ b/db/recno/rec_utils.c
@@ -90,7 +90,7 @@ dataonly:
return (RET_SUCCESS);
/*
- * We must copy big keys/data to make them contigous. Otherwise,
+ * We must copy big keys/data to make them contiguous. Otherwise,
* leave the page pinned and don't copy unless the user specified
* concurrent access.
*/
diff --git a/dirent/dirent.h b/dirent/dirent.h
index c357be2bcf..ac85b5f1c6 100644
--- a/dirent/dirent.h
+++ b/dirent/dirent.h
@@ -117,7 +117,7 @@ extern struct dirent *__readdir __P ((DIR *__dirp));
extern struct dirent *readdir __P ((DIR *__dirp));
#ifdef __USE_REENTRANT
-/* Reentrant versio of `readdir'. Return in RESULT a pointer to the
+/* Reentrant version of `readdir'. Return in RESULT a pointer to the
next entry. */
extern int __readdir_r __P ((DIR *__dirp, struct dirent *entry,
struct dirent **result));
diff --git a/elf/dlfcn.h b/elf/dlfcn.h
index c2b66a7797..973c7e1cc8 100644
--- a/elf/dlfcn.h
+++ b/elf/dlfcn.h
@@ -38,6 +38,8 @@
objects were loaded. */
#define RTLD_NEXT ((void *) -1l)
+__BEGIN_DECLS
+
/* Open the shared object FILE and map it in; return a handle that can be
passed to `dlsym' to get symbol values from it. */
extern void *dlopen __P ((__const char *__file, int __mode));
@@ -66,4 +68,6 @@ typedef struct
} Dl_info;
extern int dladdr __P ((void *__address, Dl_info *__info));
+__END_DECLS
+
#endif /* dlfcn.h */
diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in
index 5269708f43..311ef82550 100644
--- a/elf/ldd.bash.in
+++ b/elf/ldd.bash.in
@@ -44,7 +44,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
--version print version information and exit
Report bugs to <bug-glibc@prep.ai.mit.edu>."
exit 0 ;;
- --) # Stop option prcessing.
+ --) # Stop option processing.
shift; break ;;
*)
break ;;
diff --git a/elf/ldd.sh.in b/elf/ldd.sh.in
index f8df62d223..7b7276f544 100644
--- a/elf/ldd.sh.in
+++ b/elf/ldd.sh.in
@@ -40,7 +40,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.'
--version print version information and exit
Report bugs to <bug-glibc@prep.ai.mit.edu>.'
exit 0 ;;
- --) # Stop option prcessing.
+ --) # Stop option processing.
shift; break ;;
*)
break ;;
diff --git a/features.h b/features.h
index 9b20512c51..4bcff2a190 100644
--- a/features.h
+++ b/features.h
@@ -25,7 +25,8 @@
__STRICT_ANSI__ ANSI Standard C.
_POSIX_SOURCE IEEE Std 1003.1.
- _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if ==2 add IEEE Std 1003.2.
+ _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
+ if >=199309L, add IEEE Std 1003.1b-1993
_XOPEN_SOURCE Includes POSIX and XPG things.
_XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
_BSD_SOURCE ANSI, POSIX, and 4.3BSD things.
@@ -45,6 +46,7 @@
__USE_POSIX Define IEEE Std 1003.1 things.
__USE_POSIX2 Define IEEE Std 1003.2 things.
+ __USE_POSIX199309 Define IEEE Std 1003.1b things.
__USE_XOPEN Define XPG things.
__USE_XOPEN_EXTENDED Define X/Open Unix things.
__USE_BSD Define 4.3BSD things.
@@ -66,6 +68,7 @@
/* Undefine everything, so we get a clean slate. */
#undef __USE_POSIX
#undef __USE_POSIX2
+#undef __USE_POSIX199309
#undef __USE_XOPEN
#undef __USE_XOPEN_EXTENDED
#undef __USE_BSD
@@ -99,7 +102,7 @@
#undef _POSIX_SOURCE
#define _POSIX_SOURCE 1
#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 2
+#define _POSIX_C_SOURCE 199309L
#undef _XOPEN_SOURCE
#define _XOPEN_SOURCE 1
#undef _XOPEN_SOURCE_EXTENDED
@@ -120,11 +123,16 @@
#define _SVID_SOURCE 1
#endif
-/* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2. */
+/* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2
+ (and IEEE Std 1003.1b-1993 unless _XOPEN_SOURCE is defined). */
#if (!defined (__STRICT_ANSI__) && !defined (_POSIX_SOURCE) && \
!defined (_POSIX_C_SOURCE))
#define _POSIX_SOURCE 1
+#if defined(_XOPEN_SOURCE)
#define _POSIX_C_SOURCE 2
+#else
+#define _POSIX_C_SOURCE 199309L
+#endif
#endif
#if (defined (_POSIX_SOURCE) || _POSIX_C_SOURCE >= 1 || \
@@ -137,6 +145,10 @@
#define __USE_POSIX2 1
#endif
+#if (defined (_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L)
+#define __USE_POSIX199309 1
+#endif
+
#ifdef _XOPEN_SOURCE
#define __USE_XOPEN 1
#ifdef _XOPEN_SOURCE_EXTENDED
diff --git a/gmon/Makefile b/gmon/Makefile
index eff18ee029..fbbc817571 100644
--- a/gmon/Makefile
+++ b/gmon/Makefile
@@ -31,7 +31,7 @@ include ../Rules
CFLAGS-mcount.c := -fno-omit-frame-pointer
# We cannot compile mcount.c with -pg because that would
-# create resursive calls. Just copy the normal static object.
+# create recursive calls. Just copy the normal static object.
# On systems where `profil' is not a system call, the same
# problem exists for the internal functions in profil.c.
diff --git a/hurd/hurd.h b/hurd/hurd.h
index 212db45753..bb8e2e7c11 100644
--- a/hurd/hurd.h
+++ b/hurd/hurd.h
@@ -222,7 +222,7 @@ extern error_t _hurd_exec (task_t task,
char *const envp[]);
-/* Inform the proc server we have exitted with STATUS, and kill the
+/* Inform the proc server we have exited with STATUS, and kill the
task thoroughly. This function never returns, no matter what. */
extern void _hurd_exit (int status) __attribute__ ((noreturn));
diff --git a/hurd/hurd/lookup.h b/hurd/hurd/lookup.h
index df5f38ba33..09760be59b 100644
--- a/hurd/hurd/lookup.h
+++ b/hurd/hurd/lookup.h
@@ -143,7 +143,7 @@ error_t file_name_path_scan (const char *file_name, const char *path,
/* Lookup FILE_NAME and return the node opened with FLAGS & MODE in result
(see hurd_file_name_lookup for details), but a simple filename (without
- any directory prefixes) will be consectutively prefixed with the pathnames
+ any directory prefixes) will be consecutively prefixed with the pathnames
in the `:' separated list PATH until one succeeds in a successful lookup.
If none succeed, then the first error that wasn't ENOENT is returned, or
ENOENT if no other errors were returned. If PREFIXED_NAME is non-NULL,
diff --git a/hurd/hurdmalloc.c b/hurd/hurdmalloc.c
index d95b0c34dd..cabcdcf0da 100644
--- a/hurd/hurdmalloc.c
+++ b/hurd/hurdmalloc.c
@@ -37,6 +37,9 @@
/*
* HISTORY
* $Log$
+ * Revision 1.13 1996/12/20 01:32:01 drepper
+ * Update from main archive 961219
+ *
* Revision 1.12 1996/11/15 19:44:13 thomas
* Tue Nov 12 16:58:41 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
*
@@ -58,8 +61,8 @@
* (union header): Only define if !MCHECK.
* (HEADER_SIZE, HEADER_NEXT, HEADER_FREE, HEADER_CHECK): New macros.
* [MCHECK] (MIN_SIZE): Add correct definition for this case.
- * (more_memory, malloc, free, realloc): Use above macros, and add appropiate
- * checks & frobs in MCHECK case.
+ * (more_memory, malloc, free, realloc): Use above macros, and add
+ * appropriate checks & frobs in MCHECK case.
*
* Revision 1.6 1996/03/07 21:13:08 miles
* (realloc):
@@ -75,39 +78,39 @@
* (HEADER_SIZE, HEADER_NEXT, HEADER_FREE, HEADER_CHECK): New macros.
* [MCHECK] (MIN_SIZE): Add correct definition for this case.
* (more_memory, malloc, free, realloc):
- * Use above macros, and add appropiate checks & frobs in MCHECK case.
+ * Use above macros, and add appropriate checks & frobs in MCHECK case.
*
* Revision 1.4 1994/05/05 11:21:42 roland
* entered into RCS
*
* Revision 2.7 91/05/14 17:57:34 mrt
* Correcting copyright
- *
+ *
* Revision 2.6 91/02/14 14:20:26 mrt
* Added new Mach copyright
* [91/02/13 12:41:21 mrt]
- *
+ *
* Revision 2.5 90/11/05 14:37:33 rpd
* Added malloc_fork* code.
* [90/11/02 rwd]
- *
+ *
* Add spin_lock_t.
* [90/10/31 rwd]
- *
+ *
* Revision 2.4 90/08/07 14:31:28 rpd
* Removed RCS keyword nonsense.
- *
+ *
* Revision 2.3 90/06/02 15:14:00 rpd
* Converted to new IPC.
* [90/03/20 20:56:57 rpd]
- *
+ *
* Revision 2.2 89/12/08 19:53:59 rwd
* Removed conditionals.
* [89/10/23 rwd]
- *
+ *
* Revision 2.1 89/08/03 17:09:46 rwd
* Created.
- *
+ *
*
* 13-Sep-88 Eric Cooper (ecc) at Carnegie Mellon University
* Changed realloc() to copy min(old size, new size) bytes.
@@ -330,7 +333,7 @@ free(base)
#ifdef MCHECK
assert (HEADER_CHECK (h) == CHECK_BUSY);
-#endif
+#endif
fl = HEADER_FREE (h);
i = fl - malloc_free_list;
@@ -352,7 +355,7 @@ free(base)
HEADER_NEXT (h) = fl->head;
#ifdef MCHECK
HEADER_CHECK (h) = CHECK_FREE;
-#endif
+#endif
fl->head = h;
#ifdef DEBUG
fl->in_use -= 1;
@@ -454,7 +457,7 @@ print_malloc_free_list()
}
#endif DEBUG
-static void
+static void
malloc_fork_prepare(void)
/*
* Prepare the malloc module for a fork by insuring that no thread is in a
@@ -462,13 +465,13 @@ malloc_fork_prepare(void)
*/
{
register int i;
-
+
for (i = 0; i < NBUCKETS; i++) {
spin_lock(&malloc_free_list[i].lock);
}
}
-static void
+static void
malloc_fork_parent(void)
/*
* Called in the parent process after a fork() to resume normal operation.
diff --git a/hurd/hurdmalloc.h b/hurd/hurdmalloc.h
index 91286093c4..e11c208a8f 100644
--- a/hurd/hurdmalloc.h
+++ b/hurd/hurdmalloc.h
@@ -1,4 +1,4 @@
-/* XXX this file is a tempoary hack.
+/* XXX this file is a temporary hack.
All hurd-internal code which uses malloc et al includes this file so it
will use the internal malloc routines _hurd_{malloc,realloc,free}
diff --git a/hurd/path-lookup.c b/hurd/path-lookup.c
index cc12454303..04baab0634 100644
--- a/hurd/path-lookup.c
+++ b/hurd/path-lookup.c
@@ -80,7 +80,7 @@ file_name_path_scan (const char *file_name, const char *path,
/* Lookup FILE_NAME and return the node opened with FLAGS & MODE in result
(see hurd_file_name_lookup for details), but a simple filename (without
- any directory prefixes) will be consectutively prefixed with the pathnames
+ any directory prefixes) will be consecutively prefixed with the pathnames
in the `:' separated list PATH until one succeeds in a successful lookup.
If none succeed, then the first error that wasn't ENOENT is returned, or
ENOENT if no other errors were returned. If PREFIXED_NAME is non-NULL,
diff --git a/hurd/report-wait.c b/hurd/report-wait.c
index 20cc166356..491b566d04 100644
--- a/hurd/report-wait.c
+++ b/hurd/report-wait.c
@@ -93,7 +93,7 @@ describe_port (string_t description, mach_port_t port)
}
-/* Common defn so we don't link in the itimer code unnecssarily. */
+/* Common defn so we don't link in the itimer code unnecessarily. */
thread_t _hurd_itimer_thread; /* XXX */
kern_return_t
diff --git a/inet/arpa/telnet.h b/inet/arpa/telnet.h
index 10155a84a8..17255a1c7b 100644
--- a/inet/arpa/telnet.h
+++ b/inet/arpa/telnet.h
@@ -96,7 +96,7 @@ extern char *telcmds[];
#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
-#define TELOPT_XASCII 17 /* extended ascic character set */
+#define TELOPT_XASCII 17 /* extended ascii character set */
#define TELOPT_LOGOUT 18 /* force logout */
#define TELOPT_BM 19 /* byte macro */
#define TELOPT_DET 20 /* data entry terminal */
@@ -200,7 +200,7 @@ char *telopts[NTELOPTS+1] = {
#define NSLC 18
/*
- * For backwards compatability, we define SLC_NAMES to be the
+ * For backwards compatibility, we define SLC_NAMES to be the
* list of names if SLC_NAMES is not defined.
*/
#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
diff --git a/inet/protocols/talkd.h b/inet/protocols/talkd.h
index c523bf590d..6d893adfb5 100644
--- a/inet/protocols/talkd.h
+++ b/inet/protocols/talkd.h
@@ -81,7 +81,7 @@ typedef struct {
typedef struct {
u_char vers; /* protocol version */
u_char type; /* type of request message, see below */
- u_char answer; /* respose to request message, see below */
+ u_char answer; /* response to request message, see below */
u_char pad;
u_int32_t id_num; /* message id */
struct osockaddr addr; /* address for establishing conversation */
diff --git a/interp.c b/interp.c
index d8a1882303..e08cf22d21 100644
--- a/interp.c
+++ b/interp.c
@@ -1,4 +1,4 @@
-/* interp - add information about dynamic loader to shared libray obejcts.
+/* interp - add information about dynamic loader to shared library obejcts.
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/intl/dcgettext.c b/intl/dcgettext.c
index 592f724eb1..fe7299cda1 100644
--- a/intl/dcgettext.c
+++ b/intl/dcgettext.c
@@ -336,7 +336,7 @@ DCGETTEXT (domainname, msgid, category)
{
/* The whole contents of CATEGORYVALUE has been searched but
no valid entry has been found. We solve this situation
- by implicitely appending a "C" entry, i.e. no translation
+ by implicitly appending a "C" entry, i.e. no translation
will take place. */
single_locale[0] = 'C';
single_locale[1] = '\0';
diff --git a/intl/explodename.c b/intl/explodename.c
index 7a0d015f3e..7436836f3b 100644
--- a/intl/explodename.c
+++ b/intl/explodename.c
@@ -166,7 +166,7 @@ _nl_explode_name (name, language, modifier, territory, codeset,
}
}
- /* For CEN sytnax values it might be important to have the
+ /* For CEN syntax values it might be important to have the
separator character in the file name, not for XPG syntax. */
if (syntax == xpg)
{
diff --git a/intl/finddomain.c b/intl/finddomain.c
index a2977d10c5..ad03a45923 100644
--- a/intl/finddomain.c
+++ b/intl/finddomain.c
@@ -171,7 +171,7 @@ _nl_find_domain (dirname, locale, domainname)
&sponsor, &revision);
/* Create all possible locale entries which might be interested in
- generalzation. */
+ generalization. */
retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
strlen (dirname) + 1, mask, language, territory,
codeset, normalized_codeset, modifier, special,
diff --git a/intl/l10nflist.c b/intl/l10nflist.c
index b50eff465f..0d8c9b48c8 100644
--- a/intl/l10nflist.c
+++ b/intl/l10nflist.c
@@ -318,8 +318,8 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
}
entries = 0;
- /* If the DIRLIST is a real list the RETVAL entry correcponds not to
- a real file. So we have to use the DIRLIST separation machanism
+ /* If the DIRLIST is a real list the RETVAL entry corresponds not to
+ a real file. So we have to use the DIRLIST separation mechanism
of the inner loop. */
cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
for (; cnt >= 0; --cnt)
diff --git a/intl/localealias.c b/intl/localealias.c
index 6e2b27d51b..e08cdf94a9 100644
--- a/intl/localealias.c
+++ b/intl/localealias.c
@@ -297,7 +297,7 @@ read_alias_file (fname, fname_len)
}
}
- /* Possibily not the whole line fitted into the buffer. Ignore
+ /* Possibly not the whole line fits into the buffer. Ignore
the rest of the line. */
while (strchr (cp, '\n') == NULL)
{
diff --git a/io/fstat.c b/io/fstat.c
index 63341555ad..df558daa58 100644
--- a/io/fstat.c
+++ b/io/fstat.c
@@ -10,7 +10,7 @@
License, the Free Software Foundation gives you unlimited
permission to link the compiled version of this file with other
programs, and to distribute those programs without any restriction
- coming from the use of this file. (The Libraty General Public
+ coming from the use of this file. (The Library General Public
License restrictions do apply in other respects; for example, they
cover modification of the file, and distribution when not linked
into another program.)
diff --git a/io/lstat.c b/io/lstat.c
index 84be8f7bfd..9510eac237 100644
--- a/io/lstat.c
+++ b/io/lstat.c
@@ -10,7 +10,7 @@
License, the Free Software Foundation gives you unlimited
permission to link the compiled version of this file with other
programs, and to distribute those programs without any restriction
- coming from the use of this file. (The Libraty General Public
+ coming from the use of this file. (The Library General Public
License restrictions do apply in other respects; for example, they
cover modification of the file, and distribution when not linked
into another program.)
diff --git a/io/mknod.c b/io/mknod.c
index b5d51a203c..8d1dde2546 100644
--- a/io/mknod.c
+++ b/io/mknod.c
@@ -10,7 +10,7 @@
License, the Free Software Foundation gives you unlimited
permission to link the compiled version of this file with other
programs, and to distribute those programs without any restriction
- coming from the use of this file. (The Libraty General Public
+ coming from the use of this file. (The Library General Public
License restrictions do apply in other respects; for example, they
cover modification of the file, and distribution when not linked
into another program.)
diff --git a/io/stat.c b/io/stat.c
index faadce862c..c4d1f53257 100644
--- a/io/stat.c
+++ b/io/stat.c
@@ -10,7 +10,7 @@
License, the Free Software Foundation gives you unlimited
permission to link the compiled version of this file with other
programs, and to distribute those programs without any restriction
- coming from the use of this file. (The Libraty General Public
+ coming from the use of this file. (The Library General Public
License restrictions do apply in other respects; for example, they
cover modification of the file, and distribution when not linked
into another program.)
diff --git a/io/sys/stat.h b/io/sys/stat.h
index 5bc497c671..f51c56aabd 100644
--- a/io/sys/stat.h
+++ b/io/sys/stat.h
@@ -214,8 +214,10 @@ extern __inline__ int stat (__const char *__path, struct stat *__statbuf)
extern __inline__ int __lstat(__const char *__path, struct stat *__statbuf)
{ return __lxstat (_STAT_VER, __path, __statbuf); }
+#if defined(__USE_BSD) || defined(__USE_XOPEN_EXTENDED)
extern __inline__ int lstat(__const char *__path, struct stat *__statbuf)
{ return __lxstat (_STAT_VER, __path, __statbuf); }
+#endif
extern __inline__ int __fstat (int __fd, struct stat *__statbuf)
{ return __fxstat (_STAT_VER, __fd, __statbuf); }
diff --git a/io/utime.h b/io/utime.h
index 9f2f569b11..7ab772b042 100644
--- a/io/utime.h
+++ b/io/utime.h
@@ -27,9 +27,6 @@
__BEGIN_DECLS
-#define __need_NULL
-#include <stddef.h>
-
#include <gnu/types.h>
/* Structure describing file times. */
@@ -46,4 +43,4 @@ extern int utime __P ((__const char *__file,
__END_DECLS
-#endif /* utime.h */
+#endif /* utime.h */
diff --git a/libio/fileops.c b/libio/fileops.c
index dd1f573400..12b2ead125 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -46,7 +46,7 @@ extern int errno;
Putback mode is a variant of get mode.
In a filebuf, there is only one current position, instead of two
- separate get and put pointers. In get mode, the current posistion
+ separate get and put pointers. In get mode, the current position
is that of gptr(); in put mode that of pptr().
The position in the buffer that corresponds to the position
diff --git a/libio/genops.c b/libio/genops.c
index 7679445c2b..3267aa32c9 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -635,7 +635,7 @@ DEFUN_VOID(_IO_cleanup)
/* We currently don't have a reliable mechanism for making sure that
C++ static destructors are executed in the correct order.
- So it is possible that other static destructord might want to
+ So it is possible that other static destructors might want to
write to cout - and they're supposed to be able to do so.
The following will make the standard streambufs be unbuffered,
@@ -691,7 +691,7 @@ DEFUN(_IO_marker_difference, (mark1, mark2),
return mark1->_pos - mark2->_pos;
}
-/* Return difference between MARK and current posistion of MARK's stream. */
+/* Return difference between MARK and current position of MARK's stream. */
int
DEFUN(_IO_marker_delta, (mark),
struct _IO_marker *mark)
diff --git a/libio/iofgetpos.c b/libio/iofgetpos.c
index cae5df7b39..53a359ee76 100644
--- a/libio/iofgetpos.c
+++ b/libio/iofgetpos.c
@@ -24,7 +24,7 @@ the executable file might be covered by the GNU General Public License. */
#include "libioP.h"
#include <errno.h>
-/* ANSI explicily requires setting errno to a positive value on failure. */
+/* ANSI explicitly requires setting errno to a positive value on failure. */
int
_IO_fgetpos (fp, posp)
diff --git a/libio/iofsetpos.c b/libio/iofsetpos.c
index ec913e3e2f..2d29fa7cbb 100644
--- a/libio/iofsetpos.c
+++ b/libio/iofsetpos.c
@@ -36,7 +36,8 @@ _IO_fsetpos (fp, posp)
_IO_flockfile (fp);
if (_IO_seekpos (fp, *posp, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD)
{
- /*ANSI explicily requires setting errno to a positive value on failure.*/
+ /* ANSI explicitly requires setting errno to a positive value on
+ failure. */
#ifdef EIO
if (errno == 0)
__set_errno (EIO);
diff --git a/libio/iovsprintf.c b/libio/iovsprintf.c
index fc01d82ee0..11904e36b3 100644
--- a/libio/iovsprintf.c
+++ b/libio/iovsprintf.c
@@ -40,13 +40,14 @@ _IO_vsprintf (string, format, args)
#ifdef _IO_MTSAFE_IO
sf._sbf._f._lock = &lock;
#endif
- _IO_init ((_IO_FILE *) &sf, 0);
- _IO_JUMPS ((_IO_FILE *) &sf) = &_IO_str_jumps;
+ _IO_init (&sf._sbf._f, 0);
+ _IO_JUMPS (&sf._sbf._f) = &_IO_str_jumps;
+ _IO_str_init_static (&sf._sbf._f, string, -1, string);
_IO_str_init_static ((_IO_FILE *) &sf, string, -1, string);
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, &sf);
- _IO_flockfile ((_IO_FILE *) &sf);
- ret = _IO_vfprintf ((_IO_FILE *) &sf, format, args);
- _IO_putc_unlocked ('\0', (_IO_FILE *) &sf);
+ _IO_flockfile (&sf._sbf._f);
+ ret = _IO_vfprintf (&sf._sbf._f, format, args);
+ _IO_putc_unlocked ('\0', &sf._sbf._f);
_IO_cleanup_region_end (1);
return ret;
}
diff --git a/libio/iovsscanf.c b/libio/iovsscanf.c
index 4a21cce4b0..c0c2ef0bf1 100644
--- a/libio/iovsscanf.c
+++ b/libio/iovsscanf.c
@@ -35,12 +35,12 @@ DEFUN(_IO_vsscanf, (string, format, args),
_IO_lock_t lock;
sf._sbf._f._lock = &lock;
#endif
- _IO_init((_IO_FILE*)&sf, 0);
- _IO_JUMPS((_IO_FILE*)&sf) = &_IO_str_jumps;
- _IO_str_init_static ((_IO_FILE*)&sf, (char*)string, 0, NULL);
+ _IO_init(&sf._sbf._f, 0);
+ _IO_JUMPS(&sf._sbf._f) = &_IO_str_jumps;
+ _IO_str_init_static (&sf._sbf._f, (char*)string, 0, NULL);
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, &sf);
- _IO_flockfile ((_IO_FILE *) &sf);
- ret = _IO_vfscanf((_IO_FILE*)&sf, format, args, NULL);
+ _IO_flockfile (&sf._sbf._f);
+ ret = _IO_vfscanf(&sf._sbf._f, format, args, NULL);
_IO_cleanup_region_end (1);
return ret;
}
diff --git a/libio/libioP.h b/libio/libioP.h
index 4fa3fd911c..c80bdf30c6 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -66,11 +66,11 @@ extern "C" {
* a jump table (of pointers to functions). The pointer is accessed
* with the _IO_JUMPS macro. The jump table has a eccentric format,
* so as to be compatible with the layout of a C++ virtual function table.
- * (as implemented by g++). When a pointer to a steambuf object is
+ * (as implemented by g++). When a pointer to a streambuf object is
* coerced to an (_IO_FILE*), then _IO_JUMPS on the result just
* happens to point to the virtual function table of the streambuf.
* Thus the _IO_JUMPS function table used for C stdio/libio does
- * double duty as the virtual functiuon table for C++ streambuf.
+ * double duty as the virtual function table for C++ streambuf.
*
* The entries in the _IO_JUMPS function table (and hence also the
* virtual functions of a streambuf) are described below.
@@ -112,7 +112,7 @@ typedef int (*_IO_overflow_t) __P((_IO_FILE*, int));
/* The 'underflow' hook tries to fills the get buffer.
It returns the next character (as an unsigned char) or EOF. The next
- character remains in the get buffer, and the get postion is not changed.
+ character remains in the get buffer, and the get position is not changed.
It matches the streambuf::underflow virtual function. */
typedef int (*_IO_underflow_t) __P((_IO_FILE*));
#define _IO_UNDERFLOW(FP) JUMP0(__underflow, FP)
@@ -178,7 +178,7 @@ typedef int (*_IO_doallocate_t) __P((_IO_FILE*));
/* The following four hooks (sysread, syswrite, sysclose, sysseek, and
sysstat) are low-level hooks specific to this implementation.
- There is no correspondance in the ANSI/ISO C++ standard library.
+ There is no correspondence in the ANSI/ISO C++ standard library.
The hooks basically correspond to the Unix system functions
(read, write, close, lseek, and stat) except that a _IO_FILE*
parameter is used instead of a integer file descriptor; the default
@@ -190,21 +190,21 @@ typedef int (*_IO_doallocate_t) __P((_IO_FILE*));
/* The 'sysread' hook is used to read data from the external file into
an existing buffer. It generalizes the Unix read(2) function.
It matches the streambuf::sys_read virtual function, which is
- specific to this implementaion. */
+ specific to this implementation. */
typedef _IO_ssize_t (*_IO_read_t) __P((_IO_FILE*, void*, _IO_ssize_t));
#define _IO_SYSREAD(FP, DATA, LEN) JUMP2(__read, FP, DATA, LEN)
/* The 'syswrite' hook is used to write data from an existing buffer
to an external file. It generalizes the Unix write(2) function.
It matches the streambuf::sys_write virtual function, which is
- specific to this implementaion. */
+ specific to this implementation. */
typedef _IO_ssize_t (*_IO_write_t) __P((_IO_FILE*,const void*,_IO_ssize_t));
#define _IO_SYSWRITE(FP, DATA, LEN) JUMP2(__write, FP, DATA, LEN)
/* The 'sysseek' hook is used to re-position an external file.
It generalizes the Unix lseek(2) function.
It matches the streambuf::sys_seek virtual function, which is
- specific to this implementaion. */
+ specific to this implementation. */
typedef _IO_fpos_t (*_IO_seek_t) __P((_IO_FILE*, _IO_off_t, int));
#define _IO_SYSSEEK(FP, OFFSET, MODE) JUMP2(__seek, FP, OFFSET, MODE)
@@ -218,7 +218,7 @@ typedef int (*_IO_close_t) __P((_IO_FILE*)); /* finalize */
/* The 'sysstat' hook is used to get information about an external file
into a struct stat buffer. It generalizes the Unix fstat(2) call.
It matches the streambuf::sys_stat virtual function, which is
- specific to this implementaion. */
+ specific to this implementation. */
typedef int (*_IO_stat_t) __P((_IO_FILE*, void*));
#define _IO_SYSSTAT(FP, BUF) JUMP1(__stat, FP, BUF)
diff --git a/libio/strops.c b/libio/strops.c
index 281141eba7..31c5df4e80 100644
--- a/libio/strops.c
+++ b/libio/strops.c
@@ -28,7 +28,7 @@ the executable file might be covered by the GNU General Public License. */
#if 0
/* The following definitions are for exposition only.
- They map the terminlogy used in the ANSI/ISO C++ draft standard
+ They map the terminology used in the ANSI/ISO C++ draft standard
to the implementation. */
/* allocated: set when a dynamic array object has been allocated, and
diff --git a/locale/C-collate.c b/locale/C-collate.c
index 0d7be6b7e0..5388237045 100644
--- a/locale/C-collate.c
+++ b/locale/C-collate.c
@@ -1,27 +1,27 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <endian.h>
#include "localeinfo.h"
/* These tables' entries contain values which make the function behave
- accoriding to POSIX.2 Table 2-8 ``LC_COLLATE Category Definition in
+ according to POSIX.2 Table 2-8 ``LC_COLLATE Category Definition in
the POSIX Locale''. */
const u_int32_t _nl_C_LC_COLLATE_symbol_hash[446] =
diff --git a/locale/C-ctype.c b/locale/C-ctype.c
index 0b9f1a0bd2..d45c32c34b 100644
--- a/locale/C-ctype.c
+++ b/locale/C-ctype.c
@@ -1,27 +1,27 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include "localeinfo.h"
#include <endian.h>
/* This table's entries are taken from POSIX.2 Table 2-6
- ``LC_CTYPE Category Definitionin the POSIX Locale''.
+ ``LC_CTYPE Category Definition in the POSIX Locale''.
The `_nl_C_LC_CTYPE_width' array is a GNU extension.
diff --git a/locale/iso-4217.def b/locale/iso-4217.def
index 095ccdf311..46880a2348 100644
--- a/locale/iso-4217.def
+++ b/locale/iso-4217.def
@@ -6,7 +6,7 @@
*
* !!! The list has to be sorted !!!
*/
-DEFINE_INT_CURR("AED ") /* United Arab Emirats */
+DEFINE_INT_CURR("AED ") /* United Arab Emirates */
DEFINE_INT_CURR("AFA ") /* Afghanistan */
DEFINE_INT_CURR("ALL ") /* Albania */
DEFINE_INT_CURR("ANG ") /* Netherlands Antilles */
@@ -91,7 +91,7 @@ DEFINE_INT_CURR("LKR ") /* Sri Lanka */
DEFINE_INT_CURR("LRD ") /* Liberia */
DEFINE_INT_CURR("LSM ") /* Lesotho */
DEFINE_INT_CURR("LTL ") /* Lithuania */
-DEFINE_INT_CURR("LUF ") /* Luxemburg */
+DEFINE_INT_CURR("LUF ") /* Luxembourg */
DEFINE_INT_CURR("LVL ") /* Latvia */
DEFINE_INT_CURR("LYD ") /* Libyan Arab Jamahiriya */
DEFINE_INT_CURR("MAD ") /* Morocco */
diff --git a/locale/locale.h b/locale/locale.h
index 39b04d7270..37f5434de1 100644
--- a/locale/locale.h
+++ b/locale/locale.h
@@ -1,23 +1,23 @@
/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/*
- * ANSI Standard: 4.4 LOCALIZATION <locale.h>
+ * ISO C Standard: 4.4 LOCALIZATION <locale.h>
*/
#ifndef _LOCALE_H
@@ -25,6 +25,9 @@ Cambridge, MA 02139, USA. */
#define _LOCALE_H 1
#include <features.h>
+#define __need_NULL
+#include <stddef.h>
+
__BEGIN_DECLS
/* These are the possibilities for the first argument to setlocale.
@@ -76,9 +79,9 @@ struct lconv
/* Positive and negative sign positions:
0 Parentheses surround the quantity and currency_symbol.
1 The sign string precedes the quantity and currency_symbol.
- 2 The sign string succedes the quantity and currency_symbol.
+ 2 The sign string follows the quantity and currency_symbol.
3 The sign string immediately precedes the currency_symbol.
- 4 The sign string immediately succedes the currency_symbol. */
+ 4 The sign string immediately follows the currency_symbol. */
char p_sign_posn;
char n_sign_posn;
};
@@ -90,6 +93,37 @@ extern char *setlocale __P ((int __category, __const char *__locale));
/* Return the numeric/monetary information for the current locale. */
extern struct lconv *localeconv __P ((void));
+#ifdef __USE_GNU
+/* The concept of one static locale per category is not very well
+ thought out. Many applications will need to process its data using
+ information from several different locales. Another application is
+ the implementation of the internationalization handling in the
+ upcoming ISO C++ standard library. To support this another set of
+ the functions using locale data exist which have an additional
+ argument.
+
+ Attention: all these functions are *not* standardized in any form.
+ This is a proof-of-concept implementation. */
+
+/* Structure for reentrant locale using functions. This is an opaque
+ type for the user level programs. */
+typedef struct locale_data *locale_t[LC_ALL];
+
+/* Return a reference to a data structure representing a set of locale
+ datasets. Unlike for the CATEGORY parameter for `setlocale' the
+ CATEGORY_MASK parameter here uses a single bit for each category.
+ I.e., 1 << LC_CTYPE means to load data for this category. If
+ BASE is non-null the appropriate category information in the BASE
+ record is replaced. */
+extern __const locale_t *__newlocale __P ((int __category_mask,
+ __const char *__locale,
+ __const locale_t *__base));
+
+/* Free the data associated with a locale dataset previously returned
+ by a call to `setlocale_r'. */
+extern void __freelocale __P ((__const locale_t *__dataset));
+#endif
+
__END_DECLS
#endif /* locale.h */
diff --git a/locale/programs/charset.h b/locale/programs/charset.h
index 620e4d54da..eccce9102f 100644
--- a/locale/programs/charset.h
+++ b/locale/programs/charset.h
@@ -1,21 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _CHARSET_H
#define _CHARSET_H
@@ -59,7 +59,7 @@ struct charset_t
/* Prototypes for charmap handling functions. */
struct charset_t *charmap_read (const char *filename);
-/* Prototypes for funciton to insert new character. */
+/* Prototypes for function to insert new character. */
void charset_new_char (struct linereader *lr, struct charset_t *cs, int bytes,
unsigned int value, const char *from, const char *to);
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
index c8741e83cb..19f26c8688 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
@@ -1,21 +1,21 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -119,7 +119,7 @@ struct locale_collate_t
/* What kind of symbol is current element. */
enum coll_symbol kind;
- /* While collecting the weigths we need some temporary space. */
+ /* While collecting the weights we need some temporary space. */
unsigned int current_order;
int *weight_cnt;
unsigned int weight_idx;
@@ -379,8 +379,8 @@ Computing table size for collation information might take a while..."),
= collate->nrules * sizeof (u_int32_t);
/* Another trick here. Describing the collation method needs only a
few bits (3, to be exact). But the binary file should be
- accessible by maschines with both endianesses and so we store both
- information in the same word. */
+ accessible by machines with both endianesses and so we store both
+ forms in the same word. */
for (cnt = 0; cnt < collate->nrules; ++cnt)
table[cnt] = collate->rules[cnt] | SWAPU32 (collate->rules[cnt]);
@@ -646,7 +646,7 @@ Computing table size for collation information might take a while..."),
where N is the number of keys.
If we now choose M to be the next prime bigger than 4 / 3 * N,
- we get the values 4 and 1.85 resp. Because unsuccesful searches
+ we get the values 4 and 1.85 resp. Because unsuccessful searches
are unlikely this is a good value. Formulas: [Knuth, The Art of
Computer Programming, Volume 3, Sorting and Searching, 1973,
Addison Wesley] */
@@ -880,7 +880,7 @@ Computing table size for collation information might take a while..."),
symbols_class_ob[cnt] = SWAPU32 (symbols_class[cnt]);
- /* Store table adresses and lengths. */
+ /* Store table addresses and lengths. */
#if __BYTE_ORDER == __BIG_ENDIAN
iov[2 + _NL_ITEM_INDEX (_NL_COLLATE_TABLE_EB)].iov_base = table;
iov[2 + _NL_ITEM_INDEX (_NL_COLLATE_TABLE_EB)].iov_len
@@ -1659,7 +1659,7 @@ collate_simple_weight (struct linereader *lr, struct localedef_t *locale,
case tok_string:
/* This can become difficult. We have to get the weights which
- correspind the the single wide chars in the string. But some
+ correspond to the single wide chars in the string. But some
of the `chars' might not be real characters, but collation
elements or symbols. And so the string decoder might have
signaled errors. The string at this point is not translated.
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index bc3e391ace..fb352e53ed 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -1119,7 +1119,7 @@ character `%s' not defined while needed as default value"),
}
if (ctype->toupper_done == 0)
- /* "If this keyword [toupper] is not spcified, the lowercase letters
+ /* "If this keyword [toupper] is not specified, the lowercase letters
`a' through `z', and their corresponding uppercase letters `A' to
`Z', ..., shall automatically be included, with implementation-
defined character values." [P1003.2, 2.5.2.1] */
@@ -1181,16 +1181,17 @@ allocate_arrays (struct locale_ctype_t *ctype, struct charset_t *charset)
{
size_t idx;
- /* First we have to decide how we organize the arrays. It is easy for
- a one-byte character set. But multi-byte character set cannot be
- stored flat because they might be sparsly used. So we determine an
- optimal hashing function for the used characters.
-
- We use a very trivial hashing function to store the sparse table.
- CH % TABSIZE is used as an index. To solve multiple hits we have
- N planes. This gurantees a fixed search time for a character [N
- / 2]. In the following code we determine the minmum value for
- TABSIZE * N, where TABSIZE >= 256. */
+ /* First we have to decide how we organize the arrays. It is easy
+ for a one-byte character set. But multi-byte character set
+ cannot be stored flat because the chars might be sparsely used.
+ So we determine an optimal hashing function for the used
+ characters.
+
+ We use a very trivial hashing function to store the sparse
+ table. CH % TABSIZE is used as an index. To solve multiple hits
+ we have N planes. This guarantees a fixed search time for a
+ character [N / 2]. In the following code we determine the minmum
+ value for TABSIZE * N, where TABSIZE >= 256. */
size_t min_total = UINT_MAX;
size_t act_size = 256;
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
index 6be7309ae9..abd21dbc59 100644
--- a/locale/programs/ld-time.c
+++ b/locale/programs/ld-time.c
@@ -1,21 +1,21 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -260,7 +260,7 @@ time_finish (struct localedef_t *locale)
}
}
- /* Next is the stoping date in ISO format. */
+ /* Next is the stopping date in ISO format. */
if (strncmp (str, "-*", 2) == 0)
{
time->era_entries[idx].stop_date[0] =
diff --git a/locale/programs/locale.c b/locale/programs/locale.c
index fa824fb96c..9a2c6c4aa1 100644
--- a/locale/programs/locale.c
+++ b/locale/programs/locale.c
@@ -1,22 +1,22 @@
/* locale - Implementation of the locale program according to POSIX 1003.2
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -145,7 +145,7 @@ main (int argc, char *argv[])
show_keyword_name = 0;
/* Set locale. Do not set LC_ALL because the other categories must
- not be affected (acccording to POSIX.2). */
+ not be affected (according to POSIX.2). */
setlocale (LC_CTYPE, "");
setlocale (LC_MESSAGES, "");
@@ -446,7 +446,7 @@ show_info (const char *name)
}
}
- /* When we get to here the name is not standard ones. For testing
- and perhpas advanced use we allow some more symbols. */
+ /* The name is not a standard one.
+ For testing and perhaps advanced use allow some more symbols. */
locale_special (name, show_category_name, show_keyword_name);
}
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
index 997126b625..e9b934c533 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
@@ -112,14 +112,14 @@ main (int argc, char *argv[])
struct localedef_t *localedef;
struct copy_def_list_t *act_add_locdef;
- /* Set initial values for global varaibles. */
+ /* Set initial values for global variables. */
copy_list = NULL;
posix_conformance = getenv ("POSIXLY_CORRECT") != NULL;
error_print_progname = error_print;
verbose = 0;
/* Set locale. Do not set LC_ALL because the other categories must
- not be affected (acccording to POSIX.2). */
+ not be affected (according to POSIX.2). */
setlocale (LC_MESSAGES, "");
setlocale (LC_CTYPE, "");
@@ -187,7 +187,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
/* Help is requested. */
if (do_help)
/* Possible violation: POSIX.2 4.35.8 defines the return value 0 as
- "No errors occured and the locale(s) were successfully created."
+ "No errors occurred and the locale(s) were successfully created."
But giving a other value than 0 does not make sense here. It
is perhaps not that important because POSIX does not specify the
-h option for localedef. */
@@ -424,7 +424,7 @@ error_print ()
/* The parameter to localedef describes the output path. If it does
- contain a '/' character it is a relativ path. Otherwise it names the
+ contain a '/' character it is a relative path. Otherwise it names the
locale this definition is for. */
static const char *
construct_output_path (char *path)
diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
index 97629e5132..4717fe22bd 100644
--- a/locale/programs/locfile.c
+++ b/locale/programs/locfile.c
@@ -1,21 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -628,7 +628,7 @@ syntax error in `order_start' directive"));
}
/* If no argument to `order_start' is given, one `forward'
- argument is implicitely assumed. */
+ argument is implicitly assumed. */
if (cnt == 0)
collate_new_order (ldfile, result, sort_forward);
diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
index a0fe06b674..003082ca61 100644
--- a/locale/programs/locfile.h
+++ b/locale/programs/locfile.h
@@ -1,21 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _LOCFILE_H
#define _LOCFILE_H
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
#include "charset.h"
-/* Opaque types for the different loales. */
+/* Opaque types for the different locales. */
struct locale_ctype_t;
struct locale_collate_t;
struct locale_monetary_t;
diff --git a/locale/weight.h b/locale/weight.h
index c7a9f96c24..1b7b6eae81 100644
--- a/locale/weight.h
+++ b/locale/weight.h
@@ -1,21 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Written by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
+ This file is part of the GNU C Library.
+ Written by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <alloca.h>
#include <langinfo.h>
@@ -41,8 +41,8 @@ typedef struct weight_t
} weight_t;
-/* The following five macros grant access to the non-byte order
- dependend values in the collate locale file. */
+/* The following five macros grant access to the values in the
+ collate locale file that do not depend on byte order. */
#define collate_nrules \
(_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES))
#define collate_hash_size \
diff --git a/login/logwtmp.c b/login/logwtmp.c
index 0d5e48e51f..876388323f 100644
--- a/login/logwtmp.c
+++ b/login/logwtmp.c
@@ -67,7 +67,7 @@ logwtmp (const char *line, const char *name, const char *host)
__flock (fd, LOCK_EX | LOCK_NB);
}
- /* Remeber original size of log file: */
+ /* Remember original size of log file: */
if (__fstat (fd, &st) < 0)
goto done;
diff --git a/login/pty.h b/login/pty.h
index da78742cf7..09024a787a 100644
--- a/login/pty.h
+++ b/login/pty.h
@@ -1,21 +1,21 @@
-/* pty.h - Functions for pseudo TTY handlung.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+/* pty.h - Functions for pseudo TTY handling.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _PTY_H
diff --git a/mach/Makefile b/mach/Makefile
index f7f0c09420..986c2dad51 100644
--- a/mach/Makefile
+++ b/mach/Makefile
@@ -130,7 +130,7 @@ $(objpfx)mach-shortcuts.h: $(objpfx)mach/mach_interface.h \
$(objpfx)mach/mach_port.h
# The first line gets us one paragraph per line, with @s separating real lines.
# The second line selects paragraphs for the shortcutted functions.
-# The third line removes `_rpc' from the names and rerealifies the lines.
+# The third line removes `_rpc' from the names and reconstitutes the lines.
cat $^ | tr \\012 @ | sed s/@@/@%/g | tr % \\012 \
| grep '^/\* Routine [a-z0-9_]*_rpc \*/' \
| sed 's/_rpc//g' | tr @ \\012 > $@-new
diff --git a/mach/err_kern.sub b/mach/err_kern.sub
index d5290b4e9b..e2e498d2b7 100644
--- a/mach/err_kern.sub
+++ b/mach/err_kern.sub
@@ -1,48 +1,54 @@
-/*
+/*
* Mach Operating System
* Copyright (c) 1991,1990,1989 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*/
/*
* HISTORY
* $Log$
+ * Revision 1.5 1996/12/20 01:32:34 drepper
+ * Update from main archive 961219
+ *
+ * Revision 1.5 1996/12/19 20:23:39 drepper
+ * Spelling corrections.
+ *
* Revision 1.4 1993/12/17 06:14:52 mib
* entered into RCS
*
* Revision 2.3 92/04/01 19:38:02 rpd
* Added err_codes_device.
* [92/03/09 rpd]
- *
+ *
* Revision 2.2 92/01/16 00:08:50 rpd
* Moved from user collection to mk collection.
- *
+ *
* Revision 2.3 91/08/29 15:51:22 rpd
* Updated err_codes_kern.
* [91/08/15 rpd]
- *
+ *
* Revision 2.2 91/03/27 16:05:27 mrt
* First checkin
- *
+ *
*/
/*
* File: err_kern.sub
@@ -130,12 +136,12 @@ static char * err_codes_unix[] = {
"(os/unix) result is out of range",
"(os/unix) operation on device would block",
"(os/unix) operation is now in progress",
- "(os/unix) operation is already in progress",
+ "(os/unix) operation is already in progress",
"(os/unix) socket operation attempted on non-socket object",
"(os/unix) destination address is required",
"(os/unix) message is too long",
"(os/unix) protocol type is incorrect for socket",
- "(os/unix) protocol type is not availaible",
+ "(os/unix) protocol type is not available",
"(os/unix) protocol type is not supported",
"(os/unix) socket type is not supported",
"(os/unix) operation is not supported on sockets",
diff --git a/mach/mach/error.h b/mach/mach/error.h
index e75ccf3f66..83cf61ef8f 100644
--- a/mach/mach/error.h
+++ b/mach/mach/error.h
@@ -3,71 +3,77 @@
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
* HISTORY
* $Log$
+ * Revision 1.2 1996/12/20 01:32:36 drepper
+ * Update from main archive 961219
+ *
+ * Revision 1.2 1996/12/19 20:23:56 drepper
+ * Spelling corrections.
+ *
* Revision 1.1 1993/12/17 21:40:28 roland
* entered into RCS
*
* Revision 2.6 93/01/14 17:41:31 danner
* Standardized include symbol name.
* [92/06/10 pds]
- *
+ *
* Revision 2.5 92/03/31 15:18:11 rpd
* Added err_bootstrap for bootstrap errors.
* [92/03/09 rpd]
- *
+ *
* Revision 2.4 91/05/14 16:51:24 mrt
* Correcting copyright
- *
+ *
* Revision 2.3 91/02/05 17:31:48 mrt
* Changed to new Mach copyright
* [91/02/01 17:16:50 mrt]
- *
+ *
* Revision 2.2 90/06/02 14:57:47 rpd
* Added err_mach_ipc for new IPC.
* [90/03/26 22:28:42 rpd]
- *
+ *
* Revision 2.1 89/08/03 16:02:07 rwd
* Created.
- *
+ *
* Revision 2.4 89/02/25 18:13:18 gm0w
* Changes for cleanup.
- *
+ *
* Revision 2.3 89/02/07 00:51:57 mwyoung
* Relocated from sys/error.h
- *
+ *
* Revision 2.2 88/10/18 00:37:31 mwyoung
- * Added {system,sub and code}_emask
+ * Added {system,sub and code}_emask
* [88/10/17 17:06:58 mrt]
- *
- * Added {system,sub and code}_emask
+ *
+ * Added {system,sub and code}_emask
*
* 12-May-88 Mary Thompson (mrt) at Carnegie Mellon
* Changed mach_error_t from unsigned int to kern_return_t
* which is a 32 bit integer regardless of machine type.
- * insigned int was incompatible with old usages of mach_error.
+ * unsigned int was incompatible with old usages of mach_error.
*
* 10-May-88 Douglas Orr (dorr) at Carnegie-Mellon University
* Missing endif replaced
diff --git a/mach/mach/mach_traps.h b/mach/mach/mach_traps.h
index e741e16996..17fee75fae 100644
--- a/mach/mach/mach_traps.h
+++ b/mach/mach/mach_traps.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Declare the few Mach system calls (except mach_msg, in <mach/message.h>).
This does not include the kernel RPC shortcut calls (in <mach-shortcuts.h>).
@@ -52,12 +52,12 @@ extern boolean_t __swtch (void);
/* Attempt to context switch the current thread off the processor. Lower
the thread's priority as much as possible. The thread's priority will
- be restored when it runs again. PRIORITY is currently unused. Return
+ be restored when it runs again. PRIORITY is currently unused. Return
true if there are other threads that can be run and false if not. */
extern boolean_t swtch_pri (int priority);
extern boolean_t __swtch_pri (int priority);
-/* Attempt to context switch the current thread of the rpocessor. Try
+/* Attempt to context switch the current thread of the processor. Try
to run NEW_THREAD next, ignoring normal scheduling policies. The
OPTION value comes from <mach/thread_switch.h>. If OPTION is
SWITCH_OPTION_WAIT, then block the current thread for TIME
@@ -67,7 +67,7 @@ extern boolean_t __swtch_pri (int priority);
kern_return_t thread_switch (mach_port_t new_thread, int option, int time);
kern_return_t __thread_switch (mach_port_t new_thread, int option, int time);
-/* Block the current thread until the kernel (or device) event
+/* Block the current thread until the kernel (or device) event
identified by EVENT occurs. */
kern_return_t evc_wait (unsigned int event);
kern_return_t __evc_wait (unsigned int event);
diff --git a/mach/msgserver.c b/mach/msgserver.c
index da64b89c94..c11ea9a699 100644
--- a/mach/msgserver.c
+++ b/mach/msgserver.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Based on CMU's mach_msg_server.c revision 2.4 of 91/05/14, and thus
under the following copyright. Rewritten by Roland McGrath (FSF)
@@ -49,6 +49,12 @@ Cambridge, MA 02139, USA. */
/*
* HISTORY
* $Log$
+ * Revision 1.5 1996/12/20 01:32:35 drepper
+ * Update from main archive 961219
+ *
+ * Revision 1.5 1996/12/19 20:23:45 drepper
+ * Spelling corrections.
+ *
* Revision 1.4 1996/01/29 15:44:23 roland
* Declare DEMUX arg with prototype.
*
@@ -162,7 +168,7 @@ __mach_msg_server_timeout (boolean_t (*demux) (mach_msg_header_t *request,
{
case MACH_RCV_TOO_LARGE:
/* The request message is larger than MAX_SIZE, and has not
- been dequued. The message header has the actual size of
+ been dequeued. The message header has the actual size of
the message. We recurse here in hopes that the compiler
will optimize the tail-call and allocate some more stack
space instead of way too much. */
@@ -171,7 +177,7 @@ __mach_msg_server_timeout (boolean_t (*demux) (mach_msg_header_t *request,
case MACH_SEND_INVALID_DEST:
/* The reply can't be delivered, so destroy it. This error
- indicates only that the requestor went away, so we
+ indicates only that the requester went away, so we
continue and get the next request. */
__mach_msg_destroy (&request->Head);
break;
diff --git a/malloc/Makefile b/malloc/Makefile
index 63fe786168..c98bea686c 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -27,15 +27,27 @@ dist-headers := malloc.h
headers := $(dist-headers) obstack.h
tests := mallocbug
-distribute = thread-m.h
+distribute = thread-m.h mtrace.awk
# Things which get pasted together into gmalloc.c.
gmalloc-routines := malloc morecore
# Things to include in the standalone distribution.
-dist-routines = $(gmalloc-routines)
+dist-routines = $(gmalloc-routines) mcheck mtrace
routines = $(dist-routines) obstack
+install-lib := libmcheck.a
+non-lib.a := libmcheck.a
+
+# These should be removed by `make clean'.
+extra-objs = mcheck-init.o libmcheck.a
+
include ../Rules
+$(objpfx)libmcheck.a: $(objpfx)mcheck-init.o
+ -rm -f $@
+ ln $< $@
+
+lib: $(objpfx)libmcheck.a
+
+
CPPFLAGS-malloc.o += -DMALLOC_DEBUG
-CFLAGS-obstack.c = -Wno-strict-prototypes
diff --git a/malloc/malloc.c b/malloc/malloc.c
index c2a94a4f8d..840655f4db 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -140,7 +140,7 @@
Maximum overhead wastage per allocated chunk: normally 15 bytes
- Alignnment demands, plus the minimum allocatable size restriction
+ Alignment demands, plus the minimum allocatable size restriction
make the normal worst-case wastage 15 bytes (i.e., up to 15
more bytes will be allocated than were requested in malloc), with
two exceptions:
@@ -343,7 +343,7 @@ extern "C" {
checking is fairly extensive, and will slow down execution
noticeably. Calling malloc_stats or mallinfo with MALLOC_DEBUG set will
attempt to check every non-mmapped allocated and free chunk in the
- course of computing the summmaries. (By nature, mmapped regions
+ course of computing the summaries. (By nature, mmapped regions
cannot be checked very much automatically.)
Setting MALLOC_DEBUG may also be helpful if you are trying to modify
@@ -999,7 +999,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
the malloc code, but "mem" is the pointer that is returned to the
user. "Nextchunk" is the beginning of the next contiguous chunk.
- Chunks always begin on even word boundries, so the mem portion
+ Chunks always begin on even word boundaries, so the mem portion
(which is returned to the user) is also on an even word boundary, and
thus double-word aligned.
@@ -1144,7 +1144,7 @@ typedef struct _arena {
} arena;
-/* A heap is a single contiguous memory region holding (coalescable)
+/* A heap is a single contiguous memory region holding (coalesceable)
malloc_chunks. It is allocated with mmap() and always starts at an
address aligned to HEAP_MAX_SIZE. Not used unless compiling for
multiple threads. */
@@ -1489,6 +1489,8 @@ static unsigned long max_mmapped_mem = 0;
+/* Already initialized? */
+int __malloc_initialized;
/* Initialization routine. */
@@ -1504,13 +1506,12 @@ void
ptmalloc_init __MALLOC_P((void))
#endif
{
- static int first = 1;
#if defined(_LIBC) || defined(MALLOC_HOOKS)
const char* s;
#endif
- if(!first) return;
- first = 0;
+ if(__malloc_initialized) return;
+ __malloc_initialized = 1;
#if defined(_LIBC)
/* Initialize the pthreads interface. */
if (__pthread_initialize != NULL)
@@ -3589,7 +3590,7 @@ dump_heap(heap) heap_info *heap;
malloc_stats:
- For all arenas seperately and in total, prints on stderr the
+ For all arenas separately and in total, prints on stderr the
amount of space obtained from the system, and the current number
of bytes allocated via malloc (or realloc, etc) but not yet
freed. (Note that this is the number of bytes allocated, not the
@@ -3964,10 +3965,10 @@ History:
Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
* Use last_remainder in more cases.
* Pack bins using idea from colin@nyx10.cs.du.edu
- * Use ordered bins instead of best-fit threshhold
+ * Use ordered bins instead of best-fit threshold
* Eliminate block-local decls to simplify tracing and debugging.
* Support another case of realloc via move into top
- * Fix error occuring when initial sbrk_base not word-aligned.
+ * Fix error occurring when initial sbrk_base not word-aligned.
* Rely on page size for units instead of SBRK_UNIT to
avoid surprises about sbrk alignment conventions.
* Add mallinfo, mallopt. Thanks to Raymond Nijssen
diff --git a/malloc/malloc.h b/malloc/malloc.h
index ad36ca7592..ddbc694491 100644
--- a/malloc/malloc.h
+++ b/malloc/malloc.h
@@ -73,6 +73,9 @@
extern "C" {
#endif
+/* Nonzero if the malloc is already initialized. */
+extern int __malloc_initialized;
+
/* Initialize global configuration. Not needed with GNU libc. */
#ifndef __GLIBC__
extern void ptmalloc_init __MALLOC_P ((void));
diff --git a/malloc/mcheck-init.c b/malloc/mcheck-init.c
new file mode 100644
index 0000000000..a1cb7c9e39
--- /dev/null
+++ b/malloc/mcheck-init.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* The object of this file should be installed as libmcheck.a,
+ so one can do -lmcheck to turn on mcheck. */
+
+#include <malloc.h>
+
+static void
+turn_on_mcheck __P ((void))
+{
+ mcheck (NULL);
+}
+
+void (*__malloc_initialize_hook) __P ((void)) = turn_on_mcheck;
diff --git a/malloc/mcheck.c b/malloc/mcheck.c
new file mode 100644
index 0000000000..7f1112ea8b
--- /dev/null
+++ b/malloc/mcheck.c
@@ -0,0 +1,232 @@
+/* Standard debugging hooks for `malloc'.
+ Copyright (C) 1990,91,92,93,94,95,96 Free Software Foundation, Inc.
+ Written May 1989 by Mike Haertel.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+ The author may be reached (Email) at the address mike@ai.mit.edu,
+ or (US mail) as Mike Haertel c/o Free Software Foundation. */
+
+#ifndef _MALLOC_INTERNAL
+#define _MALLOC_INTERNAL
+#include <malloc.h>
+#include <mcheck.h>
+#include <stdio.h>
+#endif
+
+/* Old hook values. */
+static void (*old_free_hook) __P ((__ptr_t ptr));
+static __ptr_t (*old_malloc_hook) __P ((__malloc_size_t size));
+static __ptr_t (*old_realloc_hook) __P ((__ptr_t ptr, __malloc_size_t size));
+
+/* Function to call when something awful happens. */
+static void (*abortfunc) __P ((enum mcheck_status));
+
+/* Arbitrary magical numbers. */
+#define MAGICWORD 0xfedabeeb
+#define MAGICFREE 0xd8675309
+#define MAGICBYTE ((char) 0xd7)
+#define MALLOCFLOOD ((char) 0x93)
+#define FREEFLOOD ((char) 0x95)
+
+struct hdr
+ {
+ __malloc_size_t size; /* Exact size requested by user. */
+ unsigned long int magic; /* Magic number to check header integrity. */
+ };
+
+#if defined(_LIBC) || defined(STDC_HEADERS) || defined(USG)
+#define flood memset
+#else
+static void flood __P ((__ptr_t, int, __malloc_size_t));
+static void
+flood (ptr, val, size)
+ __ptr_t ptr;
+ int val;
+ __malloc_size_t size;
+{
+ char *cp = ptr;
+ while (size--)
+ *cp++ = val;
+}
+#endif
+
+static enum mcheck_status checkhdr __P ((const struct hdr *));
+static enum mcheck_status
+checkhdr (hdr)
+ const struct hdr *hdr;
+{
+ enum mcheck_status status;
+ switch (hdr->magic)
+ {
+ default:
+ status = MCHECK_HEAD;
+ break;
+ case MAGICFREE:
+ status = MCHECK_FREE;
+ break;
+ case MAGICWORD:
+ if (((char *) &hdr[1])[hdr->size] != MAGICBYTE)
+ status = MCHECK_TAIL;
+ else
+ status = MCHECK_OK;
+ break;
+ }
+ if (status != MCHECK_OK)
+ (*abortfunc) (status);
+ return status;
+}
+
+static void freehook __P ((__ptr_t));
+static void
+freehook (ptr)
+ __ptr_t ptr;
+{
+ if (ptr)
+ {
+ struct hdr *hdr = ((struct hdr *) ptr) - 1;
+ checkhdr (hdr);
+ hdr->magic = MAGICFREE;
+ flood (ptr, FREEFLOOD, hdr->size);
+ ptr = (__ptr_t) hdr;
+ }
+ __free_hook = old_free_hook;
+ free (ptr);
+ __free_hook = freehook;
+}
+
+static __ptr_t mallochook __P ((__malloc_size_t));
+static __ptr_t
+mallochook (size)
+ __malloc_size_t size;
+{
+ struct hdr *hdr;
+
+ __malloc_hook = old_malloc_hook;
+ hdr = (struct hdr *) malloc (sizeof (struct hdr) + size + 1);
+ __malloc_hook = mallochook;
+ if (hdr == NULL)
+ return NULL;
+
+ hdr->size = size;
+ hdr->magic = MAGICWORD;
+ ((char *) &hdr[1])[size] = MAGICBYTE;
+ flood ((__ptr_t) (hdr + 1), MALLOCFLOOD, size);
+ return (__ptr_t) (hdr + 1);
+}
+
+static __ptr_t reallochook __P ((__ptr_t, __malloc_size_t));
+static __ptr_t
+reallochook (ptr, size)
+ __ptr_t ptr;
+ __malloc_size_t size;
+{
+ struct hdr *hdr;
+ __malloc_size_t osize;
+
+ if (ptr)
+ {
+ hdr = ((struct hdr *) ptr) - 1;
+ osize = hdr->size;
+
+ checkhdr (hdr);
+ if (size < osize)
+ flood ((char *) ptr + size, FREEFLOOD, osize - size);
+ }
+ else
+ {
+ osize = 0;
+ hdr = NULL;
+ }
+ __free_hook = old_free_hook;
+ __malloc_hook = old_malloc_hook;
+ __realloc_hook = old_realloc_hook;
+ hdr = (struct hdr *) realloc ((__ptr_t) hdr, sizeof (struct hdr) + size + 1);
+ __free_hook = freehook;
+ __malloc_hook = mallochook;
+ __realloc_hook = reallochook;
+ if (hdr == NULL)
+ return NULL;
+
+ hdr->size = size;
+ hdr->magic = MAGICWORD;
+ ((char *) &hdr[1])[size] = MAGICBYTE;
+ if (size > osize)
+ flood ((char *) (hdr + 1) + osize, MALLOCFLOOD, size - osize);
+ return (__ptr_t) (hdr + 1);
+}
+
+static void mabort __P ((enum mcheck_status status));
+static void
+mabort (status)
+ enum mcheck_status status;
+{
+ const char *msg;
+ switch (status)
+ {
+ case MCHECK_OK:
+ msg = _("memory is consistent, library is buggy");
+ break;
+ case MCHECK_HEAD:
+ msg = _("memory clobbered before allocated block");
+ break;
+ case MCHECK_TAIL:
+ msg = _("memory clobbered past end of allocated block");
+ break;
+ case MCHECK_FREE:
+ msg = _("block freed twice");
+ break;
+ default:
+ msg = _("bogus mcheck_status, library is buggy");
+ break;
+ }
+#ifdef _LIBC
+ __libc_fatal (msg);
+#else
+ fprintf (stderr, "mcheck: %s\n", msg);
+ fflush (stderr);
+ abort ();
+#endif
+}
+
+static int mcheck_used = 0;
+
+int
+mcheck (func)
+ void (*func) __P ((enum mcheck_status));
+{
+ abortfunc = (func != NULL) ? func : &mabort;
+
+ /* These hooks may not be safely inserted if malloc is already in use. */
+ if (!__malloc_initialized && !mcheck_used)
+ {
+ old_free_hook = __free_hook;
+ __free_hook = freehook;
+ old_malloc_hook = __malloc_hook;
+ __malloc_hook = mallochook;
+ old_realloc_hook = __realloc_hook;
+ __realloc_hook = reallochook;
+ mcheck_used = 1;
+ }
+
+ return mcheck_used ? 0 : -1;
+}
+
+enum mcheck_status
+mprobe (__ptr_t ptr)
+{
+ return mcheck_used ? checkhdr (ptr) : MCHECK_DISABLED;
+}
diff --git a/malloc/mcheck.h b/malloc/mcheck.h
new file mode 100644
index 0000000000..17ab0a9ced
--- /dev/null
+++ b/malloc/mcheck.h
@@ -0,0 +1,70 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _MCHECK_H
+#define _MCHECK_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
+#undef __P
+#define __P(args) args
+#undef __ptr_t
+#define __ptr_t void *
+#else /* Not C++ or ANSI C. */
+#undef __P
+#define __P(args) ()
+#undef __ptr_t
+#define __ptr_t char *
+#endif /* C++ or ANSI C. */
+
+
+/* Return values for `mprobe': these are the kinds of inconsistencies that
+ `mcheck' enables detection of. */
+enum mcheck_status
+ {
+ MCHECK_DISABLED = -1, /* Consistency checking is not turned on. */
+ MCHECK_OK, /* Block is fine. */
+ MCHECK_FREE, /* Block freed twice. */
+ MCHECK_HEAD, /* Memory before the block was clobbered. */
+ MCHECK_TAIL /* Memory after the block was clobbered. */
+ };
+
+
+/* Activate a standard collection of debugging hooks. This must be called
+ before `malloc' is ever called. ABORTFUNC is called with an error code
+ (see enum above) when an inconsistency is detected. If ABORTFUNC is
+ null, the standard function prints on stderr and then calls `abort'. */
+extern int mcheck __P ((void (*__abortfunc) __P ((enum mcheck_status))));
+
+/* Check for aberrations in a particular malloc'd block. You must have
+ called `mcheck' already. These are the same checks that `mcheck' does
+ when you free or reallocate a block. */
+extern enum mcheck_status mprobe __P ((__ptr_t __ptr));
+
+/* Activate a standard collection of tracing hooks. */
+extern void mtrace __P ((void));
+extern void muntrace __P ((void));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* mcheck.h */
diff --git a/malloc/mtrace.awk b/malloc/mtrace.awk
new file mode 100644
index 0000000000..06844d1a4b
--- /dev/null
+++ b/malloc/mtrace.awk
@@ -0,0 +1,50 @@
+#
+# Awk program to analyze mtrace.c output.
+#
+{
+ if ($1 == "@") {
+ where = " (" $2 ")"
+ n = 3
+ } else {
+ where = ""
+ n = 1
+ }
+ if ($n == "+") {
+ if (allocated[$(n+1)] != "")
+ print "+", $(n+1), "Alloc", NR, "duplicate:", allocated[$(n+1)], wherewas[$(n+1)], where;
+ else {
+ wherewas[$(n+1)] = where;
+ allocated[$(n+1)] = $(n+2);
+ }
+ } else if ($n == "-") {
+ if (allocated[$(n+1)] != "") {
+ wherewas[$(n+1)] = "";
+ allocated[$(n+1)] = "";
+ if (allocated[$(n+1)] != "")
+ print "DELETE FAILED", $(n+1), allocated[$(n+1)];
+ } else
+ print "-", $(n+1), "Free", NR, "was never alloc'd", where;
+ } else if ($n == "<") {
+ if (allocated[$(n+1)] != "") {
+ wherewas[$(n+1)] = "";
+ allocated[$(n+1)] = "";
+ } else
+ print "-", $(n+1), "Realloc", NR, "was never alloc'd", where;
+ } else if ($n == ">") {
+ if (allocated[$(n+1)] != "")
+ print "+", $(n+1), "Realloc", NR, "duplicate:", allocated[$(n+1)], where;
+ else {
+ wherewas[$(n+1)] = $(n+2);
+ allocated[$(n+1)] = $(n+2);
+ }
+ } else if ($n == "=") {
+ # Ignore "= Start"
+ } else if ($n == "!") {
+ # Ignore failed realloc attempts for now
+ }
+}
+END {
+ for (x in allocated)
+ if (allocated[x] != "")
+ print "+", x, allocated[x], wherewas[x];
+}
diff --git a/malloc/mtrace.c b/malloc/mtrace.c
new file mode 100644
index 0000000000..35380a09a1
--- /dev/null
+++ b/malloc/mtrace.c
@@ -0,0 +1,211 @@
+/* More debugging hooks for `malloc'.
+ Copyright (C) 1991, 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
+ Written April 2, 1991 by John Gilmore of Cygnus Support.
+ Based on mcheck.c by Mike Haertel.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+ The author may be reached (Email) at the address mike@ai.mit.edu,
+ or (US mail) as Mike Haertel c/o Free Software Foundation. */
+
+#ifndef _MALLOC_INTERNAL
+#define _MALLOC_INTERNAL
+#include <malloc.h>
+#include <mcheck.h>
+#include <libc-lock.h>
+#endif
+
+#include <stdio.h>
+
+#ifndef __GNU_LIBRARY__
+extern char *getenv ();
+#else
+#include <stdlib.h>
+#endif
+
+static FILE *mallstream;
+static char mallenv[]= "MALLOC_TRACE";
+static char mallbuf[BUFSIZ]; /* Buffer for the output. */
+
+__libc_lock_define_initialized (static, lock);
+
+/* Address to breakpoint on accesses to... */
+__ptr_t mallwatch;
+
+/* File name and line number information, for callers that had
+ the foresight to call through a macro. */
+char *_mtrace_file;
+int _mtrace_line;
+
+/* Old hook values. */
+static void (*tr_old_free_hook) __P ((__ptr_t ptr));
+static __ptr_t (*tr_old_malloc_hook) __P ((__malloc_size_t size));
+static __ptr_t (*tr_old_realloc_hook) __P ((__ptr_t ptr, __malloc_size_t size));
+
+/* This function is called when the block being alloc'd, realloc'd, or
+ freed has an address matching the variable "mallwatch". In a debugger,
+ set "mallwatch" to the address of interest, then put a breakpoint on
+ tr_break. */
+
+void tr_break __P ((void));
+void
+tr_break ()
+{
+}
+
+static void tr_where __P ((void));
+static void
+tr_where ()
+{
+ if (_mtrace_file)
+ {
+ fprintf (mallstream, "@ %s:%d ", _mtrace_file, _mtrace_line);
+ _mtrace_file = NULL;
+ }
+}
+
+static void tr_freehook __P ((__ptr_t));
+static void
+tr_freehook (ptr)
+ __ptr_t ptr;
+{
+ tr_where ();
+ fprintf (mallstream, "- %p\n", ptr); /* Be sure to print it first. */
+ if (ptr == mallwatch)
+ tr_break ();
+ __libc_lock_lock (lock);
+ __free_hook = tr_old_free_hook;
+ free (ptr);
+ __free_hook = tr_freehook;
+ __libc_lock_unlock (lock);
+}
+
+static __ptr_t tr_mallochook __P ((__malloc_size_t));
+static __ptr_t
+tr_mallochook (size)
+ __malloc_size_t size;
+{
+ __ptr_t hdr;
+
+ __libc_lock_lock (lock);
+
+ __malloc_hook = tr_old_malloc_hook;
+ hdr = (__ptr_t) malloc (size);
+ __malloc_hook = tr_mallochook;
+
+ __libc_lock_unlock (lock);
+
+ tr_where ();
+ /* We could be printing a NULL here; that's OK. */
+ fprintf (mallstream, "+ %p %lx\n", hdr, (unsigned long)size);
+
+ if (hdr == mallwatch)
+ tr_break ();
+
+ return hdr;
+}
+
+static __ptr_t tr_reallochook __P ((__ptr_t, __malloc_size_t));
+static __ptr_t
+tr_reallochook (ptr, size)
+ __ptr_t ptr;
+ __malloc_size_t size;
+{
+ __ptr_t hdr;
+
+ if (ptr == mallwatch)
+ tr_break ();
+
+ __libc_lock_lock (lock);
+
+ __free_hook = tr_old_free_hook;
+ __malloc_hook = tr_old_malloc_hook;
+ __realloc_hook = tr_old_realloc_hook;
+ hdr = (__ptr_t) realloc (ptr, size);
+ __free_hook = tr_freehook;
+ __malloc_hook = tr_mallochook;
+ __realloc_hook = tr_reallochook;
+
+ __libc_lock_unlock (lock);
+
+ tr_where ();
+ if (hdr == NULL)
+ /* Failed realloc. */
+ fprintf (mallstream, "! %p %lx\n", ptr, (unsigned long)size);
+ else if (ptr == NULL)
+ fprintf (mallstream, "+ %p %lx\n", hdr, (unsigned long)size);
+ else
+ fprintf (mallstream, "< %p\n> %p %lx\n", ptr, hdr, (unsigned long)size);
+
+ if (hdr == mallwatch)
+ tr_break ();
+
+ return hdr;
+}
+
+/* We enable tracing if either the environment variable MALLOC_TRACE
+ is set, or if the variable mallwatch has been patched to an address
+ that the debugging user wants us to stop on. When patching mallwatch,
+ don't forget to set a breakpoint on tr_break! */
+
+void
+mtrace ()
+{
+ char *mallfile;
+
+ /* Don't panic if we're called more than once. */
+ if (mallstream != NULL)
+ return;
+
+#ifdef _LIBC
+ /* When compiling the GNU libc we use the secure getenv function
+ which prevents the misuse in case of SUID or SGID enabled
+ programs. */
+ mallfile = __secure_getenv (mallenv);
+#else
+ mallfile = getenv (mallenv);
+#endif
+ if (mallfile != NULL || mallwatch != NULL)
+ {
+ mallstream = fopen (mallfile != NULL ? mallfile : "/dev/null", "w");
+ if (mallstream != NULL)
+ {
+ /* Be sure it doesn't malloc its buffer! */
+ setbuf (mallstream, mallbuf);
+ fprintf (mallstream, "= Start\n");
+ tr_old_free_hook = __free_hook;
+ __free_hook = tr_freehook;
+ tr_old_malloc_hook = __malloc_hook;
+ __malloc_hook = tr_mallochook;
+ tr_old_realloc_hook = __realloc_hook;
+ __realloc_hook = tr_reallochook;
+ }
+ }
+}
+
+void
+muntrace ()
+{
+ if (mallstream == NULL)
+ return;
+
+ fprintf (mallstream, "= End\n");
+ fclose (mallstream);
+ mallstream = NULL;
+ __free_hook = tr_old_free_hook;
+ __malloc_hook = tr_old_malloc_hook;
+ __realloc_hook = tr_old_realloc_hook;
+}
diff --git a/manual/arith.texi b/manual/arith.texi
index e60216ed11..59ddbd626f 100644
--- a/manual/arith.texi
+++ b/manual/arith.texi
@@ -11,7 +11,7 @@ fractional parts. These functions are declared in the header file
* Predicates on Floats:: Testing for infinity and for NaNs.
* Absolute Value:: Absolute value functions.
* Normalization Functions:: Hacks for radix-2 representations.
-* Rounding and Remainders:: Determinining the integer and
+* Rounding and Remainders:: Determining the integer and
fractional parts of a float.
* Integer Division:: Functions for performing integer
division.
@@ -495,8 +495,8 @@ to @code{ERANGE} to indicate there was overflow.
Because the value @code{0l} is a correct result for @code{strtol} the
user who is interested in handling errors should set the global variable
-@code{errno} to @code{0} before calling this function. So it can be
-tested whether an error occured or not.
+@code{errno} to @code{0} before calling this function, so that the program
+can later test whether an error occurred.
There is an example at the end of this section.
@end deftypefun
@@ -699,7 +699,7 @@ call since all failures set @code{errno} to a non-zero value.
@deftypefun float strtof (const char *@var{string}, char **@var{tailptr})
This function is similar to the @code{strtod} function but it returns a
@code{float} value instead of a @code{double} value. If the precision
-of a @code{float} value is sufficent this function should be used since
+of a @code{float} value is sufficient this function should be used since
it is much faster than @code{strtod} on some architectures. The reasons
are obvious: @w{IEEE 754} defines @code{float} to have a mantissa of 23
bits while @code{double} has 53 bits and every additional bit of
@@ -718,9 +718,9 @@ This function is a GNU extension.
@deftypefun {long double} strtold (const char *@var{string}, char **@var{tailptr})
This function is similar to the @code{strtod} function but it returns a
@code{long double} value instead of a @code{double} value. It should be
-used when high presision is used. On systems which define a @code{long
+used when high precision is needed. On systems which define a @code{long
double} type (i.e., on which it is not the same as @code{double})
-running this function might take significently more time since more bits
+running this function might take significantly more time since more bits
of precision are required.
If the string has valid syntax for a floating-point number but the value
diff --git a/manual/creature.texi b/manual/creature.texi
index d5dfb6aa19..5eb665d2ef 100644
--- a/manual/creature.texi
+++ b/manual/creature.texi
@@ -73,13 +73,13 @@ included as well as the @w{ISO C}, POSIX.1, POSIX.2, and X/Open material.
@comment (none)
@comment XOPEN
@defvr Macro _XOPEN_SOURCE
-If you define these macro, functionality described in the X/Open
-Portability Guide is included. This is an superset of the POSIX.1 and
+If you define this macro, functionality described in the X/Open
+Portability Guide is included. This is a superset of the POSIX.1 and
POSIX.2 functionality and in fact @code{_POSIX_SOURCE} and
-@code{_POSIX_C_SOURCE} get automatically be defined.
+@code{_POSIX_C_SOURCE} are automatically defined.
-But as the great unifiction of all Unices there is also functionality
-only available in BSD and SVID is included.
+As the unification of all Unices, functionality only available in
+BSD and SVID is also included.
If the macro @code{_XOPEN_SOURCE_EXTENDED} is also defined, even more
functionality is available. The extra functions will make all functions
diff --git a/manual/errno.texi b/manual/errno.texi
index 47d9857dde..e346dd5f1f 100644
--- a/manual/errno.texi
+++ b/manual/errno.texi
@@ -144,7 +144,7 @@ No process matches the specified process ID.
@comment POSIX.1: Interrupted system call
@deftypevr Macro int EINTR
@comment errno 4 @c DO NOT REMOVE
-Interrupted function call; an asynchronous signal occured and prevented
+Interrupted function call; an asynchronous signal occurred and prevented
completion of the call. When this happens, you should try the call
again.
diff --git a/manual/filesys.texi b/manual/filesys.texi
index 39d4082b7f..54ea99cfd4 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -338,15 +338,15 @@ value. Use @code{readdir_r} when this is critical.
@deftypefun int readdir_r (DIR *@var{dirstream}, struct *@var{entry}, struct **@var{result})
This function is the reentrant version of @code{reentrant}. Like
@code{readdir} it returns the next entry from the directory. But to
-prevent conflicts for simultanously running threads the result is not
+prevent conflicts for simultaneously running threads the result is not
stored in some internal memory. Instead the argument @var{entry} has to
point to a place where the result is stored.
The return value is @code{0} in case the next entry was read
successfully. In this case a pointer to the result is returned in
*@var{result}. It is not required that *@var{result} is the same as
-@var{entry}. If somethings goes wrong while exeucting @code{readdir_r}
-the function return @code{-1}. The @code{errno} variable is set like
+@var{entry}. If something goes wrong while executing @code{readdir_r}
+the function returns @code{-1}. The @code{errno} variable is set like
described for @code{readdir}.
@strong{Portability Note:} On some systems, @code{readdir_r} may not
diff --git a/manual/intro.texi b/manual/intro.texi
index b4cb344915..e0447b6d92 100644
--- a/manual/intro.texi
+++ b/manual/intro.texi
@@ -92,7 +92,7 @@ standards each function or symbol comes from.
The GNU C library is compatible with the C standard adopted by the
American National Standards Institute (ANSI):
@cite{American National Standard X3.159-1989---``ANSI C''} and later
-by the International Standardization Organizaion (ISO):
+by the International Standardization Organization (ISO):
@cite{ISO/IEC 9899:1990, ``Programming languages---C''}.
We here refer to the standard as @w{ISO C} since this is the more
general standard in respect of ratification.
diff --git a/manual/job.texi b/manual/job.texi
index 1ac15fffc4..f97aceb61c 100644
--- a/manual/job.texi
+++ b/manual/job.texi
@@ -54,7 +54,7 @@ terminate all the processes in the foreground process group.
@cindex session
A @dfn{session} is a larger group of processes. Normally all the
-proccesses that stem from a single login belong to the same session.
+processes that stem from a single login belong to the same session.
Every process belongs to a process group. When a process is created, it
becomes a member of the same process group and session as its parent
@@ -154,7 +154,7 @@ calls @code{setsid} to become the leader of a new session.
@cindex controlling terminal, access to
Processes in the foreground job of a controlling terminal have
-unrestricted access to that terminal; background proesses do not. This
+unrestricted access to that terminal; background processes do not. This
section describes in more detail what happens when a process in a
background job tries to access its controlling terminal.
@@ -213,7 +213,7 @@ involved.
@iftex
@itemize @bullet
-@item
+@item
@ref{Data Structures}, introduces the example and presents
its primary data structures.
@@ -310,7 +310,7 @@ job *
find_job (pid_t pgid)
@{
job *j;
-
+
for (j = first_job; j; j = j->next)
if (j->pgid == pgid)
return j;
@@ -324,7 +324,7 @@ int
job_is_stopped (job *j)
@{
process *p;
-
+
for (p = j->first_process; p; p = p->next)
if (!p->completed && !p->stopped)
return 0;
@@ -338,7 +338,7 @@ int
job_is_completed (job *j)
@{
process *p;
-
+
for (p = j->first_process; p; p = p->next)
if (!p->completed)
return 0;
@@ -355,7 +355,7 @@ job_is_completed (job *j)
When a shell program that normally performs job control is started, it
has to be careful in case it has been invoked from another shell that is
-already doing its own job control.
+already doing its own job control.
A subshell that runs interactively has to ensure that it has been placed
in the foreground by its parent shell before it can enable job control
@@ -413,7 +413,7 @@ int shell_is_interactive;
void
init_shell ()
@{
-
+
/* @r{See if we are running interactively.} */
shell_terminal = STDIN_FILENO;
shell_is_interactive = isatty (shell_terminal);
@@ -512,7 +512,7 @@ send a @code{SIGTSTP} signal to the process group of the process, not
just to the process itself. @xref{Signaling Another Process}.
Finally, each child process should call @code{exec} in the normal way.
-This is also the point at which redirection of the standard input and
+This is also the point at which redirection of the standard input and
output channels should be handled. @xref{Duplicating Descriptors},
for an explanation of how to do this.
@@ -564,9 +564,9 @@ launch_process (process *p, pid_t pgid,
@{
dup2 (errfile, STDERR_FILENO);
close (errfile);
- @}
-
- /* @r{Exec the new process. Make sure we exit.} */
+ @}
+
+ /* @r{Exec the new process. Make sure we exit.} */
execvp (p->argv[0], p->argv);
perror ("execvp");
exit (1);
@@ -590,7 +590,7 @@ launch_job (job *j, int foreground)
process *p;
pid_t pid;
int mypipe[2], infile, outfile;
-
+
infile = j->stdin;
for (p = j->first_process; p; p = p->next)
@{
@@ -638,7 +638,7 @@ launch_job (job *j, int foreground)
close (outfile);
infile = mypipe[0];
@}
-
+
format_job_info (j, "launched");
if (!shell_is_interactive)
@@ -704,13 +704,13 @@ put_job_in_foreground (job *j, int cont)
perror ("kill (SIGCONT)");
@}
@end group
-
+
/* @r{Wait for it to report.} */
wait_for_job (j);
-
+
/* @r{Put the shell back in the foreground.} */
tcsetpgrp (shell_terminal, shell_pgid);
-
+
@group
/* @r{Restore the shell's terminal modes.} */
tcgetattr (shell_terminal, &j->tmodes);
@@ -722,7 +722,7 @@ put_job_in_foreground (job *j, int cont)
@cindex background job, launching
If the process group is launched as a background job, the shell should
remain in the foreground itself and continue to read commands from
-the terminal.
+the terminal.
In the sample shell, there is not much that needs to be done to put
a job into the background. Here is the function it uses:
@@ -833,7 +833,7 @@ update_status (void)
@{
int status;
pid_t pid;
-
+
do
pid = waitpid (WAIT_ANY, &status, WUNTRACED|WNOHANG);
while (!mark_process_status (pid, status));
@@ -849,11 +849,11 @@ wait_for_job (job *j)
@{
int status;
pid_t pid;
-
+
do
pid = waitpid (WAIT_ANY, &status, WUNTRACED);
- while (!mark_process_status (pid, status)
- && !job_is_stopped (j)
+ while (!mark_process_status (pid, status)
+ && !job_is_stopped (j)
&& !job_is_completed (j));
@}
@end group
@@ -880,7 +880,7 @@ do_job_notification (void)
/* @r{Update status information for child processes.} */
update_status ();
-
+
jlast = NULL;
for (j = first_job; j; j = jnext)
@{
@@ -976,7 +976,7 @@ allocated and initialized.
Most real shells provide a complex user interface that has support for
a command language; variables; abbreviations, substitutions, and pattern
matching on file names; and the like. All of this is far too complicated
-to explain here! Instead, we have concentrated on showing how to
+to explain here! Instead, we have concentrated on showing how to
implement the core process creation and job control functions that can
be called from such a shell.
@@ -1058,7 +1058,7 @@ represents the size of a string large enough to hold the file name
returned by @code{ctermid}.
@end deftypevr
-See also the @code{isatty} and @code{ttyname} functions, in
+See also the @code{isatty} and @code{ttyname} functions, in
@ref{Is It a Terminal}.
diff --git a/manual/libc.texinfo b/manual/libc.texinfo
index fa3f3e443d..f2b688400e 100644
--- a/manual/libc.texinfo
+++ b/manual/libc.texinfo
@@ -616,7 +616,7 @@ Pseudo-Random Numbers
Low-Level Arithmetic Functions
* Normalization Functions:: Hacks for radix-2 representations.
-* Rounding and Remainders:: Determinining the integer and
+* Rounding and Remainders:: Determining the integer and
fractional parts of a float.
* Integer Division:: Functions for performing integer division.
* Parsing of Numbers:: Functions for ``reading'' numbers from strings.
diff --git a/manual/locale.texi b/manual/locale.texi
index cfe6b7e94b..1866c66fb7 100644
--- a/manual/locale.texi
+++ b/manual/locale.texi
@@ -505,7 +505,7 @@ precede the amount.
We can only guess which of these (if either) matches the usual
conventions for printing international currency symbols. Our guess is
-that they should always preceed the amount. If we find out a reliable
+that they should always precede the amount. If we find out a reliable
answer, we will put it here.
@item char p_sep_by_space
diff --git a/manual/math.texi b/manual/math.texi
index 870edd54bf..61455ef8a8 100644
--- a/manual/math.texi
+++ b/manual/math.texi
@@ -165,7 +165,7 @@ either positive or negative @code{HUGE_VAL}.
@node Inverse Trig Functions
@section Inverse Trigonometric Functions
-@cindex inverse trigonmetric functions
+@cindex inverse trigonometric functions
These are the usual arc sine, arc cosine and arc tangent functions,
which are the inverses of the sine, cosine and tangent functions,
diff --git a/manual/nss.texi b/manual/nss.texi
index e6c8649ddc..f24d7dd34c 100644
--- a/manual/nss.texi
+++ b/manual/nss.texi
@@ -5,7 +5,7 @@
@cindex Name Service Switch
@cindex NSS
-@cindex databses
+@cindex databases
Various functions in the C Library need to be configured to work
correctly in the local environment. Traditionally, this was done by
using files (e.g., @file{/etc/passwd}), but other nameservices (line the
@@ -128,7 +128,7 @@ the reaction on lookup result line @code{[NOTFOUND=return]}.
@menu
* Services in the NSS configuration:: Service names in the NSS configuration.
-* Actions in the NSS configuration:: React approprite on the lookup result.
+* Actions in the NSS configuration:: React appropriately to the lookup result.
* Notes on NSS Configuration File:: Things to take care about while
configuring NSS.
@end menu
@@ -181,7 +181,7 @@ service. They mean
@ftable @samp
@item success
-No error occured an the wanted entry is returned. The default action
+No error occurred and the wanted entry is returned. The default action
for this is @code{return}.
@item notfound
diff --git a/manual/pattern.texi b/manual/pattern.texi
index 903aa48073..b1e7206b58 100644
--- a/manual/pattern.texi
+++ b/manual/pattern.texi
@@ -178,7 +178,7 @@ To return this vector, @code{glob} stores both its address and its
length (number of elements, not counting the terminating null pointer)
into @code{*@var{vector-ptr}}.
-Normally, @code{glob} sorts the file names alphabetically before
+Normally, @code{glob} sorts the file names alphabetically before
returning them. You can turn this off with the flag @code{GLOB_NOSORT}
if you want to get the information as fast as possible. Usually it's
a good idea to let @code{glob} sort them---if you process the files in
@@ -224,7 +224,7 @@ In the event of an error, @code{glob} stores information in
@node Flags for Globbing
@subsection Flags for Globbing
-This section describes the flags that you can specify in the
+This section describes the flags that you can specify in the
@var{flags} argument to @code{glob}. Choose the flags you want,
and combine them with the C bitwise OR operator @code{|}.
@@ -483,7 +483,7 @@ One of the endpoints in a range expression was invalid.
These are the bit flags that you can use in the @var{cflags} operand when
compiling a regular expression with @code{regcomp}.
-
+
@table @code
@comment regex.h
@comment POSIX.2
@@ -530,7 +530,7 @@ This function tries to match the compiled regular expression
@code{regexec} returns @code{0} if the regular expression matches;
otherwise, it returns a nonzero value. See the table below for
what nonzero values mean. You can use @code{regerror} to produce an
-error message string describing the reason for a nonzero value;
+error message string describing the reason for a nonzero value;
see @ref{Regexp Cleanup}.
The argument @var{eflags} is a word of bit flags that enable various
@@ -538,7 +538,7 @@ options.
If you want to get information about what part of @var{string} actually
matched the regular expression or its subexpressions, use the arguments
-@var{matchptr} and @var{nmatch}. Otherwise, pass @code{0} for
+@var{matchptr} and @var{nmatch}. Otherwise, pass @code{0} for
@var{nmatch}, and @code{NULL} for @var{matchptr}. @xref{Regexp
Subexpressions}.
@end deftypefun
@@ -549,7 +549,7 @@ locales that were in effect when you compiled the regular expression.
The function @code{regexec} accepts the following flags in the
@var{eflags} argument:
-@table @code
+@table @code
@comment regex.h
@comment POSIX.2
@item REG_NOTBOL
@@ -594,7 +594,7 @@ subexpression.
@comment POSIX.2
@deftp {Data Type} regmatch_t
This is the data type of the @var{matcharray} array that you pass to
-@code{regexec}. It containes two structure fields, as follows:
+@code{regexec}. It contains two structure fields, as follows:
@table @code
@item rm_so
@@ -661,7 +661,7 @@ appears within another, then the results reported for the inner
subexpression reflect whatever happened on the last match of the outer
subexpression. For an example, consider @samp{\(ba\(na\)*s \)*} matching
the string @samp{bananas bas }. The last time the inner expression
-actually matches is near the end of the first word. But it is
+actually matches is near the end of the first word. But it is
@emph{considered} again in the second word, and fails to match there.
@code{regexec} reports nonuse of the ``na'' subexpression.
@@ -738,7 +738,7 @@ char *get_regerror (int errcode, regex_t *compiled)
@cindex word expansion
@cindex expansion of shell words
-@dfn{Word expansion} means the process of splitting a string into
+@dfn{Word expansion} means the process of splitting a string into
@dfn{words} and substituting for variables, commands, and wildcards
just as the shell does.
@@ -936,7 +936,7 @@ data it points to.
@node Flags for Wordexp
@subsection Flags for Word Expansion
-This section describes the flags that you can specify in the
+This section describes the flags that you can specify in the
@var{flags} argument to @code{wordexp}. Choose the flags you want,
and combine them with the C operator @code{|}.
@@ -1139,7 +1139,7 @@ characters in the value of @var{variable}. @samp{$@{#foo@}} stands for
@end table
These variants of variable substitution let you remove part of the
-variable's value before substituting it. The @var{prefix} and
+variable's value before substituting it. The @var{prefix} and
@var{suffix} are not mere strings; they are wildcard patterns, just
like the patterns that you use to match multiple file names. But
in this context, they match against parts of the variable value
diff --git a/manual/signal.texi b/manual/signal.texi
index 088c35d02f..1a4f866876 100644
--- a/manual/signal.texi
+++ b/manual/signal.texi
@@ -135,7 +135,7 @@ process that receives them. These signals arrive at unpredictable times
during execution. External events generate signals asynchronously, and
so do explicit requests that apply to some other process.
-A given type of signal is either typically synchrous or typically
+A given type of signal is either typically synchronous or typically
asynchronous. For example, signals for errors are typically synchronous
because errors generate signals synchronously. But any type of signal
can be generated synchronously or asynchronously with an explicit
@@ -608,7 +608,7 @@ code profiling facilities, hence the name of this signal.
The signals listed in this section are used in conjunction with
asynchronous I/O facilities. You have to take explicit action by
-calling @code{fcntl} to enable a particular file descriptior to generate
+calling @code{fcntl} to enable a particular file descriptor to generate
these signals (@pxref{Interrupt Input}). The default action for these
signals is to ignore them.
@@ -2310,7 +2310,7 @@ signals to any random process. These are intended to prevent antisocial
behavior such as arbitrarily killing off processes belonging to another
user. In typical use, @code{kill} is used to pass signals between
parent, child, and sibling processes, and in these situations you
-normally do have permission to send signals. The only common execption
+normally do have permission to send signals. The only common exception
is when you run a setuid program in a child process; if the program
changes its real UID as well as its effective UID, you may not have
permission to send a signal. The @code{su} program does this.
@@ -2692,7 +2692,7 @@ install_handler (void)
@end smallexample
This is more reliable than blocking the other signals explicitly in the
-code for the handler. If you block signals explicity in the handler,
+code for the handler. If you block signals explicitly in the handler,
you can't avoid at least a short interval at the beginning of the
handler where they are not yet blocked.
@@ -2837,7 +2837,7 @@ these things in the other order, like this,
@noindent
then a signal arriving in between the @code{if} statement and the decrement
-would be effetively ``lost'' for an indefinite amount of time. The
+would be effectively ``lost'' for an indefinite amount of time. The
handler would merely set @code{defer_signal}, but the program having
already tested this variable, it would not test the variable again.
@@ -3081,7 +3081,7 @@ For most cases, just using @code{SIGSTKSZ} for @code{ss_size} is
sufficient. But if you know how much stack space your program's signal
handlers will need, you may want to use a different size. In this case,
you should allocate @code{MINSIGSTKSZ} additional bytes for the signal
-stack and increase @code{ss_size} accordinly.
+stack and increase @code{ss_size} accordingly.
@end vtable
@item int ss_flags
diff --git a/manual/startup.texi b/manual/startup.texi
index b931365fcb..426f9496b5 100644
--- a/manual/startup.texi
+++ b/manual/startup.texi
@@ -236,7 +236,7 @@ must compare the external variable @code{optind} against the @var{argc}
parameter to check this.
If the option has an argument, @code{getopt} returns the argument by
-storing it in the varables @var{optarg}. You don't ordinarily need to
+storing it in the variable @var{optarg}. You don't ordinarily need to
copy the @code{optarg} string, since it is a pointer into the original
@var{argv} array, not into a static area that might be overwritten.
diff --git a/manual/stdio.texi b/manual/stdio.texi
index b721af91b0..02236e3273 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -62,7 +62,7 @@ input/output library functions. Don't try to create your own objects of
type @code{FILE}; let the library do it. Your programs should
deal only with pointers to these objects (that is, @code{FILE *} values)
rather than the objects themselves.
-@c !!! should say that FILE's have "No user-servicable parts inside."
+@c !!! should say that FILE's have "No user-serviceable parts inside."
@node Standard Streams
@section Standard Streams
@@ -1800,7 +1800,7 @@ a base type of @code{PA_DOUBLE} to indicate a type of @code{long double}.
@end table
@ifinfo
-For an example of using these facilitles, see @ref{Example of Parsing}.
+For an example of using these facilities, see @ref{Example of Parsing}.
@end ifinfo
@node Example of Parsing
diff --git a/manual/terminal.texi b/manual/terminal.texi
index a9593ccfc5..fcd30a11aa 100644
--- a/manual/terminal.texi
+++ b/manual/terminal.texi
@@ -18,9 +18,9 @@ descriptor is and how to open a file descriptor for a terminal device.
* Canonical or Not:: Two basic styles of input processing.
* Terminal Modes:: How to examine and modify flags controlling
details of terminal I/O: echoing,
- signals, editing.
+ signals, editing.
* Line Control:: Sending break sequences, clearing
- terminal buffers @dots{}
+ terminal buffers @dots{}
* Noncanon Example:: How to read single characters without echo.
@end menu
@@ -149,9 +149,9 @@ constants are all declared in the header file @file{termios.h}.
@menu
* Mode Data Types:: The data type @code{struct termios} and
- related types.
+ related types.
* Mode Functions:: Functions to read and set the terminal
- attributes.
+ attributes.
* Setting Modes:: The right way to set terminal attributes
reliably.
* Input Modes:: Flags controlling low-level input handling.
@@ -486,7 +486,7 @@ signal for the foreground process group associated with the terminal.
If neither @code{BRKINT} nor @code{IGNBRK} are set, a break condition is
passed to the application as a single @code{'\0'} character if
-@code{PARMRK} is not set, or otherwise as a three-character sequence
+@code{PARMRK} is not set, or otherwise as a three-character sequence
@code{'\377'}, @code{'\0'}, @code{'\0'}.
@end deftypevr
@@ -906,7 +906,7 @@ attempt to write to the terminal. @xref{Access to the Terminal}.
The following bits are BSD extensions; they exist only in BSD systems
and the GNU system.
-
+
@comment termios.h
@comment BSD
@deftypevr Macro tcflag_t ALTWERASE
@@ -1431,7 +1431,7 @@ itself.
The LNEXT character is recognized only when @code{IEXTEN} is set, but in
both canonical and noncanonical mode. It disables any special
significance of the next character the user types. Even if the
-character would normally perform some editting function or generate a
+character would normally perform some editing function or generate a
signal, it is read as a plain character. This is the analogue of the
@kbd{C-q} command in Emacs. ``LNEXT'' stands for ``literal next.''
@@ -1532,7 +1532,7 @@ TIME elapses with no further input.
TIME elapses first. @code{read} can return more than MIN characters if
more than MIN happen to be in the queue.
-@item
+@item
Both MIN and TIME are zero.
In this case, @code{read} always returns immediately with as many
diff --git a/manual/users.texi b/manual/users.texi
index 9e397d3d4d..a622dd5fd4 100644
--- a/manual/users.texi
+++ b/manual/users.texi
@@ -877,7 +877,7 @@ password database file.
If the function returns null @var{result} points to the structure with
the wanted data (normally this is in @var{result_buf}). If errors
-occured the return value is non-null and @var{result} contains a null
+occurred the return value is non-null and @var{result} contains a null
pointer.
@end deftypefun
@@ -916,7 +916,7 @@ buffer or length @var{buflen} starting at @var{buffer}.
If the function returns zero @var{result} points to the structure with
the wanted data (normally this is in @var{result_buf}). If errors
-occured the return value is non-zero and @var{result} contains a null
+occurred the return value is non-zero and @var{result} contains a null
pointer.
@end deftypefun
@@ -1100,7 +1100,7 @@ group database file.
If the function returns zero @var{result} points to the structure with
the wanted data (normally this is in @var{result_buf}). If errors
-occured the return value is non-zero and @var{result} contains a null
+occurred the return value is non-zero and @var{result} contains a null
pointer.
@end deftypefun
@@ -1137,7 +1137,7 @@ buffer or length @var{buflen} starting at @var{buffer}.
If the function returns zero @var{result} points to the structure with
the wanted data (normally this is in @var{result_buf}). If errors
-occured the return value is non-zero and @var{result} contains a null
+occurred the return value is non-zero and @var{result} contains a null
pointer.
@end deftypefun
@@ -1173,7 +1173,7 @@ them individual names. More concrete: a netgroup is a list of triples
consisting of a host name, a user name, and a domain name, where any of
the entries can be a wildcard entry, matching all inputs. A last
possibility is that names of other netgroups can also be given in the
-list specifying a netgroup. So one can construct arbitrary hierachies
+list specifying a netgroup. So one can construct arbitrary hierarchies
without loops.
Sun's implementation allows netgroups only for the @code{nis} or
@@ -1208,7 +1208,7 @@ in the netgroup with name @var{netgroup}.
When the call is successful (i.e., when a netgroup with this name exist)
the return value is @code{1}. When the return value is @code{0} no
-netgroup of this name is known or some other error occured.
+netgroup of this name is known or some other error occurred.
@end deftypefun
It is important to remember that there is only one single state for
@@ -1235,7 +1235,7 @@ The returned string pointers are only valid unless no of the netgroup
related functions are called.
The return value is @code{1} if the next entry was successfully read. A
-value of @code{0} means no further entry exist or internal errors occured.
+value of @code{0} means no further entries exist or internal errors occurred.
@end deftypefun
@comment netdb.h
@@ -1249,7 +1249,7 @@ even after other netgroup related functions are called.
The return value is @code{1} if the next entry was successfully read and
the buffer contains enough room to place the strings in it. @code{0} is
returned in case no more entries are found, the buffer is too small, or
-internal errors occured.
+internal errors occurred.
This function is a GNU extension. The original implementation in the
SunOS libc does not provide this function.
@@ -1292,7 +1292,7 @@ otherwise.
The return value is @code{1} if an entry matching the given triple is
found in the netgroup. The return value is @code{0} if the netgroup
itself is not found, the netgroup does not contain the triple or
-internal errors occured.
+internal errors occurred.
@end deftypefun
@node Database Example, , Netgroup Database, Users and Groups
diff --git a/math/math.h b/math/math.h
index 49d5c00aa3..b713163f76 100644
--- a/math/math.h
+++ b/math/math.h
@@ -28,9 +28,6 @@
__BEGIN_DECLS
-#define __need_Emath
-#include <errno.h>
-
/* Get machine-dependent HUGE_VAL value (returned on overflow).
On all IEEE754 machines, this is +Infinity. */
#include <huge_val.h>
diff --git a/math/mathcalls.h b/math/mathcalls.h
index 3a969122ae..1f958c0d89 100644
--- a/math/mathcalls.h
+++ b/math/mathcalls.h
@@ -84,7 +84,7 @@ __MATHCALL (atanh,, (_Mdouble_ __x));
/* Exponential and logarithmic functions. */
-/* Exponentional function of X. */
+/* Exponential function of X. */
__MATHCALL (exp,, (_Mdouble_ __x));
/* Break VALUE into a normalized fraction and an integral power of 2. */
diff --git a/misc/getpass.c b/misc/getpass.c
index 16f4a3a365..81c0f689de 100644
--- a/misc/getpass.c
+++ b/misc/getpass.c
@@ -1,26 +1,26 @@
-/* Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992,1993,1994,1995,1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
-/* It is desireable to use this bit on systems that have it.
+/* It is desirable to use this bit on systems that have it.
The only bit of terminal state we want to twiddle is echoing, which is
done in software; there is no need to change the state of the terminal
hardware. */
diff --git a/misc/hsearch_r.c b/misc/hsearch_r.c
index bf7cadc536..980b7c8d72 100644
--- a/misc/hsearch_r.c
+++ b/misc/hsearch_r.c
@@ -118,7 +118,7 @@ hdestroy_r (htab)
}
-/* This is the search function. It uses double hashing with open adressing.
+/* This is the search function. It uses double hashing with open addressing.
The argument item.key has to be a pointer to an zero terminated, most
probably strings of chars. The function for generating a number of the
strings is simple but fast. It can be replaced by a more complex function
diff --git a/misc/search.h b/misc/search.h
index 221546d2ba..d0097429e9 100644
--- a/misc/search.h
+++ b/misc/search.h
@@ -93,7 +93,7 @@ extern void hdestroy_r __P ((struct hsearch_data *htab));
/* The tsearch routines are very interesting. They make many
- assumptions about the compiler. It assumpts that the first field
+ assumptions about the compiler. It assumes that the first field
in node must be the "key" field, which points to the datum.
Everything depends on that. */
/* For tsearch */
diff --git a/misc/syslog.c b/misc/syslog.c
index 4c5b6f4bbc..6e9cdef547 100644
--- a/misc/syslog.c
+++ b/misc/syslog.c
@@ -177,7 +177,7 @@ vsyslog(pri, fmt, ap)
}
/* Prepare for multiple users. We have to take care: open and
- write are cancelation points. */
+ write are cancellation points. */
__libc_cleanup_region_start ((void (*) (void *)) cancel_handler,
&oldaction_ptr);
__libc_lock_lock (syslog_lock);
diff --git a/misc/tsearch.c b/misc/tsearch.c
index 689b2e1104..6af6536a72 100644
--- a/misc/tsearch.c
+++ b/misc/tsearch.c
@@ -1,20 +1,20 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Tree search generalized from Knuth (6.2.2) Algorithm T just like
the AT&T man page says.
@@ -30,8 +30,8 @@ Boston, MA 02111-1307, USA. */
#include <search.h>
/* This routine is not very bad. It makes many assumptions about
- the compiler. It assumpts that the first field in node must be
- the "key" field, which points to the datum. It is a very trick
+ the compiler. It assumes that the first field in the node must be
+ the "key" field, which points to the datum. It is very tricky
stuff. H.J. */
typedef struct node_t
diff --git a/nss/XXX-lookup.c b/nss/XXX-lookup.c
index 67a3be1009..cfb89a2702 100644
--- a/nss/XXX-lookup.c
+++ b/nss/XXX-lookup.c
@@ -23,7 +23,7 @@
|* Here we assume one symbol to be defined: *|
|* *|
|* DATABASE_NAME - name of the database the function accesses *|
-|* (e.g., hosts, servicess, ...) *|
+|* (e.g., hosts, services, ...) *|
|* *|
|* One additional symbol may optionally be defined: *|
|* *|
diff --git a/nss/nss_files/files-netgrp.c b/nss/nss_files/files-netgrp.c
index 83e1382d42..7fd6b3f7cb 100644
--- a/nss/nss_files/files-netgrp.c
+++ b/nss/nss_files/files-netgrp.c
@@ -248,7 +248,7 @@ _nss_netgroup_parseline (char **cursor, struct __netgrent *result,
status = NSS_STATUS_SUCCESS;
- /* Rememember where we stopped reading. */
+ /* Remember where we stopped reading. */
*cursor = cp;
result->first = 0;
diff --git a/nss/nsswitch.h b/nss/nsswitch.h
index a484ef7e05..092ff6e070 100644
--- a/nss/nsswitch.h
+++ b/nss/nsswitch.h
@@ -107,7 +107,7 @@ int __nss_database_lookup (const char *database, const char *alternative_name,
/* Put first function with name FCT_NAME for SERVICE in FCTP. The
position is remembered in NI. The function returns a value < 0 if
- an error occured or no such function exists. */
+ an error occurred or no such function exists. */
int __nss_lookup (service_user **ni, const char *fct_name, void **fctp);
/* Determine the next step in the lookup process according to the
@@ -115,8 +115,8 @@ int __nss_lookup (service_user **ni, const char *fct_name, void **fctp);
`__nss_lookup' or `__nss_next'. NI specifies the last function
examined. The function return a value > 0 if the process should
stop with the last result of the last function call to be the
- result of the entire lookup. The returned valie is 0 if there is
- another function to use and < 0 if an error occured.
+ result of the entire lookup. The returned value is 0 if there is
+ another function to use and < 0 if an error occurred.
If ALL_VALUES is nonzero, the return value will not be > 0 as long as
there is a possibility the lookup process can ever use following
diff --git a/posix/fnmatch.c b/posix/fnmatch.c
index 553a968eed..edbfb6ae9a 100644
--- a/posix/fnmatch.c
+++ b/posix/fnmatch.c
@@ -64,7 +64,7 @@ fnmatch (pattern, string, flags)
register const char *p = pattern, *n = string;
register char c;
-/* Note that this evalutes C many times. */
+/* Note that this evaluates C many times. */
# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
while ((c = *p++) != '\0')
diff --git a/posix/posix1_lim.h b/posix/posix1_lim.h
index 64ae3e7808..a23d224332 100644
--- a/posix/posix1_lim.h
+++ b/posix/posix1_lim.h
@@ -74,7 +74,7 @@
/* Maximum number of connections that can be queued on a socket. */
#define _POSIX_QLIMIT 1
-/* Maximem number of bytes that can be buffered on a socket for send
+/* Maximum number of bytes that can be buffered on a socket for send
or receive. */
#define _POSIX_HIWAT _POSIX_PIPE_BUF
diff --git a/posix/sys/utsname.h b/posix/sys/utsname.h
index 58002ba40a..e9891609bc 100644
--- a/posix/sys/utsname.h
+++ b/posix/sys/utsname.h
@@ -51,7 +51,11 @@ struct utsname
#if _UTSNAME_DOMAIN_LENGTH - 0
/* Name of the domain of this node on the network. */
+#ifdef __USE_GNU
char domainname[_UTSNAME_DOMAIN_LENGTH];
+#else
+ char __domainname[_UTSNAME_DOMAIN_LENGTH];
+#endif
#endif
};
diff --git a/posix/unistd.h b/posix/unistd.h
index a9a89a73d3..5cf41df723 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -55,7 +55,7 @@ __BEGIN_DECLS
creation of locales with the localedef utility. */
#define _POSIX2_LOCALEDEF 1
-/* Library is conformant to X/Open version 4. */
+/* Library conforms to X/Open version 4. */
#define _XOPEN_VERSION 4
/* Commands and utilities from XPG4 are available. */
@@ -213,7 +213,7 @@ extern ssize_t write __P ((int __fd, __const __ptr_t __buf, size_t __n));
/* Create a one-way communication channel (pipe).
- If successul, two file descriptors are stored in PIPEDES;
+ If successful, two file descriptors are stored in PIPEDES;
bytes written on PIPEDES[1] can be read from PIPEDES[0].
Returns 0 if successful, -1 if not. */
extern int __pipe __P ((int __pipedes[2]));
@@ -246,8 +246,8 @@ extern unsigned int ualarm __P ((unsigned int __value,
unsigned int __interval));
/* Sleep USECONDS microseconds, or until a signal arrives that is not blocked
- or ignored. Return value is not necessarily useful. */
-extern unsigned int usleep __P ((unsigned int __useconds));
+ or ignored. */
+extern void usleep __P ((unsigned int __useconds));
#endif
@@ -333,7 +333,6 @@ extern int dup2 __P ((int __fd, int __fd2));
/* NULL-terminated array of "NAME=VALUE" environment variables. */
extern char **__environ;
-extern char **environ;
/* Replace the current process, executing PATH with arguments ARGV and
@@ -605,7 +604,7 @@ extern int tcsetpgrp __P ((int __fd, __pid_t __pgrp_id));
extern char *getlogin __P ((void));
#ifdef __USE_REENTRANT
/* Return at most NAME_LEN characters of the login name of the user in NAME.
- If it cannot be determined or some other error occured, return the error
+ If it cannot be determined or some other error occurred, return the error
code. Otherwise return 0. */
extern int getlogin_r __P ((char *__name, size_t __name_len));
#endif
@@ -830,11 +829,11 @@ extern int __libc_enable_secure;
#endif
-#ifdef __USE_POSIX
+#ifdef __USE_POSIX199309
/* Synchronize at least the data part of a file with the underlying
media. */
extern int fdatasync __P ((int __fildes));
-#endif /* Use POSIX */
+#endif /* Use POSIX199309 */
/* XPG4.2 specifies that prototypes for the encryption functions must
diff --git a/resolv/Banner b/resolv/Banner
index 0cf0de3f6f..d11ab500fb 100644
--- a/resolv/Banner
+++ b/resolv/Banner
@@ -1 +1 @@
-BIND-4.9.5-REL
+BIND-4.9.5-P1
diff --git a/resolv/arpa/nameser.h b/resolv/arpa/nameser.h
index 66b3530d91..4db67d0602 100644
--- a/resolv/arpa/nameser.h
+++ b/resolv/arpa/nameser.h
@@ -308,7 +308,7 @@ typedef struct {
/* fields in third byte */
unsigned qr: 1; /* response flag */
unsigned opcode: 4; /* purpose of message */
- unsigned aa: 1; /* authoritive answer */
+ unsigned aa: 1; /* authoritative answer */
unsigned tc: 1; /* truncated message */
unsigned rd: 1; /* recursion desired */
/* fields in fourth byte */
@@ -322,7 +322,7 @@ typedef struct {
/* fields in third byte */
unsigned rd :1; /* recursion desired */
unsigned tc :1; /* truncated message */
- unsigned aa :1; /* authoritive answer */
+ unsigned aa :1; /* authoritative answer */
unsigned opcode :4; /* purpose of message */
unsigned qr :1; /* response flag */
/* fields in fourth byte */
diff --git a/resolv/inet_net_pton.c b/resolv/inet_net_pton.c
index bf6fe02ed8..0c2693136d 100644
--- a/resolv/inet_net_pton.c
+++ b/resolv/inet_net_pton.c
@@ -166,7 +166,7 @@ inet_net_pton_ipv4(src, dst, size)
goto emsgsize;
}
- /* Firey death and destruction unless we prefetched EOS. */
+ /* Fiery death and destruction unless we prefetched EOS. */
if (ch != '\0')
goto enoent;
diff --git a/resolv/netdb.h b/resolv/netdb.h
index f906edac0b..73192b5e98 100644
--- a/resolv/netdb.h
+++ b/resolv/netdb.h
@@ -73,7 +73,7 @@ __set_h_errno (int __err)
#define NETDB_INTERNAL -1 /* See errno. */
#define NETDB_SUCCESS 0 /* No problem. */
#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found. */
-#define TRY_AGAIN 2 /* Non-Authoritive Host not found,
+#define TRY_AGAIN 2 /* Non-Authoritative Host not found,
or SERVERFAIL. */
#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED,
NOTIMP. */
@@ -98,7 +98,7 @@ struct hostent
int h_addrtype; /* Host address type. */
int h_length; /* Length of address. */
char **h_addr_list; /* List of addresses from name server. */
-#define h_addr h_addr_list[0] /* Address, for backward compatiblity. */
+#define h_addr h_addr_list[0] /* Address, for backward compatibility. */
};
/* Open host data base files and mark them as staying open even after
diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c
index 94fa1c13c4..37aa29fb21 100644
--- a/resolv/nss_dns/dns-network.c
+++ b/resolv/nss_dns/dns-network.c
@@ -96,7 +96,7 @@ typedef union querybuf
} querybuf;
-/* Protortypes for local functions. */
+/* Prototypes for local functions. */
static enum nss_status getanswer_r (const querybuf *answer, int anslen,
struct netent *result, char *buffer,
int buflen, lookup_method net_i);
diff --git a/resolv/res_comp.c b/resolv/res_comp.c
index d96fe6e432..a9ca69e55f 100644
--- a/resolv/res_comp.c
+++ b/resolv/res_comp.c
@@ -160,7 +160,7 @@ dn_expand(msg, eomorig, comp_dn, exp_dn, length)
* 'length' is the size of the array pointed to by 'comp_dn'.
* 'dnptrs' is a list of pointers to previous compressed names. dnptrs[0]
* is a pointer to the beginning of the message. The list ends with NULL.
- * 'lastdnptr' is a pointer to the end of the arrary pointed to
+ * 'lastdnptr' is a pointer to the end of the array pointed to
* by 'dnptrs'. Side effect is to update the list of pointers for
* labels inserted into the message as we compress the name.
* If 'dnptr' is NULL, we don't try to compress names. If 'lastdnptr'
@@ -504,56 +504,3 @@ __putlong(l, msgp)
{
PUTLONG(l, msgp);
}
-
-#ifdef ultrix
-/* ultrix 4.0 had some icky packaging in its libc.a. alias for it here.
- * there is more gunk of this kind over in res_debug.c.
- */
-#undef putshort
-void
-#if defined(__STDC__) || defined(__cplusplus)
-putshort(register u_short s, register u_char *msgp)
-#else
-putshort(s, msgp)
- register u_short s;
- register u_char *msgp;
-#endif
-{
- __putshort(s, msgp);
-}
-#undef putlong
-void
-putlong(l, msgp)
- register u_int32_t l;
- register u_char *msgp;
-{
- __putlong(l, msgp);
-}
-
-#undef dn_comp
-int
-dn_comp(exp_dn, comp_dn, length, dnptrs, lastdnptr)
- const char *exp_dn;
- u_char *comp_dn, **dnptrs, **lastdnptr;
- int length;
-{
- return (__dn_comp(exp_dn, comp_dn, length, dnptrs, lastdnptr));
-}
-
-#undef dn_expand
-int
-dn_expand(msg, eomorig, comp_dn, exp_dn, length)
- const u_char *msg, *eomorig, *comp_dn;
- char *exp_dn;
- int length;
-{
- return (__dn_expand(msg, eomorig, comp_dn, exp_dn, length));
-}
-
-#undef dn_skipname
-dn_skipname(comp_dn, eom)
- const u_char *comp_dn, *eom;
-{
- return (__dn_skipname(comp_dn, eom));
-}
-#endif /* Ultrix 4.0 hackery */
diff --git a/resolv/res_debug.c b/resolv/res_debug.c
index 8fb4bcf33f..23f27acb33 100644
--- a/resolv/res_debug.c
+++ b/resolv/res_debug.c
@@ -287,7 +287,7 @@ __fp_nquery(msg, len, file)
if ((_res.options & RES_INIT) == 0 && res_init() == -1)
return;
-#define TruncTest(x) if (x >= endMark) goto trunc
+#define TruncTest(x) if (x > endMark) goto trunc
#define ErrorTest(x) if (x == NULL) goto error
/*
diff --git a/resolv/res_init.c b/resolv/res_init.c
index 459948660d..91f9f40094 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -95,7 +95,7 @@ static char rcsid[] = "$Id$";
* "search" property.
* - The sortlist comprised of IP address netmask pairs are stored as
* values of the "sortlist" property. The IP address and optional netmask
- * should be seperated by a slash (/) or ampersand (&) character.
+ * should be separated by a slash (/) or ampersand (&) character.
* - Internal resolver variables can be set from the value of the "options"
* property.
*/
diff --git a/resolv/res_send.c b/resolv/res_send.c
index a5b4fba44b..60d8ef2fb9 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -96,7 +96,7 @@ static char rcsid[] = "$Id$";
static int s = -1; /* socket used for communications */
static int connected = 0; /* is the socket connected */
-static int vc = 0; /* is the socket a virtual ciruit? */
+static int vc = 0; /* is the socket a virtual circuit? */
#ifndef FD_SET
/* XXX - should be in portability.h */
diff --git a/resolv/resolv.h b/resolv/resolv.h
index fe90ab5a75..b14cda0634 100644
--- a/resolv/resolv.h
+++ b/resolv/resolv.h
@@ -83,7 +83,7 @@
/*
* Resolver configuration file.
* Normally not present, but may contain the address of the
- * inital name server(s) to query and the domain search list.
+ * initial name server(s) to query and the domain search list.
*/
#ifndef _PATH_RESCONF
@@ -103,7 +103,7 @@
#define RES_MAXNDOTS 15 /* should reflect bit field size */
struct __res_state {
- int retrans; /* retransmition time interval */
+ int retrans; /* retransmission time interval */
int retry; /* number of times to retransmit */
u_long options; /* option flags - see below. */
int nscount; /* number of name servers */
@@ -224,18 +224,22 @@ extern const struct res_sym __p_type_syms[];
#define p_secstodate __p_secstodate
#define dn_count_labels __dn_count_labels
#define dn_comp __dn_comp
-#define dn_expand __dn_expand
-#define res_init __res_init
#define res_randomid __res_randomid
-#define res_query __res_query
-#define res_search __res_search
-#define res_querydomain __res_querydomain
-#define res_mkquery __res_mkquery
#define res_send __res_send
#define res_isourserver __res_isourserver
#define res_nameinquery __res_nameinquery
#define res_queriesmatch __res_queriesmatch
#define res_close __res_close
+
+#ifdef BIND_RES_POSIX3
+#define dn_expand __dn_expand
+#define res_init __res_init
+#define res_query __res_query
+#define res_search __res_search
+#define res_querydomain __res_querydomain
+#define res_mkquery __res_mkquery
+#endif
+
__BEGIN_DECLS
int res_hnok __P((const char *));
int res_ownok __P((const char *));
diff --git a/signal/signal.h b/signal/signal.h
index 26212cba5a..7b3c26094c 100644
--- a/signal/signal.h
+++ b/signal/signal.h
@@ -29,9 +29,6 @@
__BEGIN_DECLS
-#define __need_size_t
-#include <stddef.h>
-
#include <gnu/types.h>
#include <sigset.h> /* __sigset_t, __sig_atomic_t. */
@@ -90,16 +87,31 @@ extern int __sigblock __P ((int __mask));
/* Set the mask of blocked signals to MASK, returning the old mask. */
extern int __sigsetmask __P ((int __mask));
+
+/* The `sigpause' function has two different interfaces. The original
+ BSD definition defines the argument as a mask of the signal, while
+ the more modern interface in X/Open defines it as the signal
+ number. We go with the more modern version unless the user
+ explitcly selects the BSD version. */
+extern int __sigpause __P ((int __sig_or_mask, int __is_sig));
+
+#if defined(__USE_BSD) && !defined(__USE_XOPEN)
/* Set the mask of blocked signals to MASK,
wait for a signal to arrive, and then restore the mask. */
-extern int __sigpause __P ((int __mask));
+#define sigpause(mask) __sigpause ((mask), 0)
+#else
+#ifdef __USE_XOPEN
+/* Remove a signal from the signal mask and suspend the process. */
+#define sigpause(sig) __sigpause ((sig), 1)
+#endif
+#endif
+
#ifdef __USE_BSD
#define sigmask(sig) __sigmask(sig)
extern int sigblock __P ((int __mask));
extern int sigsetmask __P ((int __mask));
-extern int sigpause __P ((int __mask));
/* This function is here only for compatibility.
Use `sigprocmask' instead. */
@@ -147,7 +159,7 @@ extern int sigaddset __P ((sigset_t *__set, int __signo));
extern int sigdelset __P ((sigset_t *__set, int __signo));
/* Return 1 if SIGNO is in SET, 0 if not. */
-extern int sigismember __P ((__const sigset_t *__set, int signo));
+extern int sigismember __P ((__const sigset_t *__set, int __signo));
/* Get the system-specific definitions of `struct sigaction'
and the `SA_*' and `SIG_*'. constants. */
@@ -184,7 +196,7 @@ extern int sigwait __P ((__const sigset_t *__set, int *__sig));
#if defined(_SIGNAL_H) && defined(__USE_BSD)
-/* Names of the signals. This variable exists only for compatiblity.
+/* Names of the signals. This variable exists only for compatibility.
Use `strsignal' instead (see <string.h>). */
extern __const char *__const _sys_siglist[NSIG];
extern __const char *__const sys_siglist[NSIG];
@@ -228,6 +240,9 @@ extern int sigreturn __P ((struct sigcontext *__scp));
#if defined(_SIGNAL_H) && (defined(__USE_BSD) || defined(__USE_XOPEN_EXTENDED))
+#define __need_size_t
+#include <stddef.h>
+
/* If INTERRUPT is nonzero, make signal SIG interrupt system calls
(causing them to fail with EINTR); if INTERRUPT is zero, make system
calls be restarted after signal SIG. */
diff --git a/stdio-common/_itoa.c b/stdio-common/_itoa.c
index 9d77b39005..cf0b0f1235 100644
--- a/stdio-common/_itoa.c
+++ b/stdio-common/_itoa.c
@@ -1,23 +1,23 @@
/* Internal function for converting integers to ASCII.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Torbjorn Granlund <tege@matematik.su.se>
-and Ulrich Drepper <drepper@gnu.ai.mit.edu>.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Torbjorn Granlund <tege@matematik.su.se>
+ and Ulrich Drepper <drepper@gnu.ai.mit.edu>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <gmp-mparam.h>
#include "../stdlib/gmp.h"
@@ -67,7 +67,7 @@ struct base_table_t
};
/* To reduce the memory needed we include some fields of the tables
- only confitionally. */
+ only conditionally. */
#if BITS_PER_MP_LIMB == 32
# if UDIV_TIME > 2 * UMUL_TIME
# define SEL1(X) X,
diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c
index e532400f09..dede144b8d 100644
--- a/stdio-common/printf_fp.c
+++ b/stdio-common/printf_fp.c
@@ -157,7 +157,7 @@ __printf_fp (FILE *fp,
/* We need to shift the contents of fp_input by this amount of bits. */
int to_shift = 0;
- /* The significant of the floting-point value in question */
+ /* The fraction of the floting-point value in question */
MPN_VAR(frac);
/* and the exponent. */
int exponent;
@@ -256,7 +256,7 @@ __printf_fp (FILE *fp,
grouping = NULL;
else
{
- /* Figure out the thousands seperator character. */
+ /* Figure out the thousands separator character. */
if (info->extra == 0)
{
if (mbtowc (&thousands_sep, _NL_CURRENT (LC_NUMERIC,
@@ -622,7 +622,7 @@ __printf_fp (FILE *fp,
{
/* We cannot save any memory. Just roll the
number so that the leading digit is in a
- seperate limb. */
+ separate limb. */
cy = __mpn_lshift (frac, tmp, tmpsize, cnt_h + 1);
fracsize = tmpsize + 1;
@@ -844,7 +844,7 @@ __printf_fp (FILE *fp,
/* Round up. */
(*tp)++;
else
- /* It is more citical. All digits were 9's. */
+ /* It is more critical. All digits were 9's. */
{
if (type != 'f')
{
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index fa18033ea3..e2763e4c7d 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -1092,7 +1092,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
do_positional:
{
/* Array with information about the needed arguments. This has to
- be dynamically extendable. */
+ be dynamically extensible. */
size_t nspecs = 0;
size_t nspecs_max = 32; /* A more or less arbitrary start value. */
struct printf_spec *specs
@@ -1327,7 +1327,7 @@ do_positional:
/* Call the function. */
function_done = (*function) (s, &specs[nspecs_done].info, ptr);
- /* If an error occured we don't have information about #
+ /* If an error occurred we don't have information about #
of chars. */
if (function_done < 0)
{
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 71945bbf2e..7a3440c99a 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -347,7 +347,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
}
}
- /* Check for the assignment-suppressant and the number grouping flag. */
+ /* Check for the assignment-suppressing and the number grouping flag. */
while (*f == '*' || *f == '\'')
switch (*f++)
{
diff --git a/stdio/internals.c b/stdio/internals.c
index 8ec731fa62..68aee34ae6 100644
--- a/stdio/internals.c
+++ b/stdio/internals.c
@@ -680,7 +680,7 @@ __invalidate (stream)
/* Save its link. */
register FILE *next = stream->__next;
- /* Pulverize the fucker. */
+ /* Pulverize the deceased. */
memset((void *) stream, 0, sizeof(FILE));
/* Restore the deceased's link. */
diff --git a/stdio/stdio.h b/stdio/stdio.h
index 705fd832d0..8e913ccbd9 100644
--- a/stdio/stdio.h
+++ b/stdio/stdio.h
@@ -270,7 +270,7 @@ extern int __stdio_check_offset __P ((FILE *__stream));
or tempnam (the two are separate).
L_ctermid How long an array to pass to `ctermid'.
L_cuserid How long an array to pass to `cuserid'.
- FOPEN_MAX Mininum number of files that can be open at once.
+ FOPEN_MAX Minimum number of files that can be open at once.
FILENAME_MAX Maximum length of a filename. */
#include <stdio_lim.h>
@@ -671,6 +671,10 @@ extern int pclose __P ((FILE *__stream));
#ifdef __USE_POSIX
/* Return the name of the controlling terminal. */
extern char *ctermid __P ((char *__s));
+#endif
+
+
+#ifdef __USE_XOPEN
/* Return the name of the current user. */
extern char *cuserid __P ((char *__s));
#endif
diff --git a/stdlib/grouping.h b/stdlib/grouping.h
index 3aa4aaf297..8b097b68c5 100644
--- a/stdlib/grouping.h
+++ b/stdlib/grouping.h
@@ -111,7 +111,7 @@ correctly_grouped_prefix (const STRING_TYPE *begin, const STRING_TYPE *end,
/* The trailing portion of the string starting at NEW_END
contains a grouping error. So we will look for a correctly
- gouped number in the preceding portion instead. */
+ grouped number in the preceding portion instead. */
end = new_end;
}
else
@@ -123,7 +123,7 @@ correctly_grouped_prefix (const STRING_TYPE *begin, const STRING_TYPE *end,
/* This number does not fill the first group, but is correct. */
return end;
else
- /* CP points to a thousands seperator character. */
+ /* CP points to a thousands separator character. */
end = cp;
}
}
diff --git a/stdlib/monetary.h b/stdlib/monetary.h
index c2a1bc8d5e..c8f3f4dcb7 100644
--- a/stdlib/monetary.h
+++ b/stdlib/monetary.h
@@ -1,21 +1,21 @@
/* Header file for monetary value formatting functions.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _MONETARY_H
@@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA. */
__BEGIN_DECLS
-/* Formating a monetary value according to the current locale. */
+/* Formatting a monetary value according to the current locale. */
extern ssize_t strfmon __P ((char *__s, size_t __maxsize,
__const char *__format, ...));
diff --git a/stdlib/qsort.c b/stdlib/qsort.c
index bc8d171b79..0c83c48569 100644
--- a/stdlib/qsort.c
+++ b/stdlib/qsort.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Written by Douglas C. Schmidt (schmidt@ics.uci.edu).
+/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Douglas C. Schmidt (schmidt@ics.uci.edu).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <ansidecl.h>
#include <stdlib.h>
@@ -40,7 +40,7 @@ Cambridge, MA 02139, USA. */
#define MAX_THRESH 4
/* Stack node declarations used to store unfulfilled partition obligations. */
-typedef struct
+typedef struct
{
char *lo;
char *hi;
@@ -50,26 +50,26 @@ typedef struct
#define STACK_SIZE (8 * sizeof(unsigned long int))
#define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top))
#define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi)))
-#define STACK_NOT_EMPTY (stack < top)
+#define STACK_NOT_EMPTY (stack < top)
/* Order size using quicksort. This implementation incorporates
four optimizations discussed in Sedgewick:
- 1. Non-recursive, using an explicit stack of pointer that store the
- next array partition to sort. To save time, this maximum amount
- of space required to store an array of MAX_INT is allocated on the
- stack. Assuming a 32-bit integer, this needs only 32 *
+ 1. Non-recursive, using an explicit stack of pointer that store the
+ next array partition to sort. To save time, this maximum amount
+ of space required to store an array of MAX_INT is allocated on the
+ stack. Assuming a 32-bit integer, this needs only 32 *
sizeof(stack_node) == 136 bits. Pretty cheap, actually.
2. Chose the pivot element using a median-of-three decision tree.
- This reduces the probability of selecting a bad pivot value and
+ This reduces the probability of selecting a bad pivot value and
eliminates certain extraneous comparisons.
3. Only quicksorts TOTAL_ELEMS / MAX_THRESH partitions, leaving
- insertion sort to order the MAX_THRESH items within each partition.
+ insertion sort to order the MAX_THRESH items within each partition.
This is a big win, since insertion sort is faster for small, mostly
- sorted array segements.
+ sorted array segments.
4. The larger of the two sub-partitions is always pushed onto the
stack first, with the algorithm then concentrating on the
@@ -108,8 +108,8 @@ DEFUN(_quicksort, (pbase, total_elems, size, cmp),
char *pivot = pivot_buffer;
/* Select median value from among LO, MID, and HI. Rearrange
- LO and HI so the three values are sorted. This lowers the
- probability of picking a pathological pivot value and
+ LO and HI so the three values are sorted. This lowers the
+ probability of picking a pathological pivot value and
skips a comparison for both the LEFT_PTR and RIGHT_PTR. */
char *mid = lo + size * ((hi - lo) / size >> 1);
@@ -118,7 +118,7 @@ DEFUN(_quicksort, (pbase, total_elems, size, cmp),
SWAP(mid, lo, size);
if ((*cmp)((PTR) hi, (PTR) mid) < 0)
SWAP(mid, hi, size);
- else
+ else
goto jump_over;
if ((*cmp)((PTR) mid, (PTR) lo) < 0)
SWAP(mid, lo, size);
@@ -127,12 +127,12 @@ DEFUN(_quicksort, (pbase, total_elems, size, cmp),
pivot = pivot_buffer;
left_ptr = lo + size;
- right_ptr = hi - size;
+ right_ptr = hi - size;
- /* Here's the famous ``collapse the walls'' section of quicksort.
- Gotta like those tight inner loops! They are the main reason
+ /* Here's the famous ``collapse the walls'' section of quicksort.
+ Gotta like those tight inner loops! They are the main reason
that this algorithm runs much faster than others. */
- do
+ do
{
while ((*cmp)((PTR) left_ptr, (PTR) pivot) < 0)
left_ptr += size;
@@ -140,23 +140,23 @@ DEFUN(_quicksort, (pbase, total_elems, size, cmp),
while ((*cmp)((PTR) pivot, (PTR) right_ptr) < 0)
right_ptr -= size;
- if (left_ptr < right_ptr)
+ if (left_ptr < right_ptr)
{
SWAP(left_ptr, right_ptr, size);
left_ptr += size;
right_ptr -= size;
}
- else if (left_ptr == right_ptr)
+ else if (left_ptr == right_ptr)
{
left_ptr += size;
right_ptr -= size;
break;
}
- }
+ }
while (left_ptr <= right_ptr);
/* Set up pointers for next iteration. First determine whether
- left and right partitions are below the threshold size. If so,
+ left and right partitions are below the threshold size. If so,
ignore one or both. Otherwise, push the larger partition's
bounds on the stack and continue sorting the smaller one. */
@@ -164,22 +164,22 @@ DEFUN(_quicksort, (pbase, total_elems, size, cmp),
{
if ((size_t) (hi - left_ptr) <= max_thresh)
/* Ignore both small partitions. */
- POP(lo, hi);
+ POP(lo, hi);
else
- /* Ignore small left partition. */
+ /* Ignore small left partition. */
lo = left_ptr;
}
else if ((size_t) (hi - left_ptr) <= max_thresh)
/* Ignore small right partition. */
hi = right_ptr;
else if ((right_ptr - lo) > (hi - left_ptr))
- {
+ {
/* Push larger left partition indices. */
PUSH(lo, right_ptr);
lo = left_ptr;
}
else
- {
+ {
/* Push larger right partition indices. */
PUSH(left_ptr, hi);
hi = right_ptr;
@@ -188,8 +188,8 @@ DEFUN(_quicksort, (pbase, total_elems, size, cmp),
}
/* Once the BASE_PTR array is partially sorted by quicksort the rest
- is completely sorted using insertion sort, since this is efficient
- for partitions below MAX_THRESH size. BASE_PTR points to the beginning
+ is completely sorted using insertion sort, since this is efficient
+ for partitions below MAX_THRESH size. BASE_PTR points to the beginning
of the array to sort, and END_PTR points at the very last element in
the array (*not* one beyond it!). */
@@ -240,4 +240,3 @@ DEFUN(_quicksort, (pbase, total_elems, size, cmp),
}
}
}
-
diff --git a/stdlib/random.c b/stdlib/random.c
index ffa658d650..370a6105d5 100644
--- a/stdlib/random.c
+++ b/stdlib/random.c
@@ -35,16 +35,16 @@
then initialized to contain information for random number generation with
that much state information. Good sizes for the amount of state
information are 32, 64, 128, and 256 bytes. The state can be switched by
- calling the setstate() function with the same array as was initiallized
+ calling the setstate() function with the same array as was initialized
with initstate(). By default, the package runs with 128 bytes of state
information and generates far better random numbers than a linear
congruential generator. If the amount of state information is less than
32 bytes, a simple linear congruential R.N.G. is used. Internally, the
- state information is treated as an array of longs; the zeroeth element of
+ state information is treated as an array of longs; the zeroth element of
the array is the type of R.N.G. being used (small integer); the remainder
of the array is the state information for the R.N.G. Thus, 32 bytes of
state information will give 7 longs worth of state information, which will
- allow a degree seven polynomial. (Note: The zeroeth word of state
+ allow a degree seven polynomial. (Note: The zeroth word of state
information also has some other information stored in it; see setstate
for details). The random number generation technique is a linear feedback
shift register approach, employing trinomials (since there are fewer terms
@@ -64,7 +64,7 @@
/* For each of the currently supported random number generators, we have a
- break value on the amount of state information (you need at least thi
+ break value on the amount of state information (you need at least this many
bytes of state info to support this random number generator), a degree for
the polynomial (actually a trinomial) that the R.N.G. is based on, and
separation between the two lower order coefficients of the trinomial. */
@@ -110,7 +110,7 @@
initstate(1, randtbl, 128);
Note that this initialization takes advantage of the fact that srandom
advances the front and rear pointers 10*rand_deg times, and hence the
- rear pointer which starts at 0 will also end up at zero; thus the zeroeth
+ rear pointer which starts at 0 will also end up at zero; thus the zeroth
element of the state information, which contains info about the current
position of the rear pointer is just
(MAX_TYPES * (rptr - state)) + TYPE_3 == TYPE_3. */
@@ -148,7 +148,7 @@ static struct random_data unsafe_state =
the type of the current generator, the degree of the current polynomial
being used, and the separation between the two pointers.
Note that for efficiency of random, we remember the first location of
- the state information, not the zeroeth. Hence it is valid to access
+ the state information, not the zeroth. Hence it is valid to access
state[-1], which is used to store the type of the R.N.G.
Also, we remember the last location, since this is more efficient than
indexing every time to find the address of the last element to see if
@@ -224,7 +224,7 @@ weak_alias (__initstate, initstate)
Note: It is important that we also remember the locations of the pointers
in the current state information, and restore the locations of the pointers
from the old state information. This is done by multiplexing the pointer
- location into the zeroeth word of the state information. Note that due
+ location into the zeroth word of the state information. Note that due
to the order in which things are done, it is OK to call setstate with the
same state as the current state
Returns a pointer to the old state information. */
@@ -250,7 +250,7 @@ weak_alias (__setstate, setstate)
/* If we are using the trivial TYPE_0 R.N.G., just do the old linear
congruential bit. Otherwise, we do our fancy trinomial stuff, which is the
- same in all ther other cases due to all the global variables that have been
+ same in all the other cases due to all the global variables that have been
set up. The basic operation is to add the number at the rear pointer into
the one at the front pointer. Then both pointers are advanced to the next
location cyclically in the table. The value returned is the sum generated,
diff --git a/stdlib/random_r.c b/stdlib/random_r.c
index 823075bfc3..d19fd1755b 100644
--- a/stdlib/random_r.c
+++ b/stdlib/random_r.c
@@ -35,16 +35,16 @@
then initialized to contain information for random number generation with
that much state information. Good sizes for the amount of state
information are 32, 64, 128, and 256 bytes. The state can be switched by
- calling the setstate() function with the same array as was initiallized
+ calling the setstate() function with the same array as was initialized
with initstate(). By default, the package runs with 128 bytes of state
information and generates far better random numbers than a linear
congruential generator. If the amount of state information is less than
32 bytes, a simple linear congruential R.N.G. is used. Internally, the
- state information is treated as an array of longs; the zeroeth element of
+ state information is treated as an array of longs; the zeroth element of
the array is the type of R.N.G. being used (small integer); the remainder
of the array is the state information for the R.N.G. Thus, 32 bytes of
state information will give 7 longs worth of state information, which will
- allow a degree seven polynomial. (Note: The zeroeth word of state
+ allow a degree seven polynomial. (Note: The zeroth word of state
information also has some other information stored in it; see setstate
for details). The random number generation technique is a linear feedback
shift register approach, employing trinomials (since there are fewer terms
@@ -64,7 +64,7 @@
/* For each of the currently supported random number generators, we have a
- break value on the amount of state information (you need at least thi
+ break value on the amount of state information (you need at least this many
bytes of state info to support this random number generator), a degree for
the polynomial (actually a trinomial) that the R.N.G. is based on, and
separation between the two lower order coefficients of the trinomial. */
@@ -236,7 +236,7 @@ weak_alias (__initstate_r, initstate_r)
Note: It is important that we also remember the locations of the pointers
in the current state information, and restore the locations of the pointers
from the old state information. This is done by multiplexing the pointer
- location into the zeroeth word of the state information. Note that due
+ location into the zeroth word of the state information. Note that due
to the order in which things are done, it is OK to call setstate with the
same state as the current state
Returns a pointer to the old state information. */
@@ -290,7 +290,7 @@ weak_alias (__setstate_r, setstate_r)
/* If we are using the trivial TYPE_0 R.N.G., just do the old linear
congruential bit. Otherwise, we do our fancy trinomial stuff, which is the
- same in all ther other cases due to all the global variables that have been
+ same in all the other cases due to all the global variables that have been
set up. The basic operation is to add the number at the rear pointer into
the one at the front pointer. Then both pointers are advanced to the next
location cyclically in the table. The value returned is the sum generated,
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index 99fcf2e7c7..235b2f0b59 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -31,9 +31,6 @@
#define __need_NULL
#include <stddef.h>
-#define __need_Emath
-#include <errno.h>
-
__BEGIN_DECLS
/* Returned by `div'. */
diff --git a/stdlib/strfmon.c b/stdlib/strfmon.c
index 85f8898136..469908c1df 100644
--- a/stdlib/strfmon.c
+++ b/stdlib/strfmon.c
@@ -1,23 +1,23 @@
-/* strfmon -- formating a monetary value according to the current locale
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@cygnus.com>
-and Jochen Hein <Jochen.Hein@informatik.TU-Clausthal.de>, 1996.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+/* Formatting a monetary value according to the current locale.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>
+ and Jochen Hein <Jochen.Hein@informatik.TU-Clausthal.de>, 1996.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <ctype.h>
#include <errno.h>
@@ -355,7 +355,7 @@ strfmon (char *s, size_t maxsize, const char *format, ...)
#define left_paren '('
#define right_paren ')'
- startp = dest; /* Remember start so we can compute lenght. */
+ startp = dest; /* Remember start so we can compute length. */
if (sign_posn == 0)
out_char (left_paren);
diff --git a/stdlib/strtod.c b/stdlib/strtod.c
index 60a3de5228..8c305ca178 100644
--- a/stdlib/strtod.c
+++ b/stdlib/strtod.c
@@ -333,7 +333,7 @@ __mpn_lshift_1 (mp_limb_t *ptr, mp_size_t size, unsigned int count,
Set *ENDPTR to the character after the last used one. If the number is
smaller than the smallest representable number, set `errno' to ERANGE and
return 0.0. If the number is too big to be represented, set `errno' to
- ERANGE and return HUGE_VAL with the approriate sign. */
+ ERANGE and return HUGE_VAL with the appropriate sign. */
FLOAT
INTERNAL (STRTOF) (nptr, endptr, group)
const STRING_TYPE *nptr;
diff --git a/string/envz.c b/string/envz.c
index 03af3d49ad..f00fe24d31 100644
--- a/string/envz.c
+++ b/string/envz.c
@@ -123,7 +123,7 @@ envz_add (char **envz, size_t *envz_len, const char *name, const char *value)
}
/* Adds each entry in ENVZ2 to ENVZ & ENVZ_LEN, as if with envz_add(). If
- OVERRIDE is true, then values in ENVZ2 will supercede those with the same
+ OVERRIDE is true, then values in ENVZ2 will supersede those with the same
name in ENV, otherwise not. */
error_t
envz_merge (char **envz, size_t *envz_len, const char *envz2,
diff --git a/string/envz.h b/string/envz.h
index b7a34b3b6c..23aaed6119 100644
--- a/string/envz.h
+++ b/string/envz.h
@@ -49,7 +49,7 @@ extern error_t envz_add __P ((char **__envz, size_t *__envz_len,
__const char *__name, __const char *__value));
/* Adds each entry in ENVZ2 to ENVZ & ENVZ_LEN, as if with envz_add(). If
- OVERRIDE is true, then values in ENVZ2 will supercede those with the same
+ OVERRIDE is true, then values in ENVZ2 will supersede those with the same
name in ENV, otherwise not. */
extern error_t envz_merge __P ((char **__envz, size_t *__envz_len,
__const char *__envz2, size_t __envz2_len,
diff --git a/string/stratcliff.c b/string/stratcliff.c
index a994e569be..ebe565968e 100644
--- a/string/stratcliff.c
+++ b/string/stratcliff.c
@@ -47,7 +47,7 @@ main (int argc, char *argv[])
puts ("No test, mmap not available.");
else
{
- printf ("mmaping failed: %m");
+ printf ("mmap failed: %m");
result = 1;
}
}
diff --git a/string/strerror.c b/string/strerror.c
index 62a08a016f..7052ef64d6 100644
--- a/string/strerror.c
+++ b/string/strerror.c
@@ -1,27 +1,27 @@
-/* Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <string.h>
extern char *_strerror_internal __P ((int, char *, size_t));
-/* Return a string descibing the errno code in ERRNUM.
+/* Return a string describing the errno code in ERRNUM.
The storage is good only until the next call to strerror.
Writing to the storage causes undefined behavior. */
char *
diff --git a/string/strerror_r.c b/string/strerror_r.c
index e03e50c635..6a43a556a9 100644
--- a/string/strerror_r.c
+++ b/string/strerror_r.c
@@ -21,7 +21,7 @@
extern char *_strerror_internal __P ((int, char *, size_t));
-/* Return a string descibing the errno code in ERRNUM. At most BUFLEN
+/* Return a string describing the errno code in ERRNUM. At most BUFLEN
characters of the result will be placed in STRERRBUF. */
char *
__strerror_r (int errnum, char *buf, size_t buflen)
diff --git a/string/string.h b/string/string.h
index 79a7aaa58d..c51fb956ea 100644
--- a/string/string.h
+++ b/string/string.h
@@ -93,7 +93,9 @@ extern char *strdup __P ((__const char *__s));
resultant string is terminated even if no null terminator
appears before STRING[N]. */
extern char *__strndup __P ((__const char *__string, size_t __n));
+#if defined(__USE_GNU)
extern char *strndup __P ((__const char *__string, size_t __n));
+#endif
#if defined (__USE_GNU) && defined (__GNUC__)
/* Duplicate S, returning an identical alloca'd string. */
@@ -129,9 +131,9 @@ extern size_t strcspn __P ((__const char *__s, __const char *__reject));
/* Return the length of the initial segment of S which
consists entirely of characters in ACCEPT. */
extern size_t strspn __P ((__const char *__s, __const char *__accept));
-/* Find the first occurence in S of any character in ACCEPT. */
+/* Find the first occurrence in S of any character in ACCEPT. */
extern char *strpbrk __P ((__const char *__s, __const char *__accept));
-/* Find the first occurence of NEEDLE in HAYSTACK. */
+/* Find the first occurrence of NEEDLE in HAYSTACK. */
extern char *strstr __P ((__const char *__haystack, __const char *__needle));
/* Divide S into tokens separated by characters in DELIM. */
extern char *strtok __P ((char *__s, __const char *__delim));
@@ -142,7 +144,7 @@ extern char *strtok __P ((char *__s, __const char *__delim));
extern char *strtok_r __P ((char *__s, __const char *__delim,
char **__save_ptr));
-/* Find the first occurence of NEEDLE in HAYSTACK.
+/* Find the first occurrence of NEEDLE in HAYSTACK.
NEEDLE is NEEDLELEN bytes long;
HAYSTACK is HAYSTACKLEN bytes long. */
extern __ptr_t memmem __P ((__const __ptr_t __haystack, size_t __haystacklen,
diff --git a/string/strxfrm.c b/string/strxfrm.c
index 6d0a7061b7..820ad93947 100644
--- a/string/strxfrm.c
+++ b/string/strxfrm.c
@@ -1,21 +1,21 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+ This file is part of the GNU C Library.
+ Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <stddef.h>
#include <stdlib.h>
@@ -178,7 +178,7 @@ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n)
u_int32_t w;
/* Here we have to check for IGNORE entries. If these are
- found we count them and go on witht he next value. */
+ found we count them and go on with he next value. */
while ((w = run->data[pass].value[idx]) == (u_int32_t) IGNORE_CHAR)
{
++ignore;
diff --git a/sunrpc/clnt_raw.c b/sunrpc/clnt_raw.c
index 7e9e6e9e29..fe2aecfa5a 100644
--- a/sunrpc/clnt_raw.c
+++ b/sunrpc/clnt_raw.c
@@ -38,8 +38,8 @@ static char sccsid[] = "@(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro";
*
* Memory based rpc for simple testing and timing.
* Interface to create an rpc client and server in the same process.
- * This lets us similate rpc and get round trip overhead, without
- * any interference from the kernal.
+ * This lets us simulate rpc and get round trip overhead, without
+ * any interference from the kernel.
*/
#include <rpc/rpc.h>
@@ -95,7 +95,7 @@ clntraw_create(prog, vers)
clntraw_private = clp;
}
/*
- * pre-serialize the staic part of the call msg and stash it away
+ * pre-serialize the static part of the call msg and stash it away
*/
call_msg.rm_direction = CALL;
call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c
index be365f1b2a..bd40cdddf6 100644
--- a/sunrpc/clnt_tcp.c
+++ b/sunrpc/clnt_tcp.c
@@ -189,7 +189,7 @@ clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
call_msg.rm_call.cb_vers = vers;
/*
- * pre-serialize the staic part of the call msg and stash it away
+ * pre-serialize the static part of the call msg and stash it away
*/
xdrmem_create(&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE,
XDR_ENCODE);
diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c
index 2074095d99..6b12306a55 100644
--- a/sunrpc/clnt_udp.c
+++ b/sunrpc/clnt_udp.c
@@ -97,7 +97,7 @@ struct cu_data {
* Caller may wish to set this something more useful.
*
* wait is the amount of time used between retransmitting a call if
- * no response has been heard; retransmition occurs until the actual
+ * no response has been heard; retransmission occurs until the actual
* rpc call times out.
*
* sendsz and recvsz are the maximum allowable packet sizes that can be
diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c
index 3fbc47224d..40a35f1990 100644
--- a/sunrpc/pmap_rmt.c
+++ b/sunrpc/pmap_rmt.c
@@ -166,7 +166,7 @@ static int
getbroadcastnets(addrs, sock, buf)
struct in_addr *addrs;
int sock; /* any valid socket will do */
- char *buf; /* why allocxate more when we can use existing... */
+ char *buf; /* why allocate more when we can use existing... */
{
struct ifconf ifc;
struct ifreq ifreq, *ifr;
diff --git a/sunrpc/rpc/auth.h b/sunrpc/rpc/auth.h
index a40bddd4c3..39aa0f7bcb 100644
--- a/sunrpc/rpc/auth.h
+++ b/sunrpc/rpc/auth.h
@@ -97,7 +97,7 @@ typedef struct {
struct auth_ops {
void (*ah_nextverf)();
int (*ah_marshal)(); /* nextverf & serialize */
- int (*ah_validate)(); /* validate varifier */
+ int (*ah_validate)(); /* validate verifier */
int (*ah_refresh)(); /* refresh credentials */
void (*ah_destroy)(); /* destroy this structure */
} *ah_ops;
diff --git a/sunrpc/rpc/auth_des.h b/sunrpc/rpc/auth_des.h
index 24afaee125..097eb68771 100644
--- a/sunrpc/rpc/auth_des.h
+++ b/sunrpc/rpc/auth_des.h
@@ -21,8 +21,8 @@
#define _RPC_AUTH_DES_H 1
#include <sys/cdefs.h>
-/* This is no complete version of this header. More defintions with
- the real authentification stuff will come in 1997. For now we only
+/* This is no complete version of this header. More definitions with
+ the real authentication stuff will come in 1997. For now we only
need to define the function for handling public keys. */
diff --git a/sunrpc/rpc/clnt.h b/sunrpc/rpc/clnt.h
index 2e1ff26314..305e26d241 100644
--- a/sunrpc/rpc/clnt.h
+++ b/sunrpc/rpc/clnt.h
@@ -71,7 +71,7 @@ enum clnt_stat {
* callrpc & clnt_create errors
*/
RPC_UNKNOWNHOST=13, /* unknown host name */
- RPC_UNKNOWNPROTO=17, /* unkown protocol */
+ RPC_UNKNOWNPROTO=17, /* unknown protocol */
/*
* _ create errors
@@ -91,7 +91,7 @@ enum clnt_stat {
struct rpc_err {
enum clnt_stat re_status;
union {
- int RE_errno; /* realated system error */
+ int RE_errno; /* related system error */
enum auth_stat RE_why; /* why the auth error occurred */
struct {
u_long low; /* lowest verion supported */
@@ -210,7 +210,7 @@ typedef struct {
/*
- * RPCTEST is a test program which is accessable on every rpc
+ * RPCTEST is a test program which is accessible on every rpc
* transport/port. It is used for testing, performance evaluation,
* and network administration.
*/
diff --git a/sunrpc/rpc/svc.h b/sunrpc/rpc/svc.h
index 081f9bc327..3fee9ee394 100644
--- a/sunrpc/rpc/svc.h
+++ b/sunrpc/rpc/svc.h
@@ -74,7 +74,7 @@ typedef struct {
int xp_sock;
u_short xp_port; /* associated port number */
struct xp_ops {
- bool_t (*xp_recv)(); /* receive incomming requests */
+ bool_t (*xp_recv)(); /* receive incoming requests */
enum xprt_stat (*xp_stat)(); /* get transport status */
bool_t (*xp_getargs)(); /* get arguments */
bool_t (*xp_reply)(); /* send reply */
@@ -236,7 +236,7 @@ extern void svcerr_systemerr __P ((SVCXPRT *__xprt));
* Somebody has to wait for incoming requests and then call the correct
* service routine. The routine svc_run does infinite waiting; i.e.,
* svc_run never returns.
- * Since another (co-existant) package may wish to selectively wait for
+ * Since another (coexistant) package may wish to selectively wait for
* incoming calls or other events outside of the rpc architecture, the
* routine svc_getreq is provided. It must be passed readfds, the
* "in-place" results of a select system call (see select, section 2).
diff --git a/sunrpc/rpc/xdr.h b/sunrpc/rpc/xdr.h
index 1cc9af9375..e54df5a1fd 100644
--- a/sunrpc/rpc/xdr.h
+++ b/sunrpc/rpc/xdr.h
@@ -96,8 +96,8 @@ enum xdr_op {
/*
* The XDR handle.
* Contains operation which is being applied to the stream,
- * an operations vector for the paticular implementation (e.g. see xdr_mem.c),
- * and two private fields for the use of the particular impelementation.
+ * an operations vector for the particular implementation (e.g. see xdr_mem.c),
+ * and two private fields for the use of the particular implementation.
*/
typedef struct {
enum xdr_op x_op; /* operation; fast additional param */
@@ -196,7 +196,7 @@ struct xdr_discrim {
};
/*
- * In-line routines for fast encode/decode of primitve data types.
+ * Inline routines for fast encode/decode of primitive data types.
* Caveat emptor: these use single memory cycles to get the
* data from the underlying buffer, and will fail to operate
* properly if the data is not aligned. The standard way to use these
diff --git a/sunrpc/rpc_clntout.c b/sunrpc/rpc_clntout.c
index 7bfe491d9e..fbb8761100 100644
--- a/sunrpc/rpc_clntout.c
+++ b/sunrpc/rpc_clntout.c
@@ -36,7 +36,7 @@ char clntout_rcsid[] =
/*
* rpc_clntout.c, Client-stub outputter for the RPC protocol compiler
- * Copyright (C) 1987, Sun Microsytsems, Inc.
+ * Copyright (C) 1987, Sun Microsystems, Inc.
*/
#include <stdio.h>
#include <string.h>
@@ -60,7 +60,7 @@ write_stubs(void)
list *l;
definition *def;
- f_print(fout,
+ f_print(fout,
"\n/* Default timeout can be changed using clnt_control() */\n");
f_print(fout, "static struct timeval TIMEOUT = { %d, 0 };\n",
DEFAULT_TIMEOUT);
@@ -99,7 +99,7 @@ write_program(definition *def)
/* sample addargname = "clnt"; sample addargtype = "CLIENT * " */
-void printarglist(proc_list *proc,
+void printarglist(proc_list *proc,
const char *addargname, const char *addargtype)
{
@@ -110,16 +110,16 @@ void printarglist(proc_list *proc,
f_print(fout, "(");
ptype(proc->args.decls->decl.prefix, proc->args.decls->decl.type, 1);
f_print(fout, "*argp, %s%s)\n", addargtype, addargname );
- }
+ }
else {
f_print(fout, "(argp, %s)\n", addargname);
f_print(fout, "\t");
ptype(proc->args.decls->decl.prefix, proc->args.decls->decl.type, 1);
f_print(fout, "*argp;\n");
}
- } else if (streq( proc->args.decls->decl.type, "void")) {
+ } else if (streq( proc->args.decls->decl.type, "void")) {
/* newstyle, 0 argument */
- if( Cflag )
+ if( Cflag )
f_print(fout, "(%s%s)\n", addargtype, addargname );
else
f_print(fout, "(%s)\n", addargname);
@@ -127,7 +127,7 @@ void printarglist(proc_list *proc,
/* new style, 1 or multiple arguments */
if( !Cflag ) {
f_print(fout, "(");
- for (l = proc->args.decls; l != NULL; l = l->next)
+ for (l = proc->args.decls; l != NULL; l = l->next)
f_print(fout, "%s, ", l->decl.name);
f_print(fout, "%s)\n", addargname );
for (l = proc->args.decls; l != NULL; l = l->next) {
@@ -142,13 +142,13 @@ void printarglist(proc_list *proc,
}
}
- if( !Cflag )
+ if( !Cflag )
f_print(fout, "\t%s%s;\n", addargtype, addargname );
}
-static
+static
const char *
ampr(const char *type)
{
@@ -170,7 +170,7 @@ printbody(proc_list *proc)
to stuff the arguments. */
if ( newstyle && args2) {
f_print(fout, "\t%s", proc->args.argname);
- f_print(fout, " arg;\n");
+ f_print(fout, " arg;\n");
}
f_print(fout, "\tstatic ");
if (streq(proc->res_type, "void")) {
@@ -186,7 +186,7 @@ printbody(proc_list *proc)
/* newstyle, 0 arguments */
f_print(fout,
"\tif (clnt_call(clnt, %s, xdr_void", proc->proc_name);
- f_print(fout,
+ f_print(fout,
", NULL, xdr_%s, %s,%s, TIMEOUT) != RPC_SUCCESS) {\n",
stringfix(proc->res_type), ampr(proc->res_type), RESULT);
@@ -199,14 +199,14 @@ printbody(proc_list *proc)
f_print(fout,
"\tif (clnt_call(clnt, %s, xdr_%s", proc->proc_name,
proc->args.argname);
- f_print(fout,
+ f_print(fout,
", &arg, xdr_%s, %s%s, TIMEOUT) != RPC_SUCCESS) {\n",
stringfix(proc->res_type), ampr(proc->res_type), RESULT);
} else { /* single argument, new or old style */
f_print(fout,
"\tif (clnt_call(clnt, %s, xdr_%s, %s%s, xdr_%s, %s%s, TIMEOUT) != RPC_SUCCESS) {\n",
- proc->proc_name,
- stringfix(proc->args.decls->decl.type),
+ proc->proc_name,
+ stringfix(proc->args.decls->decl.type),
(newstyle ? "&" : ""),
(newstyle ? proc->args.decls->decl.name : "argp"),
stringfix(proc->res_type), ampr(proc->res_type),RESULT);
@@ -214,10 +214,9 @@ printbody(proc_list *proc)
f_print(fout, "\t\treturn (NULL);\n");
f_print(fout, "\t}\n");
if (streq(proc->res_type, "void")) {
- f_print(fout, "\treturn ((void *)%s%s);\n",
+ f_print(fout, "\treturn ((void *)%s%s);\n",
ampr(proc->res_type),RESULT);
} else {
f_print(fout, "\treturn (%s%s);\n", ampr(proc->res_type),RESULT);
}
}
-
diff --git a/sunrpc/rpc_cout.c b/sunrpc/rpc_cout.c
index 378a686fa7..77319d9b15 100644
--- a/sunrpc/rpc_cout.c
+++ b/sunrpc/rpc_cout.c
@@ -81,7 +81,7 @@ emit(definition *def)
{
/* now we need to handle declarations like
struct typedef foo foo;
- since we dont want this to be expanded into 2 calls to xdr_foo */
+ since we don't want this to be expanded into 2 calls to xdr_foo */
if(strcmp(def->def.ty.old_type,def->def_name)==0)
return;
diff --git a/sunrpc/rpcsvc/mount.x b/sunrpc/rpcsvc/mount.x
index 7e0d7f3ad6..310b4ca542 100644
--- a/sunrpc/rpcsvc/mount.x
+++ b/sunrpc/rpcsvc/mount.x
@@ -8,23 +8,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -45,10 +45,10 @@ const FHSIZE = 32; /* size in bytes of a file handle */
* or a directory. The file handle can contain whatever information the
* server needs to distinguish an individual file.
*/
-typedef opaque fhandle[FHSIZE];
+typedef opaque fhandle[FHSIZE];
/*
- * If a status of zero is returned, the call completed successfully, and
+ * If a status of zero is returned, the call completed successfully, and
* a file handle for the directory follows. A non-zero status indicates
* some sort of error. The status corresponds with UNIX error numbers.
*/
@@ -101,18 +101,18 @@ struct exportnode {
program MOUNTPROG {
/*
* Version one of the mount protocol communicates with version two
- * of the NFS protocol. The only connecting point is the fhandle
+ * of the NFS protocol. The only connecting point is the fhandle
* structure, which is the same for both protocols.
*/
version MOUNTVERS {
/*
* Does no work. It is made available in all RPC services
- * to allow server reponse testing and timing
+ * to allow server response testing and timing
*/
void
MOUNTPROC_NULL(void) = 0;
- /*
+ /*
* If fhs_status is 0, then fhs_fhandle contains the
* file handle for the directory. This file handle may
* be used in the NFS protocol. This procedure also adds
@@ -120,12 +120,12 @@ program MOUNTPROG {
* the directory.
* Unix authentication required.
*/
- fhstatus
+ fhstatus
MOUNTPROC_MNT(dirpath) = 1;
/*
- * Returns the list of remotely mounted filesystems. The
- * mountlist contains one entry for each hostname and
+ * Returns the list of remotely mounted filesystems. The
+ * mountlist contains one entry for each hostname and
* directory pair.
*/
mountlist
diff --git a/sunrpc/rpcsvc/nfs_prot.x b/sunrpc/rpcsvc/nfs_prot.x
index 7633e5add4..630dab24d1 100644
--- a/sunrpc/rpcsvc/nfs_prot.x
+++ b/sunrpc/rpcsvc/nfs_prot.x
@@ -7,23 +7,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -99,7 +99,7 @@ struct nfs_fh {
opaque data[NFS_FHSIZE];
};
-/*
+/*
* Timeval
*/
struct nfstime {
@@ -118,7 +118,7 @@ struct fattr {
unsigned uid; /* owner user id */
unsigned gid; /* owner group id */
unsigned size; /* file size in bytes */
- unsigned blocksize; /* prefered block size */
+ unsigned blocksize; /* preferred block size */
unsigned rdev; /* special device # */
unsigned blocks; /* Kb of disk used by file */
unsigned fsid; /* device # */
@@ -141,7 +141,7 @@ struct sattr {
};
-typedef string filename<NFS_MAXNAMLEN>;
+typedef string filename<NFS_MAXNAMLEN>;
typedef string nfspath<NFS_MAXPATHLEN>;
/*
@@ -215,7 +215,7 @@ default:
};
/*
- * Arguments to remote write
+ * Arguments to remote write
*/
struct writeargs {
nfs_fh file; /* handle for file */
@@ -297,28 +297,28 @@ default:
*/
program NFS_PROGRAM {
version NFS_VERSION {
- void
+ void
NFSPROC_NULL(void) = 0;
- attrstat
+ attrstat
NFSPROC_GETATTR(nfs_fh) = 1;
- attrstat
+ attrstat
NFSPROC_SETATTR(sattrargs) = 2;
- void
+ void
NFSPROC_ROOT(void) = 3;
- diropres
+ diropres
NFSPROC_LOOKUP(diropargs) = 4;
- readlinkres
+ readlinkres
NFSPROC_READLINK(nfs_fh) = 5;
- readres
+ readres
NFSPROC_READ(readargs) = 6;
- void
+ void
NFSPROC_WRITECACHE(void) = 7;
attrstat
@@ -352,4 +352,3 @@ program NFS_PROGRAM {
NFSPROC_STATFS(nfs_fh) = 17;
} = 2;
} = 100003;
-
diff --git a/sunrpc/rpcsvc/rex.x b/sunrpc/rpcsvc/rex.x
index 6063fdd28a..949d9f0747 100644
--- a/sunrpc/rpcsvc/rex.x
+++ b/sunrpc/rpcsvc/rex.x
@@ -8,23 +8,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -43,7 +43,7 @@ typedef string rexstring<1024>;
const SIGINT = 2; /* interrupt */
/*
- * Values for rst_flags, below
+ * Values for rst_flags, below
*/
const REX_INTERACTIVE = 1; /* interactive mode */
@@ -148,7 +148,7 @@ struct tchars {
/* chars[2] == start output char */
/* chars[3] == stop output char */
/* chars[4] == end-of-file char */
- /* chars[5] == input delimeter (like nl) */
+ /* chars[5] == input delimiter (like nl) */
};
struct ltchars {
@@ -199,7 +199,7 @@ program REXPROG {
/*
* Start remote execution
*/
- rex_result
+ rex_result
REXPROC_START(rex_start) = 1;
/*
diff --git a/sunrpc/rpcsvc/rusers.x b/sunrpc/rpcsvc/rusers.x
index 86fca74f87..fdd1890e20 100644
--- a/sunrpc/rpcsvc/rusers.x
+++ b/sunrpc/rpcsvc/rusers.x
@@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -96,7 +96,7 @@ program RUSERSPROG {
%
%/*
% * This is the structure used in version 2 of the rusersd RPC service.
-% * It corresponds to the utmp structure for BSD sytems.
+% * It corresponds to the utmp structure for BSD systems.
% */
%struct ru_utmp {
% char ut_line[8]; /* tty name */
@@ -164,7 +164,7 @@ program RUSERSPROG {
% XDR *xdrs;
% struct ru_utmp **objpp;
%{
-% if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct ru_utmp),
+% if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct ru_utmp),
% xdr_utmp)) {
% return (FALSE);
% }
@@ -202,7 +202,7 @@ program RUSERSPROG {
% XDR *xdrs;
% struct utmpidle **objpp;
%{
-% if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct utmpidle),
+% if (!xdr_reference(xdrs, (char **) objpp, sizeof (struct utmpidle),
% xdr_utmpidle)) {
% return (FALSE);
% }
diff --git a/sunrpc/rpcsvc/sm_inter.x b/sunrpc/rpcsvc/sm_inter.x
index 2817ebfda3..06c8f06e30 100644
--- a/sunrpc/rpcsvc/sm_inter.x
+++ b/sunrpc/rpcsvc/sm_inter.x
@@ -8,23 +8,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -37,7 +37,7 @@
*/
-program SM_PROG {
+program SM_PROG {
version SM_VERS {
/* res_stat = stat_succ if status monitor agrees to monitor */
/* res_stat = stat_fail if status monitor cannot monitor */
@@ -67,7 +67,7 @@ struct sm_name {
};
struct my_id {
- string my_name<SM_MAXSTRLEN>; /* name of the site iniates the monitoring request*/
+ string my_name<SM_MAXSTRLEN>; /* name of the site iniating the monitoring request*/
int my_prog; /* rpc program # of the requesting process */
int my_vers; /* rpc version # of the requesting process */
int my_proc; /* rpc procedure # of the requesting process */
@@ -86,7 +86,7 @@ struct mon{
/*
- * state # of status monitor monitonically increases each time
+ * state # of status monitor monotonically increases each time
* status of the site changes:
* an even number (>= 0) indicates the site is down and
* an odd number (> 0) indicates the site is up;
@@ -105,7 +105,7 @@ struct sm_stat_res {
int state;
};
-/*
+/*
* structure of the status message sent back by the status monitor
* when monitor site status changes
*/
diff --git a/sunrpc/svc.c b/sunrpc/svc.c
index 5995c25bfd..fcd7b36db4 100644
--- a/sunrpc/svc.c
+++ b/sunrpc/svc.c
@@ -64,7 +64,7 @@ static SVCXPRT *xports[NOFILE];
* The services list
* Each entry represents a set of procedures (an rpc program).
* The dispatch routine takes request structs and runs the
- * apropriate procedure.
+ * appropriate procedure.
*/
static struct svc_callout {
struct svc_callout *sc_next;
diff --git a/sunrpc/svc_auth.c b/sunrpc/svc_auth.c
index ab7ab69421..b650de9bea 100644
--- a/sunrpc/svc_auth.c
+++ b/sunrpc/svc_auth.c
@@ -8,11 +8,11 @@ static char sccsid[] = "@(#)svc_auth.c 2.1 88/08/07 4.0 RPCSRC; from 1.19 87/08/
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
@@ -40,16 +40,16 @@ static char sccsid[] = "@(#)svc_auth.c 2.1 88/08/07 4.0 RPCSRC; from 1.19 87/08/
#include <rpc/rpc.h>
/*
- * svcauthsw is the bdevsw of server side authentication.
- *
+ * svcauthsw is the bdevsw of server side authentication.
+ *
* Server side authenticators are called from authenticate by
* using the client auth struct flavor field to index into svcauthsw.
- * The server auth flavors must implement a routine that looks
- * like:
- *
+ * The server auth flavors must implement a routine that looks
+ * like:
+ *
* enum auth_stat
* flavorx_auth(rqst, msg)
- * register struct svc_req *rqst;
+ * register struct svc_req *rqst;
* register struct rpc_msg *msg;
*
*/
@@ -76,7 +76,7 @@ static struct {
* set rqst->rq_xprt->verf to the appropriate response verifier;
* sets rqst->rq_client_cred to the "cooked" form of the credentials.
*
- * NB: rqst->rq_cxprt->verf must be pre-alloctaed;
+ * NB: rqst->rq_cxprt->verf must be pre-allocated;
* its length is set appropriately.
*
* The caller still owns and is responsible for msg->u.cmb.cred and
diff --git a/sunrpc/svc_raw.c b/sunrpc/svc_raw.c
index 1170ecec83..1b6cb3bf8a 100644
--- a/sunrpc/svc_raw.c
+++ b/sunrpc/svc_raw.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -34,8 +34,8 @@ static char sccsid[] = "@(#)svc_raw.c 1.15 87/08/11 Copyr 1984 Sun Micro";
/*
* svc_raw.c, This a toy for simple testing and timing.
* Interface to create an rpc client and server in the same UNIX process.
- * This lets us similate rpc and get rpc (round trip) overhead, without
- * any interference from the kernal.
+ * This lets us simulate rpc and get rpc (round trip) overhead, without
+ * any interference from the kernel.
*
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
@@ -149,7 +149,7 @@ svcraw_freeargs(xprt, xdr_args, args_ptr)
SVCXPRT *xprt;
xdrproc_t xdr_args;
caddr_t args_ptr;
-{
+{
register struct svcraw_private *srp = svcraw_private;
register XDR *xdrs;
@@ -158,7 +158,7 @@ svcraw_freeargs(xprt, xdr_args, args_ptr)
xdrs = &srp->xdr_stream;
xdrs->x_op = XDR_FREE;
return ((*xdr_args)(xdrs, args_ptr));
-}
+}
static void
svcraw_destroy()
diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c
index 6846f38409..2555e32be5 100644
--- a/sunrpc/svc_tcp.c
+++ b/sunrpc/svc_tcp.c
@@ -37,7 +37,7 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
* Copyright (C) 1984, Sun Microsystems, Inc.
*
* Actually implements two flavors of transporter -
- * a tcp rendezvouser (a listner and connection establisher)
+ * a tcp rendezvouser (a listener and connection establisher)
* and a record/tcp stream.
*/
@@ -215,7 +215,7 @@ makefd_xprt(fd, sendsize, recvsize)
xprt->xp_p1 = (caddr_t)cd;
xprt->xp_verf.oa_base = cd->verf_body;
xprt->xp_addrlen = 0;
- xprt->xp_ops = &svctcp_op; /* truely deals with calls */
+ xprt->xp_ops = &svctcp_op; /* truly deals with calls */
xprt->xp_port = 0; /* this is a connection, not a rendezvouser */
xprt->xp_sock = fd;
xprt_register(xprt);
@@ -283,7 +283,7 @@ svctcp_destroy(xprt)
static struct timeval wait_per_try = { 35, 0 };
/*
- * reads data from the tcp conection.
+ * reads data from the tcp connection.
* any error is fatal and the connection is closed.
* (And a read of zero bytes is a half closed stream => error.)
*/
diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c
index 99a47bf42c..c36afd983c 100644
--- a/sunrpc/xdr.c
+++ b/sunrpc/xdr.c
@@ -496,7 +496,7 @@ xdr_netobj(xdrs, np)
}
/*
- * XDR a descriminated union
+ * XDR a discriminated union
* Support routine for discriminated unions.
* You create an array of xdrdiscrim structures, terminated with
* an entry with a null procedure pointer. The routine gets
diff --git a/sunrpc/xdr_array.c b/sunrpc/xdr_array.c
index 7c2831ccd2..6b2adb2331 100644
--- a/sunrpc/xdr_array.c
+++ b/sunrpc/xdr_array.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -32,7 +32,7 @@ static char sccsid[] = "@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";
#endif
/*
- * xdr_array.c, Generic XDR routines impelmentation.
+ * xdr_array.c, Generic XDR routines implementation.
*
* Copyright (C) 1984, Sun Microsystems, Inc.
*
@@ -91,7 +91,7 @@ xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc)
return (TRUE);
*addrp = target = mem_alloc(nodesize);
if (target == NULL) {
- (void) fprintf(stderr,
+ (void) fprintf(stderr,
"xdr_array: out of memory\n");
return (FALSE);
}
@@ -101,7 +101,7 @@ xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc)
case XDR_FREE:
return (TRUE);
}
-
+
/*
* now we xdr each element of array
*/
@@ -136,7 +136,7 @@ xdr_vector(xdrs, basep, nelem, elemsize, xdr_elem)
register char *basep;
register u_int nelem;
register u_int elemsize;
- register xdrproc_t xdr_elem;
+ register xdrproc_t xdr_elem;
{
register u_int i;
register char *elptr;
@@ -148,6 +148,5 @@ xdr_vector(xdrs, basep, nelem, elemsize, xdr_elem)
}
elptr += elemsize;
}
- return(TRUE);
+ return(TRUE);
}
-
diff --git a/sunrpc/xdr_float.c b/sunrpc/xdr_float.c
index 4e322eccf1..be5a07d028 100644
--- a/sunrpc/xdr_float.c
+++ b/sunrpc/xdr_float.c
@@ -32,7 +32,7 @@ static char sccsid[] = "@(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro";
#endif
/*
- * xdr_float.c, Generic XDR routines impelmentation.
+ * xdr_float.c, Generic XDR routines implementation.
*
* Copyright (C) 1984, Sun Microsystems, Inc.
*
diff --git a/sunrpc/xdr_rec.c b/sunrpc/xdr_rec.c
index 974e8295dd..6b33208d76 100644
--- a/sunrpc/xdr_rec.c
+++ b/sunrpc/xdr_rec.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -44,7 +44,7 @@ static char sccsid[] = "@(#)xdr_rec.c 1.21 87/08/11 Copyr 1984 Sun Micro";
* by n bytes of data, where n is contained in the header. The header
* is represented as a htonl(u_long). The high order bit encodes
* whether or not the fragment is the last fragment of the record
- * (1 => fragment is last, 0 => more fragments to follow.
+ * (1 => fragment is last, 0 => more fragments to follow.
* The other 31 bits encode the byte length of the fragment.
*/
@@ -96,7 +96,7 @@ typedef struct rec_strm {
caddr_t tcp_handle;
caddr_t the_buffer;
/*
- * out-goung bits
+ * out-going bits
*/
int (*writeit)();
caddr_t out_base; /* output buffer (points to frag header) */
@@ -142,8 +142,8 @@ xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit)
if (rstrm == NULL) {
(void)fprintf(stderr, "xdrrec_create: out of memory\n");
- /*
- * This is bad. Should rework xdrrec_create to
+ /*
+ * This is bad. Should rework xdrrec_create to
* return a handle, and in this case return NULL
*/
return;
@@ -184,7 +184,7 @@ xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit)
/*
- * The reoutines defined below are the xdr ops which will go into the
+ * The routines defined below are the xdr ops which will go into the
* xdr handle filled in by xdrrec_create.
*/
@@ -258,7 +258,7 @@ xdrrec_getbytes(xdrs, addr, len)
current = (len < current) ? len : current;
if (! get_input_bytes(rstrm, addr, current))
return FALSE;
- addr += current;
+ addr += current;
rstrm->fbtbc -= current;
len -= current;
}
@@ -420,8 +420,8 @@ xdrrec_skiprecord(xdrs)
}
/*
- * Look ahead fuction.
- * Returns TRUE iff there is no more input in the buffer
+ * Lookahead function.
+ * Returns TRUE iff there is no more input in the buffer
* after consuming the rest of the current record.
*/
bool_t
@@ -444,9 +444,9 @@ xdrrec_eof(xdrs)
/*
* The client must tell the package when an end-of-record has occurred.
- * The second paraemters tells whether the record should be flushed to the
- * (output) tcp stream. (This let's the package support batched or
- * pipelined procedure calls.) TRUE => immmediate flush to tcp connection.
+ * The second parameter tells whether the record should be flushed to the
+ * (output) tcp stream. (This lets the package support batched or
+ * pipelined procedure calls.) TRUE => immediate flush to tcp connection.
*/
bool_t
xdrrec_endofrecord(xdrs, sendnow)
diff --git a/sunrpc/xdr_ref.c b/sunrpc/xdr_ref.c
index 32d91d9999..f4ad74df3e 100644
--- a/sunrpc/xdr_ref.c
+++ b/sunrpc/xdr_ref.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -32,7 +32,7 @@ static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI";
#endif
/*
- * xdr_reference.c, Generic XDR routines impelmentation.
+ * xdr_reference.c, Generic XDR routines implementation.
*
* Copyright (C) 1987, Sun Microsystems, Inc.
*
@@ -52,7 +52,7 @@ static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI";
* referenced by a pointer inside the structure that is currently being
* translated. pp references a pointer to storage. If *pp is null
* the necessary storage is allocated.
- * size is the sizeof the referneced structure.
+ * size is the size of the referneced structure.
* proc is the routine to handle the referenced structure.
*/
bool_t
@@ -95,7 +95,7 @@ xdr_reference(xdrs, pp, size, proc)
* xdr_pointer():
*
* XDR a pointer to a possibly recursive data structure. This
- * differs with xdr_reference in that it can serialize/deserialiaze
+ * differs with xdr_reference in that it can serialize/deserialize
* trees correctly.
*
* What's sent is actually a union:
diff --git a/sunrpc/xdr_stdio.c b/sunrpc/xdr_stdio.c
index 151e5e48e4..351b8f94b4 100644
--- a/sunrpc/xdr_stdio.c
+++ b/sunrpc/xdr_stdio.c
@@ -6,23 +6,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@@ -58,8 +58,8 @@ static void xdrstdio_destroy();
* Ops vector for stdio type XDR
*/
static struct xdr_ops xdrstdio_ops = {
- xdrstdio_getlong, /* deseraialize a long int */
- xdrstdio_putlong, /* seraialize a long int */
+ xdrstdio_getlong, /* deserialize a long int */
+ xdrstdio_putlong, /* serialize a long int */
xdrstdio_getbytes, /* deserialize counted bytes */
xdrstdio_putbytes, /* serialize counted bytes */
xdrstdio_getpos, /* get offset in the stream */
@@ -158,10 +158,10 @@ xdrstdio_getpos(xdrs)
}
static bool_t
-xdrstdio_setpos(xdrs, pos)
+xdrstdio_setpos(xdrs, pos)
XDR *xdrs;
u_int pos;
-{
+{
return ((fseek((FILE *)xdrs->x_private, (long)pos, 0) < 0) ?
FALSE : TRUE);
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 1c71ec8ab2..78c5071b4e 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -211,7 +211,7 @@ _dl_start_user:
stq $2, 0($sp)
/* Load _dl_default_scope[2] into s1 to pass to _dl_init_next. */
0: ldq $10, _dl_default_scope+16
- /* Call _dl_init_next to return the address of an initalizer
+ /* Call _dl_init_next to return the address of an initializer
function to run. */
1: mov $10, $16
jsr $26, _dl_init_next
diff --git a/sysdeps/alpha/elf/crtbegin.S b/sysdeps/alpha/elf/crtbegin.S
index f75673e35f..e6147c2ec3 100644
--- a/sysdeps/alpha/elf/crtbegin.S
+++ b/sysdeps/alpha/elf/crtbegin.S
@@ -55,7 +55,7 @@ __DTOR_LIST__:
jsr $26,__do_global_dtors_aux
/* Must match the alignment we got from crti.o else we get
- zero-filled holes in our _fini function and thense SIGILL. */
+ zero-filled holes in our _fini function and then SIGILL. */
.align 3
/*
diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S
index 02f37f50be..d3099cc599 100644
--- a/sysdeps/alpha/strrchr.S
+++ b/sysdeps/alpha/strrchr.S
@@ -17,7 +17,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* Return the address of the last occurrance of a given character
+/* Return the address of the last occurrence of a given character
within a null-terminated string, or null if it is not found.
This is generally scheduled for the EV5 (got to look out for my own
diff --git a/sysdeps/generic/crypt-entry.c b/sysdeps/generic/crypt-entry.c
index ab1c6faaab..4a11b25752 100644
--- a/sysdeps/generic/crypt-entry.c
+++ b/sysdeps/generic/crypt-entry.c
@@ -1,22 +1,22 @@
-/* crypt - wrapper aroung MD5 sum replacement for crypt function.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+/* Wrapper around MD5 sum replacement for crypt function.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <crypt.h>
#include <errno.h>
@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */
/* Define our magic string to mark salt for MD5 encryption
replacement. This is meant to be the same as for other MD5 based
- encryption implenentations. */
+ encryption implementations. */
static const char md5_salt_prefix[] = "$1$";
diff --git a/sysdeps/generic/crypt.h b/sysdeps/generic/crypt.h
index 6fdd40d4ac..53224596ea 100644
--- a/sysdeps/generic/crypt.h
+++ b/sysdeps/generic/crypt.h
@@ -36,7 +36,7 @@ struct crypt_data
char sb1[32768 / sizeof (char)];
char sb2[32768 / sizeof (char)];
char sb3[32768 / sizeof (char)];
- /* end-of-aligment-critical-data */
+ /* end-of-alignment-critical-data */
char crypt_3_buf[14];
char current_salt[2];
long current_saltbits;
diff --git a/sysdeps/generic/memchr.c b/sysdeps/generic/memchr.c
index 01b4edcf2a..60276e9942 100644
--- a/sysdeps/generic/memchr.c
+++ b/sysdeps/generic/memchr.c
@@ -1,24 +1,24 @@
-/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
- Based on strlen implemention by Torbjorn Granlund (tege@sics.se),
+/* Copyright (C) 1991, 1993, 1996 Free Software Foundation, Inc.
+ Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
with help from Dan Sahlin (dan@sics.se) and
commentary by Jim Blandy (jimb@ai.mit.edu);
adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
and implemented by Roland McGrath (roland@ai.mit.edu).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/sysdeps/generic/memmove.c b/sysdeps/generic/memmove.c
index 8ef6f04cbe..fa9cb2a1a4 100644
--- a/sysdeps/generic/memmove.c
+++ b/sysdeps/generic/memmove.c
@@ -1,22 +1,22 @@
/* memmove -- copy memory to memory until the specified number of bytes
has been copied. Overlap is handled correctly.
- Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <ansidecl.h>
#include <string.h>
@@ -63,7 +63,7 @@ DEFUN(memmove, (a1, a2, len),
/* Copy from SRCP to DSTP taking advantage of the known
alignment of DSTP. Number of bytes remaining is put
- in the third argumnet, i.e. in LEN. This number may
+ in the third argument, i.e. in LEN. This number may
vary from machine to machine. */
WORD_COPY_FWD (dstp, srcp, len, len);
@@ -89,7 +89,7 @@ DEFUN(memmove, (a1, a2, len),
/* Copy from SRCP to DSTP taking advantage of the known
alignment of DSTP. Number of bytes remaining is put
- in the third argumnet, i.e. in LEN. This number may
+ in the third argument, i.e. in LEN. This number may
vary from machine to machine. */
WORD_COPY_BWD (dstp, srcp, len, len);
diff --git a/sysdeps/generic/strcasecmp.c b/sysdeps/generic/strcasecmp.c
index 82e1a90334..7fe63d3340 100644
--- a/sysdeps/generic/strcasecmp.c
+++ b/sysdeps/generic/strcasecmp.c
@@ -1,26 +1,26 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <string.h>
#include <ctype.h>
/* Compare S1 and S2, ignoring case, returning less than, equal to or
- greater than zero if S1 is lexiographically less than,
+ greater than zero if S1 is lexicographically less than,
equal to or greater than S2. */
int
__strcasecmp (const char *s1, const char *s2)
diff --git a/sysdeps/generic/strchr.c b/sysdeps/generic/strchr.c
index b9c8393f8e..11c7bdff64 100644
--- a/sysdeps/generic/strchr.c
+++ b/sysdeps/generic/strchr.c
@@ -1,30 +1,30 @@
-/* Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
- Based on strlen implemention by Torbjorn Granlund (tege@sics.se),
+/* Copyright (C) 1991, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
with help from Dan Sahlin (dan@sics.se) and
bug fix and commentary by Jim Blandy (jimb@ai.mit.edu);
adaptation to strchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
and implemented by Roland McGrath (roland@ai.mit.edu).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <ansidecl.h>
#include <string.h>
-/* Find the first ocurrence of C in S. */
+/* Find the first occurrence of C in S. */
char *
DEFUN(strchr, (s, c), CONST char *s AND int c)
@@ -53,9 +53,9 @@ DEFUN(strchr, (s, c), CONST char *s AND int c)
/* Bits 31, 24, 16, and 8 of this number are zero. Call these bits
the "holes." Note that there is a hole just to the left of
each byte, with an extra at the end:
-
+
bits: 01111110 11111110 11111110 11111111
- bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD
+ bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD
The 1-bits make sure that carries propagate to the next 0-bit.
The 0-bits provide holes for carries to fall into. */
@@ -118,10 +118,10 @@ DEFUN(strchr, (s, c), CONST char *s AND int c)
/* Add MAGIC_BITS to LONGWORD. */
if ((((longword + magic_bits)
-
+
/* Set those bits that were unchanged by the addition. */
^ ~longword)
-
+
/* Look at only the hole bits. If any of the hole bits
are unchanged, most likely one of the bytes was a
zero. */
diff --git a/sysdeps/generic/strcmp.c b/sysdeps/generic/strcmp.c
index ec0c1e6b00..a8d9db1bc9 100644
--- a/sysdeps/generic/strcmp.c
+++ b/sysdeps/generic/strcmp.c
@@ -1,33 +1,34 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <string.h>
#include <memcopy.h>
/* Compare S1 and S2, returning less than, equal to or
- greater than zero if S1 is lexiographically less than,
+ greater than zero if S1 is lexicographically less than,
equal to or greater than S2. */
int
-DEFUN(strcmp, (p1, p2), CONST char *p1 AND CONST char *p2)
+strcmp (p1, p2)
+ const char *p1;
+ const char *p2;
{
- register CONST unsigned char *s1 = (CONST unsigned char *) p1;
- register CONST unsigned char *s2 = (CONST unsigned char *) p2;
+ register const unsigned char *s1 = (const unsigned char *) p1;
+ register const unsigned char *s2 = (const unsigned char *) p2;
unsigned reg_char c1, c2;
do
diff --git a/sysdeps/generic/strcspn.c b/sysdeps/generic/strcspn.c
index 915faa77c0..0cacfffd31 100644
--- a/sysdeps/generic/strcspn.c
+++ b/sysdeps/generic/strcspn.c
@@ -1,25 +1,24 @@
-/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <string.h>
-/* Return the length of the maximum inital segment of S
+/* Return the length of the maximum initial segment of S
which contains no characters from REJECT. */
size_t
strcspn (s, reject)
diff --git a/sysdeps/generic/strncmp.c b/sysdeps/generic/strncmp.c
index 623d9c5714..eea64389f8 100644
--- a/sysdeps/generic/strncmp.c
+++ b/sysdeps/generic/strncmp.c
@@ -1,32 +1,33 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <string.h>
#include <memcopy.h>
/* Compare no more than N characters of S1 and S2,
returning less than, equal to or greater than zero
- if S1 is lexiographically less than, equal to or
+ if S1 is lexicographically less than, equal to or
greater than S2. */
int
-DEFUN(strncmp, (s1, s2, n),
- CONST char *s1 AND CONST char *s2 AND size_t n)
+strncmp (s1, s2, n)
+ const char *s1;
+ const char *s2;
+ size_t n;
{
unsigned reg_char c1 = '\0';
unsigned reg_char c2 = '\0';
diff --git a/sysdeps/generic/strpbrk.c b/sysdeps/generic/strpbrk.c
index 73339ba762..75b2ed1440 100644
--- a/sysdeps/generic/strpbrk.c
+++ b/sysdeps/generic/strpbrk.c
@@ -1,29 +1,29 @@
-/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <string.h>
-/* Find the first ocurrence in S of any character in ACCEPT. */
+/* Find the first occurrence in S of any character in ACCEPT. */
char *
-DEFUN(strpbrk, (s, accept),
- register CONST char *s AND register CONST char *accept)
+strpbrk (s, accept)
+ const char *s;
+ const char *accept;
{
while (*s != '\0')
{
diff --git a/sysdeps/generic/strrchr.c b/sysdeps/generic/strrchr.c
index 663b6aa753..db5549b922 100644
--- a/sysdeps/generic/strrchr.c
+++ b/sysdeps/generic/strrchr.c
@@ -1,24 +1,24 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <string.h>
-/* Find the last ocurrence of C in S. */
+/* Find the last occurrence of C in S. */
char *
strrchr (const char *s, int c)
{
diff --git a/sysdeps/generic/strstr.c b/sysdeps/generic/strstr.c
index 9c0e8183b5..d8d0b84813 100644
--- a/sysdeps/generic/strstr.c
+++ b/sysdeps/generic/strstr.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/*
* My personal strstr() implementation that beats most other algorithms.
@@ -60,7 +60,7 @@ strstr (phaystack, pneedle)
goto jin;
for (;;)
- {
+ {
register chartype a;
register const unsigned char *rhaystack, *rneedle;
@@ -104,7 +104,7 @@ jin: a = *++haystack;
}
while (*rhaystack == a);
- needle = rneedle; /* took the register-poor aproach */
+ needle = rneedle; /* took the register-poor approach */
if (a == '\0')
break;
diff --git a/sysdeps/gnu/errlist.c b/sysdeps/gnu/errlist.c
index 4f96864abc..700b69f58f 100644
--- a/sysdeps/gnu/errlist.c
+++ b/sysdeps/gnu/errlist.c
@@ -25,7 +25,7 @@ TRANS No process matches the specified process ID. */
#endif
#ifdef EINTR
/*
-TRANS Interrupted function call; an asynchronous signal occured and prevented
+TRANS Interrupted function call; an asynchronous signal occurred and prevented
TRANS completion of the call. When this happens, you should try the call
TRANS again.
TRANS
diff --git a/sysdeps/i386/i486/strcat.S b/sysdeps/i386/i486/strcat.S
index f705f420c4..9bac145ad4 100644
--- a/sysdeps/i386/i486/strcat.S
+++ b/sysdeps/i386/i486/strcat.S
@@ -1,24 +1,24 @@
/* strcat(dest, src) -- Append SRC on the end of DEST.
-For Intel 80x86, x>=4.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-Contributed by Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>.
-Optimised a little by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ For Intel 80x86, x>=4.
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>.
+ Optimised a little by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include "asm-syntax.h"
@@ -82,7 +82,7 @@ L1: movl (%edx), %eax /* get word (= 4 bytes) in question */
following XOR would destroy the carry flag and it would (in a
representation with more than 32 bits) not alter then last
overflow, we can now test this condition. If no carry is signaled
- no overflow must have occured in the last byte => it was 0. */
+ no overflow must have occurred in the last byte => it was 0. */
jnc L3
/* We are only interested in carry bits that change due to the
diff --git a/sysdeps/i386/i586/lshift.S b/sysdeps/i386/i586/lshift.S
index b298983563..bf9b223a0b 100644
--- a/sysdeps/i386/i586/lshift.S
+++ b/sysdeps/i386/i586/lshift.S
@@ -1,23 +1,21 @@
-/* Pentium optimized __mpn_lshift --
+/* Pentium optimized __mpn_lshift --
+ Copyright (C) 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+ The GNU C Library is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Library General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
-This file is part of the GNU MP Library.
+ The GNU C Library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ License for more details.
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-License for more details.
-
-You should have received a copy of the GNU Library General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public License
+ along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA. */
/*
INPUT PARAMETERS
@@ -132,7 +130,7 @@ Lend2: shll %cl,%edx /* compute least significant limb */
ret
/* We loop from least significant end of the arrays, which is only
- permissable if the source and destination don't overlap, since the
+ permissible if the source and destination don't overlap, since the
function is documented to work for overlapping source and destination.
*/
diff --git a/sysdeps/i386/i586/rshift.S b/sysdeps/i386/i586/rshift.S
index 38398edb13..1860daf4d3 100644
--- a/sysdeps/i386/i586/rshift.S
+++ b/sysdeps/i386/i586/rshift.S
@@ -1,6 +1,6 @@
-/* Pentium optimized __mpn_rshift --
+/* Pentium optimized __mpn_rshift --
-Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -129,7 +129,7 @@ Lend2: shrl %cl,%edx /* compute most significant limb */
ret
/* We loop from least significant end of the arrays, which is only
- permissable if the source and destination don't overlap, since the
+ permissible if the source and destination don't overlap, since the
function is documented to work for overlapping source and destination.
*/
diff --git a/sysdeps/i386/i586/strchr.S b/sysdeps/i386/i586/strchr.S
index 1477350480..fda053216f 100644
--- a/sysdeps/i386/i586/strchr.S
+++ b/sysdeps/i386/i586/strchr.S
@@ -1,30 +1,30 @@
/* strchr -- find character CH in a NUL terminated string.
-Highly optimized version for ix85, x>=5.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ Highly optimized version for ix85, x>=5.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
/* This version is especially optimized for the i586 (and following?)
processors. This is mainly done by using the two pipelines. The
version optimized for i486 is weak in this aspect because to get
- as much parallelism we have to executs some *more* instructions.
+ as much parallelism we have to execute some *more* instructions.
The code below is structured to reflect the pairing of the instructions
as *I think* it is. I have no processor data book to verify this.
diff --git a/sysdeps/i386/i586/strlen.S b/sysdeps/i386/i586/strlen.S
index ba24981f3d..e8fb916812 100644
--- a/sysdeps/i386/i586/strlen.S
+++ b/sysdeps/i386/i586/strlen.S
@@ -1,30 +1,30 @@
/* strlen -- Compute length og NUL terminated string.
-Highly optimized version for ix86, x>=5.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ Highly optimized version for ix86, x>=5.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
/* This version is especially optimized for the i586 (and following?)
processors. This is mainly done by using the two pipelines. The
version optimized for i486 is weak in this aspect because to get
- as much parallelism we have to executs some *more* instructions.
+ as much parallelism we have to execute some *more* instructions.
The code below is structured to reflect the pairing of the instructions
as *I think* it is. I have no processor data book to verify this.
diff --git a/sysdeps/i386/memchr.S b/sysdeps/i386/memchr.S
index fcf873ebb8..f0fb3abe45 100644
--- a/sysdeps/i386/memchr.S
+++ b/sysdeps/i386/memchr.S
@@ -1,34 +1,34 @@
/* memchr (str, ch, n) -- Return pointer to first occurrence of CH in STR less
than N.
-For Intel 80x86, x>=3.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
-Optimised a little by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
-This file is part of the GNU C Library.
-
-This version is developed using the same algorithm as the fast C
-version which carries the following introduction:
-
-Based on strlen implemention by Torbjorn Granlund (tege@sics.se),
-with help from Dan Sahlin (dan@sics.se) and
-commentary by Jim Blandy (jimb@ai.mit.edu);
-adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
-and implemented by Roland McGrath (roland@ai.mit.edu).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ For Intel 80x86, x>=3.
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+ Optimised a little by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
+
+ This version is developed using the same algorithm as the fast C
+ version which carries the following introduction:
+
+ Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
+ with help from Dan Sahlin (dan@sics.se) and
+ commentary by Jim Blandy (jimb@ai.mit.edu);
+ adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
+ and implemented by Roland McGrath (roland@ai.mit.edu).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include "asm-syntax.h"
@@ -140,7 +140,7 @@ L1: movl (%eax), %ecx /* get word (= 4 bytes) in question */
following XOR would destroy the carry flag and it would (in a
representation with more than 32 bits) not alter then last
overflow, we can now test this condition. If no carry is signaled
- no overflow must have occured in the last byte => it was 0. */
+ no overflow must have occurred in the last byte => it was 0. */
jnc L8
/* We are only interested in carry bits that change due to the
@@ -307,7 +307,7 @@ L8: testb %cl, %cl /* test first byte in dword */
jz L9 /* if zero => return pointer */
incl %eax /* increment source pointer */
- /* No further test needed we we known it is one of the four byytes. */
+ /* No further test needed we we know it is one of the four bytes. */
L9: popl %edi /* pop saved registers */
popl %esi
diff --git a/sysdeps/i386/stpcpy.S b/sysdeps/i386/stpcpy.S
index 9df0e33d41..73292ab0fb 100644
--- a/sysdeps/i386/stpcpy.S
+++ b/sysdeps/i386/stpcpy.S
@@ -1,24 +1,24 @@
/* stpcpy -- copy SRC to DEST returning the address of the terminating '\0'
in DEST.
-For Intel 80x86, x>=3.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-Contributed by Ulrich Drepper (drepper@gnu.ai.mit.edu).
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ For Intel 80x86, x>=3.
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper (drepper@gnu.ai.mit.edu).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This function is defined neither in ANSI nor POSIX standards but is
also not invented here. */
@@ -53,7 +53,7 @@ ENTRY (__stpcpy)
.long 0x00000004
/* Four times unfolded loop with only one loop counter. This
- is achieved by the use of index+base adressing mode. As the
+ is achieved by the use of index+base addressing mode. As the
loop counter we use the destination address because this is
also the result. */
L1: addl $4, %eax /* increment loop counter */
diff --git a/sysdeps/i386/stpncpy.S b/sysdeps/i386/stpncpy.S
index b76f6170e5..96878fb79a 100644
--- a/sysdeps/i386/stpncpy.S
+++ b/sysdeps/i386/stpncpy.S
@@ -1,28 +1,28 @@
/* stpncpy -- copy no more then N bytes from SRC to DEST, returning the
address of the terminating '\0' in DEST.
-For Intel 80x86, x>=3.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
-Some bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
- - original wrote n+1 chars in some cases.
- - stpncpy() ought to behave like strncpy() ie. not null-terminate
- if limited by n. glibc-1.09 stpncpy() does this.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ For Intel 80x86, x>=3.
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+ Some bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
+ - original wrote n+1 chars in some cases.
+ - stpncpy() ought to behave like strncpy() ie. not null-terminate
+ if limited by n. glibc-1.09 stpncpy() does this.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include "asm-syntax.h"
@@ -51,7 +51,7 @@ ENTRY (__stpncpy)
/* Four times unfolded loop with two loop counters. We get the
the third value (the source address) by using the index+base
- adressing mode. */
+ addressing mode. */
L2: movb (%eax,%esi), %dl /* load current char */
movb %dl, (%eax) /* and store it */
testb %dl, %dl /* was it NUL? */
@@ -128,7 +128,7 @@ L7:
jz L9 /* counter is also 0 => exit */
/* We now have to fill the rest of the buffer with NUL. This
- is done in a tricky way. Please note that the adressing mode
+ is done in a tricky way. Please note that the addressing mode
used below is not the same we used above. Here we use the
%ecx register. */
L8:
diff --git a/sysdeps/i386/strchr.S b/sysdeps/i386/strchr.S
index 1c91c40090..e4e5c55572 100644
--- a/sysdeps/i386/strchr.S
+++ b/sysdeps/i386/strchr.S
@@ -1,24 +1,24 @@
/* strchr (str, ch) -- Return pointer to first occurrence of CH in STR.
-For Intel 80x86, x>=3.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
-Some optimisations by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ For Intel 80x86, x>=3.
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+ Some optimisations by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include "asm-syntax.h"
@@ -53,7 +53,7 @@ ENTRY (strchr)
we don't know the end of the string. But accessing at
4-byte alignment guarantees that we never access illegal
memory if this would not also be done by the trivial
- implementation (this is because all processor inherant
+ implementation (this is because all processor inherent
boundaries are multiples of 4. */
testb $3, %eax /* correctly aligned ? */
@@ -131,7 +131,7 @@ L11: movl (%eax), %ecx /* get word (= 4 bytes) in question */
following XOR would destroy the carry flag and it would (in a
representation with more than 32 bits) not alter then last
overflow, we can now test this condition. If no carry is signaled
- no overflow must have occured in the last byte => it was 0. */
+ no overflow must have occurred in the last byte => it was 0. */
jnc L7
/* We are only interested in carry bits that change due to the
diff --git a/sysdeps/i386/strcspn.S b/sysdeps/i386/strcspn.S
index 387d4aea95..47b157a2eb 100644
--- a/sysdeps/i386/strcspn.S
+++ b/sysdeps/i386/strcspn.S
@@ -1,25 +1,25 @@
-/* strcspn (str, ss) -- Return the length of the initial segement of STR
+/* strcspn (str, ss) -- Return the length of the initial segment of STR
which contains no characters from SS.
-For Intel 80x86, x>=3.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
-Bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ For Intel 80x86, x>=3.
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+ Bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include "asm-syntax.h"
@@ -142,7 +142,7 @@ L1: leal -4(%edx), %eax /* prepare loop */
1. a character in the stopset was found
and
2. the end of the string was found
- But as a sign that the chracter is in the stopset we store its
+ But as a sign that the character is in the stopset we store its
value in the table. But the value of NUL is NUL so the loop
terminates for NUL in every case. */
diff --git a/sysdeps/i386/strrchr.S b/sysdeps/i386/strrchr.S
index f47bf94730..3786d3f690 100644
--- a/sysdeps/i386/strrchr.S
+++ b/sysdeps/i386/strrchr.S
@@ -1,24 +1,24 @@
/* strrchr (str, ch) -- Return pointer to last occurrence of CH in STR.
-For Intel 80x86, x>=3.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
-Some optimisations by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ For Intel 80x86, x>=3.
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+ Some optimisations by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include "asm-syntax.h"
@@ -55,7 +55,7 @@ ENTRY (strrchr)
we don't know the end of the string. But accessing at
4-byte alignment guarantees that we never access illegal
memory if this would not also be done by the trivial
- implementation (this is because all processor inherant
+ implementation (this is because all processor inherent
boundaries are multiples of 4. */
testl $3, %esi /* correctly aligned ? */
@@ -178,7 +178,7 @@ L19: movl (%esi), %edx /* get word (= 4 bytes) in question */
following XOR would destroy the carry flag and it would (in a
representation with more than 32 bits) not alter then last
overflow, we can now test this condition. If no carry is signaled
- no overflow must have occured in the last byte => it was 0. */
+ no overflow must have occurred in the last byte => it was 0. */
jnc L20 /* found NUL => check last word */
diff --git a/sysdeps/i386/strspn.S b/sysdeps/i386/strspn.S
index 508aa7fd84..72e0e7d41a 100644
--- a/sysdeps/i386/strspn.S
+++ b/sysdeps/i386/strspn.S
@@ -1,25 +1,25 @@
-/* strcspn (str, ss) -- Return the length of the initial segement of STR
+/* strcspn (str, ss) -- Return the length of the initial segment of STR
which contains only characters from SS.
-For Intel 80x86, x>=3.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
-Bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ For Intel 80x86, x>=3.
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+ Bug fixes by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include "asm-syntax.h"
@@ -142,7 +142,7 @@ L1: leal -4(%edx), %eax /* prepare loop */
1. a character in the stopset was found
and
2. the end of the string was found
- But as a sign that the chracter is in the stopset we store its
+ But as a sign that the character is in the stopset we store its
value in the table. But the value of NUL is NUL so the loop
terminates for NUL in every case. */
diff --git a/sysdeps/ieee754/ieee754.h b/sysdeps/ieee754/ieee754.h
index 3255ee6b1c..9e6efe4973 100644
--- a/sysdeps/ieee754/ieee754.h
+++ b/sysdeps/ieee754/ieee754.h
@@ -1,20 +1,20 @@
/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <endian.h>
@@ -88,11 +88,11 @@ union ieee754_double
unsigned int negative:1;
unsigned int exponent:11;
unsigned int quiet_nan:1;
- /* Together these conprise the mantissa. */
+ /* Together these comprise the mantissa. */
unsigned int mantissa0:19;
unsigned int mantissa1:32;
#else
- /* Together these conprise the mantissa. */
+ /* Together these comprise the mantissa. */
unsigned int mantissa1:32;
unsigned int mantissa0:19;
unsigned int quiet_nan:1;
diff --git a/sysdeps/libm-i387/e_exp.S b/sysdeps/libm-i387/e_exp.S
index dad201fb3f..01c254ab51 100644
--- a/sysdeps/libm-i387/e_exp.S
+++ b/sysdeps/libm-i387/e_exp.S
@@ -30,6 +30,7 @@ ENTRY(__ieee754_exp)
fld1
faddp /* 2^(fract(x * log2(e))) */
fscale /* e^x */
+ fstp %st(1)
ret
.LisInf:
diff --git a/sysdeps/libm-i387/e_expl.S b/sysdeps/libm-i387/e_expl.S
index 2884efa6ce..fc4a1832ca 100644
--- a/sysdeps/libm-i387/e_expl.S
+++ b/sysdeps/libm-i387/e_expl.S
@@ -32,6 +32,7 @@ ENTRY(__ieee754_expl)
fld1
faddp /* 2^(fract(x * log2(e))) */
fscale /* e^x */
+ fstp %st(1)
ret
.LisInf:
diff --git a/sysdeps/libm-i387/s_ceil.S b/sysdeps/libm-i387/s_ceil.S
index a500b07d31..5135c90e40 100644
--- a/sysdeps/libm-i387/s_ceil.S
+++ b/sysdeps/libm-i387/s_ceil.S
@@ -21,7 +21,7 @@ ENTRY(__ceil)
orl $0x0800,%edx /* round towards +oo */
andl $0xfbff,%edx
movl %edx,-8(%ebp)
- fldcw -8(%ebp) /* load modfied control word */
+ fldcw -8(%ebp) /* load modified control word */
fldl 8(%ebp); /* round */
frndint
diff --git a/sysdeps/libm-i387/s_ceilf.S b/sysdeps/libm-i387/s_ceilf.S
index 4789b014d8..93cf40bd43 100644
--- a/sysdeps/libm-i387/s_ceilf.S
+++ b/sysdeps/libm-i387/s_ceilf.S
@@ -21,7 +21,7 @@ ENTRY(__ceilf)
orl $0x0800,%edx /* round towards +oo */
andl $0xfbff,%edx
movl %edx,-8(%ebp)
- fldcw -8(%ebp) /* load modfied control word */
+ fldcw -8(%ebp) /* load modified control word */
flds 8(%ebp); /* round */
frndint
diff --git a/sysdeps/libm-i387/s_ceill.S b/sysdeps/libm-i387/s_ceill.S
index a02a54768d..a77e550d7b 100644
--- a/sysdeps/libm-i387/s_ceill.S
+++ b/sysdeps/libm-i387/s_ceill.S
@@ -22,7 +22,7 @@ ENTRY(__ceill)
orl $0x0800,%edx /* round towards +oo */
andl $0xfbff,%edx
movl %edx,-8(%ebp)
- fldcw -8(%ebp) /* load modfied control word */
+ fldcw -8(%ebp) /* load modified control word */
fldt 8(%ebp); /* round */
frndint
diff --git a/sysdeps/libm-i387/s_floor.S b/sysdeps/libm-i387/s_floor.S
index 7599303f3d..ca8914ee14 100644
--- a/sysdeps/libm-i387/s_floor.S
+++ b/sysdeps/libm-i387/s_floor.S
@@ -17,7 +17,7 @@ ENTRY(__floor)
orw $0x0400,%dx /* round towards -oo */
andw $0xf7ff,%dx
movw %dx,-8(%ebp)
- fldcw -8(%ebp) /* load modfied control word */
+ fldcw -8(%ebp) /* load modified control word */
fldl 8(%ebp); /* round */
frndint
diff --git a/sysdeps/libm-i387/s_floorf.S b/sysdeps/libm-i387/s_floorf.S
index c45d82e302..796db4fdad 100644
--- a/sysdeps/libm-i387/s_floorf.S
+++ b/sysdeps/libm-i387/s_floorf.S
@@ -17,7 +17,7 @@ ENTRY(__floorf)
orw $0x0400,%dx /* round towards -oo */
andw $0xf7ff,%dx
movw %dx,-8(%ebp)
- fldcw -8(%ebp) /* load modfied control word */
+ fldcw -8(%ebp) /* load modified control word */
flds 8(%ebp); /* round */
frndint
diff --git a/sysdeps/libm-i387/s_floorl.S b/sysdeps/libm-i387/s_floorl.S
index ae4ba2ea4d..396d854edc 100644
--- a/sysdeps/libm-i387/s_floorl.S
+++ b/sysdeps/libm-i387/s_floorl.S
@@ -18,7 +18,7 @@ ENTRY(__floorl)
orw $0x0400,%dx /* round towards -oo */
andw $0xf7ff,%dx
movw %dx,-8(%ebp)
- fldcw -8(%ebp) /* load modfied control word */
+ fldcw -8(%ebp) /* load modified control word */
fldt 8(%ebp) /* round */
frndint
diff --git a/sysdeps/libm-ieee754/e_log.c b/sysdeps/libm-ieee754/e_log.c
index c27e0a9d64..f584694686 100644
--- a/sysdeps/libm-ieee754/e_log.c
+++ b/sysdeps/libm-ieee754/e_log.c
@@ -5,7 +5,7 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
@@ -15,19 +15,19 @@ static char rcsid[] = "$NetBSD: e_log.c,v 1.8 1995/05/10 20:45:49 jtc Exp $";
#endif
/* __ieee754_log(x)
- * Return the logrithm of x
+ * Return the logarithm of x
*
- * Method :
- * 1. Argument Reduction: find k and f such that
- * x = 2^k * (1+f),
+ * Method :
+ * 1. Argument Reduction: find k and f such that
+ * x = 2^k * (1+f),
* where sqrt(2)/2 < 1+f < sqrt(2) .
*
* 2. Approximation of log(1+f).
* Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)
* = 2s + 2/3 s**3 + 2/5 s**5 + .....,
* = 2s + s*R
- * We use a special Reme algorithm on [0,0.1716] to generate
- * a polynomial of degree 14 to approximate R The maximum error
+ * We use a special Reme algorithm on [0,0.1716] to generate
+ * a polynomial of degree 14 to approximate R The maximum error
* of this polynomial approximation is bounded by 2**-58.45. In
* other words,
* 2 4 6 8 10 12 14
@@ -35,22 +35,22 @@ static char rcsid[] = "$NetBSD: e_log.c,v 1.8 1995/05/10 20:45:49 jtc Exp $";
* (the values of Lg1 to Lg7 are listed in the program)
* and
* | 2 14 | -58.45
- * | Lg1*s +...+Lg7*s - R(z) | <= 2
+ * | Lg1*s +...+Lg7*s - R(z) | <= 2
* | |
* Note that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2.
* In order to guarantee error in log below 1ulp, we compute log
* by
* log(1+f) = f - s*(f - R) (if f is not too large)
* log(1+f) = f - (hfsq - s*(hfsq+R)). (better accuracy)
- *
- * 3. Finally, log(x) = k*ln2 + log(1+f).
+ *
+ * 3. Finally, log(x) = k*ln2 + log(1+f).
* = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo)))
- * Here ln2 is split into two floating point number:
+ * Here ln2 is split into two floating point number:
* ln2_hi + ln2_lo,
* where n*ln2_hi is always exact for |n| < 2000.
*
* Special cases:
- * log(x) is NaN with signal if x < 0 (including -INF) ;
+ * log(x) is NaN with signal if x < 0 (including -INF) ;
* log(+INF) is +INF; log(0) is -INF with signal;
* log(NaN) is that NaN with no signal.
*
@@ -59,9 +59,9 @@ static char rcsid[] = "$NetBSD: e_log.c,v 1.8 1995/05/10 20:45:49 jtc Exp $";
* 1 ulp (unit in the last place).
*
* Constants:
- * The hexadecimal values are the intended ones for the following
- * constants. The decimal values may be used, provided that the
- * compiler will convert from decimal to binary accurately enough
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
* to produce the hexadecimal values shown.
*/
@@ -105,12 +105,12 @@ static double zero = 0.0;
k=0;
if (hx < 0x00100000) { /* x < 2**-1022 */
- if (((hx&0x7fffffff)|lx)==0)
+ if (((hx&0x7fffffff)|lx)==0)
return -two54/zero; /* log(+-0)=-inf */
if (hx<0) return (x-x)/zero; /* log(-#) = NaN */
k -= 54; x *= two54; /* subnormal number, scale up x */
GET_HIGH_WORD(hx,x);
- }
+ }
if (hx >= 0x7ff00000) return x+x;
k += (hx>>20)-1023;
hx &= 0x000fffff;
@@ -125,14 +125,14 @@ static double zero = 0.0;
if(k==0) return f-R; else {dk=(double)k;
return dk*ln2_hi-((R-dk*ln2_lo)-f);}
}
- s = f/(2.0+f);
+ s = f/(2.0+f);
dk = (double)k;
z = s*s;
i = hx-0x6147a;
w = z*z;
j = 0x6b851-hx;
- t1= w*(Lg2+w*(Lg4+w*Lg6));
- t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7)));
+ t1= w*(Lg2+w*(Lg4+w*Lg6));
+ t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7)));
i |= j;
R = t2+t1;
if(i>0) {
diff --git a/sysdeps/libm-ieee754/e_sqrt.c b/sysdeps/libm-ieee754/e_sqrt.c
index 15fba001d3..67da5455f9 100644
--- a/sysdeps/libm-ieee754/e_sqrt.c
+++ b/sysdeps/libm-ieee754/e_sqrt.c
@@ -5,7 +5,7 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
@@ -19,10 +19,10 @@ static char rcsid[] = "$NetBSD: e_sqrt.c,v 1.8 1995/05/10 20:46:17 jtc Exp $";
* ------------------------------------------
* | Use the hardware sqrt if you have one |
* ------------------------------------------
- * Method:
- * Bit by bit method using integer arithmetic. (Slow, but portable)
+ * Method:
+ * Bit by bit method using integer arithmetic. (Slow, but portable)
* 1. Normalization
- * Scale x to y in [1,4) with even powers of 2:
+ * Scale x to y in [1,4) with even powers of 2:
* find an integer k such that 1 <= (y=x*2^(2k)) < 4, then
* sqrt(x) = 2^k * sqrt(y)
* 2. Bit by bit computation
@@ -31,9 +31,9 @@ static char rcsid[] = "$NetBSD: e_sqrt.c,v 1.8 1995/05/10 20:46:17 jtc Exp $";
* i+1 2
* s = 2*q , and y = 2 * ( y - q ). (1)
* i i i i
- *
- * To compute q from q , one checks whether
- * i+1 i
+ *
+ * To compute q from q , one checks whether
+ * i+1 i
*
* -(i+1) 2
* (q + 2 ) <= y. (2)
@@ -42,13 +42,13 @@ static char rcsid[] = "$NetBSD: e_sqrt.c,v 1.8 1995/05/10 20:46:17 jtc Exp $";
* If (2) is false, then q = q ; otherwise q = q + 2 .
* i+1 i i+1 i
*
- * With some algebric manipulation, it is not difficult to see
- * that (2) is equivalent to
+ * With some algebraic manipulation, it is not difficult to see
+ * that (2) is equivalent to
* -(i+1)
* s + 2 <= y (3)
* i i
*
- * The advantage of (3) is that s and y can be computed by
+ * The advantage of (3) is that s and y can be computed by
* i i
* the following recurrence formula:
* if (3) is false
@@ -60,10 +60,10 @@ static char rcsid[] = "$NetBSD: e_sqrt.c,v 1.8 1995/05/10 20:46:17 jtc Exp $";
* -i -(i+1)
* s = s + 2 , y = y - s - 2 (5)
* i+1 i i+1 i i
- *
- * One may easily use induction to prove (4) and (5).
+ *
+ * One may easily use induction to prove (4) and (5).
* Note. Since the left hand side of (3) contain only i+2 bits,
- * it does not necessary to do a full (53-bit) comparison
+ * it does not necessary to do a full (53-bit) comparison
* in (3).
* 3. Final rounding
* After generating the 53 bits result, we compute one more bit.
@@ -73,7 +73,7 @@ static char rcsid[] = "$NetBSD: e_sqrt.c,v 1.8 1995/05/10 20:46:17 jtc Exp $";
* The rounding mode can be detected by checking whether
* huge + tiny is equal to huge, and whether huge - tiny is
* equal to huge for some floating point number "huge" and "tiny".
- *
+ *
* Special cases:
* sqrt(+-0) = +-0 ... exact
* sqrt(inf) = inf
@@ -101,17 +101,17 @@ static double one = 1.0, tiny=1.0e-300;
#endif
{
double z;
- int32_t sign = (int)0x80000000;
+ int32_t sign = (int)0x80000000;
int32_t ix0,s0,q,m,t,i;
u_int32_t r,t1,s1,ix1,q1;
EXTRACT_WORDS(ix0,ix1,x);
/* take care of Inf and NaN */
- if((ix0&0x7ff00000)==0x7ff00000) {
+ if((ix0&0x7ff00000)==0x7ff00000) {
return x*x+x; /* sqrt(NaN)=NaN, sqrt(+inf)=+inf
sqrt(-inf)=sNaN */
- }
+ }
/* take care of zero */
if(ix0<=0) {
if(((ix0&(~sign))|ix1)==0) return x;/* sqrt(+-0) = +-0 */
@@ -145,12 +145,12 @@ static double one = 1.0, tiny=1.0e-300;
r = 0x00200000; /* r = moving bit from right to left */
while(r!=0) {
- t = s0+r;
- if(t<=ix0) {
- s0 = t+r;
- ix0 -= t;
- q += r;
- }
+ t = s0+r;
+ if(t<=ix0) {
+ s0 = t+r;
+ ix0 -= t;
+ q += r;
+ }
ix0 += ix0 + ((ix1&sign)>>31);
ix1 += ix1;
r>>=1;
@@ -158,9 +158,9 @@ static double one = 1.0, tiny=1.0e-300;
r = sign;
while(r!=0) {
- t1 = s1+r;
+ t1 = s1+r;
t = s0;
- if((t<ix0)||((t==ix0)&&(t1<=ix1))) {
+ if((t<ix0)||((t==ix0)&&(t1<=ix1))) {
s1 = t1+r;
if(((t1&sign)==sign)&&(s1&sign)==0) s0 += 1;
ix0 -= t;
@@ -181,7 +181,7 @@ static double one = 1.0, tiny=1.0e-300;
if (q1==(u_int32_t)0xffffffff) { q1=0; q += 1;}
else if (z>one) {
if (q1==(u_int32_t)0xfffffffe) q+=1;
- q1+=2;
+ q1+=2;
} else
q1 += (q1&1);
}
@@ -197,18 +197,18 @@ static double one = 1.0, tiny=1.0e-300;
/*
Other methods (use floating-point arithmetic)
-------------
-(This is a copy of a drafted paper by Prof W. Kahan
+(This is a copy of a drafted paper by Prof W. Kahan
and K.C. Ng, written in May, 1986)
- Two algorithms are given here to implement sqrt(x)
+ Two algorithms are given here to implement sqrt(x)
(IEEE double precision arithmetic) in software.
Both supply sqrt(x) correctly rounded. The first algorithm (in
Section A) uses newton iterations and involves four divisions.
The second one uses reciproot iterations to avoid division, but
requires more multiplications. Both algorithms need the ability
- to chop results of arithmetic operations instead of round them,
+ to chop results of arithmetic operations instead of round them,
and the INEXACT flag to indicate when an arithmetic operation
- is executed exactly with no roundoff error, all part of the
+ is executed exactly with no roundoff error, all part of the
standard (IEEE 754-1985). The ability to perform shift, add,
subtract and logical AND operations upon 32-bit words is needed
too, though not part of the standard.
@@ -218,7 +218,7 @@ A. sqrt(x) by Newton Iteration
(1) Initial approximation
Let x0 and x1 be the leading and the trailing 32-bit words of
- a floating point number x (in IEEE double format) respectively
+ a floating point number x (in IEEE double format) respectively
1 11 52 ...widths
------------------------------------------------------
@@ -226,7 +226,7 @@ A. sqrt(x) by Newton Iteration
------------------------------------------------------
msb lsb msb lsb ...order
-
+
------------------------ ------------------------
x0: |s| e | f1 | x1: | f2 |
------------------------ ------------------------
@@ -251,7 +251,7 @@ A. sqrt(x) by Newton Iteration
(2) Iterative refinement
- Apply Heron's rule three times to y, we have y approximates
+ Apply Heron's rule three times to y, we have y approximates
sqrt(x) to within 1 ulp (Unit in the Last Place):
y := (y+x/y)/2 ... almost 17 sig. bits
@@ -276,12 +276,12 @@ A. sqrt(x) by Newton Iteration
it requires more multiplications and additions. Also x must be
scaled in advance to avoid spurious overflow in evaluating the
expression 3y*y+x. Hence it is not recommended uless division
- is slow. If division is very slow, then one should use the
+ is slow. If division is very slow, then one should use the
reciproot algorithm given in section B.
(3) Final adjustment
- By twiddling y's last bit it is possible to force y to be
+ By twiddling y's last bit it is possible to force y to be
correctly rounded according to the prevailing rounding mode
as follows. Let r and i be copies of the rounding mode and
inexact flag before entering the square root program. Also we
@@ -312,7 +312,7 @@ A. sqrt(x) by Newton Iteration
I := i; ... restore inexact flag
R := r; ... restore rounded mode
return sqrt(x):=y.
-
+
(4) Special cases
Square root of +inf, +-0, or NaN is itself;
@@ -331,7 +331,7 @@ B. sqrt(x) by Reciproot Iteration
k := 0x5fe80000 - (x0>>1);
y0:= k - T2[63&(k>>14)]. ... y ~ 1/sqrt(x) to 7.8 bits
- Here k is a 32-bit integer and T2[] is an integer array
+ Here k is a 32-bit integer and T2[] is an integer array
containing correction terms. Now magically the floating
value of y (y's leading 32-bit word is y0, the value of
its trailing word y1 is set to zero) approximates 1/sqrt(x)
@@ -352,9 +352,9 @@ B. sqrt(x) by Reciproot Iteration
Apply Reciproot iteration three times to y and multiply the
result by x to get an approximation z that matches sqrt(x)
- to about 1 ulp. To be exact, we will have
+ to about 1 ulp. To be exact, we will have
-1ulp < sqrt(x)-z<1.0625ulp.
-
+
... set rounding mode to Round-to-nearest
y := y*(1.5-0.5*x*y*y) ... almost 15 sig. bits to 1/sqrt(x)
y := y*((1.5-2^-30)+0.5*x*y*y)... about 29 sig. bits to 1/sqrt(x)
@@ -363,14 +363,14 @@ B. sqrt(x) by Reciproot Iteration
z := z + 0.5*z*(1-z*y) ... about 1 ulp to sqrt(x)
Remark 2. The constant 1.5-2^-30 is chosen to bias the error so that
- (a) the term z*y in the final iteration is always less than 1;
+ (a) the term z*y in the final iteration is always less than 1;
(b) the error in the final result is biased upward so that
-1 ulp < sqrt(x) - z < 1.0625 ulp
instead of |sqrt(x)-z|<1.03125ulp.
(3) Final adjustment
- By twiddling y's last bit it is possible to force y to be
+ By twiddling y's last bit it is possible to force y to be
correctly rounded according to the prevailing rounding mode
as follows. Let r and i be copies of the rounding mode and
inexact flag before entering the square root program. Also we
@@ -410,27 +410,27 @@ B. sqrt(x) by Reciproot Iteration
I := 1; ... Raise Inexact flag: z is not exact
else {
j := 1 - [(x0>>20)&1] ... j = logb(x) mod 2
- k := z1 >> 26; ... get z's 25-th and 26-th
+ k := z1 >> 26; ... get z's 25-th and 26-th
fraction bits
I := i or (k&j) or ((k&(j+j+1))!=(x1&3));
}
R:= r ... restore rounded mode
return sqrt(x):=z.
- If multiplication is cheaper then the foregoing red tape, the
+ If multiplication is cheaper then the foregoing red tape, the
Inexact flag can be evaluated by
I := i;
I := (z*z!=x) or I.
- Note that z*z can overwrite I; this value must be sensed if it is
+ Note that z*z can overwrite I; this value must be sensed if it is
True.
Remark 4. If z*z = x exactly, then bit 25 to bit 0 of z1 must be
zero.
--------------------
- z1: | f2 |
+ z1: | f2 |
--------------------
bit 31 bit 0
@@ -447,7 +447,6 @@ B. sqrt(x) by Reciproot Iteration
11 01 even
-------------------------------------------------
- (4) Special cases (see (4) of Section A).
-
+ (4) Special cases (see (4) of Section A).
+
*/
-
diff --git a/sysdeps/libm-ieee754/k_rem_pio2.c b/sysdeps/libm-ieee754/k_rem_pio2.c
index 5e29b05312..ccf1633bd4 100644
--- a/sysdeps/libm-ieee754/k_rem_pio2.c
+++ b/sysdeps/libm-ieee754/k_rem_pio2.c
@@ -5,7 +5,7 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
@@ -17,12 +17,12 @@ static char rcsid[] = "$NetBSD: k_rem_pio2.c,v 1.7 1995/05/10 20:46:25 jtc Exp $
/*
* __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)
* double x[],y[]; int e0,nx,prec; int ipio2[];
- *
- * __kernel_rem_pio2 return the last three digits of N with
+ *
+ * __kernel_rem_pio2 return the last three digits of N with
* y = x - N*pi/2
* so that |y| < pi/2.
*
- * The method is to compute the integer (mod 8) and fraction parts of
+ * The method is to compute the integer (mod 8) and fraction parts of
* (2/pi)*x without doing the full multiplication. In general we
* skip the part of the product that are known to be a huge integer (
* more accurately, = 0 mod 8 ). Thus the number of operations are
@@ -31,10 +31,10 @@ static char rcsid[] = "$NetBSD: k_rem_pio2.c,v 1.7 1995/05/10 20:46:25 jtc Exp $
* (2/pi) is represented by an array of 24-bit integers in ipio2[].
*
* Input parameters:
- * x[] The input value (must be positive) is broken into nx
+ * x[] The input value (must be positive) is broken into nx
* pieces of 24-bit integers in double precision format.
- * x[i] will be the i-th 24 bit of x. The scaled exponent
- * of x[0] is given in input parameter e0 (i.e., x[0]*2^e0
+ * x[i] will be the i-th 24 bit of x. The scaled exponent
+ * of x[0] is given in input parameter e0 (i.e., x[0]*2^e0
* match x's up to 24 bits.
*
* Example of breaking a double positive z into x[0]+x[1]+x[2]:
@@ -52,7 +52,7 @@ static char rcsid[] = "$NetBSD: k_rem_pio2.c,v 1.7 1995/05/10 20:46:25 jtc Exp $
* 64-bit precision 2
* 113-bit precision 3
* The actual value is the sum of them. Thus for 113-bit
- * precison, one may have to do something like:
+ * precision, one may have to do something like:
*
* long double t,w,r_head, r_tail;
* t = (long double)y[2] + (long double)y[1];
@@ -71,8 +71,8 @@ static char rcsid[] = "$NetBSD: k_rem_pio2.c,v 1.7 1995/05/10 20:46:25 jtc Exp $
* 3 113 bits (quad)
*
* ipio2[]
- * integer array, contains the (24*i)-th to (24*i+23)-th
- * bit of 2/pi after binary point. The corresponding
+ * integer array, contains the (24*i)-th to (24*i+23)-th
+ * bit of 2/pi after binary point. The corresponding
* floating value is
*
* ipio2[i] * 2^(-24(i+1)).
@@ -87,8 +87,8 @@ static char rcsid[] = "$NetBSD: k_rem_pio2.c,v 1.7 1995/05/10 20:46:25 jtc Exp $
* in the computation. The recommended value is 2,3,4,
* 6 for single, double, extended,and quad.
*
- * jz local integer variable indicating the number of
- * terms of ipio2[] used.
+ * jz local integer variable indicating the number of
+ * terms of ipio2[] used.
*
* jx nx - 1
*
@@ -108,9 +108,9 @@ static char rcsid[] = "$NetBSD: k_rem_pio2.c,v 1.7 1995/05/10 20:46:25 jtc Exp $
* exponent for q[i] would be q0-24*i.
*
* PIo2[] double precision array, obtained by cutting pi/2
- * into 24 bits chunks.
+ * into 24 bits chunks.
*
- * f[] ipio2[] in floating point
+ * f[] ipio2[] in floating point
*
* iq[] integer array by breaking up q[] in 24-bits chunk.
*
@@ -124,9 +124,9 @@ static char rcsid[] = "$NetBSD: k_rem_pio2.c,v 1.7 1995/05/10 20:46:25 jtc Exp $
/*
* Constants:
- * The hexadecimal values are the intended ones for the following
- * constants. The decimal values may be used, provided that the
- * compiler will convert from decimal to binary accurately enough
+ * The hexadecimal values are the intended ones for the following
+ * constants. The decimal values may be used, provided that the
+ * compiler will convert from decimal to binary accurately enough
* to produce the hexadecimal values shown.
*/
@@ -136,7 +136,7 @@ static char rcsid[] = "$NetBSD: k_rem_pio2.c,v 1.7 1995/05/10 20:46:25 jtc Exp $
#ifdef __STDC__
static const int init_jk[] = {2,3,4,6}; /* initial value for jk */
#else
-static int init_jk[] = {2,3,4,6};
+static int init_jk[] = {2,3,4,6};
#endif
#ifdef __STDC__
@@ -155,9 +155,9 @@ static double PIo2[] = {
};
#ifdef __STDC__
-static const double
+static const double
#else
-static double
+static double
#endif
zero = 0.0,
one = 1.0,
@@ -165,9 +165,9 @@ two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
#ifdef __STDC__
- int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2)
+ int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2)
#else
- int __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)
+ int __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)
double x[], y[]; int e0,nx,prec; int32_t ipio2[];
#endif
{
@@ -211,7 +211,7 @@ recompute:
i = (iq[jz-1]>>(24-q0)); n += i;
iq[jz-1] -= i<<(24-q0);
ih = iq[jz-1]>>(23-q0);
- }
+ }
else if(q0==0) ih = iq[jz-1]>>23;
else if(z>=0.5) ih=2;
@@ -262,7 +262,7 @@ recompute:
while(iq[jz]==0) { jz--; q0-=24;}
} else { /* break z into 24-bit if necessary */
z = __scalbn(z,-q0);
- if(z>=two24) {
+ if(z>=two24) {
fw = (double)((int32_t)(twon24*z));
iq[jz] = (int32_t)(z-two24*fw);
jz += 1; q0 += 24;
@@ -287,29 +287,29 @@ recompute:
case 0:
fw = 0.0;
for (i=jz;i>=0;i--) fw += fq[i];
- y[0] = (ih==0)? fw: -fw;
+ y[0] = (ih==0)? fw: -fw;
break;
case 1:
case 2:
fw = 0.0;
- for (i=jz;i>=0;i--) fw += fq[i];
- y[0] = (ih==0)? fw: -fw;
+ for (i=jz;i>=0;i--) fw += fq[i];
+ y[0] = (ih==0)? fw: -fw;
fw = fq[0]-fw;
for (i=1;i<=jz;i++) fw += fq[i];
- y[1] = (ih==0)? fw: -fw;
+ y[1] = (ih==0)? fw: -fw;
break;
case 3: /* painful */
for (i=jz;i>0;i--) {
- fw = fq[i-1]+fq[i];
+ fw = fq[i-1]+fq[i];
fq[i] += fq[i-1]-fw;
fq[i-1] = fw;
}
for (i=jz;i>1;i--) {
- fw = fq[i-1]+fq[i];
+ fw = fq[i-1]+fq[i];
fq[i] += fq[i-1]-fw;
fq[i-1] = fw;
}
- for (fw=0.0,i=jz;i>=2;i--) fw += fq[i];
+ for (fw=0.0,i=jz;i>=2;i--) fw += fq[i];
if(ih==0) {
y[0] = fq[0]; y[1] = fq[1]; y[2] = fw;
} else {
diff --git a/sysdeps/m68k/lshift.S b/sysdeps/m68k/lshift.S
index 77184d6ee5..dc2da206d1 100644
--- a/sysdeps/m68k/lshift.S
+++ b/sysdeps/m68k/lshift.S
@@ -118,7 +118,7 @@ L(Lend:)
rts
/* We loop from least significant end of the arrays, which is only
- permissable if the source and destination don't overlap, since the
+ permissible if the source and destination don't overlap, since the
function is documented to work for overlapping source and destination. */
L(Lspecial:)
diff --git a/sysdeps/m68k/rshift.S b/sysdeps/m68k/rshift.S
index 01dde0ab50..f529390cf8 100644
--- a/sysdeps/m68k/rshift.S
+++ b/sysdeps/m68k/rshift.S
@@ -71,7 +71,7 @@ L(Lnormal:)
movel MEM_POSTINC(s_ptr),R(d2)
movel R(d2),R(d0)
lsll R(d5),R(d0) /* compute carry limb */
-
+
lsrl R(cnt),R(d2)
movel R(d2),R(d1)
subql #1,R(s_size)
@@ -107,7 +107,7 @@ L(Lend:)
rts
/* We loop from most significant end of the arrays, which is only
- permissable if the source and destination don't overlap, since the
+ permissible if the source and destination don't overlap, since the
function is documented to work for overlapping source and destination. */
L(Lspecial:)
diff --git a/sysdeps/mach/hurd/dirfd.c b/sysdeps/mach/hurd/dirfd.c
index 9e713fc4ca..5ae869f150 100644
--- a/sysdeps/mach/hurd/dirfd.c
+++ b/sysdeps/mach/hurd/dirfd.c
@@ -1,21 +1,21 @@
-/* dirfd -- Return the file desciptor used by a DIR stream. Hurd version.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* dirfd -- Return the file descriptor used by a DIR stream. Hurd version.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <dirent.h>
#include <dirstream.h>
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index bc90e33a7e..f8d82a3cf7 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -1,21 +1,21 @@
/* Operating system support for run-time dynamic linker. Hurd version.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <hurd.h>
#include <link.h>
@@ -265,7 +265,7 @@ _dl_sysdep_message (const char *msg, ...)
dynamic linker re-relocates itself to be user-visible (for -ldl),
it will get the user's definition (i.e. usually libc's). */
-/* Open FILE_NAME and return a read-mmapable port in MEMOBJ_RD for it, or
+/* Open FILE_NAME and return a read-mmappable port in MEMOBJ_RD for it, or
return an error. If STAT is non-zero, stat the file into that stat buffer. */
static error_t
open_file (const char *file_name, int mode,
diff --git a/sysdeps/mach/hurd/getlogin_r.c b/sysdeps/mach/hurd/getlogin_r.c
index 16eca670ce..264fab3015 100644
--- a/sysdeps/mach/hurd/getlogin_r.c
+++ b/sysdeps/mach/hurd/getlogin_r.c
@@ -1,21 +1,21 @@
/* Reentrant function to return the current login name. Hurd version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <unistd.h>
@@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. */
#include <string.h>
/* Return at most NAME_LEN characters of the login name of the user in NAME.
- If it cannot be determined or some other error occured, return the error
+ If it cannot be determined or some other error occurred, return the error
code. Otherwise return 0. */
int
getlogin_r (name, name_len)
diff --git a/sysdeps/mach/hurd/pipe.c b/sysdeps/mach/hurd/pipe.c
index 610b4b253a..f52627e21e 100644
--- a/sysdeps/mach/hurd/pipe.c
+++ b/sysdeps/mach/hurd/pipe.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <ansidecl.h>
#include <errno.h>
@@ -27,7 +27,7 @@ Cambridge, MA 02139, USA. */
#include <fcntl.h>
/* Create a one-way communication channel (pipe).
- If successul, two file descriptors are stored in FDS;
+ If successful, two file descriptors are stored in FDS;
bytes written on FDS[1] can be read from FDS[0].
Returns 0 if successful, -1 if not. */
int
diff --git a/sysdeps/mach/hurd/select.c b/sysdeps/mach/hurd/select.c
index aa99944e84..f51551a2f9 100644
--- a/sysdeps/mach/hurd/select.c
+++ b/sysdeps/mach/hurd/select.c
@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <ansidecl.h>
#include <sys/types.h>
@@ -117,7 +117,7 @@ DEFUN(__select, (nfds, readfds, writefds, exceptfds, timeout),
return -1;
/* Send them all io_select request messages. */
-
+
if (firstfd == -1)
/* But not if there were no ports to deal with at all. */
portset = __mach_reply_port ();
@@ -126,7 +126,7 @@ DEFUN(__select, (nfds, readfds, writefds, exceptfds, timeout),
err = 0;
got = 0;
portset = MACH_PORT_NULL;
-
+
for (i = firstfd; i <= lastfd; ++i)
if (d[i].type)
{
@@ -176,7 +176,7 @@ DEFUN(__select, (nfds, readfds, writefds, exceptfds, timeout),
if ((type & SELECT_ALL) == 0)
/* Bogus answer; treat like an error, as a fake positive. */
type = SELECT_ALL;
-
+
/* This port is already ready already. */
d[i].type &= type;
d[i].type |= SELECT_RETURNED;
@@ -186,7 +186,7 @@ DEFUN(__select, (nfds, readfds, writefds, exceptfds, timeout),
_hurd_port_free (&d[i].cell->port, &d[i].ulink, d[i].io_port);
}
}
-
+
/* Now wait for reply messages. */
if (!err && got == 0)
{
@@ -247,7 +247,7 @@ DEFUN(__select, (nfds, readfds, writefds, exceptfds, timeout),
msg.success.result = SELECT_ALL;
}
- /* Look up the respondant's reply port and record its
+ /* Look up the respondent's reply port and record its
readiness. */
{
int had = got;
@@ -314,7 +314,7 @@ DEFUN(__select, (nfds, readfds, writefds, exceptfds, timeout),
for (i = firstfd; i <= lastfd; ++i)
{
int type = d[i].type;
-
+
if ((type & SELECT_RETURNED) == 0)
type = 0;
diff --git a/sysdeps/mach/thread_state.h b/sysdeps/mach/thread_state.h
index 06f168bb55..34904aa550 100644
--- a/sysdeps/mach/thread_state.h
+++ b/sysdeps/mach/thread_state.h
@@ -1,21 +1,21 @@
/* Generic definitions for dealing with Mach thread states.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Everything else is called `thread_state', but CMU's header file is
@@ -57,7 +57,7 @@ machine_get_state (thread_t thread, struct machine_thread_all_state *state,
}
else
{
- /* Noone asked about this flavor of state before; fetch the state
+ /* No one asked about this flavor of state before; fetch the state
directly from the kernel into the sigcontext. */
mach_msg_type_number_t got = (size / sizeof (int));
return (! __thread_get_state (thread, flavor, scpptr, &got)
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index c00afbe549..9e80426ee3 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -14,9 +14,9 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#define ELF_MACHINE_NAME "MIPS"
@@ -27,12 +27,12 @@
#include <sys/mman.h>
#include <unistd.h>
-/* DT_MIPS macro ranslate a processor specific dynamic tag to the index
+/* Translate a processor specific dynamic tag to the index
in l_info array. */
#define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM)
#if 1
-/* XXX If FLAGS has the MAP_ALIGN bit, we need 64k alignement. */
+/* XXX If FLAGS has the MAP_ALIGN bit, we need 64k alignment. */
#ifndef MAP_ALIGN
#define MAP_ALIGN 0x1000
#endif
diff --git a/sysdeps/posix/sigpause.c b/sysdeps/posix/sigpause.c
index 020a46b120..b3eec8f39a 100644
--- a/sysdeps/posix/sigpause.c
+++ b/sysdeps/posix/sigpause.c
@@ -22,25 +22,35 @@
/* Set the mask of blocked signals to MASK,
wait for a signal to arrive, and then restore the mask. */
int
-__sigpause (mask)
- int mask;
+__sigpause (sig_or_mask, is_sig)
+ int sig_or_mask;
+ int is_sig;
{
sigset_t set;
int sig;
- if (__sigemptyset (&set) < 0)
- return -1;
-
- if (sizeof (mask) == sizeof (set))
- *(int *) &set = mask;
- else if (sizeof (unsigned long int) == sizeof (set))
- *(unsigned long int *) &set = (unsigned int) mask;
+ if (is_sig != 0)
+ {
+ /* The modern X/Open implementation is requested. */
+ if (sigprocmask (0, NULL, &set) < 0
+ /* Yes, we call `sigaddset' and not `__sigaddset'. */
+ || sigaddset (&set, sig_or_mask) < 0)
+ return -1;
+ }
else
- for (sig = 1; sig < NSIG; ++sig)
- if ((mask & sigmask (sig)) && __sigaddset (&set, sig) < 0)
+ {
+ if (__sigemptyset (&set) < 0)
return -1;
+ if (sizeof (sig_or_mask) == sizeof (set))
+ *(int *) &set = sig_or_mask;
+ else if (sizeof (unsigned long int) == sizeof (set))
+ *(unsigned long int *) &set = (unsigned int) sig_or_mask;
+ else
+ for (sig = 1; sig < NSIG; ++sig)
+ if ((sig_or_mask & sigmask (sig)) && __sigaddset (&set, sig) < 0)
+ return -1;
+ }
+
return sigsuspend (&set);
}
-
-weak_alias (__sigpause, sigpause)
diff --git a/sysdeps/standalone/i960/i960ca.h b/sysdeps/standalone/i960/i960ca.h
index 21012b4ccc..ba8db2b985 100644
--- a/sysdeps/standalone/i960/i960ca.h
+++ b/sysdeps/standalone/i960/i960ca.h
@@ -1,29 +1,28 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
- On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ On-Line Applications Research Corporation.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* i960ca.h
*
- * This file contains macros which are used to access i80960CA
+ * This file contains macros which are used to access i80960CA
* registers which are not addressable by C. The functions
- * in this file sould be useful to the developer of target
+ * in this file should be useful to the developer of target
* specific code.
*/
@@ -37,22 +36,22 @@ typedef unsigned int unsigned32;
/*
* Intel i80960CA Processor Control Block
*/
-
+
struct i80960ca_prcb {
- unsigned32 *fault_tbl; /* fault table base address */
+ unsigned32 *fault_tbl; /* fault table base address */
struct i80960ca_ctltbl
*control_tbl; /* control table base address */
unsigned32 initial_ac; /* AC register initial value */
- unsigned32 fault_config; /* fault configuration word */
+ unsigned32 fault_config; /* fault configuration word */
void *intr_tbl; /* interrupt table base address */
- void *sys_proc_tbl; /* system procedure table */
- /* base address */
- unsigned32 reserved; /* reserved */
- unsigned32 *intr_stack; /* interrupt stack pointer */
- unsigned32 ins_cache_cfg; /* instruction cache */
- /* configuration word */
- unsigned32 reg_cache_cfg; /* register cache */
- /* configuration word */
+ void *sys_proc_tbl; /* system procedure table */
+ /* base address */
+ unsigned32 reserved; /* reserved */
+ unsigned32 *intr_stack; /* interrupt stack pointer */
+ unsigned32 ins_cache_cfg; /* instruction cache */
+ /* configuration word */
+ unsigned32 reg_cache_cfg; /* register cache */
+ /* configuration word */
};
/*
@@ -128,7 +127,7 @@ struct i80960ca_ctltbl {
: "0" (_addr), "1" (_mask) ); \
(prev) = _mask; \
}
-
+
#define delay( microseconds ) \
{ register unsigned32 _delay=(microseconds); \
register unsigned32 _tmp; \
@@ -185,22 +184,22 @@ struct i80960ca_ctltbl {
: "0" (_cmd), "1" (_next), "2" (_prcb) ); \
}
-static inline unsigned32 pend_intrs()
-{ register unsigned32 _intr=0;
- asm volatile( "mov sf0,%0" : "=d" (_intr) : "0" (_intr) );
- return ( _intr );
+static inline unsigned32 pend_intrs()
+{ register unsigned32 _intr=0;
+ asm volatile( "mov sf0,%0" : "=d" (_intr) : "0" (_intr) );
+ return ( _intr );
}
-static inline unsigned32 mask_intrs()
+static inline unsigned32 mask_intrs()
{ register unsigned32 _intr=0;
- asm volatile( "mov sf1,%0" : "=d" (_intr) : "0" (_intr) );
+ asm volatile( "mov sf1,%0" : "=d" (_intr) : "0" (_intr) );
return( _intr );
}
-static inline unsigned32 get_fp()
-{ register unsigned32 _fp=0;
- asm volatile( "mov fp,%0" : "=d" (_fp) : "0" (_fp) );
- return ( _fp );
+static inline unsigned32 get_fp()
+{ register unsigned32 _fp=0;
+ asm volatile( "mov fp,%0" : "=d" (_fp) : "0" (_fp) );
+ return ( _fp );
}
#endif
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/console.c b/sysdeps/standalone/m68k/m68020/mvme136/console.c
index 159070bab9..cafb1abfe7 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/console.c
+++ b/sysdeps/standalone/m68k/m68020/mvme136/console.c
@@ -1,34 +1,32 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
- On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
+ On-Line Applications Research Corporation.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <standalone.h>
#include "m68020.h"
/* Console IO routines for a Motorola MVME135/MVME136 board.
-
+
They currently use the B port. It should be possible to
use the A port by filling in the reset of the chip structure,
adding an ifdef for PORTA/PORTB, and switching the addresses,
-and maybe the macroes based on the macro. */
+and maybe the macros based on the macro. */
/* M68681 DUART chip register structures and constants */
@@ -69,14 +67,15 @@ XON/XOFF flow control. */
#define XOFF 0x13 /* control-S */
int
-DEFUN( _Console_Putc, (ch), char ch )
+_Console_Putc (ch)
+ char ch;
{
while ( ! (RD_M68681->srb & TXRDYB) ) ;
while ( RD_M68681->srb & RXRDYB ) /* must be an XOFF */
- if ( RD_M68681->rbb == XOFF )
+ if ( RD_M68681->rbb == XOFF )
do {
while ( ! (RD_M68681->srb & RXRDYB) ) ;
- } while ( RD_M68681->rbb != XON );
+ } while ( RD_M68681->rbb != XON );
WR_M68681->tbb = ch;
return( 0 );
@@ -87,10 +86,11 @@ DEFUN( _Console_Putc, (ch), char ch )
This routine reads a character from the UART and returns it. */
int
-DEFUN( _Console_Getc, (poll), int poll )
+_Console_Getc (poll)
+ int poll;
{
if ( poll ) {
- if ( !(RD_M68681->srb & RXRDYB) )
+ if ( !(RD_M68681->srb & RXRDYB) )
return -1;
else
return RD_M68681->rbb;
diff --git a/sysdeps/stub/dirfd.c b/sysdeps/stub/dirfd.c
index 06707cdd60..ce40a28013 100644
--- a/sysdeps/stub/dirfd.c
+++ b/sysdeps/stub/dirfd.c
@@ -1,21 +1,21 @@
-/* dirfd -- Return the file desciptor used by a DIR stream. Stub version.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Return the file descriptor used by a DIR stream. Stub version.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <dirent.h>
#include <dirstream.h>
diff --git a/sysdeps/stub/getlogin_r.c b/sysdeps/stub/getlogin_r.c
index d811818096..1b6145c12d 100644
--- a/sysdeps/stub/getlogin_r.c
+++ b/sysdeps/stub/getlogin_r.c
@@ -21,7 +21,7 @@
#include <unistd.h>
/* Return at most NAME_LEN characters of the login name of the user in NAME.
- If it cannot be determined or some other error occured, return the error
+ If it cannot be determined or some other error occurred, return the error
code. Otherwise return 0. */
int
getlogin_r (name, name_len)
diff --git a/sysdeps/stub/libc-lock.h b/sysdeps/stub/libc-lock.h
index 5eb698efb5..63ea622cc4 100644
--- a/sysdeps/stub/libc-lock.h
+++ b/sysdeps/stub/libc-lock.h
@@ -61,7 +61,7 @@
#define __libc_cleanup_region_end(DOIT)
-/* We need protable names for some of the functions. */
+/* We need portable names for some of the functions. */
#define __libc_mutex_unlock
#endif /* libc-lock.h */
diff --git a/sysdeps/stub/local_lim.h b/sysdeps/stub/local_lim.h
index 771d1b0c16..42cc7ebbc9 100644
--- a/sysdeps/stub/local_lim.h
+++ b/sysdeps/stub/local_lim.h
@@ -1,3 +1,3 @@
-/* This file should define the implementaton-specific limits described
+/* This file should define the implementation-specific limits described
in posix[12]_lim.h. If there are no useful values to give a limit,
don't define it. */
diff --git a/sysdeps/stub/pipe.c b/sysdeps/stub/pipe.c
index c3ed56b299..b566a19560 100644
--- a/sysdeps/stub/pipe.c
+++ b/sysdeps/stub/pipe.c
@@ -1,27 +1,27 @@
/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <unistd.h>
#include <stddef.h>
/* Create a one-way communication channel (__pipe).
- If successul, two file descriptors are stored in PIPEDES;
+ If successful, two file descriptors are stored in PIPEDES;
bytes written on PIPEDES[1] can be read from PIPEDES[0].
Returns 0 if successful, -1 if not. */
int
diff --git a/sysdeps/stub/sigpause.c b/sysdeps/stub/sigpause.c
index 54d23ee262..5e68899ed8 100644
--- a/sysdeps/stub/sigpause.c
+++ b/sysdeps/stub/sigpause.c
@@ -1,31 +1,30 @@
/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <signal.h>
int
-__sigpause (mask)
- int mask;
+__sigpause (sig_or_mask, is_sig)
+ int sig_or_mask;
+ int is_sig;
{
__set_errno (ENOSYS);
return -1;
}
-stub_warning (sigpause)
-
-weak_alias (__sigpause, sigpause)
+stub_warning (__sigpause)
diff --git a/sysdeps/stub/sys/sem_buf.h b/sysdeps/stub/sys/sem_buf.h
index 194eb149ec..278cdeb1e2 100644
--- a/sysdeps/stub/sys/sem_buf.h
+++ b/sysdeps/stub/sys/sem_buf.h
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _SYS_SEM_BUF_H
#define _SYS_SEM_BUF_H
@@ -41,7 +41,7 @@ __BEGIN_DECLS
/* Data structure describing a set of semaphores. */
struct semid_ds
{
- struct ipc_perm sem_perm; /* operation permisson struct */
+ struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
unsigned short int sem_nsems; /* number of semaphores in set */
@@ -55,7 +55,7 @@ union semun
unsigned short int *array; /* array for GETALL & SETALL */
struct seminfo *__buf; /* buffer for IPC_INFO */
};
-
+
__END_DECLS
#endif /* sys/sem_buf.h */
diff --git a/sysdeps/stub/sys/shm_buf.h b/sysdeps/stub/sys/shm_buf.h
index c665d6c160..45147d4b06 100644
--- a/sysdeps/stub/sys/shm_buf.h
+++ b/sysdeps/stub/sys/shm_buf.h
@@ -1,21 +1,21 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _SYS_SHM_BUF_H
#define _SYS_SHM_BUF_H
@@ -38,7 +38,7 @@ __BEGIN_DECLS
/* Data structure describing a set of semaphores. */
struct shmid_ds
{
- struct ipc_perm sem_perm; /* operation permisson struct */
+ struct ipc_perm sem_perm; /* operation permission struct */
int shm_segsz; /* size of segment in bytes */
__time_t sem_atime; /* time of last shmat() */
__time_t sem_dtime; /* time of last shmdt() */
diff --git a/sysdeps/stub/tcsetattr.c b/sysdeps/stub/tcsetattr.c
index ce1dae094f..7904ea2c08 100644
--- a/sysdeps/stub/tcsetattr.c
+++ b/sysdeps/stub/tcsetattr.c
@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <stddef.h>
@@ -63,7 +63,7 @@ tcsetattr (fd, optional_actions, termios_p)
}
-/* Stricknine checking. */
+/* Strychnine checking. */
static int
bad_speed (speed)
speed_t speed;
diff --git a/sysdeps/stub/tempname.c b/sysdeps/stub/tempname.c
index e38345721e..984d4becd3 100644
--- a/sysdeps/stub/tempname.c
+++ b/sysdeps/stub/tempname.c
@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <stdio.h>
@@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */
/* Generate a (hopefully) unique temporary filename
in DIR (if applicable), using prefix PFX.
If DIR_SEARCH is nonzero, perform directory searching
- malarky as per the SVID for tempnam.
+ malarkey as per the SVID for tempnam.
Return the generated filename or NULL if one could not
be generated, putting the length of the string in *LENPTR. */
char *
diff --git a/sysdeps/unix/bsd/osf/sigaction.h b/sysdeps/unix/bsd/osf/sigaction.h
index d809b6bd74..df400d4aaa 100644
--- a/sysdeps/unix/bsd/osf/sigaction.h
+++ b/sysdeps/unix/bsd/osf/sigaction.h
@@ -1,21 +1,22 @@
-/* Structure and constand definitions for sigaction et al. OSF/1 version.
+/* Structure and constant definitions for sigaction et al. OSF/1 version.
Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
diff --git a/sysdeps/unix/bsd/sys/reboot.h b/sysdeps/unix/bsd/sys/reboot.h
index c3c957e17e..f00b1aba65 100644
--- a/sysdeps/unix/bsd/sys/reboot.h
+++ b/sysdeps/unix/bsd/sys/reboot.h
@@ -42,7 +42,7 @@
#define RB_ASKNAME 0x01 /* ask for file name to reboot from */
#define RB_SINGLE 0x02 /* reboot to single user only */
-#define RB_NOSYNC 0x04 /* dont sync before reboot */
+#define RB_NOSYNC 0x04 /* don't sync before reboot */
#define RB_HALT 0x08 /* don't reboot, just halt */
#define RB_INITNAME 0x10 /* name given for /etc/init (unused) */
#define RB_DFLTROOT 0x20 /* use compiled-in rootdev */
diff --git a/sysdeps/unix/bsd/usleep.c b/sysdeps/unix/bsd/usleep.c
index 850233aaad..13506d2b8f 100644
--- a/sysdeps/unix/bsd/usleep.c
+++ b/sysdeps/unix/bsd/usleep.c
@@ -1,29 +1,29 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/time.h>
/* Sleep USECONDS microseconds, or until a previously set timer goes off. */
-unsigned int
-DEFUN(usleep, (useconds), unsigned int useconds)
+void
+usleep (useconds)
+ unsigned int useconds;
{
struct timeval delay;
@@ -32,6 +32,4 @@ DEFUN(usleep, (useconds), unsigned int useconds)
(void) __select (0, (fd_set *) NULL, (fd_set *) NULL, (fd_set *) NULL,
&delay);
-
- return 0;
}
diff --git a/sysdeps/unix/dirfd.c b/sysdeps/unix/dirfd.c
index d02c12a1fd..1180dfa63e 100644
--- a/sysdeps/unix/dirfd.c
+++ b/sysdeps/unix/dirfd.c
@@ -1,21 +1,21 @@
-/* dirfd -- Return the file desciptor used by a DIR stream. Unix version.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Return the file descriptor used by a DIR stream. Unix version.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <dirent.h>
#include <dirstream.h>
diff --git a/sysdeps/unix/getlogin_r.c b/sysdeps/unix/getlogin_r.c
index 868fdbee12..75f17cb86f 100644
--- a/sysdeps/unix/getlogin_r.c
+++ b/sysdeps/unix/getlogin_r.c
@@ -27,7 +27,7 @@
#include <utmp.h>
/* Return at most NAME_LEN characters of the login name of the user in NAME.
- If it cannot be determined or some other error occured, return the error
+ If it cannot be determined or some other error occurred, return the error
code. Otherwise return 0. */
int
diff --git a/sysdeps/unix/sysv/linux/clock.c b/sysdeps/unix/sysv/linux/clock.c
new file mode 100644
index 0000000000..372afdd149
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/clock.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/times.h>
+#include <time.h>
+#include <unistd.h>
+
+/* Return the time used by the program so far (user time + system time). */
+clock_t
+clock (void)
+{
+ struct tms buf;
+ long clk_tck = __sysconf (_SC_CLK_TCK);
+
+ if (__times (&buf) < 0)
+ return (clock_t) -1;
+
+ return
+ (clk_tck <= CLOCKS_PER_SEC)
+ ? ((unsigned long) buf.tms_utime + buf.tms_stime) * (CLOCKS_PER_SEC
+ / clk_tck)
+ : ((unsigned long) buf.tms_utime + buf.tms_stime) / (clk_tck
+ / CLOCKS_PER_SEC);
+}
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index 4508848a03..42fe89c269 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -50,7 +50,7 @@ fi
# The Linux filesystem standard prescribes where to place "essential"
# files. I.e., when the installation prefix is "/usr" we have to place
-# shared library objects and the configuation files on the root partition
+# shared library objects and the configuration files on the root partition
# in /lib and /etc.
if test "$prefix" = "/usr"; then
libc_cv_slibdir="/lib"
diff --git a/sysdeps/unix/sysv/linux/configure.in b/sysdeps/unix/sysv/linux/configure.in
index 174eb32ce1..4ac65d02fa 100644
--- a/sysdeps/unix/sysv/linux/configure.in
+++ b/sysdeps/unix/sysv/linux/configure.in
@@ -35,7 +35,7 @@ fi
# The Linux filesystem standard prescribes where to place "essential"
# files. I.e., when the installation prefix is "/usr" we have to place
-# shared library objects and the configuation files on the root partition
+# shared library objects and the configuration files on the root partition
# in /lib and /etc.
if test "$prefix" = "/usr"; then
libc_cv_slibdir="/lib"
diff --git a/sysdeps/unix/sysv/linux/gethostid.c b/sysdeps/unix/sysv/linux/gethostid.c
index b313ab3409..67e64208b3 100644
--- a/sysdeps/unix/sysv/linux/gethostid.c
+++ b/sysdeps/unix/sysv/linux/gethostid.c
@@ -79,7 +79,7 @@ gethostid ()
return id;
}
- /* Getting from the file was not succesful. An intelligent guess for
+ /* Getting from the file was not successful. An intelligent guess for
a unique number of a host is its IP address. Return this. */
if (gethostname (hostname, MAXHOSTNAMELEN) < 0 || hostname[0] == '\0')
/* This also fails. Return and arbitrary value. */
diff --git a/sysdeps/unix/sysv/linux/m68k/mremap.S b/sysdeps/unix/sysv/linux/m68k/mremap.S
new file mode 100644
index 0000000000..2fec9aab7b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/mremap.S
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* The mremap system call is special because it needs to return
+ its value in register %a0. */
+
+ .text
+PSEUDO (__mremap, mremap, 4)
+ move.l %d0, %a0
+ rts
+PSEUDO_END (__mremap)
+weak_alias (__mremap, mremap)
diff --git a/sysdeps/unix/sysv/linux/sigaction.h b/sysdeps/unix/sysv/linux/sigaction.h
index d8930782d7..13a6a03248 100644
--- a/sysdeps/unix/sysv/linux/sigaction.h
+++ b/sysdeps/unix/sysv/linux/sigaction.h
@@ -1,21 +1,21 @@
/* The proper definitions for Linux's sigaction.
-Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
@@ -27,7 +27,7 @@ struct sigaction
__sigset_t sa_mask;
/* Special flags. */
- unsigned long sa_flags;
+ int sa_flags;
/* Restore handler. */
void (*sa_restorer) __P ((void));
diff --git a/sysdeps/unix/sysv/linux/signum.h b/sysdeps/unix/sysv/linux/signum.h
index 0a2e67e4a5..d8a716f2e0 100644
--- a/sysdeps/unix/sysv/linux/signum.h
+++ b/sysdeps/unix/sysv/linux/signum.h
@@ -56,7 +56,7 @@
#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */
#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */
#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */
-#define SIGPOLL SIGIO /* Pollable event occured (System V). */
+#define SIGPOLL SIGIO /* Pollable event occurred (System V). */
#define SIGIO 29 /* I/O now possible (4.2 BSD). */
#define SIGPWR 30 /* Power failure restart (System V). */
#define SIGUNUSED 31
diff --git a/sysdeps/unix/sysv/linux/sleep.c b/sysdeps/unix/sysv/linux/sleep.c
index e669541eed..626c47ff7c 100644
--- a/sysdeps/unix/sysv/linux/sleep.c
+++ b/sysdeps/unix/sysv/linux/sleep.c
@@ -1,22 +1,22 @@
-/* sleep - Implementation of the POSIX sleep function using nanosleep.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+/* Implementation of the POSIX sleep function using nanosleep.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <time.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/linux/sys/module.h b/sysdeps/unix/sysv/linux/sys/module.h
index e62254ff40..0b47da29e7 100644
--- a/sysdeps/unix/sysv/linux/sys/module.h
+++ b/sysdeps/unix/sysv/linux/sys/module.h
@@ -42,7 +42,7 @@ extern unsigned long int create_module __P ((__const char *__module_name,
/* Initialize the module called MODULE_NAME with the CONTENTSSIZE
bytes starting at address CONTENTS. CONTENTS normally contains the
- text and data segment of the module (the bss is implicity zeroed).
+ text and data segment of the module (the bss is implicitly zeroed).
After copying the contents, the function pointed to by
ROUTINES.init is executed. When the module is no longer needed,
ROUTINES.cleanup is executed. SYMTAB is NULL if the module does
diff --git a/sysdeps/unix/sysv/linux/sys/mtio.h b/sysdeps/unix/sysv/linux/sys/mtio.h
index 918b95d01f..45db6a51b4 100644
--- a/sysdeps/unix/sysv/linux/sys/mtio.h
+++ b/sysdeps/unix/sysv/linux/sys/mtio.h
@@ -24,7 +24,7 @@
#include <sys/ioctl.h>
#include <linux/mtio.h>
-/* Specifiy default tape device. */
+/* Specify default tape device. */
#ifndef DEFTAPE
# define DEFTAPE "/dev/tape"
#endif
diff --git a/sysdeps/unix/sysv/linux/sys/sem_buf.h b/sysdeps/unix/sysv/linux/sys/sem_buf.h
index 4770354fe2..049a71bc47 100644
--- a/sysdeps/unix/sysv/linux/sys/sem_buf.h
+++ b/sysdeps/unix/sysv/linux/sys/sem_buf.h
@@ -42,7 +42,7 @@ __BEGIN_DECLS
/* Data structure describing a set of semaphores. */
struct semid_ds
{
- struct ipc_perm sem_perm; /* operation permisson struct */
+ struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
struct sem *__sembase; /* ptr to first semaphore in array */
diff --git a/sysdeps/unix/sysv/linux/sys/shm_buf.h b/sysdeps/unix/sysv/linux/sys/shm_buf.h
index 08e69eb84c..f6d853744f 100644
--- a/sysdeps/unix/sysv/linux/sys/shm_buf.h
+++ b/sysdeps/unix/sysv/linux/sys/shm_buf.h
@@ -43,7 +43,7 @@ __BEGIN_DECLS
/* Data structure describing a set of semaphores. */
struct shmid_ds
{
- struct ipc_perm shm_perm; /* operation permisson struct */
+ struct ipc_perm shm_perm; /* operation permission struct */
int shm_segsz; /* size of segment in bytes */
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
diff --git a/sysdeps/unix/sysv/linux/termbits.h b/sysdeps/unix/sysv/linux/termbits.h
index 3045c590a5..536ced356d 100644
--- a/sysdeps/unix/sysv/linux/termbits.h
+++ b/sysdeps/unix/sysv/linux/termbits.h
@@ -17,7 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* Use the architecture dependend definitions from the kernel. */
+/* Use the architecture dependent definitions from the kernel. */
#include <asm/termbits.h>
#define _IOT_termios /* Hurd ioctl type field. */ \
diff --git a/sysdeps/unix/sysv/linux/timebits.h b/sysdeps/unix/sysv/linux/timebits.h
index c31f481a60..52f666faf5 100644
--- a/sysdeps/unix/sysv/linux/timebits.h
+++ b/sysdeps/unix/sysv/linux/timebits.h
@@ -35,9 +35,12 @@ struct timeval
#ifndef _TIMEBITS_H
# define _TIMEBITS_H 1
-# ifdef __USE_MISC
-# include <asm/param.h>
-# define CLOCKS_PER_SEC HZ /* XXX names not kosher */
-# endif
+/* ISO/IEC 9899:1990 7.12.1: <time.h>
+ The macro `CLOCKS_PER_SEC' is the number per second of the value
+ returned by the `clock' function. */
+/* CAE XSH, Issue 4, Version 2: <time.h>
+ The value of CLOCKS_PER_SEC is required to be 1 million on all
+ XSI-conformant systems. */
+# define CLOCKS_PER_SEC 1000000
#endif /* timebits.h */
diff --git a/sysdeps/unix/sysv/linux/usleep.c b/sysdeps/unix/sysv/linux/usleep.c
index d08c6b6594..9d36a90008 100644
--- a/sysdeps/unix/sysv/linux/usleep.c
+++ b/sysdeps/unix/sysv/linux/usleep.c
@@ -1 +1,31 @@
-#include <sysdeps/unix/bsd/usleep.c>
+/* Implementation of the BSD usleep function using nanosleep.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <time.h>
+#include <unistd.h>
+
+void
+usleep (unsigned int useconds)
+{
+ struct timespec ts = { tv_sec: 0,
+ tv_nsec: (long int) useconds * 1000ul };
+
+ __nanosleep (&ts, NULL);
+}
diff --git a/sysdeps/vax/memchr.s b/sysdeps/vax/memchr.s
index c7793fb5f8..b81c2bcf87 100644
--- a/sysdeps/vax/memchr.s
+++ b/sysdeps/vax/memchr.s
@@ -36,7 +36,7 @@
#endif /* LIBC_SCCS and not lint */
/*
- * Find the first occurence of c in the memory at cp (length n).
+ * Find the first occurrence of c in the memory at cp (length n).
* Return pointer to match or null pointer.
*
* This code optimises the usual case (0 < n < 65535).
diff --git a/sysdeps/vax/strchr.s b/sysdeps/vax/strchr.s
index 1683f564e2..70025cce6e 100644
--- a/sysdeps/vax/strchr.s
+++ b/sysdeps/vax/strchr.s
@@ -36,7 +36,7 @@
#endif /* LIBC_SCCS and not lint */
/*
- * Find the first occurence of c in the string cp.
+ * Find the first occurrence of c in the string cp.
* Return pointer to match or null pointer.
*
* char *
@@ -58,7 +58,7 @@ ENTRY(strchr, 0)
*/
movab tbl,r3 /* r3 = base of table */
bbss $0,(r3),Lreent /* ensure not reentering */
- movab (r3)[r2],r5
+ movab (r3)[r2],r5
incb (r5) /* mark both '\0' and c */
0:
scanc r4,(r1),(r3),$1 /* look for c or '\0' */
diff --git a/sysdeps/vax/strncmp.s b/sysdeps/vax/strncmp.s
index e5bfcf2a73..0758bd8729 100644
--- a/sysdeps/vax/strncmp.s
+++ b/sysdeps/vax/strncmp.s
@@ -53,14 +53,14 @@ ENTRY(strncmp, 0)
movl 4(ap),r1 # r1 = s1
movq 8(ap),r3 # r3 = s2; r4 = n
1:
- clrl r5 # calculate min bytes to next page boundry
+ clrl r5 # calculate min bytes to next page boundary
subb3 r1,$255,r5 # r5 = (bytes - 1) to end of page for s1
subb3 r3,$255,r0 # r0 = (bytes - 1) to end of page for s2
cmpb r0,r5 # r5 = min(r0, r5);
bgtru 2f
movb r0,r5
2:
- incl r5 # r5 = min bytes to next page boundry
+ incl r5 # r5 = min bytes to next page boundary
cmpl r4,r5 # r5 = min(n, r5);
bgeq 3f
movl r4,r5
diff --git a/sysdeps/vax/strrchr.s b/sysdeps/vax/strrchr.s
index dffcddaef0..87313445c9 100644
--- a/sysdeps/vax/strrchr.s
+++ b/sysdeps/vax/strrchr.s
@@ -36,7 +36,7 @@
#endif /* LIBC_SCCS and not lint */
/*
- * Find the last occurence of c in the string cp.
+ * Find the last occurrence of c in the string cp.
* Return pointer to match or null pointer.
*
* char *
diff --git a/time/strftime.c b/time/strftime.c
index fea545cd38..963e9e4e4d 100644
--- a/time/strftime.c
+++ b/time/strftime.c
@@ -85,23 +85,27 @@ extern char *tzname[];
#endif
#ifndef __P
-#if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
-#define __P(args) args
-#else
-#define __P(args) ()
-#endif /* GCC. */
+# if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
+# define __P(args) args
+# else
+# define __P(args) ()
+# endif /* GCC. */
#endif /* Not __P. */
#ifndef PTR
-#ifdef __STDC__
-#define PTR void *
-#else
-#define PTR char *
-#endif
+# ifdef __STDC__
+# define PTR void *
+# else
+# define PTR char *
+# endif
#endif
#ifndef CHAR_BIT
-#define CHAR_BIT 8
+# define CHAR_BIT 8
+#endif
+
+#ifndef NULL
+# define NULL 0
#endif
#define TYPE_SIGNED(t) ((t) -1 < 0)
@@ -119,7 +123,7 @@ extern char *tzname[];
#ifndef __isleap
/* Nonzero if YEAR is a leap year (every 4 years,
except every 100th isn't, and every 400th is). */
-#define __isleap(year) \
+# define __isleap(year) \
((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
#endif
@@ -134,7 +138,7 @@ extern int __tz_compute __P ((time_t timer, const struct tm *tm));
# if ! HAVE_LOCALTIME_R
# if ! HAVE_TM_GMTOFF
/* Approximate gmtime_r as best we can in its absence. */
-#define gmtime_r my_gmtime_r
+# define gmtime_r my_gmtime_r
static struct tm *gmtime_r __P ((const time_t *, struct tm *));
static struct tm *
gmtime_r (t, tp)
@@ -150,7 +154,7 @@ gmtime_r (t, tp)
# endif /* ! HAVE_TM_GMTOFF */
/* Approximate localtime_r as best we can in its absence. */
-#define localtime_r my_localtime_r
+# define localtime_r my_localtime_r
static struct tm *localtime_r __P ((const time_t *, struct tm *));
static struct tm *
localtime_r (t, tp)
@@ -194,23 +198,25 @@ static const char spaces[16] = " ";
{ \
int _n = (n); \
int _delta = width - _n; \
- i += _n + (_delta > 0 ? _delta : 0); \
- if (i >= maxsize) \
+ int _incr = _n + (_delta > 0 ? _delta : 0); \
+ if (i + _incr >= maxsize) \
return 0; \
- else \
- if (p) \
- { \
- if (_delta > 0) \
- memset_space (p, _delta); \
- f; \
- p += _n; \
- } \
+ if (p) \
+ { \
+ if (_delta > 0) \
+ memset_space (p, _delta); \
+ f; \
+ p += _n; \
+ } \
+ i += _incr; \
} while (0)
#define cpy(n, s) \
add ((n), \
if (to_lowcase) \
memcpy_lowcase (p, (s), _n); \
+ else if (to_uppcase) \
+ memcpy_uppcase (p, (s), _n); \
else \
memcpy ((PTR) p, (PTR) (s), _n))
@@ -237,6 +243,19 @@ memcpy_lowcase (dest, src, len)
return dest;
}
+static char *memcpy_uppcase __P ((char *dest, const char *src, size_t len));
+
+static char *
+memcpy_uppcase (dest, src, len)
+ char *dest;
+ const char *src;
+ size_t len;
+{
+ while (len-- > 0)
+ dest[len] = TOUPPER (src[len]);
+ return dest;
+}
+
#if ! HAVE_TM_GMTOFF
/* Yield the difference between *A and *B,
measured in seconds, ignoring leap seconds. */
@@ -393,6 +412,7 @@ strftime (s, maxsize, format, tp)
: INT_STRLEN_BOUND (int))];
int width = -1;
int to_lowcase = 0;
+ int to_uppcase = 0;
#if DO_MULTIBYTE
@@ -468,16 +488,19 @@ strftime (s, maxsize, format, tp)
#endif /* ! DO_MULTIBYTE */
/* Check for flags that can modify a number format. */
- ++f;
while (1)
{
- switch (*f)
+ switch (*++f)
{
case '_':
case '-':
case '0':
- pad = *f++;
- break;
+ pad = *f;
+ continue;
+
+ case '^':
+ to_uppcase = 1;
+ continue;
default:
pad = 0;
@@ -563,10 +586,18 @@ strftime (s, maxsize, format, tp)
subformat:
{
+ char *old_start = p;
size_t len = strftime (NULL, maxsize - i, subfmt, tp);
if (len == 0 && *subfmt)
return 0;
add (len, strftime (p, maxsize - i, subfmt, tp));
+
+ if (to_uppcase)
+ while (old_start < p)
+ {
+ *old_start = TOUPPER (*old_start);
+ ++old_start;
+ }
}
break;
diff --git a/time/time.h b/time/time.h
index 935de80c7a..e824e64b9d 100644
--- a/time/time.h
+++ b/time/time.h
@@ -265,10 +265,10 @@ extern int dysize __P ((int __year));
#endif
-#ifdef __USE_POSIX
/* Pause execution for a number of nanoseconds. */
extern int __nanosleep __P ((__const struct timespec *__requested_time,
struct timespec *__remaining));
+#ifdef __USE_POSIX199309
extern int nanosleep __P ((__const struct timespec *__requested_time,
struct timespec *__remaining));
#endif
diff --git a/time/zic.c b/time/zic.c
index a354a1ece3..f75834c6c3 100644
--- a/time/zic.c
+++ b/time/zic.c
@@ -1,6 +1,6 @@
#ifndef lint
#ifndef NOID
-static char elsieid[] = "@(#)zic.c 7.78";
+static char elsieid[] = "@(#)zic.c 7.79";
#endif /* !defined NOID */
#endif /* !defined lint */
@@ -359,6 +359,7 @@ char * const ptr;
{
if (ptr == NULL) {
const char *e = strerror(errno);
+
(void) fprintf(stderr, _("%s: Memory exhausted: %s\n"),
progname, e);
(void) exit(EXIT_FAILURE);
@@ -608,6 +609,7 @@ const char * const tofile;
(void) exit(EXIT_FAILURE);
if (link(fromname, toname) != 0) {
const char *e = strerror(errno);
+
(void) fprintf(stderr,
_("%s: Can't link from %s to %s: %s\n"),
progname, fromname, toname, e);
@@ -780,6 +782,7 @@ const char * name;
fp = stdin;
} else if ((fp = fopen(name, "r")) == NULL) {
const char *e = strerror(errno);
+
(void) fprintf(stderr, _("%s: Can't open %s: %s\n"),
progname, name, e);
(void) exit(EXIT_FAILURE);
@@ -848,6 +851,7 @@ _("%s: panic: Invalid l_value %d\n"),
}
if (fp != stdin && fclose(fp)) {
const char *e = strerror(errno);
+
(void) fprintf(stderr, _("%s: Error closing %s: %s\n"),
progname, filename, e);
(void) exit(EXIT_FAILURE);
@@ -1422,11 +1426,22 @@ const char * const name;
fullname = erealloc(fullname,
(int) (strlen(directory) + 1 + strlen(name) + 1));
(void) sprintf(fullname, "%s/%s", directory, name);
+ /*
+ ** Remove old file, if any, to snap links.
+ */
+ if (!itsdir(fullname) && remove(fullname) != 0 && errno != ENOENT) {
+ const char *e = strerror(errno);
+
+ (void) fprintf(stderr, _("%s: Can't remove %s: %s\n"),
+ progname, fullname, e);
+ (void) exit(EXIT_FAILURE);
+ }
if ((fp = fopen(fullname, "wb")) == NULL) {
if (mkdirs(fullname) != 0)
(void) exit(EXIT_FAILURE);
if ((fp = fopen(fullname, "wb")) == NULL) {
const char *e = strerror(errno);
+
(void) fprintf(stderr, _("%s: Can't create %s: %s\n"),
progname, fullname, e);
(void) exit(EXIT_FAILURE);
@@ -2114,6 +2129,7 @@ char * const argname;
*/
if (mkdir(name, 0755) != 0) {
const char *e = strerror(errno);
+
(void) fprintf(stderr,
_("%s: Can't create directory %s: %s\n"),
progname, name, e);
diff --git a/values.h b/values.h
index 1904223848..14f13ea89d 100644
--- a/values.h
+++ b/values.h
@@ -1,4 +1,4 @@
-/* Old compatiblity names for <limits.h> and <float.h> constants.
+/* Old compatibility names for <limits.h> and <float.h> constants.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 4d6d8ffbbe..689428bacf 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -92,9 +92,9 @@ extern size_t wcsxfrm __P ((wchar_t *__s1, __const wchar_t *__s2, size_t __n));
/* Duplicate S, returning an identical malloc'd string. */
extern wchar_t *wcsdup __P ((__const wchar_t *__s));
-/* Find the first occurence of WC in WCS. */
+/* Find the first occurrence of WC in WCS. */
extern wchar_t *wcschr __P ((__const wchar_t *__wcs, wchar_t __wc));
-/* Find the last occurence of WC in WCS. */
+/* Find the last occurrence of WC in WCS. */
extern wchar_t *wcsrchr __P ((__const wchar_t *__wcs, wchar_t __wc));
/* Return the length of the initial segmet of WCS which
@@ -104,10 +104,10 @@ extern size_t wcscspn __P ((__const wchar_t *__wcs,
/* Return the length of the initial segmet of WCS which
consists entirely of wide-characters in ACCEPT. */
extern size_t wcsspn __P ((__const wchar_t *__wcs, __const wchar_t *__accept));
-/* Find the first occurence in WCS of any character in ACCEPT. */
+/* Find the first occurrence in WCS of any character in ACCEPT. */
extern wchar_t *wcspbrk __P ((__const wchar_t *__wcs,
__const wchar_t *__accept));
-/* Find the first occurence of NEEDLE in HAYSTACK. */
+/* Find the first occurrence of NEEDLE in HAYSTACK. */
extern wchar_t *wcsstr __P ((__const wchar_t *__haystack,
__const wchar_t *__needle));
/* Divide WCS into tokens separated by characters in DELIM. */
diff --git a/wcsmbs/wcschr.c b/wcsmbs/wcschr.c
index 64af0bf456..7f5c7dcba2 100644
--- a/wcsmbs/wcschr.c
+++ b/wcsmbs/wcschr.c
@@ -1,25 +1,25 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <wchar.h>
-/* Find the first ocurrence of WC in WCS. */
+/* Find the first occurrence of WC in WCS. */
wchar_t *
wcschr (wcs, wc)
register const wchar_t *wcs;
diff --git a/wcsmbs/wcsncmp.c b/wcsmbs/wcsncmp.c
index fb554cbfb5..9b31772569 100644
--- a/wcsmbs/wcsncmp.c
+++ b/wcsmbs/wcsncmp.c
@@ -1,28 +1,28 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <wchar.h>
/* Compare no more than N characters of S1 and S2,
returning less than, equal to or greater than zero
- if S1 is lexiographically less than, equal to or
+ if S1 is lexicographically less than, equal to or
greater than S2. */
int
wcsncmp (s1, s2, n)
diff --git a/wcsmbs/wcspbrk.c b/wcsmbs/wcspbrk.c
index 91c5573722..85794ef31a 100644
--- a/wcsmbs/wcspbrk.c
+++ b/wcsmbs/wcspbrk.c
@@ -1,26 +1,26 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <wchar.h>
-/* Find the first ocurrence in WCS of any wide-character in ACCEPT. */
+/* Find the first occurrence in WCS of any wide-character in ACCEPT. */
wchar_t *
wcspbrk (wcs, accept)
register const wchar_t *wcs;
diff --git a/wcsmbs/wcsrchr.c b/wcsmbs/wcsrchr.c
index ae31dc4104..9f032c7624 100644
--- a/wcsmbs/wcsrchr.c
+++ b/wcsmbs/wcsrchr.c
@@ -1,26 +1,26 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <wchar.h>
-/* Find the last ocurrence of WC in WCS. */
+/* Find the last occurrence of WC in WCS. */
wchar_t *
wcsrchr (wcs, wc)
register const wchar_t *wcs;