delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/11/23/12:29:21

From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
To: DJGPP AT sun DOT soe DOT clarkson DOT edu
Date: Thu, 23 Nov 1995 14:28:35 GMT
Subject: A DOS bug that may cause trouble for djgpp users

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 -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019