import winsup-2000-02-17 snapshot
This commit is contained in:
20
winsup/mingw/samples/globbing/glob.c
Normal file
20
winsup/mingw/samples/globbing/glob.c
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
|
||||
int
|
||||
main (int argc, char* argv[])
|
||||
{
|
||||
int i;
|
||||
|
||||
printf ("Command line (via GetCommandLine) \"%s\"\n",
|
||||
GetCommandLine());
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
printf ("Argv[%d] \"%s\"\n", i, argv[i]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
11
winsup/mingw/samples/globbing/jamfile
Normal file
11
winsup/mingw/samples/globbing/jamfile
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
Object glob.o : glob.c ;
|
||||
|
||||
MainFromObjects glob.exe : glob.o ;
|
||||
|
||||
Main noglob.exe : noglob.c ;
|
||||
|
||||
LIBDIR = \\mingw32\\lib\\ ;
|
||||
|
||||
MainFromObjects CRTnoglob.exe : glob.o $(LIBDIR)CRT_noglob.o ;
|
||||
|
22
winsup/mingw/samples/globbing/noglob.c
Normal file
22
winsup/mingw/samples/globbing/noglob.c
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
|
||||
/* This line turns off automatic command line globbing. */
|
||||
int _CRT_glob = 0;
|
||||
|
||||
int
|
||||
main (int argc, char* argv[])
|
||||
{
|
||||
int i;
|
||||
|
||||
printf ("Command line (via GetCommandLine) \"%s\"\n",
|
||||
GetCommandLine());
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
printf ("Argv[%d] \"%s\"\n", i, argv[i]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
14
winsup/mingw/samples/globbing/readme.txt
Normal file
14
winsup/mingw/samples/globbing/readme.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
This directory contains samples which demonstrate default (globbing on)
|
||||
behavior, how to turn the globbing off with the _CRT_glob variable, and
|
||||
how to turn it off with the CRT_noglob object file.
|
||||
|
||||
Run jam and then run glob, noglob and CRTnoglob with an argument like
|
||||
*.* to see the difference.
|
||||
|
||||
The code in this directory is in the PUBLIC DOMAIN. It has NO WARRANTY,
|
||||
including, but not restricted to, warranties of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
Colin Peters <colin@bird.fu.is.saga-u.ac.jp>.
|
||||
|
Reference in New Issue
Block a user