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 --- layout.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'layout.c') diff --git a/layout.c b/layout.c index ef560dd..2c5595b 100644 --- a/layout.c +++ b/layout.c @@ -1,4 +1,4 @@ -/* $Id: layout.c,v 1.12 2004/06/20 10:09:56 reinelt Exp $ +/* $Id: layout.c,v 1.13 2004/06/26 09:27:21 reinelt Exp $ * * new layouter framework * @@ -23,6 +23,12 @@ * * * $Log: layout.c,v $ + * Revision 1.13 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.12 2004/06/20 10:09:56 reinelt * * 'const'ified the whole source @@ -102,7 +108,7 @@ int layout_addItem (const char *name, const int row, const int col) { - // allocate widget + /* allocate widget */ widget_add (name, row-1, col-1); return 0; } @@ -117,23 +123,23 @@ int layout_init (const char *layout) info ("initializing layout '%s'", layout); - // prepare config section - // strlen("Layout:")=7 + /* prepare config section */ + /* strlen("Layout:")=7 */ section=malloc(strlen(layout)+8); strcpy(section, "Layout:"); strcat(section, layout); - // get a list of all keys in this section + /* get a list of all keys in this section */ list=cfg_list(section); - // map to lower char for scanf() + /* map to lower char for scanf() */ for (l=list; *l!='\0'; l++) *l=tolower(*l); l=list; while (l!=NULL) { char *p; int i, n; - // list is delimited by | + /* list is delimited by | */ while (*l=='|') l++; if ((p=strchr(l, '|'))!=NULL) *p='\0'; i=sscanf (l, "row%d.col%d%n", &row, &col, &n); @@ -144,7 +150,7 @@ int layout_init (const char *layout) } free(widget); } - // next field + /* next field */ l=p?p+1:NULL; } free (list); -- cgit v1.2.3