Skip to content

Commit

Permalink
Fix #include path of public headers
Browse files Browse the repository at this point in the history
  • Loading branch information
amitdo committed Oct 28, 2019
1 parent dfede8a commit e1bae15
Show file tree
Hide file tree
Showing 203 changed files with 330 additions and 330 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ config_auto.h
/doc/*.xml

# generated version file
/src/api/tess_version.h
/include/tesseract/tess_version.h

# executables
/src/api/tesseract
Expand Down
2 changes: 1 addition & 1 deletion include/tesseract/apitypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef TESSERACT_API_APITYPES_H_
#define TESSERACT_API_APITYPES_H_

#include "publictypes.h"
#include "tesseract/publictypes.h"

// The types used by the API and Page/ResultIterator can be found in:
// ccstruct/publictypes.h
Expand Down
18 changes: 9 additions & 9 deletions include/tesseract/baseapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
// To avoid collision with other typenames include the ABSOLUTE MINIMUM
// complexity of includes here. Use forward declarations wherever possible
// and hide includes of complex types in baseapi.cpp.
#include "apitypes.h"
#include "pageiterator.h"
#include "platform.h"
#include "publictypes.h"
#include "resultiterator.h"
#include "serialis.h"
#include "tess_version.h"
#include "thresholder.h"
#include "unichar.h"
#include "tesseract/apitypes.h"
#include "tesseract/pageiterator.h"
#include "tesseract/platform.h"
#include "tesseract/publictypes.h"
#include "tesseract/resultiterator.h"
#include "tesseract/serialis.h"
#include "tesseract/tess_version.h"
#include "tesseract/thresholder.h"
#include "tesseract/unichar.h"

template <typename T> class GenericVector;
class PAGE_RES;
Expand Down
12 changes: 6 additions & 6 deletions include/tesseract/capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
#endif

#ifdef TESS_CAPI_INCLUDE_BASEAPI
# include "baseapi.h"
# include "ocrclass.h"
# include "pageiterator.h"
# include "renderer.h"
# include "resultiterator.h"
# include "tesseract/baseapi.h"
# include "tesseract/ocrclass.h"
# include "tesseract/pageiterator.h"
# include "tesseract/renderer.h"
# include "tesseract/resultiterator.h"
#else
# include <stdbool.h>
# include <stdio.h>
# include "platform.h"
# include "tesseract/platform.h"
#endif

#ifdef __cplusplus
Expand Down
4 changes: 2 additions & 2 deletions include/tesseract/genericvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#include <cstdlib>
#include <functional> // for std::function

#include "helpers.h"
#include "serialis.h"
#include "tesseract/helpers.h"
#include "tesseract/serialis.h"

// Use PointerVector<T> below in preference to GenericVector<T*>, as that
// provides automatic deletion of pointers, [De]Serialize that works, and
Expand Down
8 changes: 4 additions & 4 deletions include/tesseract/ltrresultiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
#ifndef TESSERACT_CCMAIN_LTR_RESULT_ITERATOR_H_
#define TESSERACT_CCMAIN_LTR_RESULT_ITERATOR_H_

#include "pageiterator.h" // for PageIterator
#include "platform.h" // for TESS_API
#include "publictypes.h" // for PageIteratorLevel
#include "unichar.h" // for StrongScriptDirection
#include "tesseract/pageiterator.h" // for PageIterator
#include "tesseract/platform.h" // for TESS_API
#include "tesseract/publictypes.h" // for PageIteratorLevel
#include "tesseract/unichar.h" // for StrongScriptDirection

class BLOB_CHOICE_IT;
class PAGE_RES;
Expand Down
2 changes: 1 addition & 1 deletion include/tesseract/osdetect.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef TESSERACT_CCMAIN_OSDETECT_H_
#define TESSERACT_CCMAIN_OSDETECT_H_

#include "platform.h" // for TESS_API
#include "tesseract/platform.h" // for TESS_API

class BLOBNBOX;
class BLOBNBOX_CLIST;
Expand Down
4 changes: 2 additions & 2 deletions include/tesseract/pageiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#ifndef TESSERACT_CCMAIN_PAGEITERATOR_H_
#define TESSERACT_CCMAIN_PAGEITERATOR_H_

#include "platform.h"
#include "publictypes.h"
#include "tesseract/platform.h"
#include "tesseract/publictypes.h"

struct BlamerBundle;
class C_BLOB_IT;
Expand Down
6 changes: 3 additions & 3 deletions include/tesseract/renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
// complexity of includes here. Use forward declarations wherever possible
// and hide includes of complex types in baseapi.cpp.
#include <string> // for std::string
#include "genericvector.h"
#include "platform.h"
#include "strngs.h" // for STRING
#include "tesseract/genericvector.h"
#include "tesseract/platform.h"
#include "tesseract/strngs.h" // for STRING

struct Pix;

Expand Down
8 changes: 4 additions & 4 deletions include/tesseract/resultiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@

#include <set> // for std::pair
#include <vector> // for std::vector
#include "ltrresultiterator.h" // for LTRResultIterator
#include "platform.h" // for TESS_API, TESS_LOCAL
#include "publictypes.h" // for PageIteratorLevel
#include "unichar.h" // for StrongScriptDirection
#include "tesseract/ltrresultiterator.h" // for LTRResultIterator
#include "tesseract/platform.h" // for TESS_API, TESS_LOCAL
#include "tesseract/publictypes.h" // for PageIteratorLevel
#include "tesseract/unichar.h" // for StrongScriptDirection

template <typename T> class GenericVector;
template <typename T> class GenericVectorEqEq;
Expand Down
2 changes: 1 addition & 1 deletion include/tesseract/strngs.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <cstdint> // for uint32_t
#include <cstdio> // for FILE
#include <cstring> // for strncpy
#include "platform.h" // for TESS_API
#include "tesseract/platform.h" // for TESS_API

namespace tesseract {
class TFile;
Expand Down
4 changes: 2 additions & 2 deletions include/tesseract/thresholder.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#ifndef TESSERACT_CCMAIN_THRESHOLDER_H_
#define TESSERACT_CCMAIN_THRESHOLDER_H_

#include "platform.h"
#include "publictypes.h"
#include "tesseract/platform.h"
#include "tesseract/publictypes.h"

struct Pix;

Expand Down
2 changes: 1 addition & 1 deletion include/tesseract/unichar.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <cstring>
#include <string>
#include <vector>
#include "platform.h"
#include "tesseract/platform.h"

// Maximum number of characters that can be stored in a UNICHAR. Must be
// at least 4. Must not exceed 31 without changing the coding of length.
Expand Down
6 changes: 3 additions & 3 deletions src/api/altorenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

#include <memory>
#include <sstream> // for std::stringstream
#include "baseapi.h"
#include "tesseract/baseapi.h"
#ifdef _WIN32
# include "host.h" // windows.h for MultiByteToWideChar, ...
#endif
#include "renderer.h"
#include "strngs.h" // for STRING
#include "tesseract/renderer.h"
#include "tesseract/strngs.h" // for STRING

namespace tesseract {

Expand Down
16 changes: 8 additions & 8 deletions src/api/baseapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "config_auto.h"
#endif

#include "baseapi.h"
#include "tesseract/baseapi.h"
#ifdef __linux__
#include <csignal> // for sigaction, SA_RESETHAND, SIGBUS, SIGFPE
#endif
Expand Down Expand Up @@ -66,32 +66,32 @@
#include "environ.h" // for l_uint8
#include "equationdetect.h" // for EquationDetect
#include "errcode.h" // for ASSERT_HOST
#include "helpers.h" // for IntCastRounded, chomp_string
#include "tesseract/helpers.h" // for IntCastRounded, chomp_string
#include "imageio.h" // for IFF_TIFF_G4, IFF_TIFF, IFF_TIFF_G3, ...
#ifndef DISABLED_LEGACY_ENGINE
#include "intfx.h" // for INT_FX_RESULT_STRUCT
#endif
#include "mutableiterator.h" // for MutableIterator
#include "normalis.h" // for kBlnBaselineOffset, kBlnXHeight
#include "ocrclass.h" // for ETEXT_DESC
#include "tesseract/ocrclass.h" // for ETEXT_DESC
#if defined(USE_OPENCL)
#include "openclwrapper.h" // for OpenclDevice
#endif
#include "osdetect.h" // for OSResults, OSBestResult, OrientationId...
#include "tesseract/osdetect.h" // for OSResults, OSBestResult, OrientationId...
#include "pageres.h" // for PAGE_RES_IT, WERD_RES, PAGE_RES, CR_DE...
#include "paragraphs.h" // for DetectParagraphs
#include "params.h" // for BoolParam, IntParam, DoubleParam, Stri...
#include "pdblock.h" // for PDBLK
#include "points.h" // for FCOORD
#include "polyblk.h" // for POLY_BLOCK
#include "rect.h" // for TBOX
#include "renderer.h" // for TessResultRenderer
#include "resultiterator.h" // for ResultIterator
#include "tesseract/renderer.h" // for TessResultRenderer
#include "tesseract/resultiterator.h" // for ResultIterator
#include "stepblob.h" // for C_BLOB_IT, C_BLOB, C_BLOB_LIST
#include "strngs.h" // for STRING
#include "tesseract/strngs.h" // for STRING
#include "tessdatamanager.h" // for TessdataManager, kTrainedDataSuffix
#include "tesseractclass.h" // for Tesseract
#include "thresholder.h" // for ImageThresholder
#include "tesseract/thresholder.h" // for ImageThresholder
#include "tprintf.h" // for tprintf
#include "werd.h" // for WERD, WERD_IT, W_FUZZY_NON, W_FUZZY_SP

Expand Down
6 changes: 3 additions & 3 deletions src/api/capi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#ifndef TESS_CAPI_INCLUDE_BASEAPI
# define TESS_CAPI_INCLUDE_BASEAPI
#endif
#include "capi.h"
#include "genericvector.h"
#include "strngs.h"
#include "tesseract/capi.h"
#include "tesseract/genericvector.h"
#include "tesseract/strngs.h"

const char* TessVersion() {
return TessBaseAPI::Version();
Expand Down
4 changes: 2 additions & 2 deletions src/api/hocrrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#include <locale> // for std::locale::classic
#include <memory> // for std::unique_ptr
#include <sstream> // for std::stringstream
#include "baseapi.h" // for TessBaseAPI
#include "tesseract/baseapi.h" // for TessBaseAPI
#ifdef _WIN32
# include "host.h" // windows.h for MultiByteToWideChar, ...
#endif
#include "renderer.h"
#include "tesseract/renderer.h"
#include "tesseractclass.h" // for Tesseract

namespace tesseract {
Expand Down
4 changes: 2 additions & 2 deletions src/api/lstmboxrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*
**********************************************************************/

#include "baseapi.h" // for TessBaseAPI
#include "renderer.h"
#include "tesseract/baseapi.h" // for TessBaseAPI
#include "tesseract/renderer.h"
#include "tesseractclass.h" // for Tesseract

namespace tesseract {
Expand Down
4 changes: 2 additions & 2 deletions src/api/pdfrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#include <memory> // std::unique_ptr
#include <sstream> // for std::stringstream
#include "allheaders.h"
#include "baseapi.h"
#include "tesseract/baseapi.h"
#include <cmath>
#include "renderer.h"
#include "tesseract/renderer.h"
#include <cstring>
#include "tprintf.h"

Expand Down
6 changes: 3 additions & 3 deletions src/api/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

#include <cstring>
#include <memory> // std::unique_ptr
#include "baseapi.h"
#include "genericvector.h"
#include "renderer.h"
#include "tesseract/baseapi.h"
#include "tesseract/genericvector.h"
#include "tesseract/renderer.h"

namespace tesseract {

Expand Down
4 changes: 2 additions & 2 deletions src/api/tesseractmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
#include <iostream>

#include "allheaders.h"
#include "baseapi.h"
#include "tesseract/baseapi.h"
#include "dict.h"
#if defined(USE_OPENCL)
#include "openclwrapper.h" // for OpenclDevice
#endif
#include "renderer.h"
#include "tesseract/renderer.h"
#include "simddetect.h"
#include "tprintf.h" // for tprintf

Expand Down
4 changes: 2 additions & 2 deletions src/api/wordstrboxrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*
**********************************************************************/

#include "baseapi.h" // for TessBaseAPI
#include "renderer.h"
#include "tesseract/baseapi.h" // for TessBaseAPI
#include "tesseract/renderer.h"
#include "tesseractclass.h" // for Tesseract

namespace tesseract {
Expand Down
2 changes: 1 addition & 1 deletion src/arch/intsimdmatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
///////////////////////////////////////////////////////////////////////

#include "intsimdmatrix.h"
#include "genericvector.h" // for GenericVector
#include "tesseract/genericvector.h" // for GenericVector
#include "matrix.h" // for GENERIC_2D_ARRAY
#include "simddetect.h" // for SIMDDetect

Expand Down
2 changes: 1 addition & 1 deletion src/arch/simddetect.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef TESSERACT_ARCH_SIMDDETECT_H_
#define TESSERACT_ARCH_SIMDDETECT_H_

#include "platform.h"
#include "tesseract/platform.h"

namespace tesseract {

Expand Down
4 changes: 2 additions & 2 deletions src/ccmain/applybox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
#include "allheaders.h"
#include "boxread.h"
#include "pageres.h"
#include "unichar.h"
#include "tesseract/unichar.h"
#include "unicharset.h"
#include "tesseractclass.h"
#include "genericvector.h"
#include "tesseract/genericvector.h"

/** Max number of blobs to classify together in FindSegmentation. */
const int kMaxGroupSize = 4;
Expand Down
2 changes: 1 addition & 1 deletion src/ccmain/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "fixspace.h"
#endif
#include "lstmrecognizer.h"
#include "ocrclass.h"
#include "tesseract/ocrclass.h"
#include "output.h"
#include "pageres.h" // for WERD_RES, PAGE_RES_IT, PAGE_RES, BLO...
#ifndef DISABLED_LEGACY_ENGINE
Expand Down
2 changes: 1 addition & 1 deletion src/ccmain/equationdetect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include "colpartition.h"
#include "colpartitiongrid.h"
#include "colpartitionset.h"
#include "helpers.h"
#include "tesseract/helpers.h"
#include "ratngs.h"
#include "tesseractclass.h"

Expand Down
4 changes: 2 additions & 2 deletions src/ccmain/equationdetect.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

#include "blobbox.h" // for BLOBNBOX (ptr only), BlobSpecialText...
#include "equationdetectbase.h" // for EquationDetectBase
#include "genericvector.h" // for GenericVector
#include "tesseract/genericvector.h" // for GenericVector
#include "tesseractclass.h" // for Tesseract
#include "unichar.h" // for UNICHAR_ID
#include "tesseract/unichar.h" // for UNICHAR_ID

class TBOX;
class UNICHARSET;
Expand Down
Loading

0 comments on commit e1bae15

Please sign in to comment.