Egor Pugin
83ae900549
Merge pull request #1629 from stweil/bool
...
src/training: Replace more proprietary BOOL8 by standard bool data type
2018-06-04 18:54:31 +03:00
Egor Pugin
e700500d4a
Merge pull request #1628 from stweil/fix
...
TFile: Improve handling of potential integer overflow
2018-06-04 18:53:23 +03:00
Stefan Weil
4f3b266efe
src/training: Replace more proprietary BOOL8 by standard bool data type
...
Update also callers of the modified functions to use
false / true instead of 0 / 1.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-04 16:08:03 +02:00
Stefan Weil
b292013bdc
cntraining: Replace proprietary BOOL8 by standard bool data type
...
Add also "static" attribute to local functions and remove an old comment.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-04 16:08:03 +02:00
Stefan Weil
8bea6bcc12
TFile: Improve handling of potential integer overflow
...
Raise an assertion for unexpected arguments and use size_t instead of int
for the size argument which is typically sizeof(some_datatype).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-04 13:53:36 +02:00
Egor Pugin
45b11cd93f
Reset appveyor cache.
2018-06-04 01:59:35 +03:00
Egor Pugin
0f29cb411c
Clear appveyor cache.
2018-06-04 01:59:05 +03:00
zdenop
aa35e1ce4c
Merge pull request #1626 from stweil/bool
...
src/training: Replace proprietary BOOL8 by standard bool data type
2018-06-03 21:44:00 +02:00
Stefan Weil
f2698c256d
src/training: Replace proprietary BOOL8 by standard bool data type
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-03 21:13:40 +02:00
zdenop
3aa9b37c81
Merge pull request #1621 from stweil/cmdline
...
More cleanup for handling of command line arguments
2018-06-02 09:31: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
Jaroslaw Kubik
67ceae8385
Fix the progres increase test
...
The progress increase test must compare the input value against
the variable that contains a previous value, not against it's
initial value.
2018-06-02 02:29:42 +02:00
Jaroslaw Kubik
e05d333378
Added tests for progress reporting API
...
The progress reporting API is now tested using googlemock tools.
2018-06-02 00:47:34 +02:00
Jaroslaw Kubik
92168c5e8b
Added googlemock building instructions
...
The googlemock tools are already present, so why not make use of
it. It can be usefull for testing callbacks.
2018-06-02 00:42:37 +02:00
Egor Pugin
f227f84231
Merge pull request #1619 from stweil/cmdline
...
tesseractmain: Fail if bad command line option is given
2018-06-01 22:01:52 +03: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
e254c9fa38
Return a value from default progress report function
...
The progress reporting function returns a boolean. The returned
value is never used by the tesseract and its meaing is not
documented, which renders the value meaningless. Still, lack of
return should not be premitted.
2018-05-30 10:44:13 +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
Jaroslaw Kubik
217e5e5881
Add a context-aware progress monitor pointer
...
The progress_callback field in the ETEXT_DESC monitor type does not
take any 'context' parameter, which may make implementing callback
functions difficult and may require use of global variables.
The new function receives the ETEXT_DESC pointer as an argument.
This makes it possible to share the cancel_this field as context
carrier if required.
The change is backwards-compatible: the old pointer remains as a
member of the class, and the default value for the new pointer is
a function calling the classic progress notifier. This way the code
unaware of the new member will continue to work as before.
2018-05-29 21:48:51 +02:00
Egor Pugin
8d3f8111f3
Try to fix VS2015 appveyor builds.
2018-05-29 19:19:12 +03:00
Egor Pugin
0c50ae3a9c
Fix windows build.
2018-05-29 19:15:01 +03:00
Egor Pugin
15f36de0f7
Update appveyor.yml
2018-05-29 14:01:18 +03:00
zdenop
7bc8255e04
Merge pull request #1610 from stweil/typo
...
Fix some typos (most found by codespell)
2018-05-27 19:01:40 +02:00
Stefan Weil
509a6f0ce0
Fix some typos (most found by codespell)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-05-27 18:49:43 +02:00
Egor Pugin
420a4ed223
Merge pull request #1608 from ZaMaZaN4iK/patch-1
...
Remove unused variable
2018-05-26 22:35:28 +03:00
Alexander
a2e72f258a
Remove unused variable
2018-05-26 22:20:45 +03:00
Egor Pugin
83019bdcd3
Merge pull request #1595 from ZaMaZaN4iK/fix_smart_pointers
...
Use std::unique_ptr instead of manual memory management.
2018-05-26 19:20:03 +03:00
Egor Pugin
2bdf817999
Merge pull request #1607 from stweil/reformat
...
Add configuration for clang-format-6.0 and clang-format 7
2018-05-26 12:11:42 +03:00
Stefan Weil
d7db470893
Simplify configuration for clang-format
...
Instead of using a detailed configuration, use Google base style and
add the extras.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-05-26 10:09:57 +02:00
Alexander
69fbb52930
Merge branch 'master' into fix_smart_pointers
2018-05-26 00:37:07 +03:00
Stefan Weil
544d399f08
Update configuration for clang-format
...
Don't derive the pointer alignment. Always use left alignment.
Remove also spaces at line endings.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-05-24 20:23:23 +02:00
Stefan Weil
d55e4e5a59
Add configuration for clang-format 7
...
It is based on Google style:
clang-format-7 -i -style=Google -dump-config >.clang-format
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-05-24 20:21:54 +02:00
Egor Pugin
5a56d0c291
Merge pull request #1588 from ZaMaZaN4iK/fix_own_bool
...
Use standard bool instead of BOOL8.
2018-05-23 16:53:12 +03:00
Egor Pugin
78857cab8b
Merge pull request #1591 from ZaMaZaN4iK/fix_default_two
...
Use default keyword instead of empty ctors/dtors.
2018-05-22 21:59:48 +03:00
Alexander Zaitsev
58e8538138
Add more std::unique_ptr
2018-05-22 17:55:45 +03:00
Alexander Zaitsev
df49d470ca
Use std::unique_ptr instead of manual memory management.
2018-05-22 14:36:37 +03:00
zdenop
555f6ffc01
Merge pull request #1593 from stweil/fix
...
Fix compilation with g++-5
2018-05-21 22:11:34 +02:00
Stefan Weil
cdf035d9b1
Fix compilation with g++-5
...
Commit 0248c7ff9d
replaced math.h by cmath.
Therefore isinf and isnan are no longer declared.
Replace them by their C++ 11 variant.
Signed-off-by: Stefan Weil <stweil@ub-blade-02.bib.uni-mannheim.de>
2018-05-21 22:09:48 +02:00
Alexander Zaitsev
d14a7ca043
Use default keyword instead of empty ctors/dtors. Add more default.
2018-05-21 14:11:03 +03:00
Alexander Zaitsev
785b5e8134
Use default keyword instead of empty ctors/dtors.
2018-05-21 13:35:46 +03:00
zdenop
0a93ad2aae
Merge pull request #1590 from mduk/patch-1
...
Update README.md
2018-05-21 11:26:59 +02:00
Daniel Kendell
b4b33dda2a
Update README.md
...
Fixed links to C and C++ API header files.
2018-05-21 09:16:42 +01:00
Egor Pugin
e9197f30f3
Merge pull request #1589 from stweil/fix
...
ColPartition: Add missing initialisation for median_left, median_right
2018-05-21 01:28:00 +03:00