1995-05-18 09:00:09 +00:00
|
|
|
|
/* Definitions for data structures and routines for the regular
|
2002-02-26 19:06:03 +00:00
|
|
|
|
expression library.
|
2024-01-01 18:12:26 +00:00
|
|
|
|
Copyright (C) 1985, 1989-2024 Free Software Foundation, Inc.
|
2002-02-26 19:06:03 +00:00
|
|
|
|
This file is part of the GNU C Library.
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
1996-11-15 04:08:00 +00:00
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
1996-11-15 04:08:00 +00:00
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 04:58:11 +00:00
|
|
|
|
Lesser General Public License for more details.
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
|
License along with the GNU C Library; if not, see
|
2017-12-20 11:47:44 +00:00
|
|
|
|
<https://www.gnu.org/licenses/>. */
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
1997-06-21 02:59:26 +00:00
|
|
|
|
#ifndef _REGEX_H
|
|
|
|
|
#define _REGEX_H 1
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2003-04-17 19:19:29 +00:00
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
1997-02-19 04:43:53 +00:00
|
|
|
|
/* Allow the use in C++ code. */
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* Define __USE_GNU to declare GNU extensions that violate the
|
|
|
|
|
POSIX name space rules. */
|
|
|
|
|
#ifdef _GNU_SOURCE
|
|
|
|
|
# define __USE_GNU 1
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef _REGEX_LARGE_OFFSETS
|
|
|
|
|
|
|
|
|
|
/* Use types and values that are wide enough to represent signed and
|
|
|
|
|
unsigned byte offsets in memory. This currently works only when
|
|
|
|
|
the regex code is used outside of the GNU C library; it is not yet
|
|
|
|
|
supported within glibc itself, and glibc users should not define
|
|
|
|
|
_REGEX_LARGE_OFFSETS. */
|
|
|
|
|
|
|
|
|
|
/* The type of object sizes. */
|
|
|
|
|
typedef size_t __re_size_t;
|
|
|
|
|
|
|
|
|
|
/* The type of object sizes, in places where the traditional code
|
|
|
|
|
uses unsigned long int. */
|
|
|
|
|
typedef size_t __re_long_size_t;
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
/* The traditional GNU regex implementation mishandles strings longer
|
|
|
|
|
than INT_MAX. */
|
|
|
|
|
typedef unsigned int __re_size_t;
|
|
|
|
|
typedef unsigned long int __re_long_size_t;
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
Update.
1997-03-08 05:30 Ulrich Drepper <drepper@cygnus.com>
* argp/Makefile (routines): Add argp-eexst.
* argp/argp-ba.c (argp_program_bug_address): Make `const'.
* argp/argp-eexst.c: New file. Define exit status variable.
* argp/argp-help.c (__argp_state_help): Use argp_err_exit_status
variable instead of always exiting with value 1.
* argp/argp-pv.c (argp_program_version): Make `const'.
* argp/argp.h: Declare argp_err_exit_status.
Patches by Miles Bader <miles@gnu.ai.mit.edu>.
* locale/programs/localedef.c: Use argp_err_exit_status to
terminate with correct value.
* inet/rcmd.c (iruserok): Use euidaccess instead of half-hearted
switching of UID before opening .rhosts.
* libio/vsnprintf.c: Change implementation to follow ISO C 9X
proposal. The return value now is always the number of characters
which would be written if enough space is available.
* manual/stdio.texi: Update description for new behaviour.
* locale/locale.h (__locale_t): Don't use __locale_t for struct
name and pointer to struct since old gccs cannot keep the namespaces
apart. Rename struct to __locale_struct.
* locale/duplocale.h: Likewise.
* locale/newlocale.h: Likewise.
* math/Makefile (headers): Add complex.h and cmathcalls.h.
(routines): Remove w_cabs. Add conj, cimag, creal, and cabs.
* math/math.h: Undefine __MATHDECL_1, __MATHDECL, and __MATHCALL
after use.
(signgam): Move declaration to here from mathcalls.h.
* math/mathcalls.h (cabs, __cabs_complex, signgam): Remove definition.
Correct comment for fmin and fmax.
Start implementing complex math function from ISO C 9X.
* math/complex.h: New file.
* math/cmathcalls.h: New file.
* math/cabs.c: New file.
* math/cabsf.c: New file.
* math/cabsl.c: New file.
* math/cimag.c: New file.
* math/cimagf.c: New file.
* math/cimagl.c: New file.
* math/conj.c: New file.
* math/conjf.c: New file.
* math/conjl.c: New file.
* math/creal.c: New file.
* math/crealf.c: New file.
* math/creall.c: New file.
* sysdeps/libm-ieee754/w_cabs.c: Removed.
* sysdeps/libm-ieee754/w_cabsf.c: Removed.
* sysdeps/libm-ieee754/w_cabsl.c: Removed.
* posix/regex.c: Merge with regex sources from Arnold Robbins'
version in GNU awk.
* posix/regex.h: Likewise.
Add regex test suite by Tom Lord.
* posix/Makefile (distribute): Add TESTS, TESTS2C.sed, and testcases.h.
(tests): Add runtests.
(before-compile): Add testcases.h.
(testcases.h): New rule to generate header with tests.
* posix/TESTS: New file.
* posix/TESTS2C.sed.: New file.
* posix/runtests.c: New file.
* posix/testcases.h: New file.
* sysdeps/unix/sysv/linux/poll.c: Test whether poll syscall is
available and use fall-back implementation if not.
* sysdeps/unix/sysv/linux/syscalls.list: Sort entries.
* time/ialloc.c: Update from tzcode1997c.
* time/private.h: Likewise.
* time/scheck.c: Likewise.
* time/tzselect.ksh: Likewise.
* time/zdump.c: Likewise.
* time/zic.c: Likewise.
* time/tzfile.c: Pretty print.
1997-03-06 07:37 Geoff Keating <geoffk@ozemail.com.au>
Port to powerpc-*-linux-gnu. Slightly tested, under MkLinux,
on a 601.
* sysdeps/powerpc/Implies: Added.
* sysdeps/powerpc/__longjmp.S: Added.
* sysdeps/powerpc/__math.h: Added.
* sysdeps/powerpc/bsd-_setjmp.S: Added.
* sysdeps/powerpc/bsd-setjmp.S: Added.
* sysdeps/powerpc/dl-machine.h: Added.
* sysdeps/powerpc/ffs.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/powerpc/setjmp.S: Added.
* sysdeps/powerpc/strlen.s: Added.
* sysdeps/powerpc/elf/start.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/unix/sysv/linux/powerpc/Dist: Added.
* sysdeps/unix/sysv/linux/powerpc/_exit.S: Added.
* sysdeps/unix/sysv/linux/powerpc/brk.c: Added.
* sysdeps/unix/sysv/linux/powerpc/clone.S: Added.
* sysdeps/unix/sysv/linux/powerpc/init-first.h: Added.
* sysdeps/unix/sysv/linux/powerpc/ioctl-types.h: Added.
* sysdeps/unix/sysv/linux/powerpc/profil.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sigreturn.S: Added.
* sysdeps/unix/sysv/linux/powerpc/socket.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscall.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.h: Added.
* sysdeps/unix/sysv/linux/powerpc/termbits.h: Added.
* sysdeps/unix/sysv/linux/powerpc/sys/syscall.h: Added.
1997-03-05 05:24 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-runtime.c (fixup): Add ELF_FIXUP_RETURNS_ADDRESS switch,
because knowing the first instruction of a PowerPC PLT trampoline
is not very helpful.
1997-03-04 08:04 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-load.c (ELF_PREFERRED_ADDRESS, ELF_PREFERRED_ADDRESS_DATA,
ELF_FIXED_ADDRESS): Added. These are for dl-machine.h to indicate
a preference as to where executables should be loaded.
1997-02-28 08:50 Geoff Keating <geoffk@ozemail.com.au>
* elf/elf.h: Add in all those PowerPC reloc types.
1997-02-24 07:12 Geoff Keating <geoffk@ozemail.com.au>
* stdio-common/vfscanf.c: Use __va_copy if available.
1997-03-06 13:50 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/malloc.c (mprotect) [_LIBC]: Define as __mprotect to
clean up namespace.
1997-03-07 14:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_fpclassify.c (__fpclassify): Don't use
non-existing GET_WORDS macro, use EXTRACT_WORDS.
Reported by Andres Schwab <schwab@issan.informatik.uni-dortmund.de>.
1997-03-07 05:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/i386/sigaction.c: The user- and
kernel-level sigaction structure is different. handle this
correctly.
Bug report by Andres Jaeger <jaeger@informatik.uni-kl.de>.
1997-03-06 05:55 David Engel <david@sw.ods.com>
* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Also
recognize cache entries with flag == 3.
1997-03-06 01:05 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/netinet/in.h (INADDR_NONE): Cast to unsigned int.
(INADDR_LOOPBACK): Likewise.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
* manual/socket.texi: Correct types of INADDR_* constants from
unsigned long to unsigned.
1997-03-05 23:14 Ulrich Drepper <drepper@cygnus.com>
* time/antarctica: Update from tzdata1997c.
* time/asia: Likewise.
* time/zone.tab: Likewise.
1997-03-05 00:43 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* configure.in (libc_cv_asm_symver_directive,
libc_cv_ld_version_script_option): Remove unknown instruction from
assembler test file.
1997-03-04 19:14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/__math.h: Update feature tests to use
__USE_ISOC9X.
[__USE_ISOC9X]: Define __log2 and __exp2 inlines.
(fabs): Remove defininition, it is a gcc builtin.
(sqrt, __sqrt): Remove definition, they have wrappers in libm.
1997-03-04 10:11 H.J. Lu <hjl@lucon.org>
* sunrpc/Makefile ($(objpfx)rpc-proto.c): Create subdir before
generating file.
1997-03-05 03:59 Ulrich Drepper <drepper@cygnus.com>
* inet/rcmd.c (__ivaliduser): Don't use getline, but __getline
instead to avoid namespace problems.
Reported by David Mosberger-Tang <davidm@AZStarNet.COM>.
1997-03-03 19:01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* login/utmp_file.c: Fix previous change. Make portable by
checking the _HAVE_UT_* feature macros.
* libio/fileops.c (_IO_file_finish): Likewise.
1997-03-08 05:28:20 +00:00
|
|
|
|
/* The following two types have to be signed and unsigned integer type
|
|
|
|
|
wide enough to hold a value of a pointer. For most ANSI compilers
|
|
|
|
|
ptrdiff_t and size_t should be likely OK. Still size of these two
|
|
|
|
|
types is 2 for Microsoft C. Ugh... */
|
|
|
|
|
typedef long int s_reg_t;
|
|
|
|
|
typedef unsigned long int active_reg_t;
|
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
|
/* The following bits are used to determine the regexp syntax we
|
|
|
|
|
recognize. The set/not-set meanings are chosen so that Emacs syntax
|
|
|
|
|
remains the value 0. The bits are given in alphabetical order, and
|
|
|
|
|
the definitions shifted by one from the previous bit; thus, when we
|
|
|
|
|
add or remove a bit, only one other definition need change. */
|
Update.
1997-03-08 05:30 Ulrich Drepper <drepper@cygnus.com>
* argp/Makefile (routines): Add argp-eexst.
* argp/argp-ba.c (argp_program_bug_address): Make `const'.
* argp/argp-eexst.c: New file. Define exit status variable.
* argp/argp-help.c (__argp_state_help): Use argp_err_exit_status
variable instead of always exiting with value 1.
* argp/argp-pv.c (argp_program_version): Make `const'.
* argp/argp.h: Declare argp_err_exit_status.
Patches by Miles Bader <miles@gnu.ai.mit.edu>.
* locale/programs/localedef.c: Use argp_err_exit_status to
terminate with correct value.
* inet/rcmd.c (iruserok): Use euidaccess instead of half-hearted
switching of UID before opening .rhosts.
* libio/vsnprintf.c: Change implementation to follow ISO C 9X
proposal. The return value now is always the number of characters
which would be written if enough space is available.
* manual/stdio.texi: Update description for new behaviour.
* locale/locale.h (__locale_t): Don't use __locale_t for struct
name and pointer to struct since old gccs cannot keep the namespaces
apart. Rename struct to __locale_struct.
* locale/duplocale.h: Likewise.
* locale/newlocale.h: Likewise.
* math/Makefile (headers): Add complex.h and cmathcalls.h.
(routines): Remove w_cabs. Add conj, cimag, creal, and cabs.
* math/math.h: Undefine __MATHDECL_1, __MATHDECL, and __MATHCALL
after use.
(signgam): Move declaration to here from mathcalls.h.
* math/mathcalls.h (cabs, __cabs_complex, signgam): Remove definition.
Correct comment for fmin and fmax.
Start implementing complex math function from ISO C 9X.
* math/complex.h: New file.
* math/cmathcalls.h: New file.
* math/cabs.c: New file.
* math/cabsf.c: New file.
* math/cabsl.c: New file.
* math/cimag.c: New file.
* math/cimagf.c: New file.
* math/cimagl.c: New file.
* math/conj.c: New file.
* math/conjf.c: New file.
* math/conjl.c: New file.
* math/creal.c: New file.
* math/crealf.c: New file.
* math/creall.c: New file.
* sysdeps/libm-ieee754/w_cabs.c: Removed.
* sysdeps/libm-ieee754/w_cabsf.c: Removed.
* sysdeps/libm-ieee754/w_cabsl.c: Removed.
* posix/regex.c: Merge with regex sources from Arnold Robbins'
version in GNU awk.
* posix/regex.h: Likewise.
Add regex test suite by Tom Lord.
* posix/Makefile (distribute): Add TESTS, TESTS2C.sed, and testcases.h.
(tests): Add runtests.
(before-compile): Add testcases.h.
(testcases.h): New rule to generate header with tests.
* posix/TESTS: New file.
* posix/TESTS2C.sed.: New file.
* posix/runtests.c: New file.
* posix/testcases.h: New file.
* sysdeps/unix/sysv/linux/poll.c: Test whether poll syscall is
available and use fall-back implementation if not.
* sysdeps/unix/sysv/linux/syscalls.list: Sort entries.
* time/ialloc.c: Update from tzcode1997c.
* time/private.h: Likewise.
* time/scheck.c: Likewise.
* time/tzselect.ksh: Likewise.
* time/zdump.c: Likewise.
* time/zic.c: Likewise.
* time/tzfile.c: Pretty print.
1997-03-06 07:37 Geoff Keating <geoffk@ozemail.com.au>
Port to powerpc-*-linux-gnu. Slightly tested, under MkLinux,
on a 601.
* sysdeps/powerpc/Implies: Added.
* sysdeps/powerpc/__longjmp.S: Added.
* sysdeps/powerpc/__math.h: Added.
* sysdeps/powerpc/bsd-_setjmp.S: Added.
* sysdeps/powerpc/bsd-setjmp.S: Added.
* sysdeps/powerpc/dl-machine.h: Added.
* sysdeps/powerpc/ffs.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/powerpc/setjmp.S: Added.
* sysdeps/powerpc/strlen.s: Added.
* sysdeps/powerpc/elf/start.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/unix/sysv/linux/powerpc/Dist: Added.
* sysdeps/unix/sysv/linux/powerpc/_exit.S: Added.
* sysdeps/unix/sysv/linux/powerpc/brk.c: Added.
* sysdeps/unix/sysv/linux/powerpc/clone.S: Added.
* sysdeps/unix/sysv/linux/powerpc/init-first.h: Added.
* sysdeps/unix/sysv/linux/powerpc/ioctl-types.h: Added.
* sysdeps/unix/sysv/linux/powerpc/profil.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sigreturn.S: Added.
* sysdeps/unix/sysv/linux/powerpc/socket.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscall.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.h: Added.
* sysdeps/unix/sysv/linux/powerpc/termbits.h: Added.
* sysdeps/unix/sysv/linux/powerpc/sys/syscall.h: Added.
1997-03-05 05:24 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-runtime.c (fixup): Add ELF_FIXUP_RETURNS_ADDRESS switch,
because knowing the first instruction of a PowerPC PLT trampoline
is not very helpful.
1997-03-04 08:04 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-load.c (ELF_PREFERRED_ADDRESS, ELF_PREFERRED_ADDRESS_DATA,
ELF_FIXED_ADDRESS): Added. These are for dl-machine.h to indicate
a preference as to where executables should be loaded.
1997-02-28 08:50 Geoff Keating <geoffk@ozemail.com.au>
* elf/elf.h: Add in all those PowerPC reloc types.
1997-02-24 07:12 Geoff Keating <geoffk@ozemail.com.au>
* stdio-common/vfscanf.c: Use __va_copy if available.
1997-03-06 13:50 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/malloc.c (mprotect) [_LIBC]: Define as __mprotect to
clean up namespace.
1997-03-07 14:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_fpclassify.c (__fpclassify): Don't use
non-existing GET_WORDS macro, use EXTRACT_WORDS.
Reported by Andres Schwab <schwab@issan.informatik.uni-dortmund.de>.
1997-03-07 05:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/i386/sigaction.c: The user- and
kernel-level sigaction structure is different. handle this
correctly.
Bug report by Andres Jaeger <jaeger@informatik.uni-kl.de>.
1997-03-06 05:55 David Engel <david@sw.ods.com>
* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Also
recognize cache entries with flag == 3.
1997-03-06 01:05 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/netinet/in.h (INADDR_NONE): Cast to unsigned int.
(INADDR_LOOPBACK): Likewise.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
* manual/socket.texi: Correct types of INADDR_* constants from
unsigned long to unsigned.
1997-03-05 23:14 Ulrich Drepper <drepper@cygnus.com>
* time/antarctica: Update from tzdata1997c.
* time/asia: Likewise.
* time/zone.tab: Likewise.
1997-03-05 00:43 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* configure.in (libc_cv_asm_symver_directive,
libc_cv_ld_version_script_option): Remove unknown instruction from
assembler test file.
1997-03-04 19:14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/__math.h: Update feature tests to use
__USE_ISOC9X.
[__USE_ISOC9X]: Define __log2 and __exp2 inlines.
(fabs): Remove defininition, it is a gcc builtin.
(sqrt, __sqrt): Remove definition, they have wrappers in libm.
1997-03-04 10:11 H.J. Lu <hjl@lucon.org>
* sunrpc/Makefile ($(objpfx)rpc-proto.c): Create subdir before
generating file.
1997-03-05 03:59 Ulrich Drepper <drepper@cygnus.com>
* inet/rcmd.c (__ivaliduser): Don't use getline, but __getline
instead to avoid namespace problems.
Reported by David Mosberger-Tang <davidm@AZStarNet.COM>.
1997-03-03 19:01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* login/utmp_file.c: Fix previous change. Make portable by
checking the _HAVE_UT_* feature macros.
* libio/fileops.c (_IO_file_finish): Likewise.
1997-03-08 05:28:20 +00:00
|
|
|
|
typedef unsigned long int reg_syntax_t;
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2008-01-16 10:11:18 +00:00
|
|
|
|
#ifdef __USE_GNU
|
1995-05-18 09:00:09 +00:00
|
|
|
|
/* If this bit is not set, then \ inside a bracket expression is literal.
|
|
|
|
|
If set, then such a \ quotes the following character. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is not set, then + and ? are operators, and \+ and \? are
|
1996-11-15 04:08:00 +00:00
|
|
|
|
literals.
|
1995-05-18 09:00:09 +00:00
|
|
|
|
If set, then \+ and \? are operators and + and ? are literals. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, then character classes are supported. They are:
|
|
|
|
|
[:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:],
|
|
|
|
|
[:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
|
|
|
|
|
If not set, then character classes are not supported. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, then ^ and $ are always anchors (outside bracket
|
|
|
|
|
expressions, of course).
|
|
|
|
|
If this bit is not set, then it depends:
|
2011-05-16 14:28:44 +00:00
|
|
|
|
^ is an anchor if it is at the beginning of a regular
|
|
|
|
|
expression or after an open-group or an alternation operator;
|
|
|
|
|
$ is an anchor if it is at the end of a regular expression, or
|
|
|
|
|
before a close-group or an alternation operator.
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
|
|
|
|
|
POSIX draft 11.2 says that * etc. in leading positions is undefined.
|
|
|
|
|
We already implemented a previous draft which made those constructs
|
|
|
|
|
invalid, though, so we haven't changed the code back. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, then special characters are always special
|
|
|
|
|
regardless of where they are in the pattern.
|
|
|
|
|
If this bit is not set, then special characters are special only in
|
1996-11-15 04:08:00 +00:00
|
|
|
|
some contexts; otherwise they are ordinary. Specifically,
|
1995-05-18 09:00:09 +00:00
|
|
|
|
* + ? and intervals are only special when not after the beginning,
|
|
|
|
|
open-group, or alternation operator. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, then *, +, ?, and { cannot be first in an re or
|
|
|
|
|
immediately after an alternation or begin-group operator. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, then . matches newline.
|
|
|
|
|
If not set, then it doesn't. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, then . doesn't match NUL.
|
|
|
|
|
If not set, then it does. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, nonmatching lists [^...] do not match newline.
|
|
|
|
|
If not set, they do. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, either \{...\} or {...} defines an
|
1996-11-15 04:08:00 +00:00
|
|
|
|
interval, depending on RE_NO_BK_BRACES.
|
1995-05-18 09:00:09 +00:00
|
|
|
|
If not set, \{, \}, {, and } are literals. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, +, ? and | aren't recognized as operators.
|
|
|
|
|
If not set, they are. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_LIMITED_OPS (RE_INTERVALS << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, newline is an alternation operator.
|
|
|
|
|
If not set, newline is literal. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* If this bit is set, then '{...}' defines an interval, and \{ and \}
|
1995-05-18 09:00:09 +00:00
|
|
|
|
are literals.
|
2017-12-20 11:47:44 +00:00
|
|
|
|
If not set, then '\{...\}' defines an interval. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, (...) defines a group, and \( and \) are literals.
|
|
|
|
|
If not set, \(...\) defines a group, and ( and ) are literals. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, then \<digit> matches <digit>.
|
|
|
|
|
If not set, then \<digit> is a back-reference. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
1996-11-15 04:08:00 +00:00
|
|
|
|
/* If this bit is set, then | is an alternation operator, and \| is literal.
|
1995-05-18 09:00:09 +00:00
|
|
|
|
If not set, then \| is an alternation operator, and | is literal. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, then an ending range point collating higher
|
|
|
|
|
than the starting range point, as in [z-a], is invalid.
|
|
|
|
|
If not set, then when ending range point collates higher than the
|
|
|
|
|
starting range point, the range is ignored. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, then an unmatched ) is ordinary.
|
|
|
|
|
If not set, then an unmatched ) is invalid. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, succeed as soon as we match the whole pattern,
|
|
|
|
|
without further backtracking. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
Update.
1997-03-08 05:30 Ulrich Drepper <drepper@cygnus.com>
* argp/Makefile (routines): Add argp-eexst.
* argp/argp-ba.c (argp_program_bug_address): Make `const'.
* argp/argp-eexst.c: New file. Define exit status variable.
* argp/argp-help.c (__argp_state_help): Use argp_err_exit_status
variable instead of always exiting with value 1.
* argp/argp-pv.c (argp_program_version): Make `const'.
* argp/argp.h: Declare argp_err_exit_status.
Patches by Miles Bader <miles@gnu.ai.mit.edu>.
* locale/programs/localedef.c: Use argp_err_exit_status to
terminate with correct value.
* inet/rcmd.c (iruserok): Use euidaccess instead of half-hearted
switching of UID before opening .rhosts.
* libio/vsnprintf.c: Change implementation to follow ISO C 9X
proposal. The return value now is always the number of characters
which would be written if enough space is available.
* manual/stdio.texi: Update description for new behaviour.
* locale/locale.h (__locale_t): Don't use __locale_t for struct
name and pointer to struct since old gccs cannot keep the namespaces
apart. Rename struct to __locale_struct.
* locale/duplocale.h: Likewise.
* locale/newlocale.h: Likewise.
* math/Makefile (headers): Add complex.h and cmathcalls.h.
(routines): Remove w_cabs. Add conj, cimag, creal, and cabs.
* math/math.h: Undefine __MATHDECL_1, __MATHDECL, and __MATHCALL
after use.
(signgam): Move declaration to here from mathcalls.h.
* math/mathcalls.h (cabs, __cabs_complex, signgam): Remove definition.
Correct comment for fmin and fmax.
Start implementing complex math function from ISO C 9X.
* math/complex.h: New file.
* math/cmathcalls.h: New file.
* math/cabs.c: New file.
* math/cabsf.c: New file.
* math/cabsl.c: New file.
* math/cimag.c: New file.
* math/cimagf.c: New file.
* math/cimagl.c: New file.
* math/conj.c: New file.
* math/conjf.c: New file.
* math/conjl.c: New file.
* math/creal.c: New file.
* math/crealf.c: New file.
* math/creall.c: New file.
* sysdeps/libm-ieee754/w_cabs.c: Removed.
* sysdeps/libm-ieee754/w_cabsf.c: Removed.
* sysdeps/libm-ieee754/w_cabsl.c: Removed.
* posix/regex.c: Merge with regex sources from Arnold Robbins'
version in GNU awk.
* posix/regex.h: Likewise.
Add regex test suite by Tom Lord.
* posix/Makefile (distribute): Add TESTS, TESTS2C.sed, and testcases.h.
(tests): Add runtests.
(before-compile): Add testcases.h.
(testcases.h): New rule to generate header with tests.
* posix/TESTS: New file.
* posix/TESTS2C.sed.: New file.
* posix/runtests.c: New file.
* posix/testcases.h: New file.
* sysdeps/unix/sysv/linux/poll.c: Test whether poll syscall is
available and use fall-back implementation if not.
* sysdeps/unix/sysv/linux/syscalls.list: Sort entries.
* time/ialloc.c: Update from tzcode1997c.
* time/private.h: Likewise.
* time/scheck.c: Likewise.
* time/tzselect.ksh: Likewise.
* time/zdump.c: Likewise.
* time/zic.c: Likewise.
* time/tzfile.c: Pretty print.
1997-03-06 07:37 Geoff Keating <geoffk@ozemail.com.au>
Port to powerpc-*-linux-gnu. Slightly tested, under MkLinux,
on a 601.
* sysdeps/powerpc/Implies: Added.
* sysdeps/powerpc/__longjmp.S: Added.
* sysdeps/powerpc/__math.h: Added.
* sysdeps/powerpc/bsd-_setjmp.S: Added.
* sysdeps/powerpc/bsd-setjmp.S: Added.
* sysdeps/powerpc/dl-machine.h: Added.
* sysdeps/powerpc/ffs.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/powerpc/setjmp.S: Added.
* sysdeps/powerpc/strlen.s: Added.
* sysdeps/powerpc/elf/start.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/unix/sysv/linux/powerpc/Dist: Added.
* sysdeps/unix/sysv/linux/powerpc/_exit.S: Added.
* sysdeps/unix/sysv/linux/powerpc/brk.c: Added.
* sysdeps/unix/sysv/linux/powerpc/clone.S: Added.
* sysdeps/unix/sysv/linux/powerpc/init-first.h: Added.
* sysdeps/unix/sysv/linux/powerpc/ioctl-types.h: Added.
* sysdeps/unix/sysv/linux/powerpc/profil.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sigreturn.S: Added.
* sysdeps/unix/sysv/linux/powerpc/socket.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscall.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.h: Added.
* sysdeps/unix/sysv/linux/powerpc/termbits.h: Added.
* sysdeps/unix/sysv/linux/powerpc/sys/syscall.h: Added.
1997-03-05 05:24 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-runtime.c (fixup): Add ELF_FIXUP_RETURNS_ADDRESS switch,
because knowing the first instruction of a PowerPC PLT trampoline
is not very helpful.
1997-03-04 08:04 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-load.c (ELF_PREFERRED_ADDRESS, ELF_PREFERRED_ADDRESS_DATA,
ELF_FIXED_ADDRESS): Added. These are for dl-machine.h to indicate
a preference as to where executables should be loaded.
1997-02-28 08:50 Geoff Keating <geoffk@ozemail.com.au>
* elf/elf.h: Add in all those PowerPC reloc types.
1997-02-24 07:12 Geoff Keating <geoffk@ozemail.com.au>
* stdio-common/vfscanf.c: Use __va_copy if available.
1997-03-06 13:50 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/malloc.c (mprotect) [_LIBC]: Define as __mprotect to
clean up namespace.
1997-03-07 14:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_fpclassify.c (__fpclassify): Don't use
non-existing GET_WORDS macro, use EXTRACT_WORDS.
Reported by Andres Schwab <schwab@issan.informatik.uni-dortmund.de>.
1997-03-07 05:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/i386/sigaction.c: The user- and
kernel-level sigaction structure is different. handle this
correctly.
Bug report by Andres Jaeger <jaeger@informatik.uni-kl.de>.
1997-03-06 05:55 David Engel <david@sw.ods.com>
* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Also
recognize cache entries with flag == 3.
1997-03-06 01:05 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/netinet/in.h (INADDR_NONE): Cast to unsigned int.
(INADDR_LOOPBACK): Likewise.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
* manual/socket.texi: Correct types of INADDR_* constants from
unsigned long to unsigned.
1997-03-05 23:14 Ulrich Drepper <drepper@cygnus.com>
* time/antarctica: Update from tzdata1997c.
* time/asia: Likewise.
* time/zone.tab: Likewise.
1997-03-05 00:43 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* configure.in (libc_cv_asm_symver_directive,
libc_cv_ld_version_script_option): Remove unknown instruction from
assembler test file.
1997-03-04 19:14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/__math.h: Update feature tests to use
__USE_ISOC9X.
[__USE_ISOC9X]: Define __log2 and __exp2 inlines.
(fabs): Remove defininition, it is a gcc builtin.
(sqrt, __sqrt): Remove definition, they have wrappers in libm.
1997-03-04 10:11 H.J. Lu <hjl@lucon.org>
* sunrpc/Makefile ($(objpfx)rpc-proto.c): Create subdir before
generating file.
1997-03-05 03:59 Ulrich Drepper <drepper@cygnus.com>
* inet/rcmd.c (__ivaliduser): Don't use getline, but __getline
instead to avoid namespace problems.
Reported by David Mosberger-Tang <davidm@AZStarNet.COM>.
1997-03-03 19:01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* login/utmp_file.c: Fix previous change. Make portable by
checking the _HAVE_UT_* feature macros.
* libio/fileops.c (_IO_file_finish): Likewise.
1997-03-08 05:28:20 +00:00
|
|
|
|
/* If this bit is set, do not process the GNU regex operators.
|
|
|
|
|
If not set, then the GNU regex operators are recognized. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
|
Update.
1997-03-08 05:30 Ulrich Drepper <drepper@cygnus.com>
* argp/Makefile (routines): Add argp-eexst.
* argp/argp-ba.c (argp_program_bug_address): Make `const'.
* argp/argp-eexst.c: New file. Define exit status variable.
* argp/argp-help.c (__argp_state_help): Use argp_err_exit_status
variable instead of always exiting with value 1.
* argp/argp-pv.c (argp_program_version): Make `const'.
* argp/argp.h: Declare argp_err_exit_status.
Patches by Miles Bader <miles@gnu.ai.mit.edu>.
* locale/programs/localedef.c: Use argp_err_exit_status to
terminate with correct value.
* inet/rcmd.c (iruserok): Use euidaccess instead of half-hearted
switching of UID before opening .rhosts.
* libio/vsnprintf.c: Change implementation to follow ISO C 9X
proposal. The return value now is always the number of characters
which would be written if enough space is available.
* manual/stdio.texi: Update description for new behaviour.
* locale/locale.h (__locale_t): Don't use __locale_t for struct
name and pointer to struct since old gccs cannot keep the namespaces
apart. Rename struct to __locale_struct.
* locale/duplocale.h: Likewise.
* locale/newlocale.h: Likewise.
* math/Makefile (headers): Add complex.h and cmathcalls.h.
(routines): Remove w_cabs. Add conj, cimag, creal, and cabs.
* math/math.h: Undefine __MATHDECL_1, __MATHDECL, and __MATHCALL
after use.
(signgam): Move declaration to here from mathcalls.h.
* math/mathcalls.h (cabs, __cabs_complex, signgam): Remove definition.
Correct comment for fmin and fmax.
Start implementing complex math function from ISO C 9X.
* math/complex.h: New file.
* math/cmathcalls.h: New file.
* math/cabs.c: New file.
* math/cabsf.c: New file.
* math/cabsl.c: New file.
* math/cimag.c: New file.
* math/cimagf.c: New file.
* math/cimagl.c: New file.
* math/conj.c: New file.
* math/conjf.c: New file.
* math/conjl.c: New file.
* math/creal.c: New file.
* math/crealf.c: New file.
* math/creall.c: New file.
* sysdeps/libm-ieee754/w_cabs.c: Removed.
* sysdeps/libm-ieee754/w_cabsf.c: Removed.
* sysdeps/libm-ieee754/w_cabsl.c: Removed.
* posix/regex.c: Merge with regex sources from Arnold Robbins'
version in GNU awk.
* posix/regex.h: Likewise.
Add regex test suite by Tom Lord.
* posix/Makefile (distribute): Add TESTS, TESTS2C.sed, and testcases.h.
(tests): Add runtests.
(before-compile): Add testcases.h.
(testcases.h): New rule to generate header with tests.
* posix/TESTS: New file.
* posix/TESTS2C.sed.: New file.
* posix/runtests.c: New file.
* posix/testcases.h: New file.
* sysdeps/unix/sysv/linux/poll.c: Test whether poll syscall is
available and use fall-back implementation if not.
* sysdeps/unix/sysv/linux/syscalls.list: Sort entries.
* time/ialloc.c: Update from tzcode1997c.
* time/private.h: Likewise.
* time/scheck.c: Likewise.
* time/tzselect.ksh: Likewise.
* time/zdump.c: Likewise.
* time/zic.c: Likewise.
* time/tzfile.c: Pretty print.
1997-03-06 07:37 Geoff Keating <geoffk@ozemail.com.au>
Port to powerpc-*-linux-gnu. Slightly tested, under MkLinux,
on a 601.
* sysdeps/powerpc/Implies: Added.
* sysdeps/powerpc/__longjmp.S: Added.
* sysdeps/powerpc/__math.h: Added.
* sysdeps/powerpc/bsd-_setjmp.S: Added.
* sysdeps/powerpc/bsd-setjmp.S: Added.
* sysdeps/powerpc/dl-machine.h: Added.
* sysdeps/powerpc/ffs.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/powerpc/setjmp.S: Added.
* sysdeps/powerpc/strlen.s: Added.
* sysdeps/powerpc/elf/start.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/unix/sysv/linux/powerpc/Dist: Added.
* sysdeps/unix/sysv/linux/powerpc/_exit.S: Added.
* sysdeps/unix/sysv/linux/powerpc/brk.c: Added.
* sysdeps/unix/sysv/linux/powerpc/clone.S: Added.
* sysdeps/unix/sysv/linux/powerpc/init-first.h: Added.
* sysdeps/unix/sysv/linux/powerpc/ioctl-types.h: Added.
* sysdeps/unix/sysv/linux/powerpc/profil.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sigreturn.S: Added.
* sysdeps/unix/sysv/linux/powerpc/socket.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscall.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.h: Added.
* sysdeps/unix/sysv/linux/powerpc/termbits.h: Added.
* sysdeps/unix/sysv/linux/powerpc/sys/syscall.h: Added.
1997-03-05 05:24 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-runtime.c (fixup): Add ELF_FIXUP_RETURNS_ADDRESS switch,
because knowing the first instruction of a PowerPC PLT trampoline
is not very helpful.
1997-03-04 08:04 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-load.c (ELF_PREFERRED_ADDRESS, ELF_PREFERRED_ADDRESS_DATA,
ELF_FIXED_ADDRESS): Added. These are for dl-machine.h to indicate
a preference as to where executables should be loaded.
1997-02-28 08:50 Geoff Keating <geoffk@ozemail.com.au>
* elf/elf.h: Add in all those PowerPC reloc types.
1997-02-24 07:12 Geoff Keating <geoffk@ozemail.com.au>
* stdio-common/vfscanf.c: Use __va_copy if available.
1997-03-06 13:50 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/malloc.c (mprotect) [_LIBC]: Define as __mprotect to
clean up namespace.
1997-03-07 14:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_fpclassify.c (__fpclassify): Don't use
non-existing GET_WORDS macro, use EXTRACT_WORDS.
Reported by Andres Schwab <schwab@issan.informatik.uni-dortmund.de>.
1997-03-07 05:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/i386/sigaction.c: The user- and
kernel-level sigaction structure is different. handle this
correctly.
Bug report by Andres Jaeger <jaeger@informatik.uni-kl.de>.
1997-03-06 05:55 David Engel <david@sw.ods.com>
* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Also
recognize cache entries with flag == 3.
1997-03-06 01:05 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/netinet/in.h (INADDR_NONE): Cast to unsigned int.
(INADDR_LOOPBACK): Likewise.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
* manual/socket.texi: Correct types of INADDR_* constants from
unsigned long to unsigned.
1997-03-05 23:14 Ulrich Drepper <drepper@cygnus.com>
* time/antarctica: Update from tzdata1997c.
* time/asia: Likewise.
* time/zone.tab: Likewise.
1997-03-05 00:43 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* configure.in (libc_cv_asm_symver_directive,
libc_cv_ld_version_script_option): Remove unknown instruction from
assembler test file.
1997-03-04 19:14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/__math.h: Update feature tests to use
__USE_ISOC9X.
[__USE_ISOC9X]: Define __log2 and __exp2 inlines.
(fabs): Remove defininition, it is a gcc builtin.
(sqrt, __sqrt): Remove definition, they have wrappers in libm.
1997-03-04 10:11 H.J. Lu <hjl@lucon.org>
* sunrpc/Makefile ($(objpfx)rpc-proto.c): Create subdir before
generating file.
1997-03-05 03:59 Ulrich Drepper <drepper@cygnus.com>
* inet/rcmd.c (__ivaliduser): Don't use getline, but __getline
instead to avoid namespace problems.
Reported by David Mosberger-Tang <davidm@AZStarNet.COM>.
1997-03-03 19:01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* login/utmp_file.c: Fix previous change. Make portable by
checking the _HAVE_UT_* feature macros.
* libio/fileops.c (_IO_file_finish): Likewise.
1997-03-08 05:28:20 +00:00
|
|
|
|
|
1997-05-07 15:31:21 +00:00
|
|
|
|
/* If this bit is set, turn on internal regex debugging.
|
|
|
|
|
If not set, and debugging was on, turn it off.
|
|
|
|
|
This only works if regex.c is compiled -DDEBUG.
|
|
|
|
|
We define this bit always, so that all that's needed to turn on
|
|
|
|
|
debugging is to recompile regex.c; the calling code can always have
|
|
|
|
|
this bit set, and it won't affect anything in the normal case. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_DEBUG (RE_NO_GNU_OPS << 1)
|
1997-05-07 15:31:21 +00:00
|
|
|
|
|
2001-03-25 05:15:51 +00:00
|
|
|
|
/* If this bit is set, a syntactically invalid interval is treated as
|
|
|
|
|
a string of ordinary characters. For example, the ERE 'a{1' is
|
|
|
|
|
treated as 'a\{1'. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
|
2001-03-25 05:15:51 +00:00
|
|
|
|
|
2002-02-26 19:06:03 +00:00
|
|
|
|
/* If this bit is set, then ignore case when matching.
|
|
|
|
|
If not set, then case is significant. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
|
2002-02-26 19:06:03 +00:00
|
|
|
|
|
2003-10-02 22:41:11 +00:00
|
|
|
|
/* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only
|
|
|
|
|
for ^, because it is difficult to scan the regex backwards to find
|
|
|
|
|
whether ^ should be special. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_CARET_ANCHORS_HERE (RE_ICASE << 1)
|
2003-10-02 22:41:11 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* If this bit is set, then \{ cannot be first in a regex or
|
|
|
|
|
immediately after an alternation, open-group or \} operator. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1)
|
2003-11-13 06:01:46 +00:00
|
|
|
|
|
2004-11-18 23:57:34 +00:00
|
|
|
|
/* If this bit is set, then no_sub will be set to 1 during
|
|
|
|
|
re_compile_pattern. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
|
|
|
|
|
#endif
|
2004-11-18 23:57:34 +00:00
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
|
/* This global variable defines the particular regexp syntax to use (for
|
|
|
|
|
some interfaces). When a regexp is compiled, the syntax used is
|
|
|
|
|
stored in the pattern buffer, so changing this does not affect
|
|
|
|
|
already-compiled regexps. */
|
|
|
|
|
extern reg_syntax_t re_syntax_options;
|
|
|
|
|
|
2008-01-16 10:11:18 +00:00
|
|
|
|
#ifdef __USE_GNU
|
1995-05-18 09:00:09 +00:00
|
|
|
|
/* Define combinations of the above bits for the standard possibilities.
|
|
|
|
|
(The [[[ comments delimit what gets put into the Texinfo file, so
|
1996-11-15 04:08:00 +00:00
|
|
|
|
don't delete them!) */
|
1995-05-18 09:00:09 +00:00
|
|
|
|
/* [[[begin syntaxes]]] */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define RE_SYNTAX_EMACS 0
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define RE_SYNTAX_AWK \
|
Update.
1997-03-08 05:30 Ulrich Drepper <drepper@cygnus.com>
* argp/Makefile (routines): Add argp-eexst.
* argp/argp-ba.c (argp_program_bug_address): Make `const'.
* argp/argp-eexst.c: New file. Define exit status variable.
* argp/argp-help.c (__argp_state_help): Use argp_err_exit_status
variable instead of always exiting with value 1.
* argp/argp-pv.c (argp_program_version): Make `const'.
* argp/argp.h: Declare argp_err_exit_status.
Patches by Miles Bader <miles@gnu.ai.mit.edu>.
* locale/programs/localedef.c: Use argp_err_exit_status to
terminate with correct value.
* inet/rcmd.c (iruserok): Use euidaccess instead of half-hearted
switching of UID before opening .rhosts.
* libio/vsnprintf.c: Change implementation to follow ISO C 9X
proposal. The return value now is always the number of characters
which would be written if enough space is available.
* manual/stdio.texi: Update description for new behaviour.
* locale/locale.h (__locale_t): Don't use __locale_t for struct
name and pointer to struct since old gccs cannot keep the namespaces
apart. Rename struct to __locale_struct.
* locale/duplocale.h: Likewise.
* locale/newlocale.h: Likewise.
* math/Makefile (headers): Add complex.h and cmathcalls.h.
(routines): Remove w_cabs. Add conj, cimag, creal, and cabs.
* math/math.h: Undefine __MATHDECL_1, __MATHDECL, and __MATHCALL
after use.
(signgam): Move declaration to here from mathcalls.h.
* math/mathcalls.h (cabs, __cabs_complex, signgam): Remove definition.
Correct comment for fmin and fmax.
Start implementing complex math function from ISO C 9X.
* math/complex.h: New file.
* math/cmathcalls.h: New file.
* math/cabs.c: New file.
* math/cabsf.c: New file.
* math/cabsl.c: New file.
* math/cimag.c: New file.
* math/cimagf.c: New file.
* math/cimagl.c: New file.
* math/conj.c: New file.
* math/conjf.c: New file.
* math/conjl.c: New file.
* math/creal.c: New file.
* math/crealf.c: New file.
* math/creall.c: New file.
* sysdeps/libm-ieee754/w_cabs.c: Removed.
* sysdeps/libm-ieee754/w_cabsf.c: Removed.
* sysdeps/libm-ieee754/w_cabsl.c: Removed.
* posix/regex.c: Merge with regex sources from Arnold Robbins'
version in GNU awk.
* posix/regex.h: Likewise.
Add regex test suite by Tom Lord.
* posix/Makefile (distribute): Add TESTS, TESTS2C.sed, and testcases.h.
(tests): Add runtests.
(before-compile): Add testcases.h.
(testcases.h): New rule to generate header with tests.
* posix/TESTS: New file.
* posix/TESTS2C.sed.: New file.
* posix/runtests.c: New file.
* posix/testcases.h: New file.
* sysdeps/unix/sysv/linux/poll.c: Test whether poll syscall is
available and use fall-back implementation if not.
* sysdeps/unix/sysv/linux/syscalls.list: Sort entries.
* time/ialloc.c: Update from tzcode1997c.
* time/private.h: Likewise.
* time/scheck.c: Likewise.
* time/tzselect.ksh: Likewise.
* time/zdump.c: Likewise.
* time/zic.c: Likewise.
* time/tzfile.c: Pretty print.
1997-03-06 07:37 Geoff Keating <geoffk@ozemail.com.au>
Port to powerpc-*-linux-gnu. Slightly tested, under MkLinux,
on a 601.
* sysdeps/powerpc/Implies: Added.
* sysdeps/powerpc/__longjmp.S: Added.
* sysdeps/powerpc/__math.h: Added.
* sysdeps/powerpc/bsd-_setjmp.S: Added.
* sysdeps/powerpc/bsd-setjmp.S: Added.
* sysdeps/powerpc/dl-machine.h: Added.
* sysdeps/powerpc/ffs.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/powerpc/setjmp.S: Added.
* sysdeps/powerpc/strlen.s: Added.
* sysdeps/powerpc/elf/start.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/unix/sysv/linux/powerpc/Dist: Added.
* sysdeps/unix/sysv/linux/powerpc/_exit.S: Added.
* sysdeps/unix/sysv/linux/powerpc/brk.c: Added.
* sysdeps/unix/sysv/linux/powerpc/clone.S: Added.
* sysdeps/unix/sysv/linux/powerpc/init-first.h: Added.
* sysdeps/unix/sysv/linux/powerpc/ioctl-types.h: Added.
* sysdeps/unix/sysv/linux/powerpc/profil.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sigreturn.S: Added.
* sysdeps/unix/sysv/linux/powerpc/socket.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscall.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.h: Added.
* sysdeps/unix/sysv/linux/powerpc/termbits.h: Added.
* sysdeps/unix/sysv/linux/powerpc/sys/syscall.h: Added.
1997-03-05 05:24 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-runtime.c (fixup): Add ELF_FIXUP_RETURNS_ADDRESS switch,
because knowing the first instruction of a PowerPC PLT trampoline
is not very helpful.
1997-03-04 08:04 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-load.c (ELF_PREFERRED_ADDRESS, ELF_PREFERRED_ADDRESS_DATA,
ELF_FIXED_ADDRESS): Added. These are for dl-machine.h to indicate
a preference as to where executables should be loaded.
1997-02-28 08:50 Geoff Keating <geoffk@ozemail.com.au>
* elf/elf.h: Add in all those PowerPC reloc types.
1997-02-24 07:12 Geoff Keating <geoffk@ozemail.com.au>
* stdio-common/vfscanf.c: Use __va_copy if available.
1997-03-06 13:50 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/malloc.c (mprotect) [_LIBC]: Define as __mprotect to
clean up namespace.
1997-03-07 14:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_fpclassify.c (__fpclassify): Don't use
non-existing GET_WORDS macro, use EXTRACT_WORDS.
Reported by Andres Schwab <schwab@issan.informatik.uni-dortmund.de>.
1997-03-07 05:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/i386/sigaction.c: The user- and
kernel-level sigaction structure is different. handle this
correctly.
Bug report by Andres Jaeger <jaeger@informatik.uni-kl.de>.
1997-03-06 05:55 David Engel <david@sw.ods.com>
* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Also
recognize cache entries with flag == 3.
1997-03-06 01:05 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/netinet/in.h (INADDR_NONE): Cast to unsigned int.
(INADDR_LOOPBACK): Likewise.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
* manual/socket.texi: Correct types of INADDR_* constants from
unsigned long to unsigned.
1997-03-05 23:14 Ulrich Drepper <drepper@cygnus.com>
* time/antarctica: Update from tzdata1997c.
* time/asia: Likewise.
* time/zone.tab: Likewise.
1997-03-05 00:43 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* configure.in (libc_cv_asm_symver_directive,
libc_cv_ld_version_script_option): Remove unknown instruction from
assembler test file.
1997-03-04 19:14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/__math.h: Update feature tests to use
__USE_ISOC9X.
[__USE_ISOC9X]: Define __log2 and __exp2 inlines.
(fabs): Remove defininition, it is a gcc builtin.
(sqrt, __sqrt): Remove definition, they have wrappers in libm.
1997-03-04 10:11 H.J. Lu <hjl@lucon.org>
* sunrpc/Makefile ($(objpfx)rpc-proto.c): Create subdir before
generating file.
1997-03-05 03:59 Ulrich Drepper <drepper@cygnus.com>
* inet/rcmd.c (__ivaliduser): Don't use getline, but __getline
instead to avoid namespace problems.
Reported by David Mosberger-Tang <davidm@AZStarNet.COM>.
1997-03-03 19:01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* login/utmp_file.c: Fix previous change. Make portable by
checking the _HAVE_UT_* feature macros.
* libio/fileops.c (_IO_file_finish): Likewise.
1997-03-08 05:28:20 +00:00
|
|
|
|
(RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
|
|
|
|
|
| RE_NO_BK_PARENS | RE_NO_BK_REFS \
|
|
|
|
|
| RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
|
1997-05-07 15:31:21 +00:00
|
|
|
|
| RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
|
2011-05-16 14:28:44 +00:00
|
|
|
|
| RE_CHAR_CLASSES \
|
Update.
1997-03-08 05:30 Ulrich Drepper <drepper@cygnus.com>
* argp/Makefile (routines): Add argp-eexst.
* argp/argp-ba.c (argp_program_bug_address): Make `const'.
* argp/argp-eexst.c: New file. Define exit status variable.
* argp/argp-help.c (__argp_state_help): Use argp_err_exit_status
variable instead of always exiting with value 1.
* argp/argp-pv.c (argp_program_version): Make `const'.
* argp/argp.h: Declare argp_err_exit_status.
Patches by Miles Bader <miles@gnu.ai.mit.edu>.
* locale/programs/localedef.c: Use argp_err_exit_status to
terminate with correct value.
* inet/rcmd.c (iruserok): Use euidaccess instead of half-hearted
switching of UID before opening .rhosts.
* libio/vsnprintf.c: Change implementation to follow ISO C 9X
proposal. The return value now is always the number of characters
which would be written if enough space is available.
* manual/stdio.texi: Update description for new behaviour.
* locale/locale.h (__locale_t): Don't use __locale_t for struct
name and pointer to struct since old gccs cannot keep the namespaces
apart. Rename struct to __locale_struct.
* locale/duplocale.h: Likewise.
* locale/newlocale.h: Likewise.
* math/Makefile (headers): Add complex.h and cmathcalls.h.
(routines): Remove w_cabs. Add conj, cimag, creal, and cabs.
* math/math.h: Undefine __MATHDECL_1, __MATHDECL, and __MATHCALL
after use.
(signgam): Move declaration to here from mathcalls.h.
* math/mathcalls.h (cabs, __cabs_complex, signgam): Remove definition.
Correct comment for fmin and fmax.
Start implementing complex math function from ISO C 9X.
* math/complex.h: New file.
* math/cmathcalls.h: New file.
* math/cabs.c: New file.
* math/cabsf.c: New file.
* math/cabsl.c: New file.
* math/cimag.c: New file.
* math/cimagf.c: New file.
* math/cimagl.c: New file.
* math/conj.c: New file.
* math/conjf.c: New file.
* math/conjl.c: New file.
* math/creal.c: New file.
* math/crealf.c: New file.
* math/creall.c: New file.
* sysdeps/libm-ieee754/w_cabs.c: Removed.
* sysdeps/libm-ieee754/w_cabsf.c: Removed.
* sysdeps/libm-ieee754/w_cabsl.c: Removed.
* posix/regex.c: Merge with regex sources from Arnold Robbins'
version in GNU awk.
* posix/regex.h: Likewise.
Add regex test suite by Tom Lord.
* posix/Makefile (distribute): Add TESTS, TESTS2C.sed, and testcases.h.
(tests): Add runtests.
(before-compile): Add testcases.h.
(testcases.h): New rule to generate header with tests.
* posix/TESTS: New file.
* posix/TESTS2C.sed.: New file.
* posix/runtests.c: New file.
* posix/testcases.h: New file.
* sysdeps/unix/sysv/linux/poll.c: Test whether poll syscall is
available and use fall-back implementation if not.
* sysdeps/unix/sysv/linux/syscalls.list: Sort entries.
* time/ialloc.c: Update from tzcode1997c.
* time/private.h: Likewise.
* time/scheck.c: Likewise.
* time/tzselect.ksh: Likewise.
* time/zdump.c: Likewise.
* time/zic.c: Likewise.
* time/tzfile.c: Pretty print.
1997-03-06 07:37 Geoff Keating <geoffk@ozemail.com.au>
Port to powerpc-*-linux-gnu. Slightly tested, under MkLinux,
on a 601.
* sysdeps/powerpc/Implies: Added.
* sysdeps/powerpc/__longjmp.S: Added.
* sysdeps/powerpc/__math.h: Added.
* sysdeps/powerpc/bsd-_setjmp.S: Added.
* sysdeps/powerpc/bsd-setjmp.S: Added.
* sysdeps/powerpc/dl-machine.h: Added.
* sysdeps/powerpc/ffs.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/powerpc/setjmp.S: Added.
* sysdeps/powerpc/strlen.s: Added.
* sysdeps/powerpc/elf/start.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/unix/sysv/linux/powerpc/Dist: Added.
* sysdeps/unix/sysv/linux/powerpc/_exit.S: Added.
* sysdeps/unix/sysv/linux/powerpc/brk.c: Added.
* sysdeps/unix/sysv/linux/powerpc/clone.S: Added.
* sysdeps/unix/sysv/linux/powerpc/init-first.h: Added.
* sysdeps/unix/sysv/linux/powerpc/ioctl-types.h: Added.
* sysdeps/unix/sysv/linux/powerpc/profil.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sigreturn.S: Added.
* sysdeps/unix/sysv/linux/powerpc/socket.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscall.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.h: Added.
* sysdeps/unix/sysv/linux/powerpc/termbits.h: Added.
* sysdeps/unix/sysv/linux/powerpc/sys/syscall.h: Added.
1997-03-05 05:24 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-runtime.c (fixup): Add ELF_FIXUP_RETURNS_ADDRESS switch,
because knowing the first instruction of a PowerPC PLT trampoline
is not very helpful.
1997-03-04 08:04 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-load.c (ELF_PREFERRED_ADDRESS, ELF_PREFERRED_ADDRESS_DATA,
ELF_FIXED_ADDRESS): Added. These are for dl-machine.h to indicate
a preference as to where executables should be loaded.
1997-02-28 08:50 Geoff Keating <geoffk@ozemail.com.au>
* elf/elf.h: Add in all those PowerPC reloc types.
1997-02-24 07:12 Geoff Keating <geoffk@ozemail.com.au>
* stdio-common/vfscanf.c: Use __va_copy if available.
1997-03-06 13:50 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/malloc.c (mprotect) [_LIBC]: Define as __mprotect to
clean up namespace.
1997-03-07 14:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_fpclassify.c (__fpclassify): Don't use
non-existing GET_WORDS macro, use EXTRACT_WORDS.
Reported by Andres Schwab <schwab@issan.informatik.uni-dortmund.de>.
1997-03-07 05:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/i386/sigaction.c: The user- and
kernel-level sigaction structure is different. handle this
correctly.
Bug report by Andres Jaeger <jaeger@informatik.uni-kl.de>.
1997-03-06 05:55 David Engel <david@sw.ods.com>
* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Also
recognize cache entries with flag == 3.
1997-03-06 01:05 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/netinet/in.h (INADDR_NONE): Cast to unsigned int.
(INADDR_LOOPBACK): Likewise.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
* manual/socket.texi: Correct types of INADDR_* constants from
unsigned long to unsigned.
1997-03-05 23:14 Ulrich Drepper <drepper@cygnus.com>
* time/antarctica: Update from tzdata1997c.
* time/asia: Likewise.
* time/zone.tab: Likewise.
1997-03-05 00:43 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* configure.in (libc_cv_asm_symver_directive,
libc_cv_ld_version_script_option): Remove unknown instruction from
assembler test file.
1997-03-04 19:14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/__math.h: Update feature tests to use
__USE_ISOC9X.
[__USE_ISOC9X]: Define __log2 and __exp2 inlines.
(fabs): Remove defininition, it is a gcc builtin.
(sqrt, __sqrt): Remove definition, they have wrappers in libm.
1997-03-04 10:11 H.J. Lu <hjl@lucon.org>
* sunrpc/Makefile ($(objpfx)rpc-proto.c): Create subdir before
generating file.
1997-03-05 03:59 Ulrich Drepper <drepper@cygnus.com>
* inet/rcmd.c (__ivaliduser): Don't use getline, but __getline
instead to avoid namespace problems.
Reported by David Mosberger-Tang <davidm@AZStarNet.COM>.
1997-03-03 19:01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* login/utmp_file.c: Fix previous change. Make portable by
checking the _HAVE_UT_* feature macros.
* libio/fileops.c (_IO_file_finish): Likewise.
1997-03-08 05:28:20 +00:00
|
|
|
|
| RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
|
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define RE_SYNTAX_GNU_AWK \
|
2011-05-16 14:28:44 +00:00
|
|
|
|
((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
|
|
|
|
|
| RE_INVALID_INTERVAL_ORD) \
|
|
|
|
|
& ~(RE_DOT_NOT_NULL | RE_CONTEXT_INDEP_OPS \
|
|
|
|
|
| RE_CONTEXT_INVALID_OPS ))
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define RE_SYNTAX_POSIX_AWK \
|
1997-05-07 15:31:21 +00:00
|
|
|
|
(RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
|
2011-05-16 14:28:44 +00:00
|
|
|
|
| RE_INTERVALS | RE_NO_GNU_OPS \
|
|
|
|
|
| RE_INVALID_INTERVAL_ORD)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define RE_SYNTAX_GREP \
|
|
|
|
|
((RE_SYNTAX_POSIX_BASIC | RE_NEWLINE_ALT) \
|
|
|
|
|
& ~(RE_CONTEXT_INVALID_DUP | RE_DOT_NOT_NULL))
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define RE_SYNTAX_EGREP \
|
|
|
|
|
((RE_SYNTAX_POSIX_EXTENDED | RE_INVALID_INTERVAL_ORD | RE_NEWLINE_ALT) \
|
|
|
|
|
& ~(RE_CONTEXT_INVALID_OPS | RE_DOT_NOT_NULL))
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* POSIX grep -E behavior is no longer incompatible with GNU. */
|
|
|
|
|
# define RE_SYNTAX_POSIX_EGREP \
|
|
|
|
|
RE_SYNTAX_EGREP
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* Syntax bits common to both basic and extended POSIX regex syntax. */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define _RE_SYNTAX_POSIX_COMMON \
|
1995-05-18 09:00:09 +00:00
|
|
|
|
(RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
|
|
|
|
|
| RE_INTERVALS | RE_NO_EMPTY_RANGES)
|
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define RE_SYNTAX_POSIX_BASIC \
|
2003-11-13 06:01:46 +00:00
|
|
|
|
(_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
|
|
|
|
|
RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this
|
|
|
|
|
isn't minimal, since other operators, such as \`, aren't disabled. */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define RE_SYNTAX_POSIX_MINIMAL_BASIC \
|
1995-05-18 09:00:09 +00:00
|
|
|
|
(_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
|
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define RE_SYNTAX_POSIX_EXTENDED \
|
2000-01-18 09:34:50 +00:00
|
|
|
|
(_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
|
|
|
|
|
| RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
|
|
|
|
|
| RE_NO_BK_PARENS | RE_NO_BK_VBAR \
|
|
|
|
|
| RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2000-01-20 02:01:32 +00:00
|
|
|
|
/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is
|
|
|
|
|
removed and RE_NO_BK_REFS is added. */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
|
1995-05-18 09:00:09 +00:00
|
|
|
|
(_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
|
|
|
|
|
| RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
|
|
|
|
|
| RE_NO_BK_PARENS | RE_NO_BK_REFS \
|
|
|
|
|
| RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
|
|
|
|
|
/* [[[end syntaxes]]] */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
|
|
|
|
|
/* Maximum number of duplicates an interval can allow. POSIX-conforming
|
|
|
|
|
systems might define this in <limits.h>, but we want our
|
1995-05-18 09:00:09 +00:00
|
|
|
|
value, so remove any previous define. */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# ifdef _REGEX_INCLUDE_LIMITS_H
|
|
|
|
|
# include <limits.h>
|
|
|
|
|
# endif
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# ifdef RE_DUP_MAX
|
|
|
|
|
# undef RE_DUP_MAX
|
|
|
|
|
# endif
|
2017-12-20 11:47:44 +00:00
|
|
|
|
|
|
|
|
|
/* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored
|
|
|
|
|
the counter as a 2-byte signed integer. This is no longer true, so
|
|
|
|
|
RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to
|
|
|
|
|
((SIZE_MAX - 9) / 10) if _REGEX_LARGE_OFFSETS is defined.
|
|
|
|
|
However, there would be a huge performance problem if someone
|
|
|
|
|
actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains
|
|
|
|
|
its historical value. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define RE_DUP_MAX (0x7fff)
|
|
|
|
|
#endif
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* POSIX 'cflags' bits (i.e., information for 'regcomp'). */
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, then use extended regular expression syntax.
|
|
|
|
|
If not set, then use basic regular expression syntax. */
|
|
|
|
|
#define REG_EXTENDED 1
|
|
|
|
|
|
|
|
|
|
/* If this bit is set, then ignore case when matching.
|
|
|
|
|
If not set, then case is significant. */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
#define REG_ICASE (1 << 1)
|
1996-11-15 04:08:00 +00:00
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
|
/* If this bit is set, then anchors do not match at newline
|
|
|
|
|
characters in the string.
|
|
|
|
|
If not set, then anchors do match at newlines. */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
#define REG_NEWLINE (1 << 2)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, then report only success or fail in regexec.
|
|
|
|
|
If not set, then returns differ between not matching and errors. */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
#define REG_NOSUB (1 << 3)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* POSIX 'eflags' bits (i.e., information for regexec). */
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If this bit is set, then the beginning-of-line operator doesn't match
|
|
|
|
|
the beginning of the string (presumably because it's not the
|
|
|
|
|
beginning of a line).
|
|
|
|
|
If not set, then the beginning-of-line operator does match the
|
|
|
|
|
beginning of the string. */
|
|
|
|
|
#define REG_NOTBOL 1
|
|
|
|
|
|
|
|
|
|
/* Like REG_NOTBOL, except for the end-of-line. */
|
|
|
|
|
#define REG_NOTEOL (1 << 1)
|
|
|
|
|
|
2004-03-04 23:37:01 +00:00
|
|
|
|
/* Use PMATCH[0] to delimit the start and end of the search in the
|
|
|
|
|
buffer. */
|
|
|
|
|
#define REG_STARTEND (1 << 2)
|
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* If any error codes are removed, changed, or added, update the
|
2017-12-20 11:47:44 +00:00
|
|
|
|
'__re_error_msgid' table in regcomp.c. */
|
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
|
typedef enum
|
|
|
|
|
{
|
2017-12-20 11:47:44 +00:00
|
|
|
|
_REG_ENOSYS = -1, /* This will never happen for this implementation. */
|
|
|
|
|
_REG_NOERROR = 0, /* Success. */
|
|
|
|
|
_REG_NOMATCH, /* Didn't find a match (for regexec). */
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* POSIX regcomp return error codes. (In the order listed in the
|
|
|
|
|
standard.) */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
_REG_BADPAT, /* Invalid pattern. */
|
|
|
|
|
_REG_ECOLLATE, /* Invalid collating element. */
|
|
|
|
|
_REG_ECTYPE, /* Invalid character class name. */
|
|
|
|
|
_REG_EESCAPE, /* Trailing backslash. */
|
|
|
|
|
_REG_ESUBREG, /* Invalid back reference. */
|
|
|
|
|
_REG_EBRACK, /* Unmatched left bracket. */
|
|
|
|
|
_REG_EPAREN, /* Parenthesis imbalance. */
|
|
|
|
|
_REG_EBRACE, /* Unmatched \{. */
|
|
|
|
|
_REG_BADBR, /* Invalid contents of \{\}. */
|
|
|
|
|
_REG_ERANGE, /* Invalid range end. */
|
|
|
|
|
_REG_ESPACE, /* Ran out of memory. */
|
|
|
|
|
_REG_BADRPT, /* No preceding re for repetition op. */
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* Error codes we've added. */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
_REG_EEND, /* Premature end. */
|
|
|
|
|
_REG_ESIZE, /* Too large (e.g., repeat count too large). */
|
|
|
|
|
_REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
|
1995-05-18 09:00:09 +00:00
|
|
|
|
} reg_errcode_t;
|
2017-12-20 11:47:44 +00:00
|
|
|
|
|
|
|
|
|
#if defined _XOPEN_SOURCE || defined __USE_XOPEN2K
|
|
|
|
|
# define REG_ENOSYS _REG_ENOSYS
|
|
|
|
|
#endif
|
|
|
|
|
#define REG_NOERROR _REG_NOERROR
|
|
|
|
|
#define REG_NOMATCH _REG_NOMATCH
|
|
|
|
|
#define REG_BADPAT _REG_BADPAT
|
|
|
|
|
#define REG_ECOLLATE _REG_ECOLLATE
|
|
|
|
|
#define REG_ECTYPE _REG_ECTYPE
|
|
|
|
|
#define REG_EESCAPE _REG_EESCAPE
|
|
|
|
|
#define REG_ESUBREG _REG_ESUBREG
|
|
|
|
|
#define REG_EBRACK _REG_EBRACK
|
|
|
|
|
#define REG_EPAREN _REG_EPAREN
|
|
|
|
|
#define REG_EBRACE _REG_EBRACE
|
|
|
|
|
#define REG_BADBR _REG_BADBR
|
|
|
|
|
#define REG_ERANGE _REG_ERANGE
|
|
|
|
|
#define REG_ESPACE _REG_ESPACE
|
|
|
|
|
#define REG_BADRPT _REG_BADRPT
|
|
|
|
|
#define REG_EEND _REG_EEND
|
|
|
|
|
#define REG_ESIZE _REG_ESIZE
|
|
|
|
|
#define REG_ERPAREN _REG_ERPAREN
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* This data structure represents a compiled pattern. Before calling
|
2017-12-20 11:47:44 +00:00
|
|
|
|
the pattern compiler, the fields 'buffer', 'allocated', 'fastmap',
|
|
|
|
|
and 'translate' can be set. After the pattern has been compiled,
|
|
|
|
|
the fields 're_nsub', 'not_bol' and 'not_eol' are available. All
|
2011-05-20 13:14:03 +00:00
|
|
|
|
other fields are private to the regex routines. */
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
1996-11-15 04:08:00 +00:00
|
|
|
|
#ifndef RE_TRANSLATE_TYPE
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# define __RE_TRANSLATE_TYPE unsigned char *
|
|
|
|
|
# ifdef __USE_GNU
|
|
|
|
|
# define RE_TRANSLATE_TYPE __RE_TRANSLATE_TYPE
|
|
|
|
|
# endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef __USE_GNU
|
|
|
|
|
# define __REPB_PREFIX(name) name
|
|
|
|
|
#else
|
|
|
|
|
# define __REPB_PREFIX(name) __##name
|
1995-10-25 02:19:39 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
|
struct re_pattern_buffer
|
|
|
|
|
{
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* Space that holds the compiled pattern. The type
|
|
|
|
|
'struct re_dfa_t' is private and is not declared here. */
|
|
|
|
|
struct re_dfa_t *__REPB_PREFIX(buffer);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* Number of bytes to which 'buffer' points. */
|
|
|
|
|
__re_long_size_t __REPB_PREFIX(allocated);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* Number of bytes actually used in 'buffer'. */
|
|
|
|
|
__re_long_size_t __REPB_PREFIX(used);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2005-09-30 16:07:32 +00:00
|
|
|
|
/* Syntax setting with which the pattern was compiled. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
reg_syntax_t __REPB_PREFIX(syntax);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2005-09-30 16:07:32 +00:00
|
|
|
|
/* Pointer to a fastmap, if any, otherwise zero. re_search uses the
|
|
|
|
|
fastmap, if there is one, to skip over impossible starting points
|
|
|
|
|
for matches. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
char *__REPB_PREFIX(fastmap);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2005-09-30 16:07:32 +00:00
|
|
|
|
/* Either a translate table to apply to all characters before
|
|
|
|
|
comparing them, or zero for no translation. The translation is
|
|
|
|
|
applied to a pattern when it is compiled and to a string when it
|
|
|
|
|
is matched. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
__RE_TRANSLATE_TYPE __REPB_PREFIX(translate);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2005-09-30 16:07:32 +00:00
|
|
|
|
/* Number of subexpressions found by the compiler. */
|
1995-05-18 09:00:09 +00:00
|
|
|
|
size_t re_nsub;
|
|
|
|
|
|
2005-09-30 16:07:32 +00:00
|
|
|
|
/* Zero if this pattern cannot match the empty string, one else.
|
2017-12-20 11:47:44 +00:00
|
|
|
|
Well, in truth it's used only in 're_search_2', to see whether or
|
2005-09-30 16:07:32 +00:00
|
|
|
|
not we should use the fastmap, so we don't set this absolutely
|
2017-12-20 11:47:44 +00:00
|
|
|
|
perfectly; see 're_compile_fastmap' (the "duplicate" case). */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
unsigned __REPB_PREFIX(can_be_null) : 1;
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* If REGS_UNALLOCATED, allocate space in the 'regs' structure
|
|
|
|
|
for 'max (RE_NREGS, re_nsub + 1)' groups.
|
2005-09-30 16:07:32 +00:00
|
|
|
|
If REGS_REALLOCATE, reallocate space if necessary.
|
|
|
|
|
If REGS_FIXED, use what's there. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
#ifdef __USE_GNU
|
|
|
|
|
# define REGS_UNALLOCATED 0
|
|
|
|
|
# define REGS_REALLOCATE 1
|
|
|
|
|
# define REGS_FIXED 2
|
|
|
|
|
#endif
|
|
|
|
|
unsigned __REPB_PREFIX(regs_allocated) : 2;
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* Set to zero when 're_compile_pattern' compiles a pattern; set to
|
|
|
|
|
one by 're_compile_fastmap' if it updates the fastmap. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
unsigned __REPB_PREFIX(fastmap_accurate) : 1;
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* If set, 're_match_2' does not return information about
|
2005-09-30 16:07:32 +00:00
|
|
|
|
subexpressions. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
unsigned __REPB_PREFIX(no_sub) : 1;
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2005-09-30 16:07:32 +00:00
|
|
|
|
/* If set, a beginning-of-line anchor doesn't match at the beginning
|
|
|
|
|
of the string. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
unsigned __REPB_PREFIX(not_bol) : 1;
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2005-09-30 16:07:32 +00:00
|
|
|
|
/* Similarly for an end-of-line anchor. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
unsigned __REPB_PREFIX(not_eol) : 1;
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2005-09-30 16:07:32 +00:00
|
|
|
|
/* If true, an anchor at a newline matches. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
unsigned __REPB_PREFIX(newline_anchor) : 1;
|
1995-05-18 09:00:09 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
typedef struct re_pattern_buffer regex_t;
|
|
|
|
|
|
|
|
|
|
/* Type for byte offsets within the string. POSIX mandates this. */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
#ifdef _REGEX_LARGE_OFFSETS
|
|
|
|
|
/* POSIX 1003.1-2008 requires that regoff_t be at least as wide as
|
|
|
|
|
ptrdiff_t and ssize_t. We don't know of any hosts where ptrdiff_t
|
|
|
|
|
is wider than ssize_t, so ssize_t is safe. ptrdiff_t is not
|
|
|
|
|
visible here, so use ssize_t. */
|
|
|
|
|
typedef ssize_t regoff_t;
|
|
|
|
|
#else
|
|
|
|
|
/* The traditional GNU regex implementation mishandles strings longer
|
|
|
|
|
than INT_MAX. */
|
1995-05-18 09:00:09 +00:00
|
|
|
|
typedef int regoff_t;
|
2017-12-20 11:47:44 +00:00
|
|
|
|
#endif
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
|
2008-01-16 10:11:18 +00:00
|
|
|
|
#ifdef __USE_GNU
|
1995-05-18 09:00:09 +00:00
|
|
|
|
/* This is the structure we store register match data in. See
|
|
|
|
|
regex.texinfo for a full description of what registers match. */
|
|
|
|
|
struct re_registers
|
|
|
|
|
{
|
2017-12-20 11:47:44 +00:00
|
|
|
|
__re_size_t num_regs;
|
1995-05-18 09:00:09 +00:00
|
|
|
|
regoff_t *start;
|
|
|
|
|
regoff_t *end;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* If 'regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
|
|
|
|
|
're_match_2' returns information about at least this many registers
|
|
|
|
|
the first time a 'regs' structure is passed. */
|
2008-01-16 10:11:18 +00:00
|
|
|
|
# ifndef RE_NREGS
|
|
|
|
|
# define RE_NREGS 30
|
|
|
|
|
# endif
|
1995-05-18 09:00:09 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* POSIX specification for registers. Aside from the different names than
|
2017-12-20 11:47:44 +00:00
|
|
|
|
're_registers', POSIX uses an array of structures, instead of a
|
1995-05-18 09:00:09 +00:00
|
|
|
|
structure of arrays. */
|
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
regoff_t rm_so; /* Byte offset from string's start to substring's start. */
|
|
|
|
|
regoff_t rm_eo; /* Byte offset from string's start to substring's end. */
|
|
|
|
|
} regmatch_t;
|
|
|
|
|
|
|
|
|
|
/* Declarations for routines. */
|
|
|
|
|
|
2021-09-21 14:47:45 +00:00
|
|
|
|
#ifndef _REGEX_NELTS
|
|
|
|
|
# if (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__ \
|
|
|
|
|
&& !defined __STDC_NO_VLA__)
|
|
|
|
|
# define _REGEX_NELTS(n) n
|
|
|
|
|
# else
|
|
|
|
|
# define _REGEX_NELTS(n)
|
|
|
|
|
# endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if defined __GNUC__ && 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
|
|
|
|
|
# pragma GCC diagnostic push
|
|
|
|
|
# pragma GCC diagnostic ignored "-Wvla"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef _Attr_access_
|
|
|
|
|
# ifdef __attr_access
|
|
|
|
|
# define _Attr_access_(arg) __attr_access (arg)
|
|
|
|
|
# elif defined __GNUC__ && 10 <= __GNUC__
|
|
|
|
|
# define _Attr_access_(x) __attribute__ ((__access__ x))
|
|
|
|
|
# else
|
|
|
|
|
# define _Attr_access_(x)
|
|
|
|
|
# endif
|
|
|
|
|
#endif
|
|
|
|
|
|
2008-01-16 10:11:18 +00:00
|
|
|
|
#ifdef __USE_GNU
|
1995-05-18 09:00:09 +00:00
|
|
|
|
/* Sets the current default syntax to SYNTAX, and return the old syntax.
|
2017-12-20 11:47:44 +00:00
|
|
|
|
You can also simply assign to the 're_syntax_options' variable. */
|
2005-09-30 16:07:32 +00:00
|
|
|
|
extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
/* Compile the regular expression PATTERN, with length LENGTH
|
2017-12-20 11:47:44 +00:00
|
|
|
|
and syntax given by the global 're_syntax_options', into the buffer
|
2011-05-20 13:14:03 +00:00
|
|
|
|
BUFFER. Return NULL if successful, and an error string if not.
|
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
To free the allocated storage, you must call 'regfree' on BUFFER.
|
|
|
|
|
Note that the translate table must either have been initialized by
|
|
|
|
|
'regcomp', with a malloc'ed value, or set to NULL before calling
|
|
|
|
|
'regfree'. */
|
2005-09-30 16:07:32 +00:00
|
|
|
|
extern const char *re_compile_pattern (const char *__pattern, size_t __length,
|
2021-05-06 16:56:25 +00:00
|
|
|
|
struct re_pattern_buffer *__buffer)
|
2021-09-21 14:47:45 +00:00
|
|
|
|
_Attr_access_ ((__read_only__, 1, 2));
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Compile a fastmap for the compiled pattern in BUFFER; used to
|
|
|
|
|
accelerate searches. Return 0 if successful and -2 if was an
|
|
|
|
|
internal error. */
|
2005-09-30 16:07:32 +00:00
|
|
|
|
extern int re_compile_fastmap (struct re_pattern_buffer *__buffer);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Search in the string STRING (with length LENGTH) for the pattern
|
|
|
|
|
compiled into BUFFER. Start searching at position START, for RANGE
|
|
|
|
|
characters. Return the starting position of the match, -1 for no
|
|
|
|
|
match, or -2 for an internal error. Also return register
|
|
|
|
|
information in REGS (if REGS and BUFFER->no_sub are nonzero). */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
extern regoff_t re_search (struct re_pattern_buffer *__buffer,
|
|
|
|
|
const char *__String, regoff_t __length,
|
|
|
|
|
regoff_t __start, regoff_t __range,
|
2021-05-06 16:56:25 +00:00
|
|
|
|
struct re_registers *__regs)
|
2021-09-21 14:47:45 +00:00
|
|
|
|
_Attr_access_ ((__read_only__, 2, 3));
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* Like 're_search', but search in the concatenation of STRING1 and
|
1995-05-18 09:00:09 +00:00
|
|
|
|
STRING2. Also, stop searching at index START + STOP. */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
|
|
|
|
|
const char *__string1, regoff_t __length1,
|
|
|
|
|
const char *__string2, regoff_t __length2,
|
|
|
|
|
regoff_t __start, regoff_t __range,
|
|
|
|
|
struct re_registers *__regs,
|
2021-05-06 16:56:25 +00:00
|
|
|
|
regoff_t __stop)
|
2021-09-21 14:47:45 +00:00
|
|
|
|
_Attr_access_ ((__read_only__, 2, 3))
|
|
|
|
|
_Attr_access_ ((__read_only__, 4, 5));
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* Like 're_search', but return how many characters in STRING the regexp
|
1995-05-18 09:00:09 +00:00
|
|
|
|
in BUFFER matched, starting at position START. */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
extern regoff_t re_match (struct re_pattern_buffer *__buffer,
|
|
|
|
|
const char *__String, regoff_t __length,
|
2021-05-06 16:56:25 +00:00
|
|
|
|
regoff_t __start, struct re_registers *__regs)
|
2021-09-21 14:47:45 +00:00
|
|
|
|
_Attr_access_ ((__read_only__, 2, 3));
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* Relates to 're_match' as 're_search_2' relates to 're_search'. */
|
|
|
|
|
extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
|
|
|
|
|
const char *__string1, regoff_t __length1,
|
|
|
|
|
const char *__string2, regoff_t __length2,
|
|
|
|
|
regoff_t __start, struct re_registers *__regs,
|
2021-05-06 16:56:25 +00:00
|
|
|
|
regoff_t __stop)
|
2021-09-21 14:47:45 +00:00
|
|
|
|
_Attr_access_ ((__read_only__, 2, 3))
|
|
|
|
|
_Attr_access_ ((__read_only__, 4, 5));
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
|
|
|
|
|
ENDS. Subsequent matches using BUFFER and REGS will use this memory
|
|
|
|
|
for recording register information. STARTS and ENDS must be
|
2017-12-20 11:47:44 +00:00
|
|
|
|
allocated with malloc, and must each be at least 'NUM_REGS * sizeof
|
1995-05-18 09:00:09 +00:00
|
|
|
|
(regoff_t)' bytes long.
|
|
|
|
|
|
|
|
|
|
If NUM_REGS == 0, then subsequent matches should allocate their own
|
|
|
|
|
register data.
|
|
|
|
|
|
|
|
|
|
Unless this function is called, the first search or match using
|
2017-12-20 11:47:44 +00:00
|
|
|
|
BUFFER will allocate its own register data, without
|
1995-05-18 09:00:09 +00:00
|
|
|
|
freeing the old data. */
|
2005-09-30 16:07:32 +00:00
|
|
|
|
extern void re_set_registers (struct re_pattern_buffer *__buffer,
|
|
|
|
|
struct re_registers *__regs,
|
2017-12-20 11:47:44 +00:00
|
|
|
|
__re_size_t __num_regs,
|
2005-09-30 16:07:32 +00:00
|
|
|
|
regoff_t *__starts, regoff_t *__ends);
|
2008-01-16 10:11:18 +00:00
|
|
|
|
#endif /* Use GNU */
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2014-02-12 23:41:01 +00:00
|
|
|
|
#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_MISC)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
/* 4.2 bsd compatibility. */
|
* posix/regex_internal.h (re_sub_match_top_t): Remove unused member
next_last_offset.
(struct re_dfa_t): Remove unused member states_alloc.
* posix/regcomp.c (init_dfa): Don't initialize unused members.
2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
* posix/regexec.c (set_regs): Don't alloca with an unbounded size.
alloca modernization/simplification for regex.
* posix/regex.c: Remove portability cruft for alloca. This no longer
needs to be at the start of the file, and can be moved into
regex_internal.h and simplified.
* posix/regex_internal.h: Include <alloca.h>.
(__libc_use_alloca) [!defined _LIBC]: New macro.
* posix/regexec.c (build_trtable): Remove "#ifdef _LIBC",
since the code now works outside glibc.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* include/regex.h: Remove use of _RE_ARGS.
2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
* posix/regexec.c (find_recover_state): Change "err" to "*err".
2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
* posix/regcomp.c (regerror): Pointer args are 'restrict',
as per POSIX.
* posix/regex.h (regerror): Likewise.
* manual/pattern.texi (POSIX Regexp Compilation): Likewise.
Similarly for regcomp and regexec. Also, first 2 args of regexec
and 2nd arg of regerror are const.
* posix/regex.c: Do not include <sys/types.h>, as POSIX no longer
requires this. (The code never needed it.)
2005-08-20 Paul Eggert <eggert@cs.ucla.edu>
* posix/regexec.c (sift_states_bkref): re_node_set_insert returns
int, not reg_errcode_t.
* posix/regex_internal.c (calc_state_hash): Put 'inline' before type,
since some broken compilers warn about it otherwise.
* posix/regcomp.c (create_initial_state): Remove duplicate decl.
2005-08-20 Paul Eggert <eggert@cs.ucla.edu>
* posix/regex.h (_RE_ARGS): Remove. No longer needed, since we assume
C89 or better. All uses removed.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* posix/regex.c: Prevent using C++ compilers.
2005-08-19 Paul Eggert <eggert@cs.ucla.edu>
* posix/regcomp.c (duplicate_node): Return new index, not an error
code, and let the caller return REG_ESPACE if out of space. This
removes an uninitialied-variable warning with GCC 4.0.1, and also
avoids taking the address of a local variable. All callers
changed.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* include/time.h (__strptime_internal): Rename parameter to avoid
bogus compiler warning.
2005-08-19 Jim Meyering <jim@meyering.net>
* posix/regexec.c (proceed_next_node): Redo local variables to
avoid GCC shadowing warnings.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* posix/regex_internal.c (re_acquire_state): Minor code rearrangement.
(re_acquire_state_context): Likewise.
2005-08-19 Paul Eggert <eggert@cs.ucla.edu>
* posix/regex_internal.c (re_string_realloc_buffers):
(re_node_set_insert, re_node_set_insert_last, re_dfa_add_node):
Rename local variables to avoid GCC shadowing warnings.
2005-07-08 Eric Blake <ebb9@byu.net>
Paul Eggert <eggert@cs.ucla.edu>
* posix/regcomp.c (init_dfa): Store __btowc value in wint_t, not
wchar_t. Remove now-unnecessary cast.
(build_range_exp): Likewise.
2005-09-06 21:15:13 +00:00
|
|
|
|
extern char *re_comp (const char *);
|
|
|
|
|
extern int re_exec (const char *);
|
Update.
1997-03-08 05:30 Ulrich Drepper <drepper@cygnus.com>
* argp/Makefile (routines): Add argp-eexst.
* argp/argp-ba.c (argp_program_bug_address): Make `const'.
* argp/argp-eexst.c: New file. Define exit status variable.
* argp/argp-help.c (__argp_state_help): Use argp_err_exit_status
variable instead of always exiting with value 1.
* argp/argp-pv.c (argp_program_version): Make `const'.
* argp/argp.h: Declare argp_err_exit_status.
Patches by Miles Bader <miles@gnu.ai.mit.edu>.
* locale/programs/localedef.c: Use argp_err_exit_status to
terminate with correct value.
* inet/rcmd.c (iruserok): Use euidaccess instead of half-hearted
switching of UID before opening .rhosts.
* libio/vsnprintf.c: Change implementation to follow ISO C 9X
proposal. The return value now is always the number of characters
which would be written if enough space is available.
* manual/stdio.texi: Update description for new behaviour.
* locale/locale.h (__locale_t): Don't use __locale_t for struct
name and pointer to struct since old gccs cannot keep the namespaces
apart. Rename struct to __locale_struct.
* locale/duplocale.h: Likewise.
* locale/newlocale.h: Likewise.
* math/Makefile (headers): Add complex.h and cmathcalls.h.
(routines): Remove w_cabs. Add conj, cimag, creal, and cabs.
* math/math.h: Undefine __MATHDECL_1, __MATHDECL, and __MATHCALL
after use.
(signgam): Move declaration to here from mathcalls.h.
* math/mathcalls.h (cabs, __cabs_complex, signgam): Remove definition.
Correct comment for fmin and fmax.
Start implementing complex math function from ISO C 9X.
* math/complex.h: New file.
* math/cmathcalls.h: New file.
* math/cabs.c: New file.
* math/cabsf.c: New file.
* math/cabsl.c: New file.
* math/cimag.c: New file.
* math/cimagf.c: New file.
* math/cimagl.c: New file.
* math/conj.c: New file.
* math/conjf.c: New file.
* math/conjl.c: New file.
* math/creal.c: New file.
* math/crealf.c: New file.
* math/creall.c: New file.
* sysdeps/libm-ieee754/w_cabs.c: Removed.
* sysdeps/libm-ieee754/w_cabsf.c: Removed.
* sysdeps/libm-ieee754/w_cabsl.c: Removed.
* posix/regex.c: Merge with regex sources from Arnold Robbins'
version in GNU awk.
* posix/regex.h: Likewise.
Add regex test suite by Tom Lord.
* posix/Makefile (distribute): Add TESTS, TESTS2C.sed, and testcases.h.
(tests): Add runtests.
(before-compile): Add testcases.h.
(testcases.h): New rule to generate header with tests.
* posix/TESTS: New file.
* posix/TESTS2C.sed.: New file.
* posix/runtests.c: New file.
* posix/testcases.h: New file.
* sysdeps/unix/sysv/linux/poll.c: Test whether poll syscall is
available and use fall-back implementation if not.
* sysdeps/unix/sysv/linux/syscalls.list: Sort entries.
* time/ialloc.c: Update from tzcode1997c.
* time/private.h: Likewise.
* time/scheck.c: Likewise.
* time/tzselect.ksh: Likewise.
* time/zdump.c: Likewise.
* time/zic.c: Likewise.
* time/tzfile.c: Pretty print.
1997-03-06 07:37 Geoff Keating <geoffk@ozemail.com.au>
Port to powerpc-*-linux-gnu. Slightly tested, under MkLinux,
on a 601.
* sysdeps/powerpc/Implies: Added.
* sysdeps/powerpc/__longjmp.S: Added.
* sysdeps/powerpc/__math.h: Added.
* sysdeps/powerpc/bsd-_setjmp.S: Added.
* sysdeps/powerpc/bsd-setjmp.S: Added.
* sysdeps/powerpc/dl-machine.h: Added.
* sysdeps/powerpc/ffs.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/powerpc/setjmp.S: Added.
* sysdeps/powerpc/strlen.s: Added.
* sysdeps/powerpc/elf/start.c: Added.
* sysdeps/powerpc/fpu_control.h: Added.
* sysdeps/powerpc/jmp_buf.h: Added.
* sysdeps/unix/sysv/linux/powerpc/Dist: Added.
* sysdeps/unix/sysv/linux/powerpc/_exit.S: Added.
* sysdeps/unix/sysv/linux/powerpc/brk.c: Added.
* sysdeps/unix/sysv/linux/powerpc/clone.S: Added.
* sysdeps/unix/sysv/linux/powerpc/init-first.h: Added.
* sysdeps/unix/sysv/linux/powerpc/ioctl-types.h: Added.
* sysdeps/unix/sysv/linux/powerpc/profil.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sigreturn.S: Added.
* sysdeps/unix/sysv/linux/powerpc/socket.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscall.S: Added.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Added.
* sysdeps/unix/sysv/linux/powerpc/sysdep.h: Added.
* sysdeps/unix/sysv/linux/powerpc/termbits.h: Added.
* sysdeps/unix/sysv/linux/powerpc/sys/syscall.h: Added.
1997-03-05 05:24 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-runtime.c (fixup): Add ELF_FIXUP_RETURNS_ADDRESS switch,
because knowing the first instruction of a PowerPC PLT trampoline
is not very helpful.
1997-03-04 08:04 Geoff Keating <geoffk@ozemail.com.au>
* elf/dl-load.c (ELF_PREFERRED_ADDRESS, ELF_PREFERRED_ADDRESS_DATA,
ELF_FIXED_ADDRESS): Added. These are for dl-machine.h to indicate
a preference as to where executables should be loaded.
1997-02-28 08:50 Geoff Keating <geoffk@ozemail.com.au>
* elf/elf.h: Add in all those PowerPC reloc types.
1997-02-24 07:12 Geoff Keating <geoffk@ozemail.com.au>
* stdio-common/vfscanf.c: Use __va_copy if available.
1997-03-06 13:50 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/malloc.c (mprotect) [_LIBC]: Define as __mprotect to
clean up namespace.
1997-03-07 14:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_fpclassify.c (__fpclassify): Don't use
non-existing GET_WORDS macro, use EXTRACT_WORDS.
Reported by Andres Schwab <schwab@issan.informatik.uni-dortmund.de>.
1997-03-07 05:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/i386/sigaction.c: The user- and
kernel-level sigaction structure is different. handle this
correctly.
Bug report by Andres Jaeger <jaeger@informatik.uni-kl.de>.
1997-03-06 05:55 David Engel <david@sw.ods.com>
* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Also
recognize cache entries with flag == 3.
1997-03-06 01:05 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/netinet/in.h (INADDR_NONE): Cast to unsigned int.
(INADDR_LOOPBACK): Likewise.
* sysdeps/unix/sysv/linux/netinet/in.h: Likewise.
* manual/socket.texi: Correct types of INADDR_* constants from
unsigned long to unsigned.
1997-03-05 23:14 Ulrich Drepper <drepper@cygnus.com>
* time/antarctica: Update from tzdata1997c.
* time/asia: Likewise.
* time/zone.tab: Likewise.
1997-03-05 00:43 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* configure.in (libc_cv_asm_symver_directive,
libc_cv_ld_version_script_option): Remove unknown instruction from
assembler test file.
1997-03-04 19:14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/__math.h: Update feature tests to use
__USE_ISOC9X.
[__USE_ISOC9X]: Define __log2 and __exp2 inlines.
(fabs): Remove defininition, it is a gcc builtin.
(sqrt, __sqrt): Remove definition, they have wrappers in libm.
1997-03-04 10:11 H.J. Lu <hjl@lucon.org>
* sunrpc/Makefile ($(objpfx)rpc-proto.c): Create subdir before
generating file.
1997-03-05 03:59 Ulrich Drepper <drepper@cygnus.com>
* inet/rcmd.c (__ivaliduser): Don't use getline, but __getline
instead to avoid namespace problems.
Reported by David Mosberger-Tang <davidm@AZStarNet.COM>.
1997-03-03 19:01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* login/utmp_file.c: Fix previous change. Make portable by
checking the _HAVE_UT_* feature macros.
* libio/fileops.c (_IO_file_finish): Likewise.
1997-03-08 05:28:20 +00:00
|
|
|
|
#endif
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
/* For plain 'restrict', use glibc's __restrict if defined.
|
|
|
|
|
Otherwise, GCC 2.95 and later have "__restrict"; C99 compilers have
|
|
|
|
|
"restrict", and "configure" may have defined "restrict".
|
|
|
|
|
Other compilers use __restrict, __restrict__, and _Restrict, and
|
|
|
|
|
'configure' might #define 'restrict' to those words, so pick a
|
|
|
|
|
different name. */
|
|
|
|
|
#ifndef _Restrict_
|
2020-12-29 20:32:25 +00:00
|
|
|
|
# if defined __restrict \
|
|
|
|
|
|| 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
|
|
|
|
|
|| __clang_major__ >= 3
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define _Restrict_ __restrict
|
|
|
|
|
# elif 199901L <= __STDC_VERSION__ || defined restrict
|
|
|
|
|
# define _Restrict_ restrict
|
|
|
|
|
# else
|
|
|
|
|
# define _Restrict_
|
2000-08-21 23:31:38 +00:00
|
|
|
|
# endif
|
2000-10-30 04:18:33 +00:00
|
|
|
|
#endif
|
2020-12-29 20:32:25 +00:00
|
|
|
|
/* For the ISO C99 syntax
|
|
|
|
|
array_name[restrict]
|
|
|
|
|
use glibc's __restrict_arr if available.
|
|
|
|
|
Otherwise, GCC 3.1 and clang support this syntax (but not in C++ mode).
|
|
|
|
|
Other ISO C99 compilers support it as well. */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
#ifndef _Restrict_arr_
|
|
|
|
|
# ifdef __restrict_arr
|
|
|
|
|
# define _Restrict_arr_ __restrict_arr
|
2020-12-29 20:32:25 +00:00
|
|
|
|
# elif ((199901L <= __STDC_VERSION__ \
|
|
|
|
|
|| 3 < __GNUC__ + (1 <= __GNUC_MINOR__) \
|
|
|
|
|
|| __clang_major__ >= 3) \
|
|
|
|
|
&& !defined __cplusplus)
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define _Restrict_arr_ _Restrict_
|
2001-11-29 08:51:52 +00:00
|
|
|
|
# else
|
2017-12-20 11:47:44 +00:00
|
|
|
|
# define _Restrict_arr_
|
2001-11-29 08:51:52 +00:00
|
|
|
|
# endif
|
|
|
|
|
#endif
|
2000-08-21 23:31:38 +00:00
|
|
|
|
|
1995-05-18 09:00:09 +00:00
|
|
|
|
/* POSIX compatibility. */
|
2017-12-20 11:47:44 +00:00
|
|
|
|
extern int regcomp (regex_t *_Restrict_ __preg,
|
|
|
|
|
const char *_Restrict_ __pattern,
|
* posix/regex_internal.h (re_sub_match_top_t): Remove unused member
next_last_offset.
(struct re_dfa_t): Remove unused member states_alloc.
* posix/regcomp.c (init_dfa): Don't initialize unused members.
2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
* posix/regexec.c (set_regs): Don't alloca with an unbounded size.
alloca modernization/simplification for regex.
* posix/regex.c: Remove portability cruft for alloca. This no longer
needs to be at the start of the file, and can be moved into
regex_internal.h and simplified.
* posix/regex_internal.h: Include <alloca.h>.
(__libc_use_alloca) [!defined _LIBC]: New macro.
* posix/regexec.c (build_trtable): Remove "#ifdef _LIBC",
since the code now works outside glibc.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* include/regex.h: Remove use of _RE_ARGS.
2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
* posix/regexec.c (find_recover_state): Change "err" to "*err".
2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
* posix/regcomp.c (regerror): Pointer args are 'restrict',
as per POSIX.
* posix/regex.h (regerror): Likewise.
* manual/pattern.texi (POSIX Regexp Compilation): Likewise.
Similarly for regcomp and regexec. Also, first 2 args of regexec
and 2nd arg of regerror are const.
* posix/regex.c: Do not include <sys/types.h>, as POSIX no longer
requires this. (The code never needed it.)
2005-08-20 Paul Eggert <eggert@cs.ucla.edu>
* posix/regexec.c (sift_states_bkref): re_node_set_insert returns
int, not reg_errcode_t.
* posix/regex_internal.c (calc_state_hash): Put 'inline' before type,
since some broken compilers warn about it otherwise.
* posix/regcomp.c (create_initial_state): Remove duplicate decl.
2005-08-20 Paul Eggert <eggert@cs.ucla.edu>
* posix/regex.h (_RE_ARGS): Remove. No longer needed, since we assume
C89 or better. All uses removed.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* posix/regex.c: Prevent using C++ compilers.
2005-08-19 Paul Eggert <eggert@cs.ucla.edu>
* posix/regcomp.c (duplicate_node): Return new index, not an error
code, and let the caller return REG_ESPACE if out of space. This
removes an uninitialied-variable warning with GCC 4.0.1, and also
avoids taking the address of a local variable. All callers
changed.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* include/time.h (__strptime_internal): Rename parameter to avoid
bogus compiler warning.
2005-08-19 Jim Meyering <jim@meyering.net>
* posix/regexec.c (proceed_next_node): Redo local variables to
avoid GCC shadowing warnings.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* posix/regex_internal.c (re_acquire_state): Minor code rearrangement.
(re_acquire_state_context): Likewise.
2005-08-19 Paul Eggert <eggert@cs.ucla.edu>
* posix/regex_internal.c (re_string_realloc_buffers):
(re_node_set_insert, re_node_set_insert_last, re_dfa_add_node):
Rename local variables to avoid GCC shadowing warnings.
2005-07-08 Eric Blake <ebb9@byu.net>
Paul Eggert <eggert@cs.ucla.edu>
* posix/regcomp.c (init_dfa): Store __btowc value in wint_t, not
wchar_t. Remove now-unnecessary cast.
(build_range_exp): Likewise.
2005-09-06 21:15:13 +00:00
|
|
|
|
int __cflags);
|
1998-04-09 21:53:07 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
extern int regexec (const regex_t *_Restrict_ __preg,
|
|
|
|
|
const char *_Restrict_ __String, size_t __nmatch,
|
2021-09-21 14:47:45 +00:00
|
|
|
|
regmatch_t __pmatch[_Restrict_arr_
|
|
|
|
|
_REGEX_NELTS (__nmatch)],
|
|
|
|
|
int __eflags);
|
1998-04-09 21:53:07 +00:00
|
|
|
|
|
2017-12-20 11:47:44 +00:00
|
|
|
|
extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg,
|
2021-05-06 16:56:25 +00:00
|
|
|
|
char *_Restrict_ __errbuf, size_t __errbuf_size)
|
2021-09-21 14:47:45 +00:00
|
|
|
|
_Attr_access_ ((__write_only__, 3, 4));
|
1998-04-09 21:53:07 +00:00
|
|
|
|
|
* posix/regex_internal.h (re_sub_match_top_t): Remove unused member
next_last_offset.
(struct re_dfa_t): Remove unused member states_alloc.
* posix/regcomp.c (init_dfa): Don't initialize unused members.
2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
* posix/regexec.c (set_regs): Don't alloca with an unbounded size.
alloca modernization/simplification for regex.
* posix/regex.c: Remove portability cruft for alloca. This no longer
needs to be at the start of the file, and can be moved into
regex_internal.h and simplified.
* posix/regex_internal.h: Include <alloca.h>.
(__libc_use_alloca) [!defined _LIBC]: New macro.
* posix/regexec.c (build_trtable): Remove "#ifdef _LIBC",
since the code now works outside glibc.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* include/regex.h: Remove use of _RE_ARGS.
2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
* posix/regexec.c (find_recover_state): Change "err" to "*err".
2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
* posix/regcomp.c (regerror): Pointer args are 'restrict',
as per POSIX.
* posix/regex.h (regerror): Likewise.
* manual/pattern.texi (POSIX Regexp Compilation): Likewise.
Similarly for regcomp and regexec. Also, first 2 args of regexec
and 2nd arg of regerror are const.
* posix/regex.c: Do not include <sys/types.h>, as POSIX no longer
requires this. (The code never needed it.)
2005-08-20 Paul Eggert <eggert@cs.ucla.edu>
* posix/regexec.c (sift_states_bkref): re_node_set_insert returns
int, not reg_errcode_t.
* posix/regex_internal.c (calc_state_hash): Put 'inline' before type,
since some broken compilers warn about it otherwise.
* posix/regcomp.c (create_initial_state): Remove duplicate decl.
2005-08-20 Paul Eggert <eggert@cs.ucla.edu>
* posix/regex.h (_RE_ARGS): Remove. No longer needed, since we assume
C89 or better. All uses removed.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* posix/regex.c: Prevent using C++ compilers.
2005-08-19 Paul Eggert <eggert@cs.ucla.edu>
* posix/regcomp.c (duplicate_node): Return new index, not an error
code, and let the caller return REG_ESPACE if out of space. This
removes an uninitialied-variable warning with GCC 4.0.1, and also
avoids taking the address of a local variable. All callers
changed.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* include/time.h (__strptime_internal): Rename parameter to avoid
bogus compiler warning.
2005-08-19 Jim Meyering <jim@meyering.net>
* posix/regexec.c (proceed_next_node): Redo local variables to
avoid GCC shadowing warnings.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* posix/regex_internal.c (re_acquire_state): Minor code rearrangement.
(re_acquire_state_context): Likewise.
2005-08-19 Paul Eggert <eggert@cs.ucla.edu>
* posix/regex_internal.c (re_string_realloc_buffers):
(re_node_set_insert, re_node_set_insert_last, re_dfa_add_node):
Rename local variables to avoid GCC shadowing warnings.
2005-07-08 Eric Blake <ebb9@byu.net>
Paul Eggert <eggert@cs.ucla.edu>
* posix/regcomp.c (init_dfa): Store __btowc value in wint_t, not
wchar_t. Remove now-unnecessary cast.
(build_range_exp): Likewise.
2005-09-06 21:15:13 +00:00
|
|
|
|
extern void regfree (regex_t *__preg);
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
2021-09-21 14:47:45 +00:00
|
|
|
|
#if defined __GNUC__ && 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
|
|
|
|
|
# pragma GCC diagnostic pop
|
|
|
|
|
#endif
|
1997-02-19 04:43:53 +00:00
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif /* C++ */
|
|
|
|
|
|
1997-06-21 02:59:26 +00:00
|
|
|
|
#endif /* regex.h */
|