harmonize report & debug() messages: no '\n' or '.' at end

This commit is contained in:
marschap
2007-06-17 10:39:49 +00:00
parent 1899ff755c
commit 77209a6f3f
14 changed files with 77 additions and 75 deletions
+2 -2
View File
@@ -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);
}
+4 -4
View File
@@ -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")) {