Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!uwvax!oddjob!gargoyle!ihnp4!homxb!mtuxo!mtune!codas!usfvax2!chips
From: chips@usfvax2.UUCP (Chip Salzenberg)
Newsgroups: comp.sys.ibm.pc
Subject: Re: Turbo C and global filename expansion.
Message-ID: <793@usfvax2.UUCP>
Date: Thu, 16-Jul-87 13:37:02 EDT
Article-I.D.: usfvax2.793
Posted: Thu Jul 16 13:37:02 1987
Date-Received: Sat, 18-Jul-87 10:17:07 EDT
References: <6642.1987Jul10.09:26:49@me.uucp>
Organization: AT Engineering, Tampa, FL
Lines: 27
Summary: Look in C0 -- it calls "__setargv".

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.