mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-31 09:20:58 +02:00
Refactoring debug code
Origin commit data
------------------
Branch: master
Commit: 47ac829467
Author: samsamsam <samsamsam@o2.pl>
Date: 2019-01-11 (Fri, 11 Jan 2019)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "debug.h"
|
||||
#include "common.h"
|
||||
#include "output.h"
|
||||
|
||||
@@ -31,28 +32,6 @@
|
||||
/* Makros/Constants */
|
||||
/* ***************************** */
|
||||
|
||||
#ifdef SAM_WITH_DEBUG
|
||||
#define OUTPUT_DEBUG
|
||||
#else
|
||||
#define OUTPUT_SILENT
|
||||
#endif
|
||||
|
||||
#ifdef OUTPUT_DEBUG
|
||||
|
||||
static short debug_level = 0;
|
||||
|
||||
#define output_printf(level, x...) do { \
|
||||
if (debug_level >= level) fprintf(stderr, x); } while (0)
|
||||
#else
|
||||
#define output_printf(level, x...)
|
||||
#endif
|
||||
|
||||
#ifndef OUTPUT_SILENT
|
||||
#define output_err(x...) do { printf(x); } while (0)
|
||||
#else
|
||||
#define output_err(x...)
|
||||
#endif
|
||||
|
||||
/* Error Constants */
|
||||
#define cERR_OUTPUT_NO_ERROR 0
|
||||
#define cERR_OUTPUT_INTERNAL_ERROR -1
|
||||
|
Reference in New Issue
Block a user