[comp.sys.ibm.pc] Final Word on Expanding Arguments in TurboC ?

matt@psuhcx (Matt Cohen) (07/16/88)

	This message is a collection of responses which I recieved in 
response to my question about expanding arguments in the command line in
TurboC.

	The following simple program does not work :      

	/* argvtest.c */
	main(argc,argv) int argc; char *argv[];
	{
	int i;	for (i=1; i< argc; i++) 
			printf("%s\n",argv[i]);
	}

	When called with "argvtest *.*" it prints "*.*"
instead of a list of the wildcard expanded filenames.
I called Borland (not toll free - that call cost more than a diskette), 
and was told that the routine provided in the library is a dummy, and
they sent me a 'C' routine that does the job. I
expected the update to be sent on a disk. Guess what!
	
	I now have a hardcopy of the routine setargv.c, which
should fix the bug. However it is approx 3 + 1/2 pages of code including 
comments. I would rather use MSC than type and debug this.


	Anyone got a routine that does the trick ?