aboutsummaryrefslogtreecommitdiffstats
path: root/PalmPilot.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-09 04:16:06 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-09 04:16:06 +0000
commit9dc6ff97fe8e9c911dfee409114fc5428adf858a (patch)
tree97337d07d0693302ca3031d256bff023a4d18f82 /PalmPilot.c
parent1cf54b00c151235704b41d192650a8e75c4ac905 (diff)
downloadlcd4linux-9dc6ff97fe8e9c911dfee409114fc5428adf858a.tar.gz
[lcd4linux @ 2004-01-09 04:16:06 by reinelt]
added 'section' argument to cfg_get(), but NULLed it on all calls by now. git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@298 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'PalmPilot.c')
-rw-r--r--PalmPilot.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/PalmPilot.c b/PalmPilot.c
index 61be489..b5360dc 100644
--- a/PalmPilot.c
+++ b/PalmPilot.c
@@ -1,4 +1,4 @@
-/* $Id: PalmPilot.c,v 1.14 2003/10/05 17:58:50 reinelt Exp $
+/* $Id: PalmPilot.c,v 1.15 2004/01/09 04:16:06 reinelt Exp $
*
* driver for 3Com Palm Pilot
*
@@ -22,6 +22,9 @@
*
*
* $Log: PalmPilot.c,v $
+ * Revision 1.15 2004/01/09 04:16:06 reinelt
+ * added 'section' argument to cfg_get(), but NULLed it on all calls by now.
+ *
* Revision 1.14 2003/10/05 17:58:50 reinelt
* libtool junk; copyright messages cleaned up
*
@@ -237,14 +240,14 @@ int Palm_init (LCD *Self)
Port=NULL;
}
- port=cfg_get ("Port",NULL);
+ port=cfg_get (NULL, "Port", NULL);
if (port==NULL || *port=='\0') {
error ("PalmPilot: no 'Port' entry in %s", cfg_source());
return -1;
}
Port=strdup(port);
- if (cfg_number("Speed", 19200, 1200,19200, &speed)<0) return -1;
+ if (cfg_number(NULL, "Speed", 19200, 1200,19200, &speed)<0) return -1;
switch (speed) {
case 1200:
@@ -269,36 +272,36 @@ int Palm_init (LCD *Self)
debug ("using port %s at %d baud", Port, speed);
- if (sscanf(s=cfg_get("size","20x4"), "%dx%d", &cols, &rows)!=2 || rows<1 || cols<1) {
+ if (sscanf(s=cfg_get(NULL, "size", "20x4"), "%dx%d", &cols, &rows)!=2 || rows<1 || cols<1) {
error ("PalmPilot: bad size '%s'", s);
return -1;
}
- if (sscanf(s=cfg_get("font","6x8"), "%dx%d", &xres, &yres)!=2 || xres<5 || yres<7) {
+ if (sscanf(s=cfg_get(NULL, "font", "6x8"), "%dx%d", &xres, &yres)!=2 || xres<5 || yres<7) {
error ("PalmPilot: bad font '%s'", s);
return -1;
}
- if (sscanf(s=cfg_get("pixel","1+0"), "%d+%d", &pixel, &pgap)!=2 || pixel<1 || pgap<0) {
+ if (sscanf(s=cfg_get(NULL, "pixel", "1+0"), "%d+%d", &pixel, &pgap)!=2 || pixel<1 || pgap<0) {
error ("PalmPilot: bad pixel '%s'", s);
return -1;
}
- if (sscanf(s=cfg_get("gap","0x0"), "%dx%d", &cgap, &rgap)!=2 || cgap<-1 || rgap<-1) {
+ if (sscanf(s=cfg_get(NULL, "gap", "0x0"), "%dx%d", &cgap, &rgap)!=2 || cgap<-1 || rgap<-1) {
error ("PalmPilot: bad gap '%s'", s);
return -1;
}
if (rgap<0) rgap=pixel+pgap;
if (cgap<0) cgap=pixel+pgap;
- if (cfg_number("border", 0, 0, 1000000, &border)<0) return -1;
+ if (cfg_number(NULL, "border", 0, 0, 1000000, &border)<0) return -1;
if (pix_init (rows, cols, xres, yres)!=0) {
error ("PalmPilot: pix_init(%d, %d, %d, %d) failed", rows, cols, xres, yres);
return -1;
}
- if (cfg_number("Icons", 0, 0, 8, &icons) < 0) return -1;
+ if (cfg_number(NULL, "Icons", 0, 0, 8, &icons) < 0) return -1;
if (icons>0) {
info ("allocating %d icons", icons);
icon_init(rows, cols, xres, yres, 8, icons, pix_icon);