Commit Graph

4085 Commits

Author SHA1 Message Date
Stefan Weil
98be949f5d tesscallback: Remove more unused code
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-05 20:03:50 +02:00
Stefan Weil
3ae4069411 tesscallback: Remove unused code
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-05 20:03:50 +02:00
zdenop
c4bb4b933b correct tessdata comment in baseapi.h 2019-05-04 14:35:41 +02:00
Stefan Weil
78ed5ef8b9 universalambigs: Add missing include file
This allows fixing two compiler warnings from clang++:

    src/ccutil/universalambigs.cpp:23:19: warning: no previous extern declaration for non-static variable 'kUniversalAmbigsFile' [-Wmissing-variable-declarations]
    src/ccutil/universalambigs.cpp:19019:18: warning: no previous extern declaration for non-static variable 'ksizeofUniversalAmbigsFile' [-Wmissing-variable-declarations]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-04 14:35:41 +02:00
Stefan Weil
a8c8a96107 commandlineflags: Replace strtod by std::stringstream
Using std::stringstream allows conversion of double to string
independent of the current locale setting.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-04 14:34:58 +02:00
Stefan Weil
8831cbfead paramsd: Replace strtod by std::stringstream
Using std::stringstream allows conversion of double to string
independent of the current locale setting.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-04 14:34:58 +02:00
Stefan Weil
231da0064a clusttool: Replace strtof by std::stringstream
Using std::stringstream allows conversion of float to string
independent of the current locale setting.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-04 14:34:58 +02:00
Stefan Weil
97f6711ce0 clusttool: Remove unused code and some global functions
* WriteProtoList is unused. Remove it.

* ReadNFloats, WriteNFloats and WriteProtoStyle are only used locally,
  so make them local.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-04 14:34:34 +02:00
Stefan Weil
1d14d15902 Fix some typos (most found and fixed by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-04 14:34:34 +02:00
zdenop
ef33a06e65 fix crash in case of missing PNG support in Leptonica see #2333 2019-05-01 20:14:26 +02:00
zdenop
b2fc3eba8f fix documentation about datapath: ending "/" is not relevant 2019-05-01 12:26:52 +02:00
Zdenko Podobný
52205ab495 cmake: fix linux build 2019-05-01 12:26:52 +02:00
Jeff Breidenbach
f70859f1fa fix #1900: intraword spacing for slightly better pdf copy-paste performance 2019-05-01 12:26:52 +02:00
zdenop
2746566ecc Print info when uzn file is used. 2019-05-01 12:26:52 +02:00
zdenop
d5f23a61b3 cmake: fixes #2337 Android cross-build 2019-05-01 12:26:52 +02:00
Zdenko Podobný
0d132e40d8 fix spelling 2019-05-01 12:26:52 +02:00
Zdenko Podobný
9132bc73ef remove unused variable 2019-05-01 12:26:52 +02:00
Stefan Weil
c1f70e27c9 Fix build for Windows
* winsock2.h is case sensitive, lower case is required for cross build.
* ws2tcpip.h is required for addrinfo.
* FreeAddrInfo conflicts with existing freeaddrinfo, so rename it.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 12:26:52 +02:00
zdenop
cd2ff22784 cmake: remove host.h from installation, remove definition of NOMINMAX and report used C++ standard 2019-05-01 12:26:52 +02:00
zdenop
9587e17043 svutil.cpp: fix windows build 2019-05-01 12:26:52 +02:00
Stefan Weil
315bd3a9c8 Only include windows.h using host.h
host.h sets the macros NOMINMAX and WIN32_LEAN_AND_MEAN which must be
set before including windows.h.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 12:26:52 +02:00
Stefan Weil
668f59f3f8 Clean macros in platform.h
* Remove unused macros ultoa, SIGNED.
* Move macros NOMINMAX and WIN32_LEAN_AND_MEAN to host.h
  because they are used when including windows.h.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 12:26:52 +02:00
Stefan Weil
b7e3122174 svutil: Clean include file
* Remove MIN, MAX macros. They are unused.
* Include windows.h indirectly by including host.h.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 12:26:52 +02:00
Stefan Weil
c774471086 Remove host.h from Tesseract API
It is not needed by other API header files.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 12:26:52 +02:00
Stefan Weil
57604ec59d Fix Windows build
timeval is declared in winsock2.h, so add the missing include statement.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 12:16:01 +02:00
zdenop
5ccc8a0818
Merge pull request #2418 from stweil/4.1
Backport changes from master to 4.1 branch
2019-05-01 11:53:20 +02:00
Stefan Weil
53dd6ca0d2 Fix typo in description
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 11:30:00 +02:00
Shree
6aa887d6d4 fix the coordinates for EOL tab 2019-05-01 11:29:44 +02:00
zdenop
08b6dc504e remove unused includes 2019-05-01 11:29:29 +02:00
zdenop
8ee5c865f1 MSVS support inttypes.h from VS 2015 2019-05-01 11:29:03 +02:00
zdenop
7fc245c38a cmake: show configuration summary 2019-05-01 11:27:11 +02:00
zdenop
b9f7bb2b89 cmake: add detection of AVX, AVX2, SSE41 2019-05-01 11:26:43 +02:00
zdenop
29ab1a42cc fix finding tiffio.h cmake&clang on windows 2019-05-01 11:26:26 +02:00
zdenop
30078d8aa8 fix missing EOL 2019-05-01 11:26:06 +02:00
Stefan Weil
66e35c171a Don't include windows.h from platform.h
This partially reverts commit c150b9832d.
Now params.cpp includes host.h which also gets the definition for MAX_PATH.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 11:25:45 +02:00
zdenop
86b62eeb4c extend ignore list 2019-05-01 11:24:47 +02:00
Stefan Weil
89d09cf537 Remove unneeded include statements for pgedit.h
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 11:24:20 +02:00
Stefan Weil
1d6e57adb8 pgedit: Remove unused global functions
pgeditor_show_point is unused, so remove it completely.
Some more functions are only used locally, so make them static functions.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 11:24:08 +02:00
Stefan Weil
afa2fff536 pdfrenderer: Replace snprintf by std::stringstream
Using std::stringstream allows conversion of float to string
independent of the current locale setting.

Some snprintf statements are not needed at all because a constant string
can be appended directly.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 11:23:42 +02:00
Stefan Weil
09cb0bcc7a baseapi: Use std::stringstream to format float values
Using std::stringstream allows conversion of float to string
independent of the current locale setting.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 11:23:30 +02:00
Stefan Weil
1eea24ea78 Remove strtofloat
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 11:23:13 +02:00
Stefan Weil
38f68aa615 Replace sscanf by std::stringstream
Using std::stringstream allows working with the C locale, independent
of the current locale settings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 11:22:45 +02:00
Stefan Weil
9477eeab3c unittest: Add missing unittests to Makefile.am as comments
This gives a good overview of the missing unittests.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 11:22:27 +02:00
Stefan Weil
918d46641a unittest: Fix and enable params_model_test
This needs the latest test submodule.

The test uses LoadFromFile which is not used otherwise, so remove that
function from class ParamsModel.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-05-01 11:21:29 +02:00
zdenop
0df3aa7d20 Revert "fix C-API compatibility with 4.0.0 version"
This reverts commit 224b1f6dee.
2019-05-01 10:58:56 +02:00
zdenop
5b16530f11 ETEXT_DESC: fix backwards compatibility with 4.0.0 API 2019-05-01 10:18:36 +02:00
Zdenko Podobný
224b1f6dee fix C-API compatibility with 4.0.0 version 2019-04-30 22:59:54 +02:00
zdenop
0963daad19
Merge pull request #2416 from noahmetzger/4.1
Readded parts of the lstm_choice_mode functionality
2019-04-30 21:43:46 +02:00
Noah Metzger
86b90200fb Add some of the lstm_choice_mode functionality to restore compatibility with the 4.0 Version
Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2019-04-30 15:33:52 +02:00
Noah Metzger
fa948d640a Removed lstm_choice_mode for backwards compatibility in 4.1
Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2019-04-29 22:33:27 +02:00