Mercurial > hg > xemacs-beta
diff src/regex.h @ 5041:efaa6cd845e5
add regexp-debugging
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-15 Ben Wing <ben@xemacs.org>
* regex.c:
* regex.c (DEBUG_FAIL_PRINT1):
* regex.c (PUSH_FAILURE_POINT):
* regex.c (POP_FAILURE_POINT):
* regex.c (regex_compile):
* regex.c (re_match_2_internal):
* regex.h:
* search.c:
* search.c (search_buffer):
* search.c (debug_regexps_changed):
* search.c (vars_of_search):
Add an internal variable debug_regexps and a corresponding Lisp
variable `debug-regexps' that takes a list of areas in which to
display debugging info about regex compilation and matching
(currently three areas exist). Use existing debugging code
already in regex.c and modify it so that it recognizes the
debug_regexps variable and the flags in it.
Rename variable `debug-xemacs-searches' to just `debug-searches',
consistent with other debug vars.
tests/ChangeLog addition:
2010-02-15 Ben Wing <ben@xemacs.org>
* automated/search-tests.el (let):
* automated/search-tests.el (boundp):
debug-xemacs-searches renamed to debug-searches.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Mon, 15 Feb 2010 21:51:22 -0600 |
parents | cd00e5eeb22a |
children | f283b08ff0c9 |
line wrap: on
line diff
--- a/src/regex.h Wed Feb 10 07:25:19 2010 -0600 +++ b/src/regex.h Mon Feb 15 21:51:22 2010 -0600 @@ -2,7 +2,7 @@ expression library, version 0.12. Copyright (C) 1985, 89, 90, 91, 92, 93, 95 Free Software Foundation, Inc. - Copyright (C) 2002 Ben Wing. + Copyright (C) 2002, 2010 Ben Wing. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -526,4 +526,13 @@ size_t errbuf_size); void regfree (regex_t *preg); +enum regex_debug + { + RE_DEBUG_COMPILATION = 1 << 0, + RE_DEBUG_FAILURE_POINT = 1 << 1, + RE_DEBUG_MATCHING = 1 << 2, + }; + +extern int debug_regexps; + #endif /* INCLUDED_regex_h_ */