From 1338a264d57ad5f74ce6f8283966020a8e978d2e Mon Sep 17 00:00:00 2001 From: reinelt Date: Sat, 26 Jun 2004 09:27:21 +0000 Subject: [lcd4linux @ 2004-06-26 09:27:20 by reinelt] added '-W' to CFLAGS changed all C++ comments to C ones ('//' => '/* */') cleaned up a lot of signed/unsigned mistakes git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@480 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- drv_NULL.c | 94 ++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 52 insertions(+), 42 deletions(-) (limited to 'drv_NULL.c') diff --git a/drv_NULL.c b/drv_NULL.c index 1527c65..2259707 100644 --- a/drv_NULL.c +++ b/drv_NULL.c @@ -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(); -- cgit v1.2.3