ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/03/27/18:19:44

From: Eric Backus <ericb AT lsid DOT hp DOT com>
Subject: Re: globbing and shells
To: 99clifto AT lab DOT cc DOT wmich DOT edu
Date: Fri, 27 Mar 92 14:20:35 PST
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Mailer: Elm [revision: 66.25]
Status: O

> Assuming you wanted to distribute a program, the only drawback of
> adding the globbing routines to your program is the extra size
> overhead. In other words, if the shell expands wildcards then calls
> to glob produce nothing--all files are single strings in argv[?]...
> Of course you could also test for various shells and decide on a
> technique at run-time, but this introduces more overhead and
> complicates matters greatly.
> 
> Why not create a library of routines that address the short comings
> of working in the dos environment, add a standard include file to
> prototype/define the routines and link to it at compile time?

If we modified crt0.o to add globbing, we wouldn't have to change the
source code of the application at all.

Furthermore, if we modified go32 to do globbing if a particular string
was found in the GO32 environment variable, we could turn globbing on
and off for an application at runtime by changing the GO32 environment
variable.

Either of these solution look good to me.  I can't work on go32 since
I don't have Borland cc, so maybe I'll look at modifying crt0.o.
--
				Eric Backus
				ericb%hplsla AT hplabs DOT hp DOT com
				(206) 335-2495

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019