Date: Sun, 22 Aug 1999 11:58:47 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Klaus Reinhardt cc: djgpp AT delorie DOT com Subject: Re: How to expand filenames? In-Reply-To: <37BCF446.FBF@TU-Berlin.DE> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 19 Aug 1999, Klaus Reinhardt wrote: > I want to change the ls.c and need a function for file-name-expansion. > The problem is, that this expansion is done somewhere or before the > > int main (int argc, char **argv) { .. > > And I want to do this here after ( a second special time). > > nm libc.a | grep expand gives > 00000690 t _expand_wildcards expand_wildcards is a static function (thus nm prints `t', not `T') in src/libc/crt0/c1args.c, which is part of the DJGPP library source distribution, v2/djlsr202.zip on SImTel.NET. The function is really a simple wrapper around another library function, called `glob', which is documented in the libc reference (type "info libc alpha glob" from the DOS prompt). This entire code is part of the DJGPP startup code; see section 16.1 of the FAQ for details. Btw, what kind of file-name expansion do you need, and why do you need to do it in the `main' function? I think LS already does everything for you, no?