From 602853f0e2bc993d76f55add51117c0e7e38d6e4 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 25 Feb 2007 09:02:43 +0000 Subject: [PATCH] Message-fixes --- src/common/kernel/battle.c | 1 - src/common/kernel/reports.c | 14 ++++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/common/kernel/battle.c b/src/common/kernel/battle.c index 9f433ef3b..eb772dacc 100644 --- a/src/common/kernel/battle.c +++ b/src/common/kernel/battle.c @@ -2794,7 +2794,6 @@ print_header(battle * b) strcat(buf, " "); } if (lastf) strcat(buf, lastf); - strcat(buf, "."); m = msg_message("battle::starters", "factions", buf); message_faction(b, f, m); diff --git a/src/common/kernel/reports.c b/src/common/kernel/reports.c index 52a1d24dd..9215f1cc1 100644 --- a/src/common/kernel/reports.c +++ b/src/common/kernel/reports.c @@ -438,6 +438,10 @@ bufunit(const faction * f, const unit * u, int indent, int mode) } } if (getguard(u)) { + rsize = strlcpy(bufp, ", ", size); + if (rsize>size) rsize = size-1; + size -= rsize; + bufp += rsize; rsize = strlcpy(bufp, LOC(f->locale, "unit_guards"), size); if (rsize>size) rsize = size-1; size -= rsize; @@ -1277,22 +1281,20 @@ write_reports(faction * f, time_t ltime) get_seen_interval(&ctx); get_addresses(&ctx); - printf("Reports für %s: ", factionname(f)); + printf("Reports for %s:", factionname(f)); fflush(stdout); for (;rtype!=NULL;rtype=rtype->next) { if (f->options & rtype->flag) { - char * filename; - sprintf(buf, "%s/%d-%s.%s", reportpath(), turn, factionid(f), rtype->extension); - filename = strdup(buf); + char filename[MAX_PATH]; + sprintf(filename, "%s/%d-%s.%s", reportpath(), turn, factionid(f), rtype->extension); if (rtype->write(filename, &ctx)==0) { gotit = true; } - free(filename); } } - printf("Reports for %s: DONE\n", factionname(f)); + puts(" DONE"); if (!gotit) { log_warning(("No report for faction %s!\n", factionid(f))); }