Commit Graph

2657 Commits

Author SHA1 Message Date
Eric Platon
708f55423b Add flag to build compiler options with G++ on macOS.
Building with G++ on Darwin breaks when either AVX, AVX2, or SSE4.1
compiler option is set, unless G++ is actually CLANG.

This commit allows to build with G++, by asking G++ to delegate assembly
to the clang integrated assembler, instead of the GNU one.
2018-04-13 09:39:40 +09:00
Noah Metzger
d88a6b5c19 Replace unsecure _splitpath by secure _splitpath_s
Use the predefined macros for the lengths of drive, dir and path.
This avoids potential buffer overruns.
Show also an error message in case of a too long path.

Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2018-04-12 16:32:47 +02:00
Noah Metzger
b7b6b28ecf Fixed Tessdata directory for Windows
The old code ignored the drive letter for the tessdata directory path.

Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2018-04-11 16:57:38 +02:00
Egor Pugin
742a087507 Merge branch 'master' of github.com-egorpugin:tesseract-ocr/tesseract 2018-04-11 00:16:35 +03:00
Egor Pugin
7dd2ecd026 Move cmake packages detection after compiler settings. 2018-04-11 00:16:31 +03:00
zdenop
9e1ecdb9b3
Merge pull request #1467 from FernandoGOT/master
Fix for mktemp bug on MAC OS X
2018-04-10 22:27:15 +02:00
FernandoGOT
3917a192ca fix for mktemp bug on MAC OS X 2018-04-10 14:22:33 -03:00
zdenop
0ddfac85e9
Merge pull request #1466 from FernandoGOT/master
added sleep 1 before generate_font_image to fix the problem of not fi…
2018-04-10 18:47:16 +02:00
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