Commit 99110df757 improved the help text
in several aspects, but also introduced new inconsistencies which this
patch tries to fix.
* Align columns (this needed replacing tabs by spaces).
* Start explaining text with uppercase.
* Replace "the stdout" by "stdout.
* Small changes in help text for page segmentation modes.
* Split options in OCR options and single options
(partially revert commit 99110df757).
In addition, whitespace characters at end of lines were removed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
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"
This font list contains a selection fonts produced by the Greek Font
Society <http://greekfontsociety.gr>, and is the result of testing
with a large corpus of a variety of scanned works.
Coverity bug reports:
CID 1270405: Uninitialized scalar variable
CID 1270408: Uninitialized scalar variable
CID 1270409: Uninitialized scalar variable
CID 1270410: Uninitialized scalar variable
Those variables are set conditionally in the while loop
and must keep their values in following iterations, so
they must be declared outside of the loop.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Coverity bug report: CID 1270401 (#1 of 1): Use after free
As the comment (which was also fixed) says, ReadNextBox() already
calls fclose(box_file), so don't call it a 2nd time.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
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>
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>
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>
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>
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>
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>
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.
The wchar_t type is defined in `wchar.h` and if this header is not
included by autoconf the detection of the type will fail. This type is
required by `unicharset_extractor` to autogenerate the character
properties.
This problem was detected when running under Fedora 21.