ERICMC@USU.BITNET (Eric McQueen) (03/04/88)
In article <5361@ames.arpa> woo@pioneer.UUCP (Alex Woo) writes: > How does one expand wildcards in command line arguments in > VAX11-C under VMS? I have a tool for C programmers using VMS, especially those porting facilities from Un*x. It prompts for command line arguments (unless you have already specified some via a "foreign command" or MCR), expands file wildcards found on the command line, and redirects `stdin' or `stdout'. Here's a sample use: main( argc, argv ) int argc; char **argv; { /* local variables */ #ifdef VAXC /* Or whatever the ANSI-X3J11-conforming word will be */ extern char **cmd_lin(); argv = cmd_lin( "", argc, argv ); /* The first argument provides misc. options. */ #endif /* your routine */ } $ run grep _command_line_arguments: -i STOP *.for The source is 40 blocks (600 lines) so I'm not sure where to post it. I posted it in comp.os.vms/INFO-VAX. Anyone not subscribing to that group and wanting a copy or knowing of a better place to post it please let me know. --- Eric Tye McQueen Mathematics Department Also at (after some ericmc@usu.bitnet Utah State University time in March[June?!]): (801) 753-4683 Logan, Utah 84322-3900 ericmc@usu.usu.edu UUCP: ...{psuvax1,uunet}!usu.bitnet!ericmc "Doodle doodle dee Arpa: ericmc%usu.bitnet@cunyvm.cuny.edu wubba wubba wubba."