📄 changelog
字号:
(re_match_2): at fail, test for a dummy failure point by checking the restored pattern value, not string value. (re_match_2): new case, `on_failure_keep_string_jump'. (regex_compile): output this opcode in the .*\n case. * regexinc.c (re_opcode_t): define the opcode. (partial_compiled_pattern_pattern): add the new case.Mon Mar 9 09:09:27 1992 Karl Berry (karl at hayley) * xregex.c (regex_compile): optimize .*\n to output an unconditional jump to the ., instead of pushing failure points each time through the loop. * xregex.c (DOUBLE_FAILURE_STACK): compute the maximum size ourselves (and correctly); change callers.Sun Mar 8 17:07:46 1992 Karl Berry (karl at hayley) * xregex.c (failure_stack_elt_t): change to `const char *', to avoid warnings. * regex.h (re_set_syntax): declare this. * xregex.c (pop_failure_point) [DEBUG]: conditionally pass the original strings and sizes; change callers.Thu Mar 5 16:35:35 1992 Karl Berry (karl at claude.cs.umb.edu) * xregex.c (regnum_t): new type for register/group numbers. (compile_stack_elt_t, regex_compile): use it. * xregex.c (regexec): declare len as `int' to match re_search. * xregex.c (re_match_2): don't declare p1 twice. * xregex.c: change `while (1)' to `for (;;)' to avoid silly compiler warnings. * regex.h [__STDC__]: use #if, not #ifdef. * regexinc.c (REGEX_REALLOCATE): cast the result of alloca to (char *), to avoid warnings. * xregex.c (regerror): declare variable as const. * xregex.c (re_compile_pattern, re_comp): define as returning a const char *. * regex.h (re_compile_pattern, re_comp): likewise.Thu Mar 5 15:57:56 1992 Karl Berry (karl@hal) * xregex.c (regcomp): declare `syntax' as unsigned. * xregex.c (re_match_2): try to avoid compiler warnings about unsigned comparisons. * GNUmakefile (test-xlc): new target. * regex.h (reg_errcode_t): remove trailing comma from definition. * regexinc.c (re_opcode_t): likewise.Thu Mar 5 06:56:07 1992 Karl Berry (karl at hayley) * GNUmakefile (dist): add version numbers automatically. (versionfiles): new variable. (regex.{c,texinfo}): don't add version numbers here. * regex.h: put in placeholder instead of the version number.Fri Feb 28 07:11:33 1992 Karl Berry (karl at hayley) * xregex.c (re_error_msg): declare const, since it is.Sun Feb 23 05:41:57 1992 Karl Berry (karl at fosse) * xregex.c (PAT_PUSH{,_2,_3}, ...): cast args to avoid warnings. (regex_compile, regexec): return REG_NOERROR, instead of 0, on success. (boolean): define as char, and #define false and true. * regexinc.c (STREQ): cast the result.Sun Feb 23 07:45:38 1992 Karl Berry (karl at hayley) * GNUmakefile (test-cc, test-hc, test-pcc): new targets. * regex.inc (extract_number, extract_number_and_incr) [DEBUG]: only define if we are debugging. * xregex.c [_AIX]: do #pragma alloca first if necessary. * regexinc.c [_AIX]: remove the #pragma from here. * regex.h (reg_syntax_t): declare as unsigned, and redo the enum as #define's again. Some compilers do stupid things with enums.Thu Feb 20 07:19:47 1992 Karl Berry (karl at hayley) * Version 0.3. * xregex.c, regex.h (newline_anchor_match_p): rename to `newline_anchor'; dumb idea to change the name.Tue Feb 18 07:09:02 1992 Karl Berry (karl at hayley) * regexinc.c: go back to original, i.e., don't include <string.h> or define strchr. * xregex.c (regexec): don't bother with adding characters after newlines to the fastmap; instead, just don't use a fastmap. * xregex.c (regcomp): set the buffer and fastmap fields to zero. * xregex.texinfo (GNU r.e. compiling): have to initialize more than two fields. * regex.h (struct re_pattern_buffer): rename `newline_anchor' to `newline_anchor_match_p', as we're back to two cases. * xregex.c (regcomp, re_compile_pattern, re_comp): change accordingly. (re_match_2): at begline and endline, POSIX is not a special case anymore; just check newline_anchor_match_p.Thu Feb 13 16:29:33 1992 Karl Berry (karl at hayley) * xregex.c (*empty_string*): rename to *null_string*, for brevity.Wed Feb 12 06:36:22 1992 Karl Berry (karl at hayley) * xregex.c (re_compile_fastmap): at endline, don't set fastmap['\n']. (re_match_2): rewrite the begline/endline cases to take account of the new field newline_anchor.Tue Feb 11 14:34:55 1992 Karl Berry (karl at hayley) * regexinc.c [!USG etc.]: include <strings.h> and define strchr as index. * xregex.c (re_search_2): when searching backwards, declare `c' as a char and use casts when using it as an array subscript. * xregex.c (regcomp): if REG_NEWLINE, set RE_HAT_LISTS_NOT_NEWLINE. Set the `newline_anchor' field appropriately. (regex_compile): compile [^...] as matching a \n according to the syntax bit. (regexec): if doing REG_NEWLINE stuff, compile a fastmap and add characters after any \n's to the newline. * regex.h (RE_HAT_LISTS_NOT_NEWLINE): new syntax bit. (struct re_pattern_buffer): rename `posix_newline' to `newline_anchor', define constants for its values.Mon Feb 10 07:22:50 1992 Karl Berry (karl at hayley) * xregex.c (re_compile_fastmap): combine the code at the top and bottom of the loop, as it's essentially identical.Sun Feb 9 10:02:19 1992 Karl Berry (karl at hayley) * xregex.texinfo (POSIX Translate Tables): remove this, as it doesn't match the spec. * xregex.c (re_compile_fastmap): if we finish off a path, go back to the top (to set can_be_null) instead of returning immediately. * xregex.texinfo: changes from bob.Sat Feb 1 07:03:25 1992 Karl Berry (karl at hayley) * xregex.c (re_search_2): doc fix (from rms).Fri Jan 31 09:52:04 1992 Karl Berry (karl at hayley) * xregex.texinfo (GNU Searching): clarify the range arg. * xregex.c (re_match_2, at_endline_op_p): add extra parens to get rid of GCC 2's (silly, IMHO) warning about && within ||. * xregex.c (common_op_match_empty_string_p): use MATCH_NOTHING_UNSET_VALUE, not -1.Thu Jan 16 08:43:02 1992 Karl Berry (karl at hayley) * xregex.c (SET_REGS_MATCHED): only set the registers from lowest to highest. * regexinc.c (MIN): new macro. * xregex.c (re_match_2): only check min (num_regs, regs->num_regs) when we set the returned regs. * xregex.c (re_match_2): set registers after the first num_regs to -1 before we return.Tue Jan 14 16:01:42 1992 Karl Berry (karl at hayley) * xregex.c (re_match_2): initialize max (RE_NREGS, re_nsub + 1) registers (from rms). * xregex.c, regex.h: don't abbreviate `19xx' to `xx'. * regexinc.c [!emacs]: include <sys/types.h> before <unistd.h>. (from ro@thp.Uni-Koeln.DE).Thu Jan 9 07:23:00 1992 Karl Berry (karl at hayley) * xregex.c (*unmatchable): rename to `match_empty_string_p'. (CAN_MATCH_NOTHING): rename to `REG_MATCH_EMPTY_STRING_P'. * regexinc.c (malloc, realloc): remove prototypes, as they can cause clashes (from rms).Mon Jan 6 12:43:24 1992 Karl Berry (karl at claude.cs.umb.edu) * Version 0.2.Sun Jan 5 10:50:38 1992 Karl Berry (karl at hayley) * xregex.texinfo: bring more or less up-to-date. * GNUmakefile (regex.texinfo): generate from regex.h and xregex.texinfo. * include.awk: new file. * xregex.c: change all calls to the fn extract_number_and_incr to the macro. * xregex.c (re_match_2) [emacs]: in at_dot, use PTR_CHAR_POS + 1, instead of bf_* and sl_*. Cast d to unsigned char *, to match the declaration in Emacs' buffer.h. [emacs19]: in before_dot, at_dot, and after_dot, likewise. * regexinc.c: unconditionally include <sys/types.h>. * regexinc.c (alloca) [!alloca]: Emacs config files sometimes define this, so don't define it if it's already defined.Sun Jan 5 06:06:53 1992 Karl Berry (karl at fosse) * xregex.c (re_comp): fix type conflicts with regex_compile (we haven't been compiling this). * regexinc.c (SIGN_EXTEND_CHAR): use `__CHAR_UNSIGNED__', not `CHAR_UNSIGNED'. * regexinc.c (NULL) [!NULL]: define it (as zero). * regexinc.c (extract_number): remove the temporaries.Sun Jan 5 07:50:14 1992 Karl Berry (karl at hayley) * regex.h (regerror) [!__STDC__]: return a size_t, not a size_t *. * xregex.c (PUSH_FAILURE_POINT, ...): declare `destination' as `char *' instead of `void *', to match alloca declaration. * xregex.c (regerror): use `size_t' for the intermediate values as well as the return type. * xregex.c (regexec): cast the result of malloc. * xregex.c (regexec): don't initialize `private_preg' in the declaration, as old C compilers can't do that. * xregex.c (main) [test]: declare printchar void. * xregex.c (assert) [!DEBUG]: define this to do nothing, and remove #ifdef DEBUG's from around asserts. * xregex.c (re_match_2): remove error message when not debugging.Sat Jan 4 09:45:29 1992 Karl Berry (karl at hayley) * other.c: test the bizarre duplicate case in re_compile_fastmap that I just noticed. * test.c (general_test): don't test registers beyond the end of correct_regs, as well as regs. * xregex.c (regex_compile): at handle_close, don't assign to *inner_group_loc if we didn't push a start_memory (because the group number was too big). In fact, don't push or pop the inner_group_offset in that case. * regex.c: rename to xregex.c, since it's not the whole thing. * regex.texinfo: likewise. * GNUmakefile: change to match. * regex.c [DEBUG]: only include <stdio.h> if debugging. * regexinc.c (SIGN_EXTEND_CHAR) [CHAR_UNSIGNED]: if it's already defined, don't redefine it. * regex.c: define _GNU_SOURCE at the beginning. * regexinc.c (isblank) [!isblank]: define it. (isgraph) [!isgraph]: change conditional to this, and remove the sequent stuff. * regex.c (regex_compile): add `blank' character class. * regex.c (regex_compile): don't use a uchar variable to loop through all characters. * regex.c (regex_compile): at '[', improve logic for checking that we have enough space for the charset. * regex.h (struct re_pattern_buffer): declare translate as char * again. We only use it as an array subscript once, I think. * regex.c (TRANSLATE): new macro to cast the data character before subscripting. (num_internal_regs): rename to `num_regs'.Fri Jan 3 07:58:01 1992 Karl Berry (karl at hayley) * regex.h (struct re_pattern_buffer): declare `allocated' and `used' as unsigned long, since these are never negative. * regex.c (compile_stack_element): rename to compile_stack_elt_t. (failure_stack_element): similarly. * regexinc.c (TALLOC, RETALLOC): new macros to simplify allocation of arrays. * regex.h (re_*) [__STDC__]: don't declare string args unsigned char *; that makes them incompatible with string constants. (struct re_pattern_buffer): declare the pattern and translate table as unsigned char *.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -