-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Hi Japheth.
Thanks again for your brilliant work and the new 2.22 release which I just found out about today.
Anyway, I was trying out the OS/2 1.0 support by doing:
md hx
cd hx
unzip c:HXRT222.zip
unzip c:HXD16222.zip
and adding \hx\bin to my path
I tried this on both Freedos and MSDOS 4.0 and I got a problem on both.
I made these changes to my pdptest program:
D:\devel\pdos\pdpclib>cvs diff
cvs diff: Diffing .
Index: makefile.oss
===================================================================
RCS file: \cvsroot/pdos/pdpclib/makefile.oss,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 makefile.oss
84d83
< echo ++DosDevIOCtl.DOSCALLS.DOSDEVIOCTL.53 >>temp.wat
Index: pdptest.c
===================================================================
RCS file: \cvsroot/pdos/pdpclib/pdptest.c,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 pdptest.c
38a39
> return 0;
Index: start.c
===================================================================
RCS file: \cvsroot/pdos/pdpclib/start.c,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 start.c
584a585,587
> #ifdef __OS2__
> __stdin->kbdfile = 0;
> #endif
1259a1263
> printf("p is Z%sZ\n", p);
1279a1284
> printf("new p is Y%sY\n", p);
Index: stdio.c
===================================================================
RCS file: \cvsroot/pdos/pdpclib/stdio.c,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 stdio.c
153a154,155
> #define DosDevIOCtl(a, b, c, d, e) 0
>
5708a5711
> return 0;
D:\devel\pdos\pdpclib>
And on my Windows 2000 system (which supports OS/2 1.0 programs) I get this behavior:
D:\devel\pdos\pdpclib>pdptest
p is ZD:\devel\pdos\pdpclib\pdptest.exeZ
new p is YY
D:\devel\pdos\pdpclib>pdptest.exe
p is ZD:\devel\pdos\pdpclib\pdptest.exeZ
new p is YY
D:\devel\pdos\pdpclib>
I can't find the documentation for DosGetEnv at the moment, but I assume Windows 2000 behavior is correct and the first NUL-terminated string gives you the program name and the second NUL-terminated string gives the parameters.
I also tried on ArcaOS (which is OS/2 resold under a new name) and it behaved similar to Windows 2000 (difference was the program name was just "pdptest").
However, when I run:
dpmild16 pdptest.exe
(ie no parameters)
I am getting the first string as
\HXTEST\pdptest.exe
(which is correct - I am running in that directory).
And then I am getting - as parameters - a string of:
C:\HXTEST\pdptest.exe
Instead of an empty string.
Which then causes havoc with my programs.
Also, if I do:
dpmild16 pdptest.exe abc def
The "abc def" don't appear in the second string. Not sure if that's because I'm not using dpmild16 correctly or not though.
Would you be able to fix this please? (assuming I'm not missing something)
Thanks. Paul.