Der letzte commit war etwas verfüht...

This commit is contained in:
Enno Rehling 2004-06-26 21:03:42 +00:00
parent 612cb54ed9
commit f1f23e3ff3
4 changed files with 8 additions and 9 deletions

View File

@ -292,7 +292,6 @@ const char *keywords[MAXKEYWORDS] =
"MACHEN",
"NACH",
"PASSWORT",
"REGION",
"REKRUTIEREN",
"RESERVIEREN",
"ROUTE",
@ -1264,6 +1263,7 @@ parse(keyword_t kword, int (*dofun)(unit *, struct order *), boolean thisorder)
order * ord = *ordp;
if (get_keyword(ord) == kword) {
if (dofun(u, ord)!=0) break;
if (u->orders==NULL) break;
}
if (thisorder) break;
if (*ordp==ord) ordp=&ord->next;

View File

@ -412,7 +412,6 @@ enum {
K_MAKE,
K_MOVE,
K_PASSWORD,
K_DUMMY,
K_RECRUIT,
K_RESERVE,
K_ROUTE,

View File

@ -161,11 +161,9 @@ write_order(const order * ord, const struct locale * lang, char * buffer, size_t
if (ord==0 || ord->_keyword==NOKEYWORD) {
buffer[0]=0;
} else {
#ifndef NDEBUG
const char * s = cmd->_str;
assert(findkeyword(parse_token(&s), lang)==cmd->_keyword);
#endif
strncpy(buffer, cmd->_str, size);
char * s = getcommand(ord);
strncpy(buffer, s, size);
free(s);
}
return buffer;
}

View File

@ -491,6 +491,7 @@ unitorders(FILE * F, struct faction * f)
boolean quit = false;
switch (findparam(s, u->faction->locale)) {
case P_UNIT:
case P_REGION:
case P_FACTION:
case P_NEXT:
case P_GAMENAME:
@ -1201,9 +1202,10 @@ writeunit(FILE * F, const unit * u)
wi(F, u->flags & UFL_SAVEMASK);
wnl(F);
for (ord = u->orders; ord; ord=ord->next) {
if (is_persistent(ord) && get_keyword(ord)!=NOKEYWORD) {
if (is_persistent(ord)) {
writeorder(ord, u->faction->locale, F);
}
}
ws(F, ""); /* Abschluß der persistenten Befehle */
writeorder(u->lastorder, u->faction->locale, F);
wnl(F);