Mail Archives: djgpp/1995/11/23/12:29:21
As hereinunder, Messy-DOS's *.BATfile caller goes BATs when it finds an `=' in
an argument. This may cause obscure trouble for people who call a Gnu C/C++
program via a *.BAT . I have MS-DOS 6.22 . <-------- marks lines that I typed.
C:\AMZIP>TYPE T$.CC <------------
#include<stdio.h>
main(int nargs,char**Arg){int i;
for(i=0;i<nargs;i++) printf("%4dth arg is `%s'\n",i,Arg[i]);}
C:\AMZIP>TYPE T$$.BAT <-------------
t$.exe %1 %2 %3 %4 %5 %6 %7 %8
C:\AMZIP>t$ cat=and=mouse=games <----------------
0th arg is `c:/amzip/t$.exe'
1th arg is `cat=and=mouse=games'
C:\AMZIP>t$$ cat=and=mouse=games <------------------
C:\AMZIP>t$.exe cat and mouse games
0th arg is `c:/amzip/t$.exe'
1th arg is `cat'
2th arg is `and'
3th arg is `mouse'
4th arg is `games'
- Raw text -