aboutsummaryrefslogtreecommitdiffstats
path: root/PalmPilot.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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);