Skip to content

Commit

Permalink
fixed argless options in indextool
Browse files Browse the repository at this point in the history
  • Loading branch information
glookka committed Aug 26, 2018
1 parent 08c9507 commit ce656b8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/indextool.cpp
Expand Up @@ -1210,6 +1210,8 @@ int main ( int argc, char ** argv )
if ( argv[i][0]!='-' ) break;
OPT ( "-q", "--quiet" ) { bQuiet = true; continue; }
OPT1 ( "--strip-path" ) { bStripPath = true; continue; }
OPT1 ( "--checkconfig" ) { eCommand = CMD_CHECKCONFIG; continue; }
OPT1 ( "--rotate" ) { bRotate = true; continue; }
OPT1 ( "-v" ) { ShowVersion(); exit(0); }
OPT ( "-h", "--help" ) { ShowVersion(); ShowHelp(); exit(0); }

Expand All @@ -1220,12 +1222,10 @@ int main ( int argc, char ** argv )
OPT1 ( "--dumpconfig" ) { eCommand = CMD_DUMPCONFIG; sDumpHeader = argv[++i]; }
OPT1 ( "--dumpdocids" ) { eCommand = CMD_DUMPDOCIDS; sIndex = argv[++i]; }
OPT1 ( "--check" ) { eCommand = CMD_CHECK; sIndex = argv[++i]; }
OPT1 ( "--rotate" ) { bRotate = true; }
OPT1 ( "--htmlstrip" ) { eCommand = CMD_STRIP; sIndex = argv[++i]; }
OPT1 ( "--build-infixes" ) { eCommand = CMD_BUILDINFIXES; sIndex = argv[++i]; }
OPT1 ( "--build-skips" ) { eCommand = CMD_BUILDSKIPS; sIndex = argv[++i]; }
OPT1 ( "--morph" ) { eCommand = CMD_MORPH; sIndex = argv[++i]; }
OPT1 ( "--checkconfig" ) { eCommand = CMD_CHECKCONFIG; }
OPT1 ( "--optimize-rt-klists" )
{
eCommand = CMD_OPTIMIZEKLISTS;
Expand Down Expand Up @@ -1257,7 +1257,8 @@ int main ( int argc, char ** argv )
// not enough args
break;

} else if ( !strcmp ( argv[i], "--dumphitlist" ) )
}
OPT1 ("--dumphitlist" )
{
eCommand = CMD_DUMPHITLIST;
sIndex = argv[++i];
Expand Down

0 comments on commit ce656b8

Please sign in to comment.