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 "tplg_local.h"
19 
20 /* verbose output detailing each object size and file position */
tplg_log_(snd_tplg_t *tplg, char type, size_t pos, const char *fmt, ...)21 void tplg_log_(snd_tplg_t *tplg, char type, size_t pos, const char *fmt, ...)
22 {
23 	va_list va;
24 
25 	if (!tplg->verbose)
26 		return;
27 
28 	va_start(va, fmt);
29 	fprintf(stdout, "%c0x%6.6zx/%6.6zd - ", type, pos, pos);
30 	vfprintf(stdout, fmt, va);
31 	va_end(va);
32 	putc('\n', stdout);
33 }
34