Coverage Report

Created: 2024-07-05 06:13

/src/mupdf/thirdparty/extract/src/outf.c
Line
Count
Source (jump to first uncovered line)
1
#include "memento.h"
2
#include "outf.h"
3
4
#include <stdarg.h>
5
#include <stdio.h>
6
#include <string.h>
7
8
int extract_outf_verbose = 0;
9
10
void extract_outf_verbose_set(int verbose)
11
0
{
12
0
  extract_outf_verbose = verbose;
13
0
}
14
15
void (extract_outf)(
16
    int         level,
17
    const char *file,
18
    int         line,
19
    const char *fn,
20
    int         ln,
21
    const char *format,
22
    ...
23
    )
24
0
{
25
0
  va_list va;
26
0
  if (level > extract_outf_verbose) {
27
0
    return;
28
0
  }
29
30
0
  if (ln) {
31
0
    fprintf(stderr, "%s:%i:%s: ", file, line, fn);
32
0
  }
33
0
  va_start(va, format);
34
0
  vfprintf(stderr, format, va);
35
0
  va_end(va);
36
0
  if (ln) {
37
0
    size_t len = strlen(format);
38
0
    if (len == 0 || format[len-1] != '\n') {
39
0
      fprintf(stderr, "\n");
40
0
    }
41
0
  }
42
0
}