diff options
author | Simon Cozens <simon@netthink.co.uk> | 2000-06-23 11:05:40 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-06-23 13:24:15 +0000 |
commit | 84393cd974926732d8916ade7acf62979478deb1 (patch) | |
tree | 70f9e17c305191943e09aed7d1eb394e601b35c3 /toke.c | |
parent | 94414bfbc497e71da32f6edca513d34725e3cae6 (diff) | |
download | perl-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.c | 29 |
1 files changed, 2 insertions, 27 deletions
@@ -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; |