1 /*
2 Copyright (c) 2019 Red Hat Inc.
3 All rights reserved.
4
5 This library is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of
8 the License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 Authors: Jaroslav Kysela <perex@perex.cz>
16 */
17
18 #include "list.h"
19 #include "tplg_local.h"
20
21 /* verbose output detailing each object size and file position */
tplg_log_(snd_tplg_t * tplg,char type,size_t pos,const char * fmt,...)22 void tplg_log_(snd_tplg_t *tplg, char type, size_t pos, const char *fmt, ...)
23 {
24 va_list va;
25
26 if (!tplg->verbose)
27 return;
28
29 va_start(va, fmt);
30 fprintf(stdout, "%c0x%6.6zx/%6.6zd - ", type, pos, pos);
31 vfprintf(stdout, fmt, va);
32 va_end(va);
33 putc('\n', stdout);
34 }
35