Date: Fri, 27 Mar 92 14:46:18 EST From: 99clifto AT lab DOT cc DOT wmich DOT edu To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: globbing and shells 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? #include #include #include void main(argc, argv) int argc; char **argv; { FILE *infile, *outfile; char **globv; char progname[8] = basename(argv[0]); ................... getopts stuff .................... if (globv = glob_filenname(argv[1]................. [ rest of your program here ] } >gcc -O myprog.c -o myprog -lmy -d.clifton [99clifto AT lab DOT cc DOT wmich DOT edu]