Abfangen von errno, Ausgabe, aber kein Abbruch des Reports.

This commit is contained in:
Enno Rehling 2005-04-25 16:31:36 +00:00
parent 4ed68348ba
commit 20c9112b07
2 changed files with 19 additions and 29 deletions

View File

@ -1104,11 +1104,8 @@ report_computer(FILE * F, faction * f, const faction_list * addresses,
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
/* initialisations, header and lists */
if (quiet) {
printf(" CR");
fprintf(stdout, "Reports für %s: CR\r", factionname(f));
fflush(stdout);
}
else printf(" - schreibe Computerreport\n");
fprintf(F, "VERSION %d\n", C_REPORT_VERSION);
fprintf(F, "\"%s\";locale\n", locale_name(f->locale));
@ -1525,5 +1522,9 @@ report_computer(FILE * F, faction * f, const faction_list * addresses,
report_crtypes(F, f->locale);
write_translations(F);
reset_translations();
if (errno) {
log_error(("%s\n", strerror(errno)));
errno = 0;
}
return 0;
}

View File

@ -1582,12 +1582,9 @@ order_template(FILE * F, faction * f)
plane *pl;
region *last = f->last?f->last:lastregion(f);
if (quiet) {
printf(" ZV");
fprintf(stdout, "Reports für %s: ZV\r", factionname(f));
fflush(stdout);
}
else
printf(" - Schreibe Zugvorlage\n");
rps_nowrap(F, "");
rnl(F);
rps_nowrap(F, LOC(f->locale, "nr_template"));
@ -2004,12 +2001,8 @@ report(FILE *F, faction * f, const faction_list * addresses,
ix = Pow(O_STATISTICS);
wants_stats = (f->options & ix);
if (quiet) {
printf(" NR");
fprintf(stdout, "Reports für %s: NR\r", factionname(f));
fflush(stdout);
}
else
printf(" - Schreibe Report\n");
m = msg_message("nr_header_date", "game date", global.gamename, pzTime);
nr_render(m, f->locale, buf, sizeof(buf), f);
@ -2730,11 +2723,8 @@ reports(void)
current_faction = f;
gotit = false;
if (quiet) {
printf("Reports für %s: ", factionname(f));
printf("Reports für %s: \r", factionname(f));
fflush(stdout);
}
else printf("%s\n", factionname(f));
prepare_report(f);
addresses = get_addresses(f);
@ -2886,9 +2876,8 @@ reports(void)
a = a->nexttype;
a_remove(&f->attribs, a_old);
}
if (quiet)
printf("\n");
freelist(addresses);
putc('\n', stdout);
}
str = get_param(global.parameters, "globalreport");