mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-14 08:39:27 +08:00
MSVS support inttypes.h from VS 2015
This commit is contained in:
parent
7fc245c38a
commit
8ee5c865f1
@ -25,7 +25,6 @@
|
|||||||
#include "elst.h" // for ELIST_ITERATOR, ELISTIZEH, ELIST_LINK
|
#include "elst.h" // for ELIST_ITERATOR, ELISTIZEH, ELIST_LINK
|
||||||
#include "elst2.h" // for ELIST2_ITERATOR, ELIST2IZEH, ELIST2_LINK
|
#include "elst2.h" // for ELIST2_ITERATOR, ELIST2IZEH, ELIST2_LINK
|
||||||
#include "errcode.h" // for ASSERT_HOST
|
#include "errcode.h" // for ASSERT_HOST
|
||||||
#include "host.h" // for PRId32
|
|
||||||
#include "ocrblock.h" // for BLOCK
|
#include "ocrblock.h" // for BLOCK
|
||||||
#include "params.h" // for DoubleParam, double_VAR_H
|
#include "params.h" // for DoubleParam, double_VAR_H
|
||||||
#include "pdblock.h" // for PDBLK
|
#include "pdblock.h" // for PDBLK
|
||||||
|
@ -33,11 +33,11 @@
|
|||||||
#include "boxread.h" // for ReadMemBoxes
|
#include "boxread.h" // for ReadMemBoxes
|
||||||
#include "callcpp.h" // for window_wait
|
#include "callcpp.h" // for window_wait
|
||||||
#include "helpers.h" // for IntCastRounded, TRand, ClipToRange, Modulo
|
#include "helpers.h" // for IntCastRounded, TRand, ClipToRange, Modulo
|
||||||
#include "host.h" // for PRId64
|
|
||||||
#include "rect.h" // for TBOX
|
#include "rect.h" // for TBOX
|
||||||
#include "scrollview.h" // for ScrollView, ScrollView::CYAN, ScrollView::NONE
|
#include "scrollview.h" // for ScrollView, ScrollView::CYAN, ScrollView::NONE
|
||||||
#include "serialis.h" // for TFile
|
#include "serialis.h" // for TFile
|
||||||
#include "tprintf.h" // for tprintf
|
#include "tprintf.h" // for tprintf
|
||||||
|
#include <cinttypes> // for PRId64
|
||||||
|
|
||||||
// Number of documents to read ahead while training. Doesn't need to be very
|
// Number of documents to read ahead while training. Doesn't need to be very
|
||||||
// large.
|
// large.
|
||||||
|
@ -16,11 +16,11 @@
|
|||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
|
#include "allheaders.h"
|
||||||
#include "pdblock.h"
|
#include "pdblock.h"
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <memory> // std::unique_ptr
|
#include <memory> // std::unique_ptr
|
||||||
#include "allheaders.h"
|
#include <cinttypes> // for PRId32
|
||||||
#include "host.h" // for PRId32
|
|
||||||
|
|
||||||
// Include automatically generated configuration file if running autoconf.
|
// Include automatically generated configuration file if running autoconf.
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -16,12 +16,12 @@
|
|||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#include "polyblk.h"
|
#include "polyblk.h"
|
||||||
|
#include "elst.h"
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
#include <cinttypes> // PRId32
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <memory> // std::unique_ptr
|
#include <memory> // std::unique_ptr
|
||||||
#include "elst.h"
|
|
||||||
#include "host.h" // for PRId32
|
|
||||||
|
|
||||||
// Include automatically generated configuration file if running autoconf.
|
// Include automatically generated configuration file if running autoconf.
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -25,24 +25,7 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#undef min
|
#undef min
|
||||||
#undef max
|
#undef max
|
||||||
#endif
|
#endif // _WIN32
|
||||||
|
|
||||||
#include <cinttypes> // PRId32, ...
|
|
||||||
#include <cstdint> // 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 */
|
|
||||||
|
|
||||||
// Return true if x is within tolerance of y
|
// Return true if x is within tolerance of y
|
||||||
template<class T> bool NearlyEqual(T x, T y, T tolerance) {
|
template<class T> bool NearlyEqual(T x, T y, T tolerance) {
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
#include <cinttypes> // for PRId64
|
#include <cinttypes> // for PRId64
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "elst.h"
|
#include "elst.h"
|
||||||
#include "host.h" // for PRId64
|
|
||||||
#include "params.h"
|
#include "params.h"
|
||||||
#include "ratngs.h"
|
#include "ratngs.h"
|
||||||
#include "tesscallback.h"
|
#include "tesscallback.h"
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "dppoint.h"
|
#include "dppoint.h"
|
||||||
#include "imagefind.h"
|
#include "imagefind.h"
|
||||||
#include "workingpartset.h"
|
#include "workingpartset.h"
|
||||||
|
#include "host.h" // for NearlyEqual
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
@ -23,9 +23,9 @@
|
|||||||
|
|
||||||
#include "tabfind.h"
|
#include "tabfind.h"
|
||||||
#include "alignedblob.h"
|
#include "alignedblob.h"
|
||||||
#include "blobbox.h"
|
|
||||||
#include "colpartitiongrid.h"
|
#include "colpartitiongrid.h"
|
||||||
#include "detlinefit.h"
|
#include "detlinefit.h"
|
||||||
|
#include "host.h" // for NearlyEqual
|
||||||
#include "linefind.h"
|
#include "linefind.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
Loading…
Reference in New Issue
Block a user