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>
* 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>
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>
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>
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>
* 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>
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>
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>
* 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>
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>
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>
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>
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>
gcc warning:
wordrec/language_model.cpp:959:16: 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]
memcpy could also be a little bit faster than strncpy.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* autogen: Report missing autoconf-archive
autoconf-archive is required, but users often missed that requirement.
The script now detects and reports missing autoconf-archive and removes
the incomplete generated configure script.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* autogen: Report missing pkg-config
pkg-config is required.
The script now detects and reports missing pkg-config and removes
the incomplete generated configure script.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* api: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* cutil: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* training: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract data types by POSIX data types
Now all Tesseract data types which are no longer needed can be removed
from ccutil/host.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* lstm: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Remove the macros which are now unused from ccutil/host.h.
Remove also the obsolete history comments.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Fix build error caused by ambiguous ClipToRange
Error message vom Appveyor CI:
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2672: 'ClipToRange': no matching overloaded function found [C:\projects\tesseract\build\libtesseract.vcxproj]
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2782: 'T ClipToRange(const T &,const T &,const T &)': template parameter 'T' is ambiguous [C:\projects\tesseract\build\libtesseract.vcxproj]
c:\projects\tesseract\ccutil\helpers.h(122): note: see declaration of 'ClipToRange'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: could be 'char'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: or 'int'
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* unittest: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* arch: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
tessdata_best and tessdata_fast recently changed the path for script data,
so the tests have to be updated, too.
In addition, the relative paths did not work with out-of-tree builds.
Use absolute paths and add them as C macros to the compiler flags.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Replace the Tesseract specific data types in header files which are
part of Debian package libtesseract-dev by POSIX data types.
Update also matching cpp files.
Signed-off-by: Stefan Weil <sw@weilnetz.de>