tesseract v5.3.3.20231005
tprintf.h
Go to the documentation of this file.
1/**********************************************************************
2 * File: tprintf.h
3 * Description: Trace version of printf - portable between UX and NT
4 * Author: Phil Cheatle
5 *
6 * (C) Copyright 1995, Hewlett-Packard Ltd.
7 ** Licensed under the Apache License, Version 2.0 (the "License");
8 ** you may not use this file except in compliance with the License.
9 ** You may obtain a copy of the License at
10 ** http://www.apache.org/licenses/LICENSE-2.0
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
16 *
17 **********************************************************************/
18
19#ifndef TESSERACT_CCUTIL_TPRINTF_H
20#define TESSERACT_CCUTIL_TPRINTF_H
21
22#include "params.h" // for BOOL_VAR_H
23#include <tesseract/export.h> // for TESS_API
24
25namespace tesseract {
26
27#if !defined(__GNUC__) && !defined(__attribute__)
28# define __attribute__(attr) // compiler without support for __attribute__
29#endif
30
31// Disable some log messages by setting log_level > 0.
33
34// Main logging function.
35extern TESS_API void tprintf( // Trace printf
36 const char *format, ...) // Message
37 __attribute__((format(gnu_printf, 1, 2)));
38
39} // namespace tesseract
40
41#undef __attribute__
42
43#endif // define TESSERACT_CCUTIL_TPRINTF_H
#define __attribute__(attr)
Definition: tprintf.h:28
void tprintf(const char *format,...)
Definition: tprintf.cpp:41
INT_VAR_H(editor_image_xpos)
int log_level
Definition: tprintf.cpp:36
#define TESS_API
Definition: export.h:32