diff options
author | dgp <dgp@users.sourceforge.net> | 2015-09-21 19:25:20 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-09-21 19:25:20 (GMT) |
commit | 066e9abdc308995186dbc4d9bbc2fedc07674296 (patch) | |
tree | c218bc169f19075cbc1a3e813cccac59e791c5c5 /generic/regc_color.c | |
parent | d9db840088cdabd2863a7bd92ca051cda3f56c46 (diff) | |
download | tcl-066e9abdc308995186dbc4d9bbc2fedc07674296.zip tcl-066e9abdc308995186dbc4d9bbc2fedc07674296.tar.gz tcl-066e9abdc308995186dbc4d9bbc2fedc07674296.tar.bz2 |
[187d7f499b] Sync the regexp engine to the Postgres version.
Diffstat (limited to 'generic/regc_color.c')
-rw-r--r-- | generic/regc_color.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/generic/regc_color.c b/generic/regc_color.c index 2e167fe..92e0aad 100644 --- a/generic/regc_color.c +++ b/generic/regc_color.c @@ -777,18 +777,19 @@ dumpcolors( } /* - * It's hard to do this more efficiently. + * Unfortunately, it's hard to do this next bit more efficiently. + * + * Spencer's original coding has the loop iterating from CHR_MIN + * to CHR_MAX, but that's utterly unusable for 32-bit chr, or + * even 16-bit. For debugging purposes it seems fine to print + * only chr codes up to 1000 or so. */ - for (c=CHR_MIN ; c<CHR_MAX ; c++) { + for (c=CHR_MIN ; c<1000 ; c++) { if (GETCOLOR(cm, c) == co) { dumpchr(c, f); } } - assert(c == CHR_MAX); - if (GETCOLOR(cm, c) == co) { - dumpchr(c, f); - } fprintf(f, "\n"); } } |