]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update to 2.1.x development version cvs/libc-970215 cvs/libc-970216 cvs/libc-970217 cvs/libc-970218
authorUlrich Drepper <drepper@redhat.com>
Sat, 15 Feb 1997 04:31:36 +0000 (04:31 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 15 Feb 1997 04:31:36 +0000 (04:31 +0000)
1997-02-15 02:41  Miles Bader  <miles@gnu.ai.mit.edu>

* argp/argp-help.c: Gettextize sources.
* argp/argp-parse.c: Likewise.

1997-02-13 22:32  Ulrich Drepper  <drepper@cygnus.com>

* features.h (__GLIBC_MINOR__): Bump to 1.

* xlocale.h: New file.  Wrapper around locale/xlocale.h.
* Makefile (distribute): Add xlocale.h.
* locale/Makefile (routines): Add ctype_l.
* locale/ctype-extn.c: Update copyright. De-ANSI-declfy.
Add __isblank_l, __toascii_l and __isascii_l.
* ctype/ctype.h: Add definitions and declarations for *_l functions.
* locale/Makefile (headers): Add xlocale.h.
(routines): Add newlocale, duplocale, and freelocale.
* locale/localeinfo.h (MAX_USAGE_COUNT): New macro.
(struct locale_data): Add new fields mmaped and usage_count.
Correct various declarations.
* locale/C-collate.c: Define value for new fields mmaped and
usage_count.
* locale/C-ctype.c: Likewise.
* locale/C-messages.c: Likewise.
* locale/C-monetary.c: Likewise.
* locale/C-numeric.c: Likewise.
* locale/C-time.c: Likewise.
* locale/loadlocale.c (_nl_load_locale): Initialize mmaped and
usage_count fields.
* locale/locale.h: Don't define locale_t here (moved to xlocale.h).
Correct prototypes for __newlocale and __freelocale.
Add prototype for __duplocale.
* locale/findlocale.c (copy): Remove function.  Use __strdup instead.
(_nl_remove_locale): New function.
* locale/nl_langinfo.c: Don't declare locale_data objects as const.
* locale/setlocale.c: Likewise.
* locale/weight.h: Change for use with locale objects.
* locale/xlocale.h: New file.  Define __locale_t type.
* locale/newlocale.c: New file.  Create new locale object.
* locale/freelocale.c: New file.  Destroy locale object.
* locale/duplocale.c: New file.  Create copy of locale object.
* stdlib/Makefile (routines): Add strfmon_l.
* stdlib/monetary.h [__USE_GNU]: Declare __strfmon_l.
* stdlib/strfmon.c: Add support for use in extended locale model.
* stdlib/strfmon_l.c: New file.
* string/Makefile (routines): Add strcoll_l and strxfrm_l.
* string/strcoll.c: Change for use in extended locale model.
* string/strxfrm.c: Likewise.
* string/strcoll_l.c: New file.  Implement __strcoll_l function.
* string/strxfrm_l.c: New file.  Implement __strxfrm_l function.
* wcsmbs/Makefile (routines): Add wcscoll_l and wcsxfrm_l.
* wcsmbs/wchar.h [__USE_GNU]: Declare wcscoll_l and wcsxfrm_l.
* wcsmbs/wcscoll.c: Change for use in extended locale model.
* wcsmbs/wcscoll_l.c: New file.  Implement __wcscoll_l function.
* wcsmbs/wcsxfrm_l.c: New file.  Implement __wcsxfrm_l function.
* wctype/Makefile (routines): Add wcextra, wcfuncs_l, iswctype_l,
and towctrans_l.
* wctype/cname-lookup.h: Prepare for use in extended locale model.
* wctype/iswctype_l.c: New file.  Implement character classification
functions for use with locale objects.
* wctype/wctype.h: Declare functions for use with locale objects.
* wctype/towctrans_l.c: New file.  Implement __towctrans_l function
for use with locale objects.
* wctype/wcfuncs_l.c: New file.  Implement wide character
classification functions for use with locale objects.
* wctype/wcextra.c: New file.  Implement real functions for
non-standard classification functions.

* elf/ldd.bash.in: Don't use --data-relocs and --function-relocs
parameters to ld.so.  Use environment variables.
* elf/ldd.sh.in: Likewise.
* elf/rtld.c: Remove handling of --data-relocs and --function-relocs
options.  Instead read environment variables.

* elf/link.h (receiver_fct): Add new argument to take error code.
* elf/dl-error.c (_dl_signal_error): Call receiver function with
another argument.

* elf/dl-object.c (_dl_new_object): Create new object with list of
names in l_libname member.
* elf/dl-load.c (_dl_map_object_from_fd): Add name which was used to
find to object to the list in the link_map variable.
(_dl_map_object): Use _dl_does_name_match_p to compare with all
available names of the object.
Optimize handling of LD_LIBRARY_PATH a bit.
* elf/rtld.c: Initialize l_libname member of _dl_rtld_map.

* elf/dl-lookup.c (_dl_elf_hash): Optimize function.

* elf/Makefile (routines): Add dl-version.
* elf/link.h (hash_name_pair): New type.  Group pointer to string
and its hash value.
(struct link_map): Change l_libname member to be a list of names,
not a single pointer to a name.
Add new members l_nversions and l_versions.
(_dl_does_name_match_p): New function to test for all names of an
object.
Add prototypes for new lookup and versioning functions.
* elf/dl-lookup.c (do_lookup): Add new argument and handle case
when versioned symbol is requested.
(_dl_lookup_symbol): Call do_lookup with another argument.
(_dl_lookup_symbol_skip): Likewise.
(_dl_lookup_versioned_symbol): New function.  Handle lookup of
versioned symbol.
(_dl_lookup_versioned_symbol_skip): Likewise, similar to
_dl_lookup_symbol_skip.
* elf/dl-reloc.c (RESOLVE): Call _dl_lookup_versioned_symbol or
_dl_lookup_symbol depending on availability of version information.
* elf/dl-runtime.c (RESOLVE): Likewise.
(fixup): Call elf_machine_relplt with additional argument to point
to versioning information if available.
* elf/do-rel.h (elf_dynamic_do_rel): Likewise.
* elf/dl-open.c (_dl_open): Call _dl_check_map_versions to check
for correct versions.
* elf/dl-version.c: New file.  Check library versions and extract
version information for easier access.
* elf/dlfcn.h [__USE_GNU]: Add prototype for dlvsym.
* elf/dlvsym.c: New file.  Implementation of function similar to
dlsym, but looks for versioned symbol.
* elf/elf.h: Add types and macros for versioning.
* elf/rtld.c (dl_main): Check availability of needed versions.
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Add additional
argument for version information.  Call RESOLVE with additional
argument.
* sysdeps/i386/dl-machine.h: Likewise.
* sysdeps/m68k/dl-machine.h: Likewise.
* sysdeps/mips/dl-machine.h: Likewise.

* elf/dlerror.c: Change comment to align with guidelines.
* elf/dlopen.c: Likewise.
* elf/dlsym.c: Likewise.

* locale/programs/localedef.c: Implement --quiet option.
* locale/programs/charset.h: Declare be_quiet variable.
* locale/programs/locfile.h: Likewise.
* locale/programs/charmap.c: Don't print warnings if quiet option
was given.
* locale/programs/ld-collate.c: Likewise.
* locale/programs/ld-ctype.c: Likewise.
* locale/programs/ld-messages.c: Likewise.
* locale/programs/ld-monetary.c: Likewise.
* locale/programs/ld-numeric.c: Likewise.
* locale/programs/ld-time.c: Likewise.
* locale/programs/locfile.c: Likewise.

* Makefile (subdirs): Add argp.

* catgets/catgets.c (catopen): Little code improvement.

* posix/execl.c: Remove restriction to 1024 arguments.
* posix/execle.c: Likewise.
* posix/execlp.c: Likewise.

* posix/getopt.c [_LIBC]: Define global objects with __ prefix
and make regular names weak aliases.
* posix/getopt1.c: Likewise.
* posix/getopt.h [_LIBC]: Provide prototypes and declarations for
__ protected forms.

* posix/unistd.h: Add prototype for __sleep.
* sysdeps/mach/sleep.c: Make sleep weak alias of __sleep.
* sysdeps/posix/sleep.c: Likewise.
* sysdeps/stub/sleep.c: Likewise.
* sysdeps/unix/sysv/linux/sleep.c: Likewise.

* ctype/ctype-info.c: Update copyright.
* ctype/ctype.c: Likewise.
* ctype/test_ctype.c: Likewise.
* dirent/alphasort.c: Likewise.
* dirent/list.c: Likewise.
* gmon/bb_exit_func.c: Likewise.
* grp/fgetgrent.c: Likewise.
* grp/getgrent.c: Likewise.
* grp/getgrent_r.c: Likewise.
* grp/getgrgid.c: Likewise.
* grp/getgrgid_r.c: Likewise.
* grp/getgrnam.c: Likewise.
* grp/getgrnam_r.c: Likewise.
* hurd/alloc-fd.c: Likewise.
* hurd/catch-exc.c: Likewise.
* hurd/ctty-input.c: Likewise.
* hurd/ctty-output.c: Likewise.
* hurd/dtable.c: Likewise.
* hurd/fchroot.c: Likewise.
* hurd/fd-close.c: Likewise.
* hurd/fd-read.c: Likewise.
* hurd/fd-write.c: Likewise.
* hurd/fopenport.c: Likewise.
* hurd/get-host.c: Likewise.
* hurd/getdport.c: Likewise.
* hurd/getuids.c: Likewise.
* hurd/getumask.c: Likewise.
* hurd/hurd-raise.c: Likewise.
* hurd/hurd.h: Likewise.
* hurd/hurdauth.c: Likewise.
* hurd/hurdexec.c: Likewise.
* hurd/hurdhost.h: Likewise.
* hurd/hurdid.c: Likewise.
* hurd/hurdinit.c: Likewise.
* hurd/hurdioctl.c: Likewise.
* hurd/hurdkill.c: Likewise.
* hurd/hurdlookup.c: Likewise.
* hurd/hurdmsg.c: Likewise.
* hurd/hurdpid.c: Likewise.
* hurd/hurdports.c: Likewise.
* hurd/hurdprio.c: Likewise.
* hurd/hurdrlimit.c: Likewise.
* hurd/hurdsock.c: Likewise.
* hurd/hurdstartup.c: Likewise.
* hurd/hurdstartup.h: Likewise.
* hurd/intern-fd.c: Likewise.
* hurd/intr-msg.c: Likewise.
* hurd/intr-rpc.defs: Likewise.
* hurd/intr-rpc.h: Likewise.
* hurd/msgportdemux.c: Likewise.
* hurd/new-fd.c: Likewise.
* hurd/openport.c: Likewise.
* hurd/pid2task.c: Likewise.
* hurd/port-cleanup.c: Likewise.
* hurd/port2fd.c: Likewise.
* hurd/ports-get.c: Likewise.
* hurd/ports-set.c: Likewise.
* hurd/privports.c: Likewise.
* hurd/report-wait.c: Likewise.
* hurd/set-host.c: Likewise.
* hurd/setauth.c: Likewise.
* hurd/setuids.c: Likewise.
* hurd/siginfo.c: Likewise.
* hurd/sigunwind.c: Likewise.
* hurd/task2pid.c: Likewise.
* hurd/thread-cancel.c: Likewise.
* hurd/thread-self.c: Likewise.
* hurd/vpprintf.c: Likewise.
* hurd/hurd/fd.h: Likewise.
* hurd/hurd/id.h: Likewise.
* hurd/hurd/ioctl.h: Likewise.
* hurd/hurd/lookup.h: Likewise.
* hurd/hurd/port.h: Likewise.
* hurd/hurd/resource.h: Likewise.
* hurd/hurd/threadvar.h: Likewise.
* hurd/hurd/userlink.h: Likewise.
* inet/ether_aton.c: Likewise.
* inet/ether_aton_r.c: Likewise.
* inet/ether_ntoa.c: Likewise.
* inet/ether_ntoa_r.c: Likewise.
* inet/gethstbyad.c: Likewise.
* inet/gethstbyad_r.c: Likewise.
* inet/gethstent.c: Likewise.
* inet/getnetbyad.c: Likewise.
* inet/getnetbyad_r.c: Likewise.
* inet/getnetbynm.c: Likewise.
* inet/getnetbynm_r.c: Likewise.
* inet/getnetent.c: Likewise.
* inet/getnetent_r.c: Likewise.
* inet/getproto.c: Likewise.
* inet/getproto_r.c: Likewise.
* inet/getprtent.c: Likewise.
* inet/getprtent_r.c: Likewise.
* inet/getprtname.c: Likewise.
* inet/getrpcbyname.c: Likewise.
* inet/getrpcbyname_r.c: Likewise.
* inet/getrpcbynumber.c: Likewise.
* inet/getrpcbynumber_r.c: Likewise.
* inet/getrpcent.c: Likewise.
* inet/getrpcent_r.c: Likewise.
* inet/getservent.c: Likewise.
* inet/getservent_r.c: Likewise.
* inet/getsrvbynm.c: Likewise.
* inet/getsrvbynm_r.c: Likewise.
* inet/getsrvbypt.c: Likewise.
* inet/getsrvbypt_r.c: Likewise.
* inet/herrno.c: Likewise.
* inet/netgroup.h: Likewise.
* ient/netinet/ether.h: Likewise.
* intl/bindtextdom.c: Likewise.
* intl/dcgettext.c: Likewise.
* intl/dgettext.c: Likewise.
* intl/gettext.c: Likewise.
* intl/gettext.h: Likewise.
* intl/gettextP.h: Likewise.
* intl/hash-string.h: Likewise.
* intl/loadmsgcat.c: Likewise.
* intl/localealias.c: Likewise.
* intl/textdomain.c: Likewise.
* io/creat.c: Likewise.
* io/getdirname.c: Likewise.
* io/lockf.c: Likewise.
* io/pwd.c: Likewise.
* io/test-utime.c: Likewise.
* locale/categories.def: Likewise.
* locale/codeset_name.c: Likewise.
* locale/lc-collate.c: Likewise.
* locale/lc-ctype.c: Likewise.
* locale/lc-messages.c: Likewise.
* locale/lc-monetary.c: Likewise.
* locale/lc-numeric.c: Likewise.
* locale/lc-time.c: Likewise.
* locale/loadlocale.c: Likewise.
* locale/localeconv.c: Likewise.
* locale/nl_langinfo.c: Likewise.
* locale/setlocale.c: Likewise.
* locale/strlen-hash.h: Likewise.
* locale/programs/charmap-kw.gperf: Likewise.
* locale/programs/charmap-kw.h: Likewise.
* locale/programs/charset.c: Likewise.
* locale/programs/ld-ctype.c: Likewise.
* locale/programs/ld-messages.c: Likewise.
* locale/programs/ld-monetary.c: Likewise.
* locale/programs/linereader.h: Likewise.
* locale/programs/locale-spec.c: Likewise.
* locale/programs/locales.h: Likewise.
* locale/programs/locfile-kw.gperf: Likewise.
* locale/programs/locfile-kw.h: Likewise.
* locale/programs/locfile-token.h: Likewise.
* locale/programs/simple-hash.h: Likewise.
* locale/programs/stringtrans.c: Likewise.
* locale/programs/stringtrans.h: Likewise.
* login/logout.c: Likewise.
* mach/bootprivport.c: Likewise.
* mach/devstream.c: Likewise.
* mach/hello.c: Likewise.
* mach/mach.h: Likewise.
* mach/mach_init.c: Likewise.
* mach/mach_init.h: Likewise.
* mach/mig-alloc.c: Likewise.
* mach/mig-dealloc.c: Likewise.
* mach/mutex-init.c: Likewise.
* mach/mutex-solid.c: Likewise.
* mach/setup-thread.c: Likewise.
* mach/spin-lock.h: Likewise.
* mach/spin-solid.c: Likewise.
* mach/mach/mig_support.h: Likewise.
* md5-crypt/md5-crypt.c: Likewise.
* misc/nlist.h: Likewise.
* nss/nss_files/files-ether.c: Likewise.
* posix/confstr.c: Likewise.
* posix/execl.c: Likewise.
* posix/execle.c: Likewise.
* posix/execlp.c: Likewise.
* posix/execv.c: Likewise.
* posix/execvp.c: Likewise.
* posix/fnmatch.c: Likewise.
* posix/getopt.c: Likewise.
* posix/getopt.h: Likewise.
* posix/getopt1.c: Likewise.
* posix/id.c: Likewise.
* posix/regex.c: Likewise.
* posix/setpgrp.c: Likewise.
* posix/unistd.h: Likewise.
* posix/wordexp.c: Likewise.
* pwd/fgetpwent.c: Likewise.
* pwd/getpwent.c: Likewise.
* pwd/getpwent_r.c: Likewise.
* pwd/getpwnam.c: Likewise.
* pwd/getpwnam_r.c: Likewise.
* pwd/getpwuid.c: Likewise.
* pwd/getpwuid_r.c: Likewise.
* pwd/putpwent.c: Likewise.
* resolv/gethnamaddr.c: Likewise.
* resolv/res_hconf.c: Likewise.
* resolv/res_hconf.h: Likewise.
* setjmp/longjmp.c: Likewise.
* setjmp/sigjmp.c: Likewise.
* setjmp/tst-setjmp.c: Likewise.
* stdio/clearerr.c: Likewise.
* stdio/ferror.c: Likewise.
* stdio/fgetc.c: Likewise.
* stdio/fgetpos.c: Likewise.
* stdio/fgets.c: Likewise.
* stdio/fileno.c: Likewise.
* stdio/fmemopen.c: Likewise.
* stdio/fopen.c: Likewise.
* stdio/fopncook.c: Likewise.
* stdio/fputc.c: Likewise.
* stdio/fputs.c: Likewise.
* stdio/fread.c: Likewise.
* stdio/freopen.c: Likewise.
* stdio/fseek.c: Likewise.
* stdio/fsetpos.c: Likewise.
* stdio/ftell.c: Likewise.
* stdio/fwrite.c: Likewise.
* stdio/getchar.c: Likewise.
* stdio/getdelim.c: Likewise.
* stdio/gets.c: Likewise.
* stdio/glue.c: Likewise.
* stdio/internals.c: Likewise.
* stdio/linewrap.c: Likewise.
* stdio/linewrap.h: Likewise.
* stdio/memstream.c: Likewise.
* stdio/newstream.c: Likewise.
* stdio/putchar.c: Likewise.
* stdio/puts.c: Likewise.
* stdio/rewind.c: Likewise.
* stdio/setbuf.c: Likewise.
* stdio/setbuffer.c: Likewise.
* stdio/setlinebuf.c: Likewise.
* stdio/setvbuf.c: Likewise.
* stdio/ungetc.c: Likewise.
* stdio/vasprintf.c: Likewise.
* stdio/vscanf.c: Likewise.
* stdio/vsnprintf.c: Likewise.
* stdio/vsprintf.c: Likewise.
* stdio/vsscanf.c: Likewise.
* stdio-common/asprintf.c: Likewise.
* stdio-common/dprintf.c: Likewise.
* stdio-common/errnobug.c: Likewise.
* stdio-common/fprintf.c: Likewise.
* stdio-common/getline.c: Likewise.
* stdio-common/getw.c: Likewise.
* stdio-common/perror.c: Likewise.
* stdio-common/psignal.c: Likewise.
* stdio-common/putw.c: Likewise.
* stdio-common/reg-printf.c: Likewise.
* stdio-common/scanf.c: Likewise.
* stdio-common/snprintf.c: Likewise.
* stdio-common/sprintf.c: Likewise.
* stdio-common/tempnam.c: Likewise.
* stdio-common/test_rdwr.c: Likewise.
* stdio-common/tst-fileno.c: Likewise.
* stdio-common/tst-printf.c: Likewise.
* stdio-common/tstgetln.c: Likewise.
* stdio-common/vprintf.c: Likewise.
* stdlib/drand48.c: Likewise.
* stdlib/drand48_r.c: Likewise.
* stdlib/erand48.c: Likewise.
* stdlib/erand48_r.c: Likewise.
* stdlib/exit.h: Likewise.
* stdlib/strtoq.c: Likewise.
* stdlib/strtoul.c: Likewise.
* stdlib/strtouq.c: Likewise.
* stdlib/test-canon.c: Likewise.
* stdlib/testdiv.c: Likewise.
* stdlib/testrand.c: Likewise.
* string/argz-append.c: Likewise.
* string/argz-count.c: Likewise.
* string/argz-create.c: Likewise.
* string/argz-ctsep.c: Likewise.
* string/argz-delete.c: Likewise.
* string/argz-extract.c: Likewise.
* string/argz-insert.c: Likewise.
* string/argz-next.c: Likewise.
* string/argz-stringify.c: Likewise.
* string/basename.c: Likewise.
* string/envz.c: Likewise.
* string/memfrob.c: Likewise.
* string/strcoll.c: Likewise.
* string/strdup.c: Likewise.
* string/string.h: Likewise.
* string/strndup.c: Likewise.
* string/strnlen.c: Likewise.
* string/strsignal.c: Likewise.
* string/strxfrm.c: Likewise.
* string/test-ffs.c: Likewise.
* string/testcopy.c: Likewise.
* sysdeps/generic/enbl-secure.c: Likewise.
* sysdeps/generic/memcopy.h: Likewise.
* sysdeps/generic/stpncpy.c: Likewise.
* sysdeps/generic/strcasecmp.c: Likewise.
* sysdeps/generic/strcat.c: Likewise.
* sysdeps/generic/strchr.c: Likewise.
* sysdeps/generic/strcpy.c: Likewise.
* sysdeps/generic/strcspn.c: Likewise.
* sysdeps/generic/strlen.c: Likewise.
* sysdeps/generic/strncase.c: Likewise.
* sysdeps/generic/strncat.c: Likewise.
* sysdeps/generic/strncpy.c: Likewise.
* sysdeps/generic/strpbrk.c: Likewise.
* sysdeps/generic/strsep.c: Likewise.
* sysdeps/generic/strspn.c: Likewise.
* sysdeps/generic/strstr.c: Likewise.
* sysdeps/generic/strtok.c: Likewise.
* sysdeps/generic/strtok_r.c: Likewise.
* sysdeps/mach/sleep.c: Likewise.
* sysdeps/posix/sleep.c: Likewise.
* sysdeps/stub/sleep.c: Likewise.
* time/date.c: Likewise.
* time/test_time.c: Likewise.
* wcsmbs/wmemcpy.c: Likewise.
* wctye/test_wctype.c: Likewise.
* wctye/towctrans.c: Likewise.
* wctye/wcfuncs.c: Likewise.
* wctye/wctrans.c: Likewise.

1997-02-13 22:15  Miles Bader  <miles@gnu.ai.mit.edu>

* argp/Makefile: New file.
* argp/argp.h: Likewise.
* argp/argp-ba.c: Likewise.
* argp/argp-fmtstream.c: Likewise.
* argp/argp-fmtstream.h: Likewise.
* argp/argp-fs-xinl.c: Likewise.
* argp/argp-help.c: Likewise.
* argp/argp-namefrob.h: Likewise.
* argp/argp-parse.c: Likewise.
* argp/argp-pv.c: Likewise.
* argp/argp-pvh.c: Likewise.
* argp/argp-test.c: Likewise.
* argp/argp-xinl.c: Likewise.

* libio/_G_config.h: Make sure wint_t is also defined for old gcc
1997-02-09 04:35  Ulrich Drepper  <drepper@cygnus.com>

* stdio-common/_itoa.h: Update copyright.

408 files changed:
ChangeLog
Makefile
NEWS
argp/Makefile [new file with mode: 0644]
argp/argp-ba.c [new file with mode: 0644]
argp/argp-fmtstream.c [new file with mode: 0644]
argp/argp-fmtstream.h [new file with mode: 0644]
argp/argp-fs-xinl.c [new file with mode: 0644]
argp/argp-help.c [new file with mode: 0644]
argp/argp-namefrob.h [new file with mode: 0644]
argp/argp-parse.c [new file with mode: 0644]
argp/argp-pv.c [new file with mode: 0644]
argp/argp-pvh.c [new file with mode: 0644]
argp/argp-test.c [new file with mode: 0644]
argp/argp-xinl.c [new file with mode: 0644]
argp/argp.h [new file with mode: 0644]
catgets/catgets.c
ctype/Makefile
ctype/ctype-extn.c
ctype/ctype-info.c
ctype/ctype.c
ctype/ctype.h
ctype/ctype_l.c [new file with mode: 0644]
ctype/test_ctype.c
dirent/alphasort.c
dirent/list.c
elf/Makefile
elf/dl-error.c
elf/dl-load.c
elf/dl-lookup.c
elf/dl-object.c
elf/dl-open.c
elf/dl-reloc.c
elf/dl-runtime.c
elf/dl-version.c [new file with mode: 0644]
elf/dlerror.c
elf/dlfcn.h
elf/dlopen.c
elf/dlsym.c
elf/dlvsym.c [new file with mode: 0644]
elf/do-rel.h
elf/elf.h
elf/ldd.bash.in
elf/ldd.sh.in
elf/link.h
elf/rtld.c
features.h
gmon/bb_exit_func.c
grp/fgetgrent.c
grp/getgrent.c
grp/getgrent_r.c
grp/getgrgid.c
grp/getgrgid_r.c
grp/getgrnam.c
grp/getgrnam_r.c
hurd/alloc-fd.c
hurd/catch-exc.c
hurd/ctty-input.c
hurd/ctty-output.c
hurd/dtable.c
hurd/fchroot.c
hurd/fd-close.c
hurd/fd-read.c
hurd/fd-write.c
hurd/fopenport.c
hurd/get-host.c
hurd/getdport.c
hurd/getuids.c
hurd/getumask.c
hurd/hurd-raise.c
hurd/hurd.h
hurd/hurd/fd.h
hurd/hurd/id.h
hurd/hurd/ioctl.h
hurd/hurd/lookup.h
hurd/hurd/port.h
hurd/hurd/resource.h
hurd/hurd/threadvar.h
hurd/hurd/userlink.h
hurd/hurdauth.c
hurd/hurdexec.c
hurd/hurdhost.h
hurd/hurdid.c
hurd/hurdinit.c
hurd/hurdioctl.c
hurd/hurdkill.c
hurd/hurdlookup.c
hurd/hurdmsg.c
hurd/hurdpid.c
hurd/hurdports.c
hurd/hurdprio.c
hurd/hurdrlimit.c
hurd/hurdsock.c
hurd/hurdstartup.c
hurd/hurdstartup.h
hurd/intern-fd.c
hurd/intr-msg.c
hurd/intr-rpc.defs
hurd/intr-rpc.h
hurd/msgportdemux.c
hurd/new-fd.c
hurd/openport.c
hurd/pid2task.c
hurd/port-cleanup.c
hurd/port2fd.c
hurd/ports-get.c
hurd/ports-set.c
hurd/privports.c
hurd/report-wait.c
hurd/set-host.c
hurd/setauth.c
hurd/setuids.c
hurd/siginfo.c
hurd/sigunwind.c
hurd/task2pid.c
hurd/thread-cancel.c
hurd/thread-self.c
hurd/vpprintf.c
inet/ether_aton.c
inet/ether_aton_r.c
inet/ether_ntoa.c
inet/ether_ntoa_r.c
inet/gethstbyad.c
inet/gethstbyad_r.c
inet/gethstent.c
inet/getnetbyad.c
inet/getnetbyad_r.c
inet/getnetbynm.c
inet/getnetbynm_r.c
inet/getnetent.c
inet/getnetent_r.c
inet/getproto.c
inet/getproto_r.c
inet/getprtent.c
inet/getprtent_r.c
inet/getprtname.c
inet/getrpcbyname.c
inet/getrpcbyname_r.c
inet/getrpcbynumber.c
inet/getrpcbynumber_r.c
inet/getrpcent.c
inet/getrpcent_r.c
inet/getservent.c
inet/getservent_r.c
inet/getsrvbynm.c
inet/getsrvbynm_r.c
inet/getsrvbypt.c
inet/getsrvbypt_r.c
inet/herrno.c
inet/netgroup.h
inet/netinet/ether.h
intl/bindtextdom.c
intl/dcgettext.c
intl/dgettext.c
intl/gettext.c
intl/gettext.h
intl/gettextP.h
intl/hash-string.h
intl/loadmsgcat.c
intl/localealias.c
intl/textdomain.c
io/creat.c
io/getdirname.c
io/lockf.c
io/pwd.c
io/test-utime.c
locale/C-collate.c
locale/C-ctype.c
locale/C-messages.c
locale/C-monetary.c
locale/C-numeric.c
locale/C-time.c
locale/Makefile
locale/categories.def
locale/codeset_name.c
locale/duplocale.c [new file with mode: 0644]
locale/findlocale.c
locale/freelocale.c [new file with mode: 0644]
locale/lc-collate.c
locale/lc-ctype.c
locale/lc-messages.c
locale/lc-monetary.c
locale/lc-numeric.c
locale/lc-time.c
locale/loadlocale.c
locale/locale.h
locale/localeconv.c
locale/localeinfo.h
locale/newlocale.c [new file with mode: 0644]
locale/nl_langinfo.c
locale/programs/charmap-kw.gperf
locale/programs/charmap-kw.h
locale/programs/charmap.c
locale/programs/charset.c
locale/programs/charset.h
locale/programs/ld-collate.c
locale/programs/ld-ctype.c
locale/programs/ld-messages.c
locale/programs/ld-monetary.c
locale/programs/ld-numeric.c
locale/programs/ld-time.c
locale/programs/linereader.h
locale/programs/locale-spec.c
locale/programs/localedef.c
locale/programs/locales.h
locale/programs/locfile-kw.gperf
locale/programs/locfile-kw.h
locale/programs/locfile-token.h
locale/programs/locfile.c
locale/programs/locfile.h
locale/programs/simple-hash.h
locale/programs/stringtrans.c
locale/programs/stringtrans.h
locale/setlocale.c
locale/strlen-hash.h
locale/weight.h
locale/xlocale.h [new file with mode: 0644]
login/logout.c
mach/bootprivport.c
mach/devstream.c
mach/hello.c
mach/mach.h
mach/mach/mig_support.h
mach/mach_init.c
mach/mach_init.h
mach/mig-alloc.c
mach/mig-dealloc.c
mach/mutex-init.c
mach/mutex-solid.c
mach/setup-thread.c
mach/spin-lock.h
mach/spin-solid.c
md5-crypt/md5-crypt.c
misc/nlist.h
nss/nss_files/files-ethers.c
posix/confstr.c
posix/execl.c
posix/execle.c
posix/execlp.c
posix/execv.c
posix/execvp.c
posix/fnmatch.c
posix/id.c
posix/regex.c
posix/setpgrp.c
posix/unistd.h
posix/wordexp.c
pwd/fgetpwent.c
pwd/getpwent.c
pwd/getpwent_r.c
pwd/getpwnam.c
pwd/getpwnam_r.c
pwd/getpwuid.c
pwd/getpwuid_r.c
pwd/putpwent.c
rellns-sh
resolv/res_hconf.c
resolv/res_hconf.h
setjmp/longjmp.c
setjmp/sigjmp.c
setjmp/tst-setjmp.c
stdio-common/_itoa.h
stdio-common/asprintf.c
stdio-common/dprintf.c
stdio-common/errnobug.c
stdio-common/fprintf.c
stdio-common/getline.c
stdio-common/getw.c
stdio-common/perror.c
stdio-common/psignal.c
stdio-common/putw.c
stdio-common/reg-printf.c
stdio-common/scanf.c
stdio-common/snprintf.c
stdio-common/sprintf.c
stdio-common/tempnam.c
stdio-common/test_rdwr.c
stdio-common/tst-fileno.c
stdio-common/tst-printf.c
stdio-common/tstgetln.c
stdio-common/vprintf.c
stdio/clearerr.c
stdio/ferror.c
stdio/fgetc.c
stdio/fgetpos.c
stdio/fgets.c
stdio/fileno.c
stdio/fmemopen.c
stdio/fopen.c
stdio/fopncook.c
stdio/fputc.c
stdio/fputs.c
stdio/fread.c
stdio/freopen.c
stdio/fseek.c
stdio/fsetpos.c
stdio/ftell.c
stdio/fwrite.c
stdio/getchar.c
stdio/getdelim.c
stdio/gets.c
stdio/glue.c
stdio/internals.c
stdio/linewrap.c
stdio/linewrap.h
stdio/memstream.c
stdio/newstream.c
stdio/putchar.c
stdio/puts.c
stdio/rewind.c
stdio/setbuf.c
stdio/setbuffer.c
stdio/setlinebuf.c
stdio/setvbuf.c
stdio/ungetc.c
stdio/vasprintf.c
stdio/vscanf.c
stdio/vsnprintf.c
stdio/vsprintf.c
stdio/vsscanf.c
stdlib/Makefile
stdlib/drand48.c
stdlib/drand48_r.c
stdlib/erand48.c
stdlib/erand48_r.c
stdlib/exit.h
stdlib/monetary.h
stdlib/strfmon.c
stdlib/strfmon_l.c [new file with mode: 0644]
stdlib/strtoq.c
stdlib/strtoul.c
stdlib/strtouq.c
stdlib/test-canon.c
stdlib/testdiv.c
stdlib/testrand.c
string/Makefile
string/argz-append.c
string/argz-count.c
string/argz-create.c
string/argz-delete.c
string/argz-extract.c
string/argz-insert.c
string/argz-next.c
string/argz-stringify.c
string/basename.c
string/envz.c
string/memfrob.c
string/strcoll.c
string/strcoll_l.c [new file with mode: 0644]
string/strdup.c
string/string.h
string/strndup.c
string/strnlen.c
string/strsignal.c
string/strxfrm.c
string/strxfrm_l.c [new file with mode: 0644]
string/test-ffs.c
string/testcopy.c
sysdeps/alpha/dl-machine.h
sysdeps/generic/dl-cache.c
sysdeps/generic/enbl-secure.c
sysdeps/generic/memcopy.h
sysdeps/generic/stpncpy.c
sysdeps/generic/strcasecmp.c
sysdeps/generic/strcat.c
sysdeps/generic/strchr.c
sysdeps/generic/strcpy.c
sysdeps/generic/strcspn.c
sysdeps/generic/strlen.c
sysdeps/generic/strncase.c
sysdeps/generic/strncat.c
sysdeps/generic/strncpy.c
sysdeps/generic/strpbrk.c
sysdeps/generic/strsep.c
sysdeps/generic/strspn.c
sysdeps/generic/strstr.c
sysdeps/generic/strtok.c
sysdeps/generic/strtok_r.c
sysdeps/i386/dl-machine.h
sysdeps/m68k/dl-machine.h
sysdeps/mach/sleep.c
sysdeps/mips/dl-machine.h
sysdeps/posix/sleep.c
sysdeps/stub/sleep.c
sysdeps/unix/sysv/linux/sleep.c
time/date.c
time/test_time.c
version.h
wcsmbs/Makefile
wcsmbs/wchar.h
wcsmbs/wcscoll.c
wcsmbs/wcscoll_l.c [new file with mode: 0644]
wcsmbs/wcsxfrm.c
wcsmbs/wcsxfrm_l.c [new file with mode: 0644]
wcsmbs/wmemcpy.c
wctype/Makefile
wctype/cname-lookup.h
wctype/iswctype_l.c [new file with mode: 0644]
wctype/test_wctype.c
wctype/towctrans.c
wctype/towctrans_l.c [new file with mode: 0644]
wctype/wcextra.c [new file with mode: 0644]
wctype/wcfuncs.c
wctype/wcfuncs_l.c [new file with mode: 0644]
wctype/wctrans.c
wctype/wctype.c
wctype/wctype.h
xlocale.h [new file with mode: 0644]

index e2256fa466ab6ee7995f2a5e76606553b76a87ae..34bc623943f981aa856526de70508226df6b1d27 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,502 @@
+1997-02-15 02:41  Miles Bader  <miles@gnu.ai.mit.edu>
+
+       * argp/argp-help.c: Gettextize sources.
+       * argp/argp-parse.c: Likewise.
+
+1997-02-13 22:32  Ulrich Drepper  <drepper@cygnus.com>
+
+       * features.h (__GLIBC_MINOR__): Bump to 1.
+
+       * xlocale.h: New file.  Wrapper around locale/xlocale.h.
+       * Makefile (distribute): Add xlocale.h.
+       * locale/Makefile (routines): Add ctype_l.
+       * locale/ctype-extn.c: Update copyright. De-ANSI-declfy.
+       Add __isblank_l, __toascii_l and __isascii_l.
+       * ctype/ctype.h: Add definitions and declarations for *_l functions.
+       * locale/Makefile (headers): Add xlocale.h.
+       (routines): Add newlocale, duplocale, and freelocale.
+       * locale/localeinfo.h (MAX_USAGE_COUNT): New macro.
+       (struct locale_data): Add new fields mmaped and usage_count.
+       Correct various declarations.
+       * locale/C-collate.c: Define value for new fields mmaped and
+       usage_count.
+       * locale/C-ctype.c: Likewise.
+       * locale/C-messages.c: Likewise.
+       * locale/C-monetary.c: Likewise.
+       * locale/C-numeric.c: Likewise.
+       * locale/C-time.c: Likewise.
+       * locale/loadlocale.c (_nl_load_locale): Initialize mmaped and
+       usage_count fields.
+       * locale/locale.h: Don't define locale_t here (moved to xlocale.h).
+       Correct prototypes for __newlocale and __freelocale.
+       Add prototype for __duplocale.
+       * locale/findlocale.c (copy): Remove function.  Use __strdup instead.
+       (_nl_remove_locale): New function.
+       * locale/nl_langinfo.c: Don't declare locale_data objects as const.
+       * locale/setlocale.c: Likewise.
+       * locale/weight.h: Change for use with locale objects.
+       * locale/xlocale.h: New file.  Define __locale_t type.
+       * locale/newlocale.c: New file.  Create new locale object.
+       * locale/freelocale.c: New file.  Destroy locale object.
+       * locale/duplocale.c: New file.  Create copy of locale object.
+       * stdlib/Makefile (routines): Add strfmon_l.
+       * stdlib/monetary.h [__USE_GNU]: Declare __strfmon_l.
+       * stdlib/strfmon.c: Add support for use in extended locale model.
+       * stdlib/strfmon_l.c: New file.
+       * string/Makefile (routines): Add strcoll_l and strxfrm_l.
+       * string/strcoll.c: Change for use in extended locale model.
+       * string/strxfrm.c: Likewise.
+       * string/strcoll_l.c: New file.  Implement __strcoll_l function.
+       * string/strxfrm_l.c: New file.  Implement __strxfrm_l function.
+       * wcsmbs/Makefile (routines): Add wcscoll_l and wcsxfrm_l.
+       * wcsmbs/wchar.h [__USE_GNU]: Declare wcscoll_l and wcsxfrm_l.
+       * wcsmbs/wcscoll.c: Change for use in extended locale model.
+       * wcsmbs/wcscoll_l.c: New file.  Implement __wcscoll_l function.
+       * wcsmbs/wcsxfrm_l.c: New file.  Implement __wcsxfrm_l function.
+       * wctype/Makefile (routines): Add wcextra, wcfuncs_l, iswctype_l,
+       and towctrans_l.
+       * wctype/cname-lookup.h: Prepare for use in extended locale model.
+       * wctype/iswctype_l.c: New file.  Implement character classification
+       functions for use with locale objects.
+       * wctype/wctype.h: Declare functions for use with locale objects.
+       * wctype/towctrans_l.c: New file.  Implement __towctrans_l function
+       for use with locale objects.
+       * wctype/wcfuncs_l.c: New file.  Implement wide character
+       classification functions for use with locale objects.
+       * wctype/wcextra.c: New file.  Implement real functions for
+       non-standard classification functions.
+
+       * elf/ldd.bash.in: Don't use --data-relocs and --function-relocs
+       parameters to ld.so.  Use environment variables.
+       * elf/ldd.sh.in: Likewise.
+       * elf/rtld.c: Remove handling of --data-relocs and --function-relocs
+       options.  Instead read environment variables.
+
+       * elf/link.h (receiver_fct): Add new argument to take error code.
+       * elf/dl-error.c (_dl_signal_error): Call receiver function with
+       another argument.
+
+       * elf/dl-object.c (_dl_new_object): Create new object with list of
+       names in l_libname member.
+       * elf/dl-load.c (_dl_map_object_from_fd): Add name which was used to
+       find to object to the list in the link_map variable.
+       (_dl_map_object): Use _dl_does_name_match_p to compare with all
+       available names of the object.
+       Optimize handling of LD_LIBRARY_PATH a bit.
+       * elf/rtld.c: Initialize l_libname member of _dl_rtld_map.
+
+       * elf/dl-lookup.c (_dl_elf_hash): Optimize function.
+
+       * elf/Makefile (routines): Add dl-version.
+       * elf/link.h (hash_name_pair): New type.  Group pointer to string
+       and its hash value.
+       (struct link_map): Change l_libname member to be a list of names,
+       not a single pointer to a name.
+       Add new members l_nversions and l_versions.
+       (_dl_does_name_match_p): New function to test for all names of an
+       object.
+       Add prototypes for new lookup and versioning functions.
+       * elf/dl-lookup.c (do_lookup): Add new argument and handle case
+       when versioned symbol is requested.
+       (_dl_lookup_symbol): Call do_lookup with another argument.
+       (_dl_lookup_symbol_skip): Likewise.
+       (_dl_lookup_versioned_symbol): New function.  Handle lookup of
+       versioned symbol.
+       (_dl_lookup_versioned_symbol_skip): Likewise, similar to
+       _dl_lookup_symbol_skip.
+       * elf/dl-reloc.c (RESOLVE): Call _dl_lookup_versioned_symbol or
+       _dl_lookup_symbol depending on availability of version information.
+       * elf/dl-runtime.c (RESOLVE): Likewise.
+       (fixup): Call elf_machine_relplt with additional argument to point
+       to versioning information if available.
+       * elf/do-rel.h (elf_dynamic_do_rel): Likewise.
+       * elf/dl-open.c (_dl_open): Call _dl_check_map_versions to check
+       for correct versions.
+       * elf/dl-version.c: New file.  Check library versions and extract
+       version information for easier access.
+       * elf/dlfcn.h [__USE_GNU]: Add prototype for dlvsym.
+       * elf/dlvsym.c: New file.  Implementation of function similar to
+       dlsym, but looks for versioned symbol.
+       * elf/elf.h: Add types and macros for versioning.
+       * elf/rtld.c (dl_main): Check availability of needed versions.
+       * sysdeps/alpha/dl-machine.h (elf_machine_rela): Add additional
+       argument for version information.  Call RESOLVE with additional
+       argument.
+       * sysdeps/i386/dl-machine.h: Likewise.
+       * sysdeps/m68k/dl-machine.h: Likewise.
+       * sysdeps/mips/dl-machine.h: Likewise.
+
+       * elf/dlerror.c: Change comment to align with guidelines.
+       * elf/dlopen.c: Likewise.
+       * elf/dlsym.c: Likewise.
+
+       * locale/programs/localedef.c: Implement --quiet option.
+       * locale/programs/charset.h: Declare be_quiet variable.
+       * locale/programs/locfile.h: Likewise.
+       * locale/programs/charmap.c: Don't print warnings if quiet option
+       was given.
+       * locale/programs/ld-collate.c: Likewise.
+       * locale/programs/ld-ctype.c: Likewise.
+       * locale/programs/ld-messages.c: Likewise.
+       * locale/programs/ld-monetary.c: Likewise.
+       * locale/programs/ld-numeric.c: Likewise.
+       * locale/programs/ld-time.c: Likewise.
+       * locale/programs/locfile.c: Likewise.
+
+       * Makefile (subdirs): Add argp.
+
+       * catgets/catgets.c (catopen): Little code improvement.
+
+       * posix/execl.c: Remove restriction to 1024 arguments.
+       * posix/execle.c: Likewise.
+       * posix/execlp.c: Likewise.
+
+       * posix/getopt.c [_LIBC]: Define global objects with __ prefix
+       and make regular names weak aliases.
+       * posix/getopt1.c: Likewise.
+       * posix/getopt.h [_LIBC]: Provide prototypes and declarations for
+       __ protected forms.
+
+       * posix/unistd.h: Add prototype for __sleep.
+       * sysdeps/mach/sleep.c: Make sleep weak alias of __sleep.
+       * sysdeps/posix/sleep.c: Likewise.
+       * sysdeps/stub/sleep.c: Likewise.
+       * sysdeps/unix/sysv/linux/sleep.c: Likewise.
+
+       * ctype/ctype-info.c: Update copyright.
+       * ctype/ctype.c: Likewise.
+       * ctype/test_ctype.c: Likewise.
+       * dirent/alphasort.c: Likewise.
+       * dirent/list.c: Likewise.
+       * gmon/bb_exit_func.c: Likewise.
+       * grp/fgetgrent.c: Likewise.
+       * grp/getgrent.c: Likewise.
+       * grp/getgrent_r.c: Likewise.
+       * grp/getgrgid.c: Likewise.
+       * grp/getgrgid_r.c: Likewise.
+       * grp/getgrnam.c: Likewise.
+       * grp/getgrnam_r.c: Likewise.
+       * hurd/alloc-fd.c: Likewise.
+       * hurd/catch-exc.c: Likewise.
+       * hurd/ctty-input.c: Likewise.
+       * hurd/ctty-output.c: Likewise.
+       * hurd/dtable.c: Likewise.
+       * hurd/fchroot.c: Likewise.
+       * hurd/fd-close.c: Likewise.
+       * hurd/fd-read.c: Likewise.
+       * hurd/fd-write.c: Likewise.
+       * hurd/fopenport.c: Likewise.
+       * hurd/get-host.c: Likewise.
+       * hurd/getdport.c: Likewise.
+       * hurd/getuids.c: Likewise.
+       * hurd/getumask.c: Likewise.
+       * hurd/hurd-raise.c: Likewise.
+       * hurd/hurd.h: Likewise.
+       * hurd/hurdauth.c: Likewise.
+       * hurd/hurdexec.c: Likewise.
+       * hurd/hurdhost.h: Likewise.
+       * hurd/hurdid.c: Likewise.
+       * hurd/hurdinit.c: Likewise.
+       * hurd/hurdioctl.c: Likewise.
+       * hurd/hurdkill.c: Likewise.
+       * hurd/hurdlookup.c: Likewise.
+       * hurd/hurdmsg.c: Likewise.
+       * hurd/hurdpid.c: Likewise.
+       * hurd/hurdports.c: Likewise.
+       * hurd/hurdprio.c: Likewise.
+       * hurd/hurdrlimit.c: Likewise.
+       * hurd/hurdsock.c: Likewise.
+       * hurd/hurdstartup.c: Likewise.
+       * hurd/hurdstartup.h: Likewise.
+       * hurd/intern-fd.c: Likewise.
+       * hurd/intr-msg.c: Likewise.
+       * hurd/intr-rpc.defs: Likewise.
+       * hurd/intr-rpc.h: Likewise.
+       * hurd/msgportdemux.c: Likewise.
+       * hurd/new-fd.c: Likewise.
+       * hurd/openport.c: Likewise.
+       * hurd/pid2task.c: Likewise.
+       * hurd/port-cleanup.c: Likewise.
+       * hurd/port2fd.c: Likewise.
+       * hurd/ports-get.c: Likewise.
+       * hurd/ports-set.c: Likewise.
+       * hurd/privports.c: Likewise.
+       * hurd/report-wait.c: Likewise.
+       * hurd/set-host.c: Likewise.
+       * hurd/setauth.c: Likewise.
+       * hurd/setuids.c: Likewise.
+       * hurd/siginfo.c: Likewise.
+       * hurd/sigunwind.c: Likewise.
+       * hurd/task2pid.c: Likewise.
+       * hurd/thread-cancel.c: Likewise.
+       * hurd/thread-self.c: Likewise.
+       * hurd/vpprintf.c: Likewise.
+       * hurd/hurd/fd.h: Likewise.
+       * hurd/hurd/id.h: Likewise.
+       * hurd/hurd/ioctl.h: Likewise.
+       * hurd/hurd/lookup.h: Likewise.
+       * hurd/hurd/port.h: Likewise.
+       * hurd/hurd/resource.h: Likewise.
+       * hurd/hurd/threadvar.h: Likewise.
+       * hurd/hurd/userlink.h: Likewise.
+       * inet/ether_aton.c: Likewise.
+       * inet/ether_aton_r.c: Likewise.
+       * inet/ether_ntoa.c: Likewise.
+       * inet/ether_ntoa_r.c: Likewise.
+       * inet/gethstbyad.c: Likewise.
+       * inet/gethstbyad_r.c: Likewise.
+       * inet/gethstent.c: Likewise.
+       * inet/getnetbyad.c: Likewise.
+       * inet/getnetbyad_r.c: Likewise.
+       * inet/getnetbynm.c: Likewise.
+       * inet/getnetbynm_r.c: Likewise.
+       * inet/getnetent.c: Likewise.
+       * inet/getnetent_r.c: Likewise.
+       * inet/getproto.c: Likewise.
+       * inet/getproto_r.c: Likewise.
+       * inet/getprtent.c: Likewise.
+       * inet/getprtent_r.c: Likewise.
+       * inet/getprtname.c: Likewise.
+       * inet/getrpcbyname.c: Likewise.
+       * inet/getrpcbyname_r.c: Likewise.
+       * inet/getrpcbynumber.c: Likewise.
+       * inet/getrpcbynumber_r.c: Likewise.
+       * inet/getrpcent.c: Likewise.
+       * inet/getrpcent_r.c: Likewise.
+       * inet/getservent.c: Likewise.
+       * inet/getservent_r.c: Likewise.
+       * inet/getsrvbynm.c: Likewise.
+       * inet/getsrvbynm_r.c: Likewise.
+       * inet/getsrvbypt.c: Likewise.
+       * inet/getsrvbypt_r.c: Likewise.
+       * inet/herrno.c: Likewise.
+       * inet/netgroup.h: Likewise.
+       * ient/netinet/ether.h: Likewise.
+       * intl/bindtextdom.c: Likewise.
+       * intl/dcgettext.c: Likewise.
+       * intl/dgettext.c: Likewise.
+       * intl/gettext.c: Likewise.
+       * intl/gettext.h: Likewise.
+       * intl/gettextP.h: Likewise.
+       * intl/hash-string.h: Likewise.
+       * intl/loadmsgcat.c: Likewise.
+       * intl/localealias.c: Likewise.
+       * intl/textdomain.c: Likewise.
+       * io/creat.c: Likewise.
+       * io/getdirname.c: Likewise.
+       * io/lockf.c: Likewise.
+       * io/pwd.c: Likewise.
+       * io/test-utime.c: Likewise.
+       * locale/categories.def: Likewise.
+       * locale/codeset_name.c: Likewise.
+       * locale/lc-collate.c: Likewise.
+       * locale/lc-ctype.c: Likewise.
+       * locale/lc-messages.c: Likewise.
+       * locale/lc-monetary.c: Likewise.
+       * locale/lc-numeric.c: Likewise.
+       * locale/lc-time.c: Likewise.
+       * locale/loadlocale.c: Likewise.
+       * locale/localeconv.c: Likewise.
+       * locale/nl_langinfo.c: Likewise.
+       * locale/setlocale.c: Likewise.
+       * locale/strlen-hash.h: Likewise.
+       * locale/programs/charmap-kw.gperf: Likewise.
+       * locale/programs/charmap-kw.h: Likewise.
+       * locale/programs/charset.c: Likewise.
+       * locale/programs/ld-ctype.c: Likewise.
+       * locale/programs/ld-messages.c: Likewise.
+       * locale/programs/ld-monetary.c: Likewise.
+       * locale/programs/linereader.h: Likewise.
+       * locale/programs/locale-spec.c: Likewise.
+       * locale/programs/locales.h: Likewise.
+       * locale/programs/locfile-kw.gperf: Likewise.
+       * locale/programs/locfile-kw.h: Likewise.
+       * locale/programs/locfile-token.h: Likewise.
+       * locale/programs/simple-hash.h: Likewise.
+       * locale/programs/stringtrans.c: Likewise.
+       * locale/programs/stringtrans.h: Likewise.
+       * login/logout.c: Likewise.
+       * mach/bootprivport.c: Likewise.
+       * mach/devstream.c: Likewise.
+       * mach/hello.c: Likewise.
+       * mach/mach.h: Likewise.
+       * mach/mach_init.c: Likewise.
+       * mach/mach_init.h: Likewise.
+       * mach/mig-alloc.c: Likewise.
+       * mach/mig-dealloc.c: Likewise.
+       * mach/mutex-init.c: Likewise.
+       * mach/mutex-solid.c: Likewise.
+       * mach/setup-thread.c: Likewise.
+       * mach/spin-lock.h: Likewise.
+       * mach/spin-solid.c: Likewise.
+       * mach/mach/mig_support.h: Likewise.
+       * md5-crypt/md5-crypt.c: Likewise.
+       * misc/nlist.h: Likewise.
+       * nss/nss_files/files-ether.c: Likewise.
+       * posix/confstr.c: Likewise.
+       * posix/execl.c: Likewise.
+       * posix/execle.c: Likewise.
+       * posix/execlp.c: Likewise.
+       * posix/execv.c: Likewise.
+       * posix/execvp.c: Likewise.
+       * posix/fnmatch.c: Likewise.
+       * posix/getopt.c: Likewise.
+       * posix/getopt.h: Likewise.
+       * posix/getopt1.c: Likewise.
+       * posix/id.c: Likewise.
+       * posix/regex.c: Likewise.
+       * posix/setpgrp.c: Likewise.
+       * posix/unistd.h: Likewise.
+       * posix/wordexp.c: Likewise.
+       * pwd/fgetpwent.c: Likewise.
+       * pwd/getpwent.c: Likewise.
+       * pwd/getpwent_r.c: Likewise.
+       * pwd/getpwnam.c: Likewise.
+       * pwd/getpwnam_r.c: Likewise.
+       * pwd/getpwuid.c: Likewise.
+       * pwd/getpwuid_r.c: Likewise.
+       * pwd/putpwent.c: Likewise.
+       * resolv/gethnamaddr.c: Likewise.
+       * resolv/res_hconf.c: Likewise.
+       * resolv/res_hconf.h: Likewise.
+       * setjmp/longjmp.c: Likewise.
+       * setjmp/sigjmp.c: Likewise.
+       * setjmp/tst-setjmp.c: Likewise.
+       * stdio/clearerr.c: Likewise.
+       * stdio/ferror.c: Likewise.
+       * stdio/fgetc.c: Likewise.
+       * stdio/fgetpos.c: Likewise.
+       * stdio/fgets.c: Likewise.
+       * stdio/fileno.c: Likewise.
+       * stdio/fmemopen.c: Likewise.
+       * stdio/fopen.c: Likewise.
+       * stdio/fopncook.c: Likewise.
+       * stdio/fputc.c: Likewise.
+       * stdio/fputs.c: Likewise.
+       * stdio/fread.c: Likewise.
+       * stdio/freopen.c: Likewise.
+       * stdio/fseek.c: Likewise.
+       * stdio/fsetpos.c: Likewise.
+       * stdio/ftell.c: Likewise.
+       * stdio/fwrite.c: Likewise.
+       * stdio/getchar.c: Likewise.
+       * stdio/getdelim.c: Likewise.
+       * stdio/gets.c: Likewise.
+       * stdio/glue.c: Likewise.
+       * stdio/internals.c: Likewise.
+       * stdio/linewrap.c: Likewise.
+       * stdio/linewrap.h: Likewise.
+       * stdio/memstream.c: Likewise.
+       * stdio/newstream.c: Likewise.
+       * stdio/putchar.c: Likewise.
+       * stdio/puts.c: Likewise.
+       * stdio/rewind.c: Likewise.
+       * stdio/setbuf.c: Likewise.
+       * stdio/setbuffer.c: Likewise.
+       * stdio/setlinebuf.c: Likewise.
+       * stdio/setvbuf.c: Likewise.
+       * stdio/ungetc.c: Likewise.
+       * stdio/vasprintf.c: Likewise.
+       * stdio/vscanf.c: Likewise.
+       * stdio/vsnprintf.c: Likewise.
+       * stdio/vsprintf.c: Likewise.
+       * stdio/vsscanf.c: Likewise.
+       * stdio-common/asprintf.c: Likewise.
+       * stdio-common/dprintf.c: Likewise.
+       * stdio-common/errnobug.c: Likewise.
+       * stdio-common/fprintf.c: Likewise.
+       * stdio-common/getline.c: Likewise.
+       * stdio-common/getw.c: Likewise.
+       * stdio-common/perror.c: Likewise.
+       * stdio-common/psignal.c: Likewise.
+       * stdio-common/putw.c: Likewise.
+       * stdio-common/reg-printf.c: Likewise.
+       * stdio-common/scanf.c: Likewise.
+       * stdio-common/snprintf.c: Likewise.
+       * stdio-common/sprintf.c: Likewise.
+       * stdio-common/tempnam.c: Likewise.
+       * stdio-common/test_rdwr.c: Likewise.
+       * stdio-common/tst-fileno.c: Likewise.
+       * stdio-common/tst-printf.c: Likewise.
+       * stdio-common/tstgetln.c: Likewise.
+       * stdio-common/vprintf.c: Likewise.
+       * stdlib/drand48.c: Likewise.
+       * stdlib/drand48_r.c: Likewise.
+       * stdlib/erand48.c: Likewise.
+       * stdlib/erand48_r.c: Likewise.
+       * stdlib/exit.h: Likewise.
+       * stdlib/strtoq.c: Likewise.
+       * stdlib/strtoul.c: Likewise.
+       * stdlib/strtouq.c: Likewise.
+       * stdlib/test-canon.c: Likewise.
+       * stdlib/testdiv.c: Likewise.
+       * stdlib/testrand.c: Likewise.
+       * string/argz-append.c: Likewise.
+       * string/argz-count.c: Likewise.
+       * string/argz-create.c: Likewise.
+       * string/argz-ctsep.c: Likewise.
+       * string/argz-delete.c: Likewise.
+       * string/argz-extract.c: Likewise.
+       * string/argz-insert.c: Likewise.
+       * string/argz-next.c: Likewise.
+       * string/argz-stringify.c: Likewise.
+       * string/basename.c: Likewise.
+       * string/envz.c: Likewise.
+       * string/memfrob.c: Likewise.
+       * string/strcoll.c: Likewise.
+       * string/strdup.c: Likewise.
+       * string/string.h: Likewise.
+       * string/strndup.c: Likewise.
+       * string/strnlen.c: Likewise.
+       * string/strsignal.c: Likewise.
+       * string/strxfrm.c: Likewise.
+       * string/test-ffs.c: Likewise.
+       * string/testcopy.c: Likewise.
+       * sysdeps/generic/enbl-secure.c: Likewise.
+       * sysdeps/generic/memcopy.h: Likewise.
+       * sysdeps/generic/stpncpy.c: Likewise.
+       * sysdeps/generic/strcasecmp.c: Likewise.
+       * sysdeps/generic/strcat.c: Likewise.
+       * sysdeps/generic/strchr.c: Likewise.
+       * sysdeps/generic/strcpy.c: Likewise.
+       * sysdeps/generic/strcspn.c: Likewise.
+       * sysdeps/generic/strlen.c: Likewise.
+       * sysdeps/generic/strncase.c: Likewise.
+       * sysdeps/generic/strncat.c: Likewise.
+       * sysdeps/generic/strncpy.c: Likewise.
+       * sysdeps/generic/strpbrk.c: Likewise.
+       * sysdeps/generic/strsep.c: Likewise.
+       * sysdeps/generic/strspn.c: Likewise.
+       * sysdeps/generic/strstr.c: Likewise.
+       * sysdeps/generic/strtok.c: Likewise.
+       * sysdeps/generic/strtok_r.c: Likewise.
+       * sysdeps/mach/sleep.c: Likewise.
+       * sysdeps/posix/sleep.c: Likewise.
+       * sysdeps/stub/sleep.c: Likewise.
+       * time/date.c: Likewise.
+       * time/test_time.c: Likewise.
+       * wcsmbs/wmemcpy.c: Likewise.
+       * wctye/test_wctype.c: Likewise.
+       * wctye/towctrans.c: Likewise.
+       * wctye/wcfuncs.c: Likewise.
+       * wctye/wctrans.c: Likewise.
+
+1997-02-13 22:15  Miles Bader  <miles@gnu.ai.mit.edu>
+
+       * argp/Makefile: New file.
+       * argp/argp.h: Likewise.
+       * argp/argp-ba.c: Likewise.
+       * argp/argp-fmtstream.c: Likewise.
+       * argp/argp-fmtstream.h: Likewise.
+       * argp/argp-fs-xinl.c: Likewise.
+       * argp/argp-help.c: Likewise.
+       * argp/argp-namefrob.h: Likewise.
+       * argp/argp-parse.c: Likewise.
+       * argp/argp-pv.c: Likewise.
+       * argp/argp-pvh.c: Likewise.
+       * argp/argp-test.c: Likewise.
+       * argp/argp-xinl.c: Likewise.
+
 1997-02-13 11:44  Andreas Jaeger  <aj@arthur.pfalz.de>
 
        * stdlib/qsort.c: Add prototype for _quicksort.
 
 1997-02-13 17:55  Ulrich Drepper  <drepper@cygnus.com>
 
-       * libio/_G_config.h: Make sure win_t is also defined for old gcc
+       * libio/_G_config.h: Make sure wint_t is also defined for old gcc
        versions.  Reported by Andreas Jaeger.
 
 1997-02-13 11:44  Andreas Jaeger  <aj@arthur.pfalz.de>
 
-       * db/btree/bt_split.c (bt_psplit): Fix typo in  change of
-       1997-02-12.
-
        * time/tzfile.c (__tzfile_read): Change comment to follow
        change of 1997-02-12.
 
        of $(object-suffixes).
        * sysdeps/unix/make-syscalls.sh: Likewise.  Fix comment.
 
-1997-02-11 05:27  Ulrich Drepper  <drepper@cygnus.com>
-
-       * locale/weight.h (collate_rules): It's an u_int32_t array.
-       (get_weight): Compute initial SLOT value correctly.
-
 1997-02-10 17:45  Ulrich Drepper  <drepper@cygnus.com>
 
        * string/argz-ctsep.c: Initialize *LEN when successful.
 
+1997-02-09 04:35  Ulrich Drepper  <drepper@cygnus.com>
+
+       * stdio-common/_itoa.h: Update copyright.
+
 1997-02-09 02:59  Ulrich Drepper  <drepper@cygnus.com>
 
        * version.h (VERSION): Bump to 2.0.2.
index 84d2ff999dc47e333e830e63863f34bd637e2932..2d3762a00f394ec396b2dcd657f47ab0f112b65f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -54,7 +54,7 @@ endif
 subdirs = csu assert ctype db locale intl catgets math setjmp signal stdlib \
          stdio-common $(stdio) malloc string wcsmbs time dirent grp pwd \
          posix io termios resource misc login socket sysvipc gmon gnulib \
-         wctype manual shadow md5-crypt nss $(sysdep-subdirs) po \
+         wctype manual shadow md5-crypt nss $(sysdep-subdirs) po argp \
          $(add-ons) elf
 export subdirs := $(subdirs)   # Benign, useless in GNU make before 3.63.
 
@@ -289,7 +289,7 @@ distribute  := README INSTALL FAQ NOTES NEWS PROJECTS                       \
               autolock.sh rellns-sh munch-tmpl.c munch.awk interp.c    \
               sysdep.h set-hooks.h libc-symbols.h version.h shlib-versions \
               rpm/Makefile rpm/template rpm/rpmrc nsswitch.h netgroup.h \
-              mcheck.h glibcbug.in
+              mcheck.h glibcbug.in xlocale.h
 
 distribute := $(strip $(distribute))
 generated := $(generated) stubs.h version-info.h
diff --git a/NEWS b/NEWS
index fbc7cabe1302fc91d47b33557e8e6c5d7adaa3b5..4a83310811c095e25ef83193fab3edc47e5ef301 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  26 January 1997
+GNU C Library NEWS -- history of user-visible changes.  1997-02-13
 
 Copyright (C) 1992, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
 See the end for copying conditions.
@@ -7,6 +7,17 @@ Please send GNU C library bug reports using the `glibcbug' script to
 <bugs@gnu.ai.mit.edu>.  Questions and suggestions should be send to
 <bug-glibc@prep.ai.mit.edu>.
 \f
+Version 2.1
+
+* An additional locale model to support C++ Standard Library locale
+  model an probably more was implemented by Ulrich Drepper.
+
+* Eric Youngdale and Ulrich Drepper implement versioning of objects on
+  symbol level.
+
+* Miles Bader provided the `argp' function family to support hierachical
+  command line argument parsing, layered on top of getopt.
+\f
 Version 2.0.2
 
 * more bug fixes
diff --git a/argp/Makefile b/argp/Makefile
new file mode 100644 (file)
index 0000000..68fab3c
--- /dev/null
@@ -0,0 +1,31 @@
+# Copyright (C) 1997 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.
+
+#
+#      Makefile for argp.
+#
+subdir := argp
+
+headers                = argp.h
+distribute     = argp-fmtstream.h argp-namefrob.h
+routines       = $(addprefix argp-, ba fmtstream fs-xinl help parse pv \
+                                    pvh xinl)
+
+tests          = argp-test
+
+include ../Rules
diff --git a/argp/argp-ba.c b/argp/argp-ba.c
new file mode 100644 (file)
index 0000000..61efc34
--- /dev/null
@@ -0,0 +1,26 @@
+/* Default definition for ARGP_PROGRAM_BUG_ADDRESS.
+   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@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.  */
+
+/* If set by the user program, it should point to string that is the
+   bug-reporting address for the program.  It will be printed by argp_help if
+   the ARGP_HELP_BUG_ADDR flag is set (as it is by various standard help
+   messages), embedded in a sentence that says something like `Report bugs to
+   ADDR.'.  */
+char *argp_program_bug_address = 0;
diff --git a/argp/argp-fmtstream.c b/argp/argp-fmtstream.c
new file mode 100644 (file)
index 0000000..c7203de
--- /dev/null
@@ -0,0 +1,374 @@
+/* Word-wrapping and line-truncating streams
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@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 package emulates glibc `line_wrap_stream' semantics for systems that
+   don't have that.  */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <ctype.h>
+
+#include "argp-fmtstream.h"
+#include "argp-namefrob.h"
+
+#ifndef ARGP_FMTSTREAM_USE_LINEWRAP
+
+#ifndef isblank
+#define isblank(ch) ((ch)==' ' || (ch)=='\t')
+#endif
+
+#define INIT_BUF_SIZE 200
+#define PRINTF_SIZE_GUESS 150
+\f
+/* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines
+   written on it with LMARGIN spaces and limits them to RMARGIN columns
+   total.  If WMARGIN >= 0, words that extend past RMARGIN are wrapped by
+   replacing the whitespace before them with a newline and WMARGIN spaces.
+   Otherwise, chars beyond RMARGIN are simply dropped until a newline.
+   Returns NULL if there was an error.  */
+argp_fmtstream_t
+__argp_make_fmtstream (FILE *stream,
+                      size_t lmargin, size_t rmargin, ssize_t wmargin)
+{
+  argp_fmtstream_t fs = malloc (sizeof (struct argp_fmtstream));
+  if (fs)
+    {
+      fs->stream = stream;
+
+      fs->lmargin = lmargin;
+      fs->rmargin = rmargin;
+      fs->wmargin = wmargin;
+      fs->point_col = 0;
+      fs->point_offs = 0;
+
+      fs->buf = malloc (INIT_BUF_SIZE);
+      if (! fs->buf)
+       {
+         free (fs);
+         fs = 0;
+       }
+      else
+       {
+         fs->p = fs->buf;
+         fs->end = fs->buf + INIT_BUF_SIZE;
+       }
+    }
+
+  return fs;
+}
+#ifdef weak_alias
+weak_alias (__argp_make_fmtstream, argp_make_fmtstream)
+#endif
+
+/* Flush FS to its stream, and free it (but don't close the stream).  */
+void
+__argp_fmtstream_free (argp_fmtstream_t fs)
+{
+  __argp_fmtstream_update (fs);
+  if (fs->p > fs->buf)
+    fwrite (fs->buf, 1, fs->p - fs->buf, fs->stream);
+  free (fs->buf);
+  free (fs);
+}
+#ifdef weak_alias
+weak_alias (__argp_fmtstream_free, argp_fmtstream_free)
+#endif
+\f
+/* Process FS's buffer so that line wrapping is done from POINT_OFFS to the
+   end of its buffer.  This code is mostly from glibc stdio/linewrap.c.  */
+void
+__argp_fmtstream_update (argp_fmtstream_t fs)
+{
+  char *buf, *nl;
+  size_t len;
+
+  /* Scan the buffer for newlines.  */
+  buf = fs->buf + fs->point_offs;
+  while (buf < fs->p)
+    {
+      size_t r;
+
+      if (fs->point_col == 0 && fs->lmargin != 0)
+       {
+         /* We are starting a new line.  Print spaces to the left margin.  */
+         const size_t pad = fs->lmargin;
+         if (fs->p + pad < fs->end)
+           {
+             /* We can fit in them in the buffer by moving the
+                buffer text up and filling in the beginning.  */
+             memmove (buf + pad, buf, fs->p - buf);
+             fs->p += pad; /* Compensate for bigger buffer. */
+             memset (buf, ' ', pad); /* Fill in the spaces.  */
+             buf += pad; /* Don't bother searching them.  */
+           }
+         else
+           {
+             /* No buffer space for spaces.  Must flush.  */
+             size_t i;
+             for (i = 0; i < pad; i++)
+               putc (' ', fs->stream);
+           }
+         fs->point_col = pad;
+       }
+
+      len = fs->p - buf;
+      nl = memchr (buf, '\n', len);
+
+      if (fs->point_col < 0)
+       fs->point_col = 0;
+
+      if (!nl)
+       {
+         /* The buffer ends in a partial line.  */
+
+         if (fs->point_col + len < fs->rmargin)
+           {
+             /* The remaining buffer text is a partial line and fits
+                within the maximum line width.  Advance point for the
+                characters to be written and stop scanning.  */
+             fs->point_col += len;
+             break;
+           }
+         else
+           /* Set the end-of-line pointer for the code below to
+              the end of the buffer.  */
+           nl = fs->p;
+       }
+      else if (fs->point_col + (nl - buf) < fs->rmargin)
+       {
+         /* The buffer contains a full line that fits within the maximum
+            line width.  Reset point and scan the next line.  */
+         fs->point_col = 0;
+         buf = nl + 1;
+         continue;
+       }
+
+      /* This line is too long.  */
+      r = fs->rmargin - 1;
+
+      if (fs->wmargin < 0)
+       {
+         /* Truncate the line by overwriting the excess with the
+            newline and anything after it in the buffer.  */
+         if (nl < fs->p)
+           {
+             memmove (buf + (r - fs->point_col), nl, fs->p - nl);
+             fs->p -= buf + (r - fs->point_col) - nl;
+             /* Reset point for the next line and start scanning it.  */
+             fs->point_col = 0;
+             buf += r + 1; /* Skip full line plus \n. */
+           }
+         else
+           {
+             /* The buffer ends with a partial line that is beyond the
+                maximum line width.  Advance point for the characters
+                written, and discard those past the max from the buffer.  */
+             fs->point_col += len;
+             fs->p -= fs->point_col - r;
+             break;
+           }
+       }
+      else
+       {
+         /* Do word wrap.  Go to the column just past the maximum line
+            width and scan back for the beginning of the word there.
+            Then insert a line break.  */
+
+         char *p, *nextline;
+         int i;
+
+         p = buf + (r + 1 - fs->point_col);
+         while (p >= buf && !isblank (*p))
+           --p;
+         nextline = p + 1;     /* This will begin the next line.  */
+
+         if (nextline > buf)
+           {
+             /* Swallow separating blanks.  */
+             if (p > buf)
+               do
+                 --p;
+               while (p > buf && isblank (*p));
+             nl = p + 1;       /* The newline will replace the first blank. */
+           }
+         else
+           {
+             /* A single word that is greater than the maximum line width.
+                Oh well.  Put it on an overlong line by itself.  */
+             p = buf + (r + 1 - fs->point_col);
+             /* Find the end of the long word.  */
+             do
+               ++p;
+             while (p < nl && !isblank (*p));
+             if (p == nl)
+               {
+                 /* It already ends a line.  No fussing required.  */
+                 fs->point_col = 0;
+                 buf = nl + 1;
+                 continue;
+               }
+             /* We will move the newline to replace the first blank.  */
+             nl = p;
+             /* Swallow separating blanks.  */
+             do
+               ++p;
+             while (isblank (*p));
+             /* The next line will start here.  */
+             nextline = p;
+           }
+
+         if (nextline - (nl + 1) < fs->wmargin)
+           /* The margin needs more blanks than we removed.  */
+           if (fs->end - fs->p > fs->wmargin + 1)
+             /* Make some space for them.  */
+             {
+               size_t mv = fs->p - nextline;
+               memmove (nl + 1 + fs->wmargin, nextline, mv);
+               nextline = nl + 1 + fs->wmargin;
+               len = nextline + mv - buf;
+               *nl++ = '\n';
+             }
+           else
+             /* Output the first line so we can use the space.  */
+             {
+               if (nl > fs->buf)
+                 fwrite (fs->buf, 1, nl - fs->buf, fs->stream);
+               putc ('\n', fs->stream);
+               len += buf - fs->buf;
+               nl = buf = fs->buf;
+             }
+         else
+           /* We can fit the newline and blanks in before
+              the next word.  */
+           *nl++ = '\n';
+
+         if (nextline - nl >= fs->wmargin)
+           /* Add blanks up to the wrap margin column.  */
+           for (i = 0; i < fs->wmargin; ++i)
+             *nl++ = ' ';
+         else
+           for (i = 0; i < fs->wmargin; ++i)
+             putc (' ', fs->stream);
+
+         /* Copy the tail of the original buffer into the current buffer
+            position.  */
+         if (nl != nextline)
+           memmove (nl, nextline, buf + len - nextline);
+         len -= nextline - buf;
+
+         /* Continue the scan on the remaining lines in the buffer.  */
+         buf = nl;
+
+         /* Restore bufp to include all the remaining text.  */
+         fs->p = nl + len;
+
+         /* Reset the counter of what has been output this line.  If wmargin
+            is 0, we want to avoid the lmargin getting added, so we set
+            point_col to a magic value of -1 in that case.  */
+         fs->point_col = fs->wmargin ? fs->wmargin : -1;
+       }
+    }
+
+  /* Remember that we've scanned as far as the end of the buffer.  */
+  fs->point_offs = fs->p - fs->buf;
+}
+\f
+/* Ensure that FS has space for AMOUNT more bytes in its buffer, either by
+   growing the buffer, or by flushing it.  True is returned iff we succeed. */
+int
+__argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
+{
+  if (fs->end - fs->p < amount)
+    {
+      ssize_t wrote;
+
+      /* Flush FS's buffer.  */
+      __argp_fmtstream_update (fs);
+
+      wrote = fwrite (fs->buf, 1, fs->p - fs->buf, fs->stream);
+      if (wrote == fs->p - fs->buf)
+       {
+         fs->p = fs->buf;
+         fs->point_offs = 0;
+       }
+      else
+       {
+         fs->p -= wrote;
+         fs->point_offs -= wrote;
+         memmove (fs->buf, fs->buf + wrote, fs->p - fs->buf);
+         return 0;
+       }
+
+      if (fs->end - fs->buf < amount)
+       /* Gotta grow the buffer.  */
+       {
+         size_t new_size = fs->end - fs->buf + amount;
+         char *new_buf = realloc (fs->buf, new_size);
+
+         if (! new_buf)
+           {
+             __set_errno (ENOMEM);
+             return 0;
+           }
+
+         fs->buf = new_buf;
+         fs->end = new_buf + new_size;
+         fs->p = fs->buf;
+       }
+    }
+
+  return 1;
+}
+\f
+ssize_t
+__argp_fmtstream_printf (struct argp_fmtstream *fs, const char *fmt, ...)
+{
+  size_t out;
+  size_t size_guess = PRINTF_SIZE_GUESS; /* How much space to reserve. */
+
+  do
+    {
+      va_list args;
+
+      if (! __argp_fmtstream_ensure (fs, size_guess))
+       return -1;
+      size_guess += size_guess;
+
+      va_start (args, fmt);
+      out = __vsnprintf (fs->p, fs->end - fs->p, fmt, args);
+      va_end (args);
+    }
+  while (out == -1);
+
+  fs->p += out;
+
+  return out;
+}
+#ifdef weak_alias
+weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf)
+#endif
+
+#endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */
diff --git a/argp/argp-fmtstream.h b/argp/argp-fmtstream.h
new file mode 100644 (file)
index 0000000..280a893
--- /dev/null
@@ -0,0 +1,297 @@
+/* Word-wrapping and line-truncating streams.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@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 package emulates glibc `line_wrap_stream' semantics for systems that
+   don't have that.  If the system does have it, it is just a wrapper for
+   that.  This header file is only used internally while compiling argp, and
+   shouldn't be installed.  */
+
+#ifndef __ARGP_FMTSTREAM_H__
+#define __ARGP_FMTSTREAM_H__
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+#if    (_LIBC - 0 && !defined (USE_IN_LIBIO)) \
+    || (defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H))
+/* line_wrap_stream is available, so use that.  */
+#define ARGP_FMTSTREAM_USE_LINEWRAP
+#endif
+
+#ifdef ARGP_FMTSTREAM_USE_LINEWRAP
+/* Just be a simple wrapper for line_wrap_stream; the semantics are
+   *slightly* different, as line_wrap_stream doesn't actually make a new
+   object, it just modifies the given stream (reversibly) to do
+   line-wrapping.  Since we control who uses this code, it doesn't matter.  */
+
+#include <linewrap.h>
+
+typedef FILE *argp_fmtstream_t;
+
+#define argp_make_fmtstream line_wrap_stream
+#define __argp_make_fmtstream line_wrap_stream
+#define argp_fmtstream_free line_unwrap_stream
+#define __argp_fmtstream_free line_unwrap_stream
+
+#define __argp_fmtstream_putc(fs,ch) putc(ch,fs)
+#define argp_fmtstream_putc(fs,ch) putc(ch,fs)
+#define __argp_fmtstream_puts(fs,str) fputs(str,fs)
+#define argp_fmtstream_puts(fs,str) fputs(str,fs)
+#define __argp_fmtstream_write(fs,str,len) fwrite(str,1,len,fs)
+#define argp_fmtstream_write(fs,str,len) fwrite(str,1,len,fs)
+#define __argp_fmtstream_printf fprintf
+#define argp_fmtstream_printf fprintf
+
+#define __argp_fmtstream_lmargin line_wrap_lmargin
+#define argp_fmtstream_lmargin line_wrap_lmargin
+#define __argp_fmtstream_set_lmargin line_wrap_set_lmargin
+#define argp_fmtstream_set_lmargin line_wrap_set_lmargin
+#define __argp_fmtstream_rmargin line_wrap_rmargin
+#define argp_fmtstream_rmargin line_wrap_rmargin
+#define __argp_fmtstream_set_rmargin line_wrap_set_rmargin
+#define argp_fmtstream_set_rmargin line_wrap_set_rmargin
+#define __argp_fmtstream_wmargin line_wrap_wmargin
+#define argp_fmtstream_wmargin line_wrap_wmargin
+#define __argp_fmtstream_set_wmargin line_wrap_set_wmargin
+#define argp_fmtstream_set_wmargin line_wrap_set_wmargin
+#define __argp_fmtstream_point line_wrap_point
+#define argp_fmtstream_point line_wrap_point
+
+#else /* !ARGP_FMTSTREAM_USE_LINEWRAP */
+/* Guess we have to define our own version.  */
+
+#ifndef __const
+#define __const const
+#endif
+\f
+struct argp_fmtstream
+{
+  FILE *stream;                        /* The stream we're outputting to.  */
+
+  size_t lmargin, rmargin;     /* Left and right margins.  */
+  ssize_t wmargin;             /* Margin to wrap to, or -1 to truncate.  */
+
+  /* Point in buffer to which we've processed for wrapping, but not output.  */
+  size_t point_offs;
+  /* Output column at POINT_OFFS, or -1 meaning 0 but don't add lmargin.  */
+  ssize_t point_col;
+
+  char *buf;                   /* Output buffer.  */
+  char *p;                     /* Current end of text in BUF. */
+  char *end;                   /* Absolute end of BUF.  */
+};
+
+typedef struct argp_fmtstream *argp_fmtstream_t;
+
+/* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines
+   written on it with LMARGIN spaces and limits them to RMARGIN columns
+   total.  If WMARGIN >= 0, words that extend past RMARGIN are wrapped by
+   replacing the whitespace before them with a newline and WMARGIN spaces.
+   Otherwise, chars beyond RMARGIN are simply dropped until a newline.
+   Returns NULL if there was an error.  */
+extern argp_fmtstream_t __argp_make_fmtstream (FILE *__stream,
+                                              size_t __lmargin,
+                                              size_t __rmargin,
+                                              ssize_t __wmargin);
+extern argp_fmtstream_t argp_make_fmtstream (FILE *__stream,
+                                            size_t __lmargin,
+                                            size_t __rmargin,
+                                            ssize_t __wmargin);
+
+/* Flush __FS to its stream, and free it (but don't close the stream).  */
+extern void __argp_fmtstream_free (argp_fmtstream_t __fs);
+extern void argp_fmtstream_free (argp_fmtstream_t __fs);
+
+extern ssize_t __argp_fmtstream_printf (argp_fmtstream_t __fs,
+                                      __const char *__fmt, ...)
+     __attribute__ ((__format__ (printf, 2, 3)));
+extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs,
+                                     __const char *__fmt, ...)
+     __attribute__ ((__format__ (printf, 2, 3)));
+
+extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
+extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
+
+extern int __argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str);
+extern int argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str);
+
+extern size_t __argp_fmtstream_write (argp_fmtstream_t __fs,
+                                     __const char *__str, size_t __len);
+extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
+                                   __const char *__str, size_t __len);
+\f
+/* Access macros for various bits of state.  */
+#define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin)
+#define argp_fmtstream_rmargin(__fs) ((__fs)->rmargin)
+#define argp_fmtstream_wmargin(__fs) ((__fs)->wmargin)
+#define __argp_fmtstream_lmargin argp_fmtstream_lmargin
+#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
+#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
+
+/* Set __FS's left margin to LMARGIN and return the old value.  */
+extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
+                                         size_t __lmargin);
+extern size_t __argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
+                                           size_t __lmargin);
+
+/* Set __FS's right margin to __RMARGIN and return the old value.  */
+extern size_t argp_fmtstream_set_rmargin (argp_fmtstream_t __fs,
+                                         size_t __rmargin);
+extern size_t __argp_fmtstream_set_rmargin (argp_fmtstream_t __fs,
+                                           size_t __rmargin);
+
+/* Set __FS's wrap margin to __WMARGIN and return the old value.  */
+extern size_t argp_fmtstream_set_wmargin (argp_fmtstream_t __fs,
+                                         size_t __wmargin);
+extern size_t __argp_fmtstream_set_wmargin (argp_fmtstream_t __fs,
+                                           size_t __wmargin);
+
+/* Return the column number of the current output point in __FS.  */
+extern size_t argp_fmtstream_point (argp_fmtstream_t __fs);
+extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
+
+/* Internal routines.  */
+extern void _argp_fmtstream_update (argp_fmtstream_t __fs);
+extern void __argp_fmtstream_update (argp_fmtstream_t __fs);
+extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
+extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
+\f
+#ifdef __OPTIMIZE__
+/* Inline versions of above routines.  */
+
+#if !_LIBC
+#define __argp_fmtstream_putc argp_fmtstream_putc
+#define __argp_fmtstream_puts argp_fmtstream_puts
+#define __argp_fmtstream_write argp_fmtstream_write
+#define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin
+#define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin
+#define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin
+#define __argp_fmtstream_point argp_fmtstream_point
+#define __argp_fmtstream_update _argp_fmtstream_update
+#define __argp_fmtstream_ensure _argp_fmtstream_ensure
+#endif
+
+#ifndef ARGP_FS_EI
+#define ARGP_FS_EI extern inline
+#endif
+
+ARGP_FS_EI size_t
+__argp_fmtstream_write (argp_fmtstream_t __fs,
+                       __const char *__str, size_t __len)
+{
+  if (__fs->p + __len <= __fs->end || __argp_fmtstream_ensure (__fs, __len))
+    {
+      memcpy (__fs->p, __str, __len);
+      __fs->p += __len;
+      return __len;
+    }
+  else
+    return 0;
+}
+
+ARGP_FS_EI int
+__argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str)
+{
+  size_t __len = strlen (__str);
+  if (__len)
+    {
+      size_t __wrote = __argp_fmtstream_write (__fs, __str, __len);
+      return __wrote == __len ? 0 : -1;
+    }
+  else
+    return 0;
+}
+
+ARGP_FS_EI int
+__argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch)
+{
+  if (__fs->p < __fs->end || __argp_fmtstream_ensure (__fs, 1))
+    return *__fs->p++ = __ch;
+  else
+    return EOF;
+}
+
+/* Set __FS's left margin to __LMARGIN and return the old value.  */
+ARGP_FS_EI size_t
+__argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, size_t __lmargin)
+{
+  size_t __old;
+  if (__fs->p - __fs->buf > __fs->point_offs)
+    __argp_fmtstream_update (__fs);
+  __old = __fs->lmargin;
+  __fs->lmargin = __lmargin;
+  return __old;
+}
+
+/* Set __FS's right margin to __RMARGIN and return the old value.  */
+ARGP_FS_EI size_t
+__argp_fmtstream_set_rmargin (argp_fmtstream_t __fs, size_t __rmargin)
+{
+  size_t __old;
+  if (__fs->p - __fs->buf > __fs->point_offs)
+    __argp_fmtstream_update (__fs);
+  __old = __fs->rmargin;
+  __fs->rmargin = __rmargin;
+  return __old;
+}
+
+/* Set FS's wrap margin to __WMARGIN and return the old value.  */
+ARGP_FS_EI size_t
+__argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, size_t __wmargin)
+{
+  size_t __old;
+  if (__fs->p - __fs->buf > __fs->point_offs)
+    __argp_fmtstream_update (__fs);
+  __old = __fs->wmargin;
+  __fs->wmargin = __wmargin;
+  return __old;
+}
+
+/* Return the column number of the current output point in __FS.  */
+ARGP_FS_EI size_t
+__argp_fmtstream_point (argp_fmtstream_t __fs)
+{
+  if (__fs->p - __fs->buf > __fs->point_offs)
+    __argp_fmtstream_update (__fs);
+  return __fs->point_col >= 0 ? __fs->point_col : 0;
+}
+
+#if !_LIBC
+#undef __argp_fmtstream_putc
+#undef __argp_fmtstream_puts
+#undef __argp_fmtstream_write
+#undef __argp_fmtstream_set_lmargin
+#undef __argp_fmtstream_set_rmargin
+#undef __argp_fmtstream_set_wmargin
+#undef __argp_fmtstream_point
+#undef __argp_fmtstream_update
+#undef __argp_fmtstream_ensure
+#endif
+
+#endif /* __OPTIMIZE__ */
+
+#endif /* ARGP_FMTSTREAM_USE_LINEWRAP */
+
+#endif /* __ARGP_FMTSTREAM_H__ */
diff --git a/argp/argp-fs-xinl.c b/argp/argp-fs-xinl.c
new file mode 100644 (file)
index 0000000..94d5f58
--- /dev/null
@@ -0,0 +1,41 @@
+/* Real definitions for extern inline functions in argp-fmtstream.h
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@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.  */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define ARGP_FS_EI
+#undef __OPTIMIZE__
+#define __OPTIMIZE__
+#include "argp-fmtstream.h"
+
+/* Add weak aliases.  */
+#if _LIBC - 0 && !defined (ARGP_FMTSTREAM_USE_LINEWRAP) && defined (weak_alias)
+
+weak_alias (__argp_fmtstream_putc, argp_fmtstream_putc)
+weak_alias (__argp_fmtstream_puts, argp_fmtstream_puts)
+weak_alias (__argp_fmtstream_write, argp_fmtstream_write)
+weak_alias (__argp_fmtstream_set_lmargin, argp_fmtstream_set_lmargin)
+weak_alias (__argp_fmtstream_set_rmargin, argp_fmtstream_set_rmargin)
+weak_alias (__argp_fmtstream_set_wmargin, argp_fmtstream_set_wmargin)
+weak_alias (__argp_fmtstream_point, argp_fmtstream_point)
+
+#endif
diff --git a/argp/argp-help.c b/argp/argp-help.c
new file mode 100644 (file)
index 0000000..5d7df54
--- /dev/null
@@ -0,0 +1,1376 @@
+/* Hierarchial argument parsing help output
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@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.  */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <stdarg.h>
+#include <malloc.h>
+#include <ctype.h>
+
+#ifndef _
+/* This is for other GNU distributions with internationalized messages.
+   When compiling libc, the _ macro is predefined.  */
+#ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+# define _(msgid)       gettext (msgid)
+#else
+# define _(msgid)       (msgid)
+# define gettext(msgid) (msgid)
+#endif
+#endif
+
+#include "argp.h"
+#include "argp-fmtstream.h"
+#include "argp-namefrob.h"
+
+#define SHORT_OPT_COL 2                /* column in which short options start */
+#define LONG_OPT_COL  6                /* column in which long options start */
+#define DOC_OPT_COL   2                /* column in which doc options start */
+#define OPT_DOC_COL  29                /* column in which option text starts */
+#define HEADER_COL    1                /* column in which group headers are printed */
+#define USAGE_INDENT 12                /* indentation of wrapped usage lines */
+#define RMARGIN      79                /* right margin used for wrapping */
+
+/* Returns true if OPT hasn't been marked invisible.  Visibility only affects
+   whether OPT is displayed or used in sorting, not option shadowing.  */
+#define ovisible(opt) (! ((opt)->flags & OPTION_HIDDEN))
+
+/* Returns true if OPT is an alias for an earlier option.  */
+#define oalias(opt) ((opt)->flags & OPTION_ALIAS)
+
+/* Returns true if OPT is an documentation-only entry.  */
+#define odoc(opt) ((opt)->flags & OPTION_DOC)
+
+/* Returns true if OPT is the end-of-list marker for a list of options.  */
+#define oend(opt) __option_is_end (opt)
+
+/* Returns true if OPT has a short option.  */
+#define oshort(opt) __option_is_short (opt)
+\f
+/*
+   The help format for a particular option is like:
+
+     -xARG, -yARG, --long1=ARG, --long2=ARG        Documentation...
+
+   Where ARG will be omitted if there's no argument, for this option, or
+   will be surrounded by "[" and "]" appropiately if the argument is
+   optional.  The documentation string is word-wrapped appropiately, and if
+   the list of options is long enough, it will be started on a separate line.
+   If there are no short options for a given option, the first long option is
+   indented slighly in a way that's supposed to make most long options appear
+   to be in a separate column.
+
+   For example, the following output (from ps):
+
+     -p PID, --pid=PID          List the process PID
+        --pgrp=PGRP            List processes in the process group PGRP
+     -P, -x, --no-parent        Include processes without parents
+     -Q, --all-fields           Don't elide unusable fields (normally if there's
+                               some reason ps can't print a field for any
+                               process, it's removed from the output entirely)
+     -r, --reverse, --gratuitously-long-reverse-option
+                               Reverse the order of any sort
+        --session[=SID]        Add the processes from the session SID (which
+                               defaults to the sid of the current process)
+
+    Here are some more options:
+     -f ZOT, --foonly=ZOT       Glork a foonly
+     -z, --zaza                 Snit a zar
+
+     -?, --help                 Give this help list
+        --usage                Give a short usage message
+     -V, --version              Print program version
+
+   The struct argp_option array for the above could look like:
+
+   {
+     {"pid",       'p',      "PID",  0, "List the process PID"},
+     {"pgrp",      OPT_PGRP, "PGRP", 0, "List processes in the process group PGRP"},
+     {"no-parent", 'P',              0,     0, "Include processes without parents"},
+     {0,           'x',       0,     OPTION_ALIAS},
+     {"all-fields",'Q',       0,     0, "Don't elide unusable fields (normally"
+                                        " if there's some reason ps can't"
+                                       " print a field for any process, it's"
+                                        " removed from the output entirely)" },
+     {"reverse",   'r',       0,     0, "Reverse the order of any sort"},
+     {"gratuitously-long-reverse-option", 0, 0, OPTION_ALIAS},
+     {"session",   OPT_SESS,  "SID", OPTION_ARG_OPTIONAL,
+                                        "Add the processes from the session"
+                                       " SID (which defaults to the sid of"
+                                       " the current process)" },
+
+     {0,0,0,0, "Here are some more options:"},
+     {"foonly", 'f', "ZOT", 0, "Glork a foonly"},
+     {"zaza", 'z', 0, 0, "Snit a zar"},
+
+     {0}
+   }
+
+   Note that the last three options are automatically supplied by argp_parse,
+   unless you tell it not to with ARGP_NO_HELP.
+
+*/
+\f
+/* Returns true if CH occurs between BEG and END.  */
+static int
+find_char (char ch, char *beg, char *end)
+{
+  while (beg < end)
+    if (*beg == ch)
+      return 1;
+    else
+      beg++;
+  return 0;
+}
+\f
+struct hol_cluster;            /* fwd decl */
+
+struct hol_entry
+{
+  /* First option.  */
+  const struct argp_option *opt;
+  /* Number of options (including aliases).  */
+  unsigned num;
+
+  /* A pointers into the HOL's short_options field, to the first short option
+     letter for this entry.  The order of the characters following this point
+     corresponds to the order of options pointed to by OPT, and there are at
+     most NUM.  A short option recorded in a option following OPT is only
+     valid if it occurs in the right place in SHORT_OPTIONS (otherwise it's
+     probably been shadowed by some other entry).  */
+  char *short_options;
+
+  /* Entries are sorted by their group first, in the order:
+       1, 2, ..., n, 0, -m, ..., -2, -1
+     and then alphabetically within each group.  The default is 0.  */
+  int group;
+
+  /* The cluster of options this entry belongs to, or 0 if none.  */
+  struct hol_cluster *cluster;
+};
+
+/* A cluster of entries to reflect the argp tree structure.  */
+struct hol_cluster
+{
+  /* A descriptive header printed before options in this cluster.  */
+  const char *header;
+
+  /* Used to order clusters within the same group with the same parent,
+     according to the order in which they occured in the parent argp's child
+     list.  */
+  int index;
+
+  /* How to sort this cluster with respect to options and other clusters at the
+     same depth (clusters always follow options in the same group).  */
+  int group;
+
+  /* The cluster to which this cluster belongs, or 0 if it's at the base
+     level.  */
+  struct hol_cluster *parent;
+
+  /* The distance this cluster is from the root.  */
+  int depth;
+
+  /* Clusters in a given hol are kept in a linked list, to make freeing them
+     possible.  */
+  struct hol_cluster *next;
+};
+
+/* A list of options for help.  */
+struct hol
+{
+  /* An array of hol_entry's.  */
+  struct hol_entry *entries;
+  /* The number of entries in this hol.  If this field is zero, the others
+     are undefined.  */
+  unsigned num_entries;
+
+  /* A string containing all short options in this HOL.  Each entry contains
+     pointers into this string, so the order can't be messed with blindly.  */
+  char *short_options;
+
+  /* Clusters of entries in this hol.  */
+  struct hol_cluster *clusters;
+};
+\f
+/* Create a struct hol from an array of struct argp_option.  CLUSTER is the
+   hol_cluster in which these entries occur, or 0, if at the root.  */
+static struct hol *
+make_hol (const struct argp_option *opt, struct hol_cluster *cluster)
+{
+  char *so;
+  const struct argp_option *o;
+  struct hol_entry *entry;
+  unsigned num_short_options = 0;
+  struct hol *hol = malloc (sizeof (struct hol));
+
+  assert (hol);
+
+  hol->num_entries = 0;
+  hol->clusters = 0;
+
+  if (opt)
+    {
+      int cur_group = 0;
+
+      /* The first option must not be an alias.  */
+      assert (! oalias (opt));
+
+      /* Calculate the space needed.  */
+      for (o = opt; ! oend (o); o++)
+       {
+         if (! oalias (o))
+           hol->num_entries++;
+         if (oshort (o))
+           num_short_options++;        /* This is an upper bound.  */
+       }
+
+      hol->entries = malloc (sizeof (struct hol_entry) * hol->num_entries);
+      hol->short_options = malloc (num_short_options + 1);
+
+      assert (hol->entries && hol->short_options);
+
+      /* Fill in the entries.  */
+      so = hol->short_options;
+      for (o = opt, entry = hol->entries; ! oend (o); entry++)
+       {
+         entry->opt = o;
+         entry->num = 0;
+         entry->short_options = so;
+         entry->group = cur_group =
+           o->group
+           ? o->group
+           : ((!o->name && !o->key)
+              ? cur_group + 1
+              : cur_group);
+         entry->cluster = cluster;
+
+         do
+           {
+             entry->num++;
+             if (oshort (o) && ! find_char (o->key, hol->short_options, so))
+               /* O has a valid short option which hasn't already been used.*/
+               *so++ = o->key;
+             o++;
+           }
+         while (! oend (o) && oalias (o));
+       }
+      *so = '\0';              /* null terminated so we can find the length */
+    }
+
+  return hol;
+}
+\f
+/* Add a new cluster to HOL, with the given GROUP and HEADER (taken from the
+   associated argp child list entry), INDEX, and PARENT, and return a pointer
+   to it.  */
+static struct hol_cluster *
+hol_add_cluster (struct hol *hol, int group, const char *header, int index,
+                struct hol_cluster *parent)
+{
+  struct hol_cluster *cl = malloc (sizeof (struct hol_cluster));
+  if (cl)
+    {
+      cl->group = group;
+      cl->header = header;
+
+      cl->index = index;
+      cl->parent = parent;
+
+      cl->next = hol->clusters;
+      hol->clusters = cl;
+    }
+  return cl;
+}
+\f
+/* Free HOL and any resources it uses.  */
+static void
+hol_free (struct hol *hol)
+{
+  struct hol_cluster *cl = hol->clusters;
+
+  while (cl)
+    {
+      struct hol_cluster *next = cl->next;
+      free (cl);
+      cl = next;
+    }
+
+  if (hol->num_entries > 0)
+    {
+      free (hol->entries);
+      free (hol->short_options);
+    }
+
+  free (hol);
+}
+\f
+static inline int
+hol_entry_short_iterate (const struct hol_entry *entry,
+                        int (*func)(const struct argp_option *opt,
+                                    const struct argp_option *real,
+                                    void *cookie),
+                        void *cookie)
+{
+  unsigned nopts;
+  int val = 0;
+  const struct argp_option *opt, *real = entry->opt;
+  char *so = entry->short_options;
+
+  for (opt = real, nopts = entry->num; nopts > 0 && !val; opt++, nopts--)
+    if (oshort (opt) && *so == opt->key)
+      {
+       if (!oalias (opt))
+         real = opt;
+       if (ovisible (opt))
+         val = (*func)(opt, real, cookie);
+       so++;
+      }
+
+  return val;
+}
+
+static inline int
+hol_entry_long_iterate (const struct hol_entry *entry,
+                       int (*func)(const struct argp_option *opt,
+                                   const struct argp_option *real,
+                                   void *cookie),
+                       void *cookie)
+{
+  unsigned nopts;
+  int val = 0;
+  const struct argp_option *opt, *real = entry->opt;
+
+  for (opt = real, nopts = entry->num; nopts > 0 && !val; opt++, nopts--)
+    if (opt->name)
+      {
+       if (!oalias (opt))
+         real = opt;
+       if (ovisible (opt))
+         val = (*func)(opt, real, cookie);
+      }
+
+  return val;
+}
+\f
+/* Iterator that returns true for the first short option.  */
+static inline int
+until_short (const struct argp_option *opt, const struct argp_option *real,
+            void *cookie)
+{
+  return oshort (opt) ? opt->key : 0;
+}
+
+/* Returns the first valid short option in ENTRY, or 0 if there is none.  */
+static char
+hol_entry_first_short (const struct hol_entry *entry)
+{
+  return hol_entry_short_iterate (entry, until_short, 0);
+}
+
+/* Returns the first valid long option in ENTRY, or 0 if there is none.  */
+static const char *
+hol_entry_first_long (const struct hol_entry *entry)
+{
+  const struct argp_option *opt;
+  unsigned num;
+  for (opt = entry->opt, num = entry->num; num > 0; opt++, num--)
+    if (opt->name && ovisible (opt))
+      return opt->name;
+  return 0;
+}
+
+/* Returns the entry in HOL with the long option name NAME, or 0 if there is
+   none.  */
+static struct hol_entry *
+hol_find_entry (struct hol *hol, const char *name)
+{
+  struct hol_entry *entry = hol->entries;
+  unsigned num_entries = hol->num_entries;
+
+  while (num_entries-- > 0)
+    {
+      const struct argp_option *opt = entry->opt;
+      unsigned num_opts = entry->num;
+
+      while (num_opts-- > 0)
+       if (opt->name && ovisible (opt) && strcmp (opt->name, name) == 0)
+         return entry;
+       else
+         opt++;
+
+      entry++;
+    }
+
+  return 0;
+}
+\f
+/* If an entry with the long option NAME occurs in HOL, set it's special
+   sort position to GROUP.  */
+static void
+hol_set_group (struct hol *hol, const char *name, int group)
+{
+  struct hol_entry *entry = hol_find_entry (hol, name);
+  if (entry)
+    entry->group = group;
+}
+\f
+/* Order by group:  0, 1, 2, ..., n, -m, ..., -2, -1.
+   EQ is what to return if GROUP1 and GROUP2 are the same.  */
+static int
+group_cmp (int group1, int group2, int eq)
+{
+  if (group1 == group2)
+    return eq;
+  else if ((group1 < 0 && group2 < 0) || (group1 >= 0 && group2 >= 0))
+    return group1 - group2;
+  else
+    return group2 - group1;
+}
+
+/* Compare clusters CL1 & CL2 by the order that they should appear in
+   output.  */
+static int
+hol_cluster_cmp (const struct hol_cluster *cl1, const struct hol_cluster *cl2)
+{
+  /* If one cluster is deeper than the other, use its ancestor at the same
+     level, so that finding the common ancestor is straightforward.  */
+  while (cl1->depth < cl2->depth)
+    cl1 = cl1->parent;
+  while (cl2->depth < cl1->depth)
+    cl2 = cl2->parent;
+
+  /* Now reduce both clusters to their ancestors at the point where both have
+     a common parent; these can be directly compared.  */
+  while (cl1->parent != cl2->parent)
+    cl1 = cl1->parent, cl2 = cl2->parent;
+
+  return group_cmp (cl1->group, cl2->group, cl2->index - cl1->index);
+}
+
+/* Return the ancestor of CL that's just below the root (i.e., has a parent
+   of 0).  */
+static struct hol_cluster *
+hol_cluster_base (struct hol_cluster *cl)
+{
+  while (cl->parent)
+    cl = cl->parent;
+  return cl;
+}
+
+/* Return true if CL1 is a child of CL2.  */
+static int
+hol_cluster_is_child (const struct hol_cluster *cl1,
+                     const struct hol_cluster *cl2)
+{
+  while (cl1 && cl1 != cl2)
+    cl1 = cl1->parent;
+  return cl1 == cl2;
+}
+\f
+/* Given the name of a OPTION_DOC option, modifies NAME to start at the tail
+   that should be used for comparisons, and returns true iff it should be
+   treated as a non-option.  */
+static int
+canon_doc_option (const char **name)
+{
+  int non_opt;
+  /* Skip initial whitespace.  */
+  while (isspace (*name))
+    (*name)++;
+  /* Decide whether this looks like an option (leading `-') or not.  */
+  non_opt = (**name != '-');
+  /* Skip until part of name used for sorting.  */
+  while (**name && !isalnum (*name))
+    (*name)++;
+  return non_opt;
+}
+
+/* Order ENTRY1 & ENTRY2 by the order which they should appear in a help
+   listing.  */
+static int
+hol_entry_cmp (const struct hol_entry *entry1, const struct hol_entry *entry2)
+{
+  /* The group numbers by which the entries should be ordered; if either is
+     in a cluster, then this is just the group within the cluster.  */
+  int group1 = entry1->group, group2 = entry2->group;
+
+  if (entry1->cluster != entry2->cluster)
+    /* The entries are not within the same cluster, so we can't compare them
+       directly, we have to use the appropiate clustering level too.  */
+    if (! entry1->cluster)
+      /* ENTRY1 is at the `base level', not in a cluster, so we have to
+        compare it's group number with that of the base cluster in which
+        ENTRY2 resides.  Note that if they're in the same group, the
+        clustered option always comes laster.  */
+      return group_cmp (group1, hol_cluster_base (entry2->cluster)->group, -1);
+    else if (! entry2->cluster)
+      /* Likewise, but ENTRY2's not in a cluster.  */
+      return group_cmp (hol_cluster_base (entry1->cluster)->group, group2, 1);
+    else
+      /* Both entries are in clusters, we can just compare the clusters.  */
+      return hol_cluster_cmp (entry1->cluster, entry2->cluster);
+  else if (group1 == group2)
+    /* The entries are both in the same cluster and group, so compare them
+       alphabetically.  */
+    {
+      int short1 = hol_entry_first_short (entry1);
+      int short2 = hol_entry_first_short (entry2);
+      int doc1 = odoc (entry1->opt);
+      int doc2 = odoc (entry2->opt);
+      const char *long1 = hol_entry_first_long (entry1);
+      const char *long2 = hol_entry_first_long (entry2);
+
+      if (doc1)
+       doc1 = canon_doc_option (&long1);
+      if (doc2)
+       doc2 = canon_doc_option (&long2);
+
+      if (doc1 != doc2)
+       /* `documentation' options always follow normal options (or
+          documentation options that *look* like normal options).  */
+       return doc1 - doc2;
+      else if (!short1 && !short2 && long1 && long2)
+       /* Only long options.  */
+       return __strcasecmp (long1, long2);
+      else
+       /* Compare short/short, long/short, short/long, using the first
+          character of long options.  Entries without *any* valid
+          options (such as options with OPTION_HIDDEN set) will be put
+          first, but as they're not displayed, it doesn't matter where
+          they are.  */
+       {
+         char first1 = short1 ? short1 : long1 ? *long1 : 0;
+         char first2 = short2 ? short2 : long2 ? *long2 : 0;
+         int lower_cmp = tolower (first1) - tolower (first2);
+         /* Compare ignoring case, except when the options are both the
+            same letter, in which case lower-case always comes first.  */
+         return lower_cmp ? lower_cmp : first2 - first1;
+       }
+    }
+  else
+    /* Within the same cluster, but not the same group, so just compare
+       groups.  */
+    return group_cmp (group1, group2, 0);
+}
+
+/* Version of hol_entry_cmp with correct signature for qsort.  */
+static int
+hol_entry_qcmp (const void *entry1_v, const void *entry2_v)
+{
+  return hol_entry_cmp (entry1_v, entry2_v);
+}
+
+/* Sort HOL by group and alphabetically by option name (with short options
+   taking precedence over long).  Since the sorting is for display purposes
+   only, the shadowing of options isn't effected.  */
+static void
+hol_sort (struct hol *hol)
+{
+  if (hol->num_entries > 0)
+    qsort (hol->entries, hol->num_entries, sizeof (struct hol_entry),
+          hol_entry_qcmp);
+}
+\f
+/* Append MORE to HOL, destroying MORE in the process.  Options in HOL shadow
+   any in MORE with the same name.  */
+static void
+hol_append (struct hol *hol, struct hol *more)
+{
+  struct hol_cluster **cl_end = &hol->clusters;
+
+  /* Steal MORE's cluster list, and add it to the end of HOL's.  */
+  while (*cl_end)
+    cl_end = &(*cl_end)->next;
+  *cl_end = more->clusters;
+  more->clusters = 0;
+
+  /* Merge entries.  */
+  if (more->num_entries > 0)
+    if (hol->num_entries == 0)
+      {
+       hol->num_entries = more->num_entries;
+       hol->entries = more->entries;
+       hol->short_options = more->short_options;
+       more->num_entries = 0;  /* Mark MORE's fields as invalid.  */
+      }
+    else
+      /* append the entries in MORE to those in HOL, taking care to only add
+        non-shadowed SHORT_OPTIONS values.  */
+      {
+       unsigned left;
+       char *so, *more_so;
+       struct hol_entry *e;
+       unsigned num_entries = hol->num_entries + more->num_entries;
+       struct hol_entry *entries =
+         malloc (num_entries * sizeof (struct hol_entry));
+       unsigned hol_so_len = strlen (hol->short_options);
+       char *short_options =
+         malloc (hol_so_len + strlen (more->short_options) + 1);
+
+       memcpy (entries, hol->entries,
+               hol->num_entries * sizeof (struct hol_entry));
+       memcpy (entries + hol->num_entries, more->entries,
+               more->num_entries * sizeof (struct hol_entry));
+
+       memcpy (short_options, hol->short_options, hol_so_len);
+
+       /* Fix up the short options pointers from HOL.  */
+       for (e = entries, left = hol->num_entries; left > 0; e++, left--)
+         e->short_options += (short_options - hol->short_options);
+
+       /* Now add the short options from MORE, fixing up its entries too.  */
+       so = short_options + hol_so_len;
+       more_so = more->short_options;
+       for (left = more->num_entries; left > 0; e++, left--)
+         {
+           int opts_left;
+           const struct argp_option *opt;
+
+           e->short_options = so;
+
+           for (opts_left = e->num, opt = e->opt; opts_left; opt++, opts_left--)
+             {
+               int ch = *more_so;
+               if (oshort (opt) && ch == opt->key)
+                 /* The next short option in MORE_SO, CH, is from OPT.  */
+                 {
+                   if (! find_char (ch,
+                                    short_options, short_options + hol_so_len))
+                     /* The short option CH isn't shadowed by HOL's options,
+                        so add it to the sum.  */
+                     *so++ = ch;
+                   more_so++;
+                 }
+             }
+         }
+
+       *so = '\0';
+
+       free (hol->entries);
+       free (hol->short_options);
+
+       hol->entries = entries;
+       hol->num_entries = num_entries;
+       hol->short_options = short_options;
+      }
+
+  hol_free (more);
+}
+\f
+/* Inserts enough spaces to make sure STREAM is at column COL.  */
+static void
+indent_to (argp_fmtstream_t stream, unsigned col)
+{
+  int needed = col - __argp_fmtstream_point (stream);
+  while (needed-- > 0)
+    __argp_fmtstream_putc (stream, ' ');
+}
+
+/* If the option REAL has an argument, we print it in using the printf
+   format REQ_FMT or OPT_FMT depending on whether it's a required or
+   optional argument.  */
+static void
+arg (const struct argp_option *real, const char *req_fmt, const char *opt_fmt,
+     argp_fmtstream_t stream)
+{
+  if (real->arg)
+    if (real->flags & OPTION_ARG_OPTIONAL)
+      __argp_fmtstream_printf (stream, opt_fmt, _(real->arg));
+    else
+      __argp_fmtstream_printf (stream, req_fmt, _(real->arg));
+}
+\f
+/* Helper functions for hol_entry_help.  */
+
+/* Some state used while printing a help entry (used to communicate with
+   helper functions).  See the doc for hol_entry_help for more info, as most
+   of the fields are copied from its arguments.  */
+struct pentry_state
+{
+  const struct hol_entry *entry;
+  argp_fmtstream_t stream;
+  struct hol_entry **prev_entry;
+  int *sep_groups;
+
+  int first;                   /* True if nothing's been printed so far.  */
+};
+
+/* Prints STR as a header line, with the margin lines set appropiately, and
+   notes the fact that groups should be separated with a blank line.  Note
+   that the previous wrap margin isn't restored, but the left margin is reset
+   to 0.  */
+static void
+print_header (const char *str, struct pentry_state *st)
+{
+  if (*str)
+    {
+      if (st->prev_entry && *st->prev_entry)
+       __argp_fmtstream_putc (st->stream, '\n'); /* Precede with a blank line.  */
+      indent_to (st->stream, HEADER_COL);
+      __argp_fmtstream_set_lmargin (st->stream, HEADER_COL);
+      __argp_fmtstream_set_wmargin (st->stream, HEADER_COL);
+      __argp_fmtstream_puts (st->stream, str);
+      __argp_fmtstream_set_lmargin (st->stream, 0);
+    }
+
+  if (st->sep_groups)
+    *st->sep_groups = 1;       /* Separate subsequent groups. */
+}
+
+/* Inserts a comma if this isn't the first item on the line, and then makes
+   sure we're at least to column COL.  Also clears FIRST.  */
+static void
+comma (unsigned col, struct pentry_state *st)
+{
+  if (st->first)
+    {
+      const struct hol_entry *pe = st->prev_entry ? *st->prev_entry : 0;
+      const struct hol_cluster *cl = st->entry->cluster;
+
+      if (st->sep_groups && *st->sep_groups
+         && pe && st->entry->group != pe->group)
+       __argp_fmtstream_putc (st->stream, '\n');
+
+      if (pe && cl && pe->cluster != cl && cl->header && *cl->header
+         && !hol_cluster_is_child (pe->cluster, cl))
+       /* If we're changing clusters, then this must be the start of the
+          ENTRY's cluster unless that is an ancestor of the previous one
+          (in which case we had just popped into a sub-cluster for a bit).
+          If so, then print the cluster's header line.  */
+       {
+         int old_wm = __argp_fmtstream_wmargin (st->stream);
+         print_header (cl->header, st);
+         __argp_fmtstream_putc (st->stream, '\n');
+         __argp_fmtstream_set_wmargin (st->stream, old_wm);
+       }
+
+      st->first = 0;
+    }
+  else
+    __argp_fmtstream_puts (st->stream, ", ");
+
+  indent_to (st->stream, col);
+}
+\f
+/* Print help for ENTRY to STREAM.  *PREV_ENTRY should contain the last entry
+   printed before this, or null if it's the first, and if ENTRY is in a
+   different group, and *SEP_GROUPS is true, then a blank line will be
+   printed before any output.  *SEP_GROUPS is also set to true if a
+   user-specified group header is printed.  */
+static void
+hol_entry_help (struct hol_entry *entry, argp_fmtstream_t stream,
+               struct hol_entry **prev_entry, int *sep_groups)
+{
+  unsigned num;
+  const struct argp_option *real = entry->opt, *opt;
+  char *so = entry->short_options;
+  int old_lm = __argp_fmtstream_set_lmargin (stream, 0);
+  int old_wm = __argp_fmtstream_wmargin (stream);
+  struct pentry_state pest = { entry, stream, prev_entry, sep_groups, 1 };
+
+  /* First emit short options.  */
+  __argp_fmtstream_set_wmargin (stream, SHORT_OPT_COL); /* For truly bizarre cases. */
+  for (opt = real, num = entry->num; num > 0; opt++, num--)
+    if (oshort (opt) && opt->key == *so)
+      /* OPT has a valid (non shadowed) short option.  */
+      {
+       if (ovisible (opt))
+         {
+           comma (SHORT_OPT_COL, &pest);
+           __argp_fmtstream_putc (stream, '-');
+           __argp_fmtstream_putc (stream, *so);
+           arg (real, " %s", "[%s]", stream);
+         }
+       so++;
+      }
+
+  /* Now, long options.  */
+  if (odoc (real))
+    /* Really a `documentation' option.  */
+    {
+      __argp_fmtstream_set_wmargin (stream, DOC_OPT_COL);
+      for (opt = real, num = entry->num; num > 0; opt++, num--)
+       if (opt->name && ovisible (opt))
+         {
+           comma (DOC_OPT_COL, &pest);
+           /* Calling gettext here isn't quite right, since sorting will
+              have been done on the original; but documentation options
+              should be pretty rare anyway...  */
+           __argp_fmtstream_puts (stream, _(opt->name));
+         }
+    }
+  else
+    /* A realy long option.  */
+    {
+      __argp_fmtstream_set_wmargin (stream, LONG_OPT_COL);
+      for (opt = real, num = entry->num; num > 0; opt++, num--)
+       if (opt->name && ovisible (opt))
+         {
+           comma (LONG_OPT_COL, &pest);
+           __argp_fmtstream_printf (stream, "--%s", opt->name);
+           arg (real, "=%s", "[=%s]", stream);
+         }
+    }
+
+  __argp_fmtstream_set_lmargin (stream, 0);
+  if (pest.first)
+    /* Didn't print any switches, what's up?  */
+    if (!oshort (real) && !real->name && real->doc)
+      /* This is a group header, print it nicely.  */
+      print_header (real->doc, &pest);
+    else
+      /* Just a totally shadowed option or null header; print nothing.  */
+      goto cleanup;            /* Just return, after cleaning up.  */
+  else if (real->doc)
+    /* Now the option documentation.  */
+    {
+      unsigned col = __argp_fmtstream_point (stream);
+      const char *doc = real->doc;
+
+      __argp_fmtstream_set_lmargin (stream, OPT_DOC_COL);
+      __argp_fmtstream_set_wmargin (stream, OPT_DOC_COL);
+
+      if (col > OPT_DOC_COL + 3)
+       __argp_fmtstream_putc (stream, '\n');
+      else if (col >= OPT_DOC_COL)
+       __argp_fmtstream_puts (stream, "   ");
+      else
+       indent_to (stream, OPT_DOC_COL);
+
+      __argp_fmtstream_puts (stream, doc);
+
+      /* Reset the left margin.  */
+      __argp_fmtstream_set_lmargin (stream, 0);
+    }
+
+  __argp_fmtstream_putc (stream, '\n');
+
+  if (prev_entry)
+    *prev_entry = entry;
+
+cleanup:
+  __argp_fmtstream_set_lmargin (stream, old_lm);
+  __argp_fmtstream_set_wmargin (stream, old_wm);
+}
+\f
+/* Output a long help message about the options in HOL to STREAM.  */
+static void
+hol_help (struct hol *hol, argp_fmtstream_t stream)
+{
+  unsigned num;
+  struct hol_entry *entry;
+  struct hol_entry *last_entry = 0;
+  int sep_groups = 0;          /* True if we should separate different
+                                  sections with blank lines.   */
+  for (entry = hol->entries, num = hol->num_entries; num > 0; entry++, num--)
+    hol_entry_help (entry, stream, &last_entry, &sep_groups);
+}
+\f
+/* Helper functions for hol_usage.  */
+
+/* If OPT is a short option without an arg, append its key to the string
+   pointer pointer to by COOKIE, and advance the pointer.  */
+static int
+add_argless_short_opt (const struct argp_option *opt,
+                      const struct argp_option *real,
+                      void *cookie)
+{
+  char **snao_end = cookie;
+  if (! (opt->arg || real->arg))
+    *(*snao_end)++ = opt->key;
+  return 0;
+}
+
+/* If OPT is a short option with an arg, output a usage entry for it to the
+   stream pointed at by COOKIE.  */
+static int
+usage_argful_short_opt (const struct argp_option *opt,
+                       const struct argp_option *real,
+                       void *cookie)
+{
+  argp_fmtstream_t stream = cookie;
+  const char *arg = opt->arg;
+
+  if (! arg)
+    arg = real->arg;
+
+  if (arg)
+    {
+      arg = _(arg);
+
+      if ((opt->flags | real->flags) & OPTION_ARG_OPTIONAL)
+       __argp_fmtstream_printf (stream, " [-%c[%s]]", opt->key, arg);
+      else
+       {
+         /* Manually do line wrapping so that it (probably) won't
+            get wrapped at the embedded space.  */
+         if (__argp_fmtstream_point (stream) + 6 + strlen (arg)
+             >= __argp_fmtstream_rmargin (stream))
+           __argp_fmtstream_putc (stream, '\n');
+         else
+           __argp_fmtstream_putc (stream, ' ');
+         __argp_fmtstream_printf (stream, "[-%c %s]", opt->key, arg);
+       }
+    }
+
+  return 0;
+}
+
+/* Output a usage entry for the long option opt to the stream pointed at by
+   COOKIE.  */
+static int
+usage_long_opt (const struct argp_option *opt,
+               const struct argp_option *real,
+               void *cookie)
+{
+  argp_fmtstream_t stream = cookie;
+  const char *arg = opt->arg;
+
+  if (! arg)
+    arg = real->arg;
+
+  if (arg)
+    {
+      arg = gettext (arg);
+      if ((opt->flags | real->flags) & OPTION_ARG_OPTIONAL)
+       __argp_fmtstream_printf (stream, " [--%s[=%s]]", opt->name, arg);
+      else
+       __argp_fmtstream_printf (stream, " [--%s=%s]", opt->name, arg);
+    }
+  else
+    __argp_fmtstream_printf (stream, " [--%s]", opt->name);
+
+  return 0;
+}
+\f
+/* Print a short usage description for the arguments in HOL to STREAM.  */
+static void
+hol_usage (struct hol *hol, argp_fmtstream_t stream)
+{
+  if (hol->num_entries > 0)
+    {
+      unsigned nentries;
+      struct hol_entry *entry;
+      char *short_no_arg_opts = alloca (strlen (hol->short_options) + 1);
+      char *snao_end = short_no_arg_opts;
+
+      /* First we put a list of short options without arguments.  */
+      for (entry = hol->entries, nentries = hol->num_entries
+          ; nentries > 0
+          ; entry++, nentries--)
+       hol_entry_short_iterate (entry, add_argless_short_opt, &snao_end);
+      if (snao_end > short_no_arg_opts)
+       {
+         *snao_end++ = 0;
+         __argp_fmtstream_printf (stream, " [-%s]", short_no_arg_opts);
+       }
+
+      /* Now a list of short options *with* arguments.  */
+      for (entry = hol->entries, nentries = hol->num_entries
+          ; nentries > 0
+          ; entry++, nentries--)
+       hol_entry_short_iterate (entry, usage_argful_short_opt, stream);
+
+      /* Finally, a list of long options (whew!).  */
+      for (entry = hol->entries, nentries = hol->num_entries
+          ; nentries > 0
+          ; entry++, nentries--)
+       hol_entry_long_iterate (entry, usage_long_opt, stream);
+    }
+}
+\f
+/* Make a HOL containing all levels of options in ARGP.  CLUSTER is the
+   cluster in which ARGP's entries should be clustered, or 0.  */
+static struct hol *
+argp_hol (const struct argp *argp, struct hol_cluster *cluster)
+{
+  const struct argp_child *child = argp->children;
+  struct hol *hol = make_hol (argp->options, cluster);
+  if (child)
+    while (child->argp)
+      {
+       struct hol_cluster *child_cluster =
+         ((child->group || child->header)
+          /* Put CHILD->argp within its own cluster.  */
+          ? hol_add_cluster (hol, child->group, child->header,
+                             child - argp->children, cluster)
+          /* Just merge it into the parent's cluster.  */
+          : cluster);
+       hol_append (hol, argp_hol (child->argp, child_cluster)) ;
+       child++;
+      }
+  return hol;
+}
+\f
+/* Calculate how many different levels with alternative args strings exist in
+   ARGP.  */
+static size_t
+argp_args_levels (const struct argp *argp)
+{
+  size_t levels = 0;
+  const struct argp_child *child = argp->children;
+
+  if (argp->args_doc && strchr (argp->args_doc, '\n'))
+    levels++;
+
+  if (child)
+    while (child->argp)
+      levels += argp_args_levels ((child++)->argp);
+
+  return levels;
+}
+
+/* Print all the non-option args documented in ARGP to STREAM.  Any output is
+   preceded by a space.  LEVELS is a pointer to a byte vector the length
+   returned by argp_args_levels; it should be initialized to zero, and
+   updated by this routine for the next call if ADVANCE is true.  True is
+   returned as long as there are more patterns to output.  */
+static int
+argp_args_usage (const struct argp *argp, char **levels, int advance,
+                argp_fmtstream_t stream)
+{
+  char *our_level = *levels;
+  int multiple = 0;
+  const struct argp_child *child = argp->children;
+  const char *doc = _(argp->args_doc), *nl = 0;
+
+  if (doc)
+    {
+      nl = strchr (doc, '\n');
+      if (nl)
+       /* This is a `multi-level' args doc; advance to the correct position
+          as determined by our state in LEVELS, and update LEVELS.  */
+       {
+         int i;
+         multiple = 1;
+         for (i = 0; i < *our_level; i++)
+           doc = nl + 1, nl = strchr (doc, '\n');
+         (*levels)++;
+       }
+      if (! nl)
+       nl = doc + strlen (doc);
+
+      /* Manually do line wrapping so that it (probably) won't get wrapped at
+        any embedded spaces.  */
+      if (__argp_fmtstream_point (stream) + 1 + nl - doc
+         >= __argp_fmtstream_rmargin (stream))
+       __argp_fmtstream_putc (stream, '\n');
+      else
+       __argp_fmtstream_putc (stream, ' ');
+
+      __argp_fmtstream_write (stream, doc, nl - doc);
+    }
+
+  if (child)
+    while (child->argp)
+      advance = !argp_args_usage ((child++)->argp, levels, advance, stream);
+
+  if (advance && multiple)
+    /* Need to increment our level.  */
+    if (*nl)
+      /* There's more we can do here.  */
+      {
+       (*our_level)++;
+       advance = 0;            /* Our parent shouldn't advance also. */
+      }
+    else if (*our_level > 0)
+      /* We had multiple levels, but used them up; reset to zero.  */
+      *our_level = 0;
+
+  return !advance;
+}
+\f
+/* Print the documentation for ARGP to STREAM; if POST is false, then
+   everything preceeding a `\v' character in the documentation strings (or
+   the whole string, for those with none) is printed, otherwise, everything
+   following the `\v' character (nothing for strings without).  Each separate
+   bit of documentation is separated a blank line, and if PRE_BLANK is true,
+   then the first is as well.  If FIRST_ONLY is true, only the first
+   occurance is output.  Returns true if anything was output.  */
+static int
+argp_doc (const struct argp *argp, int post, int pre_blank, int first_only,
+         argp_fmtstream_t stream)
+{
+  const struct argp_child *child = argp->children;
+  const char *doc = argp->doc;
+  int anything = 0;
+
+  if (doc)
+    {
+      char *vt = strchr (doc, '\v');
+
+      if (pre_blank && (vt || !post))
+       __argp_fmtstream_putc (stream, '\n');
+
+      if (vt)
+       if (post)
+         __argp_fmtstream_puts (stream, vt + 1);
+       else
+         __argp_fmtstream_write (stream, doc, vt - doc);
+      else
+       if (! post)
+         __argp_fmtstream_puts (stream, doc);
+      if (__argp_fmtstream_point (stream) > __argp_fmtstream_lmargin (stream))
+       __argp_fmtstream_putc (stream, '\n');
+
+      anything = 1;
+    }
+  if (child)
+    while (child->argp && !(first_only && anything))
+      anything |=
+       argp_doc ((child++)->argp, post, anything || pre_blank, first_only,
+                 stream);
+
+  return anything;
+}
+\f
+/* Output a usage message for ARGP to STREAM.  FLAGS are from the set
+   ARGP_HELP_*.  NAME is what to use wherever a `program name' is needed. */
+void __argp_help (const struct argp *argp, FILE *stream,
+                 unsigned flags, char *name)
+{
+  int anything = 0;            /* Whether we've output anything.  */
+  struct hol *hol = 0;
+  argp_fmtstream_t fs;
+
+  if (! stream)
+    return;
+
+  fs = __argp_make_fmtstream (stream, 0, RMARGIN, 0);
+  if (! fs)
+    return;
+
+  if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG))
+    {
+      hol = argp_hol (argp, 0);
+
+      /* If present, these options always come last.  */
+      hol_set_group (hol, "help", -1);
+      hol_set_group (hol, "version", -1);
+
+      hol_sort (hol);
+    }
+
+  if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE))
+    /* Print a short `Usage:' message.  */
+    {
+      int first_pattern = 1, more_patterns;
+      size_t num_pattern_levels = argp_args_levels (argp);
+      char *pattern_levels = alloca (num_pattern_levels);
+
+      memset (pattern_levels, 0, num_pattern_levels);
+
+      do
+       {
+         int old_lm;
+         int old_wm = __argp_fmtstream_set_wmargin (fs, USAGE_INDENT);
+         char *levels = pattern_levels;
+
+         __argp_fmtstream_printf (fs, "%s %s",
+                                  first_pattern ? "Usage:" : "  or: ", name);
+
+         /* We set the lmargin as well as the wmargin, because hol_usage
+            manually wraps options with newline to avoid annoying breaks.  */
+         old_lm = __argp_fmtstream_set_lmargin (fs, USAGE_INDENT);
+
+         if (flags & ARGP_HELP_SHORT_USAGE)
+           /* Just show where the options go.  */
+           {
+             if (hol->num_entries > 0)
+               __argp_fmtstream_puts (fs, " [OPTION...]");
+           }
+         else
+           /* Actually print the options.  */
+           {
+             hol_usage (hol, fs);
+             flags |= ARGP_HELP_SHORT_USAGE; /* But only do so once.  */
+           }
+
+         more_patterns = argp_args_usage (argp, &levels, 1, fs);
+
+         __argp_fmtstream_set_wmargin (fs, old_wm);
+         __argp_fmtstream_set_lmargin (fs, old_lm);
+
+         __argp_fmtstream_putc (fs, '\n');
+         anything = 1;
+
+         first_pattern = 0;
+       }
+      while (more_patterns);
+    }
+
+  if (flags & ARGP_HELP_PRE_DOC)
+    anything |= argp_doc (argp, 0, 0, 1, fs);
+
+  if (flags & ARGP_HELP_SEE)
+    {
+      __argp_fmtstream_printf (fs,
+              "Try `%s --help' or `%s --usage' for more information.\n",
+              name, name);
+      anything = 1;
+    }
+
+  if (flags & ARGP_HELP_LONG)
+    /* Print a long, detailed help message.  */
+    {
+      /* Print info about all the options.  */
+      if (hol->num_entries > 0)
+       {
+         if (anything)
+           __argp_fmtstream_putc (fs, '\n');
+         hol_help (hol, fs);
+         anything = 1;
+       }
+    }
+
+  if (flags & ARGP_HELP_POST_DOC)
+    /* Print any documentation strings at the end.  */
+    anything |= argp_doc (argp, 1, anything, 0, fs);
+
+  if ((flags & ARGP_HELP_BUG_ADDR) && argp_program_bug_address)
+    {
+      if (anything)
+       __argp_fmtstream_putc (fs, '\n');
+      __argp_fmtstream_printf (fs, "Report bugs to %s.\n", argp_program_bug_address);
+      anything = 1;
+    }
+
+  if (hol)
+    hol_free (hol);
+
+  __argp_fmtstream_free (fs);
+}
+#ifdef weak_alias
+weak_alias (__argp_help, argp_help)
+#endif
+
+/* Output, if appropriate, a usage message for STATE to STREAM.  FLAGS are
+   from the set ARGP_HELP_*.  */
+void
+__argp_state_help (struct argp_state *state, FILE *stream, unsigned flags)
+{
+  if ((!state || ! (state->flags & ARGP_NO_ERRS)) && stream)
+    {
+      if (state && (state->flags & ARGP_LONG_ONLY))
+       flags |= ARGP_HELP_LONG_ONLY;
+
+      __argp_help (state ? state->argp : 0, stream, flags,
+                  state ? state->name : program_invocation_name);
+
+      if (!state || ! (state->flags & ARGP_NO_EXIT))
+       {
+         if (flags & ARGP_HELP_EXIT_ERR)
+           exit (1);
+         if (flags & ARGP_HELP_EXIT_OK)
+           exit (0);
+       }
+  }
+}
+#ifdef weak_alias
+weak_alias (__argp_state_help, argp_state_help)
+#endif
+\f
+/* If appropriate, print the printf string FMT and following args, preceded
+   by the program name and `:', to stderr, and followed by a `Try ... --help'
+   message, then exit (1).  */
+void
+__argp_error (struct argp_state *state, const char *fmt, ...)
+{
+  if (!state || !(state->flags & ARGP_NO_ERRS))
+    {
+      FILE *stream = state ? state->err_stream : stderr;
+
+      if (stream)
+       {
+         va_list ap;
+
+         fputs (state ? state->name : program_invocation_name, stream);
+         putc (':', stream);
+         putc (' ', stream);
+
+         va_start (ap, fmt);
+         vfprintf (stream, fmt, ap);
+         va_end (ap);
+
+         putc ('\n', stream);
+
+         __argp_state_help (state, stream, ARGP_HELP_STD_ERR);
+       }
+    }
+}
+#ifdef weak_alias
+weak_alias (__argp_error, argp_error)
+#endif
+\f
+/* Similar to the standard gnu error-reporting function error(), but will
+   respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
+   to STATE->err_stream.  This is useful for argument parsing code that is
+   shared between program startup (when exiting is desired) and runtime
+   option parsing (when typically an error code is returned instead).  The
+   difference between this function and argp_error is that the latter is for
+   *parsing errors*, and the former is for other problems that occur during
+   parsing but don't reflect a (syntactic) problem with the input.  */
+void
+__argp_failure (struct argp_state *state, int status, int errnum,
+             const char *fmt, ...)
+{
+  if (!state || !(state->flags & ARGP_NO_ERRS))
+    {
+      FILE *stream = state ? state->err_stream : stderr;
+
+      if (stream)
+       {
+         fputs (state ? state->name : program_invocation_name, stream);
+
+         if (fmt)
+           {
+             va_list ap;
+
+             putc (':', stream);
+             putc (' ', stream);
+
+             va_start (ap, fmt);
+             vfprintf (stream, fmt, ap);
+             va_end (ap);
+           }
+
+         if (errnum)
+           {
+             putc (':', stream);
+             putc (' ', stream);
+             fputs (strerror (errnum), stream);
+           }
+
+         putc ('\n', stream);
+
+         if (status)
+           exit (status);
+       }
+    }
+}
+#ifdef weak_alias
+weak_alias (__argp_failure, argp_failure)
+#endif
diff --git a/argp/argp-namefrob.h b/argp/argp-namefrob.h
new file mode 100644 (file)
index 0000000..fab7c9d
--- /dev/null
@@ -0,0 +1,90 @@
+/* Name frobnication for compiling argp outside of glibc
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@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.  */
+
+#if !_LIBC
+/* This code is written for inclusion in gnu-libc, and uses names in the
+   namespace reserved for libc.  If we're not compiling in libc, define those
+   names to be the normal ones instead.  */
+
+/* argp-parse functions */
+#undef __argp_parse
+#define __argp_parse argp_parse
+#undef __option_is_end
+#define __option_is_end _option_is_end
+#undef __option_is_short
+#define __option_is_short _option_is_short
+
+/* argp-help functions */
+#undef __argp_help
+#define __argp_help argp_help
+#undef __argp_error
+#define __argp_error argp_error
+#undef __argp_failure
+#define __argp_failure argp_failure
+#undef __argp_state_help
+#define __argp_state_help argp_state_help
+#undef __argp_usage
+#define __argp_usage argp_usage
+
+/* argp-fmtstream functions */
+#undef __argp_make_fmtstream
+#define __argp_make_fmtstream argp_make_fmtstream
+#undef __argp_fmtstream_free
+#define __argp_fmtstream_free argp_fmtstream_free
+#undef __argp_fmtstream_putc
+#define __argp_fmtstream_putc argp_fmtstream_putc
+#undef __argp_fmtstream_puts
+#define __argp_fmtstream_puts argp_fmtstream_puts
+#undef __argp_fmtstream_write
+#define __argp_fmtstream_write argp_fmtstream_write
+#undef __argp_fmtstream_printf
+#define __argp_fmtstream_printf argp_fmtstream_printf
+#undef __argp_fmtstream_set_lmargin
+#define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin
+#undef __argp_fmtstream_set_rmargin
+#define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin
+#undef __argp_fmtstream_set_wmargin
+#define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin
+#undef __argp_fmtstream_point
+#define __argp_fmtstream_point argp_fmtstream_point
+#undef __argp_fmtstream_update
+#define __argp_fmtstream_update _argp_fmtstream_update
+#undef __argp_fmtstream_ensure
+#define __argp_fmtstream_ensure _argp_fmtstream_ensure
+#undef __argp_fmtstream_lmargin
+#define __argp_fmtstream_lmargin argp_fmtstream_lmargin
+#undef __argp_fmtstream_rmargin
+#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
+#undef __argp_fmtstream_wmargin
+#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
+
+/* normal libc functions we call */
+#undef __sleep
+#define __sleep sleep
+#undef __strcasecmp
+#define __strcasecmp strcasecmp
+#undef __vsnprintf
+#define __vsnprintf vsnprintf
+
+#endif /* !_LIBC */
+
+#ifndef __set_errno
+#define __set_errno(e) (errno = (e))
+#endif
diff --git a/argp/argp-parse.c b/argp/argp-parse.c
new file mode 100644 (file)
index 0000000..f1f4ce9
--- /dev/null
@@ -0,0 +1,850 @@
+/* Hierarchial argument parsing, layered over getopt
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@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.  */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <limits.h>
+#include <getopt.h>
+
+#ifndef _
+/* This is for other GNU distributions with internationalized messages.
+   When compiling libc, the _ macro is predefined.  */
+#ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+# define _(msgid)       gettext (msgid)
+#else
+# define _(msgid)       (msgid)
+# define gettext(msgid) (msgid)
+#endif
+#endif
+
+#if _LIBC - 0
+#include <libc-lock.h>
+#else
+#ifdef HAVE_CTHREADS_H
+#include <cthreads.h>
+#endif
+#endif /* _LIBC */
+
+#include "argp.h"
+#include "argp-namefrob.h"
+
+/* Getopt return values.  */
+#define KEY_END (-1)           /* The end of the options.  */
+#define KEY_ARG 1              /* A non-option argument.  */
+#define KEY_ERR '?'            /* An error parsing the options.  */
+
+/* The meta-argument used to prevent any further arguments being interpreted
+   as options.  */
+#define QUOTE "--"
+
+/* The number of bits we steal in a long-option value for our own use.  */
+#define GROUP_BITS CHAR_BIT
+
+/* The number of bits available for the user value.  */
+#define USER_BITS ((sizeof ((struct option *)0)->val * CHAR_BIT) - GROUP_BITS)
+#define USER_MASK ((1 << USER_BITS) - 1)
+
+/* EZ alias for ARGP_ERR_UNKNOWN.  */
+#define EBADKEY ARGP_ERR_UNKNOWN
+\f
+/* Default options.  */
+
+/* When argp is given the --HANG switch, _ARGP_HANG is set and argp will sleep
+   for one second intervals, decrementing _ARGP_HANG until it's zero.  Thus
+   you can force the program to continue by attaching a debugger and setting
+   it to 0 yourself.  */
+volatile int _argp_hang = 0;
+
+#define OPT_PROGNAME   -2
+#define OPT_USAGE      -3
+#define OPT_HANG       -4
+
+static const struct argp_option argp_default_options[] =
+{
+  {"help",       '?',          0, 0,  "Give this help list", -1},
+  {"usage",      OPT_USAGE,    0, 0,  "Give a short usage message"},
+  {"program-name",OPT_PROGNAME,"NAME", OPTION_HIDDEN, "Set the program name"},
+  {"HANG",       OPT_HANG,    "SECS", OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
+     "Hang for SECS seconds (default 3600)"},
+  {0, 0}
+};
+
+static error_t
+argp_default_parser (int key, char *arg, struct argp_state *state)
+{
+  switch (key)
+    {
+    case '?':
+      __argp_state_help (state, state->out_stream, ARGP_HELP_STD_HELP);
+      break;
+    case OPT_USAGE:
+      __argp_state_help (state, state->out_stream,
+                      ARGP_HELP_USAGE | ARGP_HELP_EXIT_OK);
+      break;
+
+    case OPT_PROGNAME:         /* Set the program name.  */
+      program_invocation_name = arg;
+
+      /* [Note that some systems only have PROGRAM_INVOCATION_SHORT_NAME (aka
+        __PROGNAME), in which case, PROGRAM_INVOCATION_NAME is just defined
+        to be that, so we have to be a bit careful here.]  */
+      arg = strrchr (arg, '/');
+      if (arg)
+       program_invocation_short_name = arg + 1;
+      else
+       program_invocation_short_name = program_invocation_name;
+
+      if ((state->flags & (ARGP_PARSE_ARGV0 | ARGP_NO_ERRS))
+         == ARGP_PARSE_ARGV0)
+       state->argv[0] = program_invocation_name; /* Update what getopt uses too.  */
+
+      break;
+
+    case OPT_HANG:
+      _argp_hang = atoi (arg ? arg : "3600");
+      while (_argp_hang-- > 0)
+       __sleep (1);
+      break;
+
+    default:
+      return EBADKEY;
+    }
+  return 0;
+}
+
+static const struct argp argp_default_argp =
+  {argp_default_options, &argp_default_parser};
+
+\f
+static const struct argp_option argp_version_options[] =
+{
+  {"version",    'V',          0, 0,  "Print program version", -1},
+  {0, 0}
+};
+
+static error_t
+argp_version_parser (int key, char *arg, struct argp_state *state)
+{
+  switch (key)
+    {
+    case 'V':
+      if (argp_program_version_hook)
+       (*argp_program_version_hook) (state->out_stream, state);
+      else if (argp_program_version)
+       fprintf (state->out_stream, "%s\n", argp_program_version);
+      else
+       __argp_error (state, _("No version known!?"));
+      if (! (state->flags & ARGP_NO_EXIT))
+       exit (0);
+      break;
+    default:
+      return EBADKEY;
+    }
+  return 0;
+}
+
+static const struct argp argp_version_argp =
+  {argp_version_options, &argp_version_parser};
+\f
+/* Returns the offset into the getopt long options array LONG_OPTIONS of a
+   long option with called NAME, or -1 if none is found.  Passing NULL as
+   NAME will return the number of options.  */
+static int
+find_long_option (struct option *long_options, const char *name)
+{
+  struct option *l = long_options;
+  while (l->name != NULL)
+    if (name != NULL && strcmp (l->name, name) == 0)
+      return l - long_options;
+    else
+      l++;
+  if (name == NULL)
+    return l - long_options;
+  else
+    return -1;
+}
+\f
+/* If we can, we regulate access to getopt, which is non-reentrant, with a
+   mutex.  Since the case we're trying to guard against is two different
+   threads interfering, and it's possible that someone might want to call
+   argp_parse recursively (they're careful), we use a recursive lock if
+   possible.  */
+
+#if _LIBC - 0
+
+__libc_lock_define_initialized_recursive (static, getopt_lock)
+#define LOCK_GETOPT   __libc_lock_lock_recursive (getopt_lock)
+#define UNLOCK_GETOPT __libc_lock_unlock_recursive (getopt_lock)
+
+#else /* !_LIBC */
+#ifdef HAVE_CTHREADS_H
+
+static struct mutex getopt_lock = MUTEX_INITIALIZER;
+#define LOCK_GETOPT   mutex_lock (&getopt_lock)
+#define UNLOCK_GETOPT mutex_unlock (&getopt_lock)
+
+#else /* !HAVE_CTHREADS_H */
+
+#define LOCK_GETOPT    (void)0
+#define UNLOCK_GETOPT  (void)0
+
+#endif /* HAVE_CTHREADS_H */
+#endif /* _LIBC */
+
+/* This hack to allow programs that know what's going on to call argp
+   recursively.  If someday argp is changed not to use the non-reentrant
+   getopt interface, we can get rid of this shit.  XXX */
+void
+_argp_unlock_xxx (void)
+{
+  UNLOCK_GETOPT;
+}
+\f
+/* The state of a `group' during parsing.  Each group corresponds to a
+   particular argp structure from the tree of such descending from the top
+   level argp passed to argp_parse.  */
+struct group
+{
+  /* This group's parsing function.  */
+  argp_parser_t parser;
+
+  /* Points to the point in SHORT_OPTS corresponding to the end of the short
+     options for this group.  We use it to determine from which group a
+     particular short options is from.  */
+  char *short_end;
+
+  /* The number of non-option args sucessfully handled by this parser.  */
+  unsigned args_processed;
+
+  /* This group's parser's parent's group.  */
+  struct group *parent;
+  unsigned parent_index;       /* And the our position in the parent.   */
+
+  /* These fields are swapped into and out of the state structure when
+     calling this group's parser.  */
+  void *input, **child_inputs;
+  void *hook;
+};
+
+/* Call GROUP's parser with KEY and ARG, swapping any group-specific info
+   from STATE before calling, and back into state afterwards.  If GROUP has
+   no parser, EBADKEY is returned.  */
+static error_t
+group_parse (struct group *group, struct argp_state *state, int key, char *arg)
+{
+  if (group->parser)
+    {
+      error_t err;
+      state->hook = group->hook;
+      state->input = group->input;
+      state->child_inputs = group->child_inputs;
+      state->arg_num = group->args_processed;
+      err = (*group->parser)(key, arg, state);
+      group->hook = state->hook;
+      return err;
+    }
+  else
+    return EBADKEY;
+}
+\f
+struct parser
+{
+  const struct argp *argp;
+
+  /* SHORT_OPTS is the getopt short options string for the union of all the
+     groups of options.  */
+  char *short_opts;
+  /* LONG_OPTS is the array of getop long option structures for the union of
+     all the groups of options.  */
+  struct option *long_opts;
+
+  /* States of the various parsing groups.  */
+  struct group *groups;
+  /* The end of the GROUPS array.  */
+  struct group *egroup;
+  /* An vector containing storage for the CHILD_INPUTS field in all groups.  */
+  void **child_inputs;
+
+  /* True if we think using getopt is still useful; if false, then
+     remaining arguments are just passed verbatim with ARGP_KEY_ARG.  This is
+     cleared whenever getopt returns KEY_END, but may be set again if the user
+     moves the next argument pointer backwards.  */
+  int try_getopt;
+
+  /* State block supplied to parsing routines.  */
+  struct argp_state state;
+
+  /* Memory used by this parser.  */
+  void *storage;
+};
+\f
+/* The next usable entries in the various parser tables being filled in by
+   convert_options.  */
+struct parser_convert_state
+{
+  struct parser *parser;
+  char *short_end;
+  struct option *long_end;
+  void **child_inputs_end;
+};
+
+/* Converts all options in ARGP (which is put in GROUP) and ancestors
+   into getopt options stored in SHORT_OPTS and LONG_OPTS; SHORT_END and
+   CVT->LONG_END are the points at which new options are added.  Returns the
+   next unused group entry.  CVT holds state used during the conversion.  */
+static struct group *
+convert_options (const struct argp *argp,
+                struct group *parent, unsigned parent_index,
+                struct group *group, struct parser_convert_state *cvt)
+{
+  /* REAL is the most recent non-alias value of OPT.  */
+  const struct argp_option *real = argp->options;
+  const struct argp_child *children = argp->children;
+
+  if (real || argp->parser)
+    {
+      const struct argp_option *opt;
+
+      if (real)
+       for (opt = real; !__option_is_end (opt); opt++)
+         {
+           if (! (opt->flags & OPTION_ALIAS))
+             /* OPT isn't an alias, so we can use values from it.  */
+             real = opt;
+
+           if (! (real->flags & OPTION_DOC))
+             /* A real option (not just documentation).  */
+             {
+               if (__option_is_short (opt))
+                 /* OPT can be used as a short option.  */
+                 {
+                   *cvt->short_end++ = opt->key;
+                   if (real->arg)
+                     {
+                       *cvt->short_end++ = ':';
+                       if (real->flags & OPTION_ARG_OPTIONAL)
+                         *cvt->short_end++ = ':';
+                     }
+                   *cvt->short_end = '\0'; /* keep 0 terminated */
+                 }
+
+               if (opt->name
+                   && find_long_option (cvt->parser->long_opts, opt->name) < 0)
+                 /* OPT can be used as a long option.  */
+                 {
+                   cvt->long_end->name = opt->name;
+                   cvt->long_end->has_arg =
+                     (real->arg
+                      ? (real->flags & OPTION_ARG_OPTIONAL
+                         ? optional_argument
+                         : required_argument)
+                      : no_argument);
+                   cvt->long_end->flag = 0;
+                   /* we add a disambiguating code to all the user's
+                      values (which is removed before we actually call
+                      the function to parse the value); this means that
+                      the user loses use of the high 8 bits in all his
+                      values (the sign of the lower bits is preserved
+                      however)...  */
+                   cvt->long_end->val =
+                     ((opt->key | real->key) & USER_MASK)
+                     + (((group - cvt->parser->groups) + 1) << USER_BITS);
+
+                   /* Keep the LONG_OPTS list terminated.  */
+                   (++cvt->long_end)->name = NULL;
+                 }
+             }
+           }
+
+      group->parser = argp->parser;
+      group->short_end = cvt->short_end;
+      group->args_processed = 0;
+      group->parent = parent;
+      group->parent_index = parent_index;
+      group->input = 0;
+      group->hook = 0;
+      group->child_inputs = 0;
+
+      if (children)
+       /* Assign GROUP's CHILD_INPUTS field some space from
+           CVT->child_inputs_end.*/
+       {
+         unsigned num_children = 0;
+         while (children[num_children].argp)
+           num_children++;
+         group->child_inputs = cvt->child_inputs_end;
+         cvt->child_inputs_end += num_children;
+       }
+
+      parent = group++;
+    }
+  else
+    parent = 0;
+
+  if (children)
+    {
+      unsigned index = 0;
+      while (children->argp)
+       group =
+         convert_options (children++->argp, parent, index++, group, cvt);
+    }
+
+  return group;
+}
+
+/* Find the merged set of getopt options, with keys appropiately prefixed. */
+static void
+parser_convert (struct parser *parser, const struct argp *argp, int flags)
+{
+  struct parser_convert_state cvt;
+
+  cvt.parser = parser;
+  cvt.short_end = parser->short_opts;
+  cvt.long_end = parser->long_opts;
+  cvt.child_inputs_end = parser->child_inputs;
+
+  if (flags & ARGP_IN_ORDER)
+    *cvt.short_end++ = '-';
+  else if (flags & ARGP_NO_ARGS)
+    *cvt.short_end++ = '+';
+  *cvt.short_end = '\0';
+
+  cvt.long_end->name = NULL;
+
+  parser->argp = argp;
+
+  if (argp)
+    parser->egroup = convert_options (argp, 0, 0, parser->groups, &cvt);
+  else
+    parser->egroup = parser->groups; /* No parsers at all! */
+}
+\f
+/* Lengths of various parser fields which we will allocated.  */
+struct parser_sizes
+{
+  size_t short_len;            /* Getopt short options string.  */
+  size_t long_len;             /* Getopt long options vector.  */
+  size_t num_groups;           /* Group structures we allocate.  */
+  size_t num_child_inputs;     /* Child input slots.  */
+};
+
+/* For ARGP, increments the NUM_GROUPS field in SZS by the total number of
+ argp structures descended from it, and the SHORT_LEN & LONG_LEN fields by
+ the maximum lengths of the resulting merged getopt short options string and
+ long-options array, respectively.  */
+static void
+calc_sizes (const struct argp *argp,  struct parser_sizes *szs)
+{
+  const struct argp_child *child = argp->children;
+  const struct argp_option *opt = argp->options;
+
+  if (opt || argp->parser)
+    {
+      szs->num_groups++;
+      if (opt)
+       {
+         int num_opts = 0;
+         while (!__option_is_end (opt++))
+           num_opts++;
+         szs->short_len += num_opts * 3; /* opt + up to 2 `:'s */
+         szs->long_len += num_opts;
+       }
+    }
+
+  if (child)
+    while (child->argp)
+      {
+       calc_sizes ((child++)->argp, szs);
+       szs->num_child_inputs++;
+      }
+}
+
+/* Initializes PARSER to parse ARGP in a manner described by FLAGS.  */
+static error_t
+parser_init (struct parser *parser, const struct argp *argp,
+            int argc, char **argv, int flags, void *input)
+{
+  error_t err = 0;
+  struct group *group;
+  struct parser_sizes szs;
+
+  szs.short_len = (flags & ARGP_NO_ARGS) ? 0 : 1;
+  szs.long_len = 0;
+  szs.num_groups = 0;
+  szs.num_child_inputs = 0;
+
+  if (argp)
+    calc_sizes (argp, &szs);
+
+  /* Lengths of the various bits of storage used by PARSER.  */
+#define GLEN (szs.num_groups + 1) * sizeof (struct group)
+#define CLEN (szs.num_child_inputs * sizeof (void *))
+#define LLEN ((szs.long_len + 1) * sizeof (struct option))
+#define SLEN (szs.short_len + 1)
+
+  parser->storage = malloc (GLEN + CLEN + LLEN + SLEN);
+  if (! parser->storage)
+    return ENOMEM;
+
+  parser->groups = parser->storage;
+  parser->child_inputs = parser->storage + GLEN;
+  parser->long_opts = parser->storage + GLEN + CLEN;
+  parser->short_opts = parser->storage + GLEN + CLEN + LLEN;
+
+  memset (parser->child_inputs, 0, szs.num_child_inputs * sizeof (void *));
+  parser_convert (parser, argp, flags);
+
+  parser->try_getopt = 1;
+
+  memset (&parser->state, 0, sizeof (struct argp_state));
+  parser->state.argp = parser->argp;
+  parser->state.argc = argc;
+  parser->state.argv = argv;
+  parser->state.err_stream = stderr;
+  parser->state.out_stream = stdout;
+  parser->state.next = 0;      /* Tell getopt to initialize.  */
+
+  /* Call each parser for the first time, giving it a chance to propagate
+     values to child parsers.  */
+  if (parser->groups < parser->egroup)
+    parser->groups->input = input;
+  for (group = parser->groups;
+       group < parser->egroup && (!err || err == EBADKEY);
+       group++)
+    {
+      if (group->parent)
+       /* If a child parser, get the initial input value from the parent. */
+       group->input = group->parent->child_inputs[group->parent_index];
+      err = group_parse (group, &parser->state, ARGP_KEY_INIT, 0);
+    }
+  if (err == EBADKEY)
+    err = 0;                   /* Some parser didn't understand.  */
+
+  if (err)
+    return err;
+
+  if (parser->state.argv == argv && argv[0])
+    /* There's an argv[0]; use it for messages.  */
+    parser->state.name = argv[0];
+  else
+    parser->state.name = program_invocation_name;
+
+  /* Getopt is (currently) non-reentrant.  */
+  LOCK_GETOPT;
+
+  if (parser->state.flags & ARGP_NO_ERRS)
+    {
+      opterr = 0;
+      if (parser->state.flags & ARGP_PARSE_ARGV0)
+       /* getopt always skips ARGV[0], so we have to fake it out.  As long
+          as OPTERR is 0, then it shouldn't actually try to access it.  */
+       parser->state.argv--, parser->state.argc++;
+    }
+  else
+    opterr = 1;                /* Print error messages.  */
+
+  return 0;
+}
+\f
+/* Free any storage consumed by PARSER (but not PARSER itself).  */
+static error_t
+parser_finalize (struct parser *parser,
+                error_t err, int arg_ebadkey, int *end_index)
+{
+  struct group *group;
+
+  UNLOCK_GETOPT;
+
+  if (err == EBADKEY && arg_ebadkey)
+    /* Suppress errors generated by unparsed arguments.  */
+    err = 0;
+
+  if (! err)
+    if (parser->state.next == parser->state.argc)
+      /* We successfully parsed all arguments!  Call all the parsers again,
+        just a few more times... */
+      {
+       for (group = parser->groups;
+            group < parser->egroup && (!err || err==EBADKEY);
+            group++)
+         if (group->args_processed == 0)
+           err = group_parse (group, &parser->state, ARGP_KEY_NO_ARGS, 0);
+       for (group = parser->groups;
+            group < parser->egroup && (!err || err==EBADKEY);
+            group++)
+         err = group_parse (group, &parser->state, ARGP_KEY_END, 0);
+
+       if (err == EBADKEY)
+         err = 0;              /* Some parser didn't understand.  */
+      }
+    else if (end_index)
+      /* Return any remaining arguments to the user.  */
+      *end_index = parser->state.next;
+    else
+      /* No way to return the remaining arguments, they must be bogus. */
+      {
+       if (!(parser->state.flags & ARGP_NO_ERRS) && parser->state.err_stream)
+         fprintf (parser->state.err_stream,
+                  _("%s: Too many arguments\n"), parser->state.name);
+       err = EBADKEY;
+      }
+
+  /* Okay, we're all done, with either an error or success.  We only call the
+     parsers once more, to indicate which one.  */
+
+  if (err)
+    {
+      /* Maybe print an error message.  */
+      if (err == EBADKEY)
+       /* An appropriate message describing what the error was should have
+          been printed earlier.  */
+       __argp_state_help (&parser->state, parser->state.err_stream,
+                          ARGP_HELP_STD_ERR);
+
+      /* Since we didn't exit, give each parser an error indication.  */
+      for (group = parser->groups; group < parser->egroup; group++)
+       group_parse (group, &parser->state, ARGP_KEY_ERROR, 0);
+    }
+  else
+    /* Do final cleanup, including propagating back values from parsers.  */
+    {
+      /* We pass over the groups in reverse order so that child groups are
+        given a chance to do there processing before passing back a value to
+        the parent.  */
+      for (group = parser->egroup - 1
+          ; group >= parser->groups && (!err || err == EBADKEY)
+          ; group--)
+       err = group_parse (group, &parser->state, ARGP_KEY_SUCCESS, 0);
+      if (err == EBADKEY)
+       err = 0;                /* Some parser didn't understand.  */
+    }
+
+  if (err == EBADKEY)
+    err = EINVAL;
+
+  free (parser->storage);
+
+  return err;
+}
+\f
+/* Call the user parsers to parse the non-option argument VAL, at the current
+   position, returning any error.  */
+static error_t
+parser_parse_arg (struct parser *parser, char *val)
+{
+  int index = parser->state.next;
+  error_t err = EBADKEY;
+  struct group *group;
+
+  for (group = parser->groups
+       ; group < parser->egroup && err == EBADKEY
+       ; group++)
+    err = group_parse (group, &parser->state, ARGP_KEY_ARG, val);
+
+  if (!err)
+    if (parser->state.next >= index)
+      /* Remember that we successfully processed a non-option
+        argument -- but only if the user hasn't gotten tricky and set
+        the clock back.  */
+      (--group)->args_processed++;
+    else
+      /* The user wants to reparse some args, give getopt another try.  */
+      parser->try_getopt = 1;
+
+  return err;
+}
+\f
+/* Call the user parsers to parse the option OPT, with argument VAL, at the
+   current position, returning any error.  */
+static error_t
+parser_parse_opt (struct parser *parser, int opt, char *val)
+{
+  /* The group key encoded in the high bits; 0 for short opts or
+     group_number + 1 for long opts.  */
+  int group_key = opt >> USER_BITS;
+
+  if (group_key == 0)
+    /* A short option.  By comparing OPT's position in SHORT_OPTS to the
+       various starting positions in each group's SHORT_END field, we can
+       determine which group OPT came from.  */
+    {
+      struct group *group;
+      char *short_index = strchr (parser->short_opts, opt);
+
+      if (short_index)
+       for (group = parser->groups; group < parser->egroup; group++)
+         if (group->short_end > short_index)
+           return group_parse (group, &parser->state, opt, optarg);
+
+      return EBADKEY;          /* until otherwise asserted */
+    }
+  else
+    /* A long option.  We use shifts instead of masking for extracting
+       the user value in order to preserve the sign.  */
+    return
+      group_parse (&parser->groups[group_key - 1], &parser->state,
+                  (opt << GROUP_BITS) >> GROUP_BITS, optarg);
+}
+\f
+/* Parse the next argument in PARSER (as indicated by PARSER->state.next).
+   Any error from the parsers is returned, and *ARGP_EBADKEY indicates
+   whether a value of EBADKEY is due to an unrecognized argument (which is
+   generally not fatal).  */
+static error_t
+parser_parse_next (struct parser *parser, int *arg_ebadkey)
+{
+  int opt;
+  error_t err = 0;
+
+  if (parser->state.quoted && parser->state.next < parser->state.quoted)
+    /* The next argument pointer has been moved to before the quoted
+       region, so pretend we never saw the quoting `--', and give getopt
+       another chance.  If the user hasn't removed it, getopt will just
+       process it again.  */
+    parser->state.quoted = 0;
+
+  if (parser->try_getopt && !parser->state.quoted)
+    /* Give getopt a chance to parse this.  */
+    {
+      optind = parser->state.next; /* Put it back in OPTIND for getopt.  */
+      optopt = KEY_END;        /* Distinguish KEY_ERR from a real option.  */
+      if (parser->state.flags & ARGP_LONG_ONLY)
+       opt = getopt_long_only (parser->state.argc, parser->state.argv,
+                               parser->short_opts, parser->long_opts, 0);
+      else
+       opt = getopt_long (parser->state.argc, parser->state.argv,
+                          parser->short_opts, parser->long_opts, 0);
+      parser->state.next = optind; /* And see what getopt did.  */
+
+      if (opt == KEY_END)
+       /* Getopt says there are no more options, so stop using
+          getopt; we'll continue if necessary on our own.  */
+       {
+         parser->try_getopt = 0;
+         if (parser->state.next > 1
+             && strcmp (parser->state.argv[parser->state.next - 1], QUOTE)
+                  == 0)
+           /* Not only is this the end of the options, but it's a
+              `quoted' region, which may have args that *look* like
+              options, so we definitely shouldn't try to use getopt past
+              here, whatever happens.  */
+           parser->state.quoted = parser->state.next;
+       }
+      else if (opt == KEY_ERR && optopt != KEY_END)
+       /* KEY_ERR can have the same value as a valid user short
+          option, but in the case of a real error, getopt sets OPTOPT
+          to the offending character, which can never be KEY_END.  */
+       {
+         *arg_ebadkey = 0;
+         return EBADKEY;
+       }
+    }
+  else
+    opt = KEY_END;
+
+  if (opt == KEY_END)
+    /* We're past what getopt considers the options.  */
+    if (parser->state.next >= parser->state.argc
+       || (parser->state.flags & ARGP_NO_ARGS))
+      /* Indicate that we're done.  */
+      {
+       *arg_ebadkey = 1;
+       return EBADKEY;
+      }
+    else
+      /* A non-option arg.  */
+      err =
+       parser_parse_arg (parser, parser->state.argv[parser->state.next++]);
+  else if (opt == KEY_ARG)
+    /* A non-option argument; try each parser in turn.  */
+    err = parser_parse_arg (parser, optarg);
+  else
+    err = parser_parse_opt (parser, opt, optarg);
+
+  if (err == EBADKEY)
+    {
+      *arg_ebadkey = (opt == KEY_END || opt == KEY_ARG);
+      parser->state.next--;    /* Put back the unused argument.  */
+    }
+
+  return err;
+}
+\f
+/* Parse the options strings in ARGC & ARGV according to the argp in ARGP.
+   FLAGS is one of the ARGP_ flags above.  If END_INDEX is non-NULL, the
+   index in ARGV of the first unparsed option is returned in it.  If an
+   unknown option is present, EINVAL is returned; if some parser routine
+   returned a non-zero value, it is returned; otherwise 0 is returned.  */
+error_t
+__argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags,
+             int *end_index, void *input)
+{
+  error_t err;
+  struct parser parser;
+
+  /* If true, then err == EBADKEY is a result of a non-option argument failing
+     to be parsed (which in some cases isn't actually an error).  */
+  int arg_ebadkey = 0;
+
+  if (! (flags & ARGP_NO_HELP))
+    /* Add our own options.  */
+    {
+      struct argp_child *child = alloca (4 * sizeof (struct argp_child));
+      struct argp *top_argp = alloca (sizeof (struct argp));
+
+      /* TOP_ARGP has no options, it just serves to group the user & default
+        argps.  */
+      memset (top_argp, 0, sizeof (*top_argp));
+      top_argp->children = child;
+
+      memset (child, 0, 4 * sizeof (struct argp_child));
+
+      if (argp)
+       (child++)->argp = argp;
+      (child++)->argp = &argp_default_argp;
+      if (argp_program_version || argp_program_version_hook)
+       (child++)->argp = &argp_version_argp;
+      child->argp = 0;
+
+      argp = top_argp;
+    }
+
+  /* Construct a parser for these arguments.  */
+  err = parser_init (&parser, argp, argc, argv, flags, input);
+
+  if (! err)
+    /* Parse! */
+    {
+      while (! err)
+       err = parser_parse_next (&parser, &arg_ebadkey);
+      err = parser_finalize (&parser, err, arg_ebadkey, end_index);
+    }
+
+  return err;
+}
+#ifdef weak_alias
+weak_alias (__argp_parse, argp_parse)
+#endif
diff --git a/argp/argp-pv.c b/argp/argp-pv.c
new file mode 100644 (file)
index 0000000..59e6f8d
--- /dev/null
@@ -0,0 +1,25 @@
+/* Default definition for ARGP_PROGRAM_VERSION.
+   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@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.  */
+
+/* If set by the user program to a non-zero value, then a default option
+   --version is added (unless the ARGP_NO_HELP flag is used), which will
+   print this this string followed by a newline and exit (unless the
+   ARGP_NO_EXIT flag is used).  Overridden by ARGP_PROGRAM_VERSION_HOOK.  */
+char *argp_program_version = 0;
diff --git a/argp/argp-pvh.c b/argp/argp-pvh.c
new file mode 100644 (file)
index 0000000..ed60aa9
--- /dev/null
@@ -0,0 +1,32 @@
+/* Default definition for ARGP_PROGRAM_VERSION_HOOK.
+   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@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.  */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "argp.h"
+
+/* If set by the user program to a non-zero value, then a default option
+   --version is added (unless the ARGP_NO_HELP flag is used), which calls
+   this function with a stream to print the version to and a pointer to the
+   current parsing state, and then exits (unless the ARGP_NO_EXIT flag is
+   used).  This variable takes precedent over ARGP_PROGRAM_VERSION.  */
+void (*argp_program_version_hook) (FILE *stream, struct argp_state *state) = 0;
diff --git a/argp/argp-test.c b/argp/argp-test.c
new file mode 100644 (file)
index 0000000..ae72b22
--- /dev/null
@@ -0,0 +1,147 @@
+/* Test program for argp argument parser
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@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.  */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <argp.h>
+
+char *argp_program_version = "argp-test 1.0";
+\f
+struct argp_option sub_options[] =
+{
+  {"subopt1",       's',     0,  0, "Nested option 1"},
+  {"subopt2",       'S',     0,  0, "Nested option 2"},
+
+  { 0, 0, 0, 0, "Some more nested options:", 10},
+  {"subopt3",       'p',     0,  0, "Nested option 3"},
+
+  {"subopt4",       'q',     0,  0, "Nested option 4", 1},
+
+  {0}
+};
+
+static const char sub_args_doc[] = "STRING...\n-";
+static const char sub_doc[] = "\vThis is the doc string from the sub-arg-parser.";
+
+static error_t
+sub_parse_opt (int key, char *arg, struct argp_state *state)
+{
+  switch (key)
+    {
+    case ARGP_KEY_NO_ARGS:
+      printf ("NO SUB ARGS\n");
+      break;
+    case ARGP_KEY_ARG:
+      printf ("SUB ARG: %s\n", arg);
+      break;
+
+    case 's' : case 'S': case 'p': case 'q':
+      printf ("SUB KEY %c\n", key);
+      break;
+
+    default:
+      return ARGP_ERR_UNKNOWN;
+    }
+  return 0;
+}
+
+static struct argp sub_argp = {
+  sub_options, sub_parse_opt, sub_args_doc, sub_doc
+};
+\f
+#define OPT_PGRP 1
+#define OPT_SESS 2
+
+struct argp_option options[] =
+{
+  {"pid",       'p',     "PID", 0, "List the process PID"},
+  {"pgrp",      OPT_PGRP,"PGRP",0, "List processes in the process group PGRP"},
+  {"no-parent", 'P',    0,     0, "Include processes without parents"},
+  {0,           'x',     0,     OPTION_ALIAS},
+  {"all-fields",'Q',     0,     0, "Don't elide unusable fields (normally"
+                                  " if there's some reason ps can't"
+                                  " print a field for any process, it's"
+                                  " removed from the output entirely)" },
+  {"reverse",   'r',    0,      0, "Reverse the order of any sort"},
+  {"gratuitously-long-reverse-option", 0, 0, OPTION_ALIAS},
+  {"session",  OPT_SESS,"SID",  OPTION_ARG_OPTIONAL,
+                                  "Add the processes from the session"
+                                  " SID (which defaults to the sid of"
+                                  " the current process)" },
+
+  {0,0,0,0, "Here are some more options:"},
+  {"foonly", 'f', "ZOT", 0, "Glork a foonly"},
+  {"zaza", 'z', 0, 0, "Snit a zar"},
+
+  {0}
+};
+
+static const char args_doc[] = "STRING";
+static const char doc[] = "Test program for argp."
+ "\vThis doc string comes after the options."
+ "\nHey!  Some manual formatting!";
+
+static error_t
+parse_opt (int key, char *arg, struct argp_state *state)
+{
+  switch (key)
+    {
+    case ARGP_KEY_NO_ARGS:
+      printf ("NO ARGS\n");
+      break;
+
+    case ARGP_KEY_ARG:
+      if (state->arg_num > 0)
+       return ARGP_ERR_UNKNOWN; /* Leave it for the sub-arg parser.  */
+      printf ("ARG: %s\n", arg);
+      break;
+
+    case 'p': case 'P': case OPT_PGRP: case 'x': case 'Q':
+    case 'r': case OPT_SESS: case 'f': case 'z':
+      {
+       char buf[10];
+       if (isprint (key))
+         sprintf (buf, "%c", key);
+       else
+         sprintf (buf, "%d", key);
+       if (arg)
+         printf ("KEY %s: %s\n", buf, arg);
+       else
+         printf ("KEY %s\n", buf);
+      }
+      break;
+
+    default:
+      return ARGP_ERR_UNKNOWN;
+    }
+  return 0;
+}
+
+static struct argp_child argp_children[] = { { &sub_argp }, { 0 } };
+static struct argp argp = { options, parse_opt, args_doc, doc, argp_children };
+\f
+int
+main (int argc, char **argv)
+{
+  argp_parse (&argp, argc, argv, 0, 0, 0);
+  return 0;
+}
diff --git a/argp/argp-xinl.c b/argp/argp-xinl.c
new file mode 100644 (file)
index 0000000..35a8f83
--- /dev/null
@@ -0,0 +1,37 @@
+/* Real definitions for extern inline functions in argp.h
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@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.  */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define ARGP_EI
+#undef __OPTIMIZE__
+#define __OPTIMIZE__
+#include "argp.h"
+
+/* Add weak aliases.  */
+#if _LIBC - 0 && defined (weak_alias)
+
+weak_alias (__argp_usage, argp_usage)
+weak_alias (__option_is_short, _option_is_short)
+weak_alias (__option_is_end, _option_is_end)
+
+#endif
diff --git a/argp/argp.h b/argp/argp.h
new file mode 100644 (file)
index 0000000..be72756
--- /dev/null
@@ -0,0 +1,488 @@
+/* Hierarchial argument parsing, layered over getopt.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Written by Miles Bader <miles@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.  */
+
+#ifndef __ARGP_H__
+#define __ARGP_H__
+
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <getopt.h>
+
+#ifndef __const
+#define __const const
+#endif
+
+#ifndef __P
+# if (defined (__STDC__) && __STDC__) || defined (__cplusplus)
+#  define __P(args)    args
+# else
+#  define __P(args)    ()
+# endif
+#endif
+\f
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+/* A description of a particular option.  A pointer to an array of
+   these is passed in the OPTIONS field of an argp structure.  Each option
+   entry can correspond to one long option and/or one short option; more
+   names for the same option can be added by following an entry in an option
+   array with options having the OPTION_ALIAS flag set.  */
+struct argp_option
+{
+  /* The long option name.  For more than one name for the same option, you
+     can use following options with the OPTION_ALIAS flag set.  */
+  __const char *name;
+
+  /* What key is returned for this option.  If > 0 and printable, then it's
+     also accepted as a short option.  */
+  int key;
+
+  /* If non-NULL, this is the name of the argument associated with this
+     option, which is required unless the OPTION_ARG_OPTIONAL flag is set. */
+  __const char *arg;
+
+  /* OPTION_ flags.  */
+  int flags;
+
+  /* The doc string for this option.  If both NAME and KEY are 0, This string
+     will be printed outdented from the normal option column, making it
+     useful as a group header (it will be the first thing printed in its
+     group); in this usage, it's conventional to end the string with a `:'.  */
+  __const char *doc;
+
+  /* The group this option is in.  In a long help message, options are sorted
+     alphabetically within each group, and the groups presented in the order
+     0, 1, 2, ..., n, -m, ..., -2, -1.  Every entry in an options array with
+     if this field 0 will inherit the group number of the previous entry, or
+     zero if it's the first one, unless its a group header (NAME and KEY both
+     0), in which case, the previous entry + 1 is the default.  Automagic
+     options such as --help are put into group -1.  */
+  int group;
+};
+
+/* The argument associated with this option is optional.  */
+#define OPTION_ARG_OPTIONAL    0x1
+
+/* This option isn't displayed in any help messages.  */
+#define OPTION_HIDDEN          0x2
+
+/* This option is an alias for the closest previous non-alias option.  This
+   means that it will be displayed in the same help entry, and will inherit
+   fields other than NAME and KEY from the aliased option.  */
+#define OPTION_ALIAS           0x4
+
+/* This option isn't actually an option (and so should be ignored by the
+   actual option parser), but rather an arbitrary piece of documentation that
+   should be displayed in much the same manner as the options.  If this flag
+   is set, then the option NAME field is displayed unmodified (e.g., no `--'
+   prefix is added) at the left-margin (where a *short* option would normally
+   be displayed), and the documentation string in the normal place.  For
+   purposes of sorting, any leading whitespace and puncuation is ignored,
+   except that if the first non-whitespace character is not `-', this entry
+   is displayed after all options (and OPTION_DOC entries with a leading `-')
+   in the same group.  */
+#define OPTION_DOC             0x8
+\f
+struct argp;                   /* fwd declare this type */
+struct argp_state;             /* " */
+struct argp_child;             /* " */
+
+/* The type of a pointer to an argp parsing function.  */
+typedef error_t (*argp_parser_t)(int key, char *arg, struct argp_state *state);
+
+/* What to return for unrecognized keys.  For special ARGP_KEY_ keys, such
+   returns will simply be ignored.  For user keys, this error will be turned
+   into EINVAL (if the call to argp_parse is such that errors are propagated
+   back to the user instead of exiting); returning EINVAL itself would result
+   in an immediate stop to parsing in *all* cases.  */
+#define ARGP_ERR_UNKNOWN       E2BIG /* Hurd should never need E2BIG.  XXX */
+
+/* Special values for the KEY argument to an argument parsing function.
+   ARGP_ERR_UNKNOWN should be returned if they aren't understood.
+
+   The sequence of keys to parser calls is either (where opt is a user key):
+       ARGP_KEY_INIT (opt | ARGP_KEY_ARG)... ARGP_KEY_END
+   or  ARGP_KEY_INIT opt... ARGP_KEY_NO_ARGS ARGP_KEY_END
+
+   If an error occurs, then the parser is called with ARGP_KEY_ERR, and no
+   other calls are made.  */
+
+/* This is not an option at all, but rather a command line argument.  If a
+   parser receiving this key returns success, the fact is recorded, and the
+   ARGP_KEY_NO_ARGS case won't be used.  HOWEVER, if while processing the
+   argument, a parser function decrements the NEXT field of the state it's
+   passed, the option won't be considered processed; this is to allow you to
+   actually modify the argument (perhaps into an option), and have it
+   processed again.  */
+#define ARGP_KEY_ARG           0
+/* There are no more command line arguments at all.  */
+#define ARGP_KEY_END           0x1000001
+/* Because it's common to want to do some special processing if there aren't
+   any non-option args, user parsers are called with this key if they didn't
+   successfully process any non-option arguments.  Called just before
+   ARGP_KEY_END (where more general validity checks on previously parsed
+   arguments can take place).  */
+#define ARGP_KEY_NO_ARGS       0x1000002
+/* Passed in before any parsing is done.  Afterwards, the values of each
+   element of the CHILD_INPUT field, if any, in the state structure is
+   copied to each child's state to be the initial value of the INPUT field.  */
+#define ARGP_KEY_INIT          0x1000003
+/* Passed in when parsing has successfully been completed (even if there are
+   still arguments remaining).  */
+#define ARGP_KEY_SUCCESS       0x1000004
+/* Passed in if an error occurs (in which case a call with ARGP_KEY_SUCCESS is
+   never made, so any cleanup must be done here).  */
+#define ARGP_KEY_ERROR         0x1000005
+
+/* An argp structure contains a set of getopt options declarations, a
+   function to deal with getting one, and an optional pointer to another
+   argp structure.  When actually parsing options, getopt is called with
+   the union of all the argp structures chained together through their
+   CHILD pointers, with conflicts being resolved in favor of the first
+   occurance in the chain.  */
+struct argp
+{
+  /* An array of argp_option structures, terminated by an entry with both
+     NAME and KEY having a value of 0.  */
+  __const struct argp_option *options;
+
+  /* What to do with an option from this structure.  KEY is the key
+     associated with the option, and ARG is any associated argument (NULL if
+     none was supplied).  If KEY isn't understood, ARGP_ERR_UNKNOWN should be
+     returned.  If a non-zero, non-ARGP_ERR_UNKNOWN value is returned, then
+     parsing is stopped immediately, and that value is returned from
+     argp_parse().  For special (non-user-supplied) values of KEY, see the
+     ARGP_KEY_ definitions below.  */
+  argp_parser_t parser;
+
+  /* A string describing what other arguments are wanted by this program.  It
+     is only used by argp_usage to print the `Usage:' message.  If it
+     contains newlines, the strings separated by them are considered
+     alternative usage patterns, and printed on separate lines (lines after
+     the first are prefix by `  or: ' instead of `Usage:').  */
+  __const char *args_doc;
+
+  /* If non-NULL, a string containing extra text to be printed before and
+     after the options in a long help message (separated by a vertical tab
+     `\v' character).  */
+  __const char *doc;
+
+  /* A vector of argp_children structures, terminated by a member with a 0
+     argp field, pointing to child argps should be parsed with this one.  Any
+     conflicts are resolved in favor of this argp, or early argps in the
+     CHILDREN list.  This field is useful if you use libraries that supply
+     their own argp structure, which you want to use in conjunction with your
+     own.  */
+  __const struct argp_child *children;
+};
+\f
+/* When an argp has a non-zero CHILDREN field, it should point to a vector of
+   argp_child structures, each of which describes a subsidiary argp.  */
+struct argp_child
+{
+  /* The child parser.  */
+  __const struct argp *argp;
+
+  /* Flags for this child.  */
+  int flags;
+
+  /* If non-zero, an optional header to be printed in help output before the
+     child options.  As a side-effect, a non-zero value forces the child
+     options to be grouped together; to achieve this effect without actually
+     printing a header string, use a value of "".  */
+  __const char *header;
+
+  /* Where to group the child options relative to the other (`consolidated')
+     options in the parent argp; the values are the same as the GROUP field
+     in argp_option structs, but all child-groupings follow parent options at
+     a particular group level.  If both this field and HEADER are zero, then
+     they aren't grouped at all, but rather merged with the parent options
+     (merging the child's grouping levels with the parents).  */
+  int group;
+};
+\f
+/* Parsing state.  This is provided to parsing functions called by argp,
+   which may examine and, as noted, modify fields.  */
+struct argp_state
+{
+  /* The top level ARGP being parsed.  */
+  __const struct argp *argp;
+
+  /* The argument vector being parsed.  May be modified.  */
+  int argc;
+  char **argv;
+
+  /* The index in ARGV of the next arg that to be parsed.  May be modified. */
+  int next;
+
+  /* The flags supplied to argp_parse.  May be modified.  */
+  unsigned flags;
+
+  /* While calling a parsing function with a key of ARGP_KEY_ARG, this is the
+     number of the current arg, starting at zero, and incremented after each
+     such call returns.  At all other times, this is the number of such
+     arguments that have been processed.  */
+  unsigned arg_num;
+
+  /* If non-zero, the index in ARGV of the first argument following a special
+     `--' argument (which prevents anything following being interpreted as an
+     option).  Only set once argument parsing has proceeded past this point. */
+  int quoted;
+
+  /* An arbitrary pointer passed in from the user.  */
+  void *input;
+  /* Values to pass to child parsers.  This vector will be the same length as
+     the number of children for the current parser.  */
+  void **child_inputs;
+
+  /* For the parser's use.  Initialized to 0.  */
+  void *hook;
+
+  /* The name used when printing messages.  This is initialized to ARGV[0],
+     or PROGRAM_INVOCATION_NAME if that is unavailable.  */
+  char *name;
+
+  /* Streams used when argp prints something.  */
+  FILE *err_stream;            /* For errors; initialized to stderr. */
+  FILE *out_stream;            /* For information; initialized to stdout. */
+};
+\f
+/* Flags for argp_parse (note that the defaults are those that are
+   convenient for program command line parsing): */
+
+/* Don't ignore the first element of ARGV.  Normally (and always unless
+   ARGP_NO_ERRS is set) the first element of the argument vector is
+   skipped for option parsing purposes, as it corresponds to the program name
+   in a command line.  */
+#define ARGP_PARSE_ARGV0  0x01
+
+/* Don't print error messages for unknown options to stderr; unless this flag
+   is set, ARGP_PARSE_ARGV0 is ignored, as ARGV[0] is used as the program
+   name in the error messages.  This flag implies ARGP_NO_EXIT (on the
+   assumption that silent exiting upon errors is bad behaviour).  */
+#define ARGP_NO_ERRS   0x02
+
+/* Don't parse any non-option args.  Normally non-option args are parsed by
+   calling the parse functions with a key of ARGP_KEY_ARG, and the actual arg
+   as the value.  Since it's impossible to know which parse function wants to
+   handle it, each one is called in turn, until one returns 0 or an error
+   other than ARGP_ERR_UNKNOWN; if an argument is handled by no one, the
+   argp_parse returns prematurely (but with a return value of 0).  If all
+   args have been parsed without error, all parsing functions are called one
+   last time with a key of ARGP_KEY_END.  This flag needn't normally be set,
+   as the normal behavior is to stop parsing as soon as some argument can't
+   be handled.  */
+#define ARGP_NO_ARGS   0x04
+
+/* Parse options and arguments in the same order they occur on the command
+   line -- normally they're rearranged so that all options come first. */
+#define ARGP_IN_ORDER  0x08
+
+/* Don't provide the standard long option --help, which causes usage and
+      option help information to be output to stdout, and exit (0) called. */
+#define ARGP_NO_HELP   0x10
+
+/* Don't exit on errors (they may still result in error messages).  */
+#define ARGP_NO_EXIT   0x20
+
+/* Use the gnu getopt `long-only' rules for parsing arguments.  */
+#define ARGP_LONG_ONLY 0x40
+
+/* Turns off any message-printing/exiting options.  */
+#define ARGP_SILENT    (ARGP_NO_EXIT | ARGP_NO_ERRS | ARGP_NO_HELP)
+
+/* Parse the options strings in ARGC & ARGV according to the options in ARGP.
+   FLAGS is one of the ARGP_ flags above.  If ARG_INDEX is non-NULL, the
+   index in ARGV of the first unparsed option is returned in it.  If an
+   unknown option is present, ARGP_ERR_UNKNOWN is returned; if some parser
+   routine returned a non-zero value, it is returned; otherwise 0 is
+   returned.  This function may also call exit unless the ARGP_NO_HELP flag
+   is set.  INPUT is a pointer to a value to be passed in to the parser.  */
+error_t argp_parse __P ((__const struct argp *__argp,
+                        int __argc, char **__argv, unsigned __flags,
+                        int *__arg_index, void *__input));
+error_t __argp_parse __P ((__const struct argp *__argp,
+                          int __argc, char **__argv, unsigned __flags,
+                          int *__arg_index, void *__input));
+\f
+/* Global variables.  */
+
+/* If defined or set by the user program to a non-zero value, then a default
+   option --version is added (unless the ARGP_NO_HELP flag is used), which
+   will print this this string followed by a newline and exit (unless the
+   ARGP_NO_EXIT flag is used).  Overridden by ARGP_PROGRAM_VERSION_HOOK.  */
+extern char *argp_program_version;
+
+/* If defined or set by the user program to a non-zero value, then a default
+   option --version is added (unless the ARGP_NO_HELP flag is used), which
+   calls this function with a stream to print the version to and a pointer to
+   the current parsing state, and then exits (unless the ARGP_NO_EXIT flag is
+   used).  This variable takes precedent over ARGP_PROGRAM_VERSION.  */
+extern void (*argp_program_version_hook) __P ((FILE *__stream,
+                                              struct argp_state *__state));
+
+/* If defined or set by the user program, it should point to string that is
+   the bug-reporting address for the program.  It will be printed by
+   argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various
+   standard help messages), embedded in a sentence that says something like
+   `Report bugs to ADDR.'.  */
+extern char *argp_program_bug_address;
+\f
+/* Flags for argp_help.  */
+#define ARGP_HELP_USAGE                0x01 /* a Usage: message. */
+#define ARGP_HELP_SHORT_USAGE  0x02 /*  " but don't actually print options. */
+#define ARGP_HELP_SEE          0x04 /* a `Try ... for more help' message. */
+#define ARGP_HELP_LONG         0x08 /* a long help message. */
+#define ARGP_HELP_PRE_DOC      0x10 /* doc string preceding long help.  */
+#define ARGP_HELP_POST_DOC     0x20 /* doc string following long help.  */
+#define ARGP_HELP_DOC          (ARGP_HELP_PRE_DOC | ARGP_HELP_POST_DOC)
+#define ARGP_HELP_BUG_ADDR     0x40 /* bug report address */
+#define ARGP_HELP_LONG_ONLY    0x80 /* modify output appropriately to
+                                       reflect ARGP_LONG_ONLY mode.  */
+
+/* These ARGP_HELP flags are only understood by argp_state_help.  */
+#define ARGP_HELP_EXIT_ERR     0x100 /* Call exit(1) instead of returning.  */
+#define ARGP_HELP_EXIT_OK      0x200 /* Call exit(0) instead of returning.  */
+
+/* The standard thing to do after a program command line parsing error, if an
+   error message has already been printed.  */
+#define ARGP_HELP_STD_ERR \
+  (ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
+/* The standard thing to do after a program command line parsing error, if no
+   more specific error message has been printed.  */
+#define ARGP_HELP_STD_USAGE \
+  (ARGP_HELP_SHORT_USAGE | ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
+/* The standard thing to do in response to a --help option.  */
+#define ARGP_HELP_STD_HELP \
+  (ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_EXIT_OK \
+   | ARGP_HELP_DOC | ARGP_HELP_BUG_ADDR)
+
+/* Output a usage message for ARGP to STREAM.  FLAGS are from the set
+   ARGP_HELP_*.  */
+extern void argp_help __P ((__const struct argp *__argp, FILE *__stream,
+                           unsigned __flags, char *__name));
+extern void __argp_help __P ((__const struct argp *__argp, FILE *__stream,
+                             unsigned __flags, char *__name));
+\f
+/* The following routines are intended to be called from within an argp
+   parsing routine (thus taking an argp_state structure as the first
+   argument).  They may or may not print an error message and exit, depending
+   on the flags in STATE -- in any case, the caller should be prepared for
+   them *not* to exit, and should return an appropiate error after calling
+   them.  [argp_usage & argp_error should probably be called argp_state_...,
+   but they're used often enough that they should be short]  */
+
+/* Output, if appropriate, a usage message for STATE to STREAM.  FLAGS are
+   from the set ARGP_HELP_*.  */
+extern void argp_state_help __P ((struct argp_state *__state, FILE *__stream,
+                                 unsigned __flags));
+extern void __argp_state_help __P ((struct argp_state *__state, FILE *__stream,
+                                   unsigned __flags));
+
+/* Possibly output the standard usage message for ARGP to stderr and exit.  */
+extern void argp_usage __P ((struct argp_state *__state));
+extern void __argp_usage __P ((struct argp_state *__state));
+
+/* If appropriate, print the printf string FMT and following args, preceded
+   by the program name and `:', to stderr, and followed by a `Try ... --help'
+   message, then exit (1).  */
+void argp_error __P ((struct argp_state *__state, __const char *__fmt, ...))
+     __attribute__ ((__format__ (__printf__, 2, 3)));
+void __argp_error __P ((struct argp_state *__state, __const char *__fmt, ...))
+     __attribute__ ((__format__ (__printf__, 2, 3)));
+
+/* Similar to the standard gnu error-reporting function error(), but will
+   respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
+   to STATE->err_stream.  This is useful for argument parsing code that is
+   shared between program startup (when exiting is desired) and runtime
+   option parsing (when typically an error code is returned instead).  The
+   difference between this function and argp_error is that the latter is for
+   *parsing errors*, and the former is for other problems that occur during
+   parsing but don't reflect a (syntactic) problem with the input.  */
+void argp_failure __P ((struct argp_state *__state,
+                       int __status, int __errnum, __const char *__fmt, ...))
+     __attribute__ ((__format__ (__printf__, 4, 5)));
+void __argp_failure __P ((struct argp_state *__state,
+                         int __status, int __errnum, __const char *__fmt, ...))
+     __attribute__ ((__format__ (__printf__, 4, 5)));
+
+/* Returns true if the option OPT is a valid short option.  */
+extern int _option_is_short __P ((__const struct argp_option *__opt));
+extern int __option_is_short __P ((__const struct argp_option *__opt));
+
+/* Returns true if the option OPT is in fact the last (unused) entry in an
+   options array.  */
+extern int _option_is_end __P ((__const struct argp_option *__opt));
+extern int __option_is_end __P ((__const struct argp_option *__opt));
+\f
+#ifdef __OPTIMIZE__
+
+#if !_LIBC
+# define __argp_usage argp_usage
+# define __argp_state_help argp_state_help
+# define __option_is_short _option_is_short
+# define __option_is_end _option_is_end
+#endif
+
+#ifndef ARGP_EI
+# define ARGP_EI extern inline
+#endif
+
+ARGP_EI void
+__argp_usage (struct argp_state *__state)
+{
+  __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
+}
+
+ARGP_EI int
+__option_is_short (__const struct argp_option *__opt)
+{
+  if (__opt->flags & OPTION_DOC)
+    return 0;
+  else
+    {
+      int __key = __opt->key;
+      return __key > 0 && isprint (__key);
+    }
+}
+
+ARGP_EI int
+__option_is_end (__const struct argp_option *__opt)
+{
+  return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
+}
+
+#if !_LIBC
+# undef __argp_usage
+# undef __argp_state_help
+# undef __option_is_short
+# undef __option_is_end
+#endif
+
+#endif /* __OPTIMIZE__ */
+
+#ifdef  __cplusplus
+}
+#endif
+
+#endif /* __ARGP_H__ */
index b8e5bf0750c80ded32971973743dfc3626a720d2..a9425e40914d6f2673fb5563729271e19181505e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
 
@@ -34,6 +34,7 @@ catopen (const char *cat_name, int flag)
 {
   __nl_catd result;
   const char *env_var;
+  const char *nlspath;
 
   result = (__nl_catd) malloc (sizeof (*result));
   if (result == NULL)
@@ -82,10 +83,9 @@ catopen (const char *cat_name, int flag)
          return (nl_catd) -1;
        }
 
-      if (__secure_getenv ("NLSPATH") != NULL)
-       result->nlspath = __strdup (getenv ("NLSPATH"));
-      else
-       result->nlspath = __strdup (NLSPATH);
+      nlspath = __secure_getenv ("NLSPATH");
+      result->nlspath = __strdup (nlspath != NULL && *nlspath != '\0'
+                                 ? nlspath : NLSPATH);
 
       if (result->nlspath == NULL)
        {
index f76edf0abdfa9b01b11cc8af20f816c926f7a988..a17ce2c4459c328588733f41f5490d28edf0424f 100644 (file)
@@ -21,7 +21,7 @@
 #
 subdir := ctype
 
-routines       := ctype ctype-extn
+routines       := ctype ctype-extn ctype_l
 aux            := ctype-info
 
 tests  := test_ctype
index ccf5552c858966eccd425f567d3b64be3eac0eca..d229f60b775ae379528de61c2239e08624bd4880 100644 (file)
@@ -1,32 +1,68 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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.  */
-
-#include <ansidecl.h>
+   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.  */
 
 #define        __NO_CTYPE
 #include <ctype.h>
 
 /* Real function versions of the non-ANSI ctype functions.  */
 
-int DEFUN(isblank, (c), int c) { return __isctype ((c), _ISblank); }
+int
+isblank (int c)
+{
+  return __isctype (c, _ISblank);
+}
+
+int
+_tolower (int c)
+{
+  return __tolower (c);
+}
+int
+_toupper (int c)
+{
+  return __toupper (c);
+}
+
+int
+toascii (int c)
+{
+  return __toascii (c);
+}
+int
+isascii (int c)
+{
+  return __isascii (c);
+}
+
 
-int DEFUN(_tolower, (c), int c) { return __tolower(c); }
-int DEFUN(_toupper, (c), int c) { return __toupper(c); }
+int
+__isblank_l (int c, __locale_t l)
+{
+  return __isctype_l (c, _ISblank, l);
+}
 
-int DEFUN(toascii, (c), int c) { return __toascii(c); }
-int DEFUN(isascii, (c), int c) { return __isascii(c); }
+int
+__toascii_l (int c, __locale_t l)
+{
+  return __toascii (c);
+}
+int
+__isascii_l (int c, __locale_t l)
+{
+  return __isascii (c);
+}
index 70f86ea4eeeb0a6b4a24e7c6e8256f421f25d56d..a7688f7d00f49dfa5eb91e59746c6a57718f3537 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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 <ctype.h>
 #include "../locale/localeinfo.h"
index ee874de057b5bfe82cd60a42cf6d7938f2c64f9b..f9ceb35c082210e77d0e363a6978d718738e01cc 100644 (file)
@@ -1,22 +1,20 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1997 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.  */
-
-#include <ansidecl.h>
+   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.  */
 
 #define        __NO_CTYPE
 #include <ctype.h>
@@ -24,28 +22,28 @@ Cambridge, MA 02139, USA.  */
 /* Provide real-function versions of all the ctype macros.  */
 
 #define        func(name, type) \
-  int DEFUN(name, (c), int c) { return __isctype(c, type); }
-
-func(isalnum, _ISalnum)
-func(isalpha, _ISalpha)
-func(iscntrl, _IScntrl)
-func(isdigit, _ISdigit)
-func(islower, _ISlower)
-func(isgraph, _ISgraph)
-func(isprint, _ISprint)
-func(ispunct, _ISpunct)
-func(isspace, _ISspace)
-func(isupper, _ISupper)
-func(isxdigit, _ISxdigit)
+  int name (int c) { return __isctype (c, type); }
+
+func (isalnum, _ISalnum)
+func (isalpha, _ISalpha)
+func (iscntrl, _IScntrl)
+func (isdigit, _ISdigit)
+func (islower, _ISlower)
+func (isgraph, _ISgraph)
+func (isprint, _ISprint)
+func (ispunct, _ISpunct)
+func (isspace, _ISspace)
+func (isupper, _ISupper)
+func (isxdigit, _ISxdigit)
 
 int
-DEFUN(tolower, (c), int c)
+tolower (int c)
 {
   return __tolower (c);
 }
 
 int
-DEFUN(toupper, (c), int c)
+toupper (int c)
 {
   return __toupper (c);
 }
index 64ca26e04f10ac82ffdbe51eb6a4fd76ebab529f..bd128445bc8314531ec529b705b59556d527f69c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 96, 97 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
@@ -159,6 +159,83 @@ __exctype (_tolower);
 
 #endif /* Not __NO_CTYPE.  */
 
+
+#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
+   (almost) opaque type for the user level programs.  */
+# include <xlocale.h>
+
+/* These definitions are similar to the ones above but all functions
+   take as an argument a handle for the locale which shall be used.  */
+#define        __isctype_l(c, type, locale) \
+  ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type)
+
+#define        __tolower_l(c, locale)  ((int) (locale)->__ctype_tolower[(int) (c)])
+#define        __toupper_l(c, locale)  ((int) (locale)->__ctype_toupper[(int) (c)])
+
+#define        __exctype_l(name)       extern int name __P ((int, __locale_t))
+
+/* The following names are all functions:
+     int isCHARACTERISTIC(int c, locale_t *locale);
+   which return nonzero iff C has CHARACTERISTIC.
+   For the meaning of the characteristic names, see the `enum' above.  */
+__exctype_l (__isalnum_l);
+__exctype_l (__isalpha_l);
+__exctype_l (__iscntrl_l);
+__exctype_l (__isdigit_l);
+__exctype_l (__islower_l);
+__exctype_l (__isgraph_l);
+__exctype_l (__isprint_l);
+__exctype_l (__ispunct_l);
+__exctype_l (__isspace_l);
+__exctype_l (__isupper_l);
+__exctype_l (__isxdigit_l);
+
+__exctype_l (__isblank_l);
+
+
+/* Return the lowercase version of C in locale L.  */
+extern int __tolower_l __P ((int __c, __locale_t __l));
+
+/* Return the uppercase version of C.  */
+extern int __toupper_l __P ((int __c, __locale_t __l));
+
+
+#ifndef        __NO_CTYPE
+#define        __isalnum_l(c,l)        __isctype_l((c), _ISalnum, (l))
+#define        __isalpha_l(c,l)        __isctype_l((c), _ISalpha, (l))
+#define        __iscntrl_l(c,l)        __isctype_l((c), _IScntrl, (l))
+#define        __isdigit_l(c,l)        __isctype_l((c), _ISdigit, (l))
+#define        __islower_l(c,l)        __isctype_l((c), _ISlower, (l))
+#define        __isgraph_l(c,l)        __isctype_l((c), _ISgraph, (l))
+#define        __isprint_l(c,l)        __isctype_l((c), _ISprint, (l))
+#define        __ispunct_l(c,l)        __isctype_l((c), _ISpunct, (l))
+#define        __isspace_l(c,l)        __isctype_l((c), _ISspace, (l))
+#define        __isupper_l(c,l)        __isctype_l((c), _ISupper, (l))
+#define        __isxdigit_l(c,l)       __isctype_l((c), _ISxdigit, (l))
+
+#define        __isblank_l(c,l)        __isctype_l((c), _ISblank, (l))
+
+#if defined(__USE_SVID) || defined(__USE_MISC) || defined(__USE_XOPEN)
+#define        __isascii_l(c,l)        __isascii(c)
+#define        __toascii_l(c,l)        __toascii(c)
+#endif
+
+#endif /* Not __NO_CTYPE.  */
+
+#endif /* Use GNU.  */
+
 __END_DECLS
 
 #endif /* ctype.h  */
diff --git a/ctype/ctype_l.c b/ctype/ctype_l.c
new file mode 100644 (file)
index 0000000..a1608df
--- /dev/null
@@ -0,0 +1,49 @@
+/* Copyright (C) 1991, 1992, 1997 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.  */
+
+#define        __NO_CTYPE
+#include <ctype.h>
+
+/* Provide real-function versions of all the ctype macros.  */
+
+#define        func(name, type) \
+  int name (int c, __locale_t l) { return __isctype_l (c, type, l); }
+
+func (__isalnum_l, _ISalnum)
+func (__isalpha_l, _ISalpha)
+func (__iscntrl_l, _IScntrl)
+func (__isdigit_l, _ISdigit)
+func (__islower_l, _ISlower)
+func (__isgraph_l, _ISgraph)
+func (__isprint_l, _ISprint)
+func (__ispunct_l, _ISpunct)
+func (__isspace_l, _ISspace)
+func (__isupper_l, _ISupper)
+func (__isxdigit_l, _ISxdigit)
+
+int
+(__tolower_l) (int c, __locale_t l)
+{
+  return __tolower_l (c, l);
+}
+
+int
+(__toupper_l) (int c, __locale_t l)
+{
+  return __toupper_l (c, l);
+}
index de21b8adfe47d262cb8420e25e8fb862b763547a..a1f72492ebd826f5b52adc6084f03c73d3592c24 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991, 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1994, 1996, 1997 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 <limits.h>
 #include <ctype.h>
 #include <stdio.h>
@@ -30,7 +29,7 @@ Cambridge, MA 02139, USA.  */
 __inline
 #endif
 static void
-DEFUN(print_char, (c), unsigned char c)
+print_char (unsigned char c)
 {
   printf("%d/", (int) c);
   if (isgraph(c))
@@ -40,9 +39,9 @@ DEFUN(print_char, (c), unsigned char c)
 }
 
 int
-DEFUN(main, (argc, argv), int argc AND char **argv)
+main (int argc, char **argv)
 {
-  register unsigned short int c;
+  unsigned short int c;
   int lose = 0;
 
 #define TRYEM do {                                                           \
index a7bdf3820ee7426795cac1455bc8d7fdabcd7413..6c62380e993d44c18edc7286534bee917a951e0d 100644 (file)
@@ -1,28 +1,26 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1997 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 <dirent.h>
 #include <string.h>
 
 int
-DEFUN(alphasort, (a, b),
-      CONST PTR a AND CONST PTR b)
+alphasort (const void *a, const void *b)
 {
   return strcmp (((struct dirent *) a)->d_name,
                 ((struct dirent *) b)->d_name);
index 606bd42591b93baaca7f9a85e4c95be7a71fe857..38f770f0ed3926edfb1c30d78f4c8193cc05ea05 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1993, 1997 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>
 #include <stddef.h>
 #include <stdio.h>
@@ -25,44 +24,44 @@ Cambridge, MA 02139, USA.  */
 
 
 void
-DEFUN(test, (name), CONST char *name)
+test (const char *name)
 {
   DIR *dirp;
   struct dirent *entp;
 
-  puts(name);
+  puts (name);
 
-  dirp = opendir(name);
+  dirp = opendir (name);
   if (dirp == NULL)
     {
-      perror("opendir");
+      perror ("opendir");
       return;
     }
 
   errno = 0;
-  while ((entp = readdir(dirp)) != NULL)
-    printf("%s\tfile number %lu\n",
-          entp->d_name, (unsigned long int) entp->d_fileno);
+  while ((entp = readdir (dirp)) != NULL)
+    printf ("%s\tfile number %lu\n",
+           entp->d_name, (unsigned long int) entp->d_fileno);
 
   if (errno)
     perror ("readdir");
 
-  if (closedir(dirp) < 0)
-    perror("closedir");
+  if (closedir (dirp) < 0)
+    perror ("closedir");
 }
 
 int
-DEFUN(main, (argc, argv), int argc AND char **argv)
+main (int argc, char **argv)
 {
   --argc;
   ++argv;
 
   if (argc == 0)
-    test(".");
+    test (".");
   else
     while (argc-- > 0)
-      test(*argv++);
+      test (*argv++);
 
-  exit(0);
-  return(0);
+  exit (0);
+  return 0;
 }
index 46669194783390b78409ef899a1603e768249338..b69b8a075469a9a5031e565474285594ba29e71d 100644 (file)
@@ -22,7 +22,7 @@ subdir                := elf
 
 headers                = elf.h elfclass.h link.h dlfcn.h
 routines       = $(dl-routines) dl-open dl-close dl-symbol dl-support \
-                 enbl-secure
+                 dl-version enbl-secure
 
 # The core dynamic linking functions are in libc for the static and
 # profiled libraries.
@@ -39,7 +39,7 @@ distribute    = $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
 
 extra-libs      = libdl
 extra-libs-others = $(extra-libs)
-libdl-routines := dlopen dlclose dlsym dlerror dladdr
+libdl-routines := dlopen dlclose dlsym dlvsym dlerror dladdr
 
 before-compile = $(objpfx)trusted-dirs.h
 
index a19ccff6268b3528c813e79e3b3afdef69e9f2e1..263bd65eb09084e881871bfa7fc0ee2997c3e18d 100644 (file)
@@ -66,9 +66,9 @@ _dl_signal_error (int errcode,
   else if (receiver)
     {
       /* We are inside _dl_receive_error.  Call the user supplied
-        handler and resume the work.  The receiver will still
+        handler and resume the work.  The receiver will still be
         installed.  */
-      (*receiver) (errstring, objname);
+      (*receiver) (errcode, objname, errstring);
     }
   else
     {
index 7368858f640cec1361f00e57cd1967611278bfb6..e3de0764ecae5088478c0d1a198aeb71ab9545c5 100644 (file)
@@ -154,11 +154,34 @@ _dl_map_object_from_fd (char *name, int fd, char *realname,
   for (l = _dl_loaded; l; l = l->l_next)
     if (! strcmp (realname, l->l_name))
       {
+       struct libname_list *lnp, *lastp;
        /* The object is already loaded.
           Just bump its reference count and return it.  */
        __close (fd);
-       free (name);
+
+       /* If the name is not in the list of names for this object add
+          it.  */
        free (realname);
+       lastp = NULL;
+       for (lnp = l->l_libname; lnp != NULL; lastp = lnp, lnp = lnp->next)
+         if (strcmp (name, lnp->name) == 0)
+           {
+             free (name);
+             break;
+           }
+       if (lnp == NULL)
+         {
+           struct libname_list *newname = malloc (sizeof *newname);
+           if (newname == NULL)
+             /* No more memory.  */
+             lose (ENOMEM, "cannot allocate name record");
+           /* The object should have a libname set.  */
+           assert (lastp != NULL);
+
+           newname->name = name;
+           newname->next = NULL;
+           lastp->next = newname;
+         }
        ++l->l_opencount;
        return l;
       }
@@ -517,8 +540,7 @@ _dl_map_object (struct link_map *loader, const char *name, int type,
 
   /* Look for this name among those already loaded.  */
   for (l = _dl_loaded; l; l = l->l_next)
-    if (! strcmp (name, l->l_libname) || /* NAME was requested before.  */
-       ! strcmp (name, l->l_name) || /* NAME was found before.  */
+    if (_dl_does_name_match_p (name, l) ||
        /* If the requested name matches the soname of a loaded object,
           use that object.  */
        (l->l_info[DT_SONAME] &&
@@ -559,15 +581,17 @@ _dl_map_object (struct link_map *loader, const char *name, int type,
                                 l->l_info[DT_STRTAB]->d_un.d_ptr +
                                 l->l_info[DT_RPATH]->d_un.d_val), NULL);
       /* Try an environment variable (unless setuid).  */
-      if (fd == -1 && ! __libc_enable_secure)
+      if (fd == -1)
        {
          static const char *trusted_dirs[] =
          {
 #include "trusted-dirs.h"
            NULL
          };
+         const char *ld_library_path = getenv ("LD_LIBRARY_PATH");
 
-         trypath (getenv ("LD_LIBRARY_PATH"), trusted_dirs);
+         if (ld_library_path != NULL && *ld_library_path != '\0')
+           trypath (ld_library_path, trusted_dirs);
        }
       if (fd == -1)
        {
index 1000a52e0df207a298f2e3c00e1ad1ccc902720c..06d1d09b90f5070462fbb747b168818ee8bf51f7 100644 (file)
@@ -1,5 +1,5 @@
 /* Look up a symbol in the loaded objects.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997 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
@@ -22,6 +22,9 @@
 #include <assert.h>
 #include <string.h>
 
+#include "../stdio-common/_itoa.h"
+
+#define VERSTAG(tag)   (DT_NUM + DT_PROCNUM + DT_VERSIONTAGIDX (tag))
 
 struct sym_val
   {
@@ -30,22 +33,46 @@ struct sym_val
   };
 
 
-/* This is the hashing function specified by the ELF ABI.  */
+/* This is the hashing function specified by the ELF ABI.  In the
+   first five operations now overflow is possible so we optimized it a
+   bit.  */
 static inline unsigned
 _dl_elf_hash (const char *name)
 {
   unsigned long int hash = 0;
-  while (*name != '\0')
+  if (*name != '\0')
     {
-      unsigned long int hi;
       hash = (hash << 4) + *name++;
-      hi = hash & 0xf0000000;
-      if (hi != 0)
+      if (*name != '\0')
        {
-         hash ^= hi >> 24;
-         /* The ELF ABI says `hash &= ~hi', but this is equivalent
-            in this case and on some machines one insn instead of two.  */
-         hash ^= hi;
+         hash = (hash << 4) + *name++;
+         if (*name != '\0')
+           {
+             hash = (hash << 4) + *name++;
+             if (*name != '\0')
+               {
+                 hash = (hash << 4) + *name++;
+                 if (*name != '\0')
+                   {
+                     hash = (hash << 4) + *name++;
+                     while (*name != '\0')
+                       {
+                         unsigned long int hi;
+                         hash = (hash << 4) + *name++;
+                         hi = hash & 0xf0000000;
+                         if (hi != 0)
+                           {
+                             hash ^= hi >> 24;
+                             /* The ELF ABI says `hash &= ~hi', but
+                                this is equivalent in this case and
+                                on some machines one insn instead of
+                                two.  */
+                             hash ^= hi;
+                           }
+                       }
+                   }
+               }
+           }
        }
     }
   return hash;
@@ -57,7 +84,8 @@ static inline ElfW(Addr)
 do_lookup (const char *undef_name, unsigned long int hash,
           const ElfW(Sym) **ref, struct sym_val *result,
           struct link_map *list[], size_t i, size_t n,
-          const char *reference_name, struct link_map *skip, int flags)
+          const char *reference_name, const hash_name_pair *version,
+          struct link_map *skip, int flags)
 {
   struct link_map *map;
 
@@ -65,6 +93,7 @@ do_lookup (const char *undef_name, unsigned long int hash,
     {
       const ElfW(Sym) *symtab;
       const char *strtab;
+      const ElfW(Half) *verstab;
       ElfW(Symndx) symidx;
 
       map = list[i];
@@ -79,6 +108,12 @@ do_lookup (const char *undef_name, unsigned long int hash,
 
       symtab = ((void *) map->l_addr + map->l_info[DT_SYMTAB]->d_un.d_ptr);
       strtab = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr);
+      if (version != NULL
+         && map->l_nversions > 0 && map->l_info[VERSTAG (DT_VERSYM)] != NULL)
+       verstab = ((void *) map->l_addr
+                  + map->l_info[VERSTAG (DT_VERSYM)]->d_un.d_ptr);
+      else
+       verstab = NULL;
 
       /* Search the appropriate hash bucket in this object's symbol table
         for a definition for the same symbol name.  */
@@ -108,6 +143,15 @@ do_lookup (const char *undef_name, unsigned long int hash,
            /* Not the symbol we are looking for.  */
            continue;
 
+         if (verstab != NULL)
+           {
+             /* We can match the version information.  */
+             ElfW(Half) ndx = verstab[symidx] & 0x7fff;
+             if (map->l_versions[ndx].hash != version->hash
+                 || strcmp (map->l_versions[ndx].name, version->name))
+             continue;
+           }
+
          switch (ELFW(ST_BIND) (sym->st_info))
            {
            case STB_GLOBAL:
@@ -155,14 +199,14 @@ _dl_lookup_symbol (const char *undef_name, const ElfW(Sym) **ref,
   for (scope = symbol_scope; *scope; ++scope)
     if (do_lookup (undef_name, hash, ref, &current_value,
                   (*scope)->l_searchlist, 0, (*scope)->l_nsearchlist,
-                  reference_name, NULL, flags))
+                  reference_name, NULL, NULL, flags))
       break;
 
   if (current_value.s == NULL &&
       (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
     {
       /* We could find no value for a strong reference.  */
-      const char msg[] = "undefined symbol: ";
+      static const char msg[] = "undefined symbol: ";
       const size_t len = strlen (undef_name);
       char buf[sizeof msg + len];
       memcpy (buf, msg, sizeof msg - 1);
@@ -199,11 +243,96 @@ _dl_lookup_symbol_skip (const char *undef_name, const ElfW(Sym) **ref,
 
   if (! do_lookup (undef_name, hash, ref, &current_value,
                   (*scope)->l_dupsearchlist, i, (*scope)->l_ndupsearchlist,
-                  reference_name, skip_map, flags))
+                  reference_name, NULL, skip_map, flags))
+    while (*++scope)
+      if (do_lookup (undef_name, hash, ref, &current_value,
+                    (*scope)->l_dupsearchlist, 0, (*scope)->l_ndupsearchlist,
+                    reference_name, NULL, skip_map, flags))
+       break;
+
+  *ref = current_value.s;
+  return current_value.a;
+}
+
+
+/* This function works like _dl_lookup_symbol but it takes an
+   additional arguement with the version number of the requested
+   symbol.
+
+   XXX We'll see whether we need this separate function.  */
+ElfW(Addr)
+_dl_lookup_versioned_symbol (const char *undef_name, const ElfW(Sym) **ref,
+                            struct link_map *symbol_scope[],
+                            const char *reference_name,
+                            const hash_name_pair *version, int flags)
+{
+  const unsigned long int hash = _dl_elf_hash (undef_name);
+  struct sym_val current_value = { 0, NULL };
+  struct link_map **scope;
+
+  /* Search the relevant loaded objects for a definition.  */
+  for (scope = symbol_scope; *scope; ++scope)
+    if (do_lookup (undef_name, hash, ref, &current_value,
+                  (*scope)->l_searchlist, 0, (*scope)->l_nsearchlist,
+                  reference_name, version, NULL, flags))
+      break;
+
+  if (current_value.s == NULL &&
+      (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
+    {
+      /* We could find no value for a strong reference.  */
+      static const char msg1[] = "undefined symbol: ";
+      const size_t len = strlen (undef_name);
+      static const char msg2[] = ", version ";
+      const size_t verslen = strlen (version->name ?: "") + 1;
+      char buf[sizeof msg1 - 1 + len + sizeof msg2 - 1 + verslen];
+
+      memcpy (buf, msg1, sizeof msg1 - 1);
+      memcpy (&buf[sizeof msg1 - 1], undef_name, len + 1);
+      memcpy (&buf[sizeof msg1 - 1 + len], msg2, sizeof msg2 - 1);
+      memcpy (&buf[sizeof msg1 - 1 + len + sizeof msg2 - 1], version->name,
+             verslen);
+      _dl_signal_error (0, reference_name, buf);
+    }
+
+  *ref = current_value.s;
+  return current_value.a;
+}
+
+
+/* Similar to _dl_lookup_symbol_skip but takes an additional argument
+   with the version we are looking for.  */
+ElfW(Addr)
+_dl_lookup_versioned_symbol_skip (const char *undef_name,
+                                 const ElfW(Sym) **ref,
+                                 struct link_map *symbol_scope[],
+                                 const char *reference_name,
+                                 const char *version_name,
+                                 struct link_map *skip_map,
+                                 int flags)
+{
+  const unsigned long int hash = _dl_elf_hash (undef_name);
+  struct sym_val current_value = { 0, NULL };
+  struct link_map **scope;
+  hash_name_pair version;
+  size_t i;
+
+  /* First convert the VERSION_NAME into a `hash_name_pair' value.  */
+  version.hash = _dl_elf_hash (version_name);
+  version.name = version_name;
+
+  /* Search the relevant loaded objects for a definition.  */
+  scope = symbol_scope;
+  for (i = 0; (*scope)->l_dupsearchlist[i] != skip_map; ++i)
+    assert (i < (*scope)->l_ndupsearchlist);
+
+  if (! do_lookup (undef_name, hash, ref, &current_value,
+                  (*scope)->l_dupsearchlist, i, (*scope)->l_ndupsearchlist,
+                  reference_name, &version, skip_map, flags))
     while (*++scope)
       if (do_lookup (undef_name, hash, ref, &current_value,
                     (*scope)->l_dupsearchlist, 0, (*scope)->l_ndupsearchlist,
-                    reference_name, skip_map, flags))
+                    reference_name, &version, skip_map, flags))
        break;
 
   *ref = current_value.s;
index 6986dc34d3e7bba3787b4df5cc457c9e922361d5..941bfa34cc43ead89631b8b2a01268392737a1f9 100644 (file)
@@ -1,5 +1,5 @@
 /* Storage management for the chain of loaded shared objects.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997 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
@@ -34,12 +34,15 @@ struct link_map *
 _dl_new_object (char *realname, const char *libname, int type)
 {
   struct link_map *new = malloc (sizeof *new);
-  if (! new)
+  struct libname_list *newname = malloc (sizeof *newname);
+  if (! new || ! newname)
     return NULL;
 
   memset (new, 0, sizeof *new);
   new->l_name = realname;
-  new->l_libname = libname;
+  newname->name = libname;
+  newname->next = NULL;
+  new->l_libname = newname;
   new->l_type = type;
 
   if (_dl_loaded == NULL)
index fe9f8ff017cec85e312a395b56b01d72ca909d71..5915b7f2a24f7e0e5e23be14b200f7033b050ce2 100644 (file)
@@ -1,5 +1,5 @@
 /* Load a shared object at runtime, relocate it, and run its initializer.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997 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
@@ -54,6 +54,8 @@ _dl_open (const char *file, int mode)
   /* Load that object's dependencies.  */
   _dl_map_object_deps (new, NULL, 0, 0);
 
+  /* So far, so good.  Now check the versions.  */
+  (void) _dl_check_map_versions (new, 0);
 
   /* Relocate the objects loaded.  We do this in reverse order so that copy
      relocs of earlier objects overwrite the data written by later objects.  */
index e299e523ee2fb9ef721cc16add28afda1487475d..f1c43ea174490f1a67b90ee493e028491094a69b 100644 (file)
@@ -1,5 +1,5 @@
 /* Relocate a shared object and resolve its references to other loaded objects.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997 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
@@ -57,9 +57,12 @@ _dl_relocate_object (struct link_map *l, struct link_map *scope[], int lazy)
       = ((void *) l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr);
 
     /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code.  */
-#define RESOLVE(ref, flags) \
-    (_dl_lookup_symbol (strtab + (*ref)->st_name, ref, scope, \
-                       l->l_name, flags))
+#define RESOLVE(ref, version, flags) \
+    ((version) != NULL && (version)->hash != 0                               \
+     ? _dl_lookup_versioned_symbol (strtab + (*ref)->st_name, (ref), scope,   \
+                                   l->l_name, (version), (flags))            \
+     : _dl_lookup_symbol (strtab + (*ref)->st_name, (ref), scope,            \
+                         l->l_name, (flags)))
 
 #include "dynamic-link.h"
     ELF_DYNAMIC_RELOCATE (l, lazy);
index 088ff64c6ed476280ffca18bf2edf3a7b0b97908..08c605cd0f187b69f9072243bd20f23888ec51b7 100644 (file)
@@ -1,5 +1,5 @@
 /* On-demand PLT fixup for shared objects.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997 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
@@ -74,15 +74,19 @@ _dl_object_relocation_scope (struct link_map *l)
 #define elf_machine_rel 1
 #define elf_machine_rela 2
 #if elf_machine_relplt == elf_machine_rel
-#define PLTREL ElfW(Rel)
+# define PLTREL ElfW(Rel)
 #elif elf_machine_relplt == elf_machine_rela
-#define PLTREL ElfW(Rela)
+# define PLTREL ElfW(Rela)
 #else
-#error "dl-machine.h bug: elf_machine_relplt not rel or rela"
+# error "dl-machine.h bug: elf_machine_relplt not rel or rela"
 #endif
 #undef elf_machine_rel
 #undef elf_machine_rela
 
+#ifndef VERSYMIDX
+# define VERSYMIDX(sym)        (DT_NUM + DT_PROCNUM + DT_VERSIONTAGIDX (sym))
+#endif
+
 /* We need to define the function as a local symbol so that the reference
    in the trampoline code will be a local PC-relative call.  Tell the
    compiler not to worry that the function appears not to be called.  */
@@ -122,13 +126,28 @@ fixup (
 
   {
     /* This macro is used as a callback from the elf_machine_relplt code.  */
-#define RESOLVE(ref, flags) \
-  (_dl_lookup_symbol (strtab + (*ref)->st_name, ref, scope, \
-                     l->l_name, flags))
+#define RESOLVE(ref, version, flags) \
+  ((version) != NULL && (version)->hash != 0                                 \
+   ? _dl_lookup_versioned_symbol (strtab + (*ref)->st_name, (ref), scope,     \
+                                 l->l_name, (version), (flags))              \
+   : _dl_lookup_symbol (strtab + (*ref)->st_name, (ref), scope,                      \
+                       l->l_name, (flags)))
 #include "dynamic-link.h"
 
     /* Perform the specified relocation.  */
-    elf_machine_relplt (l, reloc, &symtab[ELFW(R_SYM) (reloc->r_info)]);
+    if (l->l_info[VERSYMIDX (DT_VERNEEDNUM)])
+      {
+       const ElfW(Half) * version =
+         (const ElfW(Half) *) (l->l_addr +
+                               l->l_info[VERSYMIDX (DT_VERSYM)]->d_un.d_ptr);
+       ElfW(Half) ndx = version[ELFW(R_SYM) (reloc->r_info)];
+
+       elf_machine_relplt (l, reloc, &symtab[ELFW(R_SYM) (reloc->r_info)],
+                           &l->l_versions[ndx]);
+      }
+    else
+      elf_machine_relplt (l, reloc, &symtab[ELFW(R_SYM) (reloc->r_info)],
+                         NULL);
   }
 
   *_dl_global_scope_end = NULL;
diff --git a/elf/dl-version.c b/elf/dl-version.c
new file mode 100644 (file)
index 0000000..4382a4c
--- /dev/null
@@ -0,0 +1,337 @@
+/* Handle symbol and library versioning.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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 <elf.h>
+#include <errno.h>
+#include <link.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include "../stdio-common/_itoa.h"
+
+
+/* Set in rtld.c at startup.  */
+extern char **_dl_argv;
+
+#define VERSTAG(tag)   (DT_NUM + DT_PROCNUM + DT_VERSIONTAGIDX (tag))
+
+
+#define make_string(string, rest...) \
+  ({                                                                         \
+    const char *all[] = { string, ## rest };                                 \
+    size_t len, cnt;                                                         \
+    char *result, *cp;                                                       \
+                                                                             \
+    len = 1;                                                                 \
+    for (cnt = 0; cnt < sizeof (all) / sizeof (all[0]); ++cnt)               \
+      len += strlen (all[cnt]);                                                      \
+                                                                             \
+    cp = result = alloca (len);                                                      \
+    for (cnt = 0; cnt < sizeof (all) / sizeof (all[0]); ++cnt)               \
+      cp = stpcpy (cp, all[cnt]);                                            \
+                                                                             \
+    result;                                                                  \
+  })
+
+
+static inline struct link_map *
+find_needed (struct link_map *map, const char *name)
+{
+  unsigned int n;
+
+  for (n = 0; n < map->l_nsearchlist; ++n)
+    if (_dl_does_name_match_p (name, map->l_searchlist[n]))
+      return map->l_searchlist[n];
+
+  /* Should never happen.  */
+  return NULL;
+}
+
+
+static int
+match_symbol (const char *name, ElfW(Word) hash, const char *string,
+             struct link_map *map, int verbose, int weak)
+{
+  const char *strtab = (const char *) (map->l_addr
+                                      + map->l_info[DT_STRTAB]->d_un.d_ptr);
+  ElfW(Addr) def_offset = map->l_info[VERSTAG (DT_VERDEF)]->d_un.d_ptr;
+  ElfW(Verdef) *def;
+
+  if (def_offset == 0)
+    {
+      /* The file has no symbol versioning.  I.e., the dependent
+        object was linked against another version of this file.  We
+        only print a message if verbose output is requested.  */
+      if (verbose)
+       _dl_signal_error (0, map->l_name, make_string ("\
+no version information available (required by ",
+                                                      name, ")"));
+      return 0;
+    }
+
+  def = (ElfW(Verdef) *) (map->l_addr + def_offset);
+  while (1)
+    {
+      /* Currently the version number of the definition entry is 1.
+        Make sure all we see is this version.  */
+      if (def->vd_version  != 1)
+       {
+         char buf[20];
+         buf[sizeof (buf) - 1] = '\0';
+         _dl_signal_error (0, map->l_name,
+                           make_string ("unsupported version ",
+                                        _itoa_word (def->vd_version,
+                                                    &buf[sizeof (buf) - 1],
+                                                    10, 0),
+                                        " of Verdef record"));
+         return 1;
+       }
+
+      /* Compare the hash values.  */
+      if (hash == def->vd_hash)
+       {
+         ElfW(Verdaux) *aux = (ElfW(Verdaux) *) ((char *) def + def->vd_aux);
+
+         /* To be safe, compare the string as well.  */
+         if (strcmp (string, strtab + aux->vda_name) == 0)
+           /* Bingo!  */
+           return 0;
+       }
+
+      /* If no more definitions we failed to find what we want.  */
+      if (def->vd_next == 0)
+       break;
+
+      /* Next definition.  */
+      def = (ElfW(Verdef) *) ((char *) def + def->vd_next);
+    }
+
+  /* Symbol not found.  If it was a weak reference it is not fatal.  */
+  if (weak)
+    {
+      if (verbose)
+       _dl_signal_error (0, map->l_name,
+                         make_string ("weak version `", string,
+                                      "' not found (required by ", name,
+                                      ")"));
+      return 0;
+    }
+
+  _dl_signal_error (0, map->l_name,
+                   make_string ("version `", string,
+                                "' not found (required by ", name, ")"));
+  return 1;
+}
+
+
+int
+_dl_check_map_versions (struct link_map *map, int verbose)
+{
+  int result = 0;
+  const char *strtab = (const char *) (map->l_addr
+                                      + map->l_info[DT_STRTAB]->d_un.d_ptr);
+  /* Pointer to section with needed versions.  */
+  ElfW(Dyn) *dyn = map->l_info[VERSTAG (DT_VERNEED)];
+  /* Pointer to dynamic section with definitions.  */
+  ElfW(Dyn) *def = map->l_info[VERSTAG (DT_VERDEF)];
+  /* We need to find out which is the highest version index used
+    in a dependecy.  */
+  unsigned int ndx_high = 0;
+
+  if (dyn != NULL)
+    {
+      /* This file requires special versions from its dependencies.  */
+      ElfW(Verneed) *ent = (ElfW(Verneed) *) (map->l_addr + dyn->d_un.d_ptr);
+
+      /* Currently the version number of the needed entry is 1.
+        Make sure all we see is this version.  */
+      if (ent->vn_version  != 1)
+       {
+         char buf[20];
+         buf[sizeof (buf) - 1] = '\0';
+         _dl_signal_error (0, (*map->l_name ? map->l_name : _dl_argv[0]),
+                           make_string ("unsupported version ",
+                                        _itoa_word (ent->vn_version,
+                                                    &buf[sizeof (buf) - 1],
+                                                    10, 0),
+                                        " of Verneed record\n"));
+         return 1;
+       }
+
+      while (1)
+       {
+         ElfW(Vernaux) *aux;
+         struct link_map *needed = find_needed (map, strtab + ent->vn_file);
+
+         /* If NEEDED is NULL this means a dependency was not found
+            and no stub entry was created.  This should never happen.  */
+         assert (needed != NULL);
+
+         /* NEEDED is the map for the file we need.  Now look for the
+            dependency symbols.  */
+         aux = (ElfW(Vernaux) *) ((char *) ent + ent->vn_aux);
+         while (1)
+           {
+             /* Match the symbol.  */
+             result |= match_symbol ((*map->l_name
+                                      ? map->l_name : _dl_argv[0]),
+                                     aux->vna_hash,
+                                     strtab + aux->vna_name,
+                                     needed, verbose,
+                                     aux->vna_flags & VER_FLG_WEAK);
+
+             /* Compare the version index.  */
+             if ((aux->vna_other & 0x7fff) > ndx_high)
+               ndx_high = aux->vna_other & 0x7fff;
+
+             if (aux->vna_next == 0)
+               /* No more symbols.  */
+               break;
+
+             /* Next symbol.  */
+             aux = (ElfW(Vernaux) *) ((char *) aux + aux->vna_next);
+           }
+
+         if (ent->vn_next == 0)
+           /* No more dependencies.  */
+           break;
+
+         /* Next dependency.  */
+         ent = (ElfW(Verneed) *) ((char *) ent + ent->vn_next);
+       }
+    }
+
+  /* We also must store the names of the defined versions.  Determine
+     the maximum index here as well.
+
+     XXX We could avoid the loop by just taking the number of definitions
+     as an upper bound of new indeces.  */
+  if (def != NULL)
+    {
+      ElfW(Verdef) *ent;
+      ent = (ElfW(Verdef)  *) (map->l_addr + def->d_un.d_ptr);
+      while (1)
+       {
+         if ((ent->vd_ndx & 0x7fff) > ndx_high)
+           ndx_high = ent->vd_ndx & 0x7fff;
+
+         if (ent->vd_next == 0)
+           /* No more definitions.  */
+           break;
+
+         ent = (ElfW(Verdef) *) ((char *) ent + ent->vd_next);
+       }
+    }
+
+  if (ndx_high > 0)
+    {
+      /* Now we are ready to build the array with the version names
+        which can be indexed by the version index in the VERSYM
+        section.  */
+      map->l_versions = (hash_name_pair*) malloc ((ndx_high + 1)
+                                                 * sizeof (hash_name_pair));
+      memset (map->l_versions, '\0', (ndx_high + 1) * sizeof (hash_name_pair));
+      if (map->l_versions == NULL)
+       {
+         _dl_signal_error (ENOMEM, (*map->l_name ? map->l_name : _dl_argv[0]),
+                           "cannot allocate version name table");
+         result = 1;
+       }
+      else
+       {
+         /* Store the number of available symbols.  */
+         map->l_nversions = ndx_high + 1;
+
+         if (dyn != NULL)
+           {
+             ElfW(Verneed) *ent;
+             ent = (ElfW(Verneed) *) (map->l_addr + dyn->d_un.d_ptr);
+             while (1)
+               {
+                 ElfW(Vernaux) *aux;
+                 aux = (ElfW(Vernaux) *) ((char *) ent + ent->vn_aux);
+                 while (1)
+                   {
+                     ElfW(Half) ndx = aux->vna_other & 0x7fff;
+                     map->l_versions[ndx].hash = aux->vna_hash;
+                     map->l_versions[ndx].name = &strtab[aux->vna_name];
+
+                     if (aux->vna_next == 0)
+                       /* No more symbols.  */
+                       break;
+
+                     /* Advance to next symbol.  */
+                     aux = (ElfW(Vernaux) *) ((char *) aux + aux->vna_next);
+                   }
+
+                 if (ent->vn_next == 0)
+                   /* No more dependencies.  */
+                   break;
+
+                 /* Advance to next dependency.  */
+                 ent = (ElfW(Verneed) *) ((char *) ent + ent->vn_next);
+               }
+           }
+
+         /* And insert the defined versions.  */
+         if (def != NULL)
+           {
+             ElfW(Verdef) *ent;
+             ent = (ElfW(Verdef)  *) (map->l_addr + def->d_un.d_ptr);
+             while (1)
+               {
+                 ElfW(Verdaux) *aux;
+                 aux = (ElfW(Verdaux) *) ((char *) ent + ent->vd_aux);
+
+                 if ((ent->vd_flags & VER_FLG_BASE) == 0)
+                   {
+                     /* The name of the base version should not be
+                        available for matching a versioned symbol.  */
+                     ElfW(Half) ndx = ent->vd_ndx & 0x7fff;
+                     map->l_versions[ndx].hash = ent->vd_hash;
+                     map->l_versions[ndx].name = &strtab[aux->vda_name];
+                   }
+
+                 if (ent->vd_next == 0)
+                   /* No more definitions.  */
+                   break;
+
+                 ent = (ElfW(Verdef) *) ((char *) ent + ent->vd_next);
+               }
+           }
+       }
+    }
+
+  return result;
+}
+
+
+int
+_dl_check_all_versions (struct link_map *map, int verbose)
+{
+  struct link_map *l;
+  int result = 0;
+
+  for (l = map; l != NULL; l = l->l_next)
+    result |= _dl_check_map_versions (l, verbose);
+
+  return result;
+}
index 466aa2811e01ff4e41f6d3b31b33128ac5184382..9e55bc7c7664021a651cc74e2a1febc5cf8c07a7 100644 (file)
@@ -1,5 +1,5 @@
-/* dlerror -- Return error detail for failing <dlfcn.h> functions.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Return error detail for failing <dlfcn.h> functions.
+   Copyright (C) 1995, 1996, 1997 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
index 973c7e1cc8e11377671005ae7a9f79dc9d491518..94e1fae8a4a04b71ce6054307ed4bf293ac50eef 100644 (file)
@@ -1,5 +1,5 @@
-/* dlfcn.h -- User functions for run-time dynamic loading.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* User functions for run-time dynamic loading.
+   Copyright (C) 1995, 1996, 1997 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
@@ -52,6 +52,15 @@ extern int dlclose __P ((void *__handle));
    of the symbol called NAME.  */
 extern void *dlsym __P ((void *__handle, __const char *__name));
 
+#ifdef __USE_GNU
+/* Find the run-time address in the shared object HANDLE refers to
+   of the symbol called NAME with VERSION.  */
+extern void *__dlvsym __P ((void *__handle, __const char *__name,
+                           __const char *__version));
+extern void *dlvsym __P ((void *__handle, __const char *__name,
+                         __const char *__version));
+#endif
+
 /* When any of the above functions fails, call this function
    to return a string describing the error.  Each call resets
    the error string so that a following call returns null.  */
index 7ad3429164b51be45399e0a538f404e55d042a57..c2cf8cd58da794eb60e14ad59e28a47e28773c83 100644 (file)
@@ -1,5 +1,5 @@
-/* dlopen -- Load a shared object at run time.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Load a shared object at run time.
+   Copyright (C) 1995, 1996, 1997 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
index 12a29e4b4c015a7a776c5a8ead3f98af40d995f6..73f6e86475fcfed8c967340fe8d14c6f9d604224 100644 (file)
@@ -1,5 +1,5 @@
-/* dlsym -- Look up a symbol in a shared object loaded by `dlopen'.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Look up a symbol in a shared object loaded by `dlopen'.
+   Copyright (C) 1995, 1996, 1997 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
diff --git a/elf/dlvsym.c b/elf/dlvsym.c
new file mode 100644 (file)
index 0000000..5063b3b
--- /dev/null
@@ -0,0 +1,72 @@
+/* Look up a symbol in a shared object loaded by `dlopen'.
+   Copyright (C) 1995, 1996, 1997 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 <stddef.h>
+#include <link.h>
+#include <dlfcn.h>
+#include <setjmp.h>
+
+
+void *
+__dlvsym (void *handle, const char *name, const char *version)
+{
+  ElfW(Addr) caller = (ElfW(Addr)) __builtin_return_address (0);
+  ElfW(Addr) loadbase;
+  const ElfW(Sym) *ref = NULL;
+  void doit (void)
+    {
+      if (handle == NULL)
+       /* Search the global scope.  */
+       loadbase = _dl_lookup_versioned_symbol
+         (name, &ref, &(_dl_global_scope ?: _dl_default_scope)[2], NULL,
+          version, 0);
+      else if (handle == RTLD_NEXT)
+       {
+         struct link_map *l, *match;
+
+         /* Find the highest-addressed object that CALLER is not below.  */
+         match = NULL;
+         for (l = _dl_loaded; l; l = l->l_next)
+           if (caller >= l->l_addr && (!match || match->l_addr < l->l_addr))
+             match = l;
+
+         if (! match)
+           _dl_signal_error (0, NULL, _("\
+RTLD_NEXT used in code not dynamically loaded"));
+
+         l = match;
+         while (l->l_loader)
+           l = l->l_loader;
+
+         loadbase = _dl_lookup_versioned_symbol_skip
+           (name, &ref, &_dl_loaded, NULL, version, l, 0);
+       }
+      else
+       {
+         /* Search the scope of the given object.  */
+         struct link_map *map = handle;
+         struct link_map *mapscope[2] = { map, NULL };
+         loadbase = _dl_lookup_versioned_symbol
+           (name, &ref, mapscope, map->l_name, version, 0);
+       }
+    }
+
+  return _dlerror_run (doit) ? NULL : (void *) (loadbase + ref->st_value);
+}
+weak_alias (__dlvsym, dlvsym)
index a7b7a60c66ea2e1548ea30d74c2fd4a0d64a3aed..66f135916cc63fcc15212a14868ce467d91678ae 100644 (file)
@@ -1,5 +1,5 @@
 /* Do relocations for ELF dynamic linking.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997 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
    `elf_dynamic_do_rel' and `elf_dynamic_do_rela'.  */
 
 #ifdef DO_RELA
-#define elf_dynamic_do_rel     elf_dynamic_do_rela
-#define        Rel                     Rela
-#define elf_machine_rel                elf_machine_rela
+# define elf_dynamic_do_rel    elf_dynamic_do_rela
+# define Rel                   Rela
+# define elf_machine_rel       elf_machine_rela
 #endif
 
+#ifndef VERSYMIDX
+# define VERSYMIDX(sym)        (DT_NUM + DT_PROCNUM + DT_VERSIONTAGIDX (sym))
+#endif
 
 /* Perform the relocations in MAP on the running program image as specified
    by RELTAG, SZTAG.  If LAZY is nonzero, this is the first pass on PLT
@@ -37,8 +40,6 @@ elf_dynamic_do_rel (struct link_map *map,
                    int reltag, int sztag,
                    int lazy)
 {
-  const ElfW(Sym) *const symtab
-    = (const ElfW(Sym) *) (map->l_addr + map->l_info[DT_SYMTAB]->d_un.d_ptr);
   const ElfW(Rel) *r
     = (const ElfW(Rel) *) (map->l_addr + map->l_info[reltag]->d_un.d_ptr);
   const ElfW(Rel) *end = &r[map->l_info[sztag]->d_un.d_val / sizeof *r];
@@ -48,8 +49,27 @@ elf_dynamic_do_rel (struct link_map *map,
     for (; r < end; ++r)
       elf_machine_lazy_rel (map, r);
   else
-    for (; r < end; ++r)
-      elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)]);
+    {
+      const ElfW(Sym) *const symtab =
+       (const ElfW(Sym) *) (map->l_addr + map->l_info[DT_SYMTAB]->d_un.d_ptr);
+
+      if (map->l_info[VERSYMIDX (DT_VERNEEDNUM)])
+       {
+         const ElfW(Half) *const version =
+           (const ElfW(Half) *) (map->l_addr
+                                 + map->l_info[VERSYMIDX (DT_VERSYM)]->d_un.d_ptr);
+
+         for (; r < end; ++r)
+           {
+             ElfW(Half) ndx = version[ELFW(R_SYM) (r->r_info)];
+             elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)],
+                              &map->l_versions[ndx]);
+           }
+       }
+      else
+       for (; r < end; ++r)
+         elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)], NULL);
+    }
 }
 
 #undef elf_dynamic_do_rel
index 05eeb3664f1e96562e271d2da53823e66f48bef2..f6779ba16ab8a51558d2211d1dbff0cef71c9a29 100644 (file)
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -504,6 +504,20 @@ typedef struct
                                           entry */
 } Elf32_Verdef;
 
+/* XXX We have no information what types should be used for 64 bit
+   architectures.  What is following is only an intelligent guess.  */
+typedef struct
+{
+  Elf64_Half   vd_version;             /* Version revision */
+  Elf64_Half   vd_flags;               /* Version information */
+  Elf64_Half   vd_ndx;                 /* Version Index */
+  Elf64_Half   vd_cnt;                 /* Number of associated aux entries */
+  Elf64_Word   vd_hash;                /* Version name hash value */
+  Elf64_Word   vd_aux;                 /* Offset in bytes to verdaux array */
+  Elf64_Word   vd_next;                /* Offset in bytes to next verdef
+                                          entry */
+} Elf64_Verdef;
+
 /* Legal values for vd_version (version revision).  */
 #define VER_DEF_NONE   0               /* No version */
 #define VER_DEF_CURRENT        1               /* Current version */
@@ -522,6 +536,15 @@ typedef struct
                                           entry */
 } Elf32_Verdaux;
 
+/* XXX We have no information what types should be used for 64 bit
+   architectures.  What is following is only an intelligent guess.  */
+typedef struct
+{
+  Elf64_Addr   vda_name;               /* Version or dependency names */
+  Elf64_Word   vda_next;               /* Offset in bytes to next verdaux
+                                          entry */
+} Elf64_Verdaux;
+
 /* Version dependency section.  */
 
 typedef struct
@@ -535,6 +558,19 @@ typedef struct
                                           entry */
 } Elf32_Verneed;
 
+/* XXX We have no information what types should be used for 64 bit
+   architectures.  What is following is only an intelligent guess.  */
+typedef struct
+{
+  Elf64_Half   vn_version;             /* Version of structure */
+  Elf64_Half   vn_cnt;                 /* Number of associated aux entries */
+  Elf64_Addr   vn_file;                /* Offset of filename for this
+                                          dependency */
+  Elf64_Word   vn_aux;                 /* Offset in bytes to vernaux array */
+  Elf64_Word   vn_next;                /* Offset in bytes to next verneed
+                                          entry */
+} Elf64_Verneed;
+
 /* Legal values for vn_version (version revision).  */
 #define VER_NEED_NONE   0              /* No version */
 #define VER_NEED_CURRENT 1             /* Current version */
@@ -552,6 +588,18 @@ typedef struct
                                           entry */
 } Elf32_Vernaux;
 
+/* XXX We have no information what types should be used for 64 bit
+   architectures.  What is following is only an intelligent guess.  */
+typedef struct
+{
+  Elf64_Word   vna_hash;               /* Hash value of dependency name */
+  Elf64_Half   vna_flags;              /* Dependency specific information */
+  Elf64_Half   vna_other;              /* Unused */
+  Elf64_Addr   vna_name;               /* Dependency name string offset */
+  Elf64_Word   vna_next;               /* Offset in bytes to next vernaux
+                                          entry */
+} Elf64_Vernaux;
+
 /* Legal values for vna_flags.  */
 #define VER_FLG_WEAK   0x2             /* Weak verison identifier */
 
index d4ea3310fd9cfbaad48f61039233c07eace05de7..dd4fc6ab9687d5395e2069365b4a875d8ac71ef1 100644 (file)
@@ -29,7 +29,8 @@ TEXTDOMAIN=libc
 TEXTDOMAINDIR=@TEXTDOMAINDIR@
 
 RTLD=@RTLD@
-RELOCS=
+warn=
+bind_now=
 
 while test $# -gt 0; do
   case "$1" in
@@ -49,12 +50,13 @@ Report bugs using the \`glibcbug' script to <bugs@gnu.ai.mit.edu>."
     exit 0 ;;
   -d | --d | --da | --dat | --data | --data- | --data-r | --data-re | \
   --data-rel | --data-relo | --data-reloc | --data-relocs)
-    RELOCS='--data-relocs'
+    warn=yes
     shift ;;
   -r | --f | --fu | --fun | --func | --funct | --functi | --functio | \
   --function | --function- | --function-r | --function-re | --function-rel | \
   --function-relo | --function-reloc | --function-relocs)
-    RELOCS='--function-relocs'
+    warn=yes
+    bind_now=yes
     shift ;;
   --)          # Stop option processing.
     shift; break ;;
@@ -85,7 +87,8 @@ case $# in
     test -x "$file" ||
     echo $"ldd: warning: you do not have execution permission for" "\`$file'"
       if ${RTLD} --verify "$file"; then
-       LD_TRACE_LOADED_OBJECTS=1 exec ${RTLD} ${RELOCS} "$file" || exit 1
+       LD_TRACE_LOADED_OBJECTS=1 LD_WARN=$warn LD_BIND_NOW=$bind_now \
+        exec ${RTLD} ${RELOCS} "$file" || exit 1
       else
        echo $" not a dynamic executable"
        exit 1
@@ -111,7 +114,8 @@ case $# in
       test -x "$file" || echo $"\
 ldd: warning: you do not have execution permission for" "\`$file'"
       if ${RTLD} --verify "$file"; then
-       LD_TRACE_LOADED_OBJECTS=1 ${RTLD} ${RELOCS} "$file" || result=1
+       LD_TRACE_LOADED_OBJECTS=1 LD_WARN=$warn LD_BIND_NOW=$bind_now \
+        ${RTLD} ${RELOCS} "$file" || result=1
       else
        echo $" not a dynamic executable"
        result=1
index f7c1163890233fd56ac6754e73ccc5860f03dcc3..0f3ed2e729da6abb8d34929823fb2b99b91cee9a 100644 (file)
@@ -25,7 +25,8 @@
 # variable LD_TRACE_LOADED_OBJECTS to a non-empty value.
 
 RTLD=@RTLD@
-RELOCS=
+warn=
+bind_now=
 
 while test $# -gt 0; do
   case "$1" in
@@ -45,12 +46,13 @@ Report bugs using the \`glibcbug' script to <bugs@gnu.ai.mit.edu>."
     exit 0 ;;
   -d | --d | --da | --dat | --data | --data- | --data-r | --data-re | \
   --data-rel | --data-relo | --data-reloc | --data-relocs)
-    RELOCS='--data-relocs'
+    warn=yes
     shift ;;
   -r | --f | --fu | --fun | --func | --funct | --functi | --functio | \
   --function | --function- | --function-r | --function-re | --function-rel | \
   --function-relo | --function-reloc | --function-relocs)
-    RELOCS='--function-relocs'
+    warn=yes
+    bind_now=yes
     shift ;;
   --)          # Stop option processing.
     shift; break ;;
@@ -84,7 +86,8 @@ Try \`ldd --help' for more information."
       test -x "$file" ||
        echo "ldd: warning: you do not have execution permission for \`$file'"
       if ${RTLD} --verify "$file"; then
-       LD_TRACE_LOADED_OBJECTS=1 exec ${RTLD} ${RELOCS} "$file" || exit 1
+       LD_TRACE_LOADED_OBJECTS=1 LD_WARN=$warn LD_BIND_NOW=$bind_now \
+        exec ${RTLD} "$file" || exit 1
       else
        echo '  not a dynamic executable'
        exit 1
@@ -112,7 +115,8 @@ Try \`ldd --help' for more information."
        test -x "$file" || echo "\
 ldd: warning: you do not have execution permission for \`$file'"
        if ${RTLD} --verify "$file"; then
-         LD_TRACE_LOADED_OBJECTS=1 ${RTLD} ${RELOCS} "$file" || result=1
+         LD_TRACE_LOADED_OBJECTS=1 LD_WARN=$warn LD_BIND_NOW=$bind_now \
+          ${RTLD} "$file" || result=1
        else
          echo '        not a dynamic executable'
          result=1
index b05ecca199314f9c41237cff41258bdec886f38d..58041332e98390bf03f247e5d4b04061fc3f00ce 100644 (file)
@@ -74,6 +74,13 @@ extern struct r_debug _r_debug;
 
 extern ElfW(Dyn) _DYNAMIC[];
 
+/* For the version handling we need an array with only names and their
+   hash values.  */
+typedef struct
+{
+  const char *name;
+  ElfW(Word) hash;
+} hash_name_pair;
 
 /* Structure describing a loaded shared object.  The `l_next' and `l_prev'
    members form a chain of all the shared objects loaded at startup.
@@ -94,7 +101,11 @@ struct link_map
     /* All following members are internal to the dynamic linker.
        They may change without notice.  */
 
-    const char *l_libname;     /* Name requested (before search).  */
+    struct libname_list
+      {
+       const char *name;       /* Name requested (before search).  */
+       struct libname_list *next; /* Link to next name for this object.  */
+      } *l_libname;
     /* Indexed pointers to dynamic section.
        [0,DT_NUM) are indexed by the processor-independent tags.
        [DT_NUM,DT_NUM+DT_PROCNUM) are indexed by the tag minus DT_LOPROC.
@@ -139,13 +150,34 @@ struct link_map
     unsigned int l_init_running:1; /* Nonzero while DT_INIT function runs.  */
     unsigned int l_global:1;   /* Nonzero if object in _dl_global_scope.  */
     unsigned int l_reserved:2; /* Reserved for internal use.  */
+
+    /* Array with version names.  */
+    unsigned int l_nversions;
+    hash_name_pair *l_versions;
   };
 
 
+/* Test whether given NAME matches any of the names of the given object.  */
+static inline int
+__attribute__ ((unused))
+_dl_does_name_match_p (const char *__name, struct link_map *__map)
+{
+  int __found = strcmp (__name, __map->l_name) == 0;
+  struct libname_list *__runp = __map->l_libname;
+
+  while (! __found && __runp != NULL)
+    if (strcmp (__name, __runp->name) == 0)
+      __found = 1;
+    else
+      __runp = __runp->next;
+
+  return __found;
+}
+
 /* Function used as argument for `_dl_receive_error' function.  The
-   arguments are the error string and the objname the error occurred
-   in.  */
-typedef void (*receiver_fct) (const char *, const char *);
+   arguments are the error code, error string, and the objname the
+   error occurred in.  */
+typedef void (*receiver_fct) (int, const char *, const char *);
 \f
 /* Internal functions of the run-time dynamic linker.
    These can be accessed if you link again the dynamic linker
@@ -264,6 +296,14 @@ extern ElfW(Addr) _dl_lookup_symbol (const char *undef,
                                     const char *reference_name,
                                     int flags);
 
+/* Lookup versioned symbol.  */
+extern ElfW(Addr) _dl_lookup_versioned_symbol (const char *undef,
+                                              const ElfW(Sym) **sym,
+                                              struct link_map *symbol_scope[],
+                                              const char *reference_name,
+                                              const hash_name_pair *version,
+                                              int flags);
+
 /* For handling RTLD_NEXT we must be able to skip shared objects.  */
 extern ElfW(Addr) _dl_lookup_symbol_skip (const char *undef,
                                          const ElfW(Sym) **sym,
@@ -272,6 +312,16 @@ extern ElfW(Addr) _dl_lookup_symbol_skip (const char *undef,
                                          struct link_map *skip_this,
                                          int flags);
 
+/* For handling RTLD_NEXT with versioned symbols we must be able to
+   skip shared objects.  */
+extern ElfW(Addr) _dl_lookup_versioned_symbol_skip (const char *undef,
+                                                   const ElfW(Sym) **sym,
+                                                   struct link_map *symbol_scope[],
+                                                   const char *reference_name,
+                                                   const char *version_name,
+                                                   struct link_map *skip_this,
+                                                   int flags);
+
 /* Look up symbol NAME in MAP's scope and return its run-time address.  */
 extern ElfW(Addr) _dl_symbol_value (struct link_map *map, const char *name);
 
@@ -319,6 +369,14 @@ extern void _dl_relocate_object (struct link_map *map,
                                 struct link_map *scope[],
                                 int lazy);
 
+/* Check the version dependencies of all objects available through
+   MAP.  If VERBOSE print some more diagnostics.  */
+extern int _dl_check_all_versions (struct link_map *map, int verbose);
+
+/* Check the version dependencies for MAP.  If VERBOSE print some more
+   diagnostics.  */
+extern int _dl_check_map_versions (struct link_map *map, int verbose);
+
 /* Return the address of the next initializer function for MAP or one of
    its dependencies that has not yet been run.  When there are no more
    initializers to be run, this returns zero.  The functions are returned
index f9a2cd3d03cd2a16dde0fef8e96f9bce98969a16..26cacef89454804b5f04d8eba9de8331649f427e 100644 (file)
@@ -45,7 +45,12 @@ extern void *_dl_sysdep_read_whole_file (const char *filename,
                                         int mmap_prot);
 
 /* Helper function to handle errors while resolving symbols.  */
-static void print_unresolved (const char *errstring, const char *objname);
+static void print_unresolved (int errcode, const char *objname,
+                             const char *errsting);
+
+/* Helper function to handle errors when a version is missing.  */
+static void print_missing_version (int errcode, const char *objname,
+                                  const char *errsting);
 
 
 int _dl_argc;
@@ -66,6 +71,7 @@ static void dl_main (const ElfW(Phdr) *phdr,
                     ElfW(Addr) *user_entry);
 
 struct link_map _dl_rtld_map;
+struct libname_list _dl_rtld_libname;
 
 #ifdef RTLD_START
 RTLD_START
@@ -81,7 +87,7 @@ _dl_start (void *arg)
   /* This #define produces dynamic linking inline functions for
      bootstrap relocation instead of general-purpose relocation.  */
 #define RTLD_BOOTSTRAP
-#define RESOLVE(sym, flags) bootstrap_map.l_addr
+#define RESOLVE(sym, version, flags) bootstrap_map.l_addr
 #include "dynamic-link.h"
 
   /* Figure out the run-time load address of the dynamic linker itself.  */
@@ -155,7 +161,8 @@ dl_main (const ElfW(Phdr) *phdr,
   /* LAZY is determined by the parameters --datadeps and --function-deps
      if we trace the binary.  */
   if (mode == trace)
-    lazy = -1;
+    lazy = (*(getenv ("LD_WARN") ?: "") == '\0' ? -1
+           : (*(getenv ("LD_BIND_NOW") ?: "") == '\0' ? 1 : 0));
   else
     lazy = !__libc_enable_secure && *(getenv ("LD_BIND_NOW") ?: "") == '\0';
 
@@ -212,24 +219,6 @@ of this helper program; chances are you did not intend to run this program.\n",
          {
            mode = verify;
 
-           ++_dl_skip_args;
-           --_dl_argc;
-           ++_dl_argv;
-         }
-       else if (! strcmp (_dl_argv[1], "--data-relocs"))
-         {
-           mode = trace;
-           lazy = 1;   /* This means do only data relocation analysis.  */
-
-           ++_dl_skip_args;
-           --_dl_argc;
-           ++_dl_argv;
-         }
-       else if (! strcmp (_dl_argv[1], "--function-relocs"))
-         {
-           mode = trace;
-           lazy = 0;   /* This means do also function relocation analysis.  */
-
            ++_dl_skip_args;
            --_dl_argc;
            ++_dl_argv;
@@ -307,12 +296,19 @@ of this helper program; chances are you did not intend to run this program.\n",
           dlopen call or DT_NEEDED entry, for something that wants to link
           against the dynamic linker as a shared library, will know that
           the shared object is already loaded.  */
-       _dl_rtld_map.l_libname = (const char *) l->l_addr + ph->p_vaddr;
+       _dl_rtld_libname.name = (const char *) l->l_addr + ph->p_vaddr;
+       _dl_rtld_libname.next = NULL;
+       _dl_rtld_map.l_libname = &_dl_rtld_libname;
        break;
       }
   if (! _dl_rtld_map.l_libname && _dl_rtld_map.l_name)
-    /* We were invoked directly, so the program might not have a PT_INTERP.  */
-    _dl_rtld_map.l_libname = _dl_rtld_map.l_name;
+    {
+      /* We were invoked directly, so the program might not have a
+        PT_INTERP.  */
+      _dl_rtld_libname.name = _dl_rtld_map.l_name;
+      _dl_rtld_libname.next = NULL;
+      _dl_rtld_map.l_libname =  &_dl_rtld_libname;
+    }
   else
     assert (_dl_rtld_map.l_libname); /* How else did we get here?  */
 
@@ -332,7 +328,7 @@ of this helper program; chances are you did not intend to run this program.\n",
   if (! _dl_rtld_map.l_name)
     /* If not invoked directly, the dynamic linker shared object file was
        found by the PT_INTERP name.  */
-    _dl_rtld_map.l_name = (char *) _dl_rtld_map.l_libname;
+    _dl_rtld_map.l_name = (char *) _dl_rtld_map.l_libname->name;
   _dl_rtld_map.l_type = lt_library;
   while (l->l_next)
     l = l->l_next;
@@ -481,6 +477,19 @@ of this helper program; chances are you did not intend to run this program.\n",
        }
     }
 
+  /* Now let us see whether all libraries are available in the
+     versions we need.  */
+  {
+    void doit (void)
+      {
+       if (_dl_check_all_versions (l, 1) && mode == normal)
+         /* We cannot start the application.  Abort now.  */
+         _exit (1);
+      }
+
+    _dl_receive_error (print_missing_version, doit);
+  }
+
   if (mode != normal)
     {
       /* We were run just to list the shared libraries.  It is
@@ -496,7 +505,8 @@ of this helper program; chances are you did not intend to run this program.\n",
        for (l = _dl_loaded->l_next; l; l = l->l_next)
          if (l->l_opencount == 0)
            /* The library was not found.  */
-           _dl_sysdep_message ("\t", l->l_libname, " => not found\n", NULL);
+           _dl_sysdep_message ("\t", l->l_libname->name, " => not found\n",
+                               NULL);
          else
            {
              char buf[20], *bp;
@@ -505,7 +515,7 @@ of this helper program; chances are you did not intend to run this program.\n",
              while ((size_t) (&buf[sizeof buf - 1] - bp)
                     < sizeof l->l_addr * 2)
                *--bp = '0';
-             _dl_sysdep_message ("\t", l->l_libname, " => ", l->l_name,
+             _dl_sysdep_message ("\t", l->l_libname->name, " => ", l->l_name,
                                  " (0x", bp, ")\n", NULL);
            }
 
@@ -629,7 +639,18 @@ of this helper program; chances are you did not intend to run this program.\n",
 /* This is a little helper function for resolving symbols while
    tracing the binary.  */
 static void
-print_unresolved (const char *errstring, const char *objname)
+print_unresolved (int errcode __attribute__ ((unused)), const char *objname,
+                 const char *errstring)
 {
   _dl_sysdep_error (errstring, "       (", objname, ")\n", NULL);
 }
+\f
+/* This is a little helper function for resolving symbols while
+   tracing the binary.  */
+static void
+print_missing_version (int errcode __attribute__ ((unused)),
+                      const char *objname, const char *errstring)
+{
+  _dl_sysdep_error (_dl_argv[0] ?: "<program name unknown>", ": ",
+                   objname, ": ", errstring, "\n", NULL);
+}
index 988c7960e7dbd715563ea2d4de4ad11edf8e577a..9baaa053fa24cb574446a2b5a5a38bbf1313bc53 100644 (file)
 /* Major and minor version number of the GNU C library package.  Use
    these macros to test for features in specific releases.  */
 #define        __GLIBC__       2
-#define        __GLIBC_MINOR__ 0
+#define        __GLIBC_MINOR__ 1
 
 
 #if !defined __GNUC__ || __GNUC__ < 2
index 0607bf006416861dbca6dc1b860e287bf9d21a4d..dc9def2bb5b7fbae0d4c85fd0f6fe1f4d8b5a791 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
    Contributed by David Mosberger (davidm@cs.arizona.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 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.  */
 
 /* __bb_exit_func() dumps all the basic-block statistics linked into
    the bb_head chain to .d files.  */
@@ -24,19 +23,19 @@ Cambridge, MA 02139, USA.  */
 #include <sys/gmon_out.h>
 #include <sys/types.h>
 
-#include <ansidecl.h>
 #include <stdio.h>
 #include <strings.h>
 
 /* structure emitted by -a */
-struct bb {
-  long                 zero_word;
-  const char           *filename;
-  long                 *counts;
-  long                 ncounts;
-  struct bb            *next;
-  const unsigned long  *addresses;
-};
+struct bb
+  {
+    long int zero_word;
+    const char *filename;
+    long int *counts;
+    long int ncounts;
+    struct bb *next;
+    const unsigned long        int *addresses;
+  };
 
 extern struct bb *__bb_head;   /* from gmon.c */
 
@@ -44,35 +43,37 @@ extern struct bb *__bb_head;        /* from gmon.c */
 
 
 void
-DEFUN_VOID(__bb_exit_func)
+__bb_exit_func (void)
 {
   const int version = GMON_VERSION;
   struct gmon_hdr ghdr;
   struct bb *ptr;
   FILE *fp;
-  fp = fopen(OUT_NAME, "wb");
+  fp = fopen (OUT_NAME, "wb");
   if (!fp)
     {
-      perror(OUT_NAME);
+      perror (OUT_NAME);
       return;
     }
-  bcopy(GMON_MAGIC, &ghdr.cookie[0], 4);
-  bcopy(&version, &ghdr.version, sizeof(version));
-  fwrite(&ghdr, sizeof(ghdr), 1, fp);
+  bcopy (GMON_MAGIC, &ghdr.cookie[0], 4);
+  bcopy (&version, &ghdr.version, sizeof (version));
+  fwrite (&ghdr, sizeof (ghdr), 1, fp);
 
-  for (ptr = __bb_head; ptr != 0; ptr = ptr->next) {
-    u_int ncounts = ptr->ncounts;
-    u_char tag;
-    u_int i;
+  for (ptr = __bb_head; ptr != 0; ptr = ptr->next)
+    {
+      u_int ncounts = ptr->ncounts;
+      u_char tag;
+      u_int i;
 
-    tag = GMON_TAG_BB_COUNT;
-    fwrite(&tag, sizeof(tag), 1, fp);
-    fwrite(&ncounts, sizeof(ncounts), 1, fp);
+      tag = GMON_TAG_BB_COUNT;
+      fwrite (&tag, sizeof (tag), 1, fp);
+      fwrite (&ncounts, sizeof (ncounts), 1, fp);
 
-    for (i = 0; i < ncounts; ++i) {
-      fwrite(&ptr->addresses[i], sizeof(ptr->addresses[0]), 1, fp);
-      fwrite(&ptr->counts[i], sizeof(ptr->counts[0]), 1, fp);
+      for (i = 0; i < ncounts; ++i)
+       {
+         fwrite (&ptr->addresses[i], sizeof (ptr->addresses[0]), 1, fp);
+         fwrite (&ptr->counts[i], sizeof (ptr->counts[0]), 1, fp);
+       }
     }
-  }
   fclose (fp);
 }
index 66dd305b0b56bfc9e9018362cb69f50b44231a6e..9873ba1b61b09819710e86e1cbd6fc09f9a3f26d 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1991, 1996, 1997 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 <grp.h>
 #include <stdio.h>
index d19e4d189b3a929ff3cc4244d6aa966767d00052..5ef1e976dd74b184fedd1cc76b31797c56e41b69 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <grp.h>
 
index 1f60763ea88274104ad40d384cf9c9dc4d86c906..6b168e32a42b8bfafeece8e7125dadee423291fa 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <grp.h>
 
index b90000ba1ea15141a54d4bf27fc853e549474981..cbde480d2b2ba6f5add44e09c9bbb280988d6c70 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <grp.h>
 
index 6c7704dd52950fc188761c1556cc9357a94ec84f..8f05ae50607ec5197b9389a6377728a63322d4a9 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <grp.h>
 
index f060ea9f5f1d5dc91ccd94831a9eb1ea04c3b2e4..1cd9884fdb92a80ea3f4d548bedf77a195ec3a53 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <grp.h>
 
index c1292bb5814a887f9d3c2161d308be40caebf4dc..eb34c1f7776266115e6b8f34ed722de6a4b0be30 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <grp.h>
 
index dc6e64f3b7050ab0100768ae63481b6546d6617c..16b0da7fd6cb2ab315501d76a64f7a954b3bbb90 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 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 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, 1997 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 <hurd.h>
 #include <hurd/fd.h>
index e3186eb0cdb6c90d0d86cbcc7820f5e433e9fd58..dc004287a7f2ee2932bf855c83bb20361f57aab8 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1995, 1996, 1997 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 <mach/exc_server.h>
 #include <hurd/signal.h>
index 71aef1b6cf0704a8bf37533f591de1d0adcc1497..95e016951b43035205a17f3364b2742b8b49a8ce 100644 (file)
@@ -1,21 +1,21 @@
 /* _hurd_ctty_input -- Do an input RPC and generate SIGTTIN if necessary.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1995, 1997 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 <hurd/signal.h>
@@ -52,7 +52,7 @@ _hurd_ctty_input (io_t port, io_t ctty, error_t (*rpc) (io_t))
          if (err == EBACKGROUND)
            {
              /* Send a SIGTTIN signal to our process group.
-                
+
                 We must remember here not to clobber ERR, since
                 the loop condition below uses it to recall that
                 we should retry after a stop.  */
index 0d9c54383df3abadbc01a6e4de3d8228cdaed420..4bd33ae833d9b7349467ad0d4dc40fc1fe80df8a 100644 (file)
@@ -1,21 +1,21 @@
 /* _hurd_ctty_output -- Do an output RPC and generate SIGTTOU if necessary.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1995, 1997 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 <hurd/signal.h>
@@ -57,7 +57,7 @@ _hurd_ctty_output (io_t port, io_t ctty, error_t (*rpc) (io_t))
          else
            {
              /* Send a SIGTTOU signal to our process group.
-                
+
                 We must remember here not to clobber ERR, since
                 the loop condition below uses it to recall that
                 we should retry after a stop.  */
index d1ee999857084e440c0e8e65c5d9b66964e0a4fb..bbd4d25ea20f41edc322bdcf3a8000677a1f6e82 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 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 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) 1991, 92, 93, 94, 95, 96, 97 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 <ansidecl.h>
 #include <hurd.h>
index 8c8a3b839b947c29440271cc3ff14da25ca1a989..d745fb08668ad8d221abe5eba4f5294c07341f66 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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 <hurd.h>
 #include <hurd/fd.h>
@@ -24,7 +23,7 @@ Cambridge, MA 02139, USA.  */
 
 /* Change the current root directory to FD.  */
 int
-DEFUN(fchroot, (fd), int fd)
+fchroot (int fd)
 {
   error_t err;
   file_t dir;
index 54beb2a09a5b4deb675b7069a730977e75c8f3e7..e1f5e26e687258bcc8e590ff2f0d5c6a47035c6f 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 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.  */
+/* Copyright (C) 1994, 1995, 1997 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 <hurd/fd.h>
 
index 842066c1504b5dce126d54c1daf955c63e544ce7..8bfc03ab8b44b0fbd89d6b54c876b3a9ef9a3f65 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 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.  */
+/* Copyright (C) 1993, 1994, 1995, 1997 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 <errno.h>
 #include <unistd.h>
index f228d5e47c361d3f7394ab4337cc479a8a74aadc..288ce6bac8e282478399905a4b92df71951d8f1e 100644 (file)
@@ -1,21 +1,21 @@
 /* _hurd_fd_write -- write to a file descriptor; handles job control et al.
-Copyright (C) 1993, 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.  */
+   Copyright (C) 1993, 1994, 1995, 1997 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 <errno.h>
 #include <unistd.h>
index 5792b3e26e44fa7dbfc7516f0b645c7a5ebcd338..b86f06db62dcd6d7852d03e4eda331e1cbbdecac 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1995, 1997 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 <hurd.h>
 #include <stdio.h>
 #include <fcntl.h>
@@ -87,7 +86,7 @@ static const __io_functions funcsio = { readio, writeio, seekio, closeio };
 \f
 
 /* Defined in fopen.c.  */
-extern int EXFUN(__getmode, (CONST char *mode, __io_mode *mptr));
+extern int __getmode (const char *mode, __io_mode *mptr);
 
 
 /* Open a stream on PORT.  MODE is as for fopen.  */
@@ -119,7 +118,7 @@ __fopenport (mach_port_t port, const char *mode)
   if (stream == NULL)
     return NULL;
 
-  stream->__cookie = (PTR) port;
+  stream->__cookie = (void *) port;
   stream->__mode = m;
   stream->__io_funcs = funcsio;
   stream->__room_funcs = __default_room_functions;
index a71ad88a7f248c4129f64ab2aaad63ade3271df6..e57de6aa5c25c7753f1e8cf236a1c7441c4b9d0d 100644 (file)
@@ -1,21 +1,21 @@
 /* Get a host configuration item kept as the whole contents of a file.
-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., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+   Copyright (C) 1996, 1997 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 <fcntl.h>
 #include <hurd.h>
index 2204db2ce3fad69bf29c77ce4eae142dc0310a36..a274a710f7f2575b651b5d413c45099691566f58 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1994, 1995, 1997 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>
 
@@ -43,7 +43,7 @@ __getdport (int fd)
       errno = EBADF;
       return MACH_PORT_NULL;
     }
-  else      
+  else
     {
       __mach_port_mod_refs (__mach_task_self (), _hurd_init_dtable[fd],
                            MACH_PORT_RIGHT_SEND, 1);
index 4fb40eb6ccb9f351d939462fac36471b822d938d..f367e0ea9a4e7050e110e2d5d8b3cb30a434f4a8 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1994, 1996, 1997 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 <hurd/id.h>
index 80a8bf459005fb092ba58630959d1fcd014de341..852b65946c73c9d1119d03e5d6a11e718acb2d38 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1997 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>
 
index 8ebe2c8ff39847a2d57bdb6dfe03177cee3d19ff..a31638a1b20734a52c5517fc4c9753b129fbb9ee 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 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 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, 1997 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 <hurd.h>
 #include <hurd/signal.h>
index bb8e2e7c1112df404dc46a9b1c16c758ca19d8ca..3874fb277bf2e9b600fd60faa7ec0587999ef02a 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1993, 1994, 1995, 1996, 1997 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        _HURD_H
 
index b6402ea075d8c0ab31a9be106b9522dc7ccc2af6..10fd5630896fc88a6aa375b0a2c3260fbd212ec2 100644 (file)
@@ -1,21 +1,21 @@
 /* File descriptors.
-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 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) 1993, 1994, 1995, 1996, 1997 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        _HURD_FD_H
 
index 7a50081038b70ebe78d8413cff26404cb78917cc..cf8df3e75da64ecf623622b1842cf76a9bdb71c0 100644 (file)
@@ -1,21 +1,21 @@
 /* User and group IDs.
-Copyright (C) 1993, 1994 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.  */
+   Copyright (C) 1993, 1994, 1997 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        _HURD_ID_H
 
index 431b3be4251c4d3897887dea1fc3e06625345a86..8c6dbfd0bee9f591aefe9e8c2fa1a73c7db01eb6 100644 (file)
@@ -1,21 +1,21 @@
 /* User-registered handlers for specific `ioctl' requests.
-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 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) 1993, 1994, 1995, 1996, 1997 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        _HURD_IOCTL_H
 #define        _HURD_IOCTL_H   1
index 09760be59be94c84c51afa555826e648e586e6ff..a32f54dca7591b7a3976138446a7bb1f63583181 100644 (file)
@@ -1,21 +1,21 @@
 /* Declarations of file name translation functions for the GNU Hurd.
-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 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) 1995, 1996, 1997 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 _HURD_LOOKUP_H
 #define _HURD_LOOKUP_H 1
index 9de021c45ab71b31651059118d8f43022e0bfd29..d58c45fb9792bb0ba1776194799503318b496fa3 100644 (file)
@@ -1,21 +1,21 @@
 /* Lightweight user references for ports.
-Copyright (C) 1993, 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.  */
+   Copyright (C) 1993, 1994, 1995, 1997 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        _HURD_PORT_H
 
index 042df050081a6a707ee45b232cceae656df20c5d..e76963d41ec770662c48719f460dd48400ff368a 100644 (file)
@@ -1,21 +1,21 @@
 /* Resource limits for the Hurd.
-Copyright (C) 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.  */
+   Copyright (C) 1994, 1995, 1997 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 _HURD_RESOURCE_H
 #define _HURD_RESOURCE_H
index 3d5feaba9308687aa9fdaa78d0f4a3541412cf5c..091e74591456e4b9a8d38aa264adf18d62735cf9 100644 (file)
@@ -1,21 +1,21 @@
 /* Internal per-thread variables for the Hurd.
-Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1994, 1995, 1997 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.  */
 
 #ifndef _HURD_THREADVAR_H
 #define        _HURD_THREADVAR_H
@@ -33,7 +33,7 @@ Cambridge, MA 02139, USA.  */
    stack pointer is ignored; and __hurd_threadvar_stack_offset gives the
    address of a small allocated region which contains the variables for the
    single thread.  */
-   
+
 extern unsigned long int __hurd_threadvar_stack_mask;
 extern unsigned long int __hurd_threadvar_stack_offset;
 
index 89fe3a0d2c4ba2aa2c53ed7e88230f1a72e37c5a..95efb89326edd845fff0768b9cee4f1743a6f82d 100644 (file)
@@ -1,21 +1,21 @@
 /* Support for chains recording users of a resource; `struct hurd_userlink'.
-Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1994, 1995, 1997 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.  */
 
 #ifndef        _HURD_USERLINK_H
 
@@ -31,7 +31,7 @@ Cambridge, MA 02139, USA.  */
 
 /* This structure records a link in two doubly-linked lists.
    We call these the per-resource user list and the per-thread
-   active-resource list. 
+   active-resource list.
 
    Users of a given resource are recorded by their presence in a list
    associated with that resource.  A user attaches his own link (in local
index db93fd6ec336c0d173d13a784f755e9472e785bd..7ddfcd34e52c8a22472a8517ffb46208cd679107 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 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.  */
+/* Copyright (C) 1991, 92, 93, 94, 95, 97 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 <hurd.h>
 #include <hurd/msg_server.h>
index 2b4b0484ae13ba0092ffc0028902457584f3ebe6..83e44081f54b89f411387fa6ce66cdbdf6332cf8 100644 (file)
@@ -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.
-
-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) 1991, 92, 93, 94, 95, 96, 97 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 <errno.h>
 #include <unistd.h>
index 7a826ebbbdda2d15f4f639704b7980b6a85fc9fe..6b61c3ddc9481b3d4fc27f40adf1ab8577b45f02 100644 (file)
@@ -1,21 +1,21 @@
 /* Host configuration items kept as the whole contents of a file.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1996, 1997 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.  */
 
 /* Fetch and atomically store the contents of the file ITEM.
    Returns the size read or written, or -1 for errors.
index 6f1c977cc8f7a7cb494234e424457c53fb7bcc1f..8bfc3c7bc9c9127d9b54ebae0f2812b30c0254c5 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 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.  */
+/* Copyright (C) 1993, 1994, 1995, 1997 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 <hurd.h>
 #include <hurd/id.h>
index 1704fa8879d4edd8fb05fd759b6aed7ec8ee64ae..425b9b717c9dcd1da0a440854ccbfc40f671ce1e 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1992, 93, 94, 95, 96, 97 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/stat.h>
 #include <stdlib.h>
index 33a7e094ecc6289ef5578ab707960c195fb5491f..848257129963b0ad3042f00ff00e7658a5ac4df4 100644 (file)
@@ -1,21 +1,21 @@
 /* ioctl commands which must be done in the C library.
-Copyright (C) 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 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, 1997 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 <hurd.h>
 #include <hurd/fd.h>
index 4fab0346f69f753278e58772842fa64848784c49..c87b16051b57f42a544e4af980d41f16e6bfa023 100644 (file)
@@ -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.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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 <errno.h>
 #include <sys/types.h>
index 98aca5511878e18691731d512bbb05a4832e643a..6ca84ceb10b3a0d2a5a55c368f7cd6d65c9a1835 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1992, 93, 94, 95, 96, 97 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 <hurd.h>
 #include <hurd/lookup.h>
index b0b4f3147bb8c4c173ea22c954d1c58989a684ad..5fac8d4cd376d3918a7661b596a1f43809a332ec 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1992, 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 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) 1992, 1994, 1995, 1996, 1997 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 <hurd.h>
 #include <hurd/msg_server.h>
index fa52f19e4e517d919e14b56d9495624d375a27a6..4b9de3255e9a4a92b90d241d0537b96f4b269712 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 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.  */
+/* Copyright (C) 1991, 92, 93, 94, 95, 97 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 <hurd.h>
 pid_t _hurd_pid, _hurd_ppid, _hurd_pgrp;
index 5b7dfd883f2901dffd96570bc0d6c23cb69f4465..d038eaaf92b2fc540f364c3d3905ce56e87e39f0 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 1994 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.  */
+/* Copyright (C) 1991, 1992, 1993, 1994, 1997 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 <hurd.h>
 #include <hurd/port.h>
index 66ef41656d61d96e5ff1a3de110c9927b6180508..d3da694ef10f837f18dc556f4053ec38ddc91431 100644 (file)
@@ -1,21 +1,21 @@
 /* Support code for dealing with priorities in the Hurd.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1994, 1995, 1996, 1997 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/resource.h>
 #include <hurd.h>
index 2cc33682a55b879f9bbfef26aa3706a82c73e69c..e7512ac600e743b62932b68ef76328d49cd45e60 100644 (file)
@@ -1,21 +1,21 @@
 /* Resource limits.
-Copyright (C) 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.  */
+   Copyright (C) 1994, 1995, 1997 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 <hurd.h>
 #include <cthreads.h>
index a623270c3cfd0fc2dc1e92931ee19bf0fc96f9e9..f5263b2cb9ca92b5ac7584838a217627cb5e06c5 100644 (file)
@@ -1,22 +1,21 @@
 /* _hurd_socket_server - Find the server for a socket domain.
-
-Copyright (C) 1991, 1992, 1993, 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.  */
+   Copyright (C) 1991, 92, 93, 94, 95, 97 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 <hurd.h>
 #include <sys/socket.h>
index cd6922fd2aa7ceae0d657252d05a5346354888cc..3531c0e8cfb18c6262e0dbb6b20b54c6d81f43d5 100644 (file)
@@ -1,21 +1,21 @@
 /* Initial program startup for running under the GNU Hurd.
-Copyright (C) 1991, 92, 93, 94, 95, 96 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.  */
+   Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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 <errno.h>
 #include <stdlib.h>
index fd6a36605dffa38d0464457916db70efaca84bdb..90749ee0e3283a834433306ee0555d9dba13169e 100644 (file)
@@ -1,21 +1,21 @@
 /* Data from initial program startup for running under the GNU Hurd.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1995, 1997 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.  */
 
 #ifndef _HURDSTARTUP_H
 #define _HURDSTARTUP_H 1
@@ -31,7 +31,7 @@ Cambridge, MA 02139, USA.  */
     char *envp_terminator = NULL;
     struct hurd_startup_data data;
 
-*/   
+*/
 
 struct hurd_startup_data
   {
index fe7424b9bcf2d38f6fcfae4dae06348a623534d8..df088954ce104cf8e79722baeb998d90d852b10d 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994 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.  */
+/* Copyright (C) 1994, 1997 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 <hurd.h>
 #include <hurd/fd.h>
index 63fac30959342fa1a8108daf07b718cfeb03ffa3..533099223a082b1867b72f2c1b0a7cb5273fad30 100644 (file)
@@ -1,21 +1,21 @@
 /* Replacement for mach_msg used in interruptible Hurd RPCs.
-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 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) 1995, 1996, 1997 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 <mach.h>
 #include <mach/mig_errors.h>
index 7ed12bee6230e552540591415b5ced3d08cd0112..10ada16c7043252259533b8babaadf5cdc1815d8 100644 (file)
@@ -1,21 +1,21 @@
 /* Special MiG definitions for interruptible RPC stubs.
-Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1994, 1995, 1997 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.  */
 
 /* Cause user stubs for interruptible RPCs to import a special header to
    modify their behavior.  */
index 169d1c7430ce04696bc223ac2ffe9f269e07ab65..41276ec9a93dbce91135049721ba4beae118a063 100644 (file)
@@ -1,21 +1,21 @@
 /* Special MiG definitions for interruptible RPC stubs.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1995, 1997 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.  */
 
 /* This file is imported by the MiG-generated user stubs for interruptible
    RPCs.  We modify them to use our own function in place of mach_msg.  */
index ae783ef2703e69758c1024a006979e9e5e00d652..4250affd0ba4f5e8675ad046765d1f0379ec4e84 100644 (file)
@@ -1,22 +1,21 @@
 /* Demux messages sent on the signal port.
+   Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
 
-Copyright (C) 1991, 1992, 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 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 <hurd/signal.h>
index de9a3933f409c3009cd6f5164e9132567090b198..37ba82e3347a058b9cf0958f02d7a48f9db88b32 100644 (file)
@@ -1,26 +1,26 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1997 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/fd.h>
 #include <stdlib.h>
 #include "hurdmalloc.h"                /* XXX */
 
-/* Allocate a new file descriptor structure 
+/* Allocate a new file descriptor structure
    and initialize it with PORT and CTTY.  */
 
 struct hurd_fd *
index 244368acaab601c60d17b14ee2e8078613e75a1d..208ab9eb66250f6bc60e4af79abbdb26cb85c78c 100644 (file)
@@ -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, 1997 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 <hurd/fd.h>
index 6b8182bd02cab8f859cc1b4ab87523334d6abaa9..81bd149f45ac33446547f629ee6cd7337512912d 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 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.  */
+/* Copyright (C) 1991, 92, 93, 94, 95, 97 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 <hurd.h>
 
index 556baaace062b4e0ccf84dfcacf4266562d24e18..4d50d85f154cb3cc09088ae0f94fc77bb86e924d 100644 (file)
@@ -1,21 +1,21 @@
 /* Cleanup function for `struct hurd_port' users who longjmp.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1995, 1997 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 <mach.h>
 #include <hurd/port.h>
index cad89e770fed17a44aabd5c6bcea8d07f37983d3..063f27b66e27360dcf369fcfbb7833633db65d99 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1997 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 <hurd/fd.h>
index cdbeacc36d42cae6a9df1ffc3d020351c215bcc6..b530162822e8e5e6c9048ac4ec70718ba163d4db 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1995, 1996, 1997 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>
 
index 029970d5bb04a1e7202d7086208553a67f65c736..4ebb94d3f6e1037cf2ace81268ff03fcd8546341 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 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.  */
+/* Copyright (C) 1994, 1995, 1997 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 <hurd.h>
 
index f760e37e6ec0ebfc85ac778e99c52ed5da6f01dd..ef6388bd9d50c970564ba05895a6664a60a087f0 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 1994 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.  */
+/* Copyright (C) 1993, 1994, 1997 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 <hurd.h>
 
index 491b566d04a04bee70be8306c73d8d3070781ae6..751619233c1e4a9e822ba93c2bfcaef4ec937065 100644 (file)
@@ -1,21 +1,21 @@
 /* Report on what a thread in our task is waiting for.
-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., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+   Copyright (C) 1996, 1997 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 <hurd.h>
 #include <hurd/signal.h>
index f8d2d692f7f42b70b872b6a0198b8b276998f088..5c905d8f04c174dcd5f63fc9055c267db27e7cd5 100644 (file)
@@ -1,21 +1,21 @@
 /* Set a host configuration item kept as the whole contents of a file.
-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., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+   Copyright (C) 1996, 1997 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 <fcntl.h>
 #include <hurd.h>
index 3591968978485e0a596198f4c39335e1e9ea6918..cfa0449014a43b24d763dd565f85ceb23c6faeeb 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 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 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) 1991, 92, 93, 94, 95, 96, 97 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 <hurd.h>
 #include <hurd/port.h>
index 572f636a4b50e7cb885895d3e0e5f87e2fa68f5e..8b202401a41dad4dbff540e60ac97ea02e733bbb 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 1994 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.  */
+/* Copyright (C) 1993, 1994, 1997 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 <hurd.h>
 #include <hurd/id.h>
index eb61fec973e5f13668e6ef8b6980024966d6802b..8bf636b0fef350062c759a822f64dc2c5f6fd257 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1997 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/signal.h>
 #include <stdio.h>
index 28c0d941b5e79e47f161638310b511c827d9fcce..8d1b8892a809368971c3fb945b67978a40ab78ba 100644 (file)
@@ -1,21 +1,21 @@
 /* longjmp cleanup function for unwinding past signal handlers.
-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 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) 1995, 1996, 1997 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 <hurd.h>
 #include "thread_state.h"
index 707753c104817fddbdf70b6ca6719412ad577aa5..febed11ff4b81624a08a9aaba9dd1d4aa7c87b02 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1993, 1995, 1997 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>
 
index 85ba010407209935689cf7ea3e737f7e741ea525..9791268e33e1772f13c13720aa11feec5b2e8f86 100644 (file)
@@ -1,21 +1,21 @@
 /* Thread cancellation support.
-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 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) 1995, 1996, 1997 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 <hurd/signal.h>
 #include <hurd/interrupt.h>
index ff0992ce688106d1329e1093c4fcc7ab812c36f8..1a4235d349be52cd939f8933b0c7d55354d746c5 100644 (file)
@@ -1,21 +1,21 @@
 /* Cheap function to get current thread from sigstate without a syscall.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1995, 1997 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/signal.h>
 
index dcdcd5a13df546e7d2ca48fb817e692061546217..8ec064ae41c62d8c4a592c0a0a78a96375007ff8 100644 (file)
@@ -1,30 +1,31 @@
-/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1994, 1997 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 <stdarg.h>
 #include <stdio.h>
 #include <string.h>
 #include <hurd.h>
 
 static ssize_t
-DEFUN(pwrite, (cookie, buf, n),
-      PTR cookie AND CONST char *buf AND size_t n)
+pwrite (cookie, buf, n)
+     void *cookie;
+     const char *buf;
+     size_t n;
 {
   error_t error = __io_write ((io_t) cookie, buf, n, -1,
                              (mach_msg_type_number_t *) &n);
@@ -37,24 +38,26 @@ DEFUN(pwrite, (cookie, buf, n),
 /* Write formatted output to PORT, a Mach port supporting the i/o protocol,
    according to the format string FORMAT, using the argument list in ARG.  */
 int
-DEFUN(vpprintf, (port, format, arg),
-      io_t port AND CONST char *format AND va_list arg)
+vpprintf (port, format, arg)
+     io_t port;
+     const char *format;
+     va_list arg;
 {
   int done;
   FILE f;
 
   /* Create an unbuffered stream talking to PORT on the stack.  */
-  memset((PTR) &f, 0, sizeof(f));
+  memset ((void *) &f, 0, sizeof (f));
   f.__magic = _IOMAGIC;
   f.__mode.__write = 1;
-  f.__cookie = (PTR) port;
+  f.__cookie = (void *) port;
   f.__room_funcs = __default_room_functions;
   f.__io_funcs.__write = pwrite;
   f.__seen = 1;
   f.__userbuf = 1;
 
   /* vfprintf will use a buffer on the stack for the life of the call.  */
-  done = vfprintf(&f, format, arg);
+  done = vfprintf (&f, format, arg);
 
   return done;
 }
index eb27b244d9c5a8d06599df9772ffa9c706c82839..20300c806af728efd5fdec239253131f1d638c45 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netinet/ether.h>
 #include <netinet/if_ether.h>
index 4b38f034cc912d400cb132674a44864c5723cafe..28fe6f6962ff640cdc81d57ac4d93aa1b19a1967 100644 (file)
@@ -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@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.  */
+/* Copyright (C) 1996, 1997 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 <ctype.h>
 #include <stdlib.h>
index 728f841c9280b59904f353d241de1e9a91da7af5..35d61bd2f7e252153a8b18aaef5597d8e8e403fb 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netinet/ether.h>
 #include <netinet/if_ether.h>
index a2735ab4217fada65e8676bc0be0b47dd14cc10e..54ca8b101c0d3df717f6764bb1d3cd6447811a87 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <stdio.h>
 #include <netinet/ether.h>
index abc2eab06dd9772971610c01f2d3a1dbdc5d52fa..410abe2342aeb685a856b0c9b1731830babc260b 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index 7dce4403d785dccde408504bfbb8064a93b5c415..33b6c7c71f08ac5818c1be8c3439ba88021288f8 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index 5c7293683feef8b759521fabde8bbd0bac10a1ad..13c8d5e46c0530561516d1ef0b7320c7eb09eb52 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index 88a4b660778b0d6e3b45f7dd0daa57a8d9f69579..7d9006d268969da26e9592ddde5010597db7089c 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index 84871524593d38b13a5f0d99c5481072ef4ed2a0..c27fa88370b84057081acf8970f0c2eff03b5086 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index febd8079790e160528b152969037f72c419bd6dd..4561fc22cf0c74dcc769e4ff21a7de50b024c6da 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index 6b871188380c1315c808c9cfca53a73a7182f202..e8f27106377fac011ad6ecfda3075da6092a8e84 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index cc9f691cb7946dbffc1c1eefc5a093fee1a61d0a..eadf231406fb5133ee6105dfaee2f3835edee6d9 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index b6ac85ce84f6d2d3bc241fb342ad875f9a3a37b6..7dee6b5132ff69c37954a4226df2ae1ee112738d 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index 11452c1ddf561fcb3fd6f21ff1f17a8cb876db52..677ff726140511f8e777648a10e42713084fc708 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index c9152808965c02d1876818b5630af0a6e05fb3c8..97ef193a80fee0841a714eda7e46a5d71f45a13a 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index 8b55a4ddef7f34e523dc9626ae75ac4fff23b186..64b364a47ea6fbde1611cd160a68909e202548c9 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index 47a2f9ec2b43cbd3e6e0fb6a2954e68dacf47690..365c5100b3a487f620ffb4b46ba74eafc1098db6 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index f29151337831c0c3e2c222f5b9e055a682d98f94..45c1c4803da7cd988e5304f5dd5a7b9843d171ec 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index be14f71fed0e9742737b54893517b067e2e15403..d7d1a1157d0edda44843027cedd0bd79e8fa172d 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <rpc/netdb.h>
 
index c8b5eba23a3e860f4cdc7f61e01cf98cfdf6834f..278a79d22fb59acc1f48df8322f1d2951cba4fb8 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <rpc/netdb.h>
 
index 95b4624aba2dbfa454c6f29a3dc78ae85185574c..9fb2f30da5cf91f1aef3e2c0ed00dff800e486a4 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <rpc/netdb.h>
 
index 4b0215610fe2fd754b5b125cca840e9837472188..1a27ba8074d50436e648ac16111abfdeec99bf8c 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <rpc/netdb.h>
 
index e3e5b5288a8697564352535c7a1bf555cc9f4939..0c3e0f9d162244f08fd6d238b93a2d50b646e22e 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 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 <rpc/netdb.h>
 
index 3a64e7170ca6a100ac3540ee0b893cd5e9da8cf9..0208d9d7f328f6ecb1922aeb6a0fa5b28bc07019 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index bb51a6848c8a7240b95c2748d007d9b366129988..74d729992526eaa990b1c0dd62f7a6e7dd4438a4 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index 676e3c91acd6bc220208f7a8874eaf6e2025e855..c12cd93c034cf708f222acd5e365c2bcf7a2f67b 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index 863d2923b865f668e4c8d8cc8bb2ded2c30734ef..6ce3eedb054e8afbbd1c2387b86c32424a93316b 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index 352c646bae02bb29f1052e1e65b2988dc4d46e3b..f3153d20737641a2c2dcdd69cf0c112bbb222305 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index c7f3508cfd328ce7da76c0ab8d38726bc5ac73a1..86a91324cd39f6a9ba719e3e6a3aa2e636659758 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index 58851ef08b14869b78da911666593c31406d60ae..8f750acc203efa1ca699862d632acb9e490f76d9 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <netdb.h>
 
index 3143325e51e824d4269def944380b484da91b0b5..f0fd7f7ea5b44779028f58e7b67ca1351298cb13 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 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 <features.h>
 
index d773d8a7cea4d87a42ef3a262ad4dbbf2a0c0eb4..a37244c52e8c76d7fb5d390fca2e4e79ed0bdd9c 100644 (file)
@@ -1,21 +1,21 @@
 /* Internal header for netgroup related functions.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1996, 1997 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 _NETGROUP_H
 #define _NETGROUP_H    1
index b14377a13d3a6cf02d2517c8673d62e5a981a56f..06d01b1508b9c9f53165a7bf6707060197d748f8 100644 (file)
@@ -1,21 +1,21 @@
 /* Functions for storing Ethernet addresses in ASCII and mapping to hostnames.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1996, 1997 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 __NETINET_ETHER_H
 
@@ -25,24 +25,30 @@ Boston, MA 02111-1307, USA.  */
 /* Get definition of `struct ether_addr'.  */
 #include <netinet/if_ether.h>
 
+__BEGIN_DECLS
 
 /* Convert 48 bit Ethernet ADDRess to ASCII.  */
-char *ether_ntoa __P ((const struct ether_addr *__addr));
-char *ether_ntoa_r __P ((const struct ether_addr *__addr, char *__buf));
+extern char *ether_ntoa __P ((__const struct ether_addr *__addr));
+extern char *ether_ntoa_r __P ((__const struct ether_addr *__addr,
+                               char *__buf));
 
 /* Convert ASCII string S to 48 bit Ethernet address.  */
-struct ether_addr *ether_aton __P ((const char *__asc));
-struct ether_addr *ether_aton_r __P ((const char *__asc,
-                                     struct ether_addr *__addr));
+extern struct ether_addr *ether_aton __P ((__const char *__asc));
+extern struct ether_addr *ether_aton_r __P ((__const char *__asc,
+                                            struct ether_addr *__addr));
 
 /* Map 48 bit Ethernet number ADDR to HOSTNAME.  */
-int ether_ntohost __P ((char *__hostname, const struct ether_addr *__addr));
+extern int ether_ntohost __P ((char *__hostname,
+                              __const struct ether_addr *__addr));
 
 /* Map HOSTNAME to 48 bit Ethernet address.  */
-int ether_hostton __P ((const char *__hostname, struct ether_addr *__addr));
+extern int ether_hostton __P ((__const char *__hostname,
+                              struct ether_addr *__addr));
 
 /* Scan LINE and set ADDR and HOSTNAME.  */
-int ether_line __P ((const char *__line, struct ether_addr *__addr,
-                    char *__hostname));
+extern int ether_line __P ((__const char *__line, struct ether_addr *__addr,
+                           char *__hostname));
+
+__END_DECLS
 
 #endif /* netinet/ether.h */
index 7d62aa80f8298ac46e7a65077e15144577f51568..79195b37804f29b3e83e6ba013ff5d6621423ffc 100644 (file)
@@ -1,23 +1,23 @@
 /* bindtextdom.c -- implementation of the bindtextdomain(3) function
-   Copyright (C) 1995 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1997 Free Software Foundation, Inc.
 
-This file is part of the GNU C Library.  Its master source is NOT part of
-the C library, however.  The master source lives in /gd/gnu/lib.
+   This file is part of the GNU C Library.  Its master source is NOT part of
+   the C library, however.  The master source lives in /gd/gnu/lib.
 
-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>
index fe7299cda1820d69f8a321e12006fb06efaf167b..948d0a730cd12d35454ce19a8b00e2aadcd6998a 100644 (file)
@@ -1,23 +1,23 @@
-/* dcgettext.c -- implementation of the dcgettext(3) function
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-
-This file is part of the GNU C Library.  Its master source is NOT part of
-the C library, however.  The master source lives in /gd/gnu/lib.
-
-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.  */
+/* Implementation of the dcgettext(3) function.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+
+   This file is part of the GNU C Library.  Its master source is NOT part of
+   the C library, however.  The master source lives in /gd/gnu/lib.
+
+   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.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
index ef214d0f03fd6753009e6fcee55e6884c086deaa..b63e0831620e47f7321b70cf0237e66ce908cb9f 100644 (file)
@@ -1,23 +1,23 @@
-/* dgettext.c -- implementation of the dgettext(3) function
-   Copyright (C) 1995 Software Foundation, Inc.
-
-This file is part of the GNU C Library.  Its master source is NOT part of
-the C library, however.  The master source lives in /gd/gnu/lib.
-
-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.  */
+/* Implementation of the dgettext(3) function.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+
+   This file is part of the GNU C Library.  Its master source is NOT part of
+   the C library, however.  The master source lives in /gd/gnu/lib.
+
+   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.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
index c789e227e6d70ed02ac6f598e39fd9b95bf2b7ed..a08bd11d8a035094c2700db8a1cbd3ddef087dfd 100644 (file)
@@ -1,23 +1,23 @@
-/* gettext.c -- implementation of gettext(3) function
-   Copyright (C) 1995 Software Foundation, Inc.
+/* Implementation of gettext(3) function.
+   Copyright (C) 1995, 1997 Free Software Foundation, Inc.
 
-This file is part of the GNU C Library.  Its master source is NOT part of
-the C library, however.  The master source lives in /gd/gnu/lib.
+   This file is part of the GNU C Library.  Its master source is NOT part of
+   the C library, however.  The master source lives in /gd/gnu/lib.
 
-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>
index 6c6cfcd2d5c9e13c537392fa274a888ad1ada72a..8d5c1212343934645208f681ae755f24fdfb0d4f 100644 (file)
@@ -1,23 +1,23 @@
-/* gettext.h - internal header for GNU gettext internationalization functions
-   Copyright (C) 1995 Software Foundation, Inc.
-
-This file is part of the GNU C Library.  Its master source is NOT part of
-the C library, however.  The master source lives in /gd/gnu/lib.
-
-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.  */
+/* Internal header for GNU gettext internationalization functions.
+   Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+
+   This file is part of the GNU C Library.  Its master source is NOT part of
+   the C library, however.  The master source lives in /gd/gnu/lib.
+
+   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 _GETTEXT_H
 #define _GETTEXT_H 1
index c37adaba0f239b3fda4bf571514bc23e4cff684a..8a4560dbfd852b9ce4a15c6e5cba16d9a9e4ba51 100644 (file)
@@ -1,21 +1,21 @@
-/* gettextP.h -- header describing internals of gettext library
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-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 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.  */
+/* Header describing internals of gettext library
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   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 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 _GETTEXTP_H
 #define _GETTEXTP_H
index c0c59157674ec3d30602e86ddadf918e2f1af2de..7212eb0254d696652fa1b8d906f6243b29122b59 100644 (file)
@@ -1,23 +1,23 @@
-/* hash-string - Implements a string hashing function.
-   Copyright (C) 1995 Free Software Foundation, Inc.
+/* Implements a string hashing function.
+   Copyright (C) 1995, 1997 Free Software Foundation, Inc.
 
-This file is part of the GNU C Library.  Its master source is NOT part of
-the C library, however.  The master source lives in /gd/gnu/lib.
+   This file is part of the GNU C Library.  Its master source is NOT part of
+   the C library, however.  The master source lives in /gd/gnu/lib.
 
-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_VALUES_H
 # include <values.h>
index bcfaacb8bf41109065fb84a6f59ed9243fc6b492..3fe8f69cdd2b6a80d93724d582d6d95e03fa96f4 100644 (file)
@@ -1,23 +1,23 @@
-/* loadmsgcat.c -- load needed message catalogs
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Load needed message catalogs.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
 
-This file is part of the GNU C Library.  Its master source is NOT part of
-the C library, however.  The master source lives in /gd/gnu/lib.
+   This file is part of the GNU C Library.  Its master source is NOT part of
+   the C library, however.  The master source lives in /gd/gnu/lib.
 
-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>
@@ -45,8 +45,8 @@ Cambridge, MA 02139, USA.  */
 /* @@ end of prolog @@ */
 
 #ifdef _LIBC
-/* Rename the non ANSI C functions.  This is required by the standard
-   because some ANSI C functions will require linking with this object
+/* Rename the non ISO C functions.  This is required by the standard
+   because some ISO C functions will require linking with this object
    file and the name space must not be polluted.  */
 # define fstat  __fstat
 # define open   __open
index e08cdf94a99e5141d4300e31bafc030311cf036c..420a255601774ae6864aaf2fcecf9bcbd68a5765 100644 (file)
@@ -1,23 +1,23 @@
-/* localealias.c -- handle aliases for locale names
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-
-This file is part of the GNU C Library.  Its master source is NOT part of
-the C library, however.  The master source lives in /gd/gnu/lib.
-
-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.  */
+/* Handle aliases for locale names.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+
+   This file is part of the GNU C Library.  Its master source is NOT part of
+   the C library, however.  The master source lives in /gd/gnu/lib.
+
+   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.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
index 0abf65d752c4520843368049878c3b141e99aa98..4775e366b0fa8c1f47543c3819c067e82ed03167 100644 (file)
@@ -1,23 +1,23 @@
-/* textdomain.c -- implementation of the textdomain(3) function
-   Copyright (C) 1995 Software Foundation, Inc.
-
-This file is part of the GNU C Library.  Its master source is NOT part of
-the C library, however.  The master source lives in /gd/gnu/lib.
-
-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.  */
+/* Implementation of the textdomain(3) function.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+
+   This file is part of the GNU C Library.  Its master source is NOT part of
+   the C library, however.  The master source lives in /gd/gnu/lib.
+
+   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.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
index 1e1717b40b86d349a022be2e79470b360e3658b4..1f6052c4f36eedeb937aec5ab476993de0fe0d9f 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1996, 1997 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 <fcntl.h>
 #include <sys/types.h>
index 733745b584a40e22449995ea75c20ecc390eb77f..6823fafcb26dc0876d8aae7cb20db3b896813934 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1997 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/stat.h>
 #include <stdlib.h>
@@ -27,7 +26,7 @@ Cambridge, MA 02139, USA.  */
    that value is used.  */
 
 char *
-DEFUN_VOID(get_current_dir_name)
+get_current_dir_name (void)
 {
   char *pwd;
   struct stat dotstat, pwdstat;
index c391243e97620fceb136bc08e718291df193602b..c7cc6a60c0fa5cec3e640109c14b771a973c0e66 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1996, 1997 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 <unistd.h>
index 7ff1948c1d2ebb3b51dd72569395d2c26849c148..68ed1b924f599d732c87d02e1f19ed34474f220e 100644 (file)
--- a/io/pwd.c
+++ b/io/pwd.c
@@ -1,38 +1,37 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 
 int
-DEFUN_VOID(main)
+main (void)
 {
-  char *dir = getcwd((char *) NULL, 0);
+  char *dir = getcwd ((char *) NULL, 0);
 
   if (dir == NULL)
-    perror("getcwd");
+    perror ("getcwd");
   else
     {
-      puts(dir);
-      free(dir);
+      puts (dir);
+      free (dir);
     }
 
-  exit(dir == NULL ? EXIT_FAILURE : EXIT_SUCCESS);
+  exit (dir == NULL ? EXIT_FAILURE : EXIT_SUCCESS);
 }
index e2851415d8ce394d3342486cda9f468bdde848d2..5f31792745f9a2d2a18120e402690b8ab672b4f3 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1996, 1997 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 <fcntl.h>
 #include <stdio.h>
index 5388237045898d1bb4dfba4f3d0feabf44266c42..5c049e1f5929a08ab59cc19e816649fafd450915 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
@@ -146,7 +146,8 @@ const u_int32_t _nl_C_LC_COLLATE_symbol_classes[256] =
 const struct locale_data _nl_C_LC_COLLATE =
 {
   _nl_C_name,
-  NULL, 0, /* no file mapped */
+  NULL, 0, 0, /* no file mapped */
+  MAX_USAGE_COUNT,
   21,
   {
     { word: 0 },
index d45c32c34b9d94b6c70ff8f5445c4f0e0dd28dfd..6a1c3fc7beebd21fb2c5a1993982f31cbdb558a0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
@@ -341,7 +341,8 @@ const char _nl_C_LC_CTYPE_width[256] =
 const struct locale_data _nl_C_LC_CTYPE =
 {
   _nl_C_name,
-  NULL, 0, /* no file mapped */
+  NULL, 0, 0, /* no file mapped */
+  MAX_USAGE_COUNT,
   15,
   {
     { string: _nl_C_LC_CTYPE_class },
@@ -367,6 +368,6 @@ const struct locale_data _nl_C_LC_CTYPE =
     { string: "tolower\0" "toupper\0" },
     { string: _nl_C_LC_CTYPE_width },
     { word: 2 },
-    { string: "ISO_646.IRV:1983" }
+    { string: "ISO_646.IRV" }
   }
 };
index 566fedce918df73ec17b69ae6514fe742097f986..70eeb8cc80312bcceda59d43ce103cfbb4aaffeb 100644 (file)
@@ -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.
+/* Copyright (C) 1995, 1996, 1997 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.  */
 
 #include "localeinfo.h"
 
@@ -27,7 +27,8 @@ Boston, MA 02111-1307, USA.  */
 const struct locale_data _nl_C_LC_MESSAGES =
 {
   _nl_C_name,
-  NULL, 0, /* no file mapped */
+  NULL, 0, 0, /* no file mapped */
+  MAX_USAGE_COUNT,
   4,
   {
     { string: "^[yY]" },
index bc10f0009518caf87d5aca7c7a9fd9c26b84949c..8dd361a2e0efbe6c6d7927b85549f2c8c4632dca 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
@@ -30,7 +30,8 @@ static const char not_available[] = "\177";
 const struct locale_data _nl_C_LC_MONETARY =
 {
   _nl_C_name,
-  NULL, 0, /* no file mapped */
+  NULL, 0, 0, /* no file mapped */
+  MAX_USAGE_COUNT,
   15,
   {
     { string: "" },
index d3fbd9191713bbe9c7c841deeacecc8ef4fe2ca4..a456214213a27de1e4325e928b0a5207c2a2b454 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
@@ -30,7 +30,8 @@ static const char not_available[] = "\177";
 const struct locale_data _nl_C_LC_NUMERIC =
 {
   _nl_C_name,
-  NULL, 0, /* no file mapped */
+  NULL, 0, 0, /* no file mapped */
+  MAX_USAGE_COUNT,
   3,
   {
     { string: "." },
index a71ea935175a6175d7c6ee347dc2cb0e874c013c..70ee89a1920cf82102f6d0841f637dcaced7aab8 100644 (file)
@@ -25,7 +25,8 @@
 const struct locale_data _nl_C_LC_TIME =
 {
   _nl_C_name,
-  NULL, 0, /* no file mapped */
+  NULL, 0, 0, /* no file mapped */
+  MAX_USAGE_COUNT,
   53,
   {
     { string: "Sun" },
index b5eccf35c13b6787487bc66d96696208ece91490..dcf469f689573306ffcc98e4097c99b0053991ab 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
+# Copyright (C) 1991, 1992, 1995, 1996, 1997 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
@@ -21,7 +21,7 @@
 #
 subdir := locale
 
-headers                = locale.h langinfo.h
+headers                = locale.h langinfo.h xlocale.h
 distribute     = localeinfo.h categories.def iso-4217.def weight.h \
                  strlen-hash.h \
                  $(addprefix programs/, \
@@ -32,7 +32,8 @@ distribute    = localeinfo.h categories.def iso-4217.def weight.h \
                              locfile-kw.gperf locfile-kw.h linereader.h \
                              locales.h locfile.h stringtrans.h charset.h)
 routines       = setlocale findlocale loadlocale localeconv nl_langinfo \
-                 mb_cur_max codeset_name
+                 mb_cur_max codeset_name \
+                 newlocale duplocale freelocale
 categories     = ctype messages monetary numeric time collate
 aux            = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name
 others         = localedef locale
index 664fc901c46e14d31a8be31875137ccc91036b75..b04ca20cc2b32d69603c2233d2eb9ffc0af31205 100644 (file)
@@ -1,20 +1,20 @@
 /* Definition of all available locale categories and their items.  -*- C -*-
-Copyright (C) 1995, 1996 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.
-
-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) 1995, 1996, 1997 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.
+
+   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.  */
 
 /* These definitions are used by the locale-related files in the C library
    and the programs `localedef' and `locale'.
index c7fd818e7095c26b2a089bd73478a70cf0843e0a..3b327b7157aa04ccf84c8bfc19817fb20f4c8635 100644 (file)
@@ -1,22 +1,22 @@
 /* Internal function to return the name of the current codeset.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+   Copyright (C) 1996, 1997 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 <langinfo.h>
 #include <locale.h>
diff --git a/locale/duplocale.c b/locale/duplocale.c
new file mode 100644 (file)
index 0000000..494c2ec
--- /dev/null
@@ -0,0 +1,55 @@
+/* Duplicate handle for selection of locales.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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 <locale.h>
+#include <libc-lock.h>
+#include <stdlib.h>
+
+#include <localeinfo.h>
+
+
+/* Lock for protecting global data.  */
+__libc_lock_define (extern , __libc_setlocale_lock)
+
+
+__locale_t
+__duplocale (__locale_t dataset)
+{
+  __locale_t result;
+
+  /* We modify global data.  */
+  __libc_lock_lock (__libc_setlocale_lock);
+
+  /* Get memory.  */
+  result = (__locale_t) malloc (sizeof (struct __locale_t));
+  if (result != NULL)
+    {
+      int cnt;
+      for (cnt = 0; cnt < LC_ALL; ++cnt)
+       {
+         result->__locales[cnt] = dataset->__locales[cnt];
+         if (result->__locales[cnt]->usage_count != MAX_USAGE_COUNT)
+           ++result->__locales[cnt]->usage_count;
+       }
+    }
+
+  /* It's done.  */
+  __libc_lock_unlock (__libc_setlocale_lock);
+}
index d73ba4a3956b6bbba5dff09fe8022e6c0f69dd66..308aa2b60fc4f7a6c85a5e6e1eb70a5b4ddaabef 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
 
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/mman.h>
 
 #include "localeinfo.h"
 
 
 /* Constant data defined in setlocale.c.  */
-extern const struct locale_data *const _nl_C[];
-
-
-static inline char *
-copy (const char *string)
-{
-  size_t len;
-  char *new;
-  len = strlen (string) + 1;
-  new = (char *) malloc (len);
-  return new != NULL ? memcpy (new, string, len) : NULL;
-}
+extern struct locale_data *const _nl_C[];
 
 
 /* For each category we keep a list of records for the locale files
@@ -44,9 +34,9 @@ copy (const char *string)
 static struct loaded_l10nfile *locale_file_list[LC_ALL];
 
 
-const struct locale_data *
+struct locale_data *
 _nl_find_locale (const char *locale_path, size_t locale_path_len,
-                int category, char **name)
+                int category, const char **name)
 {
   int mask;
   /* Name of the locale for this category.  */
@@ -88,10 +78,10 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
   loc_name = (char *) _nl_expand_alias (*name);
   if (loc_name == NULL)
     /* It is no alias.  */
-    loc_name = *name;
+    loc_name = (char *) *name;
 
   /* Make a writable copy of the locale name.  */
-  loc_name = copy (loc_name);
+  loc_name = __strdup (loc_name);
 
   /* LOCALE can consist of up to four recognized parts for the XPG syntax:
 
@@ -141,9 +131,9 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
        return NULL;
     }
   else
-    /* If the addressed locale is already available it should be freed.
-       If we would not do this switching back and force between two
-       locales would slowly eat up all memory.*/
+    /* If the addressed locale is already available it should be
+       freed.  If we would not do this switching back and force
+       between two locales would slowly eat up all memory.  */
     free ((void *) loc_name);
 
   if (locale_file->decided == 0)
@@ -184,5 +174,51 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
     }
   *name = (char *) ((struct locale_data *) locale_file->data)->name;
 
+  /* Increment the usage count.  */
+  if (((struct locale_data *) locale_file->data)->usage_count
+      != MAX_USAGE_COUNT)
+    ++((struct locale_data *) locale_file->data)->usage_count;
+
   return (struct locale_data *) locale_file->data;
 }
+
+
+/* Calling this function assumes the lock for handling global locale data
+   is acquired.  */
+void
+_nl_remove_locale (int locale, struct locale_data *data)
+{
+  if (--data->usage_count == 0)
+    {
+      /* First search the entry in the list of loaded files.  */
+      struct loaded_l10nfile *ptr = locale_file_list[locale];
+
+      /* Search for the entry.  It must be in the list.  Otherwise it
+        is a bug and we crash badly.  */
+      while ((struct locale_data *) ptr->data != data)
+       ptr = ptr->next;
+
+      /* Mark the data as not available anymore.  So when the data has
+        to be used again it is reloaded.  */
+      ptr->decided = 0;
+      ptr->data = NULL;
+
+      /* Really delete the data.  First delete the real data.  */
+      if (data->mmaped)
+       {
+         /* Try to unmap the area.  If this fails we mark the area as
+            permanent.  */
+         if (__munmap ((caddr_t) data->filedata, data->filesize) != 0)
+           {
+             data->usage_count = MAX_USAGE_COUNT;
+             return;
+           }
+       }
+      else
+       /* The memory was malloced.  */
+       free ((void *) data->filedata);
+
+      /* Now free the structure itself.  */
+      free (data);
+    }
+}
diff --git a/locale/freelocale.c b/locale/freelocale.c
new file mode 100644 (file)
index 0000000..26860aa
--- /dev/null
@@ -0,0 +1,50 @@
+/* Free data allocated by a call to setlocale_r
+   Copyright (C) 1996, 1997 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 <locale.h>
+#include <stdlib.h>
+#include <libc-lock.h>
+
+#include "localeinfo.h"
+
+
+/* Lock for protecting global data.  */
+__libc_lock_define (extern , __libc_setlocale_lock)
+
+
+void
+__freelocale (__locale_t dataset)
+{
+  int cnt;
+
+  /* We modify global data.  */
+  __libc_lock_lock (__libc_setlocale_lock);
+
+  for (cnt = 0; cnt < LC_ALL; ++cnt)
+    if (dataset->__locales[cnt]->usage_count != MAX_USAGE_COUNT)
+      /* We can remove the data.  */
+      _nl_remove_locale (cnt, dataset->__locales[cnt]);
+
+  /* Free the locale_t handle itself.  */
+  free (dataset);
+
+  /* It's done.  */
+  __libc_lock_unlock (__libc_setlocale_lock);
+}
index aefdaa8b0ece17512654f0dceca0521e2c161d09..7052db306241cedd945bb1bea5691970ff278ff5 100644 (file)
@@ -1,21 +1,21 @@
 /* Define current locale data for LC_COLLATE category.
-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 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.  */
+   Copyright (C) 1995, 1996, 1997 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 "localeinfo.h"
 #include <endian.h>
index 2eeedf84663693103f493b731c099da79f062100..d2139aeb3117f17a295434e3914e3f58d98f3ee2 100644 (file)
@@ -1,21 +1,21 @@
 /* Define current locale data for LC_CTYPE category.
-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 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) 1995, 1996, 1997 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 "localeinfo.h"
 #include <ctype.h>
index b7e9bbfd3ab8ac12782818de48acbe46a826baee..e78f9bf235e790d93e8144dba05958e1aeece4b9 100644 (file)
@@ -1,21 +1,21 @@
 /* Define current locale data for LC_MESSAGES category.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1995, 1997 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 "localeinfo.h"
 
index f29f29a4b6eaa6db63d2006ff978ab3cfa35dc61..b041006259f5fec13183ca88e9de956e7a53f056 100644 (file)
@@ -1,21 +1,21 @@
 /* Define current locale data for LC_MONETARY category.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1995, 1997 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 "localeinfo.h"
 
index 19e9d966bc257747111aff0892d648eaf01db0f9..41845589b8d21b93f67981e5e0ef2deaab667f12 100644 (file)
@@ -1,21 +1,21 @@
 /* Define current locale data for LC_NUMERIC category.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1995, 1997 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 "localeinfo.h"
 
index f4fe561cb9dfedf3298b3f03cead414e1e9e8b07..7bed6aea13309ffbfeb904a1fbadf44f2f0b11b6 100644 (file)
@@ -1,21 +1,21 @@
 /* Define current locale data for LC_TIME category.
-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 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) 1995, 1996, 1997 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 <libc-lock.h>
 #include <stdlib.h>
index 474a73cf6e33aa70324cab8d9bb8ef955ad9a778..544c09ad88a72ea5366e24e89148ef89d11540e4 100644 (file)
@@ -1,22 +1,22 @@
 /* Functions to read locale data files.
-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>, 1996.
+   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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 <errno.h>
 #include <fcntl.h>
@@ -70,6 +70,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
   struct locale_data *newdata;
   int save_err;
   int swap = 0;
+  int mmaped = 1;
   size_t cnt;
   inline unsigned int SWAP (const unsigned int *inw)
     {
@@ -131,6 +132,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
       if (errno == ENOSYS)
        {
          /* No mmap; allocate a buffer and read from the file.  */
+         mmaped = 0;
          filedata = malloc (st.st_size);
          if (filedata != NULL)
            {
@@ -197,6 +199,8 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
   newdata->name = NULL;        /* This will be filled if necessary in findlocale.c. */
   newdata->filedata = (void *) filedata;
   newdata->filesize = st.st_size;
+  newdata->mmaped = mmaped;
+  newdata->usage_count = 0;
   newdata->nstrings = _nl_category_num_items[category];
   for (cnt = 0; cnt < newdata->nstrings; ++cnt)
     {
index 37f5434de1778d996debe837bc2bbaa0b88a7989..c16d83bb7b7c1e801ea6224307b310264ba6381d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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
@@ -105,9 +105,8 @@ extern struct lconv *localeconv __P ((void));
    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];
+/* Get locale datatype definition.  */
+# include <xlocale.h>
 
 /* Return a reference to a data structure representing a set of locale
    datasets.  Unlike for the CATEGORY parameter for `setlocale' the
@@ -115,13 +114,17 @@ typedef struct locale_data *locale_t[LC_ALL];
    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));
+extern __locale_t __newlocale __P ((int __category_mask,
+                                    __const char *__locale,
+                                    __locale_t __base));
+
+/* Return a duplicate of the set of locale in DATASET.  All usage
+   counters are increased if necessary.  */
+extern __locale_t __duplocale __P ((__locale_t __dataset));
 
 /* Free the data associated with a locale dataset previously returned
    by a call to `setlocale_r'.  */
-extern void __freelocale __P ((__const locale_t *__dataset));
+extern void __freelocale __P ((__locale_t __dataset));
 #endif
 
 __END_DECLS
index d846210b7bdb0aa594cf490519a55c37b85a70b3..06f12dbfaf5395cd35842417a3c04d9de20d3430 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 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.  */
+/* Copyright (C) 1991, 1992, 1995, 1997 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 <locale.h>
 #include "localeinfo.h"
index 018220f6df4d3bb202e736b83dea7c17cb74ae1a..c029f63480b3d7cc67b2298fdef3e267a72dea13 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <stddef.h>
 #include <langinfo.h>
+#include <limits.h>
 #include <time.h>
 #include <sys/types.h>
 
 #define ELLIPSIS_CHAR ((wchar_t) 0xfffffffe)
 #define IGNORE_CHAR ((wchar_t) 0xffffffff)
 
+/* We use a special value for the usage counter in `locale_data' to
+   signal that this data must never be removed anymore.  */
+#define MAX_USAGE_COUNT UINT_MAX
+
 /* Structure describing locale data in core for a category.  */
 struct locale_data
 {
   const char *name;
   const char *filedata;                /* Region mapping the file data.  */
   off_t filesize;              /* Size of the file (and the region).  */
+  int mmaped;                  /* If nonzero the data is mmaped.  */
+
+  unsigned int usage_count;    /* Counter for users.  */
 
   unsigned int nstrings;       /* Number of strings below.  */
   union locale_data_value
@@ -90,13 +98,13 @@ struct era_entry
 
 /* For each category declare the variable for the current locale data.  */
 #define DEFINE_CATEGORY(category, category_name, items, a, b, c, d) \
-extern const struct locale_data *_nl_current_##category;
+extern struct locale_data *_nl_current_##category;
 #include "categories.def"
 #undef DEFINE_CATEGORY
 
 extern const char *const _nl_category_names[LC_ALL + 1];
 extern const size_t _nl_category_name_sizes[LC_ALL + 1];
-extern const struct locale_data * *const _nl_current[LC_ALL];
+extern struct locale_data * *const _nl_current[LC_ALL];
 
 /* Name of the standard locale.  */
 extern const char _nl_C_name[];
@@ -111,26 +119,29 @@ extern const char _nl_C_name[];
 
 /* This is used in lc-CATEGORY.c to define _nl_current_CATEGORY.  */
 #define _NL_CURRENT_DEFINE(category) \
-  extern const struct locale_data _nl_C_##category; \
-  const struct locale_data *_nl_current_##category = &_nl_C_##category
+  extern struct locale_data _nl_C_##category; \
+  struct locale_data *_nl_current_##category = &_nl_C_##category
 
 /* Load the locale data for CATEGORY from the file specified by *NAME.
    If *NAME is "", use environment variables as specified by POSIX,
    and fill in *NAME with the actual name used.  The directories
    listed in LOCALE_PATH are searched for the locale files.  */
-extern const struct locale_data *_nl_find_locale (const char *locale_path,
-                                                 size_t locale_path_len,
-                                                 int category, char **name);
+extern struct locale_data *_nl_find_locale (const char *locale_path,
+                                           size_t locale_path_len,
+                                           int category, const char **name);
 
 /* Try to load the file described by FILE.  */
 extern void _nl_load_locale (struct loaded_l10nfile *file, int category);
 
+/* Free the locale and give back all memory if the usage count is one.  */
+extern void _nl_remove_locale (int locale, struct locale_data *data);
+
 
 /* Return `era' entry which corresponds to TP.  Used in strftime.  */
-struct era_entry *_nl_get_era_entry (const struct tm *tp);
+extern struct era_entry *_nl_get_era_entry (const struct tm *tp);
 
 /* Return `alt_digit' which corresponds to NUMBER.  Used in strftime.  */
-const char *_nl_get_alt_digit (unsigned int number);
+extern const char *_nl_get_alt_digit (unsigned int number);
 
 
 /* Global variables for LC_COLLATE category data.  */
diff --git a/locale/newlocale.c b/locale/newlocale.c
new file mode 100644 (file)
index 0000000..d4e184b
--- /dev/null
@@ -0,0 +1,192 @@
+/* Return a reference to locale information record.
+   Copyright (C) 1996, 1997 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 <argz.h>
+#include <errno.h>
+#include <locale.h>
+#include <stdlib.h>
+
+#include "localeinfo.h"
+
+
+/* Constant data defined in setlocale.c.  */
+extern struct locale_data *const _nl_C[];
+
+/* Use this when we come along an error.  */
+#define ERROR_RETURN                                                         \
+  do {                                                                       \
+    __set_errno (EINVAL);                                                    \
+    return NULL;                                                             \
+  } while (0)
+
+
+__locale_t
+__newlocale (int category_mask, const char *locale, __locale_t base)
+{
+  /* Intermediate memory for result.  */
+  const char *newnames[LC_ALL];
+  struct __locale_t result;
+  __locale_t result_ptr;
+  char *locale_path;
+  size_t locale_path_len;
+  const char *locpath_var;
+  int cnt;
+
+  /* We treat LC_ALL in the same way as if all bits were set.  */
+  if (category_mask == LC_ALL)
+    category_mask = (1 << LC_ALL) - 1;
+
+  /* Sanity check for CATEGORY argument.  */
+  if ((category_mask & ~(1 << LC_ALL) - 1) != 0)
+    ERROR_RETURN;
+
+  /* `newlocale' does not support asking for the locale name. */
+  if (locale == NULL)
+    ERROR_RETURN;
+
+  /* Allocate memory for the result.  */
+  if (base != NULL)
+    {
+      if (base != NULL)
+       return base;
+
+      result = *base;
+    }
+  else
+    {
+      /* Fill with pointers to C locale data to .  */
+      for (cnt = 0; cnt < LC_ALL; ++cnt)
+       result.__locales[cnt] = _nl_C[cnt];
+
+      /* If no category is to be set we return BASE if available or a
+        dataset using the C locale data.  */
+      if (category_mask == 0)
+       {
+         result_ptr = (__locale_t) malloc (sizeof (struct __locale_t));
+         *result_ptr = result;
+
+         goto update;
+       }
+    }
+
+  /* We perhaps really have to load some data.  So we determine the
+     path in which to look for the data now.  The environment variable
+     `LOCPATH' must only be used when the binary has no SUID or SGID
+     bit set.  */
+  locale_path = NULL;
+  locale_path_len = 0;
+
+  locpath_var = __secure_getenv ("LOCPATH");
+  if (locpath_var != NULL && locpath_var[0] != '\0')
+    if (__argz_create_sep (locpath_var, ':',
+                          &locale_path, &locale_path_len) != 0)
+      return NULL;
+
+  if (__argz_append (&locale_path, &locale_path_len,
+                    LOCALE_PATH, sizeof (LOCALE_PATH)) != 0)
+    return NULL;
+
+  /* Get the names for the locales we are interested in.  We either
+     allow a composite name or a single name.  */
+  for (cnt = 0; cnt < LC_ALL; ++cnt)
+    newnames[cnt] = locale;
+  if (strchr (locale, ';') != NULL)
+    {
+      /* This is a composite name.  Make a copy and split it up.  */
+      char *np = strdupa (locale);
+      char *cp;
+
+      while ((cp = strchr (np, '=')) != NULL)
+       {
+         for (cnt = 0; cnt < LC_ALL; ++cnt)
+           if ((size_t) (cp - np) == _nl_category_name_sizes[cnt]
+               && memcmp (np, _nl_category_names[cnt], cp - np) == 0)
+             break;
+
+         if (cnt == LC_ALL)
+           /* Bogus category name.  */
+           ERROR_RETURN;
+
+         /* Found the category this clause sets.  */
+         newnames[cnt] = ++cp;
+         cp = strchr (cp, ';');
+         if (cp != NULL)
+           {
+             /* Examine the next clause.  */
+             *cp = '\0';
+             np = cp + 1;
+           }
+         else
+           /* This was the last clause.  We are done.  */
+           break;
+       }
+
+      for (cnt = 0; cnt < LC_ALL; ++cnt)
+       if ((category_mask & 1 << cnt) != 0 && newnames[cnt] == locale)
+         /* The composite name did not specify the category we need.  */
+         ERROR_RETURN;
+    }
+
+  /* Now process all categories we are interested in.  */
+  for (cnt = 0; cnt < LC_ALL; ++cnt)
+    if ((category_mask & 1 << cnt) != 0)
+      {
+       result.__locales[cnt] = _nl_find_locale (locale_path, locale_path_len,
+                                                cnt, &newnames[cnt]);
+       if (result.__locales[cnt] == NULL)
+         return NULL;
+      }
+
+  /* We successfully loaded all required data.  */
+  if (base == NULL)
+    {
+      /* Allocate new structure.  */
+      result_ptr = (__locale_t) malloc (sizeof (struct __locale_t));
+      if (result_ptr == NULL)
+       return NULL;
+
+      *result_ptr = result;
+    }
+  else
+    *(result_ptr = base) = result;
+
+  /* Update the special members.  */
+ update:
+  {
+    union locale_data_value *ctypes = result_ptr->__locales[LC_CTYPE]->values;
+  result_ptr->__ctype_b = (const unsigned short int *)
+    (ctypes[_NL_ITEM_INDEX (_NL_CTYPE_CLASS)] .string);
+#if BYTE_ORDER == BIG_ENDIAN
+  result_ptr->__ctype_tolower = (const int *)
+    (ctypes[_NL_ITEM_INDEX (_NL_CTYPE_TOLOWER_EB)].string);
+  result_ptr->__ctype_toupper = (const int *)
+    (ctypes[_NL_ITEM_INDEX (_NL_CTYPE_TOUPPER_EB)].string);
+#elif BYTE_ORDER == LITTLE_ENDIAN
+  result_ptr->__ctype_tolower = (const int *)
+    (ctypes[_NL_ITEM_INDEX (_NL_CTYPE_TOLOWER_EL)].string);
+  result_ptr->__ctype_toupper = (const int *)
+    (ctypes[_NL_ITEM_INDEX (_NL_CTYPE_TOUPPER_EL)].string);
+#else
+#error bizarre byte order
+#endif
+  }
+
+  return result_ptr;
+}
index 1c42e14a4a941f0672d26e895f764f4cd6961bfd..df2b3e9fb96d36f9de56ff3d76bea1694ff8fe31 100644 (file)
@@ -1,21 +1,21 @@
-/* nl_langinfo -- User interface for extracting locale-dependent parameters.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* User interface for extracting locale-dependent parameters.
+   Copyright (C) 1995, 1996, 1997 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 <langinfo.h>
 #include <errno.h>
@@ -26,7 +26,7 @@ Cambridge, MA 02139, USA.  */
    the references here are not weak references, this guarantees that the
    data for all the categories will be linked in.  */
 
-static const struct locale_data * *const nldata[] =
+static struct locale_data * *const nldata[] =
 {
 #define DEFINE_CATEGORY(category, category_name, items, a, b, c, d) \
   [category] = &_nl_current_##category,
index 8e00103882db6a18fb577a5f9e8e0ab9ef4157c5..1fb9c38b0407612cc64e3b8c0a5d93475fc043aa 100644 (file)
@@ -1,22 +1,22 @@
 %{
-/* 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>.
+/* Copyright (C) 1995, 1996, 1997 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 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 <string.h>
 
index 93326d03829a9f6cbba484d5df37dc14b30df6ee..3bfcd14612c670406a4148c2dc54010cb3d5e9a9 100644 (file)
@@ -1,23 +1,23 @@
 /* C code produced by gperf version 2.5 (GNU C++ version) */
 /* Command-line: gperf -acCgopt -k1,2,5,$ -N charmap_hash programs/charmap-kw.gperf  */
-/* 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>.
+/* Copyright (C) 1995, 1996, 1997 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 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 <string.h>
 
@@ -59,16 +59,16 @@ hash (register const char *str, register int len)
     {
       default:
       case 5:
-        hval += asso_values[(int) str[4]];
+        hval += asso_values[str[4]];
       case 4:
       case 3:
       case 2:
-        hval += asso_values[(int) str[1]];
+        hval += asso_values[str[1]];
       case 1:
-        hval += asso_values[(int) str[0]];
+        hval += asso_values[str[0]];
         break;
     }
-  return hval + asso_values[(int) str[len - 1]];
+  return hval + asso_values[str[len - 1]];
 }
 
 #ifdef __GNUC__
index 6b4ebb4a6003d34e6df8f05b4adc6ef21a998ab3..37b6cdef96816955dd234d64f19225f947cf4eaf 100644 (file)
@@ -72,7 +72,7 @@ charmap_read (const char *filename)
 
       result = parse_charmap (pathnfile);
 
-      if (result == NULL)
+      if (result == NULL && !be_quiet)
        error (0, errno, _("character map file `%s' not found"), filename);
     }
 
@@ -171,7 +171,7 @@ parse_charmap (const char *filename)
                result->mb_cur_max = 1;
              if (result->mb_cur_min == 0)
                result->mb_cur_min = result->mb_cur_max;
-             if (result->mb_cur_min > result->mb_cur_max)
+             if (result->mb_cur_min > result->mb_cur_max && !be_quiet)
                {
                  error (0, 0, _("\
 %s: <mb_cur_max> must be greater than <mb_cur_min>\n"),
@@ -596,7 +596,7 @@ only WIDTH definitions are allowed to follow the CHARMAP definition"));
       break;
     }
 
-  if (state != 91)
+  if (state != 91 && !be_quiet)
     error (0, 0, _("%s: premature end of file"), cmfile->fname);
 
   lr_close (cmfile);
index a7f988d3a5b725b0de400d810aee7823bf634479..00233abf8f98ffeff018b372280e5faa0c0efb95 100644 (file)
@@ -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>.
-
-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.  */
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
index eccce9102f05388af74902ef19fac60f21af2556..82c4ef0c5767c1faf11737c2710036eaf7815ec9 100644 (file)
@@ -1,6 +1,6 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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
@@ -56,6 +56,9 @@ struct charset_t
 #define ILLEGAL_CHAR_VALUE ((wchar_t) 0xffffffffu)
 
 
+/* Declared in localedef.c.  */
+extern int be_quiet;
+
 /* Prototypes for charmap handling functions.  */
 struct charset_t *charmap_read (const char *filename);
 
index d4b0f2b903d124b84d28448b1cf8e745b198b731..3a8c17a303078fe9c6e0e105d9d4450074344682 100644 (file)
@@ -239,7 +239,7 @@ collate_finish (struct localedef_t *locale, struct charset_t *charset)
       else
        value = 0;
 
-      if (value == 0)
+      if (value == 0 && !be_quiet)
        error_at_line (0, 0, patch->fname, patch->lineno,
                       _("no weight defined for symbol `%s'"), patch->token);
       else
@@ -256,7 +256,8 @@ collate_finish (struct localedef_t *locale, struct charset_t *charset)
       \**************************************************************/
       u_int32_t weight;
 
-      error (0, 0, _("no definition of `UNDEFINED'"));
+      if (!be_quiet)
+       error (0, 0, _("no definition of `UNDEFINED'"));
 
       collate->undefined.ordering_len = collate->nrules;
       weight = ++collate->order_cnt;
@@ -324,9 +325,10 @@ collate_output (struct localedef_t *locale, struct charset_t *charset,
   level_best = 0xffff;
 
   /* Compute table size.  */
-  fputs (_("\
+  if (!be_quiet)
+    fputs (_("\
 Computing table size for collation information might take a while..."),
-        stderr);
+          stderr);
   for (table_size = 256; table_size < sum_best; ++table_size)
     {
       size_t hits[table_size];
@@ -357,7 +359,8 @@ Computing table size for collation information might take a while..."),
        }
     }
   assert (table_best != 0xffff || level_best != 0xffff);
-  fputs (_(" done\n"), stderr);
+  if (!be_quiet)
+    fputs (_(" done\n"), stderr);
 
   obstack_init (&non_simple);
   obstack_init (&string_pool);
index fb352e53edc519abfa3bed9830b2f498f1394fd0..5f1bc48f89a3637a32db3529588080ff106df98e 100644 (file)
@@ -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>.
+/* Copyright (C) 1995, 1996, 1997 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>
@@ -262,10 +262,11 @@ ctype_finish (struct localedef_t *locale, struct charset_t *charset)
                          cp += sprintf (cp, "\\%o", (value >> 8) & 0xff);
                        sprintf (cp, "\\%o", value & 0xff);
 
-                       error (0, 0, _("\
+                       if (!be_quiet)
+                         error (0, 0, _("\
 character %s'%s' in class `%s' must be in class `%s'"), value > 256 ? "L" : "",
-                              cp, valid_table[cls1].name,
-                              valid_table[cls2].name);
+                                cp, valid_table[cls1].name,
+                                valid_table[cls2].name);
                      }
                    break;
 
@@ -286,10 +287,12 @@ character %s'%s' in class `%s' must be in class `%s'"), value > 256 ? "L" : "",
                          cp += sprintf (cp, "\\%o", (value >> 8) & 0xff);
                        sprintf (cp, "\\%o", value & 0xff);
 
-                       error (0, 0, _("\
+                       if (!be_quiet)
+                         error (0, 0, _("\
 character %s'%s' in class `%s' must not be in class `%s'"),
-                              value > 256 ? "L" : "", cp,
-                              valid_table[cls1].name, valid_table[cls2].name);
+                                value > 256 ? "L" : "", cp,
+                                valid_table[cls1].name,
+                                valid_table[cls2].name);
                      }
                    break;
 
@@ -306,23 +309,25 @@ character %s'%s' in class `%s' must not be in class `%s'"),
 
   /* ... and now test <SP> as a special case.  */
   space_value = charset_find_value (charset, "SP", 2);
-  if ((wchar_t) space_value == ILLEGAL_CHAR_VALUE)
+  if ((wchar_t) space_value == ILLEGAL_CHAR_VALUE && !be_quiet)
     error (0, 0, _("character <SP> not defined in character map"));
-  else if ((cnt = BITPOS (tok_space),
-            (ELEM (ctype, class_collection, , space_value)
-            & BIT (tok_space)) == 0)
-           || (cnt = BITPOS (tok_blank),
-               (ELEM (ctype, class_collection, , space_value)
-               & BIT (tok_blank)) == 0))
+  else if (((cnt = BITPOS (tok_space),
+            (ELEM (ctype, class_collection, , space_value)
+             & BIT (tok_space)) == 0)
+           || (cnt = BITPOS (tok_blank),
+               (ELEM (ctype, class_collection, , space_value)
+                & BIT (tok_blank)) == 0))
+          && !be_quiet)
     error (0, 0, _("<SP> character not in class `%s'"),
            valid_table[cnt].name);
-  else if ((cnt = BITPOS (tok_punct),
-            (ELEM (ctype, class_collection, , space_value)
-            & BIT (tok_punct)) != 0)
-           || (cnt = BITPOS (tok_graph),
-               (ELEM (ctype, class_collection, , space_value)
-               & BIT (tok_graph))
-              != 0))
+  else if (((cnt = BITPOS (tok_punct),
+            (ELEM (ctype, class_collection, , space_value)
+             & BIT (tok_punct)) != 0)
+           || (cnt = BITPOS (tok_graph),
+               (ELEM (ctype, class_collection, , space_value)
+                & BIT (tok_graph))
+               != 0))
+          && !be_quiet)
     error (0, 0, _("<SP> character must not be in class `%s'"),
            valid_table[cnt].name);
   else
@@ -934,7 +939,7 @@ set_class_defaults (struct locale_ctype_t *ctype, struct charset_t *charset)
          tmp[0] = ch;
 
          value = charset_find_value (charset, tmp, 1);
-         if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
+         if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
            {
              error (0, 0, _("\
 character `%s' not defined while needed as default value"),
@@ -998,7 +1003,7 @@ character `%s' not defined while needed as default value"),
       unsigned int value;
 
       value = charset_find_value (charset, "space", 5);
-      if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
+      if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
        error (0, 0, _("\
 character `%s' not defined while needed as default value"),
               "<space>");
@@ -1006,7 +1011,7 @@ character `%s' not defined while needed as default value"),
        ELEM (ctype, class_collection, , value) |= BIT (tok_space);
 
       value = charset_find_value (charset, "form-feed", 9);
-      if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
+      if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
        error (0, 0, _("\
 character `%s' not defined while needed as default value"),
               "<form-feed>");
@@ -1014,7 +1019,7 @@ character `%s' not defined while needed as default value"),
        ELEM (ctype, class_collection, , value) |= BIT (tok_space);
 
       value = charset_find_value (charset, "newline", 7);
-      if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
+      if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
        error (0, 0, _("\
 character `%s' not defined while needed as default value"),
               "<newline>");
@@ -1022,7 +1027,7 @@ character `%s' not defined while needed as default value"),
        ELEM (ctype, class_collection, , value) |= BIT (tok_space);
 
       value = charset_find_value (charset, "carriage-return", 15);
-      if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
+      if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
        error (0, 0, _("\
 character `%s' not defined while needed as default value"),
               "<carriage-return>");
@@ -1030,7 +1035,7 @@ character `%s' not defined while needed as default value"),
        ELEM (ctype, class_collection, , value) |= BIT (tok_space);
 
       value = charset_find_value (charset, "tab", 3);
-      if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
+      if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
        error (0, 0, _("\
 character `%s' not defined while needed as default value"),
               "<tab>");
@@ -1038,7 +1043,7 @@ character `%s' not defined while needed as default value"),
        ELEM (ctype, class_collection, , value) |= BIT (tok_space);
 
       value = charset_find_value (charset, "vertical-tab", 12);
-      if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
+      if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
        error (0, 0, _("\
 character `%s' not defined while needed as default value"),
               "<vertical-tab>");
@@ -1064,7 +1069,7 @@ character `%s' not defined while needed as default value"),
       unsigned int value;
 
       value = charset_find_value (charset, "space", 5);
-      if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
+      if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
        error (0, 0, _("\
 character `%s' not defined while needed as default value"),
               "<space>");
@@ -1072,7 +1077,7 @@ character `%s' not defined while needed as default value"),
        ELEM (ctype, class_collection, , value) |= BIT (tok_blank);
 
       value = charset_find_value (charset, "tab", 3);
-      if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
+      if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
        error (0, 0, _("\
 character `%s' not defined while needed as default value"),
               "<tab>");
@@ -1110,7 +1115,7 @@ character `%s' not defined while needed as default value"),
          ctype->class_collection[cnt] |= BIT (tok_print);
 
       space = charset_find_value (charset, "space", 5);
-      if (space == ILLEGAL_CHAR_VALUE)
+      if (space == ILLEGAL_CHAR_VALUE && !be_quiet)
        error (0, 0, _("\
 character `%s' not defined while needed as default value"),
               "<space>");
@@ -1136,7 +1141,7 @@ character `%s' not defined while needed as default value"),
          tmp[1] = (char) ch;
 
          value_from = charset_find_value (charset, &tmp[1], 1);
-         if ((wchar_t) value_from == ILLEGAL_CHAR_VALUE)
+         if ((wchar_t) value_from == ILLEGAL_CHAR_VALUE && !be_quiet)
            {
              error (0, 0, _("\
 character `%s' not defined while needed as default value"),
@@ -1147,7 +1152,7 @@ character `%s' not defined while needed as default value"),
          /* This conversion is implementation defined.  */
          tmp[1] = (char) (ch + ('A' - 'a'));
          value_to = charset_find_value (charset, &tmp[1], 1);
-         if ((wchar_t) value_to == ILLEGAL_CHAR_VALUE)
+         if ((wchar_t) value_to == ILLEGAL_CHAR_VALUE && !be_quiet)
            {
              error (0, 0, _("\
 character `%s' not defined while needed as default value"),
@@ -1195,9 +1200,10 @@ allocate_arrays (struct locale_ctype_t *ctype, struct charset_t *charset)
   size_t min_total = UINT_MAX;
   size_t act_size = 256;
 
-  fputs (_("\
+  if (!be_quiet)
+    fputs (_("\
 Computing table size for character classes might take a while..."),
-        stderr);
+          stderr);
 
   while (act_size < min_total)
     {
@@ -1232,7 +1238,8 @@ Computing table size for character classes might take a while..."),
       ++act_size;
     }
 
-  fprintf (stderr, _(" done\n"));
+  if (!be_quiet)
+    fputs (_(" done\n"), stderr);
 
 
 #if __BYTE_ORDER == __LITTLE_ENDIAN
index ede616768dcc54a150de02616c8342676930a918..31edb47a60d501bef6b5509d1e7262ef4394c2a7 100644 (file)
@@ -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>.
+/* Copyright (C) 1995, 1996, 1997 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>
@@ -77,7 +77,7 @@ messages_finish (struct localedef_t *locale)
     = locale->categories[LC_MESSAGES].messages;
 
   /* The fields YESSTR and NOSTR are optional.  */
-  if (messages->yesexpr == NULL)
+  if (messages->yesexpr == NULL && !be_quiet)
     error (0, 0, _("field `%s' in category `%s' undefined"),
           "yesexpr", "LC_MESSAGES");
   else
@@ -87,7 +87,7 @@ messages_finish (struct localedef_t *locale)
 
       /* Test whether it are correct regular expressions.  */
       result = regcomp (&re, messages->yesexpr, REG_EXTENDED);
-      if (result != 0)
+      if (result != 0 && !be_quiet)
        {
          char errbuf[BUFSIZ];
 
@@ -98,7 +98,7 @@ no correct regular expression for field `%s' in category `%s': %s"),
        }
     }
 
-  if (messages->noexpr == NULL)
+  if (messages->noexpr == NULL && !be_quiet)
     error (0, 0, _("field `%s' in category `%s' undefined"),
           "noexpr", "LC_MESSAGES");
   else
@@ -108,7 +108,7 @@ no correct regular expression for field `%s' in category `%s': %s"),
 
       /* Test whether it are correct regular expressions.  */
       result = regcomp (&re, messages->noexpr, REG_EXTENDED);
-      if (result != 0)
+      if (result != 0 && !be_quiet)
        {
          char errbuf[BUFSIZ];
 
index 5efa969baa94797474153cd9b337d03375627c08..ce83b18dbab1509875ab71c75b4fe1df02095b5a 100644 (file)
@@ -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>.
+/* Copyright (C) 1995, 1996, 1997 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>
@@ -115,7 +115,7 @@ monetary_finish (struct localedef_t *locale)
     = locale->categories[LC_MONETARY].monetary;
 
 #define TEST_ELEM(cat)                                                       \
-  if (monetary->cat == NULL)                                                 \
+  if (monetary->cat == NULL && !be_quiet)                                    \
     error (0, 0, _("field `%s' in category `%s' not defined"),               \
           #cat, "LC_MONETARY")
 
@@ -129,12 +129,13 @@ monetary_finish (struct localedef_t *locale)
   /* The international currency symbol must come from ISO 4217.  */
   if (monetary->int_curr_symbol != NULL)
     {
-      if (strlen (monetary->int_curr_symbol) != 4)
+      if (strlen (monetary->int_curr_symbol) != 4 && !be_quiet)
        error (0, 0, _("\
 value of field `int_curr_symbol' in category `LC_MONETARY' has wrong length"));
       else if (bsearch (monetary->int_curr_symbol, valid_int_curr,
                        NR_VALID_INT_CURR, sizeof (const char *),
-                       (comparison_fn_t) curr_strcmp) == NULL)
+                       (comparison_fn_t) curr_strcmp) == NULL
+              && !be_quiet)
        error (0, 0, _("\
 value of field `int_curr_symbol' in category `LC_MONETARY' does \
 not correspond to a valid name in ISO 4217"));
@@ -143,23 +144,23 @@ not correspond to a valid name in ISO 4217"));
   /* The decimal point must not be empty.  This is not said explicitly
      in POSIX but ANSI C (ISO/IEC 9899) says in 4.4.2.1 it has to be
      != "".  */
-  if (monetary->mon_decimal_point[0] == '\0')
+  if (monetary->mon_decimal_point[0] == '\0' && !be_quiet)
     {
       error (0, 0, _("\
 value for field `%s' in category `%s' must not be the empty string"),
             "mon_decimal_point", "LC_MONETARY");
     }
 
-  if (monetary->mon_grouping_act == 0)
+  if (monetary->mon_grouping_act == 0 && !be_quiet)
     error (0, 0, _("field `%s' in category `%s' not defined"),
           "mon_grouping", "LC_MONETARY");
 
 #undef TEST_ELEM
 #define TEST_ELEM(cat, min, max)                                             \
-  if (monetary->cat == -2)                                                   \
+  if (monetary->cat == -2 && !be_quiet)                                              \
     error (0, 0, _("field `%s' in category `%s' not defined"),               \
           #cat, "LC_MONETARY");                                              \
-  else if (monetary->cat < min || monetary->cat > max)                       \
+  else if ((monetary->cat < min || monetary->cat > max) && !be_quiet)        \
     error (0, 0, _("\
 value for field `%s' in category `%s' must be in range %d...%d"),            \
           #cat, "LC_MONETARY", min, max)
index 69ea7e0b3e482b5bb6050dd94e4389caf5a7f00c..375635aafcd19521084955669ab10e5cecc031b8 100644 (file)
@@ -1,6 +1,6 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
+   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
@@ -74,7 +74,7 @@ numeric_finish (struct localedef_t *locale)
   struct locale_numeric_t *numeric = locale->categories[LC_NUMERIC].numeric;
 
 #define TEST_ELEM(cat)                                                       \
-  if (numeric->cat == NULL)                                                  \
+  if (numeric->cat == NULL && !be_quiet)                                     \
     error (0, 0, _("field `%s' in category `%s' not defined"),               \
           #cat, "LC_NUMERIC")
 
@@ -84,14 +84,14 @@ numeric_finish (struct localedef_t *locale)
   /* The decimal point must not be empty.  This is not said explicitly
      in POSIX but ANSI C (ISO/IEC 9899) says in 4.4.2.1 it has to be
      != "".  */
-  if (numeric->decimal_point[0] == '\0')
+  if (numeric->decimal_point[0] == '\0' && !be_quiet)
     {
       error (0, 0, _("\
 value for field `%s' in category `%s' must not be the empty string"),
             "decimal_point", "LC_NUMERIC");
     }
 
-  if (numeric->grouping_act == 0)
+  if (numeric->grouping_act == 0 && !be_quiet)
     error (0, 0, _("field `%s' in category `%s' not defined"),
           "grouping", "LC_NUMERIC");
 }
index cc571b8a04edf0a3fef19a807e999daf3fa843f0..b9777634336798d15c39de31e82587d9127cb247 100644 (file)
@@ -106,10 +106,10 @@ time_finish (struct localedef_t *locale)
   struct locale_time_t *time = locale->categories[LC_TIME].time;
 
 #define TESTARR_ELEM(cat, max)                                               \
-  if (time->cur_num_##cat == 0)                                                      \
+  if (time->cur_num_##cat == 0 && !be_quiet)                                 \
     error (0, 0, _("field `%s' in category `%s' not defined"),               \
           #cat, "LC_TIME");                                                  \
-  else if (time->cur_num_##cat != max)                                       \
+  else if (time->cur_num_##cat != max && !be_quiet)                          \
     error (0, 0, _("field `%s' in category `%s' has not enough values"),      \
           #cat, "LC_TIME")
 
@@ -120,7 +120,7 @@ time_finish (struct localedef_t *locale)
   TESTARR_ELEM (am_pm, 2);
 
 #define TEST_ELEM(cat)                                                       \
-  if (time->cat == NULL)                                                     \
+  if (time->cat == NULL && !be_quiet)                                        \
     error (0, 0, _("field `%s' in category `%s' not defined"),               \
           #cat, "LC_TIME")
 
@@ -149,7 +149,7 @@ time_finish (struct localedef_t *locale)
          memcpy (str, time->era[idx], era_len + 1);
 
          /* First character must be + or - for the direction.  */
-         if (*str != '+' && *str != '-')
+         if (*str != '+' && *str != '-' && !be_quiet)
            {
              error (0, 0, _("direction flag in string %d in `era' field"
                             " in category `%s' is not '+' nor '-'"),
@@ -159,7 +159,7 @@ time_finish (struct localedef_t *locale)
            }
          else
            time->era_entries[idx].direction = *str;
-         if (*++str != ':')
+         if (*++str != ':' && !be_quiet)
            {
              error (0, 0, _("direction flag in string %d in `era' field"
                             " in category `%s' is not a single character"),
@@ -171,14 +171,14 @@ time_finish (struct localedef_t *locale)
 
          /* Now the offset year.  */
          time->era_entries[idx].offset = strtol (str, &endp, 10);
-         if (endp == str)
+         if (endp == str && !be_quiet)
            {
              error (0, 0, _("illegal number for offset in string %d in"
                             " `era' field in category `%s'"),
                     idx + 1, "LC_TIME");
              (void) strsep (&str, ":");
            }
-         else if (*endp != ':')
+         else if (*endp != ':' && !be_quiet)
            {
              error (0, 0, _("garbage at end of offset value in string %d in"
                             " `era' field in category `%s'"),
@@ -224,7 +224,7 @@ time_finish (struct localedef_t *locale)
              time->era_entries[idx].start_date[1] -= 1;
 
              time->era_entries[idx].start_date[2] = strtol (str, &endp, 10);
-             if (endp == str)
+             if (endp == str && !be_quiet)
                {
                invalid_start_date:
                  error (0, 0, _("illegal starting date in string %d in"
@@ -232,7 +232,7 @@ time_finish (struct localedef_t *locale)
                         idx + 1, "LC_TIME");
                  (void) strsep (&str, ":");
                }
-             else if (*endp != ':')
+             else if (*endp != ':' && !be_quiet)
                {
                garbage_start_date:
                  error (0, 0, _("garbage at end of starting date in string %d"
@@ -245,14 +245,15 @@ time_finish (struct localedef_t *locale)
                  str = endp + 1;
 
                  /* Check for valid value.  */
-                 if (time->era_entries[idx].start_date[1] < 0
-                     || time->era_entries[idx].start_date[1] >= 12
-                     || time->era_entries[idx].start_date[2] < 0
-                     || (time->era_entries[idx].start_date[2]
-                         > days_per_month[time->era_entries[idx].start_date[1]])
-                     || (time->era_entries[idx].start_date[1] == 2
-                         && time->era_entries[idx].start_date[2] == 29
-                         && !__isleap (time->era_entries[idx].start_date[0])))
+                 if ((time->era_entries[idx].start_date[1] < 0
+                      || time->era_entries[idx].start_date[1] >= 12
+                      || time->era_entries[idx].start_date[2] < 0
+                      || (time->era_entries[idx].start_date[2]
+                          > days_per_month[time->era_entries[idx].start_date[1]])
+                      || (time->era_entries[idx].start_date[1] == 2
+                          && time->era_entries[idx].start_date[2] == 29
+                          && !__isleap (time->era_entries[idx].start_date[0])))
+                     && !be_quiet)
                          error (0, 0, _("starting date is illegal in"
                                         " string %d in `era' field in"
                                         " category `%s'"),
@@ -296,7 +297,7 @@ time_finish (struct localedef_t *locale)
              time->era_entries[idx].stop_date[1] -= 1;
 
              time->era_entries[idx].stop_date[2] = strtol (str, &endp, 10);
-             if (endp == str)
+             if (endp == str && !be_quiet)
                {
                invalid_stop_date:
                  error (0, 0, _("illegal stopping date in string %d in"
@@ -304,7 +305,7 @@ time_finish (struct localedef_t *locale)
                         idx + 1, "LC_TIME");
                  (void) strsep (&str, ":");
                }
-             else if (*endp != ':')
+             else if (*endp != ':' && !be_quiet)
                {
                garbage_stop_date:
                  error (0, 0, _("garbage at end of stopping date in string %d"
@@ -317,14 +318,15 @@ time_finish (struct localedef_t *locale)
                  str = endp + 1;
 
                  /* Check for valid value.  */
-                 if (time->era_entries[idx].stop_date[1] < 0
-                     || time->era_entries[idx].stop_date[1] >= 12
-                     || time->era_entries[idx].stop_date[2] < 0
-                     || (time->era_entries[idx].stop_date[2]
-                         > days_per_month[time->era_entries[idx].stop_date[1]])
-                     || (time->era_entries[idx].stop_date[1] == 2
-                         && time->era_entries[idx].stop_date[2] == 29
-                         && !__isleap (time->era_entries[idx].stop_date[0])))
+                 if ((time->era_entries[idx].stop_date[1] < 0
+                      || time->era_entries[idx].stop_date[1] >= 12
+                      || time->era_entries[idx].stop_date[2] < 0
+                      || (time->era_entries[idx].stop_date[2]
+                          > days_per_month[time->era_entries[idx].stop_date[1]])
+                      || (time->era_entries[idx].stop_date[1] == 2
+                          && time->era_entries[idx].stop_date[2] == 29
+                          && !__isleap (time->era_entries[idx].stop_date[0])))
+                     && !be_quiet)
                          error (0, 0, _("stopping date is illegal in"
                                         " string %d in `era' field in"
                                         " category `%s'"),
@@ -332,7 +334,7 @@ time_finish (struct localedef_t *locale)
                }
            }
 
-         if (str == NULL || *str == '\0')
+         if ((str == NULL || *str == '\0') && !be_quiet)
            {
              error (0, 0, _("missing era name in string %d in `era' field"
                             " in category `%s'"), idx + 1, "LC_TIME");
@@ -343,7 +345,7 @@ time_finish (struct localedef_t *locale)
            {
              time->era_entries[idx].name = strsep (&str, ":");
 
-             if (str == NULL || *str == '\0')
+             if ((str == NULL || *str == '\0') && !be_quiet)
                {
                  error (0, 0, _("missing era format in string %d in `era'"
                                 " field in category `%s'"),
index bf5f1bccc9f6e3f5fd53750680778df1f6e5b2a9..6f81b815973a0d5c0ea7c90faea2491f504f3ab6 100644 (file)
@@ -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>.
-
-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.  */
+/* Copyright (C) 1996, 1997 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.  */
 
 #ifndef _LINEREADER_H
 #define _LINEREADER_H 1
index c595524bbb09062ca529f145db787649f4c4552a..9c432e3ead29881bc8821d58ccbddaf773108ec0 100644 (file)
@@ -1,22 +1,22 @@
 /* Handle special requests.
-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>, 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.  */
+   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
index 580816b37e85b71544557958fa1aabdb55fc58ac..da01d4c9743914cf8c9c2460db9e01bd2aa2f005 100644 (file)
@@ -70,6 +70,8 @@ int posix_conformance;
 /* If not zero give a lot more messages.  */
 int verbose;
 
+/* If not zero suppress warnings and information messages.  */
+int be_quiet;
 
 
 /* Long options.  */
@@ -81,6 +83,7 @@ static const struct option long_options[] =
   { "force", no_argument, NULL, 'c' },
   { "inputfile", required_argument, NULL, 'i' },
   { "posix", no_argument, &posix_conformance, 1 },
+  { "quiet", no_argument, NULL, 'q' },
   { "verbose", no_argument, &verbose, 1},
   { "version", no_argument, NULL, 'V' },
   { NULL, 0, NULL, 0 }
@@ -149,12 +152,18 @@ main (int argc, char *argv[])
        input_file = optarg;
         break;
 
+      case 'q':
+       be_quiet = 1;
+       verbose = 0;
+       break;
+
       case 'u':
        ucs_csn = optarg;
        break;
 
-       case 'v':
+      case 'v':
         verbose = 1;
+       be_quiet = 0;
         break;
 
       case 'V':
@@ -397,6 +406,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -h, --help                display this help and exit\n\
   -f, --charmap=FILE        symbolic character names defined in FILE\n\
   -i, --inputfile=FILE      source definitions are found in FILE\n\
+      --quiet               Suppress warnings and information messages\n\
   -u, --code-set-name=NAME  specify code set for mapping ISO 10646 elements\n\
   -v, --verbose             print more messages\n\
   -V, --version             output version information and exit\n\
index 95e166e3ef7e30f52043b5348ef14b30932ff1ed..eab909e7c8d9eba9660e8dfb7ab3efeadd36ad00 100644 (file)
@@ -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>.
-
-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.  */
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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.  */
 
 #ifndef _LOCALES_H
 #define _LOCALES_H
index 8af977116e67b33b10fd4b0eeafaed7ea99c4813..38150ad46b7e8e38ca9326ec8a144d95e5908c59 100644 (file)
@@ -1,22 +1,22 @@
 %{
-/* 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>.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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 <string.h>
 
index fd3c834845b4e349822ef77e136d610a3fccbde8..0fb0b5ca5f4dc04f6c2942e32368ee122a586f32 100644 (file)
@@ -1,23 +1,23 @@
 /* C code produced by gperf version 2.5 (GNU C++ version) */
 /* Command-line: gperf -acCgopt -k1,2,5,$ -N locfile_hash programs/locfile-kw.gperf  */
-/* 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>.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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 <string.h>
 
index b07356aebd0d79f57af229245bec9cac626aad9a..6d1543c3201809b8387d71f1799b03120d438d23 100644 (file)
@@ -1,22 +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>.
-
-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.  */
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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.  */
 
 #ifndef _TOKEN_H
 #define _TOKEN_H
index 4717fe22bd359e46a8f0978991e5fe06306ad700..4ab04253b9110339d0143c628c730d1790e3001e 100644 (file)
@@ -1,6 +1,6 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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
@@ -981,7 +981,7 @@ write_locale_data (const char *output_path, const char *category,
            save_err = errno;
        }
 
-      if (fd == -1)
+      if (fd == -1 && !be_quiet)
        {
          error (0, save_err, _("\
 cannot open output file `%s' for category `%s'"),
@@ -1005,7 +1005,7 @@ cannot open output file `%s' for category `%s'"),
       if (maxiov > 0)
        step = MIN (maxiov, step);
 
-      if (writev (fd, &vec[cnt], step) < 0)
+      if (writev (fd, &vec[cnt], step) < 0 && !be_quiet)
        {
          error (0, errno, _("failure while writing data for category `%s'"),
                 category);
index 003082ca61b775d1e55eb6a05eecaf7e0968ce62..604e726e2097741e9e3b9e7bef42c4086df1a184 100644 (file)
@@ -1,6 +1,6 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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
@@ -53,6 +53,8 @@ struct localedef_t
   size_t len[6];
 };
 
+/* Declared in localedef.c.  */
+extern int be_quiet;
 
 /* Found in localedef.c.  */
 void def_to_process (const char *name, int category);
index 3409c57cec6a75766f5b9bfc1e523e91a8875bcc..f26790b21bc785e5fe2108bd1089548e396c7a47 100644 (file)
@@ -1,19 +1,21 @@
-/* Copyright (C) 1995, 1996 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.
-
-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.  */
+/* Copyright (C) 1995, 1996, 1997 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 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 _SIMPLE_HASH_H
 #define _SIMPLE_HASH_H
index 4351eea39715885fb0afccf96fe35e25505944c6..34b107e295ce3f7c4bd6830f2e5d778eca766b04 100644 (file)
@@ -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>, 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.  */
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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.  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
index 3576ce445cec82f21befd9aeaeb8c6e0f3e77b7e..2237032f89881d002b3a2d4f26cabab577460c0b 100644 (file)
@@ -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>.
-
-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.  */
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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.  */
 
 #ifndef _TRANSLATE_H
 #define _TRANSLATE_H 1
index 094664216ef028c181af02803ef32ae4fd3e1d9c..368027f74355b69caed274871949622d3e407be2 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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 <alloca.h>
 #include <argz.h>
@@ -35,15 +35,15 @@ Boston, MA 02111-1307, USA.  */
    Both are weak references; if &_nl_current_CATEGORY is zero,
    then nothing is using the locale data.  */
 #define DEFINE_CATEGORY(category, category_name, items, a, b, c, d) \
-extern const struct locale_data *_nl_current_##category;                     \
-extern const struct locale_data _nl_C_##category;                            \
+extern struct locale_data *_nl_current_##category;                           \
+extern struct locale_data _nl_C_##category;                                  \
 weak_extern (_nl_current_##category) weak_extern (_nl_C_##category)
 #include "categories.def"
 #undef DEFINE_CATEGORY
 
 /* Array indexed by category of pointers to _nl_current_CATEGORY slots.
    Elements are zero for categories whose data is never used.  */
-static const struct locale_data * *const _nl_current[] =
+static struct locale_data * *const _nl_current[] =
   {
 #define DEFINE_CATEGORY(category, category_name, items, a, b, c, d) \
     [category] = &_nl_current_##category,
@@ -53,7 +53,7 @@ static const struct locale_data * *const _nl_current[] =
 
 /* Array indexed by category of pointers to _nl_C_CATEGORY slots.
    Elements are zero for categories whose data is never used.  */
-const struct locale_data *const _nl_C[] =
+struct locale_data *const _nl_C[] =
   {
 #define DEFINE_CATEGORY(category, category_name, items, a, b, c, d) \
     [category] = &_nl_C_##category,
@@ -147,7 +147,7 @@ clever_copy (const char *string)
 
 /* Construct a new composite name.  */
 static inline char *
-new_composite_name (int category, char *newnames[LC_ALL])
+new_composite_name (int category, const char *newnames[LC_ALL])
 {
   size_t last_len;
   size_t cumlen = 0;
@@ -157,9 +157,9 @@ new_composite_name (int category, char *newnames[LC_ALL])
 
   for (i = 0; i < LC_ALL; ++i)
     {
-      char *name = (category == LC_ALL ? newnames[i] :
-                   category == i ? newnames[0] :
-                   (char *) _nl_current_names[i]);
+      const char *name = (category == LC_ALL ? newnames[i] :
+                         category == i ? newnames[0] :
+                         _nl_current_names[i]);
       last_len = strlen (name);
       cumlen += _nl_category_name_sizes[i] + 1 + last_len + 1;
       if (i > 0 && same && strcmp (name, newnames[0]) != 0)
@@ -184,9 +184,9 @@ new_composite_name (int category, char *newnames[LC_ALL])
   for (i = 0; i < LC_ALL; ++i)
     {
       /* Add "CATEGORY=NAME;" to the string.  */
-      char *name = (category == LC_ALL ? newnames[i] :
-                   category == i ? newnames[0] :
-                   (char *) _nl_current_names[i]);
+      const char *name = (category == LC_ALL ? newnames[i] :
+                         category == i ? newnames[0] :
+                         _nl_current_names[i]);
       p = __stpcpy (p, _nl_category_names[i]);
       *p++ = '=';
       p = __stpcpy (p, name);
@@ -211,7 +211,7 @@ setname (int category, const char *name)
 
 /* Put DATA in *_nl_current[CATEGORY].  */
 static inline void
-setdata (int category, const struct locale_data *data)
+setdata (int category, struct locale_data *data)
 {
   if (_nl_current[category] != NULL)
     {
@@ -264,8 +264,8 @@ setlocale (int category, const char *locale)
         for the individual categories can be selected by using a
         composite locale name.  This is a semi-colon separated list
         of entries of the form `CATEGORY=VALUE'.  */
-      char *newnames[LC_ALL];
-      const struct locale_data *newdata[LC_ALL];
+      const char *newnames[LC_ALL];
+      struct locale_data *newdata[LC_ALL];
 
       /* Set all name pointers to the argument name.  */
       for (category = 0; category < LC_ALL; ++category)
@@ -323,6 +323,11 @@ setlocale (int category, const char *locale)
 
            if (newdata[category] == NULL)
              break;
+
+           /* We must not simply free a global locale since we have
+              no control over the usage.  So we mark it as
+              un-deletable.  */
+           newdata[category]->usage_count = MAX_USAGE_COUNT;
          }
        else
          {
@@ -356,8 +361,8 @@ setlocale (int category, const char *locale)
     }
   else
     {
-      const struct locale_data *newdata = NULL;
-      char *newname = (char *) locale;
+      struct locale_data *newdata = NULL;
+      const char *newname = locale;
 
       /* Protect global data.  */
       __libc_lock_lock (__libc_setlocale_lock);
@@ -366,9 +371,13 @@ setlocale (int category, const char *locale)
        {
          /* Only actually load the data if anything will use it.  */
          newdata = _nl_find_locale (locale_path, locale_path_len, category,
-                                    (char **) &newname);
+                                    &newname);
          if (newdata == NULL)
            goto abort_single;
+
+         /* We must not simply free a global locale since we have no
+            control over the usage.  So we mark it as un-deletable.  */
+         newdata->usage_count = MAX_USAGE_COUNT;
        }
 
       /* Create new composite name.  */
@@ -391,6 +400,6 @@ setlocale (int category, const char *locale)
       /* Critical section left.  */
       __libc_lock_unlock (__libc_setlocale_lock);
 
-      return newname;
+      return (char *) newname;
     }
 }
index dba56dff21d51bdf4229b8a1cf369d45451413ff..2daeb03547af2c20d8adc22468e2975eb88682ba 100644 (file)
@@ -1,21 +1,21 @@
-/* strlen-hash - Implements hashing function for string with known length.
-Copyright (C) 1996 Free Software Foundation, Inc.
-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.  */
+/* Implements hashing function for string with known length.
+   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   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 <sys/types.h>
 
index 424e493209121a54d27642df23f9f6c9a3b4862e..76e65377627ba6e4fc6b0dc0fd9d02643d5fa318 100644 (file)
@@ -43,21 +43,42 @@ typedef struct weight_t
 
 /* The following five macros grant access to the values in the
    collate locale file that do not depend on byte order.  */
-#define collate_nrules \
+#ifndef USE_IN_EXTENDED_LOCALE_MODEL
+# define collate_nrules \
   (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES))
-#define collate_hash_size \
+# define collate_hash_size \
   (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_HASH_SIZE))
-#define collate_hash_layers \
+# define collate_hash_layers \
   (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_HASH_LAYERS))
-#define collate_undefined \
+# define collate_undefined \
   (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_UNDEFINED))
-#define collate_rules \
+# define collate_rules \
   ((u_int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_RULES))
 
-
 static __inline int get_weight (const STRING_TYPE **str, weight_t *result);
 static __inline int
 get_weight (const STRING_TYPE **str, weight_t *result)
+#else
+# define collate_nrules \
+  current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word
+# define collate_hash_size \
+  current->values[_NL_ITEM_INDEX (_NL_COLLATE_HASH_SIZE)].word
+# define collate_hash_layers \
+  current->values[_NL_ITEM_INDEX (_NL_COLLATE_HASH_LAYERS)].word
+# define collate_undefined \
+  current->values[_NL_ITEM_INDEX (_NL_COLLATE_UNDEFINED)].word
+# define collate_rules \
+  ((u_int32_t *) current->values[_NL_ITEM_INDEX (_NL_COLLATE_RULES)].string)
+
+static __inline int get_weight (const STRING_TYPE **str, weight_t *result,
+                               struct locale_data *current,
+                               const u_int32_t *__collate_table,
+                               const u_int32_t *__collate_extra);
+static __inline int
+get_weight (const STRING_TYPE **str, weight_t *result,
+           struct locale_data *current, const u_int32_t *__collate_table,
+           const u_int32_t *__collate_extra)
+#endif
 {
   unsigned int ch = *((USTRING_TYPE *) (*str))++;
   size_t slot;
@@ -150,7 +171,17 @@ get_weight (const STRING_TYPE **str, weight_t *result)
    the string at once.  The following macro constructs a double linked
    list of this information.  It is a macro because we use `alloca'
    and we use a double linked list because of the backward collation
-   order.  */
+   order.
+
+   We have this strange extra macro since the functions which use the
+   given locale (not the global one) canot use the global tables.  */
+#ifndef USE_IN_EXTENDED_LOCALE_MODEL
+# define call_get_weight(strp, newp) get_weight ((strp), (newp))
+#else
+# define call_get_weight(strp, newp) \
+  get_weight ((strp), (newp), current, collate_table, collate_extra)
+#endif
+
 #define get_string(str, forw, backw)                                         \
   do                                                                         \
     {                                                                        \
@@ -169,6 +200,6 @@ get_weight (const STRING_TYPE **str, weight_t *result)
          newp->next = NULL;                                                  \
          backw = newp;                                                       \
        }                                                                     \
-      while (get_weight (&str, newp) == 0);                                  \
+      while (call_get_weight (&str, newp) == 0);                             \
     }                                                                        \
   while (0)
diff --git a/locale/xlocale.h b/locale/xlocale.h
new file mode 100644 (file)
index 0000000..62b1595
--- /dev/null
@@ -0,0 +1,38 @@
+/* Definition of locale datatype.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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 _XLOCALE_H
+#define _XLOCALE_H     1
+
+/* Structure for reentrant locale using functions.  This is an
+   (almost) opaque type for the user level programs.  The file and
+   this data structure is not standardized.  Don't rely on it.  It can
+   go away without warning.  */
+typedef struct __locale_t
+{
+  struct locale_data *__locales[6];    /* XXX LC_ALL should be used here */
+
+  /* To increase the speed of this solution we add some special members.  */
+  const unsigned short int *__ctype_b;
+  const int *__ctype_tolower;
+  const int *__ctype_toupper;
+} *__locale_t;
+
+#endif /* xlocale.h */
index 3e625486f6df9f32036b495b22cad5fd7998e95e..a9656fd4e9cce8a3a0e3dbc9ee801bc9246084b6 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <errno.h>
 #include <string.h>
index 85c63309e7bc508ddaf4f5ffd3bf958eecc697d7..086bfa6fb6df7996e9fa17e5a7faa9a846574ec9 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1997 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 <mach.h>
 
index c35e548dd2f397f159dbdc03ef0391a1bd15e8ce..db48307856d186e4f9c4afda3cc084137e7bfd54 100644 (file)
@@ -1,23 +1,22 @@
 /* stdio on a Mach device port.
    Translates \n to \r\n on output, echos and translates \r to \n on input.
-
-Copyright (C) 1992, 1993, 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 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) 1992, 1993, 1994, 1996, 1997 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 <stdio.h>
 #include <mach.h>
index 4712038e1087505c8a423b29f616c11ddfd33c89..f84431324580f3770e3b181621e375d279ddf962 100644 (file)
@@ -1,22 +1,21 @@
 /* "Hello world" program for GNU C Library on bare Mach 3.0.
-
-Copyright (C) 1991, 1992, 1993 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.  */
+   Copyright (C) 1991, 1992, 1993, 1997 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 <mach.h>
 #include <device/device.h>
index 77b31397f7d343e314f4ac0c45704e57d2612a02..9631ad49674aa5bdced52470189ca0c62878d36e 100644 (file)
@@ -1,21 +1,21 @@
 /* Standard header for all Mach programs.
-Copyright (C) 1993, 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 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) 1993, 1994, 1996, 1997 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        _MACH_H
 
index 0f8c983c8709974671d505076d3b5ae69cba9e78..8fe443157ad49083af2ba5915822ee604fd4e801 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1994, 1997 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.  */
 
 /* Useful declarations and support functions for MiG-generated stubs.  */
 
@@ -57,7 +57,7 @@ __mig_strncpy (char *__dst, const char *__src, vm_size_t __len)
 {
   return __stpncpy (__dst, __src, __len) - __dst;
 }
-extern __inline vm_size_t 
+extern __inline vm_size_t
 mig_strncpy (char *__dst, const char *__src, vm_size_t __len)
 {
   return __mig_strncpy (__dst, __src, __len);
index 43646a761ec9faa277aa395d3231ed4240233f71..db340fff2dd1bc7643b78a07320e3ac1741cfa1b 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1992, 1993, 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.  */
+/* Copyright (C) 1992, 1993, 1995, 1997 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 <mach_init.h>
 #include <mach/mach_interface.h>
index 904473dd3a0e9adc1b30f95b11d0b71441ded9e7..74f9ad036edef99576a866513d69317004e8e837 100644 (file)
@@ -1,21 +1,21 @@
 /* Declarations and macros for the basic Mach things set at startup.
-Copyright (C) 1993, 1994 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.  */
+   Copyright (C) 1993, 1994, 1997 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        _MACH_INIT_H
 
index 91b45a76ecd894801375ff5349622c960166795d..fbecd111742c5e1fea950106bce2a88ac7e8e4d2 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1995, 1997 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 <mach.h>
 
index 3942acac582c6b9a1def98e3a2f0faae491ffb4d..ead8e60ed96315f8b1afd80a8eb3a8f22ec69b0b 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1995, 1997 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 <mach.h>
 
index 4ade8267d6c7e7c908b2e4931ccdba6001582e39..879ce83904da963722e0c0babb89d1c3ac130da3 100644 (file)
@@ -1,21 +1,21 @@
 /* Initialize a cthreads mutex structure.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1995, 1997 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 <lock-intern.h>
 #include <cthreads.h>
index db203d9d6ea12fe608f458aacda46fd646e3b76b..5f223e533559ab1b28c11e2a3f10a8432b21f1bc 100644 (file)
@@ -1,21 +1,21 @@
 /* Stub versions of mutex_lock_solid/mutex_unlock_solid for no -lthreads.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1995, 1997 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 <lock-intern.h>
 #include <cthreads.h>
index a00edacdfddff259cb1aea6ea9a265b0b3a3a60d..177d02d300a7ad81fe6e2694f6ba9e12b904cf43 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1994, 1995, 1997 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 <mach.h>
 #include "thread_state.h"
@@ -91,7 +91,7 @@ __mach_setup_thread (task_t task, thread_t thread, void *pc,
   /* Create the red zone.  */
   if (error = __vm_protect (task, stack, __vm_page_size, 0, VM_PROT_NONE))
     return error;
-  
+
   return __thread_set_state (thread, MACHINE_THREAD_STATE_FLAVOR,
                             (int *) &ts, tssize);
 }
index 13b5e245b65ee6431d46c9b4f56623d023fa2003..3d67382e077b4e40f72ae0a0eb8580b818af959e 100644 (file)
@@ -1,21 +1,21 @@
 /* Definitions of user-visible names for spin locks.
-Copyright (C) 1994 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.  */
+   Copyright (C) 1994, 1997 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 _SPIN_LOCK_H
 #define _SPIN_LOCK_H
index 265df0632e968064e23a0dbb3ed7598d4621eee0..a98578552e3ac9c9e8ff58068ea7c187caf8d1b7 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1995, 1997 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 <spin-lock.h>
 
index 308366c4dd7d056b02bb75e672c1af4756d81d02..2b4965ba58f2d23bb4bd6d5d9fe893787c40a01c 100644 (file)
@@ -1,22 +1,22 @@
-/* md5-crypt - One way encryption based on MD5 sum.
-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.  */
+/* One way encryption based on MD5 sum.
+   Copyright (C) 1996, 1997 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 <errno.h>
 #include <stdlib.h>
index 18868d92683e616dfecdd11b852fac9fa642aa68..7e2ebc01e7cc0ba98b2b936bddfeff8c8898094d 100644 (file)
@@ -1,20 +1,20 @@
-/* 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., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+/* Copyright (C) 1991, 1992, 1996, 1997 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        _NLIST_H
 
index 290d931c9712a7a17c11a410bf3f8b58448f795e..17e02decadbade6e8b999afc2657801578dd4436 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 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 <string.h>
 #include <netinet/if_ether.h>
index b511ea0ab854fb421f1dd64e7b089369cfc2b259..850130b2a9916873b510a3e300f329bcf10abb38 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1991, 1996, 1997 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 <stddef.h>
 #include <errno.h>
index 9aa13b958fb7ea4518d1ba9980f92b207a54375f..4772f154743eb32c510159ca62c86d1778b8b64d 100644 (file)
@@ -1,37 +1,38 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1994, 1997 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 <stdarg.h>
 #include <stddef.h>
+#include <string.h>
 
 #ifndef        HAVE_GNU_LD
-#define        __environ       environ
+# define __environ     environ
 #endif
 
 /* Execute PATH with all arguments after PATH until
    a NULL pointer and environment from `environ'.  */
 int
-DEFUN(execl, (path, arg), CONST char *path AND CONST char *arg DOTS)
+execl (const char *path, const char *arg, ...)
 {
-  CONST char *argv[1024];
-  register unsigned int i;
+  size_t argv_max = 1024;
+  const char **argv = alloca (argv_max * sizeof (const char *));
+  unsigned int i;
   va_list args;
 
   argv[0] = arg;
@@ -40,9 +41,28 @@ DEFUN(execl, (path, arg), CONST char *path AND CONST char *arg DOTS)
   i = 1;
   do
     {
-      argv[i] = va_arg (args, CONST char *);
-    } while (argv[i++] != NULL);
+      if (i == argv_max)
+       {
+         const char **nptr = alloca ((argv_max *= 2) * sizeof (const char *));
+
+         if ((char *) nptr + argv_max == (char *) argv)
+           {
+             /* Stack grows down.  */
+             argv = (const char **) memcpy (nptr, argv, i);
+             argv_max += i;
+           }
+         else if ((char *) argv + i == (char *) nptr)
+           /* Stack grows up.  */
+           argv_max += i;
+         else
+           /* We have a hole in the stack.  */
+           argv = (const char **) memcpy (nptr, argv, i);
+       }
+
+      argv[i] = va_arg (args, const char *);
+    }
+  while (argv[i++] != NULL);
   va_end (args);
 
-  return __execve (path, (char *CONST *) argv, __environ);
+  return __execve (path, (char *const *) argv, __environ);
 }
index a36d49a407e8263bd44797909e3fe594a8a897e9..3e0fcee87ecc83676fa013746705f4fc062f4133 100644 (file)
@@ -1,45 +1,66 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 <stdarg.h>
 #include <stddef.h>
+#include <string.h>
 
 /* Execute PATH with all arguments after PATH until a NULL pointer,
    and the argument after that for environment.  */
 int
-DEFUN(execle, (path), CONST char *path AND CONST char *arg DOTS)
+execle (const char *path, const char *arg, ...)
 {
-  CONST char *argv[1024], *CONST *envp;
-  register unsigned int i;
+  size_t argv_max = 1024;
+  const char **argv = alloca (argv_max * sizeof (const char *));
+  const char *const *envp;
+  unsigned int i;
   va_list args;
+  argv[0] = arg;
 
   va_start(args, arg);
-  argv[0] = arg;
   i = 1;
   do
     {
-      argv[i] = va_arg(args, CONST char *);
-    } while (argv[i++] != NULL);
+      if (i == argv_max)
+       {
+         const char **nptr = alloca ((argv_max *= 2) * sizeof (const char *));
+
+         if ((char *) nptr + argv_max == (char *) argv)
+           {
+             /* Stack grows down.  */
+             argv = (const char **) memcpy (nptr, argv, i);
+             argv_max += i;
+           }
+         else if ((char *) argv + i == (char *) nptr)
+           /* Stack grows up.  */
+           argv_max += i;
+         else
+           /* We have a hole in the stack.  */
+           argv = (const char **) memcpy (nptr, argv, i);
+       }
+
+      argv[i] = va_arg (args, const char *);
+    }
+  while (argv[i++] != NULL);
 
-  envp = va_arg(args, CONST char *CONST *);
+  envp = va_arg(args, const char *const *);
   va_end(args);
 
-  return __execve(path, (char *CONST *) argv, (char *CONST *) envp);
+  return __execve(path, (char *const *) argv, (char *const *) envp);
 }
index f442c05d94600411fe027e3c7e6ef95b7b12fc24..76b878ec6aab6a027e8dd2441cd86bc45319f22f 100644 (file)
@@ -1,24 +1,25 @@
-/* Copyright (C) 1991, 1993, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1993, 1996, 1997 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 <unistd.h>
 #include <stdarg.h>
 #include <stddef.h>
+#include <string.h>
 
 /* Execute FILE, searching in the `PATH' environment variable if
    it contains no slashes, with all arguments after FILE until a
@@ -26,16 +27,38 @@ Cambridge, MA 02139, USA.  */
 int
 execlp (const char *file, const char *arg, ...)
 {
-  const char *argv[1024];
+  size_t argv_max = 1024;
+  const char **argv = alloca (argv_max * sizeof (const char *));
   unsigned int i;
   va_list args;
 
+  argv[0] = arg;
+
   va_start (args, arg);
+  i = 1;
+  do
+    {
+      if (i == argv_max)
+       {
+         const char **nptr = alloca ((argv_max *= 2) * sizeof (const char *));
 
-  argv[i = 0] = arg;
-  while (argv[i++] != NULL)
-    argv[i] = va_arg (args, const char *);
+         if ((char *) nptr + argv_max == (char *) argv)
+           {
+             /* Stack grows down.  */
+             argv = (const char **) memcpy (nptr, argv, i);
+             argv_max += i;
+           }
+         else if ((char *) argv + i == (char *) nptr)
+           /* Stack grows up.  */
+           argv_max += i;
+         else
+           /* We have a hole in the stack.  */
+           argv = (const char **) memcpy (nptr, argv, i);
+       }
 
+      argv[i] = va_arg (args, const char *);
+    }
+  while (argv[i++] != NULL);
   va_end (args);
 
   return execvp (file, (char *const *) argv);
index 1749e246316149d0f4145033f33c23735bdeb41d..aba9d20f920c59b16ce5decae48d694cf3dbc6c0 100644 (file)
@@ -1,31 +1,30 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1997 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>
 
 #ifndef        HAVE_GNU_LD
-#define        __environ       environ
+# define __environ     environ
 #endif
 
 /* Execute PATH with arguments ARGV and environment from `environ'.  */
 int
-DEFUN(execv, (path, argv), CONST char *path AND char *CONST argv[])
+execv (const char *path, char *const argv[])
 {
-  return __execve(path, argv, __environ);
+  return __execve (path, argv, __environ);
 }
index 400e082937a54a66b9a2305f72a681308133e05c..c231ec69ca8d9f8beb9c997199d1abab42b17788 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1991, 1992, 1995, 1996, 1997 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 <unistd.h>
 #include <stdarg.h>
index edbfb6ae9ae7d36b19b118a0a642887fc642f2e5..e1437432157b21c8c1fb9ae2be5791289b0808d3 100644 (file)
@@ -1,19 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
 
-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 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.
+   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., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+   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.  */
 
 #if HAVE_CONFIG_H
 # include <config.h>
@@ -37,10 +38,10 @@ Cambridge, MA 02139, USA.  */
    program understand `configure --with-gnu-libc' and omit the object files,
    it is simpler to just do this in the source for each such file.  */
 
-#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
+#if defined _LIBC || !defined __GNU_LIBRARY__
 
 
-# if defined (STDC_HEADERS) || !defined (isascii)
+# if defined STDC_HEADERS || !defined isascii
 #  define ISASCII(c) 1
 # else
 #  define ISASCII(c) isascii(c)
index b08d2501fa4702b33f6d59d09bcd39c6fdf07aec..6c602b21b4b49238ff282390a3f5a11dbf82a48f 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1995, 1997 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 <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -27,61 +26,65 @@ Cambridge, MA 02139, USA.  */
 
 
 static void
-DEFUN(print_grpname, (id, parens),
-      gid_t id AND int parens)
+print_grpname (id, parens)
+     gid_t id;
+     int parens;
 {
-  CONST struct group *CONST g = getgrgid(id);
+  const struct group *const g = getgrgid (id);
   if (g == NULL)
     {
       if (parens)
        return;
       else
        {
-         fprintf(stderr, _("Couldn't find name for group %d\n"), id);
-         exit(EXIT_FAILURE);
+         fprintf (stderr, _("Couldn't find name for group %d\n"), id);
+         exit (EXIT_FAILURE);
        }
     }
 
   if (parens)
-    printf("(%s)", g->gr_name);
+    printf ("(%s)", g->gr_name);
   else
-    puts(g->gr_name);
+    puts (g->gr_name);
 }
 
 static void
-DEFUN(print_pwdname, (id, parens),
-      uid_t id AND int parens)
+print_pwdname (id, parens)
+     uid_t id;
+     int parens;
 {
-  CONST struct passwd *CONST p = getpwuid(id);
+  const struct passwd *const p = getpwuid (id);
   if (p == NULL)
     {
       if (parens)
        return;
       else
        {
-         fprintf(stderr, _("Couldn't find name for user %d\n"), (int) id);
-         exit(EXIT_FAILURE);
+         fprintf (stderr, _("Couldn't find name for user %d\n"), (int) id);
+         exit (EXIT_FAILURE);
        }
     }
 
   if (parens)
-    printf("(%s)", p->pw_name);
+    printf ("(%s)", p->pw_name);
   else
-    puts(p->pw_name);
+    puts (p->pw_name);
 }
 \f
 int
-DEFUN(main, (argc, argv), int argc AND char **argv)
+main (argc, argv)
+     int argc;
+     char **argv;
 {
   int print_gid = 1, print_uid = 1;
   int real = 0, name = 0;
   int error = 0;
-  register int c;
+  int c;
 
-  uid_t ruid = getuid(), euid = geteuid();
-  gid_t rgid = getgid(), egid = getegid();
+  uid_t ruid = getuid (), euid = geteuid ();
+  gid_t rgid = getgid (), egid = getegid ();
 
-  while ((c = getopt(argc, argv, "gurn")) != -1)
+  while ((c = getopt (argc, argv, "gurn")) != -1)
     switch (c)
       {
       default:
@@ -109,65 +112,65 @@ DEFUN(main, (argc, argv), int argc AND char **argv)
 
   if (error || argc != optind)
     {
-      fputs(_("Usage: id [-gurn]\n"), stderr);
-      exit(EXIT_FAILURE);
+      fputs (_("Usage: id [-gurn]\n"), stderr);
+      exit (EXIT_FAILURE);
     }
 
   if (print_uid && !print_gid)
     {
-      CONST uid_t uid = real ? ruid : euid;
+      const uid_t uid = real ? ruid : euid;
       if (name)
-       print_pwdname(uid, 0);
+       print_pwdname (uid, 0);
       else
-       printf("%d\n", (int) uid);
+       printf ("%d\n", (int) uid);
     }
   else if (print_gid && !print_uid)
     {
-      CONST gid_t gid = real ? rgid : egid;
+      const gid_t gid = real ? rgid : egid;
       if (name)
-       print_grpname(gid, 0);
+       print_grpname (gid, 0);
       else
-       printf("%d\n", (int) gid);
+       printf ("%d\n", (int) gid);
     }
   else
     {
 #if    NGROUPS_MAX > 0
       gid_t groups[NGROUPS_MAX];
       int ngroups;
-      ngroups = getgroups(NGROUPS_MAX, groups);
+      ngroups = getgroups (NGROUPS_MAX, groups);
 #endif
 
-      printf("uid=%d", (int) ruid);
-      print_pwdname(ruid, 1);
-      printf(" gid=%d", (int) rgid);
-      print_grpname(rgid, 1);
+      printf ("uid=%d", (int) ruid);
+      print_pwdname (ruid, 1);
+      printf (" gid=%d", (int) rgid);
+      print_grpname (rgid, 1);
       if (euid != ruid)
        {
-         printf(" euid=%d", (int) euid);
-         print_pwdname(euid, 1);
+         printf (" euid=%d", (int) euid);
+         print_pwdname (euid, 1);
        }
       if (egid != rgid)
        {
-         printf(" egid=%d", (int) egid);
-         print_grpname(egid, 1);
+         printf (" egid=%d", (int) egid);
+         print_grpname (egid, 1);
        }
 
 #if    NGROUPS > 0
       if (ngroups > 0)
        {
-         register size_t i;
-         printf(" groups=%d", (int) groups[0]);
-         print_grpname(groups[0], 1);
+         size_t i;
+         printf (" groups=%d", (int) groups[0]);
+         print_grpname (groups[0], 1);
          for (i = 1; i < ngroups; ++i)
            {
-             printf(", %d", (int) groups[i]);
-             print_grpname(groups[i], 1);
+             printf (", %d", (int) groups[i]);
+             print_grpname (groups[i], 1);
            }
        }
 #endif
 
-      putchar('\n');
+      putchar ('\n');
     }
 
-  exit(EXIT_SUCCESS);
+  exit (EXIT_SUCCESS);
 }
index 4b640e6079149923aede44015664c8f31bbf8af7..370a612603daa79f35dafa86097602e8457a2f99 100644 (file)
@@ -3,25 +3,25 @@
    (Implements POSIX draft P10003.2/D11.2, except for
    internationalization features.)
 
-   Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
 
-This file is part of the GNU C Library.  Its master source is NOT part of
-the C library, however.  The master source lives in /gd/gnu/lib.
+   This file is part of the GNU C Library.  Its master source is NOT part of
+   the C library, however.  The master source lives in /gd/gnu/lib.
 
-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.  */
 
 /* AIX requires this to be the first thing in the file. */
 #if defined (_AIX) && !defined (REGEX_MALLOC)
index 56102a3c26c45eb4490d25aab8b1878428045f48..e3451e13e698eaf42b86bfe36af81bc9d1cff15f 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 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 <unistd.h>
 
index 5c8d1b7f0430996e04324919d7888e71645c4aa7..57652bfc3c3f9e3297032ad437e6a8797ba198f8 100644 (file)
@@ -235,6 +235,7 @@ extern unsigned int alarm __P ((unsigned int __seconds));
    SIGALRM signal while inside `sleep' call, the handling of the SIGALRM
    signal afterwards is undefined.  There is no return value to indicate
    error, but if `sleep' returns SECONDS, it probably didn't work.  */
+extern unsigned int __sleep __P ((unsigned int __seconds));
 extern unsigned int sleep __P ((unsigned int __seconds));
 
 #if defined(__USE_BSD) || defined(__USE_XOPEN_EXTENDED)
index 1922e446423efabea8bb3b1ffb161abb2534ee37..52869fe1d39a156f69c9737751a69222db695d1a 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1997 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 <sys/types.h>
 #include <wordexp.h>
 #include <stdio.h>
@@ -43,8 +42,10 @@ Cambridge, MA 02139, USA.  */
 
 
 int
-DEFUN(wordexp, (string, pwordexp, flags),
-      CONST char *string AND wordexp_t *pwordexp AND int flags)
+wordexp (string, pwordexp, flags)
+     const char *string;
+     wordexp_t *pwordexp;
+     int flags;
 {
   int error;
   pid_t pid;
@@ -67,7 +68,7 @@ DEFUN(wordexp, (string, pwordexp, flags),
     {
       /* Child.  Run the shell.  */
 
-      CONST char *argv[5];
+      const char *argv[5];
 
       close (d[STDIN_FILENO]);
       dup2 (d[STDOUT_FILENO], STDOUT_FILENO);
@@ -132,7 +133,7 @@ DEFUN(wordexp, (string, pwordexp, flags),
   wordc = start + wordc + 1;
 
   if (flags & WRDE_APPEND)
-    wordv = (char **) realloc ((PTR) pwordexp->we_wordv,
+    wordv = (char **) realloc ((void *) pwordexp->we_wordv,
                               wordc * sizeof (char *));
   else
     wordv = (char **) malloc (wordc * sizeof (char *));
index 0bcc25ca6a419d26b865eb6218b0561cee729a5d..2f7db94c02858abe8d88e3991cdebc2944f87a25 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1991, 1996, 1997 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 <pwd.h>
 #include <stdio.h>
index 9b96c63c33eb21653126122dde3c02b9e6292d3a..04717533998497ffd8fe700c134e2c415d396742 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <pwd.h>
 
index 1c5bc02e7aee5eec89ca492365783085b354792d..7d0b066084fbbb325bfb3ed01b700347ca33ae4a 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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/tes
-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/tes
+   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 <pwd.h>
 
index 042fdae20685ff5ad5b8530674dd0d81240a1406..09c6f8632c928ca8ca0bb72c4ce0cf338a7ddabe 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <pwd.h>
 
index 93fadc5ed170f2a59f597f515e27996f8090cea7..0dc1eacaed179f7ee3a28c629f0d2a080c8f814f 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <pwd.h>
 
index 2ad654f9b982003dc9e50df8893a76cf9fe94fb4..acdd6b2ef64eb156cca428536396e7990d51eb2a 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <pwd.h>
 
index 8e92ee25553a2241eec23adfc4e3b20b7945314b..4db8bc0317ad4395423f67339cecff6e987140f5 100644 (file)
@@ -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@cygnus.com>, 1996.
+/* Copyright (C) 1996, 1997 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 <pwd.h>
 
index 2761cf8801e53ae92b46460774a51dba7ad14a75..c27f687b2610139fddd51927ebe64dd7822d6fba 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1996, 1997 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 <errno.h>
 #include <stdio.h>
@@ -25,7 +25,7 @@ Cambridge, MA 02139, USA.  */
    This must know the format of the password file.  */
 int
 putpwent (p, stream)
-     register const struct passwd *p;
+     const struct passwd *p;
      FILE *stream;
 {
   if (p == NULL || stream == NULL)
@@ -38,7 +38,7 @@ putpwent (p, stream)
               p->pw_name, p->pw_passwd,
               p->pw_uid, p->pw_gid,
               p->pw_gecos, p->pw_dir, p->pw_shell) < 0)
-    return(-1);
+    return -1;
 
-  return(0);
+  return 0;
 }
index 5ce265bccf2d572b9714ac395cba3dc2892a99b4..61f18c4146e150fa846226a54793073fc7dc6945 100755 (executable)
--- a/rellns-sh
+++ b/rellns-sh
@@ -22,6 +22,12 @@ if test $# -ne 2; then
   exit 1
 fi
 
+# We only handle the case where SOURCE is the name of an existing file
+if test ! -f $1; then
+  echo "rellns: $1 must name an existing file" >&2
+  exit 1
+fi
+
 case $1 in
 /*)
   # Make both paths absolute.
index fbf74d41257cab211e0ac2ba8efd8630ec8d21ba..642cada6789931dd47c9d3f472497cece4611c15 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
    Contributed by David Mosberger (davidm@azstarnet.com).
 
-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.  */
 
 /* This file provides a Linux /etc/host.conf compatible front end to
 the various name resolvers (/etc/hosts, named, NIS server, etc.).
index 2165e40711f9432398a47cc145afdc91a1ee69ec..c2aeefbcd5be311c9bd28234417a42613db72ce5 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
    Contributed by David Mosberger (davidm@azstarnet.com).
 
-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.  */
 
 #ifndef _RES_HCONF_H_
 #define _RES_HCONF_H_
index c70be7b886fe8fc8c2fab1ee26b5a6a267b304c0..f46f1601c310e6c53ea1422da8ff54563c960f6d 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 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.  */
+/* Copyright (C) 1991, 1992, 1994, 1995, 1997 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 <stddef.h>
 #include <setjmp.h>
index a01c4120da22910ef628b27287d48690b4f56af6..05b10cc0ce74458757e98c88b57a548789179c96 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1994, 1997 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 <stddef.h>
 #include <setjmp.h>
 #include <signal.h>
@@ -26,7 +25,7 @@ Cambridge, MA 02139, USA.  */
    Always return zero.  */
 
 int
-DEFUN(__sigjmp_save, (env, savemask), sigjmp_buf env AND int savemask)
+__sigjmp_save (sigjmp_buf env, int savemask)
 {
   env[0].__mask_was_saved = (savemask &&
                             __sigprocmask (SIG_BLOCK, (sigset_t *) NULL,
index ef6e1f5f9f9688f861516f4642632ce3d33fd5eb..53fee89864fe8dfbe15567096a121047149b84a3 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1997 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 <stdio.h>
 #include <setjmp.h>
 #include <stdlib.h>
@@ -25,17 +24,17 @@ static jmp_buf env;
 static int last_value = -1, lose = 0;
 
 void
-DEFUN(jump, (val), int val)
+jump (int val)
 {
-  longjmp(env, val);
+  longjmp (env, val);
 }
 
 int
-DEFUN_VOID(main)
+main (void)
 {
   int value;
 
-  value = setjmp(env);
+  value = setjmp (env);
   if (value != last_value + 1)
     {
       fputs("Shouldn't have ", stdout);
@@ -46,16 +45,16 @@ DEFUN_VOID(main)
     {
     case 0:
       puts("Saved environment.");
-      jump(0);
+      jump (0);
     default:
-      printf("Jumped to %d.\n", value);
+      printf ("Jumped to %d.\n", value);
       if (value < 10)
-       jump(value + 1);
+       jump (value + 1);
     }
 
   if (lose || value != 10)
-    puts("Test FAILED!");
+    puts ("Test FAILED!");
   else
-    puts("Test succeeded!");
-  exit(lose ? EXIT_FAILURE : EXIT_SUCCESS);
+    puts ("Test succeeded!");
+  exit (lose ? EXIT_FAILURE : EXIT_SUCCESS);
 }
index 97457823f4095c08283d005826521fa68712a3a3..2794912c91be9de3b929f9949d5b8c35ac344c64 100644 (file)
@@ -1,21 +1,21 @@
 /* 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.
-
-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, 1997 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 _ITOA_H
 #define _ITOA_H
index b5820fd09ff9ae9eec320a92083293b693273693..4922427edccf6b72233a26bdea7e5e11869def0e 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1995, 1997 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 <stdarg.h>
 #include <stdio.h>
index 5728c56df7cf137d3529b56370c464f6b94a1309..0aa12d9dfcb53834c7a1cc40219e315bc68f0bdc 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1995, 1997 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 <stdarg.h>
 #include <stdio.h>
index d1122e4e9bd063728103c629982ec206384763b0..b5d262657f7edabaa31b593c1b290fc53447b131 100644 (file)
@@ -1,22 +1,22 @@
 /* Regression test for reported old bug that errno is clobbered
    by the first successful output to a stream on an unseekable object.
-Copyright (C) 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.  */
+   Copyright (C) 1995, 1997 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 <errno.h>
 #include <stdio.h>
index bc6d1003b7f15666558827ef7031ac837e580a80..969f338f482a0020c93318109017d1bcfff959e8 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 <stdarg.h>
 #include <stdio.h>
 
@@ -24,15 +23,14 @@ Cambridge, MA 02139, USA.  */
 /* Write formatted output to STREAM from the format string FORMAT.  */
 /* VARARGS2 */
 int
-DEFUN(fprintf, (stream, format),
-      FILE *stream AND CONST char *format DOTS)
+fprintf (FILE *stream, const char *format, ...)
 {
   va_list arg;
   int done;
 
-  va_start(arg, format);
-  done = vfprintf(stream, format, arg);
-  va_end(arg);
+  va_start (arg, format);
+  done = vfprintf (stream, format, arg);
+  va_end (arg);
 
   return done;
 }
index 518398e05529f2bfd322ebffedaf57a81be6ecd1..e36e48e3b9e98c6ccee5308a21def118534c6fc4 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1991, 1992, 1995, 1996, 1997 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 <stddef.h>
 #include <stdio.h>
index 45d4d8875dbc49d1a0b22cfb782b1aa216650d90..a1629db43861bdc892e618ecfe696638411cec34 100644 (file)
@@ -1,33 +1,32 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 <stdio.h>
 
 
 /* Read a word (int) from STREAM.  */
 int
-DEFUN(getw, (stream), FILE *stream)
+getw (FILE *stream)
 {
-       int w;
+  int w;
 
-       /* Is there a better way?  */
-       if (fread((PTR) &w, sizeof(w), 1, stream) != 1)
-         return(EOF);
-       return(w);
+  /* Is there a better way?  */
+  if (fread ((void *) &w, sizeof (w), 1, stream) != 1)
+    return EOF;
+  return w;
 }
index 1054acaa7def5fb0e282938cf619032cac08a38b..e7db55ae80d8e88a00d35a168be5c8ecb07e4283 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1993, 1997 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 <stdio.h>
 #include <errno.h>
 
@@ -26,11 +25,11 @@ extern char *_strerror_internal __P ((int, char *buf, size_t));
    a message describing the meaning of the contents of `errno' and a newline.
    If S is NULL or "", the colon and space are omitted.  */
 void
-DEFUN(perror, (s), register CONST char *s)
+perror (const char *s)
 {
   char buf[1024];
   int errnum = errno;
-  CONST char *colon;
+  const char *colon;
 
   if (s == NULL || *s == '\0')
     s = colon = "";
index fc500419fa281553059f27e8317fadfa01998863..19a57539931278841fda8c8b0453f3a9958eb6cc 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1991, 1992, 1995, 1996, 1997 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 <stdio.h>
 #include <signal.h>
index 1b70baeeaf79aa749e859ec9d4d0c44bf7587a63..c9d0d5dcc40fd0b591eec1023355221a381baeae 100644 (file)
@@ -1,31 +1,30 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 <stdio.h>
 
 
 /* Write the word (int) W to STREAM.  */
 int
-DEFUN(putw, (w, stream), int w AND FILE *stream)
+putw (int w, FILE *stream)
 {
   /* Is there a better way?  */
-  if (fwrite((CONST PTR) &w, sizeof(w), 1, stream) < 1)
-    return(EOF);
-  return(0);
+  if (fwrite ((const void *) &w, sizeof (w), 1, stream) < 1)
+    return EOF;
+  return 0;
 }
index 519eec20ac47158012cb4d10b3de5a8a5b468eb1..1edea33554ea124b72ad326c1bca7136851e45f8 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1991, 1996, 1997 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 <errno.h>
 #include <limits.h>
index 29c9efb1c3021a76c451121bf08ac60632ad45b3..bbef9e6e21bd805f81a5ad7af543023f888111d7 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1991, 1995, 1996, 1997 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 <stdarg.h>
 #include <stdio.h>
index e4f8e1e193201b2318417e2e2a8d19be572b9e48..ba74466a8befac428533765aa2e46ca43262f983 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1995, 1997 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 <stdarg.h>
 #include <stdio.h>
index c1fb5b30a249de739cc0f7838b53c7ca990d56d5..6ea13661a16921e822c4c8d6b272181bc8fe90ff 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1995, 1997 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 <stdarg.h>
 #include <stdio.h>
index a86ac0861014582d9b9c974aa72af47de6cf4eef..5f8635cfb8bf448b7eed61fcb117e2c01a18233a 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1993, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1993, 1996, 1997 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 <errno.h>
 #include <stddef.h>
@@ -35,9 +35,9 @@ tempnam (const char *dir, const char *pfx)
 {
   char buf[FILENAME_MAX];
   size_t len;
-  register char *s;
-  register char *t = __stdio_gen_tempname (buf, sizeof (buf), dir, pfx, 1,
-                                          &len, (FILE **) NULL);
+  char *s;
+  char *t = __stdio_gen_tempname (buf, sizeof (buf), dir, pfx, 1,
+                                 &len, (FILE **) NULL);
 
   if (t == NULL)
     return NULL;
index cd739a6c71ca7f3a26bc1c052547a2f4d5803178..32bce5b77aac0530295ab60a0b8a3796adc5a048 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1996, 1997 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 <errno.h>
 #include <stdio.h>
@@ -29,7 +29,7 @@ main (int argc, char **argv)
   static const char replace[] = "Hewwo, world.\n";
   static const size_t replace_from = 2, replace_to = 4;
   char filename[FILENAME_MAX];
-  char *name = strrchr(*argv, '/');
+  char *name = strrchr (*argv, '/');
   char buf[BUFSIZ];
   FILE *f;
   int lose = 0;
@@ -39,36 +39,36 @@ main (int argc, char **argv)
   else
     name = *argv;
 
-  (void) sprintf(filename, "/tmp/%s.test", name);
+  (void) sprintf (filename, "/tmp/%s.test", name);
 
-  f = fopen(filename, "w+");
+  f = fopen (filename, "w+");
   if (f == NULL)
     {
-      perror(filename);
-      exit(1);
+      perror (filename);
+      exit (1);
     }
 
-  (void) fputs(hello, f);
-  rewind(f);
-  (void) fgets(buf, sizeof(buf), f);
-  rewind(f);
-  (void) fputs(buf, f);
-  rewind(f);
+  (void) fputs (hello, f);
+  rewind (f);
+  (void) fgets (buf, sizeof (buf), f);
+  rewind (f);
+  (void) fputs (buf, f);
+  rewind (f);
   {
-    register size_t i;
+    size_t i;
     for (i = 0; i < replace_from; ++i)
       {
-       int c = getc(f);
+       int c = getc (f);
        if (c == EOF)
          {
-           printf("EOF at %u.\n", i);
+           printf ("EOF at %u.\n", i);
            lose = 1;
            break;
          }
        else if (c != hello[i])
          {
-           printf("Got '%c' instead of '%c' at %u.\n",
-                  (unsigned char) c, hello[i], i);
+           printf ("Got '%c' instead of '%c' at %u.\n",
+                   (unsigned char) c, hello[i], i);
            lose = 1;
            break;
          }
@@ -76,54 +76,54 @@ main (int argc, char **argv)
   }
 
   {
-    long int where = ftell(f);
+    long int where = ftell (f);
     if (where == (long int) replace_from)
       {
        register size_t i;
        for (i = replace_from; i < replace_to; ++i)
          if (putc(replace[i], f) == EOF)
            {
-             printf("putc('%c') got %s at %u.\n",
-                    replace[i], strerror(errno), i);
+             printf ("putc('%c') got %s at %u.\n",
+                     replace[i], strerror (errno), i);
              lose = 1;
              break;
            }
       }
     else if (where == -1L)
       {
-       printf("ftell got %s (should be at %u).\n",
-              strerror(errno), replace_from);
+       printf ("ftell got %s (should be at %u).\n",
+               strerror (errno), replace_from);
        lose = 1;
       }
     else
       {
-       printf("ftell returns %lu; should be %u.\n", where, replace_from);
+       printf ("ftell returns %lu; should be %u.\n", where, replace_from);
        lose = 1;
       }
   }
 
   if (!lose)
     {
-      rewind(f);
-      if (fgets(buf, sizeof(buf), f) == NULL)
+      rewind (f);
+      if (fgets (buf, sizeof (buf), f) == NULL)
        {
-         printf("fgets got %s.\n", strerror(errno));
+         printf ("fgets got %s.\n", strerror(errno));
          lose = 1;
        }
-      else if (strcmp(buf, replace))
+      else if (strcmp (buf, replace))
        {
-         printf("Read \"%s\" instead of \"%s\".\n", buf, replace);
+         printf ("Read \"%s\" instead of \"%s\".\n", buf, replace);
          lose = 1;
        }
     }
 
   if (lose)
-    printf("Test FAILED!  Losing file is \"%s\".\n", filename);
+    printf ("Test FAILED!  Losing file is \"%s\".\n", filename);
   else
     {
-      (void) remove(filename);
-      puts("Test succeeded.");
+      (void) remove (filename);
+      puts ("Test succeeded.");
     }
 
-  exit(lose ? EXIT_FAILURE : EXIT_SUCCESS);
+  exit (lose ? EXIT_FAILURE : EXIT_SUCCESS);
 }
index 81945f7b445e88561b51a0bbbd22d2332b0dee8c..0b47c0f0d31dcc0340ebf9da258634f4ee20ab95 100644 (file)
@@ -1,27 +1,26 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1997 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 <stdio.h>
 #include <unistd.h>
 
 static int
-DEFUN(check, (name, stream, fd), CONST char *name AND FILE *stream AND int fd)
+check (const char *name, FILE *stream, int fd)
 {
   int sfd = fileno (stream);
   printf ("(fileno (%s) = %d) %c= %d\n", name, sfd, sfd == fd ? '=' : '!', fd);
@@ -29,7 +28,7 @@ DEFUN(check, (name, stream, fd), CONST char *name AND FILE *stream AND int fd)
 }
 
 int
-DEFUN_VOID(main)
+main (void)
 {
   exit (check ("stdin", stdin, STDIN_FILENO) ||
        check ("stdout", stdout, STDOUT_FILENO) ||
index 87578d397ae4eefcb55eafb196e73238034bc9da..99eb3ef709419aed14eb73627cd9318b9d6bae8b 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 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 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) 1991, 92, 93, 95, 96, 97 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.  */
 
 #ifdef BSD
 #include </usr/include/stdio.h>
index 35e4e1aea7f7fcdb56ebbefe1576b2d04268a7d0..fe376727032fa7be6eb70f4325c452b3013c9c60 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 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 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) 1992, 1995, 1996, 1997 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 <stdio.h>
 
index e2da2605b88cfdb1a2b64bf3a1a509db8c3d9e0a..a035e08b415d64fc8e68a15f28a5d3b7218a9c72 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1993, 1995, 1997 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 <stdarg.h>
 #undef __OPTIMIZE__    /* Avoid inline `vprintf' function.  */
index 1a9feaa413c5ae26133b9f1c83991ccf4460f3f3..b602576fa9b7b666fcba3bebecfebc2c67700f0d 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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>
 #include <stdio.h>
 
@@ -25,7 +24,7 @@ Cambridge, MA 02139, USA.  */
 
 /* Clear the EOF and error indicators for STREAM.  */
 void
-DEFUN(clearerr, (stream), FILE *stream)
+clearerr (FILE *stream)
 {
-  __clearerr(stream);
+  __clearerr (stream);
 }
index 857b25020112e713894e54e91d8cc366ab5bb597..5665db22be1f4b54c2d2d53a8a7293b2ae92e22a 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1991, 1996, 1997 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 <errno.h>
 #include <stdio.h>
index 9bfff3477a2be1f5deac2b741f8b92e86244345c..58e09d81d3f80f5ba80cb65807a77979940634e7 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1996, 1997 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 <errno.h>
 #include <stdio.h>
index a615081c99dde40781a639c51c58602f168654b1..2045462bad7cedb2136a3dd598103f6e5ba31241 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1991, 1996, 1997 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 <errno.h>
 #include <stdio.h>
index 4526c704c37c3a9592239973657ae8ba9294fd49..03246fb30ce04c5fc0cea063cd14bca9d7d328cd 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1991, 1992, 1995, 1996, 1997 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 <errno.h>
 #include <stdio.h>
index dc3dfdf6e25b137b854d21e0e1b220607096cf22..b6a20cd72b92d01c31b9a33799d584ae21a74e6b 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1993, 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 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) 1991, 1993, 1994, 1996, 1997 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 <errno.h>
 #include <stdio.h>
index a161110703ddc3c7bb901b655e18c8abc4a25dfc..4eff3c2860ab76715afa504fd07b2067617b1ba9 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 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., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+/* Copyright (C) 1991, 1992, 1993, 1996, 1997 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 <errno.h>
 #include <stddef.h>
index fa50f6af98d5020ce7f8b73a17e9235644b640af..8c27a27c6fe5ea11bbd7da813c02ecc53742a2fa 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 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., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+/* Copyright (C) 1991, 1992, 1993, 1996, 1997 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 <ctype.h>
 #include <errno.h>
index b61bdda9596a54be8ebc98c7f1e7cc1214f641f4..482706aa15ebcf9e858f8197d89c50b26f5873d5 100644 (file)
@@ -1,32 +1,33 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1997 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 <stdio.h>
 
 
 /* Defined in fopen.c.  */
-extern int EXFUN(__getmode, (CONST char *mode, __io_mode *mptr));
+extern int __getmode __P ((const char *mode, __io_mode *mptr));
 
 /* Open a new stream on the given magic cookie descriptor.  */
 FILE *
-DEFUN(fopencookie, (cookie, mode, functions),
-      PTR cookie AND CONST char *mode AND __io_functions functions)
+fopencookie (cookie, mode, functions)
+     void *cookie;
+     const char *mode;
+     __io_functions functions;
 {
   __io_mode m;
   FILE *f;
index 2cbba2a449a0c22a7dc94ab032c75b3c38177493..fc7ce5b17962f0cc30e2ac1ddde983a301f21855 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1996, 1997 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 <errno.h>
 #include <stdio.h>
index a149a1c329d3cd9f9801bfc9784db30b328c74a7..16406bbb6ab7bd90685f5ad870b4e4dac8e864bc 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1997 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>
 #include <stdio.h>
 #include <string.h>
@@ -24,12 +23,12 @@ Cambridge, MA 02139, USA.  */
 
 /* Write the string S to STREAM.  */
 int
-DEFUN(fputs, (s, stream), CONST char *s AND FILE *stream)
+fputs (const char *s, FILE *stream)
 {
-  register CONST size_t len = strlen (s);
+  const size_t len = strlen (s);
   if (len == 1)
     return putc (*s, stream) == EOF ? EOF : 0;
-  if (fwrite ((PTR) s, 1, len, stream) != len)
+  if (fwrite ((void *) s, 1, len, stream) != len)
     return EOF;
   return 0;
 }
index 63d41d2bd077190c17490ec713f781c3550d188f..80c3d44c23fa85d89fc3e9ca6a8db2d5c66c8ed2 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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 <errno.h>
 #include <stdio.h>
index cfb72bb7450271a6c3eeaea4b31b7928d0f5b963..13aae4672b04878b0c49c6e6b97e86d60fc1d603 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1994, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1994, 1995, 1996, 1997 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 <errno.h>
 #include <stdio.h>
index 9dce18f5d3396f20045537c45fa033a10ae0a985..32df2df095a6b2db99a6f91923b68f8c21fa5907 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 92, 93, 95, 96 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.  */
+/* Copyright (C) 1991, 92, 93, 95, 96, 97 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 <errno.h>
 #include <stdio.h>
index 6aea674066c0da685dc6ca5cd415f4ddb79735b2..23133805e0a7d9798268e57abc6f96fd635a84b8 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1991, 1996, 1997 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 <errno.h>
 #include <stdio.h>
index d715f2009fef5ad6489f493a9164923e039c6b87..cb770b67797ca2be7834f6f3fbc47281ec821a88 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 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 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) 1991, 1992, 1994, 1996, 1997 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 <errno.h>
 #include <stdio.h>
index 7cf3898127ce7ec821f8f5eaa5bd551bf97251b2..bd07c9edfbf64d1be73e887508e70f6747eb3960 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 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 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) 1991, 92, 93, 94, 96, 97 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 <errno.h>
 #include <stdio.h>
index 427de7738fa62d968dd6501cec72316425f63c8a..2b1cb92bf29db518fd8c7d10e92799b8e69e83f9 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 <stdio.h>
 
 #undef getchar
@@ -24,7 +23,7 @@ Cambridge, MA 02139, USA.  */
 
 /* Read a character from stdin.  */
 int
-DEFUN_VOID(getchar)
+getchar (void)
 {
-  return __getc(stdin);
+  return __getc (stdin);
 }
index 0a6e561ae6e62c06e1a8ad3ef874f41819ca8e16..cd6f5e5bd4825f773c3f38d05af1b0a9dc369259 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1991, 1992, 1995, 1996, 1997 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 <stddef.h>
 #include <stdio.h>
index 0a01126b914d3d2f5f4d6c0c58165041ae1bada8..42b114906597fa35ccb508304f1040098dd18e35 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 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 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) 1991, 1994, 1995, 1996, 1997 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 <stdio.h>
 #include <errno.h>
index 592700ff94cb5ed0a2992aae348ca6415927288a..d3618aef938cd0676de01a0108b231faac90c9d2 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1996, 1997 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.  */
 
 /* This file provides glue between Unix stdio and GNU stdio.
    It supports use of Unix stdio `getc' and `putc' (and, by extension,
index 68aee34ae635e0ecfcb7747a9ee270fa49edb719..290e3fdf87451d89dbe6954f65be9fb2ca11e7eb 100644 (file)
@@ -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.
-
-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) 1991, 92, 93, 94, 95, 96, 97 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 <errno.h>
 #include <stdio.h>
index e8fd85129887eb5a0632345411a5ea8ebd383a71..a5822c4845737ca251b51518b7dd455cdee5f0aa 100644 (file)
@@ -1,21 +1,21 @@
 /* Word-wrapping and line-truncating streams.
-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., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+   Copyright (C) 1996, 1997 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 <stdio.h>
 #include <ctype.h>
index aba9398995fa2862b717b3b9544c8b20b9d4683b..2ecb387e73ad32bc15fd5c7a11d65e1ca12a82d8 100644 (file)
@@ -1,21 +1,21 @@
 /* Word-wrapping and line-truncating streams.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1996, 1997 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.  */
 
 #ifndef __LINEWRAP_H__
 #define __LINEWRAP_H__
@@ -63,32 +63,32 @@ FILE *line_wrap_stream (FILE *stream,
 void line_unwrap_stream (FILE *stream);
 
 /* Returns true if STREAM is line wrapped.  */
-extern inline int line_wrapped (FILE *stream); 
+extern inline int line_wrapped (FILE *stream);
 
 /* If STREAM is not line-wrapped return -1, else return its left margin.  */
-extern size_t line_wrap_lmargin (FILE *stream); 
+extern size_t line_wrap_lmargin (FILE *stream);
 
 /* If STREAM is not line-wrapped return -1, else set its left margin to
    LMARGIN and return the old value.  */
-extern size_t line_wrap_set_lmargin (FILE *stream, size_t lmargin); 
+extern size_t line_wrap_set_lmargin (FILE *stream, size_t lmargin);
 
 /* If STREAM is not line-wrapped return -1, else return its left margin.  */
-extern size_t line_wrap_rmargin (FILE *stream); 
+extern size_t line_wrap_rmargin (FILE *stream);
 
 /* If STREAM is not line-wrapped return -1, else set its right margin to
    RMARGIN and return the old value.  */
-extern size_t line_wrap_set_rmargin (FILE *stream, size_t rmargin); 
+extern size_t line_wrap_set_rmargin (FILE *stream, size_t rmargin);
 
 /* If STREAM is not line-wrapped return -1, else return its wrap margin.  */
-extern size_t line_wrap_wmargin (FILE *stream); 
+extern size_t line_wrap_wmargin (FILE *stream);
 
 /* If STREAM is not line-wrapped return -1, else set its left margin to
    WMARGIN and return the old value.  */
-extern size_t line_wrap_set_wmargin (FILE *stream, size_t wmargin); 
+extern size_t line_wrap_set_wmargin (FILE *stream, size_t wmargin);
 
 /* If STREAM is not line-wrapped return -1, else return the column number of
    the current output point.  */
-extern size_t line_wrap_point (FILE *stream); 
+extern size_t line_wrap_point (FILE *stream);
 
 #ifdef __OPTIMIZE__
 
index 304cc4ca85d31e84e09185c0e45765456f25c84e..cfac39f24d90cf27e1ddb1b640c6e60e257050cc 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 92, 94, 95, 96 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.  */
+/* Copyright (C) 1991, 92, 94, 95, 96, 97 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 <stdio.h>
 #include <stdlib.h>
index 08feb8da6eac838771345df6e573dabd462cc4e2..f792649e6ea2d03f9022181c3bbcb8d67f0d4f34 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1997 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 <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -28,7 +27,7 @@ Cambridge, MA 02139, USA.  */
    It will also give it the default functions unless you set the `seen' flag.
    Returns NULL if a stream can't be created.  */
 FILE *
-DEFUN_VOID(__newstream)
+__newstream (void)
 {
   register FILE *stream;
 
index 90c037600ab7b8cc1a3dd591e6735baca8fb4e9a..f90a9c0a4cbe3966208f1cbabc93c5e531bf23fc 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 <stdio.h>
 
 #undef putchar
@@ -24,7 +23,7 @@ Cambridge, MA 02139, USA.  */
 
 /* Write the character C on stdout.  */
 int
-DEFUN(putchar, (c), int c)
+putchar (int c)
 {
-  return __putc(c, stdout);
+  return __putc (c, stdout);
 }
index 269c607da7fd34a1e03ef301aec9b418cd910e6f..54ecaa385afb0619a0102097af4f4c4a44f832be 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 <stddef.h>
 #include <stdio.h>
 #include <string.h>
@@ -26,7 +25,7 @@ Cambridge, MA 02139, USA.  */
 
 /* Write the string in S and a newline to stdout.  */
 int
-DEFUN(puts, (s), CONST char *s)
+puts (const char *s)
 {
-  return(fputs(s, stdout) || putchar('\n') == EOF ? EOF : 0);
+  return fputs (s, stdout) || putchar ('\n') == EOF ? EOF : 0;
 }
index 038b0164d88a1fb018147590c043c75cd1016c9c..ef0311f8076d34049f172633e6604d565f840c06 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 <stdio.h>
 
 #undef rewind
@@ -25,9 +24,9 @@ Cambridge, MA 02139, USA.  */
 /* Rewind STREAM to the beginning of the
    file and clear its error and EOF flags.  */
 void
-DEFUN(rewind, (stream), FILE *stream)
+rewind (FILE *stream)
 {
-  clearerr(stream);
-  (void) fseek(stream, 0L, SEEK_SET);
-  clearerr(stream);
+  clearerr (stream);
+  (void) fseek (stream, 0L, SEEK_SET);
+  clearerr (stream);
 }
index 99cfa9dd244a284f4feb4fd77027313c8ff58d6e..41946d5de3d1a300def9f0c97f745e3cc517deab 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 <stddef.h>
 #include <stdio.h>
 
@@ -24,7 +23,7 @@ Cambridge, MA 02139, USA.  */
 /* If BUF is NULL, make STREAM unbuffered.
    If not, make BUF, which is BUFSIZ bytes long, be its buffer.  */
 void
-DEFUN(setbuf, (stream, buf), FILE *stream AND char *buf)
+setbuf (FILE *stream, char *buf)
 {
-  (void) setvbuf(stream, buf, buf != NULL ? _IOFBF : _IONBF, BUFSIZ);
+  (void) setvbuf (stream, buf, buf != NULL ? _IOFBF : _IONBF, BUFSIZ);
 }
index 7677c1e358c3356d7044f9d734084c03e31f0a9f..c2ab731f74c74ea4e2186a5238cbeab731f2e8dd 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 <stddef.h>
 #include <stdio.h>
 
@@ -24,7 +23,7 @@ Cambridge, MA 02139, USA.  */
 /* If BUF is NULL, make stream unbuffered.
    If not, make BUF, which is N bytes long, be its buffer.  */
 void
-DEFUN(setbuffer, (stream, buf, n), FILE *stream AND char *buf AND size_t n)
+setbuffer (FILE *stream, char *buf, size_t n)
 {
-  (void) setvbuf(stream, buf, buf != NULL ? _IOFBF : _IONBF, n);
+  (void) setvbuf (stream, buf, buf != NULL ? _IOFBF : _IONBF, n);
 }
index 578cdfa54f6b93a7783119ca9abef8d4b2b7d035..3e4adc6b82ee49cfd75f53b255fe2a2fb0b8b0f5 100644 (file)
@@ -1,28 +1,27 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 <stdio.h>
 
 
 /* Make STREAM line buffered.  */
 void
-DEFUN(setlinebuf, (stream), FILE *stream)
+setlinebuf (FILE *stream)
 {
   if (stream->__buffer != NULL || !stream->__userbuf)
     stream->__linebuf = 1;
index ba7995959474229e6b0f093bcbedd6e073f96456..079bbb30a2de578e838bdf4209bda1a732ea818c 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1993, 1995, 1996, 1997 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 <stddef.h>
 #include <stdio.h>
index 834f5be6d482f70776b1fe8a5e70410c2eeb1763..da2977d379928bb53f217531b3c80ec9fd5d0616 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1993, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1993, 1996, 1997 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 <errno.h>
 #include <stdio.h>
@@ -23,8 +23,8 @@ Cambridge, MA 02139, USA.  */
 /* Push the character C back onto the input stream of STREAM.  */
 int
 ungetc (c, stream)
-     register int c;
-     register FILE *stream;
+     int c;
+     FILE *stream;
 {
   if (!__validfp (stream) || !stream->__mode.__read)
     {
index d2ad6b1da6b047b67bfe8ba0aec43e50df296119..57bacdbb17cb69759f5473ebf1e39d4d3ce99aa9 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1997 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 <stddef.h>
 #include <stdarg.h>
 #include <stdio.h>
@@ -27,17 +26,18 @@ Cambridge, MA 02139, USA.  */
 
 /* Enlarge STREAM's buffer.  */
 static void
-DEFUN(enlarge_buffer, (stream, c),
-      register FILE *stream AND int c)
+enlarge_buffer (stream, c)
+     FILE *stream;
+     int c;
 {
   ptrdiff_t bufp_offset = stream->__bufp - stream->__buffer;
   char *newbuf;
 
   stream->__bufsize += 100;
-  newbuf = (char *) realloc ((PTR) stream->__buffer, stream->__bufsize);
+  newbuf = (char *) realloc ((void *) stream->__buffer, stream->__bufsize);
   if (newbuf == NULL)
     {
-      free ((PTR) stream->__buffer);
+      free ((void *) stream->__buffer);
       stream->__buffer = stream->__bufp
        = stream->__put_limit = stream->__get_limit = NULL;
       stream->__error = 1;
@@ -56,13 +56,15 @@ DEFUN(enlarge_buffer, (stream, c),
 /* Write formatted output from FORMAT to a string which is
    allocated with malloc and stored in *STRING_PTR.  */
 int
-DEFUN(vasprintf, (string_ptr, format, args),
-      char **string_ptr AND CONST char *format AND va_list args)
+vasprintf (string_ptr, format, args)
+     char **string_ptr;
+     const char *format;
+     va_list args;
 {
   FILE f;
   int done;
 
-  memset ((PTR) &f, 0, sizeof (f));
+  memset ((void *) &f, 0, sizeof (f));
   f.__magic = _IOMAGIC;
   f.__bufsize = 100;
   f.__buffer = (char *) malloc (f.__bufsize);
index 52cf690ec2edabddf04ea80dc824f0cf2eb508d6..7fb6f0dba0a667699be276e2cc0a52a866d702b9 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1996, 1997 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 <stdarg.h>
 #include <stdio.h>
index ddb1dfc9c09cf0589f839c111953a5915bfbda0f..278711ab663d5333accae09ff27eb0d5fb028c9c 100644 (file)
@@ -36,7 +36,7 @@ __vsnprintf (char *s, size_t maxlen, const char *format, va_list arg)
   if (maxlen == 0)
     return 0;
 
-  memset((void *) &f, 0, sizeof(f));
+  memset ((void *) &f, 0, sizeof (f));
   f.__magic = _IOMAGIC;
   f.__mode.__write = 1;
   /* The buffer size is one less than MAXLEN
@@ -51,7 +51,7 @@ __vsnprintf (char *s, size_t maxlen, const char *format, va_list arg)
   f.__io_funcs.__write = NULL;
   f.__seen = 1;
 
-  done = vfprintf(&f, format, arg);
+  done = vfprintf (&f, format, arg);
   *f.__bufp = '\0';
 
   return done;
index 82be90f1fa6eece989228c8fc43d888e50f7dea1..856d773196f0605da5d799217556e4826e2b3edc 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1997 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>
 #include <limits.h>
 #include <stdarg.h>
@@ -27,13 +26,15 @@ Cambridge, MA 02139, USA.  */
 /* Write formatted output to S according to the format string
    FORMAT, using the argument list in ARG.  */
 int
-DEFUN(vsprintf, (s, format, arg),
-      char *s AND CONST char *format AND va_list arg)
+vsprintf (s, format, arg)
+     char *s;
+     const char *format;
+     va_list arg;
 {
   int done;
   FILE f;
 
-  memset((PTR) &f, 0, sizeof(f));
+  memset ((void *) &f, 0, sizeof (f));
   f.__magic = _IOMAGIC;
   f.__mode.__write = 1;
   f.__bufp = f.__buffer = (char *) s;
@@ -43,7 +44,7 @@ DEFUN(vsprintf, (s, format, arg),
   f.__room_funcs.__output = NULL;
   f.__seen = 1;
 
-  done = vfprintf(&f, format, arg);
+  done = vfprintf (&f, format, arg);
   *f.__bufp = '\0';
 
   return done;
index 5e538291fac5feb7afcfaac38426daf2346ba9d1..1525e68f48eef91888eac13001f51c716494c5f2 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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) 1991, 1992, 1995, 1996, 1997 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 <errno.h>
 #include <stdarg.h>
index 35c0f0254a47f0b22caf0f4d8e3d8290f52e4b96..b2641e4ba8092b8b0b61b39120493f0494518a7f 100644 (file)
@@ -42,7 +42,7 @@ routines      :=                                                            \
        strtof strtod strtold                                                 \
        system canonicalize                                                   \
        a64l l64a                                                             \
-       rpmatch strfmon getsubopt
+       rpmatch strfmon strfmon_l getsubopt
 
 distribute     := exit.h grouping.h abort-instr.h
 tests          := tst-strtol tst-strtod testmb testrand testsort testdiv \
index 69e018bbfceed3ebdf815953572085b0b0f26926..15c84a7fcafc55a0f5ce084d0d9e171042a666f1 100644 (file)
@@ -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>, 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 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.  */
+/* Copyright (C) 1995, 1996, 1997 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 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 <stdlib.h>
 
index 3b774863e98ecc0b920f5cbf265244f99afd680e..27d6b5c55f22d9bde2cc243faa1e470a0a71ff2f 100644 (file)
@@ -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>, August 1995.
+/* Copyright (C) 1995, 1996, 1997 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.  */
 
 #include <errno.h>
 #include <math.h>
index a323d3deab025684d7d5e6f2a32215526217f72c..345fca3f5ace6004ef57e583d01ceb93895c4b86 100644 (file)
@@ -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>, 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 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.  */
+/* Copyright (C) 1995, 1996, 1997 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 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 <stdlib.h>
 
index 17caae573cfb399c12ada07759f0d58b6917e3d4..a2a0f58c1415391a7dcebaabc194e22390fa4a8d 100644 (file)
@@ -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.
-
-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.  */
+/* Copyright (C) 1995, 1997 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 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 <stdlib.h>
 #include <limits.h>
index 83d20b745153545709ab1d746c36bdf30ba06b14..27120aeaa1e81ff4627cc12703fab6fb6f3e96ac 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1996, 1997 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.  */
 
 #ifndef        _EXIT_H
 
index c8f3f4dcb78a2b5b48eb2b8fffeaaade98dfd533..17edea57e6573ce0611b0143c1a38e7e9ce55130 100644 (file)
@@ -1,5 +1,5 @@
 /* Header file for monetary value formatting functions.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997 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
@@ -31,6 +31,14 @@ __BEGIN_DECLS
 extern ssize_t strfmon __P ((char *__s, size_t __maxsize,
                             __const char *__format, ...));
 
+#ifdef __USE_GNU
+# include <xlocale.h>
+
+/* Formatting a monetary value according to the current locale.  */
+extern ssize_t __strfmon_l __P ((char *__s, size_t __maxsize, __locale_t loc,
+                                __const char *__format, ...));
+#endif
+
 __END_DECLS
 
 #endif /* monetary.h */
index 469908c1df813f373aaebe5078e397b8e9420be0..54771049ad25de2c5e8b804d4db9824db1540e9a 100644 (file)
@@ -1,5 +1,5 @@
 /* Formatting a monetary value according to the current locale.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997 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.
 
 #define to_digit(Ch) ((Ch) - '0')
 
+
+/* We use this code also for the extended locale handling where the
+   function gets as an additional argument the locale which has to be
+   used.  To access the values we have to redefine the _NL_CURRENT
+   macro.  */
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# undef _NL_CURRENT
+# define _NL_CURRENT(category, item) \
+  (current->values[_NL_ITEM_INDEX (item)].string)
+#endif
+
 extern int __printf_fp (FILE *, const struct printf_info *,
                        const void **const);
 /* This function determines the number of digit groups in the output.
@@ -63,14 +74,22 @@ extern unsigned int __guess_grouping (unsigned int intdig_max,
 
 
 /* We have to overcome some problems with this implementation.  On the
-   one hand the strfmon() function is specified by in XPG4 and of
-   course it has to follow this.  But on the other hand POSIX.2
-   specifies some information in the LC_MONETARY category which should
-   be used, too.  Some of the information contradicts the information
-   which can be specified in format string.  */
+   one hand the strfmon() function is specified in XPG4 and of course
+   it has to follow this.  But on the other hand POSIX.2 specifies
+   some information in the LC_MONETARY category which should be used,
+   too.  Some of the information contradicts the information which can
+   be specified in format string.  */
+#ifndef USE_IN_EXTENDED_LOCALE_MODEL
 ssize_t
 strfmon (char *s, size_t maxsize, const char *format, ...)
+#else
+ssize_t
+__strfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format, ...)
+#endif
 {
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL
+  struct locale_data *current = loc->__locales[LC_MONETARY];
+#endif
 #ifdef USE_IN_LIBIO
   _IO_strfile f;
 #else
diff --git a/stdlib/strfmon_l.c b/stdlib/strfmon_l.c
new file mode 100644 (file)
index 0000000..e4bc242
--- /dev/null
@@ -0,0 +1,22 @@
+/* Formatting a monetary value according to the given locale.
+   Copyright (C) 1996, 1997 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.  */
+
+#define USE_IN_EXTENDED_LOCALE_MODEL   1
+#include <strfmon.c>
index 5a9510bf52362b6bc041c392e8394b1793331a9b..259611c3a22c1b237d844a6a2fe55135773b42a9 100644 (file)
@@ -1,21 +1,21 @@
-/* strtoq -- Function to parse a `long long int' from text.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Function to parse a `long long int' from text.
+   Copyright (C) 1995, 1996, 1997 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.  */
 
 #define        QUAD    1
 
index 386cc7a3578e77ef6b44553e37299c15e8bfbab6..f1e0e166670649f19d1030576bd743bd4297dee0 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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.  */
 
 #define        UNSIGNED        1
 
index 790072197954a6110b2684096acee7ccb1ad0831..68f293610ad0abb78f09046c7165212917a5b98e 100644 (file)
@@ -1,21 +1,21 @@
-/* strtouq -- Function to parse an `unsigned long long int' from text.
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Function to parse an `unsigned long long int' from text.
+   Copyright (C) 1995, 1996, 1997 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.  */
 
 #define        QUAD    1
 
index 52a04ca88fd32a3b9c5f071c50976df11289e81b..ffd6fa99d4ca53ac7d2c480fce36e9692efb9811 100644 (file)
@@ -1,22 +1,22 @@
 /* Test program for returning the canonical absolute name of a given file.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by David Mosberger <davidm@azstarnet.com>.
-
-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) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David Mosberger <davidm@azstarnet.com>.
+
+   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 file must be run from within a directory called "stdlib".  */
 
index b86a58d42c29012725883b06224b9e9b1b970c72..e927ad431a70e466f67e4739630c414ab7f304ca 100644 (file)
@@ -1,27 +1,26 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1997 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 <stdlib.h>
 #include <stdio.h>
 
 int
-DEFUN_VOID(main)
+main ()
 {
   int i, j;
   while (scanf ("%d %d\n", &i, &j) == 2)
index b31082eda918d69324716f01fcda423813e980ae..05835b2ba876d9fcc935949e6a2012451b9305d3 100644 (file)
@@ -1,27 +1,26 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1997 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 <stdlib.h>
 #include <stdio.h>
 
 int
-DEFUN_VOID(main)
+main ()
 {
   int i1, i2;
   int j1, j2;
index 97f2eedd7920964983c8dcf801209b2819703f9d..8f35f207f68404aeafccb12537f3721c00242947 100644 (file)
@@ -37,7 +37,8 @@ routines      := strcat strchr strcmp strcoll strcpy strcspn          \
                   $(addprefix argz-,append count create ctsep next     \
                                     delete extract insert stringify    \
                                     addsep)                            \
-                  envz basename
+                  envz basename                                        \
+                  strcoll_l strxfrm_l
 
 tests          := tester testcopy test-ffs tst-strlen stratcliff
 distribute     := memcopy.h pagecopy.h
index e61e3acf587ba82c376a40e54f5a3f8680a115eb..6dd47e77097a113f7c1eaa240c835fd52297de07 100644 (file)
@@ -1,22 +1,22 @@
 /* Routines for dealing with '\0' separated arg vectors.
-
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, 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.
 
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
+   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
-   General Public License for more details.
+   Library General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; 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 <argz.h>
 #include <string.h>
index a10119b722ec8919b92031dd9b93eb290b9ef8f3..1bc197a73310d637e03ff33c947e642471be36ea 100644 (file)
@@ -1,22 +1,22 @@
 /* Routines for dealing with '\0' separated arg vectors.
-
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, 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.
 
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
+   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
-   General Public License for more details.
+   Library General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; 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 <argz.h>
 #include <string.h>
index 2be16b03e7646b7334d051b73070f2be539fe7ab..1f70cfa2c2c12d42fbddd004e374dbba9a656083 100644 (file)
@@ -1,22 +1,22 @@
 /* Routines for dealing with '\0' separated arg vectors.
-
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, 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.
 
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
+   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
-   General Public License for more details.
+   Library General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; 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 <argz.h>
 #include <stdlib.h>
@@ -40,7 +40,7 @@ __argz_create (char *const argv[], char **argz, size_t *len)
     *argz = NULL;
   else
     {
-      *argz = malloc(tlen);
+      *argz = malloc (tlen);
       if (*argz == NULL)
        return ENOMEM;
 
index 584270a42f910f4853b73cf943c12c2594dae325..a556656a9cbe2177621876651aa9e6768d2193ba 100644 (file)
@@ -1,22 +1,22 @@
 /* Routines for dealing with '\0' separated arg vectors.
-
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, 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.
 
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
+   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
-   General Public License for more details.
+   Library General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; 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 <argz.h>
 #include <string.h>
index 99f6cdf97af09a21fc1ecf2c37b4f54680c5532b..ed3a26604d8c6e832eef7f0101fe555f1350c840 100644 (file)
@@ -1,22 +1,22 @@
 /* Routines for dealing with '\0' separated arg vectors.
-
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, 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.
 
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
+   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
-   General Public License for more details.
+   Library General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; 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 <argz.h>
 
@@ -27,7 +27,7 @@ __argz_extract (char *argz, size_t len, char **argv)
 {
   while (len > 0)
     {
-      size_t part_len = strlen(argz);
+      size_t part_len = strlen (argz);
       *argv++ = argz;
       argz += part_len + 1;
       len -= part_len + 1;
index 3905728f2a3d174237fcfe73b0a4f978b669bda7..d790bb5fda69a448ce15e3a3286f863721698e8d 100644 (file)
@@ -1,22 +1,22 @@
 /* Routines for dealing with '\0' separated arg vectors.
-
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, 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.
 
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
+   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
-   General Public License for more details.
+   Library General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; 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 <argz.h>
 #include <string.h>
index 416b9823063189a5cbfcdd8cf7ba42c3cb2a5980..46d393444e26b5ad7fb6a765c87681eea8dac114 100644 (file)
@@ -1,21 +1,22 @@
 /* Iterate through the elements of an argz block.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, 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.
 
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
+   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
-   General Public License for more details.
+   Library General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; 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 <argz.h>
 #include <string.h>
index c7a109c0fbc7a20354b18b2924159e3aba4cf1e1..cd57b98d42a8d7bc458b6bc05c4bf9817ac832cb 100644 (file)
@@ -1,22 +1,22 @@
 /* Routines for dealing with '\0' separated arg vectors.
-
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, 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.
 
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
+   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
-   General Public License for more details.
+   Library General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; 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 <argz.h>
 #include <string.h>
 /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
    except the last into the character SEP.  */
 void
-__argz_stringify(char *argz, size_t len, int sep)
+__argz_stringify (char *argz, size_t len, int sep)
 {
   while (len > 0)
     {
-      size_t part_len = strlen(argz);
+      size_t part_len = strlen (argz);
       argz += part_len;
       len -= part_len + 1;
       if (len > 0)
index 57a59542ca585e0b8f68166d035d5003f2252243..4f06843aebd8e000efd08d4db8e1e1db87321286 100644 (file)
@@ -1,21 +1,21 @@
-/* basename -- return the name-within-directory of a file name.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Return the name-within-directory of a file name.
+   Copyright (C) 1996, 1997 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>
 
index f00fe24d3185a485d3af129be2869213ea73df7c..535f42e8647b57ff58d51999ef8dbf414359eb44 100644 (file)
@@ -1,22 +1,22 @@
 /* Routines for dealing with '\0' separated environment vectors
-
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, 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.
 
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
+   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
-   General Public License for more details.
+   Library General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; 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 <malloc.h>
 #include <string.h>
index cf3422bdc761d7513677c2d938f3808a77560753..690c53f77d6ccf3e03eb5ccba7b9f58682e6da59 100644 (file)
@@ -1,29 +1,29 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1997 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>
 
-PTR
-DEFUN(memfrob, (s, n),
-      PTR s AND size_t n)
+void *
+memfrob (s, n)
+     void *s;
+     size_t n;
 {
-  register char *p = (char *) s;
+  char *p = (char *) s;
 
   while (n-- > 0)
     *p++ ^= 42;
index fa1025e0d7652e4e604a6abc902a4fdc2fcb1fab..e58b74cf514ff5618312b126121a85e19ea946fc 100644 (file)
@@ -1,22 +1,23 @@
-/* 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.
-
-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.  */
-
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   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 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 <endian.h>
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
@@ -24,7 +25,11 @@ Boston, MA 02111-1307, USA.  */
 #ifndef STRING_TYPE
 # define STRING_TYPE char
 # define USTRING_TYPE unsigned char
-# define STRCOLL strcoll
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+#  define STRCOLL __strcoll_l
+# else
+#  define STRCOLL strcoll
+# endif
 # define STRCMP strcmp
 #endif
 
@@ -36,11 +41,35 @@ Boston, MA 02111-1307, USA.  */
 /* Compare S1 and S2, returning less than, equal to or
    greater than zero if the collated form of S1 is lexicographically
    less than, equal to or greater than the collated form of S2.  */
+#ifndef USE_IN_EXTENDED_LOCALE_MODEL
 int
 STRCOLL (s1, s2)
      const STRING_TYPE *s1;
      const STRING_TYPE *s2;
+#else
+int
+STRCOLL (s1, s2, l)
+     const STRING_TYPE *s1;
+     const STRING_TYPE *s2;
+     __locale_t l;
+#endif
 {
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL
+  struct locale_data *current = l->__locales[LC_COLLATE];
+# if BYTE_ORDER == BIG_ENDIAN
+  const u_int32_t *collate_table = (const u_int32_t *)
+    current->values[_NL_ITEM_INDEX (_NL_COLLATE_TABLE_EB)].string;
+  const u_int32_t *collate_extra = (const u_int32_t *)
+    current->values[_NL_ITEM_INDEX (_NL_COLLATE_EXTRA_EB)].string;
+# elif BYTE_ORDER == LITTLE_ENDIAN
+  const u_int32_t *collate_table = (const u_int32_t *)
+    current->values[_NL_ITEM_INDEX (_NL_COLLATE_TABLE_EL)].string;
+  const u_int32_t *collate_extra = (const u_int32_t *)
+    current->values[_NL_ITEM_INDEX (_NL_COLLATE_EXTRA_EL)].string;
+# else
+#  error bizarre byte order
+# endif
+#endif
   weight_t *s1forw = NULL;
   weight_t *s1backw = NULL;
   weight_t *s2forw = NULL;
diff --git a/string/strcoll_l.c b/string/strcoll_l.c
new file mode 100644 (file)
index 0000000..57e8393
--- /dev/null
@@ -0,0 +1,21 @@
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   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 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.  */
+
+#define USE_IN_EXTENDED_LOCALE_MODEL 1
+#include <strcoll.c>
index ef883eecdd6794cd9c0838651bfc184923cbe2c4..257f428eade34244f6ac9e12c4f00b7fd5876837 100644 (file)
@@ -1,25 +1,36 @@
-/* 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 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 <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
+/* Copyright (C) 1991, 1996, 1997 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.  */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#if defined _LIBC || defined  STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#else
+char *malloc ();
+char *strcpy ();
+#endif
+
+#ifndef weak_alias
+# define __strdup strdup
+#endif
 
 /* Duplicate S, returning an identical malloc'd string.  */
 char *
@@ -33,4 +44,6 @@ __strdup (const char *s)
 
   return (char *) memcpy (new, s, len);
 }
+#ifdef weak_alias
 weak_alias (__strdup, strdup)
+#endif
index 12b3a2036de69eddedab5d3da602b8fdac819013..865007ff99682e5c74d471d358bfa70f7faa8e80 100644 (file)
@@ -83,6 +83,20 @@ extern int strcoll __P ((__const char *__s1, __const char *__s2));
 /* Put a transformation of SRC into no more than N bytes of DEST.  */
 extern size_t strxfrm __P ((char *__dest, __const char *__src, size_t __n));
 
+#ifdef __USE_GNU
+/* The following functions are equivalent to the both above but they
+   take the locale they use for the collation as an extra argument.
+   This is not standardsized but something like will come.  */
+# include <xlocale.h>
+
+/* Compare the collated forms of S1 and S2 using rules from L.  */
+extern int __strcoll_l __P ((__const char *__s1, __const char *__s2,
+                            __locale_t __l));
+/* Put a transformation of SRC into no more than N bytes of DEST.  */
+extern size_t __strxfrm_l __P ((char *__dest, __const char *__src, size_t __n,
+                               __locale_t __l));
+#endif
+
 #if defined(__USE_SVID) || defined(__USE_BSD) || defined(__USE_XOPEN_EXTENDED)
 /* Duplicate S, returning an identical malloc'd string.  */
 extern char *__strdup __P ((__const char *__s));
index 72635bb97cf1e9a5ac0cb7327e15f1a14eb9bb51..6bcfa9a4456b43af36abad08a9817ac02537e743 100644 (file)
@@ -1,25 +1,38 @@
-/* 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., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
+/* Copyright (C) 1996, 1997 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+
+#if defined _LIBC || defined STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#else
+char *malloc ();
+#endif
+
+#ifndef weak_alias
+# define __strndup strndup
+#endif
 
 char *
 __strndup (const char *s, size_t n)
@@ -33,4 +46,6 @@ __strndup (const char *s, size_t n)
   new[len] = '\0';
   return memcpy (new, s, len);
 }
+#ifdef weak_alias
 weak_alias (__strndup, strndup)
+#endif
index eb01a63692b284adad41c5e8daed8b51dcf73710..ab95d17096fc66638e9067c80871430ada7fe601 100644 (file)
@@ -1,21 +1,21 @@
 /* Find the length of STRING, but scan at most MAXLEN characters.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1996, 1997 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>
 
index a700a9f8040a58610f576bfa084e50364ddc4e2f..69629b785528faddb15237b6fb98eac649bb0759 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 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 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) 1991, 1994, 1995, 1996, 1997 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 <signal.h>
 #include <stdio.h>
index 820ad9394707b1367e4e2884920d34f228d54058..e22738667ce0151a351f48160d78835afec36cb3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
 # define STRING_TYPE char
 # define USTRING_TYPE unsigned char
 # define L_(Ch) Ch
-# define STRXFRM strxfrm
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+#  define STRXFRM __strxfrm_l
+# else
+#  define STRXFRM strxfrm
+# endif
 # define STRLEN strlen
 # define STPNCPY __stpncpy
 #endif
@@ -141,9 +145,30 @@ print_val (u_int32_t value, wchar_t *dest, size_t max, size_t act)
    the same as the result of strcoll on the two strings before
    their transformation.  The transformed string is put in at
    most N characters of DEST and its length is returned.  */
+#ifndef USE_IN_EXTENDED_LOCALE_MODEL
 size_t
 STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n)
+#else
+size_t
+STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l)
+#endif
 {
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL
+  struct locale_data *current = l->__locales[LC_COLLATE];
+# if BYTE_ORDER == BIG_ENDIAN
+  const u_int32_t *collate_table = (const u_int32_t *)
+    current->values[_NL_ITEM_INDEX (_NL_COLLATE_TABLE_EB)].string;
+  const u_int32_t *collate_extra = (const u_int32_t *)
+    current->values[_NL_ITEM_INDEX (_NL_COLLATE_EXTRA_EB)].string;
+# elif BYTE_ORDER == LITTLE_ENDIAN
+  const u_int32_t *collate_table = (const u_int32_t *)
+    current->values[_NL_ITEM_INDEX (_NL_COLLATE_TABLE_EL)].string;
+  const u_int32_t *collate_extra = (const u_int32_t *)
+    current->values[_NL_ITEM_INDEX (_NL_COLLATE_EXTRA_EL)].string;
+# else
+#  error bizarre byte order
+# endif
+#endif
   weight_t *forw = NULL;
   weight_t *backw = NULL;
   size_t pass;
diff --git a/string/strxfrm_l.c b/string/strxfrm_l.c
new file mode 100644 (file)
index 0000000..f91da59
--- /dev/null
@@ -0,0 +1,21 @@
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   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 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.  */
+
+#define USE_IN_EXTENDED_LOCALE_MODEL   1
+#include <strxfrm.c>
index ef401715510e40f9711ffe9bd490dec515020afc..f691d7f22dbad4eee09579e634e1d05b4210c308 100644 (file)
@@ -1,32 +1,31 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 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 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., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
-
-#include <ansidecl.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 
 int
-DEFUN(main, (argc, argv),
-      int argc AND char **argv)
+main (argc, argv)
+     int argc;
+     char **argv;
 {
   int failures = 0;
   int i;
index 9ec5c7761cea984b15994d60f34237de6118bcee..b1c491e62c2d4c6b8418f4986d3f3c674fa89200 100644 (file)
@@ -1,32 +1,31 @@
-/* Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1990, 1991, 1992, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
    Contributed by Torbjorn Granlund (tege@sics.se).
 
-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., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
-
-#include <ansidecl.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <malloc.h>
 
 int
-DEFUN(main, (argc, argv),
-      int argc AND char **argv)
+main (argc, argv)
+     int argc;
+     char **argv;
 {
   char *mem, *memp;
   char *rand_mem;
index b735e15ae38a3bff73a751eb81e6921dc16de5a3..316f717e0105f23095fffaf45f853816b9f3b9a8 100644 (file)
@@ -324,7 +324,8 @@ elf_alpha_fix_plt(struct link_map *l,
 static inline void
 elf_machine_rela (struct link_map *map,
                  const Elf64_Rela *reloc,
-                 const Elf64_Sym *sym)
+                 const Elf64_Sym *sym,
+                 const hash_name_pair *version)
 {
   Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
   unsigned long const r_info = ELF64_R_TYPE (reloc->r_info);
@@ -355,7 +356,7 @@ elf_machine_rela (struct link_map *map,
     {
       Elf64_Addr loadbase, sym_value;
 
-      loadbase = RESOLVE (&sym,
+      loadbase = RESOLVE (&sym, version,
                          r_info == R_ALPHA_JMP_SLOT ? DL_LOOKUP_NOPLT : 0);
       sym_value = sym ? loadbase + sym->st_value : 0;
 
index 09cb857506e89b293f296867bd8957c3c0efdbc1..7b471787f418f8ce073dc5b68103f8bf42b9b838 100644 (file)
@@ -28,7 +28,7 @@ extern void *_dl_sysdep_read_whole_file (const char *filename,
                                         int mmap_prot);
 
 #ifndef LD_SO_CACHE
-#define LD_SO_CACHE "/etc/ld.so.cache"
+# define LD_SO_CACHE "/etc/ld.so.cache"
 #endif
 
 #define CACHEMAGIC "ld.so-1.7.0"
index b7530a8437e248d849fe23ce7074b107a7e1b1f0..b4c8e0001709ac7e4b1f2fea091bbb89ee855515 100644 (file)
@@ -1,21 +1,21 @@
 /* Define and initialize the `__libc_enable_secure' flag.  Generic version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1996, 1997 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.  */
 
 /* This file is used in the static libc.  For the shared library,
    dl-sysdep.c defines and initializes __libc_enable_secure.  */
@@ -26,7 +26,8 @@ Cambridge, MA 02139, USA.  */
 /* Safest assumption, if somehow the initializer isn't run.  */
 int __libc_enable_secure = 1;
 
-static void __attribute__ ((unused, constructor))
+static void
+__attribute__ ((unused, constructor))
 init_secure (void)
 {
   __libc_enable_secure = (__geteuid () != __getuid () ||
index 262b8aae4c175a8ffefb4712cf2300b19f521998..bc0e8533e262c866bac4e257309c98cf81248d36 100644 (file)
@@ -1,21 +1,21 @@
 /* memcopy.h -- definitions for memory copy functions.  Generic C version.
-   Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1993, 1997 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.  */
 
 /* The strategy of the memory functions is:
 
index c821e9541930bbfbcd049fafa568bee915c3cd79..8303f6e5fce1972e415b82e4c5e13bc234fe2974 100644 (file)
@@ -1,34 +1,46 @@
-/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1995, 1996, 1997 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.  */
 
 /* This is almost copied from strncpy.c, written by Torbjorn Granlund.  */
 
-#include <ansidecl.h>
-#include <string.h>
-#include <memcopy.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
+#ifdef _LIBC
+# include <string.h>
+#else
+# include <sys/types.h>
+#endif
+
+#ifndef weak_alias
+# define __stpncpy stpncpy
+#endif
 
 /* Copy no more than N characters of SRC to DEST, returning the address of
    the terminating '\0' in DEST, if any, or else DEST + N.  */
 char *
-DEFUN(__stpncpy, (dest, src, n), char *dest AND CONST char *src AND size_t n)
+__stpncpy (dest, src, n)
+     char *dest;
+     const char *src;
+     size_t n;
 {
-  reg_char c;
+  char c;
   char *s = dest;
 
   if (n >= 4)
@@ -82,5 +94,6 @@ DEFUN(__stpncpy, (dest, src, n), char *dest AND CONST char *src AND size_t n)
 
   return dest - 1;
 }
-
+#ifdef weak_alias
 weak_alias (__stpncpy, stpncpy)
+#endif
index 7fe63d3340ac12685128c493957b8ef1bedf032c..cca51f3dc9fd1d604c790670f447342b097b9b6d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <ctype.h>
+#include <string.h>
+
+#ifndef weak_alias
+# define __strcasecmp strcasecmp
+#endif
 
 /* Compare S1 and S2, ignoring case, returning less than, equal to or
    greater than zero if S1 is lexicographically less than,
    equal to or greater than S2.  */
 int
-__strcasecmp (const char *s1, const char *s2)
+__strcasecmp (s1, s2)
+     const char *s1;
+     const char *s2;
 {
-  register const unsigned char *p1 = (const unsigned char *) s1;
-  register const unsigned char *p2 = (const unsigned char *) s2;
+  const unsigned char *p1 = (const unsigned char *) s1;
+  const unsigned char *p2 = (const unsigned char *) s2;
   unsigned char c1, c2;
 
   if (p1 == p2)
@@ -43,4 +53,6 @@ __strcasecmp (const char *s1, const char *s2)
 
   return c1 - c2;
 }
+#ifdef weak_alias
 weak_alias (__strcasecmp, strcasecmp)
+#endif
index b4b553697133717d8e0296d1a55c05c3d13b8866..05abd01eff6c19fbc41f1deb700c1441c5b79c43 100644 (file)
@@ -1,31 +1,32 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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>
 
 /* Append SRC on the end of DEST.  */
 char *
-DEFUN(strcat, (dest, src), char *dest AND CONST char *src)
+strcat (dest, src)
+     char *dest;
+     const char *src;
 {
-  register char *s1 = dest;
-  register CONST char *s2 = src;
+  char *s1 = dest;
+  const char *s2 = src;
   reg_char c;
 
   /* Find the end of the string.  */
index 11c7bdff640ecab9d84b41324c70cbfa0f429290..d9e58a85a77257d5d1b0b4d09a6f662ea12b8d81 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 93, 94, 95, 96, 97 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);
    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 occurrence of C in S.  */
 
 char *
-DEFUN(strchr, (s, c), CONST char *s AND int c)
+strchr (s, c)
+     const char *s;
+     int c;
 {
-  CONST unsigned char *char_ptr;
-  CONST unsigned long int *longword_ptr;
+  const unsigned char *char_ptr;
+  const unsigned long int *longword_ptr;
   unsigned long int longword, magic_bits, charmask;
 
   c = (unsigned char) c;
@@ -41,7 +42,7 @@ DEFUN(strchr, (s, c), CONST char *s AND int c)
                      & (sizeof (longword) - 1)) != 0;
        ++char_ptr)
     if (*char_ptr == c)
-      return (PTR) char_ptr;
+      return (void *) char_ptr;
     else if (*char_ptr == '\0')
       return NULL;
 
@@ -134,7 +135,7 @@ DEFUN(strchr, (s, c), CONST char *s AND int c)
          /* Which of the bytes was C or zero?
             If none of them were, it was a misfire; continue the search.  */
 
-         CONST unsigned char *cp = (CONST unsigned char *) (longword_ptr - 1);
+         const unsigned char *cp = (const unsigned char *) (longword_ptr - 1);
 
          if (*cp == c)
            return (char *) cp;
index 0a7c2a88f73f8101d713346a147ba6d156055360..fc6beb27fd9eb8361f5e08b02529cdbd3b51e8be 100644 (file)
@@ -1,33 +1,34 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 <stddef.h>
 #include <string.h>
 #include <memcopy.h>
 
 /* Copy SRC to DEST.  */
 char *
-DEFUN(strcpy, (dest, src), char *dest AND CONST char *src)
+strcpy (dest, src)
+     char *dest;
+     const char *src;
 {
   reg_char c;
   char *s = (char *) src;
-  CONST ptrdiff_t off = dest - src - 1;
+  const ptrdiff_t off = dest - src - 1;
 
   do
     {
@@ -38,4 +39,3 @@ DEFUN(strcpy, (dest, src), char *dest AND CONST char *src)
 
   return dest;
 }
-
index 0cacfffd31431b2a11293d479b14044237f67d85..d7d59b250b209f8264effd460b3d2edbeb0b468d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1996, 1997 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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include <string.h>
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined _LIBC || HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+# ifndef strchr
+#  define strchr index
+# endif
+#endif
 
 /* Return the length of the maximum initial segment of S
    which contains no characters from REJECT.  */
 size_t
 strcspn (s, reject)
-     register const char *s;
-     register const char *reject;
+     const char *s;
+     const char *reject;
 {
-  register size_t count = 0;
+  size_t count = 0;
 
   while (*s != '\0')
     if (strchr (reject, *s++) == NULL)
index 5e8d360c9ac84983852242d8da92b30d451955dc..37dc9ed20c400f81d19d505b3bdf127de40f2f73 100644 (file)
@@ -1,24 +1,23 @@
-/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1997 Free Software Foundation, Inc.
    Written by Torbjorn Granlund (tege@sics.se),
    with help from Dan Sahlin (dan@sics.se);
    commentary by Jim Blandy (jimb@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>
 
 
@@ -26,10 +25,11 @@ Cambridge, MA 02139, USA.  */
    the null terminator quickly by testing four bytes at a time.  */
 
 size_t
-DEFUN(strlen, (str), CONST char *str)
+strlen (str)
+     const char *str;
 {
-  CONST char *char_ptr;
-  CONST unsigned long int *longword_ptr;
+  const char *char_ptr;
+  const unsigned long int *longword_ptr;
   unsigned long int longword, magic_bits, himagic, lomagic;
 
   /* Handle the first few characters by reading one character at a time.
@@ -48,9 +48,9 @@ DEFUN(strlen, (str), CONST char *str)
   /* 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.  */
@@ -123,7 +123,7 @@ DEFUN(strlen, (str), CONST char *str)
          /* Which of the bytes was the zero?  If none of them were, it was
             a misfire; continue the search.  */
 
-         CONST char *cp = (CONST char *) (longword_ptr - 1);
+         const char *cp = (const char *) (longword_ptr - 1);
 
          if (cp[0] == 0)
            return cp - str;
index ffc50ff50f0a0a4e81b42191472bacf294593786..b0b1044777fa4f43d5f49d4502b8bf237f53f825 100644 (file)
@@ -1,35 +1,42 @@
-/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Compare at most N characters of two strings without taking care for
+   the case.
+   Copyright (C) 1992, 1996, 1997 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.  */
 
-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>
 #include <string.h>
 #include <ctype.h>
 
+#ifndef weak_alias
+# define __strncasecmp strncasecmp
+#endif
+
 /* Compare no more than N characters of S1 and S2,
    ignoring case, returning less than, equal to or
    greater than zero if S1 is lexicographically less
    than, equal to or greater than S2.  */
 int
-DEFUN(__strncasecmp, (s1, s2, n),
-      CONST char *s1 AND CONST char *s2 AND size_t n)
+__strncasecmp (s1, s2, n)
+     const char *s1;
+     const char *s2;
+     size_t n;
 {
-  register CONST unsigned char *p1 = (CONST unsigned char *) s1;
-  register CONST unsigned char *p2 = (CONST unsigned char *) s2;
+  const unsigned char *p1 = (const unsigned char *) s1;
+  const unsigned char *p2 = (const unsigned char *) s2;
   unsigned char c1, c2;
 
   if (p1 == p2 || n == 0)
@@ -45,4 +52,6 @@ DEFUN(__strncasecmp, (s1, s2, n),
 
   return c1 - c2;
 }
+#ifdef weak_alias
 weak_alias (__strncasecmp, strncasecmp)
+#endif
index 09463b36b845d1eb53650171219134810ae7b309..1233f8b54becbbf76b5f9ee279219bbe8bfbc4d4 100644 (file)
@@ -1,27 +1,34 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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>
+
+#ifdef _LIBC
+# include <memcopy.h>
+#else
+typedef char reg_char;
+#endif
 
 char *
-DEFUN(strncat, (s1, s2, n), char *s1 AND CONST char *s2 AND size_t n)
+strncat (s1, s2, n)
+     char *s1;
+     const char *s2;
+     size_t n;
 {
   reg_char c;
   char *s = s1;
index 460e0baca496a349977b6c7365b81a6260a96107..06f5cec2ed54fbd692358dbfbe2bc2b21f508be7 100644 (file)
@@ -1,27 +1,30 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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>
 
+
 char *
-DEFUN(strncpy, (s1, s2, n), char *s1 AND CONST char *s2 AND size_t n)
+strncpy (s1, s2, n)
+     char *s1;
+     const char *s2;
+     size_t n;
 {
   reg_char c;
   char *s = s1;
index 75b2ed1440c7e1be7ba4ae8f5f22474cd9973dea..3b533e1b87aa8a290c01b2ea2755464545fcb0d4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1996, 1997 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
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include <string.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
+#if defined _LIBC || defined HAVE_CONFIG_H
+# include <string.h>
+#endif
 
 /* Find the first occurrence in S of any character in ACCEPT.  */
 char *
index 15c5891044d69bdc18f42e02bc76237f42458eef..d17e53a77283a058f8b177ffbbf11782d5681fe1 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1992, 1993, 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.  */
+/* Copyright (C) 1992, 1993, 1996, 1997 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 <string.h>
 
index 89b45ad300ca266eb2f6976b773542d805c2e06c..9d2fe63848b1dfc42ac1be1f450c0552f7705dfd 100644 (file)
@@ -1,33 +1,34 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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>
 
 
 /* Return the length of the maximum initial segment
    of S which contains only characters in ACCEPT.  */
 size_t
-DEFUN(strspn, (s, accept), CONST char *s AND CONST char *accept)
+strspn (s, accept)
+     const char *s;
+     const char *accept;
 {
-  register CONST char *p;
-  register CONST char *a;
-  register size_t count = 0;
+  const char *p;
+  const char *a;
+  size_t count = 0;
 
   for (p = s; *p != '\0'; ++p)
     {
index d8d0b84813b6cd70e1ecc16606982f15d93f104b..85774d3491b5f13bada99bc0298b9689ab8c2277 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+/* Return the offset of one string within another.
+   Copyright (C) 1994, 1996, 1997 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
  *
  * Stephen R. van den Berg, berg@pool.informatik.rwth-aachen.de        */
 
-#include <string.h>
-#include <sys/types.h>
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined _LIBC || defined HAVE_STRING_H
+# include <string.h>
+#endif
 
 typedef unsigned chartype;
 
index 1e96fec01f6908e565d56e6b72260138b99895cf..5eb0ee6f0775d5981f8e96e5a0c917348ac7cf26 100644 (file)
@@ -1,20 +1,20 @@
-/* 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 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.  */
+/* Copyright (C) 1991, 1996, 1997 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 <string.h>
 
index fb68ad8c98678c5b42b94012e370599eab22f247..3b7d202a6c16f64fef8c0f3074b9b899df9963ed 100644 (file)
@@ -1,21 +1,21 @@
 /* Reentrant string tokenizer.  Generic version.
-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 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.  */
+   Copyright (C) 1991, 1996, 1997 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 <string.h>
 
index 9af800cd48e3325a23ec222beeaf7180ccae2097..570e0d906634fd124bc4438ccf287371442e15d5 100644 (file)
@@ -203,8 +203,8 @@ _dl_start_user:\n\
    MAP is the object containing the reloc.  */
 
 static inline void
-elf_machine_rel (struct link_map *map,
-                const Elf32_Rel *reloc, const Elf32_Sym *sym)
+elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
+                const Elf32_Sym *sym, const hash_name_pair *version)
 {
   Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
   Elf32_Addr loadbase;
@@ -212,15 +212,15 @@ elf_machine_rel (struct link_map *map,
   switch (ELF32_R_TYPE (reloc->r_info))
     {
     case R_386_COPY:
-      loadbase = RESOLVE (&sym, DL_LOOKUP_NOEXEC);
+      loadbase = RESOLVE (&sym, version, DL_LOOKUP_NOEXEC);
       memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size);
       break;
     case R_386_GLOB_DAT:
-      loadbase = RESOLVE (&sym, 0);
+      loadbase = RESOLVE (&sym, version, 0);
       *reloc_addr = sym ? (loadbase + sym->st_value) : 0;
       break;
     case R_386_JMP_SLOT:
-      loadbase = RESOLVE (&sym, DL_LOOKUP_NOPLT);
+      loadbase = RESOLVE (&sym, version, DL_LOOKUP_NOPLT);
       *reloc_addr = sym ? (loadbase + sym->st_value) : 0;
       break;
     case R_386_32:
@@ -241,7 +241,7 @@ elf_machine_rel (struct link_map *map,
             built-in definitions used while loading those libraries.  */
          undo = map->l_addr + sym->st_value;
 #endif
-       loadbase = RESOLVE (&sym, 0);
+       loadbase = RESOLVE (&sym, version, 0);
        *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo;
        break;
       }
@@ -252,7 +252,7 @@ elf_machine_rel (struct link_map *map,
        *reloc_addr += map->l_addr;
       break;
     case R_386_PC32:
-      loadbase = RESOLVE (&sym, 0);
+      loadbase = RESOLVE (&sym, version, 0);
       *reloc_addr += ((sym ? (loadbase + sym->st_value) : 0) -
                      (Elf32_Addr) reloc_addr);
       break;
index a4b1edcdd93e010432e603b0bb0271621ef63bd7..95a8342574ba6d763b457c9ca11f28da5ba847d3 100644 (file)
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  m68k version.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997 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
@@ -199,8 +199,8 @@ _dl_start_user:
    MAP is the object containing the reloc.  */
 
 static inline void
-elf_machine_rela (struct link_map *map,
-                 const Elf32_Rela *reloc, const Elf32_Sym *sym)
+elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
+                 const Elf32_Sym *sym, const hash_name_pair *version)
 {
   Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
   Elf32_Addr loadbase;
@@ -208,29 +208,29 @@ elf_machine_rela (struct link_map *map,
   switch (ELF32_R_TYPE (reloc->r_info))
     {
     case R_68K_COPY:
-      loadbase = RESOLVE (&sym, DL_LOOKUP_NOEXEC);
+      loadbase = RESOLVE (&sym, version, DL_LOOKUP_NOEXEC);
       memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size);
       break;
     case R_68K_GLOB_DAT:
-      loadbase = RESOLVE (&sym, 0);
+      loadbase = RESOLVE (&sym, version, 0);
       *reloc_addr = sym ? (loadbase + sym->st_value) : 0;
       break;
     case R_68K_JMP_SLOT:
-      loadbase = RESOLVE (&sym, DL_LOOKUP_NOPLT);
+      loadbase = RESOLVE (&sym, version, DL_LOOKUP_NOPLT);
       *reloc_addr = sym ? (loadbase + sym->st_value) : 0;
       break;
     case R_68K_8:
-      loadbase = RESOLVE (&sym, 0);
+      loadbase = RESOLVE (&sym, version, 0);
       *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
                              + reloc->r_addend);
       break;
     case R_68K_16:
-      loadbase = RESOLVE (&sym, 0);
+      loadbase = RESOLVE (&sym, version, 0);
       *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
                               + reloc->r_addend);
       break;
     case R_68K_32:
-      loadbase = RESOLVE (&sym, 0);
+      loadbase = RESOLVE (&sym, version, 0);
       *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
                     + reloc->r_addend);
       break;
@@ -238,17 +238,17 @@ elf_machine_rela (struct link_map *map,
       *reloc_addr = map->l_addr + reloc->r_addend;
       break;
     case R_68K_PC8:
-      loadbase = RESOLVE (&sym, 0);
+      loadbase = RESOLVE (&sym, version, 0);
       *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
                              + reloc->r_addend - (Elf32_Addr) reloc_addr);
       break;
     case R_68K_PC16:
-      loadbase = RESOLVE (&sym, 0);
+      loadbase = RESOLVE (&sym, version, 0);
       *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
                               + reloc->r_addend - (Elf32_Addr) reloc_addr);
       break;
     case R_68K_PC32:
-      loadbase = RESOLVE (&sym, 0);
+      loadbase = RESOLVE (&sym, version, 0);
       *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
                     + reloc->r_addend - (Elf32_Addr) reloc_addr);
       break;
index 0e613d3eecde3d6eb71fd64e33595a9a66718361..7d044129685d8f404086dacb2fcf49c87cf632c6 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1993, 1994, 1997 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 <signal.h>
 #include <time.h>
 #include <unistd.h>
@@ -28,7 +27,7 @@ Cambridge, MA 02139, USA.  */
    There is no return value to indicate error, but if `sleep' returns
    SECONDS, it probably didn't work.  */
 unsigned int
-DEFUN(sleep, (seconds), unsigned int seconds)
+__sleep (unsigned int seconds)
 {
   time_t before, after;
   mach_port_t recv;
@@ -43,3 +42,4 @@ DEFUN(sleep, (seconds), unsigned int seconds)
 
   return seconds - (after - before);
 }
+weak_alias (__sleep, sleep)
index 9e80426ee372bccdcad1b003b59789f3bb1a5059..a4a02bfd9773823c5123f1c29b0777d7cc7f43dd 100644 (file)
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  MIPS version.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
 
@@ -422,8 +422,8 @@ _dl_start_user:\n\
    MAP is the object containing the reloc.  */
 
 static inline void
-elf_machine_rel (struct link_map *map,
-                const ElfW(Rel) *reloc, const ElfW(Sym) *sym)
+elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
+                const ElfW(Sym) *sym, const hash_name_pair *version)
 {
   ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
   ElfW(Addr) loadbase, undo;
@@ -454,7 +454,7 @@ elf_machine_rel (struct link_map *map,
          else
 #endif
            undo = 0;
-         loadbase = RESOLVE (&sym, 0);
+         loadbase = RESOLVE (&sym, version, 0);
          *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo;
        }
       break;
index fd63a4bf694b60c3f255a7d2e4646e099580200e..e6d8de45ad2bbecefbc07b9bb29cffdab3b65471 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1993, 1996, 1997 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 <signal.h>
 #include <time.h>
@@ -39,8 +39,7 @@ sleep_handler (sig)
    signal afterwards is undefined.  There is no return value to indicate
    error, but if `sleep' returns SECONDS, it probably didn't work.  */
 unsigned int
-sleep (seconds)
-     unsigned int seconds;
+__sleep (unsigned int seconds)
 {
   unsigned int remaining, slept;
   time_t before, after;
@@ -105,3 +104,4 @@ sleep (seconds)
 
   return slept > seconds ? 0 : seconds - slept;
 }
+weak_alias (__sleep, sleep)
index 9ba448f586f575ea33ea45aea753279a67581f40..fdc8b28887d0c017bd5442e331fa9f01bcd4d014 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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 <signal.h>
 #include <time.h>
@@ -29,11 +29,12 @@ Cambridge, MA 02139, USA.  */
    signal afterwards is undefined.  There is no return value to indicate
    error, but if `sleep' returns SECONDS, it probably didn't work.  */
 unsigned int
-sleep (seconds)
+__sleep (seconds)
      unsigned int seconds;
 {
   __set_errno (ENOSYS);
   return seconds;
 }
+weak_alias (__sleep, sleep)
 
 stub_warning (sleep)
index 626c47ff7cd000691ff10030b99b2ac9a7f73a69..f67403f69437e14793bd95d9f96e8774926d9dbc 100644 (file)
@@ -1,5 +1,5 @@
 /* Implementation of the POSIX sleep function using nanosleep.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -22,7 +22,7 @@
 #include <unistd.h>
 
 unsigned int
-sleep (unsigned int seconds)
+__sleep (unsigned int seconds)
 {
   struct timespec ts = { tv_sec: (long int) seconds, tv_nsec: 0 };
   unsigned int result;
@@ -35,3 +35,4 @@ sleep (unsigned int seconds)
 
   return result;
 }
+weak_alias (__sleep, sleep)
index 2bb5c71b370b0fc588f667156867dc62156607ac..b809e6d632b073a9ac77e570917465b95411e928 100644 (file)
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 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 <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -26,24 +25,25 @@ Cambridge, MA 02139, USA.  */
 /* Prints the date in the form "Day Mon dd hh:mm:ss ZZZ yyyy\n".
    A simple test for localtime and strftime.  */
 int
-DEFUN(main, (argc, argv), int argc AND char **argv)
+main (argc, argv)
+     int argc;
+     char **argv;
 {
-  time_t t = time(NULL);
-  register struct tm *tp = localtime(&t);
-  register char good = tp != NULL;
+  time_t t = time (NULL);
+  struct tm *tp = localtime (&t);
+  char good = tp != NULL;
 
   if (good)
     {
       char buf[BUFSIZ];
-      good = strftime(buf, sizeof(buf), "%a %b %d %X %Z %Y", tp);
+      good = strftime (buf, sizeof (buf), "%a %b %d %X %Z %Y", tp);
       if (good)
-       puts(buf);
+       puts (buf);
       else
-       perror("strftime");
+       perror ("strftime");
     }
   else
-    perror("localtime");
+    perror ("localtime");
 
-  exit(good ? EXIT_SUCCESS : EXIT_FAILURE);
-  return(good ? EXIT_SUCCESS : EXIT_FAILURE);
+  return good ? EXIT_SUCCESS : EXIT_FAILURE;
 }
index a090d93db45c2a0d654857613077b4eb571fecbd..2d7b8fe8e27b18abf7c25cf6152dea0ad6228928 100644 (file)
@@ -1,29 +1,30 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1994, 1997 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 <stdio.h>
 #include <stdlib.h>
 #include <time.h>
 
 
 int
-DEFUN(main, (argc, argv), int argc AND char **argv)
+main (argc, argv)
+     int argc;
+     char **argv;
 {
   time_t t;
   register struct tm *tp;
index e767f13f5a97de5735fc2c230d17b056575a3f6f..180f62be886cf9bfd0d69207c3935600beaa8e38 100644 (file)
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
 /* This file just defines the current version number of libc.  */
 
 #define RELEASE "experimental"
-#define VERSION "2.0.2"
+#define VERSION "2.0.90"
index c296944fdd38fe8134ee80d221f9008a4656ebf8..929798da42e12c8d8776b79c80c93b2ad960bbe7 100644 (file)
@@ -32,7 +32,8 @@ routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
            mbsnrtowcs wcsnrtombs \
            wcstol wcstoul wcstoq wcstouq wcstod wcstold wcstof \
            wcscoll wcsxfrm \
-           wcwidth wcswidth
+           wcwidth wcswidth \
+           wcscoll_l wcsxfrm_l
 
 include ../Rules
 
index 689428bacffefdc31f33d8935c10e459ea88c473..597a03d735f0bf53a33478d9e4c9cd14787d0bc0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997 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
@@ -89,6 +89,22 @@ extern int wcscoll __P ((__const wchar_t *__s1, __const wchar_t *__s2));
    `wcscoll' to the original strings.  */
 extern size_t wcsxfrm __P ((wchar_t *__s1, __const wchar_t *__s2, size_t __n));
 
+#ifdef __USE_GNU
+/* Similar to the two functions above but take the information from
+   the provided locale and not the global locale.  */
+# include <xlocale.h>
+
+/* Compare S1 and S2, both interpreted as appropriate to the
+   LC_COLLATE category of the given locale.  */
+extern int __wcscoll_l __P ((__const wchar_t *__s1, __const wchar_t *__s2,
+                            __locale_t loc));
+/* Transform S2 into array pointed to by S1 such that if wcscmp is
+   applied to two transformed strings the result is the as applying
+   `wcscoll' to the original strings.  */
+extern size_t __wcsxfrm_l __P ((wchar_t *__s1, __const wchar_t *__s2,
+                               size_t __n, __locale_t loc));
+#endif
+
 /* Duplicate S, returning an identical malloc'd string.  */
 extern wchar_t *wcsdup __P ((__const wchar_t *__s));
 
index ba4adf00c4754864c49a531bd2a20cd1da8130f1..9b1a8a4d3891ffac6f06e205df04bb7f885cbfc9 100644 (file)
 
 #define STRING_TYPE wchar_t
 #define USTRING_TYPE wint_t
-#define STRCOLL wcscoll
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# define STRCOLL __wcscoll_l
+#else
+# define STRCOLL wcscoll
+#endif
 #define STRCMP wcscmp
 
 #include "../string/strcoll.c"
diff --git a/wcsmbs/wcscoll_l.c b/wcsmbs/wcscoll_l.c
new file mode 100644 (file)
index 0000000..b02f6a2
--- /dev/null
@@ -0,0 +1,21 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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.  */
+
+#define USE_IN_EXTENDED_LOCALE_MODEL   1
+#include <wcscoll.c>
index 0404c2d0b08b0b9ef6e7551a9db888e78266688d..b899185aa557430f248493f1c6ca34a9d614d5ea 100644 (file)
 #define STRING_TYPE wchar_t
 #define USTRING_TYPE wint_t
 #define L_(Ch) L##Ch
-#define STRXFRM wcsxfrm
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# define STRXFRM __wcsxfrm_l
+#else
+# define STRXFRM wcsxfrm
+#endif
 #define STRLEN wcslen
 #define STPNCPY __wcpncpy
 
diff --git a/wcsmbs/wcsxfrm_l.c b/wcsmbs/wcsxfrm_l.c
new file mode 100644 (file)
index 0000000..9f97b9d
--- /dev/null
@@ -0,0 +1,21 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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.  */
+
+#define USE_IN_EXTENDED_LOCALE_MODEL   1
+#include <wcsxfrm.c>
index e4691221975350d5c3bfbb4409b00ecc20f0f9e4..6133a5a48de4d2551ae0214ee7b7de532ef8ea90 100644 (file)
@@ -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>
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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 <wchar.h>
 #include <string.h>
index 0523e11e7c5fc1433bab85abd76699aa25f9d193..731b43abe57d3ec32f0ded35fd72679f5c3aa761 100644 (file)
@@ -23,7 +23,8 @@ subdir        := wctype
 
 headers                := wctype.h
 distribute     := cname-lookup.h
-routines       := wcfuncs wctype iswctype wctrans towctrans
+routines       := wcfuncs wctype iswctype wctrans towctrans wcextra \
+                  wcfuncs_l iswctype_l towctrans_l
 
 tests  := test_wctype
 
index b3c1cdbede69e92f7e3ba70dd3d25dc599118bc6..77186d4aa42fcc79a735357d9d8421a2a354b1c4 100644 (file)
@@ -1,37 +1,60 @@
-/* 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>.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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 <endian.h>
 #include "../locale/localeinfo.h"
 
 /* Some words on the runtime of this functions.  Although there is a
    loop in the function the runtime is asymptotically quasi constant.
    The reason is that even for the largest character sets HASH_LAYERS
    will not grow beyond 15 (a guess!).  */
+#ifndef USE_IN_EXTENDED_LOCALE_MODEL
 static __inline size_t
 cname_lookup (wint_t wc)
+#else
+static __inline size_t
+cname_lookup (wint_t wc, __locale_t locale)
+#endif
 {
-  extern unsigned int *__ctype_names;
   unsigned int hash_size, hash_layers;
   size_t result, cnt;
 
+#ifndef USE_IN_EXTENDED_LOCALE_MODEL
+  extern unsigned int *__ctype_names;
   hash_size = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_HASH_SIZE);
   hash_layers = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_HASH_LAYERS);
+#else
+  struct locale_data *current = locale->__locales[LC_CTYPE];
+#if BYTE_ORDER == BIG_ENDIAN
+  unsigned int *__ctype_names =
+    (unsigned int *) current->values[_NL_ITEM_INDEX (_NL_CTYPE_NAMES_EB)].string;
+#elif BYTE_ORDER == LITTLE_ENDIAN
+  unsigned int *__ctype_names =
+    (unsigned int *) current->values[_NL_ITEM_INDEX (_NL_CTYPE_NAMES_EL)].string;
+#else
+# error bizarre byte order
+#endif
+  hash_size =
+    current->values[_NL_ITEM_INDEX (_NL_CTYPE_HASH_SIZE)].word;
+  hash_layers =
+    current->values[_NL_ITEM_INDEX (_NL_CTYPE_HASH_LAYERS)].word;
+#endif
 
   result = wc % hash_size;
   for (cnt = 0; cnt < hash_layers; ++cnt)
diff --git a/wctype/iswctype_l.c b/wctype/iswctype_l.c
new file mode 100644 (file)
index 0000000..75fb41c
--- /dev/null
@@ -0,0 +1,41 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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 <wctype.h>
+
+#define USE_IN_EXTENDED_LOCALE_MODEL   1
+#include "cname-lookup.h"
+
+
+int
+__iswctype_l (wint_t wc, wctype_t desc, __locale_t locale)
+{
+  const unsigned int *class32_b;
+  size_t idx;
+
+  idx = cname_lookup (wc, locale);
+  if (idx == ~((size_t) 0))
+    return 0;
+
+  class32_b = (u_int32_t *)
+    locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_CLASS32)].string;
+
+  return class32_b[idx] & desc;
+}
index bc2c7e9d18557b138a8af774d1dfcfc08fbca15b..350d02cb0c0e387ed8ef682fd30e267994c26ab4 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 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 <ctype.h>
 #include <stdio.h>
index fd15599a6ef0e04996ae49cce3b5ec4bb26c9d96..91e591dbb3343ca011a3ece75cec3eb9d5a03b8b 100644 (file)
@@ -1,21 +1,21 @@
-/* towctrans - map wide character using given mapping.
-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.  */
+/* Map wide character using given mapping.
+   Copyright (C) 1996, 1997 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 <wctype.h>
 
diff --git a/wctype/towctrans_l.c b/wctype/towctrans_l.c
new file mode 100644 (file)
index 0000000..09596b9
--- /dev/null
@@ -0,0 +1,37 @@
+/* Map wide character using given mapping and locale.
+   Copyright (C) 1996, 1997 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 <wctype.h>
+
+/* Define the lookup function.  */
+#define USE_IN_EXTENDED_LOCALE_MODEL   1
+#include "cname-lookup.h"
+
+wint_t
+__towctrans_l (wint_t wc, wctrans_t desc, __locale_t locale)
+{
+  size_t idx;
+
+  idx = cname_lookup (wc, locale);
+  if (idx == ~((size_t) 0))
+    /* Character is not known.  Default action is to simply return it.  */
+    return wc;
+
+  return (wint_t) desc[idx];
+}
diff --git a/wctype/wcextra.c b/wctype/wcextra.c
new file mode 100644 (file)
index 0000000..add8db4
--- /dev/null
@@ -0,0 +1,35 @@
+/* Additional non standardized wide character classification functions.
+   Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+   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.  */
+
+#define __NO_WCTYPE    1
+#include <wctype.h>
+
+int
+iswblank (wint_t wc)
+{
+  return __iswctype (wc, _ISblank);
+}
+
+
+int
+(__iswblank_l) (wint_t wc, __locale_t locale)
+{
+  return __iswctype_l (wc, _ISblank, locale);
+}
index b5ac89060953038402e57e23fdb94b527d78e25d..e040fd5e7ff75d961fc889bae225d98d1eb61a0a 100644 (file)
@@ -1,20 +1,20 @@
-/* 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.  */
+/* Copyright (C) 1996, 1997 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.  */
 
 #define        __NO_WCTYPE
 #include <wctype.h>
diff --git a/wctype/wcfuncs_l.c b/wctype/wcfuncs_l.c
new file mode 100644 (file)
index 0000000..f73b93d
--- /dev/null
@@ -0,0 +1,50 @@
+/* Copyright (C) 1996, 1997 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.  */
+
+#define        __NO_WCTYPE
+#include <wctype.h>
+
+/* Provide real-function versions of all the wctype macros.  */
+
+#define        func(name, type) \
+  int name (wint_t wc, __locale_t locale)                                    \
+  { return __iswctype_l (wc, type, locale); }
+
+func (__iswalnum_l, _ISalnum)
+func (__iswalpha_l, _ISalpha)
+func (__iswcntrl_l, _IScntrl)
+func (__iswdigit_l, _ISdigit)
+func (__iswlower_l, _ISlower)
+func (__iswgraph_l, _ISgraph)
+func (__iswprint_l, _ISprint)
+func (__iswpunct_l, _ISpunct)
+func (__iswspace_l, _ISspace)
+func (__iswupper_l, _ISupper)
+func (__iswxdigit_l, _ISxdigit)
+
+wint_t
+(__towlower_l) (wint_t wc, __locale_t locale)
+{
+  return __towctrans_l (wc, locale->__ctype_tolower, locale);
+}
+
+wint_t
+(__towupper_l) (wint_t wc, __locale_t locale)
+{
+  return __towctrans_l (wc, locale->__ctype_toupper, locale);
+}
index 5c855d0b9bea48f717a79544393dd4a813f2e450..3f823e56a81313f6bafbe67cc658c63c3fa96565 100644 (file)
@@ -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>.
-
-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.  */
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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 <string.h>
index c3bb1d9c6a66dffa92a3b7091b4241dd7b1d1398..01746be03b2ac5585e8820f8834c9f737c1117c7 100644 (file)
@@ -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>.
-
-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.  */
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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 <endian.h>
 #include <string.h>
index 3ba8ae7614e15c822383b5577e55cb7cb3dd8847..b67995918d7c7139a7ecbe3bead5f9a2481fa792 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 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
@@ -200,11 +200,110 @@ extern wint_t towctrans __P ((wint_t __wc, wctrans_t __desc));
 extern __const int *__ctype_tolower; /* Case conversions.  */
 extern __const int *__ctype_toupper; /* Case conversions.  */
 
-#define        towlower(wc)    towctrans (wc, __ctype_tolower)
-#define        towupper(wc)    towctrans (wc, __ctype_toupper)
+#define        towlower(wc)    towctrans ((wc), __ctype_tolower)
+#define        towupper(wc)    towctrans ((wc), __ctype_toupper)
 
 #endif /* Not __NO_WCTYPE.  */
 
+#ifdef __USE_GNU
+/* Declare the interface to extended locale model.  */
+# include <xlocale.h>
+
+/* Test for any wide character for which `iswalpha' or `iswdigit' is
+   true.  */
+extern int __iswalnum_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any wide character for which `iswupper' or 'iswlower' is
+   true, or any wide character that is one of a locale-specific set of
+   wide-characters for which none of `iswcntrl', `iswdigit',
+   `iswpunct', or `iswspace' is true.  */
+extern int __iswalpha_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any control wide character.  */
+extern int __iswcntrl_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any wide character that corresponds to a decimal-digit
+   character.  */
+extern int __iswdigit_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any wide character for which `iswprint' is true and
+   `iswspace' is false.  */
+extern int __iswgraph_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any wide character that corresponds to a lowercase letter
+   or is one of a locale-specific set of wide characters for which
+   none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true.  */
+extern int __iswlower_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any printing wide character.  */
+extern int __iswprint_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any printing wide character that is one of a
+   locale-specific et of wide characters for which neither `iswspace'
+   nor `iswalnum' is true.  */
+extern int __iswpunct_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any wide character that corresponds to a locale-specific
+   set of wide characters for which none of `iswalnum', `iswgraph', or
+   `iswpunct' is true.  */
+extern int __iswspace_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any wide character that corresponds to an uppercase letter
+   or is one of a locale-specific set of wide character for which none
+   of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true.  */
+extern int __iswupper_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any wide character that corresponds to a hexadecimal-digit
+   character equivalent to that performed be the functions described
+   in the previous subclause.  */
+extern int __iswxdigit_l __P ((wint_t __wc, __locale_t __locale));
+
+
+/* Determine whether the wide-character WC has the property described by
+   DESC.  */
+extern int __iswctype_l __P ((wint_t __wc, wctype_t __desc,
+                             __locale_t locale));
+
+
+/*
+ * Wide-character case-mapping functions: 7.15.3.1.
+ */
+
+/* Converts an uppercase letter to the corresponding lowercase letter.  */
+extern wint_t __towlower_l __P ((wint_t __wc, __locale_t locale));
+
+/* Converts an lowercase letter to the corresponding uppercase letter.  */
+extern wint_t __towupper_l __P ((wint_t __wc, __locale_t locale));
+
+/* Map the wide character WC using the mapping described by DESC.  */
+extern wint_t __towctrans_l __P ((wint_t __wc, wctrans_t __desc,
+                                 __locale_t locale));
+
+
+#ifndef        __NO_WCTYPE
+#define        __iswalnum_l(wc, loc)   __iswctype_l ((wc), _ISalnum, (loc))
+#define        __iswalpha_l(wc, loc)   __iswctype_l ((wc), _ISalpha, (loc))
+#define        __iswcntrl_l(wc, loc)   __iswctype_l ((wc), _IScntrl, (loc))
+#define        __iswdigit_l(wc, loc)   __iswctype_l ((wc), _ISdigit, (loc))
+#define        __iswlower_l(wc, loc)   __iswctype_l ((wc), _ISlower, (loc))
+#define        __iswgraph_l(wc, loc)   __iswctype_l ((wc), _ISgraph, (loc))
+#define        __iswprint_l(wc, loc)   __iswctype_l ((wc), _ISprint, (loc))
+#define        __iswpunct_l(wc, loc)   __iswctype_l ((wc), _ISpunct, (loc))
+#define        __iswspace_l(wc, loc)   __iswctype_l ((wc), _ISspace, (loc))
+#define        __iswupper_l(wc, loc)   __iswctype_l ((wc), _ISupper, (loc))
+#define        __iswxdigit_l(wc, loc)  __iswctype_l ((wc), _ISxdigit, (loc))
+
+#define        __iswblank_l(wc, loc)   __iswctype_l ((wc), _ISblank, (loc))
+
+#define        __towlower_l(wc, loc)   __towctrans_l ((wc), (loc)->__ctype_tolower, \
+                                              (loc))
+#define        __towupper_l(wc, loc)   __towctrans_l ((wc), (loc)->__ctype_toupper, \
+                                              (loc))
+
+#endif /* Not __NO_WCTYPE.  */
+
+#endif /* Use GNU.  */
+
 __END_DECLS
 
 #endif /* wctype.h  */
diff --git a/xlocale.h b/xlocale.h
new file mode 100644 (file)
index 0000000..5280ef0
--- /dev/null
+++ b/xlocale.h
@@ -0,0 +1 @@
+#include <locale/xlocale.h>