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 --- widget.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'widget.c') diff --git a/widget.c b/widget.c index 79387b5..d2385a0 100644 --- a/widget.c +++ b/widget.c @@ -1,4 +1,4 @@ -/* $Id: widget.c,v 1.15 2004/06/20 10:09:56 reinelt Exp $ +/* $Id: widget.c,v 1.16 2004/06/26 09:27:21 reinelt Exp $ * * generic widget handling * @@ -21,6 +21,12 @@ * * * $Log: widget.c,v $ + * Revision 1.16 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.15 2004/06/20 10:09:56 reinelt * * 'const'ified the whole source @@ -107,7 +113,7 @@ #endif -// we use a static array of widgets and not realloc() +/* we use a static array of widgets and not realloc() */ #define MAX_WIDGETS 256 static WIDGET_CLASS *Classes=NULL; @@ -122,9 +128,9 @@ int widget_register (WIDGET_CLASS *widget) { int i; - // sanity check: disallow widget registering after at least one - // widget has been added, because we use realloc here, and there may - // be pointers to the old memory area + /* sanity check: disallow widget registering after at least one */ + /* widget has been added, because we use realloc here, and there may */ + /* be pointers to the old memory area */ if (widget_added) { error ("internal error: register_widget(%s) after add_widget()", widget->name); return -1; @@ -166,13 +172,13 @@ int widget_add (const char *name, const int row, const int col) WIDGET_CLASS *Class; WIDGET *Widget; - // prepare config section - // strlen("Widget:")=7 + /* prepare config section */ + /* strlen("Widget:")=7 */ section=malloc(strlen(name)+8); strcpy(section, "Widget:"); strcat(section, name); - // get widget class + /* get widget class */ class=cfg_get(section, "class", NULL); if (class==NULL || *class=='\0') { error ("error: widget '%s' has no class!", name); @@ -180,7 +186,7 @@ int widget_add (const char *name, const int row, const int col) return -1; } free(section); - // lookup widget class + /* lookup widget class */ Class=NULL; for (i=0; i=MAX_WIDGETS) { error ("internal error: widget buffer full!"); return -1; -- cgit v1.2.3