Article View: comp.sys.ibm.pc
Article #40862Re: Why is comma delimiter in batch files?
From: Richard Brittain
Date: Fri, 05 Jan 1990 21:21
Date: Fri, 05 Jan 1990 21:21
31 lines
2388 bytes
2388 bytes
In article <74@qmsseq.imagen.com> pipkins@qmsseq.UUCP (Jeff Pipkins) writes:
>In article <2646@jolnet.ORPK.IL.US> b-cox2@uiuc.edu writes:
>>In article <3445@cbnewsl.ATT.COM> rl@cbnewsl.ATT.COM (roger.h.levy) writes:
>>>My question: Is there a way to convince batch files to think of the comma
>>>as part of the parameter, i.e. to regard only blanks as delimiters so as
>>>to be consistent with c programs?
>>
>>An alternative, if you want to do it and
>>have source to your C startup code, is to patch that (Turbo C Pro comes with
>>this source, Microsoft may/may not -- Turbo C's name is "c0?.obj" where the ?
>>is the memory model) to parse a comma as a delimiter.
>
>Incidently, the command tail is not parsed by c0?.obj, but by a function
>that it calls. I don't remember its name right now. Same goes for MSC,
>the name is setargv() I think. You can link in your own version of this
At least in Turbo-C, the function is definitely setargv(), and you can
replace it without messing with the startup .obj file. The option to have
wildcards expanded in the argv array just links in a different setargv(), and
if you don't need command line parameters at all, you can save some memory
in the executable by saying setargv() {};
I have versions of setargv() written in both C and assembler (distributed, I
think, before the current release of Turbo-C, which gives you the source for
setargv.asm), and it is quite easy to change the parsing and/or wildcard
expansion. I hacked mine to recognise [] as part of a wildcard pattern, so the
wildunix TSR program worked better.
Richard Brittain, School of Elect. Eng., Upson Hall
Cornell University, Ithaca, NY 14853
ARPA: richard@calvin.spp.cornell.edu
UUCP: {uunet,uw-beaver,rochester,cmcl2}!cornell!calvin!richard
Technical Details
Message-ID:
<1990Jan5.212134.16814@calvin.spp.cornell.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!calvin.spp.cornell.edu!richardReferences:
<3445@cbnewsl.ATT.COM> <2646@jolnet.ORPK.IL.US> <74@qmsseq.imagen.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!calvin.spp.cornell.edu!richard From: richard@calvin.spp.cornell.edu (Richard Brittain) Newsgroups: comp.sys.ibm.pc Subject: Re: Why is comma delimiter in batch files? Message-ID: <1990Jan5.212134.16814@calvin.spp.cornell.edu> Date: 5 Jan 90 21:21:34 GMT References: <3445@cbnewsl.ATT.COM> <2646@jolnet.ORPK.IL.US> <74@qmsseq.imagen.com> Reply-To: richard@calvin.spp.cornell.edu (Richard Brittain) Organization: Cornell Space Plasma Physics Group Lines: 31