Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
5027:22179cd0fe15 | 5041:efaa6cd845e5 |
---|---|
1 /* Definitions for data structures and routines for the regular | 1 /* Definitions for data structures and routines for the regular |
2 expression library, version 0.12. | 2 expression library, version 0.12. |
3 | 3 |
4 Copyright (C) 1985, 89, 90, 91, 92, 93, 95 Free Software Foundation, Inc. | 4 Copyright (C) 1985, 89, 90, 91, 92, 93, 95 Free Software Foundation, Inc. |
5 Copyright (C) 2002 Ben Wing. | 5 Copyright (C) 2002, 2010 Ben Wing. |
6 | 6 |
7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 2, or (at your option) | 9 the Free Software Foundation; either version 2, or (at your option) |
10 any later version. | 10 any later version. |
524 regmatch_t pmatch[], int eflags); | 524 regmatch_t pmatch[], int eflags); |
525 size_t regerror (int errcode, const regex_t *preg, char *errbuf, | 525 size_t regerror (int errcode, const regex_t *preg, char *errbuf, |
526 size_t errbuf_size); | 526 size_t errbuf_size); |
527 void regfree (regex_t *preg); | 527 void regfree (regex_t *preg); |
528 | 528 |
529 enum regex_debug | |
530 { | |
531 RE_DEBUG_COMPILATION = 1 << 0, | |
532 RE_DEBUG_FAILURE_POINT = 1 << 1, | |
533 RE_DEBUG_MATCHING = 1 << 2, | |
534 }; | |
535 | |
536 extern int debug_regexps; | |
537 | |
529 #endif /* INCLUDED_regex_h_ */ | 538 #endif /* INCLUDED_regex_h_ */ |