Tja... was war das eigentlich?

This commit is contained in:
Enno Rehling 2004-07-03 11:36:34 +00:00
parent 6ef359704a
commit 14142c7538
4 changed files with 19 additions and 30 deletions

View File

@ -385,15 +385,16 @@ cr_order(const void * v, char * buffer, const void * userdata)
*wp++ = '\"'; *wp++ = '\"';
while (*rp) { while (*rp) {
switch (*rp) { switch (*rp) {
case '\"': case '\"':
case '\\': case '\\':
*wp++ = '\\'; *wp++ = '\\';
default: default:
*wp++ = *rp++; *wp++ = *rp++;
} }
} }
*wp++ = '\"'; *wp++ = '\"';
*wp++ = 0; *wp++ = 0;
/* sprintf(buffer, "\"%s\"", cmd); */
} }
else strcpy(buffer, "\"\""); else strcpy(buffer, "\"\"");
return 0; return 0;
@ -459,8 +460,8 @@ report_crtypes(FILE * F, const struct locale* lang)
const struct nrmessage_type * nrt = nrt_find(lang, kmt->mtype); const struct nrmessage_type * nrt = nrt_find(lang, kmt->mtype);
if (nrt) { if (nrt) {
unsigned int hash = hashstring(mt_name(kmt->mtype)); unsigned int hash = hashstring(mt_name(kmt->mtype));
fprintf(F, "MESSAGETYPE %d\n", hash); fprintf(F, "MESSAGETYPE %d\n", hash);
fputc('\"', F); fputc('\"', F);
fputs(escape_string(nrt_string(nrt), NULL, 0), F); fputs(escape_string(nrt_string(nrt), NULL, 0), F);
fputs("\";text\n", F); fputs("\";text\n", F);
fprintf(F, "\"%s\";section\n", nrt_section(nrt)); fprintf(F, "\"%s\";section\n", nrt_section(nrt));

View File

@ -107,20 +107,6 @@ MagicPower(void)
return value; return value;
} }
static building *
findbuildingr(const region *r, int n)
/* Ein Gebäude in einer bestimmten Region finden: */
{
building *b;
for (b = rbuildings(r); b; b = b->next) {
if (b->no == n) {
return b;
}
}
return 0;
}
static int static int
a_readicastle(attrib * a, FILE * f) a_readicastle(attrib * a, FILE * f)
{ {
@ -1572,6 +1558,8 @@ verify_targets(castorder *co)
break; break;
case SPP_SHIP: case SPP_SHIP:
if (!verify_ship(target_r, mage, sp, spobj, co->order)) ++failed; if (!verify_ship(target_r, mage, sp, spobj, co->order)) ++failed;
break;
default:
break; break;
} }
} }
@ -1748,7 +1736,7 @@ free_spellparameter(spellparameter *pa)
} }
static int static int
addparam_string(const char ** param, spllprm ** spobjp) addparam_string(char ** param, spllprm ** spobjp)
{ {
spllprm * spobj = *spobjp = malloc(sizeof(spllprm)); spllprm * spobj = *spobjp = malloc(sizeof(spllprm));
assert(param[0]); assert(param[0]);
@ -1760,7 +1748,7 @@ addparam_string(const char ** param, spllprm ** spobjp)
} }
static int static int
addparam_int(const char ** param, spllprm ** spobjp) addparam_int(char ** param, spllprm ** spobjp)
{ {
spllprm * spobj = *spobjp = malloc(sizeof(spllprm)); spllprm * spobj = *spobjp = malloc(sizeof(spllprm));
assert(param[0]); assert(param[0]);
@ -1772,7 +1760,7 @@ addparam_int(const char ** param, spllprm ** spobjp)
} }
static int static int
addparam_ship(const char ** param, spllprm ** spobjp) addparam_ship(char ** param, spllprm ** spobjp)
{ {
spllprm * spobj = *spobjp = malloc(sizeof(spllprm)); spllprm * spobj = *spobjp = malloc(sizeof(spllprm));
int id = atoi36(param[0]); int id = atoi36(param[0]);
@ -1784,7 +1772,7 @@ addparam_ship(const char ** param, spllprm ** spobjp)
} }
static int static int
addparam_building(const char ** param, spllprm ** spobjp) addparam_building(char ** param, spllprm ** spobjp)
{ {
spllprm * spobj = *spobjp = malloc(sizeof(spllprm)); spllprm * spobj = *spobjp = malloc(sizeof(spllprm));
int id = atoi36(param[0]); int id = atoi36(param[0]);
@ -1796,7 +1784,7 @@ addparam_building(const char ** param, spllprm ** spobjp)
} }
static int static int
addparam_region(const char ** param, spllprm ** spobjp, const unit * u, order * ord) addparam_region(char ** param, spllprm ** spobjp, const unit * u, order * ord)
{ {
assert(param[0]); assert(param[0]);
if (param[1]==0) { if (param[1]==0) {
@ -1826,7 +1814,7 @@ addparam_region(const char ** param, spllprm ** spobjp, const unit * u, order *
static int static int
addparam_unit(const char ** param, spllprm ** spobjp, const unit * u, order * ord) addparam_unit(char ** param, spllprm ** spobjp, const unit * u, order * ord)
{ {
spllprm *spobj; spllprm *spobj;
int i = 0; int i = 0;

View File

@ -2257,7 +2257,7 @@ movement(void)
if (u->ship==NULL || !fval(u, UFL_OWNER)) { if (u->ship==NULL || !fval(u, UFL_OWNER)) {
init_tokens(u->thisorder); init_tokens(u->thisorder);
skip_token(); skip_token();
if (move(u, true)!=0) repeat = true; if (move(u, false)!=0) repeat = true;
} }
} }
} }

View File

@ -7,7 +7,7 @@
_a: including article (ein Troll, a troll) _a: including article (ein Troll, a troll)
--> -->
<name="school"> <namespace name="school">
<string name="none"> <string name="none">
<text locale="de">Kein Magiegebiet</text> <text locale="de">Kein Magiegebiet</text>
<text locale="en">no magic school</text> <text locale="en">no magic school</text>