comparison mupdf-source/thirdparty/extract/src/outf.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 #ifndef ARTIFEX_EXTRACT_OUTF_H
2 #define ARTIFEX_EXTRACT_OUTF_H
3
4 /* Simple printf-style debug output. */
5
6 #if defined(__GNUC__) || defined(__clang__) || defined(_WIN32)
7 #define extract_FUNCTION __FUNCTION__
8 #else
9 #define extract_FUNCTION ""
10 #endif
11
12 #define outf(format, ...) \
13 (1 > extract_outf_verbose) ? (void) 0 : (extract_outf)(1, __FILE__, __LINE__, extract_FUNCTION, 1 /*ln*/, format, ##__VA_ARGS__)
14
15 #define outf0(format, ...) \
16 (0 > extract_outf_verbose) ? (void) 0 : (extract_outf)(0, __FILE__, __LINE__, extract_FUNCTION, 1 /*ln*/, format, ##__VA_ARGS__)
17
18 #define outfx(format, ...)
19
20 /* Only for internal use by extract code. */
21
22 extern int extract_outf_verbose;
23
24 void (extract_outf)(
25 int level,
26 const char *file, int line,
27 const char *fn,
28 int ln,
29 const char *format,
30 ...
31 )
32 #ifdef __GNUC__
33 __attribute__ ((format (printf, 6, 7)))
34 #endif
35 ;
36 /* Outputs text if <level> is less than or equal to verbose value set by
37 outf_level_set(). */
38
39 void extract_outf_verbose_set(int verbose);
40 /* Set verbose value. Higher values are more verbose. Initial value is 0. */
41
42 #endif