Path: utzoo!attcan!uunet!husc6!mailrus!ncar!boulder!sunybcs!bingvaxu!marge.math.binghamton.edu!sullivan From: sullivan@marge.math.binghamton.edu (fred sullivan) Newsgroups: comp.sys.ibm.pc Subject: Re: Unix-like global expansion in DOS Keywords: MS-DOS commandline length Message-ID: <1554@bingvaxu.cc.binghamton.edu> Date: 6 Nov 88 16:03:28 GMT References: <215@lcuxa.UUCP> <76192@sun.uucp> Sender: news@bingvaxu.cc.binghamton.edu Reply-To: sullivan@marge.math.binghamton.edu (fred sullivan) Organization: Dept. of Mathematical Sciences, SUNY at Binghamton Lines: 30 In article <76192@sun.uucp> naughton@sun.com (Patrick J. Naughton) writes: >I like the idea of having unix shell style wildcard expansion, but >having it be a C client function which has to be called before argv[] >processing kind of limits its usefulness. The solution I would like to >see would be a COMMAND.COM shell enhancement (replacement?) which >handled the usual stuff like file completion, history substitution, AND >wildcard expansion. > >This is a small matter of programming and I would certainly have already >done it if it were not for the point of this posting: The DOS command >line (last time I checked) had an upper limit of 128 characters. Thus >any wildcard expansion which expanded out to more than 128 characters >would fail. A similar problem exists for the Atari ST, and one solution? which has been used (I think by Mark Williams C) is to pass arguments which go past 128 bytes in an environment variable. The problem with any solution like this is, of course, that it simply will not work with existing software. For software which one writes for oneself, it is easy enough to have the program itself expand the wildcards (with Turbo C one links in a routine called setargv, which is called on startup by the runtime system -- I assume other compilers have something similar). It was an extremely stupid decision to embed the command line arguments in a 256 byte PSP, but then it's things like this that make DOS DOS. Fred Sullivan SUNY at Binghamton Dept. Math. Sciences Binghamton, NY 13903 sullivan@marge.math.binghamton.edu First you make a roux!