[admin] set up .gitignore files
[p5sagit/p5-mst-13.2.git] / os2 / os2.c
index 53480e3..4ebdd50 100644 (file)
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -998,7 +998,7 @@ do_spawn_ve(pTHX_ SV *really, U32 flag, U32 execf, char *inicmd, U32 addflag)
        if (flag == P_WAIT)
                flag = P_NOWAIT;
        if (really && !*(real_name = SvPV(really, n_a)))
-           really = Nullsv;
+           really = NULL;
 
       retry:
        if (strEQ(PL_Argv[0],"/bin/sh")) 
@@ -1265,7 +1265,7 @@ do_spawn_ve(pTHX_ SV *really, U32 flag, U32 execf, char *inicmd, U32 addflag)
                                /* XXXX This is good only until we refuse
                                        quoted arguments... */
                                PL_Argv[0] = inicmd;
-                               PL_Argv[1] = Nullch;
+                               PL_Argv[1] = NULL;
                            }
                        } else if (!buf[0] && inicmd) { /* No file */
                            /* Start with the original cmdline. */
@@ -1273,7 +1273,7 @@ do_spawn_ve(pTHX_ SV *really, U32 flag, U32 execf, char *inicmd, U32 addflag)
                                    quoted arguments... */
 
                            PL_Argv[0] = inicmd;
-                           PL_Argv[1] = Nullch;
+                           PL_Argv[1] = NULL;
                            nargs = 2;  /* shell -c */
                        } 
 
@@ -1458,7 +1458,7 @@ do_spawn3(pTHX_ char *cmd, int execf, int flag)
        if (*s)
            *s++ = '\0';
     }
-    *a = Nullch;
+    *a = NULL;
     if (PL_Argv[0])
        rc = do_spawn_ve(aTHX_ NULL, flag, execf, cmd, mergestderr);
     else
@@ -1500,7 +1500,7 @@ os2_aspawn_4(pTHX_ SV *really, register SV **args, I32 cnt, int execing)
            else
                *a++ = "";
        }
-       *a = Nullch;
+       *a = NULL;
 
        if ( flag_set && (a == PL_Argv + 1)
             && !really && execing == ASPAWN_WAIT ) {           /* One arg? */
@@ -1573,7 +1573,7 @@ my_syspopen4(pTHX_ char *cmd, char *mode, I32 cnt, SV** args)
        taint_proper("Insecure %s%s", "EXEC");
     }
     if (pipe(p) < 0)
-       return Nullfp;
+       return NULL;
     /* Now we need to spawn the child. */
     if (p[this] == (*mode == 'r')) {   /* if fh 0/1 was initially closed. */
        int new = dup(p[this]);
@@ -1592,7 +1592,7 @@ my_syspopen4(pTHX_ char *cmd, char *mode, I32 cnt, SV** args)
          closepipes:
            close(p[0]);
            close(p[1]);
-           return Nullfp;
+           return NULL;
        }
     } else
        fh_fl = fcntl(*mode == 'r', F_GETFD);
@@ -1605,7 +1605,7 @@ my_syspopen4(pTHX_ char *cmd, char *mode, I32 cnt, SV** args)
     if (newfd != -1)
        fcntl(newfd, F_SETFD, FD_CLOEXEC);
     if (cnt) { /* Args: "Real cmd", before first arg, the last, execing */
-       pid = os2_aspawn_4(aTHX_ Nullsv, args, cnt, ASPAWN_NOWAIT);
+       pid = os2_aspawn_4(aTHX_ NULL, args, cnt, ASPAWN_NOWAIT);
     } else
        pid = do_spawn_nowait(aTHX_ cmd);
     if (newfd == -1)
@@ -1620,7 +1620,7 @@ my_syspopen4(pTHX_ char *cmd, char *mode, I32 cnt, SV** args)
        close(p[that]);
     if (pid == -1) {
        close(p[this]);
-       return Nullfp;
+       return NULL;
     }
     if (p[that] < p[this]) {           /* Make fh as small as possible */
        dup2(p[this], p[that]);
@@ -1879,8 +1879,8 @@ XS(XS_OS2_replaceModule)
        Perl_croak(aTHX_ "Usage: OS2::replaceModule(target [, source [, backup]])");
     {
        char *  target = (char *)SvPV_nolen(ST(0));
-       char *  source = (items < 2) ? Nullch : (char *)SvPV_nolen(ST(1));
-       char *  backup = (items < 3) ? Nullch : (char *)SvPV_nolen(ST(2));
+       char *  source = (items < 2) ? NULL : (char *)SvPV_nolen(ST(1));
+       char *  backup = (items < 3) ? NULL : (char *)SvPV_nolen(ST(2));
 
        if (!replaceModule(target, source, backup))
            croak_with_os2error("replaceModule() error");
@@ -2159,7 +2159,7 @@ dllname2buffer(pTHX_ char *buf, STRLEN l)
 {
     char *o;
     STRLEN ll;
-    SV *dll = Nullsv;
+    SV *dll = NULL;
 
     dll = module_name(mod_name_full);
     o = SvPV(dll, ll);
@@ -4099,7 +4099,7 @@ XS(XS_OS2_pipe)
        int     connect = 0, count, message_r = 0, message = 0, b = 0;
        ULONG   ulInbufLength,  ulOutbufLength, ulPipeMode, ulTimeout, rc;
        STRLEN  len;
-       char    *s, buf[10], *s1, *perltype = Nullch;
+       char    *s, buf[10], *s1, *perltype = NULL;
        PerlIO  *perlio;
        double  timeout;
 
@@ -4360,10 +4360,10 @@ XS(XS_OS2_pipeCntl)
                                      &PipeState), "DosPeekNPipe() for state");
            if (state) {
                EXTEND(SP, 3);
-               PUSHs(newSVuv(PipeState));
+               mPUSHu(PipeState);
                /*   Bytes (available/in-message) */
-               PUSHs(newSViv(BytesAvail.cbpipe));
-               PUSHs(newSViv(BytesAvail.cbmessage));
+               mPUSHi(BytesAvail.cbpipe);
+               mPUSHi(BytesAvail.cbmessage);
                XSRETURN(3);
            } else if (info) {
                /* L S S C C C/Z*
@@ -4390,12 +4390,12 @@ XS(XS_OS2_pipeCntl)
                else
                    size = strlen(b.pInfo.szName);
                EXTEND(SP, 6);
-               PUSHs(newSVpvn(b.pInfo.szName, size));
-               PUSHs(newSVuv(b.id));
-               PUSHs(newSViv(b.pInfo.cbOut));
-               PUSHs(newSViv(b.pInfo.cbIn));
-               PUSHs(newSViv(b.pInfo.cbMaxInst));
-               PUSHs(newSViv(b.pInfo.cbCurInst));
+               mPUSHp(b.pInfo.szName, size);
+               mPUSHu(b.id);
+               mPUSHi(b.pInfo.cbOut);
+               mPUSHi(b.pInfo.cbIn);
+               mPUSHi(b.pInfo.cbMaxInst);
+               mPUSHi(b.pInfo.cbCurInst);
                XSRETURN(6);
            } else if (BytesAvail.cbpipe == 0) {
                XSRETURN_NO;