Fix swig --help -<lang> working differently to swig -help -<lang>
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9024 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
51d6027ead
commit
b3bf82ca45
2 changed files with 27 additions and 25 deletions
|
|
@ -720,7 +720,7 @@ void SWIG_getoptions(int argc, char *argv[])
|
|||
Wrapper_virtual_elimination_mode_set(1);
|
||||
Wrapper_fast_dispatch_mode_set(1);
|
||||
Swig_mark_arg(i);
|
||||
} else if ((strcmp(argv[i],"-help") == 0) || (strcmp(argv[i],"--help") == 0)) {
|
||||
} else if (strcmp(argv[i],"-help") == 0) {
|
||||
fputs(usage1,stdout);
|
||||
fputs(usage2,stdout);
|
||||
fputs(usage3,stdout);
|
||||
|
|
|
|||
|
|
@ -159,32 +159,34 @@ int main(int margc, char **margv) {
|
|||
|
||||
/* Get options */
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (argv[i]) {
|
||||
fac = Swig_find_module(argv[i]);
|
||||
if (fac) {
|
||||
dl = (fac)();
|
||||
Swig_mark_arg(i);
|
||||
} else if (strcmp(argv[i],"-nolang") == 0) {
|
||||
dl = new Language;
|
||||
Swig_mark_arg(i);
|
||||
} else if ((strcmp(argv[i],"-dnone") == 0) ||
|
||||
(strcmp(argv[i],"-dhtml") == 0) ||
|
||||
(strcmp(argv[i],"-dlatex") == 0) ||
|
||||
(strcmp(argv[i],"-dascii") == 0) ||
|
||||
(strcmp(argv[i],"-stat") == 0))
|
||||
{
|
||||
Printf(stderr,"swig: Warning. %s option deprecated.\n",argv[i]);
|
||||
Swig_mark_arg(i);
|
||||
} else if (strcmp(argv[i],"-help") == 0) {
|
||||
Printf(stdout,"Target Language Options\n");
|
||||
for (int j = 0; modules[j].name; j++) {
|
||||
if (modules[j].help) {
|
||||
Printf(stdout," %-15s - Generate %s wrappers\n", modules[j].name, modules[j].help);
|
||||
}
|
||||
}
|
||||
// Swig_mark_arg not called as the general -help options also need to be displayed later on
|
||||
if (argv[i]) {
|
||||
fac = Swig_find_module(argv[i]);
|
||||
if (fac) {
|
||||
dl = (fac)();
|
||||
Swig_mark_arg(i);
|
||||
} else if (strcmp(argv[i],"-nolang") == 0) {
|
||||
dl = new Language;
|
||||
Swig_mark_arg(i);
|
||||
} else if ((strcmp(argv[i],"-dnone") == 0) ||
|
||||
(strcmp(argv[i],"-dhtml") == 0) ||
|
||||
(strcmp(argv[i],"-dlatex") == 0) ||
|
||||
(strcmp(argv[i],"-dascii") == 0) ||
|
||||
(strcmp(argv[i],"-stat") == 0))
|
||||
{
|
||||
Printf(stderr,"swig: Warning. %s option deprecated.\n",argv[i]);
|
||||
Swig_mark_arg(i);
|
||||
} else if ((strcmp(argv[i],"-help") == 0) || (strcmp(argv[i],"--help") == 0)) {
|
||||
if (strcmp(argv[i],"--help") == 0)
|
||||
strcpy(argv[i], "-help");
|
||||
Printf(stdout,"Target Language Options\n");
|
||||
for (int j = 0; modules[j].name; j++) {
|
||||
if (modules[j].help) {
|
||||
Printf(stdout," %-15s - Generate %s wrappers\n", modules[j].name, modules[j].help);
|
||||
}
|
||||
}
|
||||
// Swig_mark_arg not called as the general -help options also need to be displayed later on
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!dl) {
|
||||
fac = Swig_find_module(SWIG_LANG);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue