Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!mailrus!tut.cis.ohio-state.edu!rutgers!psuvax1!psuhcx!matt From: matt@psuhcx (Matt Cohen) Newsgroups: comp.sys.ibm.pc Subject: Final Word on Expanding Arguments in TurboC ? Message-ID: <247@psuhcx.psu.edu> Date: 15 Jul 88 23:19:02 GMT Sender: matt@psuhcx.psu.edu Reply-To: matt@psuhcx (Matt Cohen) Organization: Penn State University Engineering Computer Lab Lines: 26 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 ?