summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2000-12-09 13:49:40 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2000-12-09 13:49:40 +0000
commit7889fe52c8bdedf274e4826ad460ef6c3606ca6a (patch)
tree3d161635f94f9d03924fbf79676ba0e4c27ae2ae /pp_hot.c
parent553151e7a76c75a9f0ccbf6e0802e72fde2ec8f2 (diff)
downloadperl-7889fe52c8bdedf274e4826ad460ef6c3606ca6a.tar.gz
UTF8 output prework.
- Store $\ and $, as SVs so they can have SvUTF8 flag - use do_print() rather than raw PerlIO_write() to print them. p4raw-id: //depot/perlio@8049
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 4020f200a2..979d1111a0 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -152,7 +152,7 @@ PP(pp_concat)
left_utf8 = DO_UTF8(left);
right_utf8 = DO_UTF8(right);
-
+
if (left_utf8 != right_utf8) {
if (TARG == right && !right_utf8) {
sv_utf8_upgrade(TARG); /* Now straight binary copy */
@@ -425,13 +425,13 @@ PP(pp_print)
}
else {
MARK++;
- if (PL_ofslen) {
+ if (PL_ofs_sv && SvOK(PL_ofs_sv)) {
while (MARK <= SP) {
if (!do_print(*MARK, fp))
break;
MARK++;
if (MARK <= SP) {
- if (PerlIO_write(fp, PL_ofs, PL_ofslen) == 0 || PerlIO_error(fp)) {
+ if (!do_print(PL_ofs_sv, fp)) { /* $, */
MARK--;
break;
}
@@ -448,8 +448,8 @@ PP(pp_print)
if (MARK <= SP)
goto just_say_no;
else {
- if (PL_orslen)
- if (PerlIO_write(fp, PL_ors, PL_orslen) == 0 || PerlIO_error(fp))
+ if (PL_ors_sv && SvOK(PL_ors_sv))
+ if (!do_print(PL_ors_sv, fp)) /* $\ */
goto just_say_no;
if (IoFLAGS(io) & IOf_FLUSH)