diff --git a/api/baseapi.cpp b/api/baseapi.cpp index 8a7e42a1e..3e5bbddb1 100644 --- a/api/baseapi.cpp +++ b/api/baseapi.cpp @@ -48,10 +48,6 @@ #include #include -#if !defined(VERSION) -#include "version.h" -#endif - #include "allheaders.h" #include "baseapi.h" @@ -142,7 +138,7 @@ TessBaseAPI::~TessBaseAPI() { * Returns the version identifier as a static string. Do not delete. */ const char* TessBaseAPI::Version() { - return VERSION; + return TESSERACT_VERSION_STR; } /** @@ -1948,7 +1944,7 @@ void TessBaseAPI::SetFillLatticeFunc(FillLatticeFunc f) { /** Common code for setting the image. */ bool TessBaseAPI::InternalSetImage() { if (tesseract_ == NULL) { - tprintf("Please call Init before attempting to send an image."); + tprintf("Please call Init before attempting to set an image."); return false; } if (thresholder_ == NULL) diff --git a/api/baseapi.h b/api/baseapi.h index 2d60250d9..7929a60c3 100644 --- a/api/baseapi.h +++ b/api/baseapi.h @@ -20,6 +20,11 @@ #ifndef TESSERACT_API_BASEAPI_H__ #define TESSERACT_API_BASEAPI_H__ +#define TESSERACT_VERSION_STR "3.03.00" +#define TESSERACT_VERSION 0x030300 +#define MAKE_VERSION(major, minor, patch) (((major) << 16) | ((minor) << 8) | \ + (patch)) + #include // To avoid collision with other typenames include the ABSOLUTE MINIMUM // complexity of includes here. Use forward declarations wherever possible diff --git a/api/pdfrenderer.cpp b/api/pdfrenderer.cpp index 820f856ae..700541321 100644 --- a/api/pdfrenderer.cpp +++ b/api/pdfrenderer.cpp @@ -10,10 +10,6 @@ #include "cube_utils.h" #include "allheaders.h" -#if !defined(VERSION) -#include "version.h" -#endif - #ifdef _MSC_VER #include "mathfix.h" #endif @@ -731,7 +727,7 @@ bool TessPDFRenderer::EndDocumentHandler() { " /CreationDate (D:%s)\n" " /Title (%s)" ">>\n" - "endobj\n", obj_, VERSION, datestr, title()); + "endobj\n", obj_, TESSERACT_VERSION_STR, datestr, title()); lept_free(datestr); AppendPDFObject(buf); diff --git a/api/renderer.cpp b/api/renderer.cpp index 37f984238..d03b16d14 100644 --- a/api/renderer.cpp +++ b/api/renderer.cpp @@ -8,10 +8,6 @@ #include "genericvector.h" #include "renderer.h" -#if !defined(VERSION) -#include "version.h" -#endif - namespace tesseract { /********************************************************************** @@ -140,7 +136,8 @@ bool TessHOcrRenderer::BeginDocumentHandler() { "\n" "\n" - " \n" + " \n" " \n" "\n\n"); diff --git a/vs2008/libtesseract/libtesseract.vcproj b/vs2008/libtesseract/libtesseract.vcproj index ec8946bf6..6ca2c76db 100644 --- a/vs2008/libtesseract/libtesseract.vcproj +++ b/vs2008/libtesseract/libtesseract.vcproj @@ -2410,10 +2410,6 @@ RelativePath="..\..\ccstruct\vecfuncs.h" > - - diff --git a/vs2008/port/version.h b/vs2008/port/version.h deleted file mode 100644 index b1bdf4ceb..000000000 --- a/vs2008/port/version.h +++ /dev/null @@ -1,25 +0,0 @@ -/////////////////////////////////////////////////////////////////////// -// File: version.h -// Description: define version identifier for Windows -// Author: zdenop@gmail.com -// Created: Fri Nov 19 21:05:06 CET 2010 -// -// (C) Copyright 2010, Google Inc. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -/////////////////////////////////////////////////////////////////////// - -#ifndef VS2008_PORT_VERSION_H_ -#define VS2008_PORT_VERSION_H_ - -#define VERSION "3.03" - -#endif // VS2008_PORT_VERSION_H_ diff --git a/vs2010/libtesseract/libtesseract.vcxproj b/vs2010/libtesseract/libtesseract.vcxproj index 8c8d8d6f6..0c3749c0f 100644 --- a/vs2010/libtesseract/libtesseract.vcxproj +++ b/vs2010/libtesseract/libtesseract.vcxproj @@ -843,7 +843,6 @@ copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib - diff --git a/vs2010/libtesseract/libtesseract.vcxproj.filters b/vs2010/libtesseract/libtesseract.vcxproj.filters index ccf473c91..42a6580b8 100644 --- a/vs2010/libtesseract/libtesseract.vcxproj.filters +++ b/vs2010/libtesseract/libtesseract.vcxproj.filters @@ -1605,9 +1605,6 @@ Header Files - - Header Files - Header Files diff --git a/vs2010/port/version.h b/vs2010/port/version.h deleted file mode 100644 index b1bdf4ceb..000000000 --- a/vs2010/port/version.h +++ /dev/null @@ -1,25 +0,0 @@ -/////////////////////////////////////////////////////////////////////// -// File: version.h -// Description: define version identifier for Windows -// Author: zdenop@gmail.com -// Created: Fri Nov 19 21:05:06 CET 2010 -// -// (C) Copyright 2010, Google Inc. -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -/////////////////////////////////////////////////////////////////////// - -#ifndef VS2008_PORT_VERSION_H_ -#define VS2008_PORT_VERSION_H_ - -#define VERSION "3.03" - -#endif // VS2008_PORT_VERSION_H_