diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-11-20 23:20:18 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-11-20 23:20:18 +0000 |
commit | 88b61e10dfef3b0642d1458a9fff93e5000f86b0 (patch) | |
tree | a9ccc062b09aba8caba31f019790e1a9f7c23abe /doio.c | |
parent | 66ecd56be076649bc9da523c12d89e06e353e801 (diff) | |
download | perl-88b61e10dfef3b0642d1458a9fff93e5000f86b0.tar.gz |
Make extra buffer layer work (dummy crlf layer)
p4raw-id: //depot/perlio@7788
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -419,16 +419,16 @@ Perl_do_open9(pTHX_ GV *gv, register char *name, I32 len, int as_raw, IoTYPE(io) = IoTYPE_RDONLY; /*SUPPRESS 530*/ for (; isSPACE(*name); name++) ; + mode[0] = 'r'; + if (in_raw) + strcat(mode, "b"); + else if (in_crlf) + strcat(mode, "t"); if (strEQ(name,"-")) { fp = PerlIO_stdin(); IoTYPE(io) = IoTYPE_STD; } else { - mode[0] = 'r'; - if (in_raw) - strcat(mode, "b"); - else if (in_crlf) - strcat(mode, "t"); fp = PerlIO_open(name,mode); } } @@ -439,8 +439,7 @@ Perl_do_open9(pTHX_ GV *gv, register char *name, I32 len, int as_raw, Perl_warner(aTHX_ WARN_NEWLINE, PL_warn_nl, "open"); goto say_false; } - if (IoTYPE(io) && - IoTYPE(io) != IoTYPE_PIPE && IoTYPE(io) != IoTYPE_STD) { + if (IoTYPE(io) && IoTYPE(io) != IoTYPE_PIPE && IoTYPE(io) != IoTYPE_STD) { dTHR; if (PerlLIO_fstat(PerlIO_fileno(fp),&PL_statbuf) < 0) { (void)PerlIO_close(fp); |