Commit Graph

3000 Commits

Author SHA1 Message Date
Amit D
822082eeba
configure.ac: Remove obsolete macros
The newer macros that replace the obsolete ones are already present in configure.ac.

  * AC_PROG_LIBTOOL -> LT_INIT
  * AC_LANG_CPLUSPLUS -> AC_LANG([C++])
2018-04-20 03:31:08 +03:00
Egor Pugin
621f9e2054
Merge pull request #1495 from amitdo/autoconf-1.63
configure.ac: Update minimum required autoconf version to 2.63
2018-04-19 19:15:30 +03:00
Amit D
20254ae5b5
configure.ac: Update minimum required autoconf version to 2.63
This is the autoconf version shipped in RHEL/CentOS 6.
2018-04-19 19:11:43 +03:00
zdenop
815bab66c5
Merge pull request #1492 from noahmetzger/winfix
Fixed a resource leak and a memory corruption detected by Coverity
2018-04-19 17:00:17 +02:00
Egor Pugin
a474fd05a4
Merge pull request #1493 from stweil/train
lstmtraining: Fix handling of --max_iterations
2018-04-19 17:43:55 +03:00
Stefan Weil
f95041faac lstmtraining: Fix handling of --max_iterations
The iteration counter should be checked for each iteration,
not only at the end of a batch.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-19 14:47:24 +02:00
Noah Metzger
34efcd40be Fixed a resource leak detected by Coverity
Replaced the inheritance relation of BLOCK and PDBLK by a member relation. This avoids the necessity of a virtual destructor in PDBLK for the occuring upcasts.

Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2018-04-19 13:55:39 +02:00
Noah Metzger
21e25d1829 Fixed a memory corruption, detected by Coverity
CID 1385632 Out-of-bounds write in DO-While loop

Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2018-04-18 13:37:38 +02:00
zdenop
36d6cb3a46
Merge pull request #1488 from stweil/cmdline
training: Fix dubious parsing of command line
2018-04-18 08:26:59 +02:00
zdenop
9e69ecaa5d
Merge pull request #1484 from noahmetzger/coverity
Fixed Resource Leak detected by Coverity
2018-04-18 08:26:01 +02:00
Stefan Weil
8f656e49bc training: Fix dubious parsing of command line
- Don't support --helpshort as an undocumented alias for --help
- Don't allow any number of leading '-' characters.
  The preferred form uses --OPTION, and for compatibility reasons the new
  code still supports -OPTION.

Update also related documentation comments.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-17 22:23:23 +02:00
Zdenko Podobny
4b468e11fa improve readability of commit 198664fb0b 2018-04-17 17:41:59 +02:00
zdenop
cd0a3e00f0
Merge pull request #1486 from amitdo/pango1.22
configure.ac: Check for the presence of pango 1.22.0 or higher
2018-04-17 17:17:54 +02:00
zdenop
002e7a4cbf
Merge pull request #1487 from amitdo/obsolete-pango-1.18
Remove obsolete code
2018-04-17 17:17:10 +02:00
Amit D
88a1364699
Remove obsolete code
Pango versions older than 1.22.0 are not supported.
2018-04-17 15:58:34 +03:00
Amit D
cf7c88dc93
configure.ac: Check for the presence of pango 1.22.0 or higher
Tesseract's training tool text2image uses these two functions: 
pango_glyph_item_iter_init_start
pango_glyph_item_iter_next_cluster

That means it requires Pango >=1.22.0:
https://developer.gnome.org/pango/stable/api-index-1-22.html
https://developer.gnome.org/pango/stable/pango-Glyph-Storage.html#pango-glyph-item-iter-init-start
https://developer.gnome.org/pango/stable/pango-Glyph-Storage.html#pango-glyph-item-iter-next-cluster
2018-04-17 14:46:16 +03:00
zdenop
808a10f794
Merge pull request #1483 from noahmetzger/winfix
Fixed compiler warning
2018-04-17 11:52:41 +02:00
zdenop
67804a2da1
Merge pull request #1485 from amitdo/icu52
configure.ac - check the presence of icu 52.1 or higher
2018-04-17 11:47:26 +02:00
Amit D
98747b37ea
configure.ac - check for the present of icu 52.1 or higher 2018-04-17 12:05:50 +03:00
Noah Metzger
7ff766c427 Fixed Resource Leak detected by Coverity
CID: 1375399 Variable bb1 going out of scope leaks the storage it points to

Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2018-04-17 11:05:27 +02:00
zdenop
69c8292d81
Merge pull request #1481 from stweil/version
training: Support new argument --version for remaining executables
2018-04-16 09:35:57 +02:00
Stefan Weil
0998bcf1fc training: Support new argument --version for remaining executables
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-16 07:56:55 +02:00
zdenop
a07ee5c40b
Merge pull request #1479 from stweil/version
training: Add initial support for --version argument and check library version
2018-04-15 12:59:58 +02:00
zdenop
9f4f715765
Merge pull request #1477 from stweil/autotools
configure: Remove optimize option for preprocessor
2018-04-15 12:56:39 +02:00
zdenop
c5e3b203d8
Merge pull request #1478 from stweil/typo
training: Fix typo in help text
2018-04-15 12:56:07 +02:00
Stefan Weil
a440bd8bf1 training: Support new argument --version
classifier_tester, cntraining, combine_lang_model, lstmeval, lstmtraining,
mftraining, set_unicharset_properties, shapeclustering, text2image and
unicharset_extractor now can show the version.

Still missing: ambiguous_words, combine_tessdata, dawg2wordlist,
merge_unicharsets and wordlist2dawg.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 12:39:18 +02:00
Stefan Weil
8c3045f161 Check library version for training executables
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 11:31:28 +02:00
Stefan Weil
a6fef12bd6 training: Add 'static' to some local functions
Fix also the missing exit value for text2image.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 11:31:22 +02:00
Stefan Weil
3f967d2abc training: Remove unused function prototypes
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 11:26:31 +02:00
Stefan Weil
03b0cb9160 training: Format code
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 10:27:32 +02:00
Stefan Weil
9612ca4a23 Fix compiler errors when including baseapi.h and capi.h
Including baseapi.h before capi.h is now possible.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 10:26:48 +02:00
Stefan Weil
5e9e22c719 training: Fix typo in help text
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 08:41:51 +02:00
Stefan Weil
c89b1129d1 configure: Remove optimize option for preprocessor
It is only used by the compiler.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 08:28:11 +02:00
Egor Pugin
147c3deacf
Merge pull request #1475 from dschoerk/master
Add cmake switch to turn off test building
2018-04-15 02:26:10 +03:00
bloke
2bdee5c5e4 cmake switch to turn off test building 2018-04-14 10:32:50 +02:00
bloke
da65617d74 cmake switch to turn off test building 2018-04-14 10:26:29 +02:00
Noah Metzger
d597570737 Fixed compiler warning
Warning C4996: 'access': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _access.

Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2018-04-13 11:31:50 +02:00
zdenop
83f311f043
Merge pull request #1405 from Shreeshrii/patch-2
Add additional Unicodes to IsVedicAccent
2018-04-13 06:38:06 +02:00
zdenop
c869478825
Merge pull request #1406 from Shreeshrii/patch-1
Add kVedicMark to ConsumeVowelIfValid
2018-04-13 06:37:35 +02:00
zdenop
de48cac8e2
Merge pull request #1473 from noahmetzger/winfix
Fixed Tessdata directory for Windows
2018-04-13 06:36:53 +02:00
zdenop
1d4959c2ba
Merge pull request #1474 from ic/build_4.0_macOS_compiler_options
Add flag to build compiler options with G++ on macOS/MacPorts for Tesseract 4.x.
2018-04-13 06:35:17 +02:00
Eric Platon
1642d882a7 Remove useless echo statement. 2018-04-13 10:04:00 +09:00
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