mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
libtriple: add lt_debug() for controllable debug output
This commit is contained in:
@@ -11,6 +11,7 @@ noinst_LIBRARIES = libtriple.a
|
||||
AM_CPPFLAGS = -fno-rtti -fno-exceptions
|
||||
|
||||
libtriple_a_SOURCES = \
|
||||
lt_debug.cpp \
|
||||
dmx_td.cpp \
|
||||
video_td.cpp \
|
||||
audio_td.cpp \
|
||||
|
18
libtriple/lt_debug.cpp
Normal file
18
libtriple/lt_debug.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
/* libtriple debug functions */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int cnxt_debug = 0;
|
||||
|
||||
void lt_debug(const char *fmt, ...)
|
||||
{
|
||||
if (! cnxt_debug)
|
||||
return;
|
||||
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vfprintf(stderr, fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
4
libtriple/lt_debug.h
Normal file
4
libtriple/lt_debug.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#ifndef __LT_DEBUG_H
|
||||
#define __LT_DEBUG_H
|
||||
void lt_debug(const char *fmt, ...);
|
||||
#endif
|
Reference in New Issue
Block a user