fil@me.UUCP (07/10/87)
munch, munch, munch. It seems Turbo C does not expand wildcards in argv automatically. My IBM C compiler, however, can do this if you link the right file into the rest of your program. I've spent many an hour trying to find some hint on how this would be done in Turbo C and come up with only a headache and bags under my eyes the next morning. Anyone out there run into a similar problem? Better yet, does anyone out there know how to get it done? Anticipating responses with a worm on my tongue (baited breath), Fil Salustri
chips@usfvax2.UUCP (Chip Salzenberg) (07/16/87)
In article <6642.1987Jul10.09:26:49@me.uucp>, fil@me.UUCP writes: > It seems Turbo C does not expand wildcards in argv automatically. > Anyone out there run into a similar problem? Better yet, does anyone > out there know how to get it done? > > Anticipating responses with a worm on my tongue (baited breath). I'll answer at a respectful distance. :-) TC includes the source for the C0 module -- the code that sets up the run-time environment, including environ, argv, etc. It calls a routine called "_setargv@", which means that the actual symbol in assembler is "__setargv". (I know, C0 _is_ assembler, but Borland uses a neat scheme that makes the C0 code work even if you decide to compile with Pascal-style names that have no leading underscore. Check out the "RULES.ASI" file.) I don't know what __setargv does, but when you find out, you can "roll your own" __setargv and make it do wildcard expansion in addition to the setup that the Borland-supplied routine does. You can even put it into the standard C library, though I wouldn't. [I'm the cautious type, just ask my skydiving instructor. :-) ] -- Chip Salzenberg UUCP: "uunet!ateng!chip" ..or.. "chips@usfvax2.UUCP" A.T. Engineering, Tampa Fidonet: 137/42 CIS: 73717,366 "Use the Source, Luke!" My opinions do not necessarily agree with anything.
john@tifsie.UUCP (John Maline) (07/17/87)
in article <6642.1987Jul10.09:26:49@me.uucp>, fil@me.UUCP says: > It seems Turbo C does not expand wildcards in argv automatically. I've written a modified startup file for Turbo C that mimics Microsoft's xSETARGV.OBJ. It's posted to BIX, BYTE magazine's info service (I can't remember where I put it in BIX's listings. I mentioned in a comment in borland/turboc). I'd be glad to mail to anyone. Send me mail. If enough response, I'll try to figure out how to post it. -- John Maline UUCP: ut-sally!im4u!ti-csl!tifsie!john Texas Instruments sun!texsun!ti-csl!tifsie!john PO Box 655012 M/S 3618 uiucdcs!convex!smu!tifsie!john Dallas, TX 75265 Voice: (214)995-3575 BIX: jwmaline