Commit Graph

117 Commits

Author SHA1 Message Date
Stefan Weil
3292484f67 Test for correct locale settings
Normal C++ programs like those which are built for tesseract automatically
set the locale "C".

There can be different locale settings if the tesseract library is used
in other software.

A wrong locale can cause wrong results from sscanf which is used at
different places in the tesseract code, so make sure that we have the
right locale settings and fail if that is not the case.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-08 17:40:10 +02:00
Stefan Weil
629ded223c tesseractmain: Allow combinations of the different help options
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-02 09:03:56 +02:00
Stefan Weil
724a72a278 tesseractmain: Always use EXIT_SUCCESS and EXIT_FAILURE macros for exit status
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-02 09:03:56 +02:00
Stefan Weil
b5ac8502bc tesseractmain: EXIT_FAILURE if tesseract is called without arguments
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 <sw@weilnetz.de>
2018-06-02 09:03:56 +02:00
Stefan Weil
6dba34dd8c tesseractmain: No command line options between image and outputbase
The image name and the outputbase should not be separated by
command line options.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-02 09:03:56 +02:00
zdenop
e313ed1bb9
Merge pull request #1614 from j-kubik/master
Recognition progress in C API
2018-06-02 08:54:21 +02:00
Stefan Weil
6f7206f574 tesseractmain: Remove unneeded duplicate code
The --list-langs option is already handled by other code.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-01 20:45:53 +02:00
Stefan Weil
d4ed0f841a tesseractmain: Fail if bad command line option is given
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-01 20:04:35 +02:00
Jaroslaw Kubik
e6c9967b83 Fixed a typo in progres monitor C API
TessMonitorcDelete -> TessMonitorDelete
2018-06-01 19:42:28 +02:00
Jaroslaw Kubik
8f6242fd4f Fixed a typo in the C API progress monitor 2018-05-30 00:22:06 +02:00
Jaroslaw Kubik
87d33b6c9e Add progress monitoring C api
The C API is missing the ability to monitor the progress of the
recognition. This patch adds C wrappers to the progress monitor
that allow monitoring the progress and canceling the recognition
process early.
2018-05-29 23:26:41 +02:00
Alexander Zaitsev
d54d7486b4 Use std::max/std::min instead of MAX/MIN macros. 2018-05-20 17:49:48 +03:00
Alexander Zaitsev
7d08e117d8 Added more const. 2018-05-20 14:21:07 +03:00
Alexander Zaitsev
0248c7ff9d Rename all C-style headers (e.g. <stdio.h>) to C++ style (<cstdio>). 2018-05-20 00:52:04 +03:00
Noah Metzger
43d47f3583 Added downward compatibility for older APIs
The commit effa574 in 20.01.2017 added the bool textonly to the constructor of TessPDFRenderer. To maintain the compatibility to older APIs which are still using only two parameter, a default value for the textonly parameter is set.

Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2018-05-08 17:22:06 +02:00
Stefan Weil
4f9493c409 Partial fix for autotools configuration after source tree reorganisation
This should fix "make" and "make training".

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-25 21:33:28 +02:00
Egor Pugin
e95ff1159e Move sources into src dir. Update build scripts. 2018-04-25 11:02:54 +03:00