aboutsummaryrefslogtreecommitdiffstats
path: root/layout.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-06-26 09:27:21 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-06-26 09:27:21 +0000
commit1338a264d57ad5f74ce6f8283966020a8e978d2e (patch)
treeb14a2a596dd615ae17880b7007d6b2b78191af94 /layout.c
parent55abb63f11967a147d26e4654cbbd7ab3f01a558 (diff)
downloadlcd4linux-1338a264d57ad5f74ce6f8283966020a8e978d2e.tar.gz
[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
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c22
1 files changed, 14 insertions, 8 deletions
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);