diff --git a/src/ccstruct/blobbox.h b/src/ccstruct/blobbox.h index 8e184b536..b5ea5505f 100644 --- a/src/ccstruct/blobbox.h +++ b/src/ccstruct/blobbox.h @@ -25,7 +25,6 @@ #include "elst.h" // for ELIST_ITERATOR, ELISTIZEH, ELIST_LINK #include "elst2.h" // for ELIST2_ITERATOR, ELIST2IZEH, ELIST2_LINK #include "errcode.h" // for ASSERT_HOST -#include "host.h" // for PRId32 #include "ocrblock.h" // for BLOCK #include "params.h" // for DoubleParam, double_VAR_H #include "pdblock.h" // for PDBLK diff --git a/src/ccstruct/imagedata.cpp b/src/ccstruct/imagedata.cpp index 58c301ab0..3b2b74a57 100644 --- a/src/ccstruct/imagedata.cpp +++ b/src/ccstruct/imagedata.cpp @@ -33,11 +33,11 @@ #include "boxread.h" // for ReadMemBoxes #include "callcpp.h" // for window_wait #include "helpers.h" // for IntCastRounded, TRand, ClipToRange, Modulo -#include "host.h" // for PRId64 #include "rect.h" // for TBOX #include "scrollview.h" // for ScrollView, ScrollView::CYAN, ScrollView::NONE #include "serialis.h" // for TFile #include "tprintf.h" // for tprintf +#include // for PRId64 // Number of documents to read ahead while training. Doesn't need to be very // large. diff --git a/src/ccstruct/pdblock.cpp b/src/ccstruct/pdblock.cpp index 96814e701..e5bce778c 100644 --- a/src/ccstruct/pdblock.cpp +++ b/src/ccstruct/pdblock.cpp @@ -16,11 +16,11 @@ * **********************************************************************/ +#include "allheaders.h" #include "pdblock.h" #include #include // std::unique_ptr -#include "allheaders.h" -#include "host.h" // for PRId32 +#include // for PRId32 // Include automatically generated configuration file if running autoconf. #ifdef HAVE_CONFIG_H diff --git a/src/ccstruct/polyblk.cpp b/src/ccstruct/polyblk.cpp index 7aacc2f77..9a89a8c0b 100644 --- a/src/ccstruct/polyblk.cpp +++ b/src/ccstruct/polyblk.cpp @@ -16,12 +16,12 @@ **********************************************************************/ #include "polyblk.h" +#include "elst.h" #include +#include // PRId32 #include #include -#include // std::unique_ptr -#include "elst.h" -#include "host.h" // for PRId32 +#include // std::unique_ptr // Include automatically generated configuration file if running autoconf. #ifdef HAVE_CONFIG_H diff --git a/src/ccutil/host.h b/src/ccutil/host.h index 821292df2..9ba7c3ae0 100644 --- a/src/ccutil/host.h +++ b/src/ccutil/host.h @@ -25,24 +25,7 @@ #include #undef min #undef max -#endif - -#include // PRId32, ... -#include // int32_t, ... - -#if defined(_WIN32) - -/* MinGW defines the standard PRI... macros, but MSVS doesn't. */ - -#if !defined(PRId32) -#define PRId32 "d" -#endif - -#if !defined(PRId64) -#define PRId64 "I64d" -#endif - -#endif /* _WIN32 */ +#endif // _WIN32 // Return true if x is within tolerance of y template bool NearlyEqual(T x, T y, T tolerance) { diff --git a/src/dict/dawg.h b/src/dict/dawg.h index 127e73da6..1960f642b 100644 --- a/src/dict/dawg.h +++ b/src/dict/dawg.h @@ -29,7 +29,6 @@ #include // for PRId64 #include #include "elst.h" -#include "host.h" // for PRId64 #include "params.h" #include "ratngs.h" #include "tesscallback.h" diff --git a/src/textord/colpartition.cpp b/src/textord/colpartition.cpp index b116f73e9..ec5675072 100644 --- a/src/textord/colpartition.cpp +++ b/src/textord/colpartition.cpp @@ -28,6 +28,7 @@ #include "dppoint.h" #include "imagefind.h" #include "workingpartset.h" +#include "host.h" // for NearlyEqual #include diff --git a/src/textord/tabfind.cpp b/src/textord/tabfind.cpp index f34e7a90c..28630bfce 100644 --- a/src/textord/tabfind.cpp +++ b/src/textord/tabfind.cpp @@ -23,9 +23,9 @@ #include "tabfind.h" #include "alignedblob.h" -#include "blobbox.h" #include "colpartitiongrid.h" #include "detlinefit.h" +#include "host.h" // for NearlyEqual #include "linefind.h" #include