remove unused local functions.

This commit is contained in:
Enno Rehling 2020-03-02 21:19:02 +01:00
parent 0bbee5d1ac
commit fe39eb6cf7
1 changed files with 0 additions and 99 deletions

View File

@ -48,105 +48,6 @@ static void begin_orders(unit *u) {
u->orders = NULL; u->orders = NULL;
} }
static void unitorders(input *in, faction *f)
{
int i;
unit *u;
assert(f);
i = getid();
u = findunit(i);
if (u && u->faction == f) {
order **ordp;
begin_orders(u);
ordp = &u->orders;
for (;;) {
const char *s;
/* Erst wenn wir sicher sind, dass kein Befehl
* eingegeben wurde, checken wir, ob nun eine neue
* Einheit oder ein neuer Spieler drankommt */
s = in->getbuf(in->data);
if (s == NULL)
break;
if (s[0]) {
if (s[0] != '@') {
char token[64];
const char *stok = s;
stok = parse_token(&stok, token, sizeof(token));
if (stok) {
bool quit = false;
param_t param = findparam(stok, u->faction->locale);
switch (param) {
case P_UNIT:
case P_REGION:
quit = true;
break;
case P_FACTION:
case P_NEXT:
case P_GAMENAME:
/* these terminate the orders, so we apply extra checking */
if (strlen(stok) >= 3) {
quit = true;
break;
}
else {
quit = false;
}
break;
default:
break;
}
if (quit) {
break;
}
}
}
/* Nun wird der Befehl erzeut und eingehaengt */
*ordp = parse_order(s, u->faction->locale);
if (*ordp) {
ordp = &(*ordp)->next;
}
else {
ADDMSG(&f->msgs, msg_message("parse_error", "unit command", u, s));
}
}
}
}
}
static faction *factionorders(void)
{
int fid = getid();
faction *f = findfaction(fid);
if (f != NULL && (f->flags & FFL_NPC) == 0) {
char token[PASSWORD_MAXSIZE];
const char *pass = gettoken(token, sizeof(token));
if (!checkpasswd(f, (const char *)pass)) {
log_debug("Invalid password for faction %s", itoa36(fid));
ADDMSG(&f->msgs, msg_message("wrongpasswd", "password", pass));
return 0;
}
/* Die Partei hat sich zumindest gemeldet, so dass sie noch
* nicht als untaetig gilt */
f->lastorders = turn;
}
else {
log_debug("orders for invalid faction %s", itoa36(fid));
}
return f;
}
typedef struct parser_state { typedef struct parser_state {
unit *u; unit *u;
faction *f; faction *f;