From 77209a6f3ff9f134c645dfb4ae9f21a002cca4b1 Mon Sep 17 00:00:00 2001 From: marschap Date: Sun, 17 Jun 2007 10:39:49 +0000 Subject: [PATCH] harmonize report & debug() messages: no '\n' or '.' at end --- clients/lcdproc/iface.c | 4 +-- clients/lcdproc/main.c | 8 +++--- server/drivers/EyeboxOne.c | 12 ++++---- server/drivers/bayrad.c | 10 +++---- server/drivers/ea65.c | 10 ++++--- server/drivers/imon.c | 2 +- server/drivers/lircin.c | 12 ++++---- server/drivers/picolcd.c | 52 +++++++++++++++++------------------ server/drivers/pylcd.c | 4 +-- server/drivers/serialVFD.c | 22 +++++++-------- server/drivers/serialVFD_io.c | 8 +++--- server/drivers/svgalib_drv.c | 2 +- server/drivers/t6963.c | 2 +- shared/str.c | 4 +-- 14 files changed, 77 insertions(+), 75 deletions(-) diff --git a/clients/lcdproc/iface.c b/clients/lcdproc/iface.c index e8f9472..ea10ad9 100644 --- a/clients/lcdproc/iface.c +++ b/clients/lcdproc/iface.c @@ -61,7 +61,7 @@ iface_process_configfile(void) char iface_label[12]; sprintf(iface_label, "Interface%i", iface_count); - debug(RPT_DEBUG, "Label %s count %i\n", iface_label, iface_count); + debug(RPT_DEBUG, "Label %s count %i", iface_label, iface_count); iface[iface_count].name = strdup(config_get_string("Iface", iface_label, 0, "")); if (iface[iface_count].name == NULL) { report(RPT_CRIT, "malloc failure"); @@ -74,7 +74,7 @@ iface_process_configfile(void) if (iface[iface_count].alias == NULL) // make alia the same as the interface name in case strdup() failed iface[iface_count].alias = iface[iface_count].name; - debug(RPT_DEBUG, "Interface %i: %s alias %s\n", + debug(RPT_DEBUG, "Interface %i: %s alias %s", iface_count, iface[iface_count].name, iface[iface_count].alias); } diff --git a/clients/lcdproc/main.c b/clients/lcdproc/main.c index e8e55c9..d7e2937 100644 --- a/clients/lcdproc/main.c +++ b/clients/lcdproc/main.c @@ -269,7 +269,7 @@ main(int argc, char **argv) int state = (*argv[i] == '!') ? 0 : 1; char *name = (state) ? argv[i] : argv[i]+1; int shortname = (strlen(name) == 1) ? name[0] : '\0'; - // debug: fprintf(stderr, "%s%s\n", (state) ? "" : "!", name); + // debug: fprintf(stderr, "%s%s", (state) ? "" : "!", name); int found = set_mode(shortname, name, state); if (!found) { @@ -554,7 +554,7 @@ main_loop(void) for (j = 0; sequence[j].which; j++) { if (sequence[j].which == argv[1][0]) { sequence[j].flags |= VISIBLE; - //debug(RPT_DEBUG, "Listen %s\n", argv[1]); + //debug(RPT_DEBUG, "Listen %s", argv[1]); } } } @@ -562,12 +562,12 @@ main_loop(void) for (j = 0; sequence[j].which; j++) { if (sequence[j].which == argv[1][0]) { sequence[j].flags &= ~VISIBLE; - //debug(RPT_DEBUG, "Ignore %s\n", argv[1]); + //debug(RPT_DEBUG, "Ignore %s", argv[1]); } } } else if (0 == strcmp(argv[0], "key")) { - debug(RPT_DEBUG, "Key %s\n", argv[1]); + debug(RPT_DEBUG, "Key %s", argv[1]); } #ifdef LCDPROC_MENUS else if (0 == strcmp(argv[0], "menuevent")) { diff --git a/server/drivers/EyeboxOne.c b/server/drivers/EyeboxOne.c index 64de7e4..3dcb6ed 100644 --- a/server/drivers/EyeboxOne.c +++ b/server/drivers/EyeboxOne.c @@ -230,27 +230,27 @@ EyeboxOne_init (Driver *drvthis) /* left_key */ p->left_key = EyeboxOne_parse_keypad_setting(drvthis, "LeftKey", EYEBOXONE_DEFAULT_Left); - report(RPT_DEBUG, "%s: Using \"%c\" as Leftkey.", drvthis->name, p->left_key); + report(RPT_DEBUG, "%s: Using \"%c\" as Leftkey", drvthis->name, p->left_key); /* right_key */ p->right_key = EyeboxOne_parse_keypad_setting(drvthis, "RightKey", EYEBOXONE_DEFAULT_Right); - report(RPT_DEBUG, "%s: Using \"%c\" as RightKey.", drvthis->name, p->right_key); + report(RPT_DEBUG, "%s: Using \"%c\" as RightKey", drvthis->name, p->right_key); /* up_key */ p->up_key = EyeboxOne_parse_keypad_setting(drvthis, "UpKey", EYEBOXONE_DEFAULT_Up); - report(RPT_DEBUG, "%s: Using \"%c\" as UpKey.", drvthis->name, p->up_key); + report(RPT_DEBUG, "%s: Using \"%c\" as UpKey", drvthis->name, p->up_key); /* down_key */ p->down_key = EyeboxOne_parse_keypad_setting(drvthis, "DownKey", EYEBOXONE_DEFAULT_Down); - report(RPT_DEBUG, "%s: Using \"%c\" as DownKey.", drvthis->name, p->down_key); + report(RPT_DEBUG, "%s: Using \"%c\" as DownKey", drvthis->name, p->down_key); /* right_key */ p->enter_key = EyeboxOne_parse_keypad_setting(drvthis, "EnterKey", EYEBOXONE_DEFAULT_Enter); - report(RPT_DEBUG, "%s: Using \"%c\" as EnterKey.", drvthis->name, p->enter_key); + report(RPT_DEBUG, "%s: Using \"%c\" as EnterKey", drvthis->name, p->enter_key); /* escape_key */ p->escape_key = EyeboxOne_parse_keypad_setting(drvthis, "EscapeKey", EYEBOXONE_DEFAULT_Escape); - report(RPT_DEBUG, "%s: Using \"%c\" as EscapeKey.", drvthis->name, p->escape_key); + report(RPT_DEBUG, "%s: Using \"%c\" as EscapeKey", drvthis->name, p->escape_key); } /* End of config file parsing*/ diff --git a/server/drivers/bayrad.c b/server/drivers/bayrad.c index 906e3a6..92988cc 100644 --- a/server/drivers/bayrad.c +++ b/server/drivers/bayrad.c @@ -434,7 +434,7 @@ bayrad_init_vbar(Driver *drvthis) } }; - //debug(RPT_DEBUG,"Init Vertical bars."); + //debug(RPT_DEBUG,"Init Vertical bars"); if (p->ccmode == CCMODE_VBAR) { /* Work already done */ @@ -514,7 +514,7 @@ bayrad_init_hbar(Driver *drvthis) } }; - //debug(RPT_DEBUG,"Init Horizontal bars."); + //debug(RPT_DEBUG,"Init Horizontal bars"); if (p->ccmode == CCMODE_HBAR) { /* Work already done */ @@ -544,7 +544,7 @@ bayrad_init_num(Driver *drvthis) { //PrivateData *p = drvthis->private_data; -// debug(RPT_DEBUG,"Big Numbers."); +// debug(RPT_DEBUG,"Big Numbers"); } ////////////////////////////////////////////////////////////////////// @@ -729,11 +729,11 @@ bayrad_get_key(Driver *drvthis) } /* if read returned data */ else { /* Read error */ - report(RPT_ERR, "%s: Read error in BayRAD getchar.", drvthis->name); + report(RPT_ERR, "%s: Read error in BayRAD getchar", drvthis->name); } } /* if select */ else { - ;//debug(RPT_DEBUG, "No BayRAD data present."); + ;//debug(RPT_DEBUG, "No BayRAD data present"); } ret_val[0] = readchar; diff --git a/server/drivers/ea65.c b/server/drivers/ea65.c index afea52a..196c177 100644 --- a/server/drivers/ea65.c +++ b/server/drivers/ea65.c @@ -96,7 +96,8 @@ EA65_init (Driver *drvthis) p->brightness = 0x02; // command char that turns button LEDs on half } } else { - report (RPT_WARNING, "EA65_init: Brightness must be between 0 and 1000. Using default value.\n"); + report (RPT_WARNING, "%s: Brightness must be between 0 and 1000. Using default %d", + drvthis->name, DEFAULT_BRIGHTNESS); p->brightness = DEFAULT_BRIGHTNESS; } @@ -111,7 +112,8 @@ EA65_init (Driver *drvthis) p->offbrightness = 0x02; // command char that turns button LEDs on half } } else { - report (RPT_WARNING, "EA65_init: OffBrightness must be between 0 and 1000. Using default value.\n"); + report (RPT_WARNING, "%s: OffBrightness must be between 0 and 1000. Using default %d", + drvthis->name, DEFAULT_OFFBRIGHTNESS); p->offbrightness = DEFAULT_OFFBRIGHTNESS; } @@ -120,7 +122,7 @@ EA65_init (Driver *drvthis) struct termios portset; p->fd = open (device, O_RDWR | O_NOCTTY | O_NDELAY); if (p->fd == -1) { - report (RPT_ERR, "EA65_init: failed (%s)\n", strerror (errno)); + report (RPT_ERR, "EA65_init: failed (%s)", strerror (errno)); return -1; } tcgetattr (p->fd, &portset); @@ -145,7 +147,7 @@ EA65_init (Driver *drvthis) // Do it... tcsetattr (p->fd, TCSANOW, &portset); - report (RPT_DEBUG, "EA65_init: done\n"); + report (RPT_DEBUG, "EA65_init: done"); return 0; } diff --git a/server/drivers/imon.c b/server/drivers/imon.c index 64189dc..cf8615e 100644 --- a/server/drivers/imon.c +++ b/server/drivers/imon.c @@ -146,7 +146,7 @@ MODULE_EXPORT int imon_init (Driver *drvthis) /* Open device for writing */ if ((p->imon_fd = open(buf, O_WRONLY)) < 0) { - report(RPT_ERR, "%s: ERROR opening %s (%s).", drvthis->name, buf, strerror(errno)); + report(RPT_ERR, "%s: ERROR opening %s (%s)", drvthis->name, buf, strerror(errno)); report(RPT_ERR, "%s: Did you load the iMON VFD kernel module?", drvthis->name); report(RPT_ERR, "%s: More info in lcdproc/docs/README.imon", drvthis->name); return -1; diff --git a/server/drivers/lircin.c b/server/drivers/lircin.c index 15c7fcf..66b44de 100644 --- a/server/drivers/lircin.c +++ b/server/drivers/lircin.c @@ -72,11 +72,11 @@ lircin_init (Driver *drvthis) /* Alocate and store private data */ p = (PrivateData *) malloc(sizeof(PrivateData)); if (p == NULL) { - report(RPT_ERR, "%s: Could not allocate private data.", drvthis->name); + report(RPT_ERR, "%s: Could not allocate private data", drvthis->name); return -1; } if (drvthis->store_private_ptr(drvthis, p)) { - report(RPT_ERR, "%s: Could not store private data.", drvthis->name); + report(RPT_ERR, "%s: Could not store private data", drvthis->name); return -1; } @@ -97,7 +97,7 @@ lircin_init (Driver *drvthis) if (*s != '\0') { p->lircrc = malloc(strlen(s) + 1); if (p->lircrc == NULL) { - report(RPT_ERR, "%s: Could not allocate new memory.", drvthis->name); + report(RPT_ERR, "%s: Could not allocate new memory", drvthis->name); return -1; } strcpy(p->lircrc, s); @@ -112,7 +112,7 @@ lircin_init (Driver *drvthis) p->prog = malloc(strlen(s) + 1); if (p->prog == NULL) { - report(RPT_ERR, "%s: Could not allocate new memory.", drvthis->name); + report(RPT_ERR, "%s: Could not allocate new memory", drvthis->name); return -1; } strcpy(p->prog, s); @@ -122,14 +122,14 @@ lircin_init (Driver *drvthis) /* open socket to lirc */ if (-1 == (p->lircin_fd = lirc_init(p->prog, LIRCIN_VERBOSELY))) { - report(RPT_ERR, "%s: Could not connect to lircd.", drvthis->name); + report(RPT_ERR, "%s: Could not connect to lircd", drvthis->name); lircin_close(drvthis); return -1; } if (0 != lirc_readconfig(p->lircrc, &p->lircin_irconfig, NULL)) { - report(RPT_ERR, "%s: lirc_readconfig() failed.", drvthis->name); + report(RPT_ERR, "%s: lirc_readconfig() failed", drvthis->name); lircin_close(drvthis); return -1; diff --git a/server/drivers/picolcd.c b/server/drivers/picolcd.c index 7a44158..1cc5207 100644 --- a/server/drivers/picolcd.c +++ b/server/drivers/picolcd.c @@ -156,7 +156,7 @@ MODULE_EXPORT int picoLCD_init(Driver *drvthis) { pd->framebuf = (unsigned char *) malloc(pd->width * pd->height + 1); if (pd->framebuf == NULL) { - report(RPT_ERR, "%s: unable to create framebuf.\n", __FUNCTION__); + report(RPT_ERR, "%s: unable to create framebuf", __FUNCTION__); return -1; } memset(pd->framebuf, ' ', pd->width * pd->height); @@ -164,7 +164,7 @@ MODULE_EXPORT int picoLCD_init(Driver *drvthis) { pd->lstframe = (unsigned char *) malloc(pd->width * pd->height + 1); if (pd->lstframe == NULL) { - report(RPT_ERR, "%s: unable to create lstframe.\n", __FUNCTION__); + report(RPT_ERR, "%s: unable to create lstframe", __FUNCTION__); return -1; } memset(pd->lstframe, ' ', pd->width * pd->height); @@ -179,7 +179,7 @@ MODULE_EXPORT int picoLCD_init(Driver *drvthis) { picoLCD_set_contrast(drvthis, pd->contrast); - report(RPT_INFO, "picolcd: init complete\n", __FUNCTION__); + report(RPT_INFO, "picolcd: init complete", __FUNCTION__); return 0; } @@ -190,7 +190,7 @@ MODULE_EXPORT void picoLCD_close(Driver *drvthis) { usb_release_interface(pd->lcd, 0); usb_close(pd->lcd); - debug(RPT_DEBUG, "picolcd: close complete\n"); + debug(RPT_DEBUG, "picolcd: close complete"); } /* lcd_logical_driver Essential output functions */ @@ -212,7 +212,7 @@ MODULE_EXPORT void picoLCD_clear(Driver *drvthis) { memset(pd->framebuf, ' ', pd->width * pd->height); pd->ccmode = standard; - debug(RPT_DEBUG, "picolcd: clear complete\n"); + debug(RPT_DEBUG, "picolcd: clear complete"); } MODULE_EXPORT void picoLCD_flush(Driver *drvthis) { @@ -222,7 +222,7 @@ MODULE_EXPORT void picoLCD_flush(Driver *drvthis) { static unsigned char text[48]; int i, line, offset; - debug(RPT_DEBUG, "picolcd: flush started\n"); + debug(RPT_DEBUG, "picolcd: flush started"); for (line = 0; line < pd->height; line++) { memset(text, 0, 48); @@ -236,14 +236,14 @@ MODULE_EXPORT void picoLCD_flush(Driver *drvthis) { picolcd_write(pd->lcd, line, 0, text); memcpy(pd->lstframe + offset, pd->framebuf + offset, pd->width); - debug(RPT_DEBUG, "picolcd: flush wrote line %d (%s)\n", line + 1, text); + debug(RPT_DEBUG, "picolcd: flush wrote line %d (%s)", line + 1, text); break; } } } - debug(RPT_DEBUG, "picolcd: flush complete\n\t(%s)\n\t(%s)\n", pd->framebuf, pd->lstframe); + debug(RPT_DEBUG, "picolcd: flush complete\n\t(%s)\n\t(%s)", pd->framebuf, pd->lstframe); } MODULE_EXPORT void picoLCD_string(Driver *drvthis, int x, int y, unsigned char *str) { @@ -251,7 +251,7 @@ MODULE_EXPORT void picoLCD_string(Driver *drvthis, int x, int y, unsigned char * unsigned char *dest; int len; - debug(RPT_DEBUG, "picolcd: string start (%s)\n", str); + debug(RPT_DEBUG, "picolcd: string start (%s)", str); if (y < 1 || y > pd->height) return; @@ -260,7 +260,7 @@ MODULE_EXPORT void picoLCD_string(Driver *drvthis, int x, int y, unsigned char * len = strlen((char *)str); if (len + x > pd->width) { - debug(RPT_DEBUG, "picolcd: string overlength (>%d). Start: %d Length: %d (%s)\n", pd->width, x, len ,str); + debug(RPT_DEBUG, "picolcd: string overlength (>%d). Start: %d Length: %d (%s)", pd->width, x, len ,str); len = pd->width - x; /* Copy what we can */ } @@ -269,13 +269,13 @@ MODULE_EXPORT void picoLCD_string(Driver *drvthis, int x, int y, unsigned char * dest = pd->framebuf + (y * pd->width + x); memcpy(dest, str, len * sizeof(char)); - debug(RPT_DEBUG, "picolcd: string complete (%s)\n", str); + debug(RPT_DEBUG, "picolcd: string complete (%s)", str); } MODULE_EXPORT void picoLCD_chr(Driver *drvthis, int x, int y, unsigned char chr) { PrivateData *pd = drvthis->private_data; unsigned char *dest; - debug(RPT_DEBUG, "picolcd: chr start (%c)\n", chr); + debug(RPT_DEBUG, "picolcd: chr start (%c)", chr); if (y < 1 || y > pd->height) return; @@ -285,7 +285,7 @@ MODULE_EXPORT void picoLCD_chr(Driver *drvthis, int x, int y, unsigned char chr) x--; y--; /* Convert 1-based to 0-based */ dest = pd->framebuf + (y * pd->width + x); memcpy(dest, &chr, sizeof(char)); - debug(RPT_DEBUG, "picolcd: chr complete (%c)\n", chr); + debug(RPT_DEBUG, "picolcd: chr complete (%c)", chr); } @@ -451,33 +451,33 @@ MODULE_EXPORT char *picoLCD_get_key(Driver *drvthis) { int key_pass = 0; int two_keys = 0; - debug(RPT_DEBUG, "picolcd: get_key start (timeout %d)\n", pd->key_timeout); + debug(RPT_DEBUG, "picolcd: get_key start (timeout %d)", pd->key_timeout); keydata = malloc(sizeof(lcd_packet)); while (! keys_read) { get_key_event(pd->lcd, keydata, pd->key_timeout); - debug(RPT_DEBUG, "picolcd: get_key got an event\n"); + debug(RPT_DEBUG, "picolcd: get_key got an event"); if (keydata->type == IN_REPORT_KEY_STATE) { if (! keydata->data[1] && key_pass) { - debug(RPT_DEBUG, "picolcd: get_key got all clear\n"); + debug(RPT_DEBUG, "picolcd: get_key got all clear"); /* Got a <0, 0> key-up event after reading a valid key press event */ keys_read++; /* All clear */ } else if (! keydata->data[2] && ! two_keys) { - debug(RPT_DEBUG, "picolcd: get_key got one key\n"); + debug(RPT_DEBUG, "picolcd: get_key got one key"); /* We got one key (but not after a two key event and before and all clear) */ keystr = pd->key_matrix[keydata->data[1]]; } else { /* We got two keys */ - debug(RPT_DEBUG, "picolcd: get_key got two keys\n"); + debug(RPT_DEBUG, "picolcd: get_key got two keys"); two_keys++; sprintf(keystr, "%s+%s", pd->key_matrix[keydata->data[1]], pd->key_matrix[keydata->data[2]]); } key_pass++; /* This hack allows us to deal with receiving left over <0,0> first */ } else { - debug(RPT_DEBUG, "picolcd: get_key got non-key data or timeout\n"); + debug(RPT_DEBUG, "picolcd: get_key got non-key data or timeout"); /* We got IR or otherwise bad data */ return NULL; } @@ -486,7 +486,7 @@ MODULE_EXPORT char *picoLCD_get_key(Driver *drvthis) { free(keydata); - debug(RPT_DEBUG, "picolcd: get_key complete (%s)\n", keystr); + debug(RPT_DEBUG, "picolcd: get_key complete (%s)", keystr); if (! strlen(keystr)) return NULL; @@ -623,7 +623,7 @@ static usb_dev_handle *picolcd_open(void) lcd = NULL; - debug(RPT_DEBUG, "picolcd: scanning for devices...\n"); + debug(RPT_DEBUG, "picolcd: scanning for devices..."); usb_init(); usb_find_busses(); @@ -633,13 +633,13 @@ static usb_dev_handle *picolcd_open(void) for (bus = busses; bus; bus = bus->next) { for (dev = bus->devices; dev; dev = dev->next) { if ((dev->descriptor.idVendor == picoLCD_VENDOR) && (dev->descriptor.idProduct == picoLCD_DEVICE)) { - debug(RPT_DEBUG, "Found picoLCD on bus %s device %s \n", bus->dirname, dev->filename); + debug(RPT_DEBUG, "Found picoLCD on bus %s device %s", bus->dirname, dev->filename); lcd = usb_open(dev); ret = usb_get_driver_np(lcd, 0, driver, sizeof(driver)); if (ret == 0) { - debug(RPT_DEBUG, "Interface 0 already claimed by '%s' attempting to detach driver...\n", driver); + debug(RPT_DEBUG, "Interface 0 already claimed by '%s' attempting to detach driver...", driver); if (usb_detach_kernel_driver_np(lcd, 0) < 0) { - debug(RPT_DEBUG, "Failed to detach '%s' driver !\n", driver); + debug(RPT_DEBUG, "Failed to detach '%s' driver !", driver); return NULL; } } @@ -648,7 +648,7 @@ static usb_dev_handle *picolcd_open(void) usleep(100); if (usb_claim_interface(lcd, 0) < 0) { - debug(RPT_DEBUG, "Failed to claim interface !\n"); + debug(RPT_DEBUG, "Failed to claim interface !"); return NULL; } @@ -658,7 +658,7 @@ static usb_dev_handle *picolcd_open(void) } } - debug(RPT_DEBUG, "Could not find a picoLCD !\n"); + debug(RPT_DEBUG, "Could not find a picoLCD !"); return NULL; } diff --git a/server/drivers/pylcd.c b/server/drivers/pylcd.c index 08c33aa..2f4f491 100644 --- a/server/drivers/pylcd.c +++ b/server/drivers/pylcd.c @@ -510,12 +510,12 @@ MODULE_EXPORT void pyramid_set_char (Driver *drvthis, int n, char *dat) if (n<0 && n>15) { - debug(RPT_DEBUG, "only characters 0-15 can be changed.\n"); + debug(RPT_DEBUG, "only characters 0-15 can be changed"); return; } if (!dat) { - debug(RPT_DEBUG, "no character data\n"); + debug(RPT_DEBUG, "no character data"); return; } diff --git a/server/drivers/serialVFD.c b/server/drivers/serialVFD.c index 6f3c751..e4ad6c7 100644 --- a/server/drivers/serialVFD.c +++ b/server/drivers/serialVFD.c @@ -148,7 +148,7 @@ serialVFD_init (Driver *drvthis) /* Which speed */ tmp = drvthis->config_get_int(drvthis->name, "Speed", 0, DEFAULT_SPEED); if ((tmp != 1200) && (tmp != 2400) && (tmp != 9600) && (tmp != 19200) && (tmp != 115200)) { - report(RPT_WARNING, "%s: Speed must be 1200, 2400, 9600, 19200 or 115200. Using default %d.\n", + report(RPT_WARNING, "%s: Speed must be 1200, 2400, 9600, 19200 or 115200. Using default %d", drvthis->name, DEFAULT_SPEED); tmp = DEFAULT_SPEED; } @@ -158,7 +158,7 @@ serialVFD_init (Driver *drvthis) else if (tmp == 19200) p->speed = B19200; else if (tmp == 115200) p->speed = B115200; } -// report(RPT_ERR, "%s: Port: %X\n", __FUNCTION__, p->port, strerror(errno)); +// report(RPT_ERR, "%s: Port: %X", __FUNCTION__, p->port, strerror(errno)); /* Which size */ strncpy(size, drvthis->config_get_string(drvthis->name, "Size", 0, DEFAULT_SIZE), sizeof(size)); @@ -166,7 +166,7 @@ serialVFD_init (Driver *drvthis) if ((sscanf(size, "%dx%d", &w, &h) != 2) || (w <= 0) || (w > LCD_MAX_WIDTH) || (h <= 0) || (h > LCD_MAX_HEIGHT)) { - report(RPT_WARNING, "%s: cannot parse size: %s; using default %s.", + report(RPT_WARNING, "%s: cannot parse size: %s; using default %s", drvthis->name, size, DEFAULT_SIZE); sscanf(DEFAULT_SIZE, "%dx%d", &w, &h); } @@ -208,18 +208,18 @@ serialVFD_init (Driver *drvthis) /* Number of custom characters */ tmp = drvthis->config_get_int(drvthis->name, "Custom-Characters", 0, -83); if ((tmp < 0) || (tmp > 99)) { - report(RPT_WARNING, "%s: The number of Custom-Characters must be between 0 and 99. Using default.", + report(RPT_WARNING, "%s: The number of Custom-Characters must be between 0 and 99. Using default", drvthis->name, 0); tmp = -83; } p->customchars = tmp; -// report(RPT_ERR, "%s: Port: %X\n", __FUNCTION__, p->port, strerror(errno)); +// report(RPT_ERR, "%s: Port: %X", __FUNCTION__, p->port, strerror(errno)); // Do connection type specific io-port init if (Port_Function[p->use_parallel].init_fkt(drvthis) == -1) { - report(RPT_ERR, "%s: unable to initialize io-port.", drvthis->name); + report(RPT_ERR, "%s: unable to initialize io-port", drvthis->name); return -1; } @@ -227,7 +227,7 @@ serialVFD_init (Driver *drvthis) /* make sure the frame buffer is there... */ p->framebuf = (unsigned char *) malloc(p->width * p->height); if (p->framebuf == NULL) { - report(RPT_ERR, "%s: unable to create framebuffer.", drvthis->name); + report(RPT_ERR, "%s: unable to create framebuffer", drvthis->name); return -1; } memset(p->framebuf, ' ', p->width * p->height); @@ -235,7 +235,7 @@ serialVFD_init (Driver *drvthis) /* make sure the framebuffer backing store is there... */ p->backingstore = (unsigned char *) malloc(p->width * p->height); if (p->backingstore == NULL) { - report(RPT_ERR, "%s: unable to create framebuffer backing store.", drvthis->name); + report(RPT_ERR, "%s: unable to create framebuffer backing store", drvthis->name); return -1; } memset(p->backingstore, 0, p->width * p->height); @@ -243,7 +243,7 @@ serialVFD_init (Driver *drvthis) //setup displayspecific data serialVFD_load_display_data(drvthis); -// report(RPT_ERR, "%s: Port: %X\n", drvthis->name, p->port, strerror(errno)); +// report(RPT_ERR, "%s: Port: %X", drvthis->name, p->port, strerror(errno)); //initialise display Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[reset][1],p->hw_cmd[reset][0]); @@ -416,7 +416,7 @@ serialVFD_flush (Driver *drvthis) for (j = 0; j < p->usr_chr_dot_assignment[0]; j++) { if (p->custom_char[i][j] != p->custom_char_store[i][j]) { custom_char_changed[i] = 1; -// report(RPT_ERR, "%s: Char: %X %i\n", __FUNCTION__, i, j, strerror(errno)); +// report(RPT_ERR, "%s: Char: %X %i", __FUNCTION__, i, j, strerror(errno)); } p->custom_char_store[i][j] = p->custom_char[i][j]; } @@ -754,6 +754,6 @@ MODULE_EXPORT const char * serialVFD_get_info (Driver *drvthis) { PrivateData *p = drvthis->private_data; - strcpy(p->info, "Driver for many serialVFDs from NEC(all FIPC based), Noritake, Futaba and the \"KD Rev2.1\"VFD."); + strcpy(p->info, "Driver for many serialVFDs from NEC(all FIPC based), Noritake, Futaba and the \"KD Rev2.1\"VFD"); return p->info; } diff --git a/server/drivers/serialVFD_io.c b/server/drivers/serialVFD_io.c index 02feac3..62a30c6 100644 --- a/server/drivers/serialVFD_io.c +++ b/server/drivers/serialVFD_io.c @@ -81,7 +81,7 @@ serialVFD_init_serial (Driver *drvthis) p->fd = open(p->device, O_RDWR | O_NOCTTY | O_NDELAY); if (p->fd == -1) { - report(RPT_ERR, "%s: open() of %s failed (%s)\n", __FUNCTION__, p->device, strerror(errno)); + report(RPT_ERR, "%s: open() of %s failed (%s)", __FUNCTION__, p->device, strerror(errno)); return -1; } @@ -117,12 +117,12 @@ serialVFD_init_parallel (Driver *drvthis) #ifdef HAVE_PCSTYLE_LPT_CONTROL debug(RPT_DEBUG, "%s: Opening parallelport at: 0x%X", __FUNCTION__, p->port); if (port_access_multiple(p->port,3)) { - report(RPT_ERR, "%s: port_access_multiple() of 0x%X failed (%s)\n", __FUNCTION__, p->port, strerror(errno)); + report(RPT_ERR, "%s: port_access_multiple() of 0x%X failed (%s)", __FUNCTION__, p->port, strerror(errno)); return -1; } return 0; #else - report(RPT_ERR, "%s: LCDproc was compiled without PCstyle LPT support\n", __FUNCTION__); + report(RPT_ERR, "%s: LCDproc was compiled without PCstyle LPT support", __FUNCTION__); return -1; #endif } @@ -143,7 +143,7 @@ serialVFD_close_parallel (Driver *drvthis) debug(RPT_DEBUG, "%s: Closing parallelport at: 0x%X", __FUNCTION__, p->port); if (port_deny_multiple(p->port,3)) { - report(RPT_ERR, "%s: port_deny_multiple() of 0x%X failed (%s)\n", __FUNCTION__, p->port, strerror(errno)); + report(RPT_ERR, "%s: port_deny_multiple() of 0x%X failed (%s)", __FUNCTION__, p->port, strerror(errno)); } #endif } diff --git a/server/drivers/svgalib_drv.c b/server/drivers/svgalib_drv.c index f9c17af..f9e5e1c 100644 --- a/server/drivers/svgalib_drv.c +++ b/server/drivers/svgalib_drv.c @@ -324,7 +324,7 @@ svga_init (Driver *drvthis) /* switch to selected VGA mode if it is available */ if (!vga_hasmode (p->mode)) { - report(RPT_ERR, "%s: VGA mode %s not available.", drvthis->name, modestr); + report(RPT_ERR, "%s: VGA mode %s not available", drvthis->name, modestr); return -1; } diff --git a/server/drivers/t6963.c b/server/drivers/t6963.c index 9fa8ca0..3ffbe72 100644 --- a/server/drivers/t6963.c +++ b/server/drivers/t6963.c @@ -170,7 +170,7 @@ t6963_init (Driver *drvthis) } while (i < 100 && (ecp_input & 0x03)!=0x03); T6963_DATAOUT(p->port); if (i >= 100) { - debug(RPT_WARNING, "T6963: ECP mode not working!\n -> is now disabled (STA0: %i, STA1: %i\n", ecp_input & 1, ecp_input & 2); + debug(RPT_WARNING, "T6963: ECP mode not working!\n -> is now disabled (STA0: %i, STA1: %i", ecp_input & 1, ecp_input & 2); p->bidirectLPT = 0; } else diff --git a/shared/str.c b/shared/str.c index 61a7da5..cdc03b6 100644 --- a/shared/str.c +++ b/shared/str.c @@ -19,11 +19,11 @@ get_args (char **argv, char *str, int max_args) if (max_args < 1) return 0; - //debug("get_args(%i): string=%s\n", max_args, str); + //debug("get_args(%i): string=%s", max_args, str); // Parse the command line... for (item = strtok (str, delimiters); item; item = strtok (NULL, delimiters)) { - //debug("get_args: item=%s\n", item); + //debug("get_args: item=%s", item); if (i < max_args) { argv[i] = item; i++;