Mercurial > hg > xemacs-beta
annotate src/vdb.h @ 5648:3f4a234f4672
Support non-ASCII correctly in character classes, test this.
src/ChangeLog addition:
2012-04-21 Aidan Kehoe <kehoea@parhasard.net>
Support non-ASCII correctly in character classes ([:alnum:] and
friends).
* regex.c:
* regex.c (ISBLANK, ISUNIBYTE): New. Make these and friends
independent of the locale, since we want them to be consistent in
XEmacs.
* regex.c (print_partial_compiled_pattern): Print the flags for
charset_mule; don't print non-ASCII as the character values in
ranges, this breaks with locales.
* regex.c (enum):
Define various flags the charset_mule and charset_mule_not opcodes
can now take.
* regex.c (CHAR_CLASS_MAX_LENGTH): Update this.
* regex.c (re_iswctype, re_wctype): New, from GNU.
* regex.c (re_wctype_can_match_non_ascii): New; used when deciding
on whether to use charset_mule or the ASCII-only regex character
set opcode.
* regex.c (regex_compile):
Error correctly on long, non-existent character class names.
Break out the handling of charsets that can match non-ASCII into a
separate clause. Use compile_char_class when compiling character
classes.
* regex.c (compile_char_class): New. Used in regex_compile when
compiling character sets that may match non-ASCII.
* regex.c (re_compile_fastmap):
If there are flags set for charset_mule or charset_mule_not, we
can't use the fastmap (since we need to check syntax table values
that aren't available there).
* regex.c (re_match_2_internal):
Check the new flags passed to the charset_mule{,_not} opcode,
observe them if appropriate.
* regex.h:
* regex.h (enum):
Expose re_wctype_t here, imported from GNU.
tests/ChangeLog addition:
2012-04-21 Aidan Kehoe <kehoea@parhasard.net>
* automated/regexp-tests.el:
* automated/regexp-tests.el (Assert-char-class):
Check that #'string-match errors correctly with an over-long
character class name.
Add tests for character class functionality that supports
non-ASCII characters. These tests expose bugs in GNU Emacs
24.0.94.2, but pass under current XEmacs.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 21 Apr 2012 18:58:28 +0100 |
parents | 308d34e9f07d |
children |
rev | line source |
---|---|
3092 | 1 /* Virtual diry bit implementation for XEmacs. |
2 Copyright (C) 2005 Marcus Crestani. | |
3 | |
4 This file is part of XEmacs. | |
5 | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
3092
diff
changeset
|
6 XEmacs is free software: you can redistribute it and/or modify it |
3092 | 7 under the terms of the GNU General Public License as published by the |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
3092
diff
changeset
|
8 Free Software Foundation, either version 3 of the License, or (at your |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
3092
diff
changeset
|
9 option) any later version. |
3092 | 10 |
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
3092
diff
changeset
|
17 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
3092 | 18 |
19 /* Synched up with: Not in FSF. */ | |
20 | |
21 #include "lisp.h" | |
22 | |
23 #ifndef INCLUDED_vdb_h_ | |
24 #define INCLUDED_vdb_h_ | |
25 | |
26 | |
27 /*--- prototypes -------------------------------------------------------*/ | |
28 | |
29 BEGIN_C_DECLS | |
30 | |
31 /* Platform dependent signal handling: */ | |
32 | |
33 /* Install the platform-dependent signal handler. */ | |
34 void vdb_install_signal_handler (void); | |
35 | |
36 /* Platform dependent memory protection. */ | |
37 void vdb_protect (void *ptr, EMACS_INT len); | |
38 void vdb_unprotect (void *ptr, EMACS_INT len); | |
39 | |
40 | |
41 | |
42 /* Common (platform independent) virtual diry bit stuff: */ | |
43 | |
44 /* Start the write barrier. This function is called when a garbage | |
45 collection is suspendend and the client is resumed. */ | |
46 void vdb_start_dirty_bits_recording (void); | |
47 /* Stop the write barrier. This function is called when the client is | |
48 suspendend and garbage collection is resumed. */ | |
49 void vdb_stop_dirty_bits_recording (void); | |
50 | |
51 /* Record page faults: Add the object pointed to by addr to the write | |
52 barrer's internal data structure that stores modified objects. | |
53 This function is called by the write barrier's fault handler. */ | |
54 void vdb_designate_modified (void *addr); | |
55 | |
56 /* Propagate page faults to garbage collector: Read out the write | |
57 barrier's internal data structure that stores modified objects and | |
58 pass the information to the garbage collector. This function is | |
59 called by vdb_stop_dirty_bits_recording(). Return how many objects | |
60 have to be re-examined by the garbage collector. */ | |
61 int vdb_read_dirty_bits (void); | |
62 | |
63 /* Provides Lisp functions for testing vdb implementation. */ | |
64 void syms_of_vdb (void); | |
65 | |
66 END_C_DECLS | |
67 | |
68 #endif /* INCLUDED_vdb_h_ */ |