Paul Eggert [Sat, 23 Nov 2002 06:45:22 +0000 (06:45 +0000)]
Allow multiple inclusion by surrounding with
"#ifndef QUOTEARG_H_". Include <stddef.h>, for size_t,
so that we can be included first.
(PARAMS): Remove; we now assume C89 or later. All uses removed.
Jim Meyering [Thu, 21 Nov 2002 13:22:51 +0000 (13:22 +0000)]
2002-09-25 Paul Eggert <eggert@twinsun.com>
[! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>.
(UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
(PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
int. Work more efficiently if X is the same width as uintmax_t.
Do not compare X to -1, to avoid bogus compiler warning.
(get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
Don't assume that f_frsize and f_bsize are the same type.
Paul Eggert [Thu, 21 Nov 2002 07:19:54 +0000 (07:19 +0000)]
Do not include <config.h> or <sys/types.h>.
Include <stddef.h> instead, since it's all we need for size_t.
(PARAMS): Remove. All uses removed.
(ARRAY_CARDINALITY): Do not bother to #undef.
(ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
Remove unnecessary parentheses.
(ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
Insert necessary parentheses.
(ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
(ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
Paul Eggert [Thu, 21 Nov 2002 07:19:33 +0000 (07:19 +0000)]
Include config.h here, not in argmatch.h.
Include stdlib.h, for EXIT_FAILURE.
Always include <string.h>, since we assume C89.
(EXIT_FAILURE): Remove pre-C89 bug workaround.
Stefan Monnier [Tue, 10 Sep 2002 05:59:32 +0000 (05:59 +0000)]
(DISCARD_FAILURE_REG_OR_COUNT): Delete.
(CHECK_INFINITE_LOOP): Don't pop anything: just set `cycle' to 1.
(re_match_2_internal): Be more careful with infinite loops.
(set_image_of_range_1): In no-TRANSLATE case,
call EXTEND_RANGE_TABLE and return a proper value.
(set_image_of_range): Don't call set_image_of_range_1
if no TRANSLATE or if range includes all of Latin-1.
Only call it for the Latin-1 part of the range.
For other cases, make two separate ranges,
one for the original specified characters and one for
their case-conversions.
(set_image_of_range_1): New function.
(set_image_of_range): Use set_image_of_range_1 for Latin-1.
Return a value to indicate running out of memory.
(SET_RANGE_TABLE_WORK_AREA): Check value from set_image_of_range.
(extend_range_table_work_area): New subroutine.
(EXTEND_RANGE_TABLE): Replaces EXTEND_RANGE_TABLE_WORK_AREA.
Different calling conventions, and used from set_image_of_range{,_1}.
(IMMEDIATE_QUIT_CHECK): Definitions moved.
Stefan Monnier [Fri, 23 Aug 2002 22:19:56 +0000 (22:19 +0000)]
(PATFETCH): Remove the translating fetch.
(PATFETCH_RAW): Rename to PATFETCH.
(set_image_of_range): New fun.
(SET_RANGE_TABLE_WORK_AREA): Use it.
(regex_compile): Don't translate the pattern chars so eagerly.
Only do it when inserting an `exactn' bytecode or when handling a char-range.
(mutually_exclusive_p): Avoid empty statement.
Jim Meyering [Wed, 26 Jun 2002 06:17:35 +0000 (06:17 +0000)]
(WIDE_CHAR_SUPPORT): New macro. Use it uniformly instead of
(defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
reported by Vin Shelton.