Skip to content

Commit

Permalink
Format public API files with 'clang-format-11 -i include/tesseract/*.h'
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Mar 12, 2021
1 parent b68a2a7 commit c20da5e
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 41 deletions.
19 changes: 10 additions & 9 deletions include/tesseract/baseapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@
#define TESSERACT_API_BASEAPI_H_

#ifdef HAVE_CONFIG_H
#include "config_auto.h" // DISABLED_LEGACY_ENGINE
# include "config_auto.h" // DISABLED_LEGACY_ENGINE
#endif

#include "pageiterator.h"
#include <tesseract/version.h>

#include <cstdio>
#include <vector> // for std::vector

#include "export.h"
#include "pageiterator.h"
#include "publictypes.h"
#include "resultiterator.h"
#include "thresholder.h"
#include "unichar.h"

#include <tesseract/version.h>

#include <cstdio>
#include <vector> // for std::vector

struct Pix;
struct Pixa;
struct Boxa;
Expand Down Expand Up @@ -806,8 +806,9 @@ class TESS_API TessBaseAPI {

private:
// A list of image filenames gets special consideration
bool ProcessPagesFileList(FILE* fp, std::string* buf, const char* retry_config,
int timeout_millisec, TessResultRenderer* renderer,
bool ProcessPagesFileList(FILE* fp, std::string* buf,
const char* retry_config, int timeout_millisec,
TessResultRenderer* renderer,
int tessedit_page_number);
// TIFF supports multipage so gets special consideration.
bool ProcessPagesMultipageTiff(const unsigned char* data, size_t size,
Expand Down
10 changes: 5 additions & 5 deletions include/tesseract/capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
#include "export.h"

#ifdef __cplusplus
#include <tesseract/baseapi.h>
#include <tesseract/ocrclass.h>
#include <tesseract/pageiterator.h>
#include <tesseract/renderer.h>
#include <tesseract/resultiterator.h>
# include <tesseract/baseapi.h>
# include <tesseract/ocrclass.h>
# include <tesseract/pageiterator.h>
# include <tesseract/renderer.h>
# include <tesseract/resultiterator.h>
#endif

#include <stdbool.h>
Expand Down
26 changes: 13 additions & 13 deletions include/tesseract/export.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@
#define TESSERACT_PLATFORM_H_

#ifndef TESS_API
# if defined(_WIN32) || defined(__CYGWIN__)
# if defined(TESS_EXPORTS)
# define TESS_API __declspec(dllexport)
# elif defined(TESS_IMPORTS)
# define TESS_API __declspec(dllimport)
# if defined(_WIN32) || defined(__CYGWIN__)
# if defined(TESS_EXPORTS)
# define TESS_API __declspec(dllexport)
# elif defined(TESS_IMPORTS)
# define TESS_API __declspec(dllimport)
# else
# define TESS_API
# endif
# else
# define TESS_API
# if defined(TESS_EXPORTS) || defined(TESS_IMPORTS)
# define TESS_API __attribute__((visibility("default")))
# else
# define TESS_API
# endif
# endif
# else
# if defined(TESS_EXPORTS) || defined(TESS_IMPORTS)
# define TESS_API __attribute__((visibility("default")))
# else
# define TESS_API
# endif
# endif
#endif

#endif // TESSERACT_PLATFORM_H_
2 changes: 1 addition & 1 deletion include/tesseract/ltrresultiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#ifndef TESSERACT_CCMAIN_LTR_RESULT_ITERATOR_H_
#define TESSERACT_CCMAIN_LTR_RESULT_ITERATOR_H_

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

Expand Down
2 changes: 1 addition & 1 deletion include/tesseract/ocrclass.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,6 @@ class ETEXT_DESC { // output header
}
};

} // namespace tesseract
} // namespace tesseract

#endif // CCUTIL_OCRCLASS_H_
6 changes: 3 additions & 3 deletions include/tesseract/osdetect.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#ifndef TESSERACT_CCMAIN_OSDETECT_H_
#define TESSERACT_CCMAIN_OSDETECT_H_

#include "export.h" // for TESS_API
#include <vector> // for std::vector

#include <vector> // for std::vector
#include "export.h" // for TESS_API

namespace tesseract {

Expand Down Expand Up @@ -134,6 +134,6 @@ bool os_detect_blob(BLOBNBOX* bbox, OrientationDetector* o, ScriptDetector* s,
// applied for the text to be upright (readable).
TESS_API int OrientationIdToValue(const int& id);

} // namespace tesseract
} // namespace tesseract

#endif // TESSERACT_CCMAIN_OSDETECT_H_
6 changes: 3 additions & 3 deletions include/tesseract/renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,11 @@ class TESS_API TessPDFRenderer : public TessResultRenderer {
// PDFs one page at a time. At the end, that metadata is
// used to make everything that isn't easily handled in a
// streaming fashion.
long int obj_; // counter for PDF objects
long int obj_; // counter for PDF objects
std::vector<long int> offsets_; // offset of every PDF object in bytes
std::vector<long int> pages_; // object number for every /Page object
std::string datadir_; // where to find the custom font
bool textonly_; // skip images if set
std::string datadir_; // where to find the custom font
bool textonly_; // skip images if set
// Bookkeeping only. DIY = Do It Yourself.
void AppendPDFObjectDIY(size_t objectsize);
// Bookkeeping + emit data.
Expand Down
8 changes: 4 additions & 4 deletions include/tesseract/resultiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
#ifndef TESSERACT_CCMAIN_RESULT_ITERATOR_H_
#define TESSERACT_CCMAIN_RESULT_ITERATOR_H_

#include <set> // for std::pair
#include <vector> // for std::vector

#include "export.h" // for TESS_API, TESS_LOCAL
#include "ltrresultiterator.h" // for LTRResultIterator
#include "export.h" // for TESS_API, TESS_LOCAL
#include "publictypes.h" // for PageIteratorLevel
#include "unichar.h" // for StrongScriptDirection

#include <set> // for std::pair
#include <vector> // for std::vector

namespace tesseract {

class TESS_API ResultIterator : public LTRResultIterator {
Expand Down
5 changes: 3 additions & 2 deletions include/tesseract/unichar.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
#ifndef TESSERACT_CCUTIL_UNICHAR_H_
#define TESSERACT_CCUTIL_UNICHAR_H_

#include "export.h"
#include <memory.h>

#include <cstring>
#include <string>
#include <vector>
#include <memory.h>

#include "export.h"

namespace tesseract {

Expand Down

0 comments on commit c20da5e

Please sign in to comment.