Introduce the -J, --input-format options for compatibility with
windres. Collpase the -e option into the -J option. Update man page. Cleanup file header (remove history that's already in log msgs, etc.)
This commit is contained in:
parent
96560d79d3
commit
fea0164996
|
@ -1,6 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright Martin von Loewis, 1994
|
* Copyright 1994 Martin von Loewis
|
||||||
* Copyrignt 1998 Bertho A. Stultiens (BS)
|
* Copyrignt 1998 Bertho A. Stultiens (BS)
|
||||||
|
* Copyright 2003 Dimitrie O. Paun
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -16,35 +17,6 @@
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* History:
|
|
||||||
* 30-Apr-2000 BS - Integrated a new preprocessor (-E and -N)
|
|
||||||
* 20-Jun-1998 BS - Added -L option to prevent case conversion
|
|
||||||
* of embedded filenames.
|
|
||||||
*
|
|
||||||
* 08-Jun-1998 BS - Added -A option to generate autoregister code
|
|
||||||
* for winelib operation.
|
|
||||||
*
|
|
||||||
* 21-May-1998 BS - Removed the CPP option. Its internal now.
|
|
||||||
* - Added implementations for defines and includes
|
|
||||||
* on the commandline.
|
|
||||||
*
|
|
||||||
* 30-Apr-1998 BS - The options now contain nearly the entire alphabet.
|
|
||||||
* Seems to be a sign for too much freedom. I implemeted
|
|
||||||
* most of them as a user choice possibility for things
|
|
||||||
* that I do not know what to put there by default.
|
|
||||||
* - -l and -L options are now known as -t and -T.
|
|
||||||
*
|
|
||||||
* 23-Apr-1998 BS - Finally gave up on backward compatibility on the
|
|
||||||
* commandline (after a blessing from the newsgroup).
|
|
||||||
* So, I changed the lot.
|
|
||||||
*
|
|
||||||
* 17-Apr-1998 BS - Added many new command-line options but took care
|
|
||||||
* that it would not break old scripts (sigh).
|
|
||||||
*
|
|
||||||
* 16-Apr-1998 BS - There is not much left of the original source...
|
|
||||||
* I had to rewrite most of it because the parser
|
|
||||||
* changed completely with all the types etc..
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -90,12 +62,12 @@ static char usage[] =
|
||||||
" -C cp Set the resource's codepage to cp (default is 0)\n"
|
" -C cp Set the resource's codepage to cp (default is 0)\n"
|
||||||
" -d n Set debug level to 'n'\n"
|
" -d n Set debug level to 'n'\n"
|
||||||
" -D id[=val] Define preprocessor identifier id=val\n"
|
" -D id[=val] Define preprocessor identifier id=val\n"
|
||||||
" -e Disable recognition of win32 keywords in 16bit compile\n"
|
|
||||||
" -E Preprocess only\n"
|
" -E Preprocess only\n"
|
||||||
" -F target Ignored for compatibility with windres\n"
|
" -F target Ignored for compatibility with windres\n"
|
||||||
" -h Prints this summary.\n"
|
" -h Prints this summary.\n"
|
||||||
" -i file The name of the input file.\n"
|
" -i file The name of the input file.\n"
|
||||||
" -I path Set include search dir to path (multiple -I allowed)\n"
|
" -I path Set include search dir to path (multiple -I allowed)\n"
|
||||||
|
" -J format The input format (either `rc' or `rc16')\n"
|
||||||
" -l lan Set default language to lan (default is neutral {0, 0})\n"
|
" -l lan Set default language to lan (default is neutral {0, 0})\n"
|
||||||
" -m Do not remap numerical resource IDs\n"
|
" -m Do not remap numerical resource IDs\n"
|
||||||
" -o file Output to file (default is infile.res)\n"
|
" -o file Output to file (default is infile.res)\n"
|
||||||
|
@ -105,6 +77,7 @@ static char usage[] =
|
||||||
" -W Enable pedantic warnings\n"
|
" -W Enable pedantic warnings\n"
|
||||||
"The following long options are supported:\n"
|
"The following long options are supported:\n"
|
||||||
" --input Synonym for -i.\n"
|
" --input Synonym for -i.\n"
|
||||||
|
" --input-format Synonym for -J.\n"
|
||||||
" --output Synonym for -o.\n"
|
" --output Synonym for -o.\n"
|
||||||
" --output-format Synonym for -O.\n"
|
" --output-format Synonym for -O.\n"
|
||||||
" --target Synonym for -F.\n"
|
" --target Synonym for -F.\n"
|
||||||
|
@ -221,6 +194,7 @@ static const char* short_options =
|
||||||
"a:AB:cC:d:D:eEF:hH:i:I:l:LmnNo:O:P:rtTvVw:W";
|
"a:AB:cC:d:D:eEF:hH:i:I:l:LmnNo:O:P:rtTvVw:W";
|
||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
{ "input", 1, 0, 'i' },
|
{ "input", 1, 0, 'i' },
|
||||||
|
{ "input-format", 1, 0, 'J' },
|
||||||
{ "output", 1, 0, 'o' },
|
{ "output", 1, 0, 'o' },
|
||||||
{ "output-format", 1, 0, 'O' },
|
{ "output-format", 1, 0, 'O' },
|
||||||
{ "target", 1, 0, 'F' },
|
{ "target", 1, 0, 'F' },
|
||||||
|
@ -320,9 +294,6 @@ int main(int argc,char *argv[])
|
||||||
case 'D':
|
case 'D':
|
||||||
wpp_add_cmdline_define(optarg);
|
wpp_add_cmdline_define(optarg);
|
||||||
break;
|
break;
|
||||||
case 'e':
|
|
||||||
extensions = 0;
|
|
||||||
break;
|
|
||||||
case 'E':
|
case 'E':
|
||||||
preprocess_only = 1;
|
preprocess_only = 1;
|
||||||
break;
|
break;
|
||||||
|
@ -337,8 +308,11 @@ int main(int argc,char *argv[])
|
||||||
else error("Too many input files.\n");
|
else error("Too many input files.\n");
|
||||||
break;
|
break;
|
||||||
case 'I':
|
case 'I':
|
||||||
if (strcmp(optarg, "-") == 0) stdinc = 0;
|
wpp_add_include_path(optarg);
|
||||||
else wpp_add_include_path(optarg);
|
break;
|
||||||
|
case 'J':
|
||||||
|
if (strcmp(optarg, "rc16") == 0) extensions = 0;
|
||||||
|
else if (strcmp(optarg, "rc")) error("Output format %s not supported.", optarg);
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,11 +44,6 @@ See also
|
||||||
.B PREPROCESSOR
|
.B PREPROCESSOR
|
||||||
below.
|
below.
|
||||||
.TP
|
.TP
|
||||||
.I \-e
|
|
||||||
Win16 only; disable recognition of win32 keywords in 16bit compile.
|
|
||||||
Normally, all keywords are recognized in win16 compilation mode. Use
|
|
||||||
this switch if old sources use win32 reserved names as resource names.
|
|
||||||
.TP
|
|
||||||
.I \-E
|
.I \-E
|
||||||
Preprocess only. The output is written to standard output if no
|
Preprocess only. The output is written to standard output if no
|
||||||
outputfile was selected. The output is compatible with what gcc would
|
outputfile was selected. The output is compatible with what gcc would
|
||||||
|
@ -68,6 +63,10 @@ searched exclusively via the \fI\-I\fR set path, whereas the '""' quoted
|
||||||
filenames are first tried to be opened in the current directory. Also
|
filenames are first tried to be opened in the current directory. Also
|
||||||
resource statements with file references are located in the same way.
|
resource statements with file references are located in the same way.
|
||||||
.TP
|
.TP
|
||||||
|
.I \fB\-J\fR, \fB\-\-input\-format\fR=\fIformat\fR
|
||||||
|
Sets the input format. Valid options are 'rc' or 'rc16'. Setting the
|
||||||
|
input to 'rc16' disables the recognition of win32 keywords.
|
||||||
|
.TP
|
||||||
.I \-l lan
|
.I \-l lan
|
||||||
Set default language to \fIlan\fR. Default is the neutral language 0
|
Set default language to \fIlan\fR. Default is the neutral language 0
|
||||||
(i.e. "LANGUAGE 0, 0").
|
(i.e. "LANGUAGE 0, 0").
|
||||||
|
|
Loading…
Reference in New Issue