aboutsummaryrefslogtreecommitdiffstats
path: root/Cwlinux.c
diff options
context:
space:
mode:
authorreinelt <>2003-02-22 07:53:10 +0000
committerreinelt <>2003-02-22 07:53:10 +0000
commit90be5ac59fddad620f66ebc9dc813802cd45a7e3 (patch)
tree9a0596fed56b4985e15b7d677c43c0bda80fbabb /Cwlinux.c
parentdb2a64cd4d6e46a6563181f38da2a0a01f56a559 (diff)
downloadlcd4linux-90be5ac59fddad620f66ebc9dc813802cd45a7e3.tar.gz
[lcd4linux @ 2003-02-22 07:53:09 by reinelt]
cfg_get(key,defval)
Diffstat (limited to 'Cwlinux.c')
-rw-r--r--Cwlinux.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Cwlinux.c b/Cwlinux.c
index 6cbb51a..4302b99 100644
--- a/Cwlinux.c
+++ b/Cwlinux.c
@@ -1,4 +1,4 @@
-/* $Id: Cwlinux.c,v 1.4 2003/02/22 07:23:24 reinelt Exp $
+/* $Id: Cwlinux.c,v 1.5 2003/02/22 07:53:09 reinelt Exp $
*
* driver for Cwlinux serial display modules
*
@@ -20,6 +20,9 @@
*
*
* $Log: Cwlinux.c,v $
+ * Revision 1.5 2003/02/22 07:53:09 reinelt
+ * cfg_get(key,defval)
+ *
* Revision 1.4 2003/02/22 07:23:24 reinelt
* Cwlinux fixes
*
@@ -206,14 +209,14 @@ int CW_init(LCD * Self)
Port = NULL;
}
- port = cfg_get("Port");
+ port = cfg_get("Port",NULL);
if (port == NULL || *port == '\0') {
error("Cwlinux: no 'Port' entry in %s", cfg_file());
return -1;
}
Port = strdup(port);
- speed = cfg_get("Speed") ? : "19200";
+ speed = cfg_get("Speed","19200");
switch (atoi(speed)) {
case 9600: