From: Jonathan Atkins
authorSam Lantinga <slouken@libsdl.org>
Thu, 06 Mar 2003 05:57:29 +0000
changeset 6032e726be3dc08
parent 602 a24bd700f92e
child 604 31d3af76488b
From: Jonathan Atkins
Subject: testoverlay...

here's a fun one:
./testoverlay -scale -h

it seems to print argv[optind-1] as the program name...
test/testoverlay.c
     1.1 --- a/test/testoverlay.c	Wed Mar 05 05:28:09 2003 +0000
     1.2 +++ b/test/testoverlay.c	Thu Mar 06 05:57:29 2003 +0000
     1.3 @@ -315,6 +315,7 @@
     1.4  
     1.5  int main(int argc, char **argv)
     1.6  {
     1.7 +	char *argv0 = argv[0];
     1.8  	int flip;
     1.9  	int delay;
    1.10  	int desired_bpp;
    1.11 @@ -437,7 +438,7 @@
    1.12  			argc -= 1;
    1.13  		} else
    1.14  		if (( strcmp(argv[1], "-help") == 0 ) || (strcmp(argv[1], "-h") == 0)) {
    1.15 -                        PrintUsage(argv[0]);
    1.16 +                        PrintUsage(argv0);
    1.17                          exit(1);
    1.18  		} else
    1.19  		if ( strcmp(argv[1], "-fullscreen") == 0 ) {