comparison mupdf-source/thirdparty/tesseract/src/ccutil/tprintf.h @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
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 INT_VAR_H
23 #include <tesseract/export.h> // for TESS_API
24
25 namespace 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.
32 extern TESS_API INT_VAR_H(log_level);
33
34 // Main logging function.
35 extern TESS_API void tprintf( // Trace printf
36 const char *format, ...) // Message
37 __attribute__((format(printf, 1, 2)));
38
39 // Get file for debug output.
40 FILE *get_debugfp();
41
42 } // namespace tesseract
43
44 #undef __attribute__
45
46 #endif // define TESSERACT_CCUTIL_TPRINTF_H