From: "Arthur J. O'Dwyer" Newsgroups: comp.os.msdos.djgpp Subject: Re: Bug in command-line globbing Date: Fri, 13 Dec 2002 12:48:59 -0500 (EST) Organization: Carnegie Mellon, Pittsburgh, PA Lines: 31 Message-ID: NNTP-Posting-Host: smtp7.andrew.cmu.edu Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: bb3.andrew.cmu.edu 1039801740 16644 128.2.10.87 (13 Dec 2002 17:49:00 GMT) X-Complaints-To: advisor AT andrew DOT cmu DOT edu NNTP-Posting-Date: 13 Dec 2002 17:49:00 GMT In-Reply-To: To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, 13 Dec 2002, Arthur J. O'Dwyer wrote: > > If I wanted to write my own globbing code, could I put it in > __crt0_glob_function() something like this? > [snipped long useless function] Apparently not. I used char **__crt0_glob_function(char *arg) { printf(":%s:\n", arg); return 0; } to see what was getting passed to the function, and it turns out that this "workaround" is possibly *more* useless than the default behavior. * Arguments are split at whitespace and stripped of quotes before being passed to the function. Can you write "echo" in DJGPP? * Quote-globbing still occurs. \ escapes quotes and nothing else. So my problem can't be fixed this way anyway. * Arguments do not get passed to __crt0_glob_function if they contain a quoted wildcard character. This renders the function useless for performing any sort of non-default wildcard globbing. -Arthur