diff options
author | Larry Wall <lwall@netlabs.com> | 1992-06-08 04:50:30 +0000 |
---|---|---|
committer | Larry Wall <lwall@netlabs.com> | 1992-06-08 04:50:30 +0000 |
commit | ee0007abcec11102eeaa49662e5ebb838e04aac6 (patch) | |
tree | 8bd2b45245f7c74167adac89abd7285c65989bfb /os2 | |
parent | 7b0cd887a13445cfae2c23db0b7efd05a47758e6 (diff) | |
download | perl-ee0007abcec11102eeaa49662e5ebb838e04aac6.tar.gz |
perl 4.0 patch 28: patch #20, continued
See patch #20.
Diffstat (limited to 'os2')
-rw-r--r-- | os2/os2.c | 27 | ||||
-rw-r--r-- | os2/perl.cs | 13 | ||||
-rw-r--r-- | os2/perl.def | 4 | ||||
-rw-r--r-- | os2/perldb.dif | 52 | ||||
-rw-r--r-- | os2/perlglob.bad | 2 |
5 files changed, 31 insertions, 67 deletions
@@ -1,4 +1,4 @@ -/* $RCSfile: os2.c,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:23:06 $ +/* $RCSfile: os2.c,v $$Revision: 4.0.1.2 $$Date: 92/06/08 14:32:30 $ * * (C) Copyright 1989, 1990 Diomidis Spinellis. * @@ -6,6 +6,9 @@ * License or the Artistic License, as specified in the README file. * * $Log: os2.c,v $ + * Revision 4.0.1.2 92/06/08 14:32:30 lwall + * patch20: new OS/2 support + * * Revision 4.0.1.1 91/06/07 11:23:06 lwall * patch4: new copyright notice * @@ -54,14 +57,15 @@ int syscall() { return -1; } -/* extendd chdir() */ +/* extended chdir() */ int chdir(char *path) { if ( path[0] != 0 && path[1] == ':' ) - DosSelectDisk(toupper(path[0]) - '@'); + if ( DosSelectDisk(toupper(path[0]) - '@') ) + return -1; - DosChDir(path, 0L); + return DosChDir(path, 0L); } @@ -102,6 +106,17 @@ int getppid(void) } +/* wait for specific pid */ +int wait4pid(int pid, int *status, int flags) +{ + RESULTCODES res; + int endpid, rc; + if ( DosCwait(DCWA_PROCESS, flags ? DCWW_NOWAIT : DCWW_WAIT, + &res, &endpid, pid) ) + return -1; + *status = res.codeResult; + return endpid; +} /* kill */ int kill(int pid, int sig) @@ -251,7 +266,7 @@ char *cmd; usage(char *myname) { #ifdef MSDOS - printf("\nUsage: %s [-acdnpsSvw] [-0[octal]] [-Dnumber] [-i[extension]] [-Idirectory]" + printf("\nUsage: %s [-acdnpPsSvw] [-0[octal]] [-Dnumber] [-i[extension]] [-Idirectory]" #else printf("\nUsage: %s [-acdnpPsSuUvw] [-Dnumber] [-i[extension]] [-Idirectory]" #endif @@ -262,9 +277,7 @@ usage(char *myname) "\n -d run scripts under debugger" "\n -n assume 'while (<>) { ...script... }' loop arround your script" "\n -p assume loop like -n but print line also like sed" -#ifndef MSDOS "\n -P run script through C preprocessor befor compilation" -#endif "\n -s enable some switch parsing for switches after script name" "\n -S look for the script using PATH environment variable"); #ifndef MSDOS diff --git a/os2/perl.cs b/os2/perl.cs index 73bc4d7b8c..000d2c08b4 100644 --- a/os2/perl.cs +++ b/os2/perl.cs @@ -1,15 +1,18 @@ (-W1 -Od -Olt -DDEBUGGING -Gt2048 array.c cmd.c cons.c consarg.c doarg.c doio.c dolist.c dump.c form.c -hash.c perl.c perly.c regcomp.c regexec.c stab.c str.c util.c +hash.c perl.c regcomp.c regexec.c stab.c str.c util.c ) -(-W1 -Od -Olt -B2C2L -B3C3L -DDEBUGGING eval.c{evalargs.xc} toke.c) +(-W1 -Od -Olt -DDEBUGGING -Gt2048 (-d perly.y)) +(-W1 -Od -Olt -B2C2L -B3C3L -DDEBUGGING eval.c toke.c) (-W1 -Od -Olt -I. -Ios2 -os2\os2.c os2\popen.c os2\mktemp.c os2\director.c os2\suffix.c os2\alarm.c +os2\os2.c os2\popen.c os2\suffix.c +os2\director.c os2\alarm.c os2\crypt.c ) ; link with this library if you have GNU gdbm for OS/2 -; remember to enable the NDBM symbol in config.h before compiling -lgdbm.lib +; remember to enable the GDBM symbol in config.h before compiling +llibgdbm.lib + setargv.obj os2\perl.def os2\perl.bad diff --git a/os2/perl.def b/os2/perl.def index c19e340a5b..7c0fca0174 100644 --- a/os2/perl.def +++ b/os2/perl.def @@ -1,2 +1,2 @@ -NAME PERL WINDOWCOMPAT NEWFILES -DESCRIPTION 'PERL 3.0 - for MS-DOS and OS/2' +NAME WINDOWCOMPAT NEWFILES +DESCRIPTION 'PERL 4.0 - for MS-DOS and OS/2' diff --git a/os2/perldb.dif b/os2/perldb.dif index a1716821e3..e69de29bb2 100644 --- a/os2/perldb.dif +++ b/os2/perldb.dif @@ -1,52 +0,0 @@ -*** lib/perldb.pl Tue Oct 23 23:14:20 1990 ---- os2/perldb.pl Tue Nov 06 21:13:42 1990 -*************** -*** 36,43 **** - # - # - -! open(IN, "</dev/tty") || open(IN, "<&STDIN"); # so we don't dingle stdin -! open(OUT,">/dev/tty") || open(OUT, ">&STDOUT"); # so we don't dongle stdout - select(OUT); - $| = 1; # for DB'OUT - select(STDOUT); ---- 36,43 ---- - # - # - -! open(IN, "<con") || open(IN, "<&STDIN"); # so we don't dingle stdin -! open(OUT,">con") || open(OUT, ">&STDOUT"); # so we don't dongle stdout - select(OUT); - $| = 1; # for DB'OUT - select(STDOUT); -*************** -*** 517,530 **** - s/(.*)/'$1'/ unless /^-?[\d.]+$/; - } - -! if (-f '.perldb') { -! do './.perldb'; - } -! elsif (-f "$ENV{'LOGDIR'}/.perldb") { -! do "$ENV{'LOGDIR'}/.perldb"; - } -! elsif (-f "$ENV{'HOME'}/.perldb") { -! do "$ENV{'HOME'}/.perldb"; - } - - 1; ---- 517,530 ---- - s/(.*)/'$1'/ unless /^-?[\d.]+$/; - } - -! if (-f 'perldb.ini') { -! do './perldb.ini'; - } -! elsif (-f "$ENV{'INIT'}/perldb.ini") { -! do "$ENV{'INIT'}/perldb.ini"; - } -! elsif (-f "$ENV{'HOME'}/perldb.ini") { -! do "$ENV{'HOME'}/perldb.ini"; - } - - 1; diff --git a/os2/perlglob.bad b/os2/perlglob.bad index 5f4efc8c18..a14bc63f16 100644 --- a/os2/perlglob.bad +++ b/os2/perlglob.bad @@ -1 +1 @@ -DOSQFSATTACH +(deprecated) |