From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Dalgleish To: earnie_boyd@yahoo.com Cc: gnu-win32@cygnus.com Subject: RE: Asterisk expansion... Date: Tue, 28 Jul 1998 05:54:00 -0000 Message-id: <91A8FD196436D1118EC2006008186C960B2D9F@server1.axonet.com.au> X-SW-Source: 1998-07/msg00614.html > I know from the experience of my mingw32-sup package that cmd.exe and > commmand.com do globbing, it is not as robust though. For example: > `ls' doesn't do any globbing, it only reports on a list of files given > it on stdin. I ported it to native win32 using mingw32. [Andrew Dalgleish] cmd/command do NOT do globbing. Some compiler/linker packages may do globbing in the run-time startup code, so from your code it seems as if the globbing had been done by the shell. I can't speak for mingw32, but from the Microsoft help: Expanding Wildcard Arguments Microsoft Specific ® When running a C program, you can use either of the two wildcards - the question mark (?) and the asterisk (*) - to specify filename and path arguments on the command line. Command-line arguments are handled by a routine called _setargv (or _wsetargv in the wide-character environment), which by default does not expand wildcards into separate strings in the argv string array. You can replace the normal _setargv routine with a more powerful version of _setargv that does handle wildcards by linking with the SETARGV.OBJ file. If your program uses a wmain function, link with WSETARGV.OBJ. To link with SETARGV.OBJ or WSETARGV.OBJ, use the /link option. For example: cl typeit.c /link setargv.obj The wildcards are expanded in the same manner as operating system commands. (See your operating system user's guide if you are unfamiliar with wildcards.) Enclosing an argument in double quotation marks (" ") suppresses the wildcard expansion. Within quoted arguments, you can represent quotation marks literally by preceding the double-quotation-mark character with a backslash (\). If no matches are found for the wildcard argument, the argument is passed literally. END Microsoft Specific - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request@cygnus.com" with one line of text: "help".