Commit Graph

3250 Commits

Author SHA1 Message Date
FernandoGOT
7a5033d1d9 added sleep 1 before generate_font_image to fix the problem of not finding fonts 2018-04-10 10:16:37 -03:00
zdenop
81821da730
Merge pull request #1457 from stweil/asciidoc
Don't try to build manpages if asciidoc is missing
2018-04-09 19:47:06 +02:00
zdenop
09212daf7b
Merge pull request #1458 from stweil/cov
WorkingPartSet: Remove unused constructor
2018-04-09 19:44:36 +02:00
Stefan Weil
ef31eaa7d7 Don't try to build manpages if asciidoc is missing
Commit f9157fd91d changed the rules for
the documentation, so make always tried to build it and failed if
asciidoc was missing since that commit.

Now configure tests whether asciidoc is available and builds the
documentation conditionally. It also reports that to the user.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-09 19:07:54 +02:00
Stefan Weil
d9156f2d19 WorkingPartSet: Remove unused constructor
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-09 18:00:18 +02:00
zdenop
4b50f3f46f
Merge pull request #1455 from stweil/cov
Overload method ForwardTimeStep (CID 1385636 Explicit null dereferenced)
2018-04-09 11:53:55 +02:00
Stefan Weil
7cf2e2a4c8 Overload method ForwardTimeStep (CID 1385636 Explicit null dereferenced)
This avoids NULL parameters and fixes a warning from Coverity Scan.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-09 07:51:29 +02:00
zdenop
437bf85149
Merge pull request #1454 from stweil/autotools
configure: Don't use AM_MAINTAINER_MODE by default
2018-04-08 16:55:23 +02:00
Stefan Weil
f9157fd91d configure: Don't use AM_MAINTAINER_MODE by default
That macro disables automated updates when configure.ac or a Makefile.am
changes. Normally those updates are wanted because users typically
forget running ./autogen.sh.

See also the GNU documentation why AM_MAINTAINER_MODE should not be used:
https://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-08 14:44:14 +02:00
Zdenko Podobny
10f4998aee fix cmake build of training tools 2018-04-02 22:30:55 +02:00
Zdenko Podobný
e9e1e93686 add tess_version.h to distribution 2018-04-02 21:48:29 +02:00
Zdenko Podobný
64a73155ba add licence info 2018-04-02 19:11:46 +02:00
Zdenko Podobný
af037c27e7 rename version.h.in because the filename is too general for distribution 2018-04-02 19:11:02 +02:00
Zdenko Podobny
f8e26eedff fix cmake windows version info for tesseract library and executable 2018-03-31 12:49:29 +02:00
zdenop
d28439c375
Merge pull request #1438 from stweil/vs2010
cmake: Automatically build tesseract.rc with version from file
2018-03-29 20:32:12 +02:00
zdenop
ead7759e1e
Merge pull request #1430 from stweil/news
Remove NEWS stub file
2018-03-29 20:13:25 +02:00
Stefan Weil
f29c12a087 classify: Fix warnings from Doxygen (#1439)
* classify/adaptive: Fix warnings from Doxygen

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* classify/clusttool: Fix warnings from Doxygen and remove wrong API function

Remove the function ReadProtoStyle because it did not match
the documentation. It was only used locally.

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* classify/cutoffs: Fix warnings from Doxygen

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* classify/intproto: Fix warnings from Doxygen

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* classify/normmatch: Fix warnings from Doxygen

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-29 11:58:23 +02:00
Stefan Weil
8701b15134 cmake: Automatically build tesseract.rc with version from file
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-28 14:26:03 +02:00
Stefan Weil
2cc46fa6d4 BITS16: Use inline code for all constructors (#1434)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-28 10:02:37 +02:00
Stefan Weil
832926f5af Update library version handling for cmake (#1435)
As Tesseract now uses semantic versioning, the old method to calculate
the library version was no longer valid.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-28 10:00:18 +02:00
Stefan Weil
b1d291e6fd cmake: Get version information from VERSION file (#1436)
Create also api/version.h like it is done for autoconf.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-28 09:58:25 +02:00
Stefan Weil
9e74ed3730 Add IntCastRounded for float argument (#1433)
The method is called with a float argument several times, and the
previous implementation which only supported a double argument
resulted in type conversions and compiler warnings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-27 14:34:06 +02:00
Stefan Weil
6bbfc3b5fc Create version.h from available version information (#1432)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-27 14:32:30 +02:00
Stefan Weil
53a25713ca autoconf: Get version components from PACKAGE_VERSION (#1431)
AX_SPLIT_VERSION only works after AM_INIT_AUTOMAKE, so that macro had
to be moved.

GENERIC_MAJOR_VERSION, GENERIC_MINOR_VERSION and GENERIC_MICRO_VERSION
are now set automatically and can be used in further processing.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-27 09:46:08 +02:00
Stefan Weil
033418e3f4 Remove NEWS stub file
It was created more than 10 years ago, never changed and never used.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-26 19:48:25 +02:00
Stefan Weil
3fcb952dbf Remove unneeded CPPFLAGS (#1425)
* training: Remove unneeded CPPFLAGS

The training code does not need vs2010/port.

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* unittest: Remove unneeded CPPFLAGS

The unittest code does not need vs2010/port.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-25 21:04:45 +02:00
Stefan Weil
c7c738a1e6 lstm: Small code optimisation (#1426)
Replace float compare operation by integer compare operation
and avoid float division if it is not needed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-25 21:04:15 +02:00
Stefan Weil
365611f24a doc: Fix asciidoc escapes for C++ (#1427)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-25 21:02:33 +02:00
Stefan Weil
18c8f8833f Remove deprecated parameters (#1418)
They were deprecated nearly 3 years ago in
commit 0e868ef377.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-25 17:35:29 +02:00
Stefan Weil
3dcab4e187 classify: Remove deprecated method ExtractIntFeat (#1422)
It was deprecated with commit 99edf4ccb four years ago.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-25 17:34:41 +02:00
Stefan Weil
bf0bddb9ca dict: Remove deprecated parameters (#1421)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-25 17:32:35 +02:00
Stefan Weil
d13b862050 Remove deprecated method DumpPGM (#1420)
It was deprecated in commit a18816f83 more than 7 years ago.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-25 17:29:11 +02:00
Stefan Weil
ee201e1f4f Remove deprecated support for -psm argument (#1419)
It was replaced by --psm and deprecated in commit 92d981b93.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-25 17:28:33 +02:00
Stefan Weil
afcd4cbec1 Remove unused local variable max_num_strokes (#1417)
This fixes a compiler warning. The variable is unused since commit
0e95e2ca87.

Remove also a related code comment.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-25 17:26:28 +02:00
Stefan Weil
d087f20212 configure: Remove GIT_REV which is no longer used (#1416)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-25 17:20:13 +02:00
Stefan Weil
8f7be2e72c lstm: Replace NULL by nullptr (#1415)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-25 17:19:27 +02:00
Egor Pugin
3fa25d9bbc Install training tools with CMake. 2018-03-23 23:28:51 +03:00
Stefan Weil
e45d9587b4 arch: Remove stray ) in pragma (#1413)
This fixes a warning from clang:

arch/dotproductavx.cpp:94:51: warning:
 unexpected token in pragma diagnostic [-Wunknown-pragmas]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-23 18:42:46 +01:00
Stefan Weil
a02b0f9726 Remove vcsversion.h (#1412)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-23 18:42:20 +01:00
Stefan Weil
b94bbd6e83 Update version handling (#1408)
ccutil/version.h is now no longer needed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-22 21:49:47 +01:00
Stefan Weil
8c84d29c00 Fix CID 1270406, CID 1270407 and CID 1270411 Arguments in wrong order (#1410)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-22 21:33:54 +01:00
Stefan Weil
660b366401 Fix issues reported by Coverity Scan (#1409)
* Fix CID 1164532 'Constant' variable guards dead code

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* Fix CID 1164594 Argument cannot be negative

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* Fix CID 1164597 Argument cannot be negative

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* Fix CID 1366447 Argument cannot be negative

Fix also the data type for current_pos, as ftell returns a long value.

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* Fix CID 1270404 Arguments in wrong order

This does not change the code, but should help Coverity Scan to see
that the argument order is as intended.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-22 20:00:01 +01:00
Stefan Weil
1694be9223 tessdatamanager: Use PACKAGE_VERSION instead of TESSERACT_VERSION_STR (#1407)
This allows further simplifications for the version handling.

Move the implementation for the constructors from .h file to .cpp file
to reduce dependencies.

Remove unneeded include statements from the .h file to reduce more
dependencies.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-22 07:43:35 +01:00
Shreeshrii
198664fb0b
Add additional Unicodes to IsVedicAccent 2018-03-20 20:33:25 +05:30
Shreeshrii
aab83da67d
Add kVedicMark to ConsumeVowelIfValid 2018-03-20 20:31:25 +05:30
Stefan Weil
8c258750de Simplify Makefile and add missing dependency for target training-install (#1403)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-18 22:10:41 +01:00
Stefan Weil
8209ce3663 cmake: Update version and add it to config_auto.h (#1402)
In a next step, the package version should be read from the VERSION file.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-18 21:10:07 +01:00
Stefan Weil
81c47288a2 configure: Use m4_esyscmd_s to suppress linefeed (fix needed for macOS) (#1401)
While "echo -n" works on Debian GNU Linux, it fails to produce a valid
configure file on macOS, so try a different shorter solution.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-18 20:15:14 +01:00
Stefan Weil
64af706f0c arch: Fix some compiler warnings (-Wignored-qualifiers) (#1400)
Fix these gcc warnings:

arch/dotproductavx.cpp:53:45: warning:
 type qualifiers ignored on cast result type [-Wignored-qualifiers]
arch/dotproductavx.cpp:54:45: warning:
 type qualifiers ignored on cast result type [-Wignored-qualifiers]
arch/dotproductsse.cpp:59:45: warning:
 type qualifiers ignored on cast result type [-Wignored-qualifiers]
arch/dotproductsse.cpp:60:45: warning:
 type qualifiers ignored on cast result type [-Wignored-qualifiers]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-18 08:40:53 +01:00
Stefan Weil
6b2a0901c6 viewer: Fix some compiler warnings (-Wstringop-truncation) (#1399)
gcc warnings:

viewer/scrollview.cpp:72:10: warning:
 ‘char* strncpy(char*, const char*, size_t)’ output truncated before
 terminating nul copying as many bytes from a string as its length
 [-Wstringop-truncation]
viewer/scrollview.cpp:118:14: warning:
 ‘char* strncpy(char*, const char*, size_t)’ specified bound depends on
 the length of the source argument [-Wstringop-overflow=]
viewer/scrollview.cpp:746:10: warning:
 ‘char* strncpy(char*, const char*, size_t)’ output truncated before
 terminating nul copying as many bytes from a string as its length
 [-Wstringop-truncation]
viewer/scrollview.cpp:830:10: warning:
 ‘char* strncpy(char*, const char*, size_t)’ output truncated before
 terminating nul copying as many bytes from a string as its length
 [-Wstringop-truncation]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-18 08:33:14 +01:00