summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@khw-desktop.(none)>2010-04-19 20:16:50 -0600
committerRafael Garcia-Suarez <rgs@consttype.org>2010-04-26 10:20:09 +0200
commitf9d1352942831df20889dc83ce32232f9c13590f (patch)
tree7e8f2112c8428c041dfbb5bc7b1244e89dd722f0 /toke.c
parent353c9b6f16dec626f888894e7df6f8819303bd11 (diff)
downloadperl-f9d1352942831df20889dc83ce32232f9c13590f.tar.gz
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.
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/toke.c b/toke.c
index 5f3abe8ab5..fa0d939e2b 100644
--- a/toke.c
+++ b/toke.c
@@ -3283,12 +3283,7 @@ S_scan_const(pTHX_ char *start)
case 'c':
s++;
if (s < send) {
- U8 c = *s++;
-#ifdef EBCDIC
- if (isLOWER(c))
- c = toUPPER(c);
-#endif
- *d++ = NATIVE_TO_NEED(has_utf8,toCTRL(c));
+ *d++ = grok_bslash_c(*s++, 1);
}
else {
yyerror("Missing control char name in \\c");