diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-07-24 06:02:38 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-07-24 06:02:38 +0000 |
| commit | 5be0a82a353b67160142134de1cc51fa31d72759 (patch) | |
| tree | 333f0e70a6cf4f2cb5252c2e16922a1b6408dc06 /render | |
| parent | 230abdc5a0848cd05dc3a007826a2a6b8a73c0a5 (diff) | |
use ob_debug for any debug printing and only display the output when its a debug build or when --debug is passed to it
Diffstat (limited to 'render')
| -rw-r--r-- | render/color.c | 19 | ||||
| -rw-r--r-- | render/gradient.c | 5 | ||||
| -rw-r--r-- | render/instance.c | 1 | ||||
| -rw-r--r-- | render/theme.c | 5 |
4 files changed, 11 insertions, 19 deletions
diff --git a/render/color.c b/render/color.c index 3e9199c3..d16bbf0c 100644 --- a/render/color.c +++ b/render/color.c @@ -1,8 +1,9 @@ +#include "render.h" +#include "color.h" + #include <X11/Xlib.h> #include <X11/Xutil.h> #include <string.h> -#include "render.h" -#include "color.h" void RrColorAllocateGC(RrColor *in) { @@ -75,10 +76,6 @@ void RrReduceDepth(const RrInstance *inst, RrPixel32 *data, XImage *im) if ((RrRedOffset(inst) != RrDefaultRedOffset) || (RrBlueOffset(inst) != RrDefaultBlueOffset) || (RrGreenOffset(inst) != RrDefaultGreenOffset)) { - g_message("CONVERSION %d->%d %d->%d %d->%d", - RrDefaultRedOffset, RrRedOffset(inst), - RrDefaultGreenOffset, RrGreenOffset(inst), - RrDefaultBlueOffset, RrBlueOffset(inst)); for (y = 0; y < im->height; y++) { for (x = 0; x < im->width; x++) { r = (data[x] >> RrDefaultRedOffset) & 0xFF; @@ -125,7 +122,7 @@ void RrReduceDepth(const RrInstance *inst, RrPixel32 *data, XImage *im) break; default: - g_message("your bit depth is currently unhandled\n"); + g_warning("your bit depth is currently unhandled\n"); } } @@ -143,8 +140,6 @@ static void swap_byte_order(XImage *im) { int x, y, di; - g_message("SWAPPING BYTE ORDER"); - di = 0; for (y = 0; y < im->height; ++y) { for (x = 0; x < im->height; ++x) { @@ -163,7 +158,7 @@ static void swap_byte_order(XImage *im) case 8: break; default: - g_message("your bit depth is currently unhandled\n"); + g_warning("your bit depth is currently unhandled"); } } di += im->bytes_per_line; @@ -224,7 +219,7 @@ void RrIncreaseDepth(const RrInstance *inst, RrPixel32 *data, XImage *im) } break; case 8: - g_message("this image bit depth is currently unhandled\n"); + g_warning("this image bit depth is currently unhandled"); break; case 1: for (y = 0; y < im->height; y++) { @@ -239,7 +234,7 @@ void RrIncreaseDepth(const RrInstance *inst, RrPixel32 *data, XImage *im) } break; default: - g_message("this image bit depth is currently unhandled\n"); + g_warning("this image bit depth is currently unhandled"); } } diff --git a/render/gradient.c b/render/gradient.c index 26ebbdc6..47f4850f 100644 --- a/render/gradient.c +++ b/render/gradient.c @@ -38,7 +38,7 @@ void RrRender(RrAppearance *a, int w, int h) gradient_pyramid(&a->surface, w, h); break; default: - g_message("unhandled gradient"); + g_assert_not_reached(); /* unhandled gradient */ return; } @@ -183,9 +183,6 @@ static void gradient_solid(RrAppearance *l, int w, int h) switch (sp->bevel) { case RR_BEVEL_1: - g_message("%lx %lx %lx", - sp->primary->pixel, - sp->bevel_dark->pixel, sp->bevel_light->pixel); XDrawLine(RrDisplay(l->inst), l->pixmap, sp->bevel_dark->gc, left, bottom, right, bottom); XDrawLine(RrDisplay(l->inst), l->pixmap, sp->bevel_dark->gc, diff --git a/render/instance.c b/render/instance.c index ad696655..26ea63c8 100644 --- a/render/instance.c +++ b/render/instance.c @@ -72,7 +72,6 @@ void RrPseudoColorSetup (RrInstance *inst) int tr, tg, tb, n, r, g, b, i, incolors, ii; unsigned long dev; int cpc, _ncolors; - g_message("Initializing PseudoColor RenderControl\n"); /* determine the number of colors and the bits-per-color */ inst->pseudo_bpc = 2; /* XXX THIS SHOULD BE A USER OPTION */ diff --git a/render/theme.c b/render/theme.c index a7da009b..4fc3d6a1 100644 --- a/render/theme.c +++ b/render/theme.c @@ -63,8 +63,9 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) if (name) { db = loaddb(theme, name); if (db == NULL) { - g_warning("Failed to load the theme '%s'", name); - g_message("Falling back to the default: '%s'", DEFAULT_THEME); + g_warning("Failed to load the theme '%s'\n" + "Falling back to the default: '%s'", + name, DEFAULT_THEME); } else theme->name = g_path_get_basename(name); } |
