Mercurial > hgrepos > Python2 > PyMuPDF
diff mupdf-source/thirdparty/extract/src/outf.c @ 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mupdf-source/thirdparty/extract/src/outf.c Mon Sep 15 11:43:07 2025 +0200 @@ -0,0 +1,42 @@ +#include "memento.h" +#include "outf.h" + +#include <stdarg.h> +#include <stdio.h> +#include <string.h> + +int extract_outf_verbose = 0; + +void extract_outf_verbose_set(int verbose) +{ + extract_outf_verbose = verbose; +} + +void (extract_outf)( + int level, + const char *file, + int line, + const char *fn, + int ln, + const char *format, + ... + ) +{ + va_list va; + if (level > extract_outf_verbose) { + return; + } + + if (ln) { + fprintf(stderr, "%s:%i:%s: ", file, line, fn); + } + va_start(va, format); + vfprintf(stderr, format, va); + va_end(va); + if (ln) { + size_t len = strlen(format); + if (len == 0 || format[len-1] != '\n') { + fprintf(stderr, "\n"); + } + } +}
