Stefan Weil
b57afc7c78
Replace Efopen by fopen and remove efio.cpp, efio.h
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-02 17:46:28 +02:00
Stefan Weil
abbd78a053
Fix CID 1340271, 1340272, 1340273, 1340274 (Use after free)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-01 20:18:39 +02:00
Stefan Weil
52b44c5ebf
Fix CID 1164530 (Logically dead code)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-01 20:01:56 +02:00
Stefan Weil
09da044a77
Fix CID 1164553 (Division or modulo by float zero)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-07-01 19:27:01 +02:00
Stefan Weil
9bb5a87760
Remove stderr.h and its include statements
...
MEMORY_OUT is no longer used.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-25 16:14:20 +02:00
Stefan Weil
b282d2cb16
adaptions: Remove unneeded include statement
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-25 14:28:04 +02:00
Stefan Weil
7768f9b336
Clean more include files and include statements
...
The changes are based on an analysis done with include-what-you-use.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-24 19:45:12 +02:00
Stefan Weil
a32d24fa65
Remove empty tessbox.h
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-24 19:45:12 +02:00
Stefan Weil
1a151781ea
Clean some include statements
...
The changes are based on an analysis done with include-what-you-use.
Replace also some standard header files by the corresponding
standard C++ header files.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-23 21:15:54 +02:00
Stefan Weil
484a1be98a
Remove unneeded include statements for scanutils.h
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-22 19:16:08 +02:00
Stefan Weil
1371980f9f
Replace string.h by standard C++ cstring
...
Remove the unneeded include statement in platform.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-21 20:40:26 +02:00
Stefan Weil
112aeb9826
Clean usage of assert.h
...
Remove unneeded include statements, remove conditional statements and
replace the remaining assert.h by their standard C++ variant cassert.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-21 19:31:05 +02:00
Stefan Weil
a9e2574eff
Remove public API file ndminx.h
...
It is not needed for the Tesseract code, and the Tesseract API
should not provide MIN / MAX macros.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-21 08:33:30 +02:00
Stefan Weil
09976e6125
Fix CID 1393238 (Dereference null return value)
...
Add also some error handling if fopen fails.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-20 21:17:02 +02:00
Stefan Weil
e87e8967d7
Remove more header files from public API
...
Install only those headers which are needed by third party applications.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-20 11:54:38 +02:00
Stefan Weil
c1c87d73ee
Require tesseract/ for API header files (fixes potential name conflicts)
...
The tesseract/ subdirectory is no longer automatically added to the
include path of the compiler. Therefore old code which used code like
#include "capi.h"
must now change that to
#include "tesseract/capi.h"
This avoids name conflicts with header files from other projects.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-17 22:01:19 +02:00
Amit D
6f85de22bc
WordFontAttributes: Check that word != nullptr earlier. Fix #1665
2018-06-13 23:38:27 +03: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
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
Alexander
69fbb52930
Merge branch 'master' into fix_smart_pointers
2018-05-26 00:37:07 +03: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
Alexander Zaitsev
df49d470ca
Use std::unique_ptr instead of manual memory management.
2018-05-22 14:36:37 +03: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
Alexander Zaitsev
abca191293
Add missing file change.
2018-05-21 00:43:22 +03:00
Alexander Zaitsev
6ff0b56597
More fixes BOOL8 -> bool
2018-05-21 00:40:58 +03:00
Alexander Zaitsev
6f580bad77
Add miss changes to bool fixes.
2018-05-20 23:04:03 +03:00
Alexander Zaitsev
a040bc2da5
Use standard bool instead of BOOL8.
2018-05-20 22:46:46 +03:00
Alexander Zaitsev
d54d7486b4
Use std::max/std::min instead of MAX/MIN macros.
2018-05-20 17:49:48 +03:00
Alexander Zaitsev
c34e145b1a
Use numeric_limits instead of INT_MAX.
2018-05-20 14:49:35 +03:00
Alexander Zaitsev
7d08e117d8
Added more const.
2018-05-20 14:21:07 +03:00
Alexander Zaitsev
0697235bb2
Use using instead of typedef. Reason: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rt-using
2018-05-20 01:31:03 +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
Stefan Weil
c9b585cfc5
Don't disable compiler warnings for Visual Studio
...
It's still possible to set the warning level in the project settings,
but single source files should normally not disable compiler warnings.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-05-03 14:26:20 +02:00
Stefan Weil
0efc528684
Remove unneeded include statements for string / strings.h
...
Tesseract code does not use strings.h (strngs.h was once called strings.h),
so that dependency can also be removed from cmake and cppan configuration.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-30 18:16:34 +02:00
Stefan Weil
950469e645
Remove old hack for Visual Studio
...
It should not be needed with newer versions of Visual Studio.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-30 15:21:04 +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
Stefan Weil
dabf3c299f
Fix file endings
...
Text files should end with a LF, but not additional empty lines.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-25 19:35:33 +02:00
Stefan Weil
9ceb0c6430
Fix line endings
...
Replace DOS line endings (CRLF) by standard (LF only).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-25 19:04:50 +02:00
Egor Pugin
e95ff1159e
Move sources into src dir. Update build scripts.
2018-04-25 11:02:54 +03:00