make debugging messages dependent on #define DEBUG

This commit is contained in:
marschap
2005-07-03 12:36:56 +00:00
parent d236a2e981
commit a450ac5b47
+10 -10
View File
@@ -32,7 +32,7 @@
#include "report.h" #include "report.h"
#include "svgalib_drv.h" #include "svgalib_drv.h"
#define DEBUG
/* Small font */ /* Small font */
@@ -256,7 +256,7 @@ svgalib_drv_init (Driver *drvthis)
{ {
int VGAMODE; int VGAMODE;
report (RPT_DEBUG, "%s(%p)", __FUNCTION__, drvthis); debug (RPT_DEBUG, "%s(%p)", __FUNCTION__, drvthis);
vga_init (); vga_init ();
VGAMODE = G320x200x256; /* Default mode. */ VGAMODE = G320x200x256; /* Default mode. */
@@ -301,7 +301,7 @@ svgalib_drv_init (Driver *drvthis)
MODULE_EXPORT void MODULE_EXPORT void
svgalib_drv_close (Driver *drvthis) svgalib_drv_close (Driver *drvthis)
{ {
report (RPT_DEBUG, "%s(%p)", __FUNCTION__, drvthis); debug (RPT_DEBUG, "%s(%p)", __FUNCTION__, drvthis);
vga_setmode (TEXT); vga_setmode (TEXT);
} }
@@ -330,7 +330,7 @@ svgalib_drv_height (Driver *drvthis)
MODULE_EXPORT void MODULE_EXPORT void
svgalib_drv_clear (Driver * drvthis) svgalib_drv_clear (Driver * drvthis)
{ {
report (RPT_DEBUG, "%s(%p)", __FUNCTION__, drvthis); debug (RPT_DEBUG, "%s(%p)", __FUNCTION__, drvthis);
vga_waitretrace (); vga_waitretrace ();
gl_clearscreen (gl_rgbcolor (0, 0, 0)); gl_clearscreen (gl_rgbcolor (0, 0, 0));
@@ -354,7 +354,7 @@ svgalib_drv_string (Driver *drvthis, int x, int y, char string[])
{ {
int i; int i;
report (RPT_DEBUG, "%s(%p, %d, %d, \"%s\")", __FUNCTION__, drvthis, x, y, string); debug (RPT_DEBUG, "%s(%p, %d, %d, \"%s\")", __FUNCTION__, drvthis, x, y, string);
for (i = 0; string[i] != '\0'; i++) { for (i = 0; string[i] != '\0'; i++) {
unsigned char *c = &string[i]; unsigned char *c = &string[i];
@@ -380,7 +380,7 @@ svgalib_drv_chr (Driver *drvthis, int x, int y, char c)
{ {
char buffer[2]; char buffer[2];
report (RPT_DEBUG, "%s(%p, %d, %d, \'%c\')", __FUNCTION__, drvthis, x, y, c); debug (RPT_DEBUG, "%s(%p, %d, %d, \'%c\')", __FUNCTION__, drvthis, x, y, c);
switch ((unsigned char) c) { switch ((unsigned char) c) {
case '\0': case '\0':
@@ -405,7 +405,7 @@ svgalib_drv_num (Driver *drvthis, int x, int num)
char c; char c;
int y, dx; int y, dx;
report (RPT_DEBUG, "%s(%p, %d, %d)", __FUNCTION__, drvthis, x, num); debug (RPT_DEBUG, "%s(%p, %d, %d)", __FUNCTION__, drvthis, x, num);
c = '0' + num; c = '0' + num;
@@ -422,7 +422,7 @@ svgalib_drv_vbar (Driver *drvthis, int x, int y, int len, int promille, int patt
{ {
int pos; int pos;
report (RPT_DEBUG, "%s(%p, %d, %d, %d, %d, %02x)", __FUNCTION__, drvthis, x, y, len, promille, pattern); debug (RPT_DEBUG, "%s(%p, %d, %d, %d, %d, %02x)", __FUNCTION__, drvthis, x, y, len, promille, pattern);
for (pos = 0; pos < len; pos++) { for (pos = 0; pos < len; pos++) {
if (2 * pos < ((long) promille * len / 500 + 1)) { if (2 * pos < ((long) promille * len / 500 + 1)) {
@@ -441,7 +441,7 @@ svgalib_drv_hbar (Driver *drvthis, int x, int y, int len, int promille, int patt
{ {
int pos; int pos;
report (RPT_DEBUG, "%s(%p, %d, %d, %d, %d, %02x)", __FUNCTION__, drvthis, x, y, len, promille, pattern); debug (RPT_DEBUG, "%s(%p, %d, %d, %d, %d, %02x)", __FUNCTION__, drvthis, x, y, len, promille, pattern);
for (pos = 0; pos < len; pos++) { for (pos = 0; pos < len; pos++) {
if (2 * pos < ((long) promille * len / 500 + 1)) { if (2 * pos < ((long) promille * len / 500 + 1)) {
@@ -461,7 +461,7 @@ svgalib_drv_get_key (Driver *drvthis)
static char buf[2] = " "; static char buf[2] = " ";
int key = vga_getkey (); int key = vga_getkey ();
report (RPT_DEBUG, "%s(%p)", __FUNCTION__, drvthis); debug (RPT_DEBUG, "%s(%p)", __FUNCTION__, drvthis);
if (key <= 0) /* no key */ if (key <= 0) /* no key */
return NULL; return NULL;