Allow giving alphanumeric channels (Prepare for IMTS)
This commit is contained in:
@@ -94,7 +94,7 @@ void get_win_size(int *w, int *h)
|
||||
*w = MAX_DISPLAY_WIDTH - 1;
|
||||
}
|
||||
|
||||
void _printdebug(const char *file, const char __attribute__((unused)) *function, int line, int cat, int level, int chan, const char *fmt, ...)
|
||||
void _printdebug(const char *file, const char __attribute__((unused)) *function, int line, int cat, int level, const char *kanal, const char *fmt, ...)
|
||||
{
|
||||
char buffer[4096], *b = buffer;
|
||||
int s = sizeof(buffer) - 1;
|
||||
@@ -107,9 +107,9 @@ void _printdebug(const char *file, const char __attribute__((unused)) *function,
|
||||
|
||||
buffer[sizeof(buffer) - 1] = '\0';
|
||||
|
||||
/* if chan is used, prefix the channel number */
|
||||
if (num_kanal > 1 && chan >= 0) {
|
||||
sprintf(buffer, "(chan %d) ", chan);
|
||||
/* if kanal is used, prefix the channel number */
|
||||
if (num_kanal > 1 && kanal) {
|
||||
sprintf(buffer, "(chan %s) ", kanal);
|
||||
b = strchr(buffer, '\0');
|
||||
s -= strlen(buffer);
|
||||
}
|
||||
|
@@ -30,9 +30,9 @@
|
||||
|
||||
void get_win_size(int *w, int *h);
|
||||
|
||||
#define PDEBUG(cat, level, fmt, arg...) _printdebug(__FILE__, __FUNCTION__, __LINE__, cat, level, -1, fmt, ## arg)
|
||||
#define PDEBUG(cat, level, fmt, arg...) _printdebug(__FILE__, __FUNCTION__, __LINE__, cat, level, NULL, fmt, ## arg)
|
||||
#define PDEBUG_CHAN(cat, level, fmt, arg...) _printdebug(__FILE__, __FUNCTION__, __LINE__, cat, level, CHAN, fmt, ## arg)
|
||||
void _printdebug(const char *file, const char *function, int line, int cat, int level, int chan, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 7, 8)));
|
||||
void _printdebug(const char *file, const char *function, int line, int cat, int level, const char *chan_str, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 7, 8)));
|
||||
|
||||
const char *debug_amplitude(double level);
|
||||
const char *debug_db(double level_db);
|
||||
|
Reference in New Issue
Block a user