Fix de-selecting of drivers in configure by removing non-portable switch to sed.

Silent some compiler and lint warnings.
This commit is contained in:
mmdolze
2009-11-01 08:32:50 +00:00
parent b197729ad8
commit 362aa05fd2
9 changed files with 23 additions and 10 deletions
+1
View File
@@ -10,6 +10,7 @@ v.0.5dev (ongoing development)
* Modify all drivers to use server/drivers/report.h instead of shared/report.h * Modify all drivers to use server/drivers/report.h instead of shared/report.h
* Make all drivers using parallel port fail if they cannot get IO permission * Make all drivers using parallel port fail if they cannot get IO permission
* Include <errno.h> instead of <sys/errno.h> everywhere (found by S. Klauer) * Include <errno.h> instead of <sys/errno.h> everywhere (found by S. Klauer)
* configure: Fix de-selecting of drivers
v0.5.3 v0.5.3
+ lcdexec: notification when called program finishes + lcdexec: notification when called program finishes
+1 -1
View File
@@ -35,7 +35,7 @@ for driver in $drivers ; do
case $driver in case $driver in
!*) !*)
driver=`echo "$driver" | sed -e 's/^.//'` driver=`echo "$driver" | sed -e 's/^.//'`
selectdrivers=[`echo " $selectdrivers " | sed -r -e "s/ $driver / /g"`] selectdrivers=[`echo " $selectdrivers " | sed -e "s/ $driver / /g"`]
;; ;;
*) *)
selectdrivers=["$selectdrivers $driver "] selectdrivers=["$selectdrivers $driver "]
+4
View File
@@ -174,6 +174,9 @@ int main(int argc, char **argv)
main_loop(); main_loop();
exit_program(EXIT_SUCCESS); exit_program(EXIT_SUCCESS);
/* NOTREACHED */
return EXIT_SUCCESS;
} }
@@ -262,6 +265,7 @@ static int process_command_line(int argc, char **argv)
case 'h': case 'h':
fprintf(stderr, "%s", help_text); fprintf(stderr, "%s", help_text);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
/* NOTREACHED */
case ':': case ':':
report(RPT_ERR, "Missing option argument for %c", optopt); report(RPT_ERR, "Missing option argument for %c", optopt);
error = -1; error = -1;
+3
View File
@@ -337,6 +337,9 @@ main(int argc, char **argv)
// Clean up & exit // Clean up & exit
exit_program(EXIT_SUCCESS); exit_program(EXIT_SUCCESS);
/* NOTREACHED */
return EXIT_SUCCESS;
} }
+4
View File
@@ -131,6 +131,9 @@ int main(int argc, char **argv)
main_loop(); main_loop();
exit_program(EXIT_SUCCESS); exit_program(EXIT_SUCCESS);
/* NOTREACHED */
return EXIT_SUCCESS;
} }
@@ -161,6 +164,7 @@ static int process_command_line(int argc, char **argv)
case 'h': case 'h':
fprintf(stderr, "%s", help_text); fprintf(stderr, "%s", help_text);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
/* NOTREACHED */
case 'c': case 'c':
configfile = strdup(optarg); configfile = strdup(optarg);
break; break;
+2 -2
View File
@@ -506,7 +506,7 @@ common_init(PrivateData *p, unsigned char if_bit)
* \param p Pointer to PrivateData structure. * \param p Pointer to PrivateData structure.
* \param usecs Number of micro-seconds to sleep. * \param usecs Number of micro-seconds to sleep.
*/ */
void static void
uPause(PrivateData *p, int usecs) uPause(PrivateData *p, int usecs)
{ {
timing_uPause(usecs * p->delayMult); timing_uPause(usecs * p->delayMult);
@@ -1393,7 +1393,7 @@ HD44780_output(Driver *drvthis, int on)
* \param spanlist '\0'-terminated input span list in comma delimited format. * \param spanlist '\0'-terminated input span list in comma delimited format.
* \return Number of span elements, -1 on parse error. * \return Number of span elements, -1 on parse error.
*/ */
int static int
parse_span_list(int *spanListArray[], int *spLsize, int *dispOffsets[], int *dOffsize, int *dispSizeArray[], const char *spanlist) parse_span_list(int *spanListArray[], int *spLsize, int *dispOffsets[], int *dOffsize, int *dispSizeArray[], const char *spanlist)
{ {
int j = 0, retVal = 0; int j = 0, retVal = 0;
+1 -1
View File
@@ -117,6 +117,7 @@ typedef struct imon_private_data {
MODULE_EXPORT int imon_init (Driver *drvthis) MODULE_EXPORT int imon_init (Driver *drvthis)
{ {
PrivateData *p = NULL; PrivateData *p = NULL;
char buf[256];
// Alocate, initialize and store private p // Alocate, initialize and store private p
p = (PrivateData *) calloc(1, sizeof(PrivateData)); p = (PrivateData *) calloc(1, sizeof(PrivateData));
@@ -130,7 +131,6 @@ MODULE_EXPORT int imon_init (Driver *drvthis)
return -1; return -1;
} }
char buf[256];
p->imon_fd = -1; p->imon_fd = -1;
p->width = 0; p->width = 0;
p->height = 0; p->height = 0;
+5 -4
View File
@@ -50,23 +50,24 @@
void void
serialVFD_write_serial (Driver *drvthis, unsigned char *dat, size_t length) serialVFD_write_serial (Driver *drvthis, unsigned char *dat, size_t length)
{ {
PrivateData *p = drvthis->private_data;
if (length <= 0) if (length <= 0)
return; return;
PrivateData *p = drvthis->private_data;
write(p->fd,dat,length); write(p->fd,dat,length);
} }
void void
serialVFD_write_parallel (Driver *drvthis, unsigned char *dat, size_t length) serialVFD_write_parallel (Driver *drvthis, unsigned char *dat, size_t length)
{ {
if (length <= 0)
return;
#ifdef HAVE_PCSTYLE_LPT_CONTROL #ifdef HAVE_PCSTYLE_LPT_CONTROL
PrivateData *p = drvthis->private_data; PrivateData *p = drvthis->private_data;
int i_para, j_para; int i_para, j_para;
if (length <= 0)
return;
for (i_para = 0; i_para < length; i_para++) { for (i_para = 0; i_para < length; i_para++) {
port_out(p->port, dat[i_para]); port_out(p->port, dat[i_para]);
+2 -2
View File
@@ -347,11 +347,11 @@ render_vbar(Widget *w, int left, int top, int right, int bottom)
static int static int
render_title(Widget *w, int left, int top, int right, int bottom, long timer) render_title(Widget *w, int left, int top, int right, int bottom, long timer)
{ {
int vis_width = right - left;
debug(RPT_DEBUG, "%s(w=%p, left=%d, top=%d, right=%d, bottom=%d, timer=%ld)", debug(RPT_DEBUG, "%s(w=%p, left=%d, top=%d, right=%d, bottom=%d, timer=%ld)",
__FUNCTION__, w, left, top, right, bottom, timer); __FUNCTION__, w, left, top, right, bottom, timer);
int vis_width = right - left;
if ((w != NULL) && (w->text != NULL) && (vis_width >= 8)) { if ((w != NULL) && (w->text != NULL) && (vis_width >= 8)) {
char str[BUFSIZE]; char str[BUFSIZE];
int length = strlen(w->text); int length = strlen(w->text);