Skip to content

Commit

Permalink
tesseractmain: EXIT_FAILURE if tesseract is called without arguments
Browse files Browse the repository at this point in the history
When Tesseract is called without any argument, the help message is still
printed, but the exit status no longer indicates success (EXIT_OK).

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Jun 2, 2018
1 parent 6dba34d commit b5ac850
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/api/tesseractmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,6 @@ static void ParseArgs(const int argc, char** argv, const char** lang,
GenericVector<STRING>* vars_values, int* arg_i,
tesseract::PageSegMode* pagesegmode,
tesseract::OcrEngineMode* enginemode) {
if (argc == 1) {
PrintHelpMessage(argv[0]);
exit(0);
}

if (argc == 2) {
if ((strcmp(argv[1], "-h") == 0) || (strcmp(argv[1], "--help") == 0)) {
PrintHelpMessage(argv[0]);
Expand Down

0 comments on commit b5ac850

Please sign in to comment.