mirror of
https://github.com/netfun2000/lcd4linux.git
synced 2026-02-27 09:44:34 +08:00
[lcd4linux @ 2006-09-07 09:06:25 by reinelt]
lots of wrong printf formats corrected (thanks to Ernst Bachmann) git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@708 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $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
|
||||
*
|
||||
@@ -23,6 +23,9 @@
|
||||
*
|
||||
*
|
||||
* $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
|
||||
*
|
||||
@@ -73,7 +76,7 @@ extern int running_foreground;
|
||||
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)
|
||||
|
||||
+6
-3
@@ -1,4 +1,4 @@
|
||||
/* $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>
|
||||
@@ -22,6 +22,9 @@
|
||||
*
|
||||
*
|
||||
* $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
|
||||
*
|
||||
@@ -502,7 +505,7 @@ static int drv_BuE_CT_start(const char *section)
|
||||
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);
|
||||
@@ -696,7 +699,7 @@ int drv_BuE_init(const char *section, const int quiet)
|
||||
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) {
|
||||
|
||||
+10
-7
@@ -1,4 +1,4 @@
|
||||
/* $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
|
||||
*
|
||||
@@ -23,6 +23,9 @@
|
||||
*
|
||||
*
|
||||
* $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.
|
||||
*
|
||||
@@ -367,7 +370,7 @@ static void drv_CF_process_packet(void)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -375,14 +378,14 @@ static void drv_CF_process_packet(void)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -502,7 +505,7 @@ static void drv_CF_send(const unsigned char cmd, const unsigned char len, const
|
||||
/* 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;
|
||||
@@ -1079,7 +1082,7 @@ static void plugin_backlight(RESULT * result, const int argc, RESULT * argv[])
|
||||
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, "");
|
||||
}
|
||||
}
|
||||
@@ -1123,7 +1126,7 @@ int drv_CF_init(const char *section, const int quiet)
|
||||
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) {
|
||||
|
||||
+6
-3
@@ -1,4 +1,4 @@
|
||||
/* $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
|
||||
*
|
||||
@@ -26,6 +26,9 @@
|
||||
*
|
||||
*
|
||||
* $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.
|
||||
*
|
||||
@@ -217,7 +220,7 @@ static int drv_Curs_start(const char *section, const int quiet)
|
||||
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;
|
||||
}
|
||||
@@ -338,7 +341,7 @@ int drv_Curs_init(const char *section, const int quiet)
|
||||
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 */
|
||||
|
||||
+5
-2
@@ -1,4 +1,4 @@
|
||||
/* $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)
|
||||
@@ -23,6 +23,9 @@
|
||||
*
|
||||
*
|
||||
* $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
|
||||
*
|
||||
@@ -206,7 +209,7 @@ static int drv_LEDMatrix_start(const char *section)
|
||||
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 */
|
||||
|
||||
+6
-4
@@ -1,4 +1,4 @@
|
||||
/* $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
|
||||
*
|
||||
@@ -23,6 +23,9 @@
|
||||
*
|
||||
*
|
||||
* $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
|
||||
*
|
||||
@@ -448,8 +451,7 @@ static int drv_M5_start(const char *section, const int quiet)
|
||||
|
||||
|
||||
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;
|
||||
@@ -691,7 +693,7 @@ int drv_M5_init(const char *section, const int quiet)
|
||||
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 */
|
||||
|
||||
+6
-3
@@ -1,4 +1,4 @@
|
||||
/* $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)
|
||||
*
|
||||
@@ -23,6 +23,9 @@
|
||||
*
|
||||
*
|
||||
* $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
|
||||
*
|
||||
@@ -122,7 +125,7 @@ static int drv_NULL_start(const char *section)
|
||||
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;
|
||||
}
|
||||
@@ -167,7 +170,7 @@ int drv_NULL_init(const char *section, const __attribute__ ((unused))
|
||||
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 */
|
||||
|
||||
+10
-7
@@ -1,4 +1,4 @@
|
||||
/* $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
|
||||
*
|
||||
@@ -25,6 +25,9 @@
|
||||
*
|
||||
*
|
||||
* $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
|
||||
*
|
||||
@@ -122,7 +125,7 @@ static int drv_UH_open(void)
|
||||
(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;
|
||||
}
|
||||
|
||||
@@ -197,11 +200,11 @@ static int drv_UH_start(const char *section, const __attribute__ ((unused))
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -209,11 +212,11 @@ static int drv_UH_start(const char *section, const __attribute__ ((unused))
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -282,7 +285,7 @@ int drv_UH_init(const char *section, const int quiet)
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
info("%s: %s", Name, "$Revision: 1.4 $");
|
||||
info("%s: %s", Name, "$Revision: 1.5 $");
|
||||
|
||||
|
||||
|
||||
|
||||
+5
-2
@@ -1,4 +1,4 @@
|
||||
/* $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
|
||||
*
|
||||
@@ -23,6 +23,9 @@
|
||||
*
|
||||
*
|
||||
* $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
|
||||
*
|
||||
@@ -105,7 +108,7 @@ static void my_i2c_smbus_write_byte_data(const int device, const unsigned char v
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $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
|
||||
*
|
||||
@@ -23,6 +23,9 @@
|
||||
*
|
||||
*
|
||||
* $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
|
||||
*
|
||||
@@ -414,7 +417,7 @@ static int configure_i2c_sensors(void)
|
||||
} 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;
|
||||
}
|
||||
|
||||
+5
-2
@@ -1,4 +1,4 @@
|
||||
/* $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
|
||||
*
|
||||
@@ -21,6 +21,9 @@
|
||||
*
|
||||
*
|
||||
* $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)
|
||||
*
|
||||
@@ -148,7 +151,7 @@ static void widget_image_render(const char *Name, WIDGET_IMAGE * Image)
|
||||
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++) {
|
||||
|
||||
Reference in New Issue
Block a user