diff options
Diffstat (limited to '')
-rw-r--r-- | drv_NULL.c | 94 |
1 files changed, 52 insertions, 42 deletions
@@ -1,4 +1,4 @@ -/* $Id: drv_NULL.c,v 1.4 2004/06/20 10:09:54 reinelt Exp $ +/* $Id: drv_NULL.c,v 1.5 2004/06/26 09:27:21 reinelt Exp $ * * NULL driver (for testing) * @@ -23,6 +23,12 @@ * * * $Log: drv_NULL.c,v $ + * Revision 1.5 2004/06/26 09:27:21 reinelt + * + * added '-W' to CFLAGS + * changed all C++ comments to C ones ('//' => '/* */') + * cleaned up a lot of signed/unsigned mistakes + * * Revision 1.4 2004/06/20 10:09:54 reinelt * * 'const'ified the whole source @@ -70,19 +76,23 @@ static char Name[] = "NULL"; -// **************************************** -// *** hardware dependant functions *** -// **************************************** +/****************************************/ +/*** hardware dependant functions ***/ +/****************************************/ -static void drv_NULL_write (const int row, const int col, const unsigned char *data, const int len) +static void drv_NULL_write (const __attribute__((unused)) int row, + const __attribute__((unused)) int col, + const __attribute__((unused)) char *data, + const __attribute__((unused)) int len) { - // empty + /* empty */ } -static void drv_NULL_defchar (const int ascii, const unsigned char *matrix) +static void drv_NULL_defchar (const __attribute__((unused)) int ascii, + const __attribute__((unused)) unsigned char *matrix) { - // empty + /* empty */ } @@ -107,27 +117,27 @@ static int drv_NULL_start (const char *section) } -// **************************************** -// *** plugins *** -// **************************************** +/****************************************/ +/*** plugins ***/ +/****************************************/ -// none at the moment... +/* none at the moment... */ -// **************************************** -// *** widget callbacks *** -// **************************************** +/****************************************/ +/*** widget callbacks ***/ +/****************************************/ -// using drv_generic_text_draw(W) -// using drv_generic_text_bar_draw(W) +/* using drv_generic_text_draw(W) */ +/* using drv_generic_text_bar_draw(W) */ -// **************************************** -// *** exported functions *** -// **************************************** +/****************************************/ +/*** exported functions ***/ +/****************************************/ -// list models +/* list models */ int drv_NULL_list (void) { printf ("generic"); @@ -135,58 +145,58 @@ int drv_NULL_list (void) } -// initialize driver & display -int drv_NULL_init (const char *section, const int quiet) +/* initialize driver & display */ +int drv_NULL_init (const char *section, const __attribute__((unused)) int quiet) { WIDGET_CLASS wc; int ret; - // display preferences - XRES = 6; // pixel width of one char - YRES = 8; // pixel height of one char - CHARS = 8; // number of user-defineable characters - CHAR0 = 0; // ASCII of first user-defineable char - GOTO_COST = 2; // number of bytes a goto command requires + /* display preferences */ + XRES = 6; /* pixel width of one char */ + YRES = 8; /* pixel height of one char */ + CHARS = 8; /* number of user-defineable characters */ + CHAR0 = 0; /* ASCII of first user-defineable char */ + GOTO_COST = 2; /* number of bytes a goto command requires */ - // real worker functions + /* real worker functions */ drv_generic_text_real_write = drv_NULL_write; drv_generic_text_real_defchar = drv_NULL_defchar; - // start display + /* start display */ if ((ret = drv_NULL_start (section)) != 0) return ret; - // initialize generic text driver + /* initialize generic text driver */ if ((ret = drv_generic_text_init(section, Name)) != 0) return ret; - // initialize generic bar driver + /* initialize generic bar driver */ if ((ret = drv_generic_text_bar_init(1)) != 0) return ret; - // add fixed chars to the bar driver - drv_generic_text_bar_add_segment ( 0, 0,255, 32); // ASCII 32 = blank - drv_generic_text_bar_add_segment (255,255,255,'*'); // asterisk + /* add fixed chars to the bar driver */ + drv_generic_text_bar_add_segment ( 0, 0,255, 32); /* ASCII 32 = blank */ + drv_generic_text_bar_add_segment (255,255,255,'*'); /* asterisk */ - // register text widget + /* register text widget */ wc = Widget_Text; wc.draw = drv_generic_text_draw; widget_register(&wc); - // register bar widget + /* register bar widget */ wc = Widget_Bar; wc.draw = drv_generic_text_bar_draw; widget_register(&wc); - // register plugins - // none at the moment... + /* register plugins */ + /* none at the moment... */ return 0; } -// close driver & display -int drv_NULL_quit (const int quiet) { +/* close driver & display */ +int drv_NULL_quit (const __attribute__((unused)) int quiet) { info("%s: shutting down.", Name); drv_generic_text_quit(); |