Turbo C Wildcard Expansion

-=/ Larry Hastings /=- lupin3 at ucscb.UCSC.EDU
Sun Oct 16 20:43:46 AEST 1988


+-In article <3300 at ttidca.TTI.COM>, josephs at ttidca.TTI.COM (Bill Josephs) wrote:-
+----------
| 
| I've had my Turbo C 2.0 for about two weeks and have not yet been
| able to discover how to use the much touted "command line wildcard
| expansion" feature.  Anybody figure it out (or has any kind soul out
| there checked COMPUserve recently)?  I'd appreciate any information.
|
+----------

  Only two things I can think of...

(1) if you say
  tc *.*
  it gives you a menu of the files and directories in the current directory.
  I doubt this is what you're talking about.

(2) Pages 19-20 of the Turbo C Reference Guide discuss something called
  "command line wildcard expansion".  Basically, if you link with WILDCARD.OBJ
  (which came with the distribution) when you compile your program, when
  someone runs your program with the argument "*.*" their WILDCARD.OBJ will
  grab the *.* out of argv and expand it to contain all the names of files
  in the current directory (or the directory the path points to, if there is
  one).  So, if you link with WILDCARD.OBJ, and the user of your program
  types
     foobar *.* mumble
  and the current directory contains
     DATA.001 TRUELIFE.CFS ZOUNDS.EXE
  then when your main() gets executed, argv will look like this:
     argv[0] = "foobar\0"
     argv[1] = "DATA.001\0"
     argv[2] = "TRUELIFE.CFS\0"
     argv[3] = "ZOUNDS.EXE\0"
     argv[4] = "mumble\0"

  Note that this is untested; and I don't feel like testing it this time of
morning.
  I hope this helps some.

--
 /|\ /|\   .. .  .   .    .     .      .       .        .         .          . 
| |\| |\|  .. .  .   .    .     .      .       .        .         .          .
|/|\|/|\|/||   _  _ _   _ |_| _  _ |_ -__  _  _ARPA: lupin3 at ucscb.ucsc.EDU      
  | |/| |/|L_ (_\( ( (_/  | |(_\_) (_ || )(_)_)UUCP: *!ucbvax!ucscc!ucscb!lupin3
   \|/ \|/ larry      /   hastings        _/   WORK: sun!acad!metaware!funkster
  MetaWare "I'm hovering like a fly, waiting for the windshield on the freeway."
IncorporateDisclaimer:[MetaWare, UCSC]->opinion!=lhastings->opinion\\\Genesis



More information about the Comp.lang.c mailing list