]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2006-09-07 09:06:25 by reinelt]
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Thu, 7 Sep 2006 09:06:25 +0000 (09:06 +0000)
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Thu, 7 Sep 2006 09:06:25 +0000 (09:06 +0000)
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

debug.h
drv_BeckmannEgle.c
drv_Crystalfontz.c
drv_Curses.c
drv_LEDMatrix.c
drv_M50530.c
drv_NULL.c
drv_USBHUB.c
drv_generic_i2c.c
plugin_i2c_sensors.c
widget_image.c

diff --git a/debug.h b/debug.h
index 0cfdd63e8a3da4ac45c21f00803d6ad2b0b117fb..77cdbcebcc2c9d2c3f5b8521a9681356b308d845 100644 (file)
--- a/debug.h
+++ b/debug.h
@@ -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)
index 5ce094e291559806464325226af4b58a93467f87..4e6c726b853f5a743f90e07800b1094ca62be796 100644 (file)
@@ -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) {
index bade58b19f29f58c5a0dafea147cccdc70c1182f..eda3e2ef746d270bd60c4ae03394686ea24db774 100644 (file)
@@ -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) {
index 12590aec46108840909b0b10e9d0bdb86d4efb52..2c470127480f2f37aeb2e90dfbc84edfa1ec7b86 100644 (file)
@@ -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  */
index 55234be452a417216bc0724fd5bf12af2aba7a00..5a0c76e1f094193493aa445dc78de10eb924a985 100644 (file)
@@ -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 */
index 8387b6b40b7b77de6aca243cbe3b8d8d9d00e659..e5daad04995e09cb4be297ef4ab46dfc60e39b26 100644 (file)
@@ -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  */
index 6e2c084fcd69b788c19a598da5dfbf071224aa4b..54be5852e71cf55af5c554af5ac06f78d26fe0bd 100644 (file)
@@ -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  */
index a98d50f7d6920d914edcaab65c3d5ff2d06cecc8..b324967ec317fa967a0038dc60102288284ba542 100644 (file)
@@ -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 $");
 
 
 
index b9ef1b6b19a29d58341c1fa89717cad8d6280756..6c1213abc8bd44adf3d26c4924f5eb42e482f871 100644 (file)
@@ -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);
     }
 }
 
index b3bbc2f9e00b73b72ccfebce427e2cd0c0afc81a..7dee1e9f17a3b9f913f4609ebf14a4b40295cbe3 100644 (file)
@@ -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;
     }
index b9d37e7489ad94fa4d526cdd51cb872a8a210f94..17d73deb5b0639e0472050aa47fdcac395d6ae17 100644 (file)
@@ -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++) {