forked from github/server
Beim schreiben von Attributen etwas Ordnung gemacht.
Einige Attribute haben _nicht_ ihre schreibroutine mit einem space terminiert, was sie müssen, damit es nicht sowas gibt: road 2 0 0 1 0 50 0end
This commit is contained in:
parent
b2cec51385
commit
bc0e8549b9
|
@ -20,7 +20,7 @@
|
|||
static void
|
||||
write_movement(const attrib * a, FILE * F)
|
||||
{
|
||||
fprintf(F, "%d", a->data.i);
|
||||
fprintf(F, "%d ", a->data.i);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -28,7 +28,7 @@ age_moved(attrib * a)
|
|||
static void
|
||||
write_moved(const attrib * a, FILE * F)
|
||||
{
|
||||
fprintf(F, "%d", a->data.i);
|
||||
fprintf(F, "%d ", a->data.i);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -27,7 +27,7 @@ void
|
|||
write_of(const struct attrib * a, FILE* F)
|
||||
{
|
||||
const faction * f = (faction*)a->data.v;
|
||||
fprintf(F, "%d", f->no);
|
||||
fprintf(F, "%d ", f->no);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -38,7 +38,6 @@ static int
|
|||
use_questkey(struct unit * u, const struct item_type * itype, int amount, const char * cmd)
|
||||
{
|
||||
border *bo;
|
||||
int key, key1, key2;
|
||||
region *r1, *r2;
|
||||
int lock, k;
|
||||
message *m;
|
||||
|
|
|
@ -487,7 +487,7 @@ write_borders(FILE * f)
|
|||
}
|
||||
}
|
||||
}
|
||||
fputs("end", f);
|
||||
fputs("end ", f);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -147,7 +147,7 @@ static void
|
|||
a_writeicastle(const attrib * a, FILE * f)
|
||||
{
|
||||
icastle_data * data = (icastle_data*)a->data.v;
|
||||
fprintf(f, "%s %d %d", data->type->_name, data->building->no, data->time);
|
||||
fprintf(f, "%s %d %d ", data->type->_name, data->building->no, data->time);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -252,7 +252,7 @@ write_mage(const attrib * a, FILE * F) {
|
|||
fprintf (F, "%d ", sp->spellid);
|
||||
sp = sp->next;
|
||||
}
|
||||
fprintf (F, "-1\n");
|
||||
fprintf (F, "-1 ");
|
||||
}
|
||||
|
||||
attrib_type at_mage = {
|
||||
|
|
|
@ -461,7 +461,7 @@ write_enemies(FILE * F, const faction_list * flist)
|
|||
while (flist) {
|
||||
fprintf(F, "%s ", itoa36(flist->data->no));
|
||||
}
|
||||
fputs("end\n", F);
|
||||
fputs("end \n", F);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -887,7 +887,7 @@ write_alliances(FILE * F)
|
|||
al = al->next;
|
||||
wnl(F);
|
||||
}
|
||||
fprintf(F, "end");
|
||||
fprintf(F, "end ");
|
||||
wnl(F);
|
||||
}
|
||||
#endif
|
||||
|
@ -1483,7 +1483,7 @@ writeregion(FILE * F, const region * r)
|
|||
ws(F, resourcename(demand->type->itype->rtype, 0));
|
||||
wi(F, demand->value);
|
||||
}
|
||||
fputs("end\n", F);
|
||||
fputs("end \n", F);
|
||||
}
|
||||
a_write(F, r->attribs);
|
||||
wnl(F);
|
||||
|
@ -1711,7 +1711,7 @@ writefaction(FILE * F, const faction * f)
|
|||
wi(F, sf->status);
|
||||
}
|
||||
}
|
||||
fprintf(F, "end");
|
||||
fprintf(F, "end ");
|
||||
wnl(F);
|
||||
write_groups(F, f->groups);
|
||||
#ifdef REGIONOWNERS
|
||||
|
|
|
@ -259,7 +259,7 @@ age_hurting(attrib * a) {
|
|||
static void
|
||||
write_hurting(const attrib * a, FILE * F) {
|
||||
building * b = a->data.v;
|
||||
fprintf(F, "%d", b->no);
|
||||
fprintf(F, "%d ", b->no);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -99,7 +99,7 @@ write_gmcreate(const attrib * a, FILE * F)
|
|||
{
|
||||
const item_type * itype = (const item_type *)a->data.v;
|
||||
assert(itype);
|
||||
fprintf(F, "%s", resourcename(itype->rtype, 0));
|
||||
fprintf(F, "%s ", resourcename(itype->rtype, 0));
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -305,5 +305,5 @@ a_write(FILE * f, const attrib * attribs)
|
|||
}
|
||||
na = na->next;
|
||||
}
|
||||
fprintf(f, "end");
|
||||
fprintf(f, "end ");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue