diff options
author | reinelt <> | 2004-06-26 06:12:15 +0000 |
---|---|---|
committer | reinelt <> | 2004-06-26 06:12:15 +0000 |
commit | 3f9f909fa330cb2ff47b56c43d2a4c5e1dc0a8c0 (patch) | |
tree | e3b5726251a92e6fb346d63a945f5f2a2ebf89b9 /drv_USBLCD.c | |
parent | 8c92564c5979c79c34d37ca9b8f5f960550263f7 (diff) | |
download | lcd4linux-3f9f909fa330cb2ff47b56c43d2a4c5e1dc0a8c0.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
Diffstat (limited to 'drv_USBLCD.c')
-rw-r--r-- | drv_USBLCD.c | 22 |
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; } |