aboutsummaryrefslogtreecommitdiff
path: root/posix/regex.c
AgeCommit message (Collapse)Author
2001-07-30 Declare wcs functions only if compiling with MBS_SUPPORT. Don't use #elif ↵Andreas Jaeger
for traditional C.
2001-07-23Update.Ulrich Drepper
2001-07-23 Ulrich Drepper <drepper@redhat.com> * posix/regex.c: Revamp memory allocation for WCHAR functions to not use too much stack.
2001-07-18Update.Ulrich Drepper
2001-07-18 Ulrich Drepper <drepper@redhat.com> * libio/filedoalloc.c (_IO_file_doallocate): A few more minor cleanups and improvements. 2001-07-18 Andreas Schwab <schwab@suse.de> * posix/regex.c (WORDCHAR_P) [WCHAR]: Also return true for the underscore character. 2001-07-18 Jakub Jelinek <jakub@redhat.com> * malloc/malloc (new_heap): Don't call munmap for zero length. 2001-07-18 Ulrich Drepper <drepper@redhat.com> * libio/filedoalloc.c (_IO_file_doallocate): Use DEV_TTY_P if available to determine whether descriptor is for tty before calling isatty. * sysdeps/unix/sysv/linux/device-nrs.h: Define DEV_TTY_P. * sysdeps/generic/device-nrs.h: Likewise.
2001-07-07Update.Ulrich Drepper
* posix/regex.c: Limit string length printed in debug messages to 100 chars.
2001-07-06Update to LGPL v2.1.Andreas Jaeger
2001-07-06 Paul Eggert <eggert@twinsun.com> * manual/argp.texi: Remove ignored LGPL copyright notice; it's not appropriate for documentation anyway. * manual/libc-texinfo.sh: "Library General Public License" -> "Lesser General Public License". 2001-07-06 Andreas Jaeger <aj@suse.de> * All files under GPL/LGPL version 2: Place under LGPL version 2.1.
2001-06-27Update.Ulrich Drepper
* posix/Makefile: Add rules to build and run tst-regex. 2001-06-20 Isamu Hasegawa <isamu@yamato.ibm.com> * posix/regex.c (FREE_WCS_BUFFERS): New macro to free buffers. (re_search_2): invoke convert_mbs_to_wcs and FREE_WCS_BUFFERS. (wcs_re_match_2_internal): Check whether the wcs buffers need seting up or not, and skip seting up routin if not needed. 2001-06-26 Isamu Hasegawa <isamu@yamato.ibm.com> * posix/regex.c (count_mbs_length): Use binary search for optimization. 2001-06-27 Ulrich Drepper <drepper@redhat.com>
2001-06-26Update.Ulrich Drepper
2001-06-22 Jakub Jelinek <jakub@redhat.com> * posix/regex.c (regex_compile, re_match_2_internal): Fix comment typos. 2001-06-01 Wolfram Gloger <wg@malloc.de> * malloc/malloc.c (malloc_atfork, free_atfork): Use a unique value ATFORK_ARENA_PTR, not 0, for the thread-specific arena pointer when malloc_atfork is in use.
2001-06-19Update.Ulrich Drepper
2001-06-17 Alan Modra <amodra@bigpond.net.au> * sysdeps/hppa/dl-machine.h (elf_machine_rela): handle relocs at unaligned address.
2001-06-10Update.Ulrich Drepper
2001-06-08 Andreas Schwab <schwab@suse.de> * posix/regex.c (re_match_2_internal) [case wordbeg, wordend]: Don't dereference at end of string.
2001-05-14Update.Andreas Jaeger
2001-05-14 Andreas Jaeger <aj@suse.de> * sysdeps/i386/fpu/libm-test-ulps: Adjust for new tests. * math/libm-test.inc (tanh_test): Add testcases for last tanh bug. 2001-05-14 Stephen L Moshier <moshier@mediaone.net> * sysdeps/ieee754/ldbl-96/s_tanhl.c (__tanhl): Fix sign test. 2001-05-11 Jakub Jelinek <jakub@redhat.com> * posix/regex.c (re_match_2_internal): Swap mbs_offset and csize as well if swapping strings. Make sure stop is not past end of second string. * posix/bug-regex4.c: New test. * posix/Makefile (tests): Add bug-regex4. 2001-05-10 Andreas Jaeger <aj@suse.de> * manual/install.texi (Linux): Clarify that Linux 2.2 is minimal requirement.
2001-03-30Avoid an access violation if malloc failes.Ulrich Drepper
2001-03-30Update.Ulrich Drepper
* posix/regex.c: Remove unnecessary ifs.
2001-03-30Update.Ulrich Drepper
2001-03-29 Ulrich Drepper <drepper@redhat.com> * math/bits/mathcalls.h: Remove infnan declaration. 2001-03-29 H.J. Lu <hjl@gnu.org> * include/endian.h: Define BIG_ENDI, LITTLE_ENDI, HIGH_HALF, and LOW_HALF only if _LIBC is defined and _ISOMAC is not defined. * stdlib/isomac.c (fmt): Define _LIBC and _ISOMAC. . 2001-03-29 Isamu Hasegawa <isamu@yamato.ibm.com> * posix/regex.c: Fix typo and add a sentinel. 2001-03-29 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/shm_open.c: Open new file always with O_NOFOLLOW. Suggested by Christoph Roland.
2001-03-25Update.Ulrich Drepper
2001-03-23 Jes Sorensen <jes@linuxcare.com> * sysdeps/unix/sysv/linux/ia64/sysdep.h (ENTRY): Moved to ... * sysdeps/ia64/sysdep.h: ...here. * sysdeps/ia64/sysdep.h (LOCAL_ENTRY): Define. * sysdeps/ia64/sysdep.h (LOCAL_LEAF): Define. * sysdeps/ia64/_mcount.S (_mcount_ret_helper): Use LOCAL_LEAF() to declare instead of LEAF(). Suggestion from David Mosberger. 2001-03-21 David Mosberger <davidm@hpl.hp.com> * sysdeps/unix/sysv/linux/ia64/sysdep.h (CALL_MCOUNT): Add unwind directives. (PSEUDO): Drop .psr and .lsb directives. * sysdeps/unix/sysv/linux/ia64/setjmp.S: Ditto. Add unwind directives. * sysdeps/unix/sysv/linux/ia64/sysdep.S: Ditto. * sysdeps/ia64/elf/start.S: Misc cleanup: remove .psr and .lsb directives etc. * sysdeps/unix/sysv/linux/ia64/brk.S: Ditto. * sysdeps/unix/sysv/linux/ia64/__longjmp.S: Ditto. * sysdeps/ia64/_mcount.S: Remove .psr and .lsb directives (no longer needed). Add unwind directives. * sysdeps/ia64/sysdep.h: Define ASM_UNW_PRLG_RP, ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_PSP, ASM_UNW_PRLG_PR, and ASM_UNW_PRLG_GRSAVE. 2001-03-21 Paul Eggert <eggert@twinsun.com> * posix/regex.h (RE_INVALID_INTERVAL_ORD): New macro. (RE_SYNTAX_POSIX_EGREP): Use it. * posix/regex.c (regex_compile): Implement it. 2001-03-21 Paul Eggert <eggert@twinsun.com> * posix/regex.c (GET_UNSIGNED_NUMBER): Check for overflow. Rewrite to avoid duplicate code. 2001-03-21 H.J. Lu <hjl@gnu.org> * elf/Makefile (tests): Don't depend on $(objpfx)tst-pathopt.out for cross-compiling. ($(objpfx)tst-pathopt.out): Undo the last change.
2001-02-15Update.glibc-2.2.2cvs/glibc-2_2_2Ulrich Drepper
2001-02-15 Jakub Jelinek <jakub@redhat.com> * posix/regex.c (init_syntax_once): Add prototype. (TRANSLATE): If MBS_SUPPORT, translate all characters up to '\xff'. (re_search_2): Avoid warning. (count_mbs_length): Add prototype. * posix/tst-regex3.c: New file. * posix/Makefile (tests): Add bug-regex3.
2001-02-10Update.Ulrich Drepper
* posix/Makefile: Add rules to build and run bug-regex2. 2001-02-10 Jakub Jelinek <jakub@redhat.com> * posix/regex.c (convert_mbs_to_wcs): Change is_binary to char *. (regex_compile): Likewise. (FREE_VARIABLES): Don't free is_binary1 and is_binary2. (re_match_2_internal): Use just is_binary instead of two variables. Use REGEX_TALLOC to allocate it and FREE_VAR to free on failure. 2001-02-09 Ulrich Drepper <drepper@redhat.com>
2001-02-09Update.Ulrich Drepper
* posix/regex.c: Fix alignment problem. Patch by Isamu Hasegawa <isamu@yamato.ibm.com>. Contributed by Rick Gorton <rick.gorton@alpha-processor.com>.
2001-02-07Update.Ulrich Drepper
2001-02-07 Ulrich Drepper <drepper@redhat.com> * sysdeps/gnu/netinet/tcp.h: Correct values of TCP_ macros. Patch by Pekka.Pietikainen@cern.ch. * posix/regex.c: Correct several problems with 64-bit architectures introduced in the MBS changes. Patch by Isamu Hasegawa <isamu@yamato.ibm.com>. 2001-02-07 Jakub Jelinek <jakub@redhat.com> * math/tgmath.h: Only add l suffixes if __NO_LONG_DOUBLE_MATH is not defined. * sysdeps/alpha/fpu/bits/mathinline.h: Honour __NO_MATH_INLINES.
2001-02-07Update.Ulrich Drepper
2001-02-06 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the broken code. Patch by Jes Sorensen.
2001-02-06Update.Andreas Jaeger
2001-02-06 Andreas Jaeger <aj@suse.de> * elf/firstobj.c: Add prototype. * posix/regex.c (convert_mbs_to_wcs): Make static, add prototype (truncate_wchar): Likewise.
2001-02-02Update.Ulrich Drepper
* posix/regex.c: Implement multibyte character handling. Patch by Isamu Hasegawa <isamu@yamato.ibm.co.jp>.
2000-10-28Update.Ulrich Drepper
* posix/regex.c (gettext): Use correct translation domain for glibc. * argp/argp-parse.c: Use __dcgettext instead of dcgettext for glibc. * argp/argp-help.c: Likewise. * inet/getnameinfo.c (getnameinfo): Use __snprintf instead of snprintf. * inet/rexec.c (rexec_af): Use __snprintf instead of snprintf. * misc/regexp.c (__step): Use __regexec instead of regexec. (__advance): Likewise. * nss/digits_dots.c: Use __inet_aton instead of inet_aton. * misc/daemon.c (daemon): Use __fork instead of fork.
2000-10-18Update.Andreas Jaeger
2000-10-18 Andreas Jaeger <aj@suse.de> * sysdeps/mips/dl-machine.h (ELF_MIPS_GNU_GOT1_OK): New. (ELF_MACHINE_BEFORE_RTLD_RELOC): Handle newer linkers. (elf_machine_runtime_link_map): Likewise. (elf_machine_runtime_setup): Likewise. Handle dynamic linker's local got entries. Patches by Ralf Baechle <ralf@gnu.org>. 2000-10-09 Maciej W. Rozycki <macro@ds2.pg.gda.pl> * sysdeps/mips/dl-machine.h (_dl_runtime_resolve): Define $sp as the frame pointer. Allocate stack space for $a0 for __dl_runtime_resolve(). Do not save $sp in $s0 as it's callee-saved anyway.
2000-09-14(compile_range): Cast collseq index to unsigned char to avoid accessing data ↵Ulrich Drepper
before collseq.
2000-08-13Update.Ulrich Drepper
2000-08-12 Ulrich Drepper <drepper@redhat.com> * posix/regex.c (compile_range): Implement collation sequence handling for glibc. Use simple character ordering otherwise and not strcoll.
2000-08-04* posix/regex.c (SET_HIGH_BOUND): New macro. Greg McGary
(MOVE_BUFFER_POINTER): Use it. (ELSE_EXTEND_BUFFER_HIGH_BOUND): New macro. (EXTEND_BUFFER): Use it. 2000-08-04 Greg McGary <greg@mcgary.org> * posix/regex.c (SET_HIGH_BOUND): New macro. (MOVE_BUFFER_POINTER): Use it. (ELSE_EXTEND_BUFFER_HIGH_BOUND): New macro. (EXTEND_BUFFER): Use it.
2000-08-03Update.Greg McGary
2000-08-03 Greg McGary <greg@mcgary.org> * sysdeps/unix/sysv/syscalls.list (time, utime): Correct signatures. * io/test-utime.c: Test passing NULL as utimbuf* arg. * posix/regex.c (EXTEND_BUFFER_HIGH_BOUND): Remove macro. (MOVE_BUFFER_POINTER): Handle high_bound properly. (EXTEND_BUFFER): Don't call EXTEND_BUFFER_HIGH_BOUND.
2000-08-02Update.Ulrich Drepper
* posix/regex.c (compile_range): Transliate range start and end characters to avoid empty range in case of REG_ICASE [PR libc/1842].
2000-08-02Update.Ulrich Drepper
* sysdeps/ia64/bits/byteswap.h: New file. Patch by Dan Pop <Dan.Pop@cern.ch>. * misc/sys/cdefs.h: Define __attribute_format_arg__. * intl/libintl.h: Use it here instead of using __attribute__ directly. 2000-07-13 H.J. Lu <hjl@gnu.org> * posix/regex.c (re_max_failures): Set to 4000. 2000-08-01 Ulrich Drepper <drepper@redhat.com>
2000-07-18* posix/regex.c (EXTEND_BUFFER_HIGH_BOUND): New macro. Greg McGary
(EXTEND_BUFFER): Use it. 2000-07-18 Greg McGary <greg@mcgary.org> * posix/regex.c (EXTEND_BUFFER_HIGH_BOUND): New macro. (EXTEND_BUFFER): Use it.
2000-07-07* posix/regex.c (EXTEND_BUFFER): Compute increment once. Greg McGary
Move all three components of a bounded pointer. 2000-07-07 Greg McGary <greg@mcgary.org> * posix/regex.c (EXTEND_BUFFER): Compute increment once. Move all three components of a bounded pointer.
2000-07-05Update.Ulrich Drepper
2000-07-05 Ulrich Drepper <drepper@redhat.com> * locale/loadlocale.c (_nl_unload_locale): Add cast to avoid warning. * locale/programs/ld-collate.c (collate_output): Also write out the collation sequence values and the wide character string for the collation symbol table. * posix/fnmatch.c: Include "../locale/elem-hash.h". * posix/fnmatch_loop.c: Implement collating symbol handling. * posix/tst-fnmatch.input: Add more tests, especially for collating symbol handling. * posix/regex.c: Fix comment.
2000-04-21Update.Ulrich Drepper
2000-03-08 H.J. Lu <hjl@gnu.org> * posix/regex.c (regex_compile): Correctly handle "\{" when the RE_INTERVALS is set and the RE_NO_BK_BRACES bit is not set.
2000-03-26Update.Ulrich Drepper
2000-03-20 Richard Henderson <rth@cygnus.com> * nis/nss_nis/nis-service.c (_nss_nis_getservbyport_r): Last argument to yperr2nss is an int, not size_t. * posix/regex.c (print_partial_compiled_pattern): Cast all ptrdiff_t to long for printing. (print_compiled_pattern): Use Z for printing size_t. * posix/testfnm.c (tests): Avoid trigraphs. * sysdeps/alpha/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE): Use a C comment, not an assembly comment. * sysdeps/unix/sysv/linux/alpha/msgctl.c: Clarify use of __ASSUME_32BITUIDS.
2000-03-03Update.Ulrich Drepper
2000-03-03 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/init-first.c: Remove trace of personality call.
2000-02-25Update.Ulrich Drepper
2000-02-25 Andreas Jaeger <aj@suse.de> * stdio-common/Makefile (CFLAGS-_itoa.c): The code has been fixed, we don't need to disable the warnings anymore, remove them. * elf/Makefile (CFLAGS-dl-load.c): Likewise. * posix/Makefile (CFLAGS-regex.c): Remove not needed warning flag. * posix/regex.c (regex_compile): Remove unused variables. 2000-02-25 Andreas Jaeger <aj@suse.de> * sysdeps/unix/sysv/linux/bits/msq.h (struct msqid_ds): Use __pid_t. * sysdeps/unix/sysv/linux/alpha/bits/msq.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/msq.h: Likewise. 2000-02-25 Andreas Jaeger <aj@suse.de> * locale/programs/ld-ctype.c (allocate_arrays): Add missing variable declaration.
2000-02-22Update.Ulrich Drepper
2000-02-22 Ulrich Drepper <drepper@redhat.com> * locales/mk_MK: New file. Contributed by Damjan Georgievski <gdamjan@freemail.org.mk> * SUPPORTED: Add mk_MK ISO-8859-1.
2000-01-26Update.Ulrich Drepper
2000-01-23 Paul Eggert <eggert@twinsun.com> * posix/regex.c (GET_UNSIGNED_NUMBER): Allow only ASCII digits. 2000-01-23 Paul Eggert <eggert@twinsun.com> * posix/regex.c (compile_range): When matching a character range, use the current collating sequence, as POSIX requires.
2000-01-18Update.Ulrich Drepper
2000-01-18 Ulrich Drepper <drepper@cygnus.com> * posix/regex.h (RE_SYNTAX_POSIX_EXTENDED): Add RE_CONTEXT_INVALID_OPS. * posix/regex.c (regex_compile): Return appropriate errors for unterminated brace expressions. Detect invalid characters in brace expressions. * posix/bits/posix2_lim.h: Define RE_DUP_MAX correctly. * sysdeps/posix/sysconf.c: Include regex.h. Reported by Geoff Clare <gwc@unisoft.com> (PR libc/1522).
1999-12-31(collate_output): Update.Ulrich Drepper
* locale/programs/ld-collate.c (collate_output): Emit correct information for collation elements. Don't write over end of array idx. * posix/regex.c: Handle also collation elements at end of range. * posix/PTESTS: Fix a few typos.
1999-12-31Update.Ulrich Drepper
1999-12-31 Ulrich Drepper <drepper@cygnus.com> * locale/langinfo.h: Add constants for wide character collation symbol table. * locale/categories.def: Add appropriate entries for collate symbol table entries. * locale/C-collate.c: Add initializers for new entries. Remove commented out code. * locale/elem-hash.h: New file. * locale/Makefile (distribute): Add elem-hash.h. * locale/programs/ld-collate.c: Implement output of collate symbol table. * posix/regex.c: Implement collation class handling.
1999-12-31(regex_compile): Implement equivalence class handling.Ulrich Drepper
1999-12-03(SYNTAX): Add braces for correct evaluation.Ulrich Drepper
1999-12-02(SYNTAX): Make more portable.Ulrich Drepper
1999-11-10Update.Ulrich Drepper
1999-11-09 Ulrich Drepper <drepper@cygnus.com> * elf/dl-load.c (_dl_dst_count): Allow $ORIGIN to point to directory with the reference since this is as secure as using the object with the dependency. (_dl_dst_substitute): Likewise. * elf/dl-load.c (_dl_dst_count): Change strings in first two strncmp calls to allow reuse. (_dl_dst_substitute): Likewise. 1999-11-01 Arnold D. Robbins <arnold@skeeve.com> * posix/regex.c (init_syntax_once): move below definition of ISALNUM etc., then use ISALNUM to init the table, so that the word ops will work if i18n'ed. (SYNTAX): And subscript with 0xFF for 8bit character sets. 1999-11-09 Andreas Jaeger <aj@suse.de> * sysdeps/unix/getlogin_r.c (getlogin_r): Sync with getlogin implementation for ttyname_r call; fix inverted condition; return ut_user. Closes PR libc/1438. 1999-11-09 Ulrich Drepper <drepper@cygnus.com> * timezone/checktab.awk: Update from tzcode1999h. * timezone/africa: Update from tzdata1999i. * timezone/asia: Likewise. * timezone/australasia: Likewise. * timezone/backward: Likewise. * timezone/europe: Likewise. * timezone/northamerica: Likewise. * timezone/southamerica: Likewise. * timezone/iso3166.tab: Likewise. * timezone/zone.tab: Likewise. * sysdeps/unix/sysv/linux/bits/resource.h: Define values also as macros. Patch by brg@csua.berkeley.edu [PR libc/1439]. 1999-11-09 Andreas Jaeger <aj@suse.de> * posix/Makefile (tests): Added tst-getlogin. * posix/tst-getlogin.c: New file, contains simple tests for getlogin and getlogin_r. 1999-11-09 Andreas Schwab <schwab@suse.de> * misc/syslog.c: For LOG_PERROR only append a newline if necessary.
1999-08-23Update.Ulrich Drepper
1999-08-23Update.Ulrich Drepper
1999-08-23 Ulrich Drepper <drepper@cygnus.com> * posix/regexbug1.c: Make it an error if the test fails. 1999-08-23 Andreas Schwab <schwab@suse.de> Ulrich Drepper <drepper@cygnus.com> * posix/regex.c (re_match_2_internal): Correct check for charset after exactn in loop.
1999-06-15Update.Ulrich Drepper
1999-06-15 Ulrich Drepper <drepper@cygnus.com> * posix/regex.c (re_error_msgid): Remove extra commas.
1999-04-28Update.Ulrich Drepper
1999-04-28 Ulrich Drepper <drepper@cygnus.com> * argp/argp-ba.c (argp_program_bug_address): Don't initialize with 0. * argp/argp-parse.c (_argp_hang): Likewise. * argp/argp-pv.c (argp_program_version): Likewise. * argp/argp-pvh.c (argp_program_version_hook): Likewise. * inet/ether_hton.c (ether_hton, startp): Likewise. * inet/ether_ntoh.c (ether_ntoh, startp): Likewise. * inet/getnetgrent_r.c (setup, startp): Likewise. * intl/loadmsgcat.c (_nl_msg_cat_cntr): Likewise. * intl/localealias.c (string_space, string_space_act, string_space_max, nmap, maxmap): Likewise. * libio/iopopen.c (proc_file_chain): Likewise. * libio/oldiopopen.c (old_proc_file_chain): Likewise. * locale/lc-collate.c (__collate_table, __collate_extra, __collate_element_hash, __collate_element_strings, __collate_element_values): Likewise. * malloc/mcheck.c (mcheck_used): Likewise. * malloc/mtrace.c (added_atexit_handler): Likewise. * malloc/set-freeres.c (already_called): Likewise. * misc/getpass.c (getpass) [buf, bufsize]: Likewise. * misc/syslog.c (LogStat, LogTag): Likewise. * nss/XXX-lookup.c (DATABASE_NAME_SYMBOL): Likewise. * nss/getXXbyYY_r.c (startp): Likewise. * posix/getopt.c (optarg, __getopt_initialized): Likewise. * posix/regex.c (init_syntax_once) [done]: Likewise. (debug): Likewise. * string/strfry.c (init): Likewise. * sunrpc/svc_run.c (svc_top): Likewise. * posix/euidaccess.c (have_ids): Likewise. * sysdeps/unix/sysv/linux/poll.c (must_emulate): Likewise. * sysdeps/unix/sysv/linux/ttyname.c (__ttyname, namelen): Likewise. * time/getdate.c (getdate_err): Likewise. * time/tzfile.c (transitions, type_idxs, types, zone_names, leaps): Likewise. * time/tzset.c (old_tz, is_initialized): Likewise. * inet/getnameinfo.c (nrl_domainname): Rewrite to allow initialization of static data with zero. * signal/allocrtsig.c (init): Likewise. * string/Makefile (routines): Add strchrnul. * string/Versions [GLIBC_2.1.1]: Add strchrnul. * string/string.c: Add strchrnul prototype. * include/string.h: Add __strchrnul prototype. * sysdeps/generic/strchrnul.c: New file. * sysdeps/i386/strchrnul.S: New file. * sysdeps/i386/bits/string.c: Add strchrnul optimization. * sysdeps/i386/i486/bits/string.c: Likewise. * argp/argp-help.c (argp_args_usage): Use __strchrnul. * inet/ether_line.c (ether_line): Likewise. * nscd/nscd_conf.c (nscd_parse_file): Likewise. * nss/nsswitch.c (nss_parse_file): Likewise. * posix/execvp.c (execvp): Likewise. * posix/fnmatch.c (internal_fnmatch): Likewise. * resolv/res_hconf.c (_res_hconv_init): Likewise. * resolv/res_init.c (res_init): Likewise. * stdlib/fmtmsg.c (init): Likewise. * stdlib/getsubopt.c (getsubopt): Likewise. * catgets/catgets.c (catopen): Only allocate one memory block. (catclose): Only one free call necessary. * catgets/open_catalog.c (__open_catalog): Simplify handling of file descriptor. * ctype/ctype-extn.c: Make __toascii_l and __isascii_l alias instead of real functions. Simplify _tolower and _toupper. * grp/initgroups.c (compat_call): Remove unnecessary use of pointer variable. * iconv/gconv.h (struct gconv_info): Change data element from pointer to array of size 0. * iconv/gconv_open.c (__gconv_open): Allocate structures accordingly. * iconv/gconv_close.c (__gconv_close): Don't free data. * iconv/gconv_conf.c (add_alias): Avoid searching in tree twice to insert new alias. * iconv/gconv_db.c (add_derivation): More efficient copying. Check for error while inserting in tree. * include/time.h: Pretty print. * inet/ruserpass.c: Rewrite use of toktab to avoid string pointers in table and lots of relocations. * posix/regex.c (regerror): Rewrite use of re_error_msgid to avoid string pointers in table and lots of relocations. * intl/finddomain.c: Remove definition of strchr macro. * io/ftw.c (nftw_arr, ftw_arr): Make const. * locale/loadlocale.c (_nl_load_locale): Optimize string copying. * locale/localeinfo.h (_nl_category_names): Change into an array with fixed width char string elements. * locale/setlocale.c (_nl_category_names): Likewise. (_nl_current): Make global. * locale/nl_langinfo.c (nldata): Removed. Use _nl_current now. * malloc/Makefile (distribute): Add stackinfo.h. * sysdeps/generic/stackinfo.h: New file. * sysdeps/i386/stackinfo.h: New file. * posix/execl.c: Use stackinfo.h in optimizing alloca use. * posix/execle.c: Likewise. * posix/execlp.c: Likewise. * nis/nis_table.c (__create_ib_request): Always use realloc. * posix/execvp.c (execute): Rename to script_execute and keep only code to execute using shell. (execvp): Call execv directly and only fall back on script_execute. * resolv/inet_net_pton.c (inet_net_pton_ipv4): Remove digits define and always use xdigits instead. * resolv/res_init.c (res_init): Use rawmemchr instead of strchr where appropriate. * stdlib/fpioconst.h (__tens): New declaration. (struct mp_power): Remove array, add arrayoff element. * stdlib/fpioconst.c: Replace definitions of _ten_p* arrays by one __tens array and add in _fpioconst_pow10 offsets into __tens. * stdio-common/printf_fp.c: Rewrite to use new __tens array. * stdlib/strtod.c: Likewise. * stdlib/a64l.c (a64l_table): Avoid unnecessary elements. * stdlib/exit.c: Rewrite to use __exit_funcs being as sign for end of the list. * stdlib/atexit.c (__exit_funcs): Don't initialize. * stdlib/fmtmsg.c (keywords): Make name element fixed width array. * sunrpc/clnt_perr.c: Rewrite clnt_sperrno and auth_errmsg to use a single and an array with offsets. * sunrpc/des_soft.c (partab): Make it const. * sunrpc/key_call.c (trytimeout, tottimeout): Make const. (__key_encryptsession_pk_LOCAL): Don't initialize with 0. (__key_decryptsession_pk_LOCAL): Likewise. (__key_gendes_LOCAL): Likewise. (MESSENGER): Mark const. (key_call_private_main): Don't initialize with 0. (use_keyenvoy): Don't initialize with 0. (key_call): Rewrite to reverse logic of use_doors variable. * sunrpc/netname.c (OPSYS): Define as array, not pointer. (startp): Don't initialize with zero. * sunrpc/openchild.c (_openchild): Make first argument const. * sunrpc/pmap_rmt.c (timeout): Mark const. * sunrpc/xcrypt.c (hex): Likewise. * sysdeps/unix/sysv/linux/getcwd.c: Rewrite to allow omitting initialization of global variables. * sysdeps/unix/sysv/linux/getpt.c: Likewise. * sysdeps/unix/sysv/linux/if_index.c: Likewise. * termios/tcgetsid.c: Likewise. * sysdeps/unix/sysv/linux/i386/dl-procinfo.h (x86_cap_flags): Change fxsr to osfxsr. * time/tzfile.c (__tzfile_read): Rewrite to allocate only one memory block. Add function to free memory if wanted. * time/tzset.c (tzset_internal): Pass extra argument to __tzfile_read. * wcsmbs/wcsmbsload.c (to_wc, to_mb): Correct initializers. * wcsmbs/wmemset.c: Little code optimization.
1999-01-23Update.Ulrich Drepper
1999-01-23 Ulrich Drepper <drepper@cygnus.com> * nss/nss_files/files-XXX.c (internal_getent): Make sure the buffer has at least two bytes (not one). Correct buflen parameter type. * nss/nss_files/files-alias.c (get_next_alias): Make sure buffer has at least two bytes. Use fgets_unlocked instead of fgets. * ctype/ctype.h: Don't user __tolower directly for tolower implementation. Use inline function which tests for the range first. Make _tolower equivalent to old tolower macros. Likewise for toupper. * ctype/ctype.c: Change tolower/toupper definition accordingly. * argp/argp-help.c: Use _tolower instead of tolower if possible. * inet/ether_aton_r.c: Likewise. * inet/ether_line.c: Likewise. * inet/rcmd.c: Likewise. * intl/l10nflist.c: Likewise. * locale/programs/ld-collate.c: Likewise. * locale/programs/linereader.c: Likewise. * locale/programs/localedef.c: Likewise. * nis/nss_nis/nis-alias.c: Likewise. * nis/nss_nis/nis-network.c: Likewise. * posix/regex.c: Likewise. * resolv/inet_net_pton.c: Likewise. * stdio-common/printf_fp.c: Likewise. * stdio-common/vfscanf.c: Likewise. * sysdeps/generic/strcasestr.c: Likewise. * math/bits/mathcalls.h: Fix typo.