LCDproc development and user support list

Text archives Help


[Lcdproc] small driver patches to support older compilers and systems


Chronological Thread 
  • From: TELarson at west.com (Larson, Timothy E.)
  • Subject: [Lcdproc] small driver patches to support older compilers and systems
  • Date: Wed, 20 May 2009 14:14:59 -0500

Index: hd44780-serial.c
===================================================================
RCS file: /cvsroot/lcdproc/lcdproc/server/drivers/hd44780-serial.c,v
retrieving revision 1.19
diff -u -p -r1.19 hd44780-serial.c
--- hd44780-serial.c 21 Dec 2008 14:58:51 -0000 1.19
+++ hd44780-serial.c 20 May 2009 19:07:21 -0000
@@ -67,9 +67,13 @@ unsigned int bitrate_conversion[][2] = {
{ 4800, B4800 },
{ 9600, B9600 },
{ 19200, B19200 },
- { 38400, B38400 },
- { 57600, B57600 },
- { 115200, B115200 }
+ { 38400, B38400 }
+#if defined(B57600)
+ , { 57600, B57600 }
+#endif
+#if defined(B115200)
+ , { 115200, B115200 }
+#endif
#if defined(B230400)
, { 230400, B230400 }
#endif
@@ -143,6 +147,9 @@ hd_init_serial(Driver *drvthis)
struct termios portset;
char device[256] = DEFAULT_DEVICE;

+ unsigned int conf_bitrate;
+ size_t bitrate;
+
/* READ CONFIG FILE */

/* Get interface type */
@@ -173,9 +180,6 @@ hd_init_serial(Driver *drvthis)
}

/* Get bitrate */
- unsigned int conf_bitrate;
- size_t bitrate;
-
conf_bitrate = drvthis->config_get_int(drvthis->name, "Speed", 0,
SERIAL_IF.default_bitrate);
if (conf_bitrate == 0)
conf_bitrate = SERIAL_IF.default_bitrate;
Index: hd44780.c
===================================================================
RCS file: /cvsroot/lcdproc/lcdproc/server/drivers/hd44780.c,v
retrieving revision 1.90
diff -u -p -r1.90 hd44780.c
--- hd44780.c 26 Mar 2009 19:52:09 -0000 1.90
+++ hd44780.c 20 May 2009 19:07:21 -0000
@@ -73,6 +73,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
+#include <strings.h>
#include <errno.h>

#ifdef HAVE_CONFIG_H
@@ -149,6 +150,7 @@ HD44780_init(Driver *drvthis)
int if_type = IF_TYPE_UNKNOWN;
int tmp;
PrivateData *p;
+ char conf_charmap[MAX_CHARMAP_NAME_LENGTH];

// Alocate and store private data
p = (PrivateData *) calloc(1, sizeof(PrivateData));
@@ -346,8 +348,6 @@ HD44780_init(Driver *drvthis)
}

// Get configured charmap
- char conf_charmap[MAX_CHARMAP_NAME_LENGTH];
-
strncpy(conf_charmap, drvthis->config_get_string(drvthis->name,
"charmap", 0, "hd44780_default"), MAX_CHARMAP_NAME_LENGTH);
conf_charmap[MAX_CHARMAP_NAME_LENGTH-1] = '\0';
p->charmap = 0;
Index: imonlcd.c
===================================================================
RCS file: /cvsroot/lcdproc/lcdproc/server/drivers/imonlcd.c,v
retrieving revision 1.1
diff -u -p -r1.1 imonlcd.c
--- imonlcd.c 14 May 2009 21:45:52 -0000 1.1
+++ imonlcd.c 20 May 2009 19:07:22 -0000
@@ -39,7 +39,9 @@
#include <string.h>
#include <errno.h>
#include <time.h>
+#ifdef HAVE_STDINT_H
#include <stdint.h>
+#endif
#include <math.h>

#ifdef HAVE_CONFIG_H




Archive powered by MHonArc 2.6.18.

Top of page