f->mistakes is a useless pointer.

This commit is contained in:
Enno Rehling 2005-05-07 23:53:23 +00:00
parent b4acb828d7
commit 26745e16f7
6 changed files with 2 additions and 40 deletions

View File

@ -1189,7 +1189,6 @@ report_computer(FILE * F, faction * f, struct seen_region ** seen, const faction
} }
} }
cr_output_str_list(F, "FEHLER", f->mistakes, f);
cr_output_messages(F, f->msgs, f); cr_output_messages(F, f->msgs, f);
{ {
struct bmsg * bm; struct bmsg * bm;

View File

@ -702,7 +702,6 @@ stripfaction (faction * f)
if (f->battles) free(f->battles); if (f->battles) free(f->battles);
/* TODO: free msgs */ /* TODO: free msgs */
freestrlist(f->mistakes);
freelist(f->allies); freelist(f->allies);
free(f->email); free(f->email);
free(f->banner); free(f->banner);

View File

@ -83,7 +83,6 @@ typedef struct faction {
struct msglevel * msglevels; struct msglevel * msglevels;
struct ally *allies; struct ally *allies;
struct group *groups; struct group *groups;
struct strlist *mistakes; /* enno: das muß irgendwann noch ganz raus */
boolean alive; /* enno: sollte ein flag werden */ boolean alive; /* enno: sollte ein flag werden */
int nregions; int nregions;
int money; int money;

View File

@ -560,12 +560,11 @@ factionorders(void)
printf(" %4s;", factionid(f)); printf(" %4s;", factionid(f));
fflush(stdout); fflush(stdout);
} }
freestrlist(f->mistakes);
f->mistakes = 0;
if (checkpasswd(f, pass, true) == false) { if (checkpasswd(f, pass, true) == false) {
log_warning(("Invalid password for faction %s\n", fid)); log_warning(("Invalid password for faction %s\n", fid));
addstrlist(&f->mistakes, "Das Passwort wurde falsch eingegeben"); ADDMSG(&f->msgs, msg_message("msg_errors", "string",
"Das Passwort wurde falsch eingegeben"));
return 0; return 0;
} }
/* Die Partei hat sich zumindest gemeldet, so daß sie noch /* Die Partei hat sich zumindest gemeldet, so daß sie noch

View File

@ -227,13 +227,6 @@ getgarbage(void)
/* Get rid of stuff that was only relevant last turn */ /* Get rid of stuff that was only relevant last turn */
for (f = factions; f; f = f->next) {
/* memset(f->showdata, 0, sizeof f->showdata); */
freestrlist(f->mistakes);
f->mistakes = 0;
/* TODO: free msgs */
}
#if 0 #if 0
for (r = regions; r; r = r->next) { for (r = regions; r; r = r->next) {
freestrlist(r->comments); freestrlist(r->comments);

View File

@ -255,30 +255,6 @@ game_init(void)
#endif #endif
} }
static void
getgarbage(void)
{
faction *f;
/* Get rid of stuff that was only relevant last turn */
for (f = factions; f; f = f->next) {
/* memset(f->showdata, 0, sizeof f->showdata); */
freestrlist(f->mistakes);
f->mistakes = 0;
/* TODO: free msgs */
}
#if 0
for (r = regions; r; r = r->next) {
freestrlist(r->comments);
r->comments = 0;
freestrlist(r->botschaften);
r->botschaften = 0;
}
#endif
}
#ifdef SHORTPWDS #ifdef SHORTPWDS
static void static void
readshortpwds() readshortpwds()
@ -387,9 +363,6 @@ process_orders()
printf(" - Korrekturen Runde %d\n", turn); printf(" - Korrekturen Runde %d\n", turn);
korrektur(); korrektur();
turn++; turn++;
puts(" - entferne Texte der letzten Runde");
getgarbage();
puts(" - Nehme Korrekturen am Datenbestand vor");
processorders(); processorders();
score(); score();
remove_unequipped_guarded(); remove_unequipped_guarded();