POSIX.1 National Language Support API for MinGW
修訂 | b31c59a77f8eb3697a5ddb8614d9ec0dc9ecc0af (tree) |
---|---|
時間 | 2008-01-10 07:04:08 |
作者 | Keith Marshall <keithmarshall@user...> |
Commiter | Keith Marshall |
Retain .exe' file name extension, if present, in program identity banner displayed by -help' and -version' options.
@@ -1,13 +1,21 @@ | ||
1 | 1 | 2008-01-09 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 2 | |
3 | + Retain `.exe' file name extension, if present, in program identity | |
4 | + banner displayed by `-help' and `-version' options. | |
5 | + | |
6 | + * gencat.c (progname): Delay reassignment to `*argv', with `.exe' | |
7 | + extension stripped, until after parsing option arguments. | |
8 | + | |
9 | +2008-01-09 Keith Marshall <keithmarshall@users.sourceforge.net> | |
10 | + | |
3 | 11 | Support `/dev/stdin' and '/dev/stdout', specified as command line |
4 | 12 | arguments, as case-insensitive aliases for `-', representing the |
5 | 13 | standard input and standard output streams respectively. |
6 | 14 | |
7 | 15 | * gencat.c (msgcat): Assign from first non-option command line |
8 | - argument; replace with "-", if strcasecmp matches "/dev/stdout". | |
16 | + argument; replace with "-", if strcasecmp() matches "/dev/stdout". | |
9 | 17 | |
10 | - * mcsource.c (input): Use strcasecmp instead of strcmp, to check for | |
18 | + * mcsource.c (input): Use strcasecmp() instead of strcmp, to check for | |
11 | 19 | match to "/dev/stdin". |
12 | 20 | |
13 | 21 | 2008-01-08 Keith Marshall <keithmarshall@users.sourceforge.net> |
@@ -8,7 +8,7 @@ | ||
8 | 8 | * This file implements the `main' function for the `gencat' program. |
9 | 9 | * |
10 | 10 | * Written by Keith Marshall <keithmarshall@users.sourceforge.net> |
11 | - * Last modification: 08-Jan-2008 | |
11 | + * Last modification: 09-Jan-2008 | |
12 | 12 | * |
13 | 13 | * |
14 | 14 | * This is free software. It is provided AS IS, in the hope that it may |
@@ -149,7 +149,6 @@ int main( int argc, char **argv ) | ||
149 | 149 | int ext = strlen( *argv ) - 4; |
150 | 150 | if( (ext > 0) && (strcasecmp( *argv + ext, ".exe" ) == 0) ) |
151 | 151 | *(*argv + ext) = '\0'; |
152 | - progname = *argv; | |
153 | 152 | } |
154 | 153 | else |
155 | 154 | /* Something went wrong... |
@@ -178,6 +177,7 @@ int main( int argc, char **argv ) | ||
178 | 177 | exit( EXIT_SUCCESS ); |
179 | 178 | } |
180 | 179 | |
180 | + progname = *argv; | |
181 | 181 | cat_index.id = tag; |
182 | 182 | |
183 | 183 | if( (argc -= optind) > 1 ) |
@@ -388,4 +388,4 @@ int main( int argc, char **argv ) | ||
388 | 388 | return EXIT_SUCCESS; |
389 | 389 | } |
390 | 390 | |
391 | -/* $RCSfile$Revision: 1.3 $: end of file */ | |
391 | +/* $RCSfile$Revision: 1.4 $: end of file */ |