all repos — openbox @ e7ae71db7008c2418090608e9860da024f1c1464

openbox fork - make it a bit more like ryudo

openbox/debug.c (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <glib.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>

static gboolean show;

void ob_debug_show_output(gboolean enable)
{
    show = enable;
}

void ob_debug(char *a, ...)
{
    va_list vl;

    if (show) {
        va_start(vl, a);
        vfprintf(stderr, a, vl);
    }
}