Commit Graph

1425 Commits

Author SHA1 Message Date
Stefan Weil
03f37c0cdc tesseractmain: Fix unterminated string
Coverity bug report: CID 1270421 "Buffer not null terminated".

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-24 17:17:17 +01:00
zdenop
9c13a157d3 Merge pull request #145 from stweil/clean
ccmain: Remove unused private class member
2015-11-14 12:01:51 +01:00
zdenop
e2cd620d69 Merge pull request #144 from stweil/master
Remove checks for this == NULL
2015-11-10 19:16:29 +01:00
Stefan Weil
39de21c91b ccmain: Remove unused private class member
This fixes a warning from clang.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-10 19:08:47 +01:00
Stefan Weil
4fdf272ffa Remove checks for this == NULL
This fixes warnings from clang.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-07 13:09:53 +01:00
zdenop
20e3b21949 Merge pull request #141 from stweil/master
Remove register attribute for local variables
2015-11-07 12:59:56 +01:00
zdenop
b6977963bb Merge pull request #143 from stweil/travis
Fix Travis build error (error when getting cmake)
2015-11-07 10:13:52 +01:00
Stefan Weil
a940180e9a Fix Travis build error (error when getting cmake)
This command fails currently:

wget http://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.sh

Obviously cmake.org now redirects to https connections, so we have to
fix the URL. Then there still remains a certificate problem. Adding
--no-check-certificate is a workaround which should be removed later.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-07 10:13:33 +01:00
Stefan Weil
83541d8ea0 Remove register attribute for local variables
This fixes clang compiler warnings like this one:

wordrec/gradechop.cpp:52:3: warning:
 'register' storage class specifier is deprecated [-Wdeprecated-register]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-06 06:45:19 +01:00
zdenop
479fe9c370 Merge pull request #137 from stweil/master
Fix compiler warnings for copy constructors
2015-11-05 09:42:53 +01:00
Stefan Weil
4a92ff5862 Fix compiler warnings for copy constructors
gcc reports these warnings with -Wextra:

ccstruct/pageres.h:330:3: warning:
 base class 'class ELIST_LINK' should be explicitly initialized
 in the copy constructor [-Wextra]
ccstruct/ratngs.cpp:115:1: warning:
 base class 'class ELIST_LINK' should be explicitly initialized
 in the copy constructor [-Wextra]
ccstruct/ratngs.h:291:3: warning:
 base class 'class ELIST_LINK' should be explicitly initialized
 in the copy constructor [-Wextra]
ccutil/genericvector.h:435:3: warning:
 base class 'class GenericVector<WERD_RES*>' should be explicitly initialized
 in the copy constructor [-Wextra]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-05 09:19:37 +01:00
zdenop
40637384d3 Merge pull request #136 from stweil/master
Fix some compiler warnings
2015-11-05 08:56:02 +01:00
Stefan Weil
70fd7cdf0a ccstruct: Fix compiler warning (disable buggy code)
gcc reports a potential bad array access:

ccstruct/mod128.cpp:98:20: warning:
 array subscript has type 'char' [-Wchar-subscripts]

dir is of type 'char'. Most compilers use signed char by default.
Then the value of dir is in the range -128 ... 127 and cannot be
used to access an array with 256 elements.

Don't fix that but disable the buggy code.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-05 06:39:35 +01:00
Stefan Weil
997c4a6078 api: Fix printing of a size_t value
size_t is not always the same as long, especially not for 64 bit Windows:

api/pdfrenderer.cpp:549:31: warning:
 format '%ld' expects argument of type 'long int',
 but argument 4 has type 'size_t {aka long long unsigned int}' [-Wformat=]

size_t normally requires a format string "%zu", but this is unsupported
by Visual Studio, so use a type cast.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-05 06:39:35 +01:00
Stefan Weil
511e7f7908 Fix case of include file name
Windows.h works on Windows, but not for cross builds on Linux hosts
with case sensitive file systems which only provide windows.h.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-05 06:38:01 +01:00
Stefan Weil
3272b62201 Don't use NULL for integer arguments
This fixes compiler warnings:

api/baseapi.cpp:1422:49: warning:
 passing NULL to non-pointer argument 6 of
 'int MultiByteToWideChar(UINT, DWORD, LPCCH, int, LPWSTR, int)'
 [-Wconversion-null]
api/baseapi.cpp:1427:54:
 warning: passing NULL to non-pointer argument 6 of
 'int WideCharToMultiByte(UINT, DWORD, LPCWCH, int, LPSTR, int, LPCCH, LPBOOL)'
 [-Wconversion-null]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-05 06:38:01 +01:00
Stefan Weil
edf765b952 Remove unneeded const qualifiers
This fixes compiler warnings like this one:

api/baseapi.h:739:32: warning:
 type qualifiers ignored on function return type [-Wignored-qualifiers]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-05 06:36:42 +01:00
zdenop
eb34cb1c94 Merge pull request #133 from stweil/master
Fix some typos found by codespell
2015-11-04 22:42:30 +01:00
Zdenko Podobný
34f34eadb8 autotools: fail if g++ or clang++ compiler is not found; Fixes #130 2015-11-04 22:39:24 +01:00
Stefan Weil
053403ecdb viewer: Fix typos in comments
All of them were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-04 21:58:42 +01:00
Stefan Weil
29f36d9264 training: Fix typos in comments and strings
All of them were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-04 21:58:42 +01:00
Stefan Weil
64f9190575 textord: Fix typos in comments and strings
All of them were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-04 21:58:42 +01:00
Stefan Weil
7113cba622 testing: Fix typo in comment (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-04 21:58:42 +01:00
Stefan Weil
a21621bc4f opencl: Fix typos in comments and strings
All of them were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-04 21:58:42 +01:00
Stefan Weil
38f3db8ca5 Fix more typos in comments (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-04 21:58:42 +01:00
zdenop
2591396e64 Merge pull request #132 from stweil/warnings
Fix some compiler warnings
2015-11-04 21:41:01 +01:00
Stefan Weil
ef7838a950 viewer: Fix format string
Variable port is an int, so "%d" is needed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-04 09:44:52 +01:00
Stefan Weil
d11b7e0624 cube: Use local variable which was reported as unused
The local variable first_lower was assigned a value which was not used.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-04 09:44:52 +01:00
Stefan Weil
c714330d2f ccmain: Remove unused local variables
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-04 09:44:52 +01:00
zdenop
be7497be97 Merge pull request #126 from doughdemon/master
Compile with musl libc
2015-10-31 16:41:01 +01:00
Felix Janda
87c21aaa5c Detect presence of 'off_t' by configure test 2015-10-31 11:54:37 +01:00
Felix Janda
d69965cb5b viewer/svutils.cpp: Include <sys/select.h> for FD_SET, ... 2015-10-31 11:53:26 +01:00
zdenop
7089c7b38e Merge pull request #125 from amitdo/osd-renderer
Added osd renderer for psm 0.
2015-10-30 20:54:44 +01:00
amitdo
6bbcb50dd9 Added osd renderer for psm 0.
Works for single page and multi-page.
2015-10-30 20:09:00 +02:00
Nick White
306610c5ec Use shell quoting rather than pluses to separate font arguments in tesstrain.sh
The way tesstrain.sh handled font names was really weird, using '+'
signs as a delimiter. However quoting arguments is a much more
straightforward, standard and sensible way to do things.

So whereas previously one would have used this:
  --fontlist Times New Roman + Arial Black
Now they should be specified like this:
  --fontlist "Times New Roman" "Arial Black"
2015-10-30 13:26:45 +00:00
zdenop
b882590491 Merge pull request #65 from ws233/master
Type mismatch on 64bit platforms
2015-10-28 20:02:20 +01:00
zdenop
b16b8a84bf Merge pull request #119 from amitdo/osd-script-name
OSD: Print script name instead of meaningless script id
2015-10-28 10:14:56 +01:00
amitdo
dcfdd5c035 OSD: Print script name instead of meaningless script id 2015-10-28 09:50:28 +02:00
zdenop
86407964b7 Update INSTALL.GIT.md 2015-10-11 17:16:42 +02:00
Zdenko Podobný
bf43d6a6e9 improve cmake instruction and rename it to INSTALL.GIT.md 2015-10-11 17:09:01 +02:00
Zdenko Podobný
0eefed6a14 cmake - add initial cmake instruction to INSTALL.GIT ; rename cmake output tesseractmain to tesseract; updage badges links 2015-10-10 17:26:32 +02:00
zdenop
bb15031266 Merge pull request #109 from egorpugin/master
CMake improvements
2015-10-10 14:49:26 +02:00
Egor Pugin
f3b20a0f4d Merge branch 'master' of github.com-egorpugin:egorpugin/tesseract 2015-10-09 18:22:16 +03:00
Egor Pugin
0788098b80 Fix Linux build with Leptonica_BUILD_DIR. 2015-10-09 18:22:04 +03:00
Egor Pugin
8e157dbb7e Fix build. 2015-10-09 18:18:02 +03:00
Egor Pugin
dfb5aa5c34 Add Leptonica_BUILD_DIR option for CMake find_package in Config mode. Set correct .so name on Linux. 2015-10-09 18:12:02 +03:00
zdenop
896db80f26 Merge pull request #108 from johnteslade/unicharset_extractor
Unicharset extractor problems with wchar
2015-10-05 21:49:03 +02:00
Egor Pugin
a614edbe94 Merge branch 'master' of github.com:egorpugin/tesseract 2015-10-05 22:33:24 +03:00
Egor Pugin
93d1c66e4e Add FindLeptonica.cmake module to find installed liblept on *nix systems. 2015-10-05 22:33:10 +03:00
John Slade
379da1f2e0 training/unicharset_extractor.cpp: Print whether WCTYPE is included
Character properties are autogenerated only if wctype is found on the
system.  However, it is not possible to know if a version of
unicharset_extractor was compiled with this support (especially if it
was installed as a pre-compiled binary).

This commit adds a print to the usage details to output if the binary
was compiled with wctype support.
2015-10-05 11:54:24 +01:00