Glenn Morris
e0f24100c7
Replace `iff' in comments.
2007-08-08 07:49:21 +00:00
Glenn Morris
706b5dc02e
Switch license to GPLv3 or later.
2007-07-26 04:50:05 +00:00
Glenn Morris
4e6835dbc4
Add 2007 to copyright years.
2007-01-21 04:57:37 +00:00
Jason Rumney
ec86967264
(regerror): Change parameter name err_code.
2006-12-29 14:32:52 +00:00
Kenichi Handa
3aaab9a080
(regex_compile): Fix previous change.
2006-11-30 01:53:16 +00:00
Kenichi Handa
151ccb7400
(regex_compile): Fix previous change.
2006-11-28 01:13:26 +00:00
Kenichi Handa
6358f8b2bf
(regex_compile): Don't call SET_LIST_BIT with a
...
multibyte character.
2006-11-28 01:10:42 +00:00
Juanma Barranquero
46ac3660d0
Fix last change in whitespace.
2006-11-24 19:36:39 +00:00
Juanma Barranquero
7814e705ee
Whitespace/tab mixups.
2006-11-24 09:30:44 +00:00
Stefan Monnier
6224b623fd
(regex_compile): Set the new `used_syntax' bit.
2006-10-03 13:19:18 +00:00
Stefan Monnier
4560a582d6
(analyse_first): For eight-bit-control chars, mark both the
...
char's value and its leading byte in the fastmap.
(re_search_2): When fast-scanning without translation, be careful to
check that we only match the leading byte of a multibyte char.
2006-09-22 17:30:13 +00:00
Richard M. Stallman
1208f11ada
(re_compile_pattern): Set gl_state.current_syntax_table.
2006-09-16 15:28:47 +00:00
Andreas Schwab
8ea094cffa
Fix indentation.
2006-02-21 12:58:58 +00:00
Chong Yidong
a073faa64c
* regex.c: Revert 2006-02-19 change.
...
Redefine malloc -> xmalloc, realloc -> xrealloc as in Emacs case.
2006-02-20 16:44:09 +00:00
Chong Yidong
a77f947b23
* regex.c (xmalloc, xrealloc): Define these when not linked to
...
Emacs.
2006-02-20 16:25:21 +00:00
Luc Teirlinck
4aea1d4bd7
(extend_range_table_work_area): Fix typo.
2006-02-20 03:48:53 +00:00
Richard M. Stallman
7b1d7d664b
(regex_compile): Call xmalloc and xrealloc.
...
(regcomp): Use xmalloc.
2006-02-20 01:19:15 +00:00
Richard M. Stallman
8a169494f0
(extend_range_table_work_area): Call xmalloc and xrealloc.
2006-02-20 01:15:42 +00:00
Stefan Monnier
1cee1e272f
(IMMEDIATE_QUIT_CHECK): Use it with SYNC_INPUT as well.
...
(re_match_2_internal) <on_failure_jump, on_failure_jump_smart>:
Don't check for quit, since any loop will go through fail or jump.
2006-01-24 19:14:58 +00:00
Stefan Monnier
6470ea05f9
(re_char): Move it back to the implementation file.
...
(re_set_whitespace_regexp): Change the arg's type to not use it.
2005-10-04 04:31:08 +00:00
Dan Nicolaescu
fa8459a34e
* image.c (slurp_file, xbm_read_bitmap_data): Cast to the correct
...
type.
* xterm.c (handle_one_xevent, handle_one_xevent): Likewise.
* unexelf.c (fatal): Fix prototype.
* term.c (fatal): Implement using varargs.
* regex.c (re_char): Move typedef ...
* regex.h (re_char): ... here.
(re_iswctype, re_wctype, re_set_whitespace_regexp): New
prototypes.
* emacs.c (malloc_set_state): Fix return type.
(endif): Fix type.
* lisp.h (fatal): Add argument types.
* dispextern.h (fatal): Delete prototype.
* systime.h: (make_time): Prototype moved from ...
* editfns.c (make_time): ... here.
* editfns.c: Move systime.h include after lisp.h.
* dired.c:
* xsmfns.c:
* process.c: Likewise.
* alloc.c (old_malloc_hook, old_realloc_hook, old_realloc_hook):
Add parameter types.
(__malloc_hook, __realloc_hook, __free_hook): Fix prototypes.
(emacs_blocked_free): Change definition to match __free_hook.
(emacs_blocked_malloc): Change definition to match __malloc_hook.
(emacs_blocked_realloc): Change definition to match
__realloc_hook.
2005-09-30 22:38:16 +00:00
Thien-Thi Nguyen
0b5538bd85
Update years in copyright notice; nfc.
2005-08-07 12:33:19 +00:00
Lute Kamstra
4fc5845fe8
Update FSF's address.
2005-07-04 16:49:24 +00:00
Eli Zaretskii
cf1982d9ea
(re_search_2, re_match_2_internal): Convert second arg
...
of RE_TRANSLATE to int, to shut up GCC warnings.
2005-04-24 16:41:14 +00:00
Richard M. Stallman
134579f2da
(re_match_2_internal) <symend, wordend>:
...
Fix calls to UPDATE_SYNTAX_TABLE_FORWARD.
2004-12-20 11:06:54 +00:00
Stefan Monnier
c72b0edd08
(GET_UNSIGNED_NUMBER): Signal an error when reaching the end.
...
Remove redundant correctness checks.
(regex_compile): Fix up error codes for \{..\} expressions.
2004-12-06 00:41:40 +00:00
Richard M. Stallman
c721eee5e3
(regex_compile): Fix end-of-pattern case for space.
2004-12-05 23:34:44 +00:00
Richard M. Stallman
4fb680cd9c
Fix previous change.
2004-11-19 19:47:39 +00:00
Richard M. Stallman
f9b0fd9964
(regex_compile): Substitute whitespace_regexp for spaces, if it is nonzero.
...
(whitespace_regexp): New variable.
(re_set_whitespace_regexp): New function.
2004-11-19 19:36:09 +00:00
Kenichi Handa
b3e4c89795
(re_error_msgid): Add an entry for REG_ERANGEX.
...
(regex_compile): Return REG_ERANGEX if appropriate.
2004-10-24 03:56:51 +00:00
Richard M. Stallman
1fdab50394
(re_wctype, re_iswctype): Function defs longer static.
...
(CHAR_CLASS_MAX_LENGTH, re_wctype_t, re_wchar_t)
(re_wctype, re_iswctype, re_wctype_to_bit):
Non-function definitions moved to regex.h.
2004-06-13 22:36:05 +00:00
Stefan Monnier
e2543b02bf
(print_partial_compiled_pattern): Add missing 'break'
...
after 'case wordend'. For symbeg and symend, print to stderr,
like the other cases.
2004-05-28 22:28:09 +00:00
Stefan Monnier
669fa600c6
Add support for new '\_<' and '\_>' regexp operators, matching the
...
beginning and ends of symbols.
* regex.c (enum syntaxcode): Add Ssymbol.
(init_syntax_once): Set the syntax for '_' to Ssymbol, not Sword.
(re_opcode_t): New opcodes `symbeg' and `symend'.
(print_partial_compiled_pattern): Print the new opcodes properly.
(regex_compile): Parse the new operators.
(analyse_first): Skip symbeg and symend (they match only the empty string).
(mutually_exclusive_p): `symend' is mutually exclusive with \s_ and
\sw; `symbeg' is mutually exclusive with \S_ and \Sw.
(re_match_2_internal): Match symbeg and symend.
2004-05-19 16:38:34 +00:00
Eli Zaretskii
2a0c736beb
(mutually_exclusive_p): In 'case wordbeg', compare op2
...
against proper opcode.
2004-05-11 09:47:25 +00:00
Richard M. Stallman
275a34095a
(MAX_BUF_SIZE): Reduce to 2**15.
...
(print_partial_compiled_pattern): Replace assert with a printout.
(skip_noops, mutually_exclusive_p): Change args, values to re_char *.
2003-10-13 18:48:14 +00:00
Richard M. Stallman
7c67c9f660
(regex_compile): Free the stack when returning from function.
2003-09-30 12:36:17 +00:00
Miles Bader
ab5796a9f9
Add arch taglines
2003-09-01 15:45:59 +00:00
Richard M. Stallman
a1a052dfa5
(print_partial_compiled_pattern): Output to stderr.
2003-02-23 15:00:30 +00:00
Juanma Barranquero
177c0ea743
Trailing whitespace deleted.
2003-02-04 14:56:31 +00:00
Kenichi Handa
70806df64d
(GET_CHAR_BEFORE_2): Use PREV_CHAR_BOUNDARY.
...
(re_search_2): Likewise.
2003-01-16 04:31:55 +00:00
Dave Love
1fc84d77bb
(_GNU_SOURCE): Don't define.
2002-11-18 15:40:28 +00:00
Dave Love
9f2dbe01ef
(regexec): Fix pmatch declaration.
2002-11-07 20:53:33 +00:00
Stefan Monnier
6df42991d3
(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.
2002-09-10 05:59:32 +00:00
Richard M. Stallman
098d42af72
(regnum_t): Use signed int, not unsigned int.
2002-09-09 19:41:30 +00:00
Richard M. Stallman
b7c1256511
(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.
2002-09-06 03:09:13 +00:00
Richard M. Stallman
77d11aec51
(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.
2002-09-05 02:34:37 +00:00
Stefan Monnier
365958144e
(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.
2002-08-23 22:21:51 +00:00
Richard M. Stallman
060cc8ffa0
(GET_UNSIGNED_NUMBER): Give proper error for spaces.
2002-03-25 00:45:48 +00:00
Richard M. Stallman
f6df485fd7
(DISCARD_FAILURE_REG_OR_COUNT): New macro.
...
(CHECK_INFINITE_LOOP): Use DISCARD_FAILURE_REG_OR_COUNT
when jumping to `fail' to avoid undoing reg changes in the
last iteration of the loop.
(GET_UNSIGNED_NUMBER): Skip spaces around the number.
2002-03-21 09:44:43 +00:00
Stefan Monnier
ada30c0eab
(re_wctype): Try to fix some warnings.
...
(regcomp, regexec): Don't forget the __restrict.
2001-11-02 16:06:54 +00:00