From e8a6a7a53407fd4c4adc37e8013baf9bc2e4d553 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 12 Jan 2016 06:38:11 -0800 Subject: Print control chars in regexes using \x. * lib.c (out_str_char): Static function becomes extern. * lib.h (out_str_char): Declared. * regex.c (puts_clear_flag, putc_clear_flag): New static functions. (print_class_char): Take semicolon flag argument. Use out_str_char to render characters not escaped locally. Clear the semicolon flag. (paren_print_rec): Take semicolon flag argument, and pass it down. Clear it when printing parentheses. (print_rec): Take semicolon flag argument, and pass down to lower level functions. Use putc_clear_flag and puts_clear_flag instead of put_string and put_char. Use out_str_char for char object not esaped locally. (regex_print): define semi_flag and pass it down to print_rec. --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib.c') diff --git a/lib.c b/lib.c index d6952482..9fb50a10 100644 --- a/lib.c +++ b/lib.c @@ -8264,7 +8264,7 @@ static val simple_qref_args_p(val args, val pos) } } -static void out_str_char(wchar_t ch, val out, int *semi_flag) +void out_str_char(wchar_t ch, val out, int *semi_flag) { if (*semi_flag && iswxdigit(ch)) put_char(chr(';'), out); -- cgit v1.2.3