summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorSimon Cozens <simon@netthink.co.uk>2000-06-23 11:05:40 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-06-23 13:24:15 +0000
commit84393cd974926732d8916ade7acf62979478deb1 (patch)
tree70f9e17c305191943e09aed7d1eb394e601b35c3 /toke.c
parent94414bfbc497e71da32f6edca513d34725e3cae6 (diff)
downloadperl-84393cd974926732d8916ade7acf62979478deb1.tar.gz
Remove tr///CU (the feature is to be obsoleted by better interfaces).
Subject: [PATCH] Eliminate tr///[CU][CU] Message-ID: <slrn8l6h44.h5k.simon@justanother.perlhacker.org> p4raw-id: //depot/cfgperl@6221
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/toke.c b/toke.c
index 05822e1e87..fe1435805c 100644
--- a/toke.c
+++ b/toke.c
@@ -6130,45 +6130,20 @@ S_scan_trans(pTHX_ char *start)
Perl_croak(aTHX_ "Transliteration replacement not terminated");
}
- if (UTF) {
- o = newSVOP(OP_TRANS, 0, 0);
- utf8 = OPpTRANS_FROM_UTF|OPpTRANS_TO_UTF;
- }
- else {
New(803,tbl,256,short);
o = newPVOP(OP_TRANS, 0, (char*)tbl);
- utf8 = 0;
- }
complement = del = squash = 0;
- while (strchr("cdsCU", *s)) {
+ while (strchr("cds", *s)) {
if (*s == 'c')
complement = OPpTRANS_COMPLEMENT;
else if (*s == 'd')
del = OPpTRANS_DELETE;
else if (*s == 's')
squash = OPpTRANS_SQUASH;
- else {
- switch (count++) {
- case 0:
- if (*s == 'C')
- utf8 &= ~OPpTRANS_FROM_UTF;
- else
- utf8 |= OPpTRANS_FROM_UTF;
- break;
- case 1:
- if (*s == 'C')
- utf8 &= ~OPpTRANS_TO_UTF;
- else
- utf8 |= OPpTRANS_TO_UTF;
- break;
- default:
- Perl_croak(aTHX_ "Too many /C and /U options");
- }
- }
s++;
}
- o->op_private = del|squash|complement|utf8;
+ o->op_private = del|squash|complement;
PL_lex_op = o;
yylval.ival = OP_TRANS;