Jim Meyering [Fri, 17 Mar 2000 19:32:27 +0000 (19:32 +0000)]
(utf8_wctomb): New function.
(print_unicode_char): Pass the Unicode character to iconv in UTF-8
format instead of in UCS-4 with platform dependent endianness.
Stefan Monnier [Thu, 16 Mar 2000 02:53:38 +0000 (02:53 +0000)]
(re_match_2): Fix string shortening (to fit `stop') to make sure
POINTER_TO_OFFSET gives the same value before and after PREFETCH.
Use `dfail' to guarantee "atomic" matching.
(PTR_TO_OFFSET): Use POINTER_TO_OFFSET.
(debug): Now only active if > 0 rather than if != 0.
(DEBUG_*): Update for the new meaning of `debug'.
(print_partial_compiled_pattern): Add missing `succeed' case.
Use CHARSET_* macros in the charset(_not) branch.
Fix off-by-two bugs in `succeed_n', `jump_n' and `set_number_at'.
(store_op1, store_op2, insert_op1, insert_op2)
(at_begline_loc_p, at_endline_loc_p): Add prototype.
(group_in_compile_stack): Move to after its arg's types are declared
and add a prototype.
(PATFETCH): Define in terms of PATFETCH_RAW.
(GET_UNSIGNED_NUMBER): Add the usual `do { ... } while(0)' wrapper.
(QUIT): Redefine as a nop except for NTemacs.
(regex_compile): Handle intervals {,M} as if it was {0,M}.
Fix indentation of the greedy-op and shy-group code.
(at_(beg|end)line_loc_p): Fix argument's types.
(re_compile_fastmap): Ifdef out failure_stack_ptr to shut up gcc.
(re_search_2): Use POS_AS_IN_BUFFER. Simplify `room' computation.
(MATCHING_IN_FIRST_STRING): Remove.
(re_match_2): Use POS_AS_IN_BUFFER.
Ifdef out failure_stack_ptr to shut up gcc.
Use FIRST_STRING_P and POINTER_TO_OFFSET.
Use QUIT unconditionally.
Stefan Monnier [Tue, 14 Mar 2000 00:27:57 +0000 (00:27 +0000)]
* regex.c: Declare a new type `re_char' used throughout the code for the
string char type. It's `const unsigned char' to match the rest of Emacs.
Consistently make sure all pointers to strings use it and make sure all
pointers into the pattern use `unsigned char'.
(re_match_2_internal): Use `PREFETCH+STRING_CHAR' instead of
GET_CHAR_AFTER_2.
Also merge wordbound and notwordbound to reduce code duplication.
* charset.h (GET_CHAR_AFTER_2): Remove.
(GET_CHAR_BEFORE_2): Use unsigned chars, like everywhere else.
Jim Meyering [Fri, 10 Mar 2000 11:40:29 +0000 (11:40 +0000)]
*** empty log message ***
Jim Meyering [Fri, 10 Mar 2000 09:09:08 +0000 (09:09 +0000)]
*** empty log message ***
Jim Meyering [Fri, 10 Mar 2000 09:08:53 +0000 (09:08 +0000)]
Look for getspnam in -lgen, too.
Stefan Monnier [Wed, 8 Mar 2000 23:25:41 +0000 (23:25 +0000)]
This is a big redesign of failure-stack and register handling, prompted
by bugs revealed when trying to add shy-groups. Overall, what happened
is that loops are now structured a little differently, groups can be
shy and the code is a little simpler.
(enum re_opcode_t): Remove jump_past_alt, maybe_pop_jump,
push_dummy_failure and dumy_failure_jump.
Add on_failure_jump_(exclusive, loop and smart).
Also fix the comment for (start|stop)_memory since they now only take
one argument (the second has becomes unnecessary).
(print_partial_compiled_pattern): Adjust for changes in re_opcode_t.
(print_compiled_pattern): Use %ld to printf long ints and flush to make
debugging a little easier.
(union fail_stack_elt): Make the integer unsigned.
(struct fail_stack_type): Add a `frame' element.
(INIT_FAIL_STACK): Init `frame' as well.
(POP_PATTERN_OP): New macro for re_compile_fastmap.
(DEBUG_PUSH, DEBUG_POP): Remove.
(NUM_REG_ITEMS): Remove.
(NUM_NONREG_ITEMS): Adjust.
(FAILURE_PAT, FAILURE_STR, NEXT_FAILURE_HANDLE, TOP_FAILURE_HANDLE):
New macros for the cycle detection.
(ENSURE_FAIL_STACK): New macro for PUSH_FAILURE_(REG|POINT).
(PUSH_FAILURE_REG, POP_FAILURE_REG, CHECK_INFINITE_LOOP): New macros.
(PUSH_FAILURE_POINT): Don't push registers any more.
The pattern address pushed is not the destination of the jump
but the source of it instead.
(NUM_FAILURE_ITEMS): Remove.
(POP_FAILURE_POINT): Adapt to the new stack structure (i.e. pop
registers before the actual failure point).
Don't hardcode any meaning for str==NULL anymore.
(union register_info_type, REG_MATCH_NULL_STRING_P, IS_ACTIVE)
(MATCHED_SOMETHING, EVER_MATCHED_SOMETHING, SET_REGS_MATCHED): Remove.
(REG_UNSET_VALUE): Use NULL (why not?).
(compile_range): Remove declaration since it doesn't exist.
(struct compile_stack_elt_t): Remove inner_group_offset.
(old_reg(start|end), reg_info, reg_dummy, reg_info_dummy): Remove.
(regex_grow_registers): Remove dead code.
(FIXUP_ALT_JUMP): New macro.
(regex_compile): Add shy-groups
Change loops to use on_failure_jump_smart&jump instead of
on_failure_jump&maybe_pop_jump.
Change + loops to eliminate the initial (dummy_failure_)jump.
Remove c1_base (looks like unused variable to me).
Use `jump' instead of `jump_past_alt' and don't bother with
push_dummy_failure in alternatives since it is now unnecessary.
Use FIXUP_ALT_JUMP.
Eliminate a useless `#ifdef emacs' for (re)allocating the stack.
(re_compile_fastmap): Remove dead variables i and num_regs.
Exit from loop when bufp->can_be_null rather than jumping to `done'.
Avoid jumping backwards so as to ensure termination.
Use PATTERN_STACK_EMPTY and POP_PATTERN_OP.
Improved handling of backreferences.
Remove dead code in handling of `anychar'.
(skip_noops, mutually_exclusive_p): New functions taken from the
handling of `maybe_pop_jump' in re_match_2_internal.
Slightly improve mutually_exclusive_p to handle ".+\n".
((lowest|highest)_active_reg, NO_(LOWEST|HIGHEST)_ACTIVE_REG)
Remove.
(re_match_2_internal): Use %p instead of 0x%x when printf'ing ptrs.
Don't SET_REGS_MATCHED anymore. Remove many dead variables.
Push register (in `start_memory') on the stack rather than storing it
in old_reg(start|end).
Remove the cycle detection from `stop_memory', replaced by the use
of on_failure_jump_loop for greedy loops.
Add code for the new on_failure_jump_<foo>.
Remove ad-hoc code in `on_failure_jump' to push more registers
in the case of a loop.
Take out code from `maybe_pop_jump' into separate functions and
adapt it to the semantics of `on_failure_jump_smart'.
Remove jump_past_alt, dummy_failure_jump and push_dummy_failure.
Remove dummy_failure handling and handling of `failures to jump
to on_failure_jump' (this last one was already dead code, it seems).
((group|alt|common_op)_match_null_string_p): Remove.
Stefan Monnier [Wed, 8 Mar 2000 23:24:54 +0000 (23:24 +0000)]
Update the copyright.
(RE_SHY_GROUPS): New value.
(RE_UNMATCHED_RIGHT_PAREN_ORD): Renumber.
(RE_SYNTAX_EMACS): Add RE_SHY_GROUPS.
Jim Meyering [Wed, 8 Mar 2000 14:50:11 +0000 (14:50 +0000)]
*** empty log message ***
Jim Meyering [Wed, 8 Mar 2000 14:50:05 +0000 (14:50 +0000)]
(savedir): Work even if directory size is
negative; this can happen with some screwy NFS configurations.
Jim Meyering [Tue, 7 Mar 2000 20:06:03 +0000 (20:06 +0000)]
tweak indentation
Jim Meyering [Mon, 6 Mar 2000 11:19:23 +0000 (11:19 +0000)]
(get_charset_aliases): Don't try to free file_name
if it's NULL (because we ran out of memory). From Bruno Haible.
Jim Meyering [Sun, 5 Mar 2000 10:27:29 +0000 (10:27 +0000)]
*** empty log message ***
Jim Meyering [Sun, 5 Mar 2000 10:27:22 +0000 (10:27 +0000)]
("path-concat.h"): Include.
(get_charset_aliases): Use path_concat instead of ANSI string
concatenation.
Jim Meyering [Sun, 5 Mar 2000 10:22:03 +0000 (10:22 +0000)]
*** empty log message ***
Jim Meyering [Sun, 5 Mar 2000 10:21:58 +0000 (10:21 +0000)]
(PARAMS): Define.
Use it to guard prototype.
Jim Meyering [Sun, 5 Mar 2000 06:53:08 +0000 (06:53 +0000)]
.
Jim Meyering [Sat, 4 Mar 2000 21:14:51 +0000 (21:14 +0000)]
.
Jim Meyering [Sat, 4 Mar 2000 21:10:21 +0000 (21:10 +0000)]
(uninstall-local): Uncomment this rule so `make distcheck' works once again.
Jim Meyering [Sat, 4 Mar 2000 20:15:07 +0000 (20:15 +0000)]
*** empty log message ***
Jim Meyering [Sat, 4 Mar 2000 20:15:03 +0000 (20:15 +0000)]
(install-exec-local): Create $(libdir) before installing into it.
Jim Meyering [Sat, 4 Mar 2000 12:53:29 +0000 (12:53 +0000)]
.
Jim Meyering [Sat, 4 Mar 2000 12:35:47 +0000 (12:35 +0000)]
(<errno.h>): Include it.
(errno): Declare if not defined.
Jim Meyering [Sat, 4 Mar 2000 12:22:47 +0000 (12:22 +0000)]
.
Jim Meyering [Sat, 4 Mar 2000 12:19:57 +0000 (12:19 +0000)]
*** empty log message ***
Jim Meyering [Sat, 4 Mar 2000 08:11:22 +0000 (08:11 +0000)]
*** empty log message ***
Jim Meyering [Sat, 4 Mar 2000 08:11:18 +0000 (08:11 +0000)]
(jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE, for lib/localcharset.c.
Jim Meyering [Sat, 4 Mar 2000 07:57:35 +0000 (07:57 +0000)]
Add Bruno's comment justifying use of volatile.
Jim Meyering [Sat, 4 Mar 2000 07:53:33 +0000 (07:53 +0000)]
New version, incorporating remarks from a linux
i18n mailing list. From Bruno Haible.
Jim Meyering [Fri, 3 Mar 2000 12:28:28 +0000 (12:28 +0000)]
.
Jim Meyering [Fri, 3 Mar 2000 12:24:11 +0000 (12:24 +0000)]
*** empty log message ***
Jim Meyering [Fri, 3 Mar 2000 12:23:47 +0000 (12:23 +0000)]
Make sure re_compile_pattern accepts patterns like `{1'.
Jim Meyering [Fri, 3 Mar 2000 08:25:13 +0000 (08:25 +0000)]
.
Jim Meyering [Thu, 2 Mar 2000 15:28:23 +0000 (15:28 +0000)]
(EXTRA_DIST): Add config.charset.
Jim Meyering [Thu, 2 Mar 2000 09:44:56 +0000 (09:44 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Mar 2000 09:44:43 +0000 (09:44 +0000)]
Require AC_HEADER_TIME before the cache check so
the messages come out on separate lines.
Jim Meyering [Thu, 2 Mar 2000 09:09:08 +0000 (09:09 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Mar 2000 09:09:02 +0000 (09:09 +0000)]
.
Jim Meyering [Thu, 2 Mar 2000 09:08:32 +0000 (09:08 +0000)]
(jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS, rather than jm_CHECK_DECLARATIONS.
Jim Meyering [Thu, 2 Mar 2000 09:05:33 +0000 (09:05 +0000)]
*** empty log message ***
Jim Meyering [Thu, 2 Mar 2000 09:05:28 +0000 (09:05 +0000)]
(AC_CHECK_DECLS): Add getlogin, ttyname, and geteuid.
Jim Meyering [Wed, 1 Mar 2000 13:26:04 +0000 (13:26 +0000)]
(DEFS): Add -DLIBDIR=...
(libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
(noinst_HEADERS): Add unicodeio.h.
(all-local, install-exec-local, charset.alias): New targets.
Jim Meyering [Wed, 1 Mar 2000 13:23:53 +0000 (13:23 +0000)]
*** empty log message ***
Jim Meyering [Wed, 1 Mar 2000 13:23:47 +0000 (13:23 +0000)]
*** empty log message ***
Jim Meyering [Wed, 1 Mar 2000 13:23:41 +0000 (13:23 +0000)]
New file from Bruno.
Jim Meyering [Wed, 1 Mar 2000 13:22:57 +0000 (13:22 +0000)]
New file from Bruno.
filter through cppi
Jim Meyering [Wed, 1 Mar 2000 13:22:35 +0000 (13:22 +0000)]
New file from Bruno.
One portability tweak:
guard inclusion of stddef.h.
Jim Meyering [Wed, 1 Mar 2000 13:21:23 +0000 (13:21 +0000)]
Guard some #includes with `#if HAVE_...'.
Jim Meyering [Wed, 1 Mar 2000 13:11:05 +0000 (13:11 +0000)]
new file, from Bruno
Jim Meyering [Wed, 1 Mar 2000 12:49:12 +0000 (12:49 +0000)]
.
Jim Meyering [Wed, 1 Mar 2000 12:27:54 +0000 (12:27 +0000)]
.
Jim Meyering [Mon, 28 Feb 2000 20:45:33 +0000 (20:45 +0000)]
*** empty log message ***
Jim Meyering [Mon, 28 Feb 2000 20:45:28 +0000 (20:45 +0000)]
(ALERT_CHAR): New macro.
(quotearg_buffer_restyled): Use it.
Jim Meyering [Sun, 27 Feb 2000 19:05:50 +0000 (19:05 +0000)]
.
Jim Meyering [Sun, 27 Feb 2000 18:49:10 +0000 (18:49 +0000)]
Fix typo in decl of strtoul: s/long long/long/.
Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
Jim Meyering [Sun, 27 Feb 2000 18:45:29 +0000 (18:45 +0000)]
Fix typo in decl of strtoul: s/long long/long/.
Jim Meyering [Sun, 27 Feb 2000 18:04:10 +0000 (18:04 +0000)]
*** empty log message ***
Jim Meyering [Sun, 27 Feb 2000 18:04:00 +0000 (18:04 +0000)]
Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
Declare malloc if needed.
Jim Meyering [Sun, 27 Feb 2000 17:54:25 +0000 (17:54 +0000)]
use double quotes, not single quotes around syntax-error-evoking string
Jim Meyering [Sun, 27 Feb 2000 17:53:36 +0000 (17:53 +0000)]
*** empty log message ***
Jim Meyering [Sun, 27 Feb 2000 17:53:31 +0000 (17:53 +0000)]
Add getenv to the list.
Jim Meyering [Sun, 27 Feb 2000 17:42:30 +0000 (17:42 +0000)]
*** empty log message ***
Jim Meyering [Sun, 27 Feb 2000 17:40:53 +0000 (17:40 +0000)]
Arrange for cpp to fail if the configure-time
declaration check was not run.
Jim Meyering [Sun, 27 Feb 2000 17:39:52 +0000 (17:39 +0000)]
Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
now that autoconf always defines the HAVE_DECL_ symbols.
Arrange for cpp to fail if the configure-time
declaration check was not run.
Jim Meyering [Sun, 27 Feb 2000 13:58:12 +0000 (13:58 +0000)]
Put cedilla on `c' in author's name.
Jim Meyering [Sun, 27 Feb 2000 11:27:38 +0000 (11:27 +0000)]
*** empty log message ***
Jim Meyering [Sun, 27 Feb 2000 11:23:22 +0000 (11:23 +0000)]
.
Jim Meyering [Sun, 27 Feb 2000 11:13:16 +0000 (11:13 +0000)]
(parse_user_spec): If there is no `:' but there is a `.',
then first look up the entire `.'-containing string as a login name.
Jim Meyering [Sat, 26 Feb 2000 21:28:10 +0000 (21:28 +0000)]
whoops. Add commas in parenthesized list of functions in call
to AC_CHECK_DECLS.
Jim Meyering [Wed, 23 Feb 2000 15:24:57 +0000 (15:24 +0000)]
*** empty log message ***
Jim Meyering [Wed, 23 Feb 2000 15:24:51 +0000 (15:24 +0000)]
Now that we have the new AC_CHECK_DECLS, use it in place of my hack.
Jim Meyering [Tue, 22 Feb 2000 20:16:07 +0000 (20:16 +0000)]
Handle two-digit years with leading zeros correctly.
(textint): New typedef.
(parser_control): Member year changed from int to textint.
All uses changed.
(YYSTYPE): Removed; replaced by %union with int and textint members.
(tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
(tSNUMBER, tUNUMBER): Now of type <textintval>.
(date, number, to_year): Use width of number in digits, not its value,
to determine whether it's a 2-digit year, or a 2-digit time.
(yylex): Store number of digits of numeric tokens.
Reported by John Kendall.
(parser_control): Changed from struct parser_control to typedef (for
consistency). All uses changed.
(tID): Removed; not used.
(yylex): Return '?' for unknown identifiers, rather than (unused) tID.
Jim Meyering [Tue, 15 Feb 2000 13:08:08 +0000 (13:08 +0000)]
*** empty log message ***
Jim Meyering [Mon, 14 Feb 2000 23:27:25 +0000 (23:27 +0000)]
.
Jim Meyering [Mon, 14 Feb 2000 20:15:32 +0000 (20:15 +0000)]
adapted from changes to grep getpagesize.h
by Martin P.J. Zinser <zinser@decus.de>.
Stefan Monnier [Mon, 14 Feb 2000 17:00:16 +0000 (17:00 +0000)]
* regex.h (RE_SYNTAX_EMACS): Add RE_CHAR_CLASSES and RE_INTERVALS
to Emacs' syntax. Also fix the comment about set/not-set meanings
since Emacs syntax is not the value 0 any more.
* search.c (compile_pattern_1): Remove RE_CHAR_CLASSES from the syntax
since it's now part of RE_SYNTAX_EMACS.
Jim Meyering [Sat, 12 Feb 2000 10:42:19 +0000 (10:42 +0000)]
*** empty log message ***
Jim Meyering [Sat, 12 Feb 2000 10:41:48 +0000 (10:41 +0000)]
*** empty log message ***
Jim Meyering [Sat, 12 Feb 2000 10:41:37 +0000 (10:41 +0000)]
<libintl.h>: Include.
(_ and N_): Define.
(parse_user_spec): Mark translatable strings.
Jim Meyering [Sat, 12 Feb 2000 10:11:54 +0000 (10:11 +0000)]
add FIXME comments for use of atoi
Jim Meyering [Sat, 12 Feb 2000 10:10:40 +0000 (10:10 +0000)]
(ISDIGIT): Define it.
(isdigit): Remove definition.
(is_number): Use ISDIGIT, not isdigit.
Jim Meyering [Thu, 10 Feb 2000 09:38:43 +0000 (09:38 +0000)]
#undef nanosleep.
(rpl_nanosleep): Rename from nanosleep.
Jim Meyering [Thu, 10 Feb 2000 09:38:31 +0000 (09:38 +0000)]
Don't include config.h.
Remove prototype from declaration of nanosleep.
(PARAMS): Remove now-unneeded definition.
Jim Meyering [Thu, 10 Feb 2000 09:34:03 +0000 (09:34 +0000)]
*** empty log message ***
Jim Meyering [Thu, 10 Feb 2000 09:33:52 +0000 (09:33 +0000)]
(jm_FUNC_NANOSLEEP): Rename replacement function from
gnu_nanosleep to rpl_nanosleep.
Jim Meyering [Wed, 9 Feb 2000 12:00:16 +0000 (12:00 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Feb 2000 11:58:17 +0000 (11:58 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Feb 2000 11:58:05 +0000 (11:58 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Feb 2000 11:57:55 +0000 (11:57 +0000)]
(jm_LIB_CHECK): Fix typo: check for sp_pwdp in
struct spwd, rather than in struct passwd. Reported by G. Queri.
Jim Meyering [Tue, 8 Feb 2000 15:37:44 +0000 (15:37 +0000)]
bump serial number
Jim Meyering [Tue, 8 Feb 2000 15:33:45 +0000 (15:33 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Feb 2000 15:33:32 +0000 (15:33 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Feb 2000 15:32:39 +0000 (15:32 +0000)]
(AM_FUNC_GETLOADAVG): Remove now-unnecessary use of changequote.
Jim Meyering [Tue, 8 Feb 2000 15:30:47 +0000 (15:30 +0000)]
bump #serial to 108
Jim Meyering [Tue, 8 Feb 2000 15:29:26 +0000 (15:29 +0000)]
(AM_GNU_GETTEXT): Quote square brackets with `[' and `]'
and remove uses of `changequote'.
Jim Meyering [Tue, 8 Feb 2000 15:21:11 +0000 (15:21 +0000)]
(AC_SYS_LARGEFILE_FLAGS): Quote square brackets with `[' and `]'
and remove uses of `changequote'.
Jim Meyering [Tue, 8 Feb 2000 15:16:42 +0000 (15:16 +0000)]
(jm_AC_FUNC_MEMCMP): Remove now-unnecessary use of changequote.
Add `int' for main.
Jim Meyering [Tue, 8 Feb 2000 15:11:36 +0000 (15:11 +0000)]
(jm_FUNC_READDIR): Remove now-unnecessary uses of changequote.
Jim Meyering [Tue, 8 Feb 2000 15:08:26 +0000 (15:08 +0000)]
(jm_INCLUDED_REGEX): Remove now-unnecessary uses of changequote.
Jim Meyering [Tue, 8 Feb 2000 15:07:10 +0000 (15:07 +0000)]
(jm_FUNC_GNU_STRFTIME): Remove now-unnecessary uses of changequote.