From f9d1352942831df20889dc83ce32232f9c13590f Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Mon, 19 Apr 2010 20:16:50 -0600 Subject: Deal with "\c{", and its kin make regen is needed This patch forbids non-ascii following the "\c". It also terminates for "\c{" with a message to contact p5p if there is need for continuing its current definition. And if the character following the "\c" causes the result to not be a control character, a warning is issued. This is currently 'deprecated', which by default is turned on. This can easily be changed later. This patch is the initial patch. It does not do any fancy showing the context where the problematic construct occurs. This can be added later. It gathers the 3 occurrences of evaluating \c and puts them in one common routine. --- regcomp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'regcomp.c') diff --git a/regcomp.c b/regcomp.c index 56d7e55440..a9ebb73568 100644 --- a/regcomp.c +++ b/regcomp.c @@ -7445,8 +7445,7 @@ tryagain: break; case 'c': p++; - ender = UCHARAT(p++); - ender = toCTRL(ender); + ender = grok_bslash_c(*p++, SIZE_ONLY); break; case '0': case '1': case '2': case '3':case '4': case '5': case '6': case '7': case '8':case '9': @@ -8063,8 +8062,7 @@ parseit: goto recode_encoding; break; case 'c': - value = UCHARAT(RExC_parse++); - value = toCTRL(value); + value = grok_bslash_c(*RExC_parse++, SIZE_ONLY); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': -- cgit v1.2.1