Change 13534 by jhi@alpha on 2001/12/08 15:16:14

        Integrate perlio.

Affected files ...

.... //depot/perl/doio.c#180 integrate
.... //depot/perl/lib/Exporter/Heavy.pm#14 integrate
.... //depot/perl/lib/open.t#12 integrate
.... //depot/perl/op.c#461 integrate
.... //depot/perl/perlio.c#145 integrate
.... //depot/perl/perliol.h#22 integrate
.... //depot/perl/pod/perlfunc.pod#282 integrate
.... //depot/perl/pod/perltoc.pod#129 integrate
.... //depot/perl/pp.c#319 integrate

Differences ...

==== //depot/perl/doio.c#180 (text) ====
Index: perl/doio.c
--- perl/doio.c.~1~     Sat Dec  8 08:30:05 2001
+++ perl/doio.c Sat Dec  8 08:30:05 2001
@@ -359,9 +359,6 @@
                }
            } /* & */
            else {
-               if (num_svs > 1) {
-                   Perl_croak(aTHX_ "More than one argument to '>' open");
-               }
                /*SUPPRESS 530*/
                for (; isSPACE(*type); type++) ;
                if (*type == IoTYPE_STD && (!type[1] || isSPACE(type[1]) || type[1] == 
':')) {
@@ -369,6 +366,9 @@
                    type++;
                    fp = PerlIO_stdout();
                    IoTYPE(io) = IoTYPE_STD;
+                   if (num_svs > 1) {
+                       Perl_croak(aTHX_ "More than one argument to '>%c' 
+open",IoTYPE_STD);
+                   }
                }
                else  {
                    if (!num_svs) {
@@ -382,9 +382,6 @@
            } /* !& */
        }
        else if (*type == IoTYPE_RDONLY) {
-           if (num_svs > 1) {
-               Perl_croak(aTHX_ "More than one argument to '<' open");
-           }
            /*SUPPRESS 530*/
            for (type++; isSPACE(*type); type++) ;
            mode[0] = 'r';
@@ -401,6 +398,9 @@
                type++;
                fp = PerlIO_stdin();
                IoTYPE(io) = IoTYPE_STD;
+               if (num_svs > 1) {
+                   Perl_croak(aTHX_ "More than one argument to '<%c' 
+open",IoTYPE_STD);
+               }
            }
            else {
                if (!num_svs) {

==== //depot/perl/lib/Exporter/Heavy.pm#14 (text) ====
==== //depot/perl/lib/open.t#12 (text) ====
==== //depot/perl/op.c#461 (text) ====
==== //depot/perl/perlio.c#145 (text) ====
Index: perl/perlio.c
--- perl/perlio.c.~1~   Sat Dec  8 08:30:05 2001
+++ perl/perlio.c       Sat Dec  8 08:30:05 2001
@@ -208,7 +208,10 @@
 PerlIO_openn(pTHX_ const char *layers, const char *mode, int fd,
             int imode, int perm, PerlIO *old, int narg, SV **args)
 {
-    if (narg == 1) {
+    if (narg) {
+       if (narg > 1) {
+           Perl_croak(aTHX_ "More than one argument to open");
+       }
        if (*args == &PL_sv_undef)
            return PerlIO_tmpfile();
        else {
@@ -1283,6 +1286,9 @@
            /*
             * Found that layer 'n' can do opens - call it
             */
+           if (narg > 1 && !(tab->kind & PERLIO_K_MULTIARG)) {
+               Perl_croak(aTHX_ "More than one argument to open(,':%s')",tab->name);
+           }
            PerlIO_debug("openn(%s,'%s','%s',%d,%x,%o,%p,%d,%p)\n",
                         tab->name, layers, mode, fd, imode, perm, f, narg,
                         args);

==== //depot/perl/perliol.h#22 (text) ====
Index: perl/perliol.h
--- perl/perliol.h.~1~  Sat Dec  8 08:30:05 2001
+++ perl/perliol.h      Sat Dec  8 08:30:05 2001
@@ -58,6 +58,7 @@
 #define PERLIO_K_DUMMY         0x00000010
 #define PERLIO_K_UTF8          0x00008000
 #define PERLIO_K_DESTRUCT      0x00010000
+#define PERLIO_K_MULTIARG      0x00020000
 
 
/*--------------------------------------------------------------------------------------*/
 struct _PerlIO {

==== //depot/perl/pod/perlfunc.pod#282 (text) ====
==== //depot/perl/pod/perltoc.pod#129 (text+w) ====
==== //depot/perl/pp.c#319 (text) ====

End of Patch.

Reply via email to