aboutsummaryrefslogtreecommitdiffstats
path: root/drv_USBLCD.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-06-26 06:12:15 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-06-26 06:12:15 +0000
commit55abb63f11967a147d26e4654cbbd7ab3f01a558 (patch)
treee3b5726251a92e6fb346d63a945f5f2a2ebf89b9 /drv_USBLCD.c
parent19319129b58343f70382e6855a4c908bf669b146 (diff)
downloadlcd4linux-55abb63f11967a147d26e4654cbbd7ab3f01a558.tar.gz
[lcd4linux @ 2004-06-26 06:12:14 by reinelt]
support for Beckmann+Egle Compact Terminals some mostly cosmetic changes in the MatrixOrbital and USBLCD driver added debugging to the generic serial driver fixed a bug in the generic text driver where icons could be drawn outside the display bounds git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@479 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'drv_USBLCD.c')
-rw-r--r--drv_USBLCD.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/drv_USBLCD.c b/drv_USBLCD.c
index b625b53..90977d0 100644
--- a/drv_USBLCD.c
+++ b/drv_USBLCD.c
@@ -1,4 +1,4 @@
-/* $Id: drv_USBLCD.c,v 1.12 2004/06/20 10:09:54 reinelt Exp $
+/* $Id: drv_USBLCD.c,v 1.13 2004/06/26 06:12:15 reinelt Exp $
*
* new style driver for USBLCD displays
*
@@ -26,6 +26,14 @@
*
*
* $Log: drv_USBLCD.c,v $
+ * Revision 1.13 2004/06/26 06:12:15 reinelt
+ *
+ * support for Beckmann+Egle Compact Terminals
+ * some mostly cosmetic changes in the MatrixOrbital and USBLCD driver
+ * added debugging to the generic serial driver
+ * fixed a bug in the generic text driver where icons could be drawn outside
+ * the display bounds
+ *
* Revision 1.12 2004/06/20 10:09:54 reinelt
*
* 'const'ified the whole source
@@ -210,11 +218,12 @@ static int drv_UL_start (const char *section, const int quiet)
error ("%s: no '%s.Port' entry from %s", Name, section, cfg_source());
return -1;
}
- if (port[0]=='/') {
- Port=strdup(port);
+ if (port[0] == '/') {
+ Port = strdup(port);
} else {
- Port=malloc(5+strlen(port)+1);
- sprintf(Port,"/dev/%s",port);
+ int len = 5+strlen(port)+1;
+ Port = malloc(len);
+ qprintf(Port, len, "/dev/%s", port);
}
debug ("using device %s ", Port);
@@ -225,7 +234,8 @@ static int drv_UL_start (const char *section, const int quiet)
return -1;
}
if (sscanf(s,"%dx%d",&cols,&rows)!=2 || rows<1 || cols<1) {
- error ("%s: bad size '%s'", Name, s);
+ error ("%s: bad %s.Size '%s' from %s", Name, section, s, cfg_source());
+ free (s);
return -1;
}