-/* $Id: debug.h,v 1.10 2005/05/08 04:32:43 reinelt Exp $
+/* $Id: debug.h,v 1.11 2006/09/07 09:06:25 reinelt Exp $
*
* debug messages
*
*
*
* $Log: debug.h,v $
+ * Revision 1.11 2006/09/07 09:06:25 reinelt
+ * lots of wrong printf formats corrected (thanks to Ernst Bachmann)
+ *
* Revision 1.10 2005/05/08 04:32:43 reinelt
* CodingStyle added and applied
*
extern int running_background;
extern int verbose_level;
-void message(const int level, const char *format, ...);
+void message(const int level, const char *format, ...) __attribute__ ((format(__printf__, 2, 3)));;
#define debug(args...) message (2, __FILE__ ": " args)
#define info(args...) message (1, args)
-/* $Id: drv_BeckmannEgle.c,v 1.16 2006/01/30 06:25:49 reinelt Exp $
+/* $Id: drv_BeckmannEgle.c,v 1.17 2006/09/07 09:06:25 reinelt Exp $
*
* driver for Beckmann+Egle "Mini Terminals" and "Compact Terminals"
* Copyright (C) 2000 Michael Reinelt <reinelt@eunet.at>
*
*
* $Log: drv_BeckmannEgle.c,v $
+ * Revision 1.17 2006/09/07 09:06:25 reinelt
+ * lots of wrong printf formats corrected (thanks to Ernst Bachmann)
+ *
* Revision 1.16 2006/01/30 06:25:49 reinelt
* added CVS Revision
*
if (type != NULL) {
info("%s: Port %d: %s", Name, i, type);
} else {
- error("%s: internal error: port % unknown type %d", Name, i, cmd[3]);
+ error("%s: internal error: port %d unknown type %d", Name, i, cmd[3]);
}
} else {
error("%s: error fetching type of port %d", Name, i);
WIDGET_CLASS wc;
int ret;
- info("%s: %s", Name, "$Revision: 1.16 $");
+ info("%s: %s", Name, "$Revision: 1.17 $");
/* start display */
if ((ret = drv_BuE_start(section)) != 0) {
-/* $Id: drv_Crystalfontz.c,v 1.45 2006/07/19 01:48:11 cmay Exp $
+/* $Id: drv_Crystalfontz.c,v 1.46 2006/09/07 09:06:25 reinelt Exp $
*
* new style driver for Crystalfontz display modules
*
*
*
* $Log: drv_Crystalfontz.c,v $
+ * Revision 1.46 2006/09/07 09:06:25 reinelt
+ * lots of wrong printf formats corrected (thanks to Ernst Bachmann)
+ *
* Revision 1.45 2006/07/19 01:48:11 cmay
* Ran indent.sh to make pretty code.
*
default:
/* this should not happen */
- error("%s: unexpected response type=0x%02x code=0x%02x size=%d", Packet.type, Packet.code, Packet.size);
+ error("%s: unexpected response type=0x%02x code=0x%02x size=%d", Name, Packet.type, Packet.code, Packet.size);
break;
}
case 0x03:
/* error response from display to host */
- error("%s: error response type=0x%02x code=0x%02x size=%d", Packet.type, Packet.code, Packet.size);
+ error("%s: error response type=0x%02x code=0x%02x size=%d", Name, Packet.type, Packet.code, Packet.size);
break;
default:
/* these should not happen: */
/* type 0x00: command from host to display: should never come back */
/* type 0x01: command response from display to host: are processed within send() */
- error("%s: unexpected packet type=0x%02x code=0x%02x size=%d", Packet.type, Packet.code, Packet.size);
+ error("%s: unexpected packet type=0x%02x code=0x%02x size=%d", Name, Packet.type, Packet.code, Packet.size);
break;
}
/* this is the ack we're waiting for */
if (0) {
gettimeofday(&end, NULL);
- debug("%s: ACK after %d usec", Name,
+ debug("%s: ACK after %ld usec", Name,
1000000 * (end.tv_sec - now.tv_sec) + end.tv_usec - now.tv_usec);
}
break;
SetResult(&result, R_NUMBER, &backlight);
break;
default:
- error("%s.backlight(): wrong number of parameters");
+ error("%s.backlight(): wrong number of parameters", Name);
SetResult(&result, R_STRING, "");
}
}
WIDGET_CLASS wc;
int ret;
- info("%s: %s", Name, "$Revision: 1.45 $");
+ info("%s: %s", Name, "$Revision: 1.46 $");
/* start display */
if ((ret = drv_CF_start(section)) != 0) {
-/* $Id: drv_Curses.c,v 1.13 2006/07/19 01:48:11 cmay Exp $
+/* $Id: drv_Curses.c,v 1.14 2006/09/07 09:06:25 reinelt Exp $
*
* pure ncurses based text driver
*
*
*
* $Log: drv_Curses.c,v $
+ * Revision 1.14 2006/09/07 09:06:25 reinelt
+ * lots of wrong printf formats corrected (thanks to Ernst Bachmann)
+ *
* Revision 1.13 2006/07/19 01:48:11 cmay
* Ran indent.sh to make pretty code.
*
return -1;
}
if (sscanf(s, "%dx%d", &DCOLS, &DROWS) != 2 || DROWS < 1 || DCOLS < 1) {
- error("%s: bad %s.Size '%s' from %s", Name, section, s, cfg_source);
+ error("%s: bad %s.Size '%s' from %s", Name, section, s, cfg_source());
free(s);
return -1;
}
WIDGET_CLASS wc;
int ret;
- info("%s: %s", Name, "$Revision: 1.13 $");
+ info("%s: %s", Name, "$Revision: 1.14 $");
/* display preferences */
XRES = 1; /* pixel width of one char */
-/* $Id: drv_LEDMatrix.c,v 1.9 2006/08/14 19:24:22 harbaum Exp $
+/* $Id: drv_LEDMatrix.c,v 1.10 2006/09/07 09:06:25 reinelt Exp $
*
* LED matrix driver for LCD4Linux
* (see http://www.harbaum.org/till/ledmatrix for hardware)
*
*
* $Log: drv_LEDMatrix.c,v $
+ * Revision 1.10 2006/09/07 09:06:25 reinelt
+ * lots of wrong printf formats corrected (thanks to Ernst Bachmann)
+ *
* Revision 1.9 2006/08/14 19:24:22 harbaum
* Umlaut support, added KVV HTTP-User-Agent
*
info("%s: port set to %d", Name, val);
port = val;
} else {
- info("%s: using default port", Name, port);
+ info("%s: using default port %d", Name, port);
}
/* display size is hard coded */
-/* $Id: drv_M50530.c,v 1.24 2006/08/13 06:46:51 reinelt Exp $
+/* $Id: drv_M50530.c,v 1.25 2006/09/07 09:06:25 reinelt Exp $
*
* new style driver for M50530-based displays
*
*
*
* $Log: drv_M50530.c,v $
+ * Revision 1.25 2006/09/07 09:06:25 reinelt
+ * lots of wrong printf formats corrected (thanks to Ernst Bachmann)
+ *
* Revision 1.24 2006/08/13 06:46:51 reinelt
* T6963 soft-timing & enhancements; indent
*
if (DCOLS * DROWS > 256) {
- error("%s: %s.Size '%dx%d' is too big, would require %d bytes", Name, section, DCOLS, DROWS, DCOLS * DROWS,
- cfg_source());
+ error("%s: %s.Size '%dx%d' is too big, would require %d bytes", Name, section, DCOLS, DROWS, DCOLS * DROWS);
return -1;
} else if (DCOLS * DROWS > 224) {
DDRAM = 256;
WIDGET_CLASS wc;
int ret;
- info("%s: %s", Name, "$Revision: 1.24 $");
+ info("%s: %s", Name, "$Revision: 1.25 $");
/* display preferences */
XRES = -1; /* pixel width of one char */
-/* $Id: drv_NULL.c,v 1.9 2006/01/30 06:25:53 reinelt Exp $
+/* $Id: drv_NULL.c,v 1.10 2006/09/07 09:06:25 reinelt Exp $
*
* NULL driver (for testing)
*
*
*
* $Log: drv_NULL.c,v $
+ * Revision 1.10 2006/09/07 09:06:25 reinelt
+ * lots of wrong printf formats corrected (thanks to Ernst Bachmann)
+ *
* Revision 1.9 2006/01/30 06:25:53 reinelt
* added CVS Revision
*
return -1;
}
if (sscanf(s, "%dx%d", &DCOLS, &DROWS) != 2 || DROWS < 1 || DCOLS < 1) {
- error("%s: bad %s.Size '%s' from %s", Name, section, s, cfg_source);
+ error("%s: bad %s.Size '%s' from %s", Name, section, s, cfg_source());
free(s);
return -1;
}
WIDGET_CLASS wc;
int ret;
- info("%s: %s", Name, "$Revision: 1.9 $");
+ info("%s: %s", Name, "$Revision: 1.10 $");
/* display preferences */
XRES = 6; /* pixel width of one char */
-/* $Id: drv_USBHUB.c,v 1.4 2006/08/14 19:24:22 harbaum Exp $
+/* $Id: drv_USBHUB.c,v 1.5 2006/09/07 09:06:25 reinelt Exp $
*
* new style driver for USBLCD displays
*
*
*
* $Log: drv_USBHUB.c,v $
+ * Revision 1.5 2006/09/07 09:06:25 reinelt
+ * lots of wrong printf formats corrected (thanks to Ernst Bachmann)
+ *
* Revision 1.4 2006/08/14 19:24:22 harbaum
* Umlaut support, added KVV HTTP-User-Agent
*
(v & 0xF000) >> 12, (v & 0xF00) >> 8, (v & 0xF0) >> 4, (v & 0xF), bus->dirname, dev->filename);
if (dev->descriptor.bDeviceClass != USB_CLASS_HUB) {
- error("%s: the specified device claims to be no HUB");
+ error("%s: the specified device claims to be no HUB", Name);
return -1;
}
buf = cfg_get(section, "Vendor", NULL);
if (buf) {
if (!*buf) {
- error("%s: Strange Vendor Specification");
+ error("%s: Strange Vendor Specification", Name);
return -1;
}
if (sscanf(buf, "0x%x", &hubVendor) != 1) {
- error("%s: Strange Vendor Specification: [%s]", buf);
+ error("%s: Strange Vendor Specification: [%s]", Name, buf);
return -1;
}
}
buf = cfg_get(section, "Product", NULL);
if (buf) {
if (!*buf) {
- error("%s: Strange Product Specification");
+ error("%s: Strange Product Specification", Name);
return -1;
}
if (sscanf(buf, "0x%x", &hubProduct) != 1) {
- error("%s: Strange Product Specification: [%s]", buf);
+ error("%s: Strange Product Specification: [%s]", Name, buf);
return -1;
}
}
int ret;
int i;
- info("%s: %s", Name, "$Revision: 1.4 $");
+ info("%s: %s", Name, "$Revision: 1.5 $");
-/* $Id: drv_generic_i2c.c,v 1.8 2006/07/31 03:48:09 reinelt Exp $
+/* $Id: drv_generic_i2c.c,v 1.9 2006/09/07 09:06:25 reinelt Exp $
*
* generic driver helper for i2c displays
*
*
*
* $Log: drv_generic_i2c.c,v $
+ * Revision 1.9 2006/09/07 09:06:25 reinelt
+ * lots of wrong printf formats corrected (thanks to Ernst Bachmann)
+ *
* Revision 1.8 2006/07/31 03:48:09 reinelt
* preparations for scrolling
*
data.byte = val;
args.data = &data;
if (ioctl(device, I2C_SMBUS, &args) < 0) {
- info("I2C: device %s IOCTL failed !\n", device);
+ info("I2C: device %d IOCTL failed !\n", device);
}
}
-/* $Id: plugin_i2c_sensors.c,v 1.25 2006/02/25 13:36:33 geronet Exp $
+/* $Id: plugin_i2c_sensors.c,v 1.26 2006/09/07 09:06:25 reinelt Exp $
*
* I2C sensors plugin
*
*
*
* $Log: plugin_i2c_sensors.c,v $
+ * Revision 1.26 2006/09/07 09:06:25 reinelt
+ * lots of wrong printf formats corrected (thanks to Ernst Bachmann)
+ *
* Revision 1.25 2006/02/25 13:36:33 geronet
* updated indent.sh, applied coding style
*
} else if (strncmp(path, "/proc", 5) == 0) {
parse_i2c_sensors = parse_i2c_sensors_procfs;
} else {
- error("i2c_sensors: unknown path %s, should start with /sys or /proc");
+ error("i2c_sensors: unknown path %s, should start with /sys or /proc", path);
configured = -1;
return configured;
}
-/* $Id: widget_image.c,v 1.9 2006/06/21 05:12:43 reinelt Exp $
+/* $Id: widget_image.c,v 1.10 2006/09/07 09:06:25 reinelt Exp $
*
* image widget handling
*
*
*
* $Log: widget_image.c,v $
+ * Revision 1.10 2006/09/07 09:06:25 reinelt
+ * lots of wrong printf formats corrected (thanks to Ernst Bachmann)
+ *
* Revision 1.9 2006/06/21 05:12:43 reinelt
* added checks for libgd version 2 (thanks to Sam)
*
int i = Image->width * Image->height * sizeof(Image->bitmap[0]);
Image->bitmap = malloc(i);
if (Image->bitmap == NULL) {
- error("Warning: Image %s: malloc(%d) failed!", Name, i, strerror(errno));
+ error("Warning: Image %s: malloc(%d) failed: %s", Name, i, strerror(errno));
return;
}
for (i = 0; i < Image->height * Image->width; i++) {