From bc0e8549b93ea65f0ec90d105a45ae93f8115e21 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 31 May 2004 12:19:26 +0000 Subject: [PATCH] =?UTF-8?q?Beim=20schreiben=20von=20Attributen=20etwas=20O?= =?UTF-8?q?rdnung=20gemacht.=20Einige=20Attribute=20haben=20=5Fnicht=5F=20?= =?UTF-8?q?ihre=20schreibroutine=20mit=20einem=20space=20terminiert,=20was?= =?UTF-8?q?=20sie=20m=C3=BCssen,=20damit=20es=20nicht=20sowas=20gibt:=20ro?= =?UTF-8?q?ad=202=200=200=201=200=2050=200end?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/attributes/at_movement.c | 2 +- src/common/attributes/moved.c | 2 +- src/common/attributes/otherfaction.c | 2 +- src/common/items/questkeys.c | 1 - src/common/kernel/border.c | 2 +- src/common/kernel/magic.c | 4 ++-- src/common/kernel/save.c | 8 ++++---- src/common/modules/arena.c | 2 +- src/common/modules/gmcmd.c | 22 +++++++++++----------- src/common/util/attrib.c | 2 +- 10 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/common/attributes/at_movement.c b/src/common/attributes/at_movement.c index e4013712d..d6a7ca6f2 100644 --- a/src/common/attributes/at_movement.c +++ b/src/common/attributes/at_movement.c @@ -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 diff --git a/src/common/attributes/moved.c b/src/common/attributes/moved.c index dcb351e90..35170ad6e 100644 --- a/src/common/attributes/moved.c +++ b/src/common/attributes/moved.c @@ -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 diff --git a/src/common/attributes/otherfaction.c b/src/common/attributes/otherfaction.c index 6f0b0216b..aa984a0bd 100644 --- a/src/common/attributes/otherfaction.c +++ b/src/common/attributes/otherfaction.c @@ -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 diff --git a/src/common/items/questkeys.c b/src/common/items/questkeys.c index 63c0c6c80..be07dc947 100644 --- a/src/common/items/questkeys.c +++ b/src/common/items/questkeys.c @@ -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; diff --git a/src/common/kernel/border.c b/src/common/kernel/border.c index 10f9e5796..e84068097 100644 --- a/src/common/kernel/border.c +++ b/src/common/kernel/border.c @@ -487,7 +487,7 @@ write_borders(FILE * f) } } } - fputs("end", f); + fputs("end ", f); } void diff --git a/src/common/kernel/magic.c b/src/common/kernel/magic.c index ddb709846..c765c7a0a 100644 --- a/src/common/kernel/magic.c +++ b/src/common/kernel/magic.c @@ -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 = { diff --git a/src/common/kernel/save.c b/src/common/kernel/save.c index 42d2e1c68..582c0b4a8 100644 --- a/src/common/kernel/save.c +++ b/src/common/kernel/save.c @@ -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 diff --git a/src/common/modules/arena.c b/src/common/modules/arena.c index 4a4e16e15..56b2b7e82 100644 --- a/src/common/modules/arena.c +++ b/src/common/modules/arena.c @@ -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 diff --git a/src/common/modules/gmcmd.c b/src/common/modules/gmcmd.c index 0956aa4eb..6d154167b 100644 --- a/src/common/modules/gmcmd.c +++ b/src/common/modules/gmcmd.c @@ -97,23 +97,23 @@ make_atpermissions(void) static void 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)); + const item_type * itype = (const item_type *)a->data.v; + assert(itype); + fprintf(F, "%s ", resourcename(itype->rtype, 0)); } static int read_gmcreate(attrib * a, FILE * F) { - char zText[32]; - const item_type ** p_itype = (const item_type **)&a->data.v; - fscanf(F, "%s", zText); - *p_itype = it_find(zText); - if (a->data.v==NULL) { - log_error(("unknown itemtype %s in gmcreate attribute\n", zText)); + char zText[32]; + const item_type ** p_itype = (const item_type **)&a->data.v; + fscanf(F, "%s", zText); + *p_itype = it_find(zText); + if (a->data.v==NULL) { + log_error(("unknown itemtype %s in gmcreate attribute\n", zText)); return AT_READ_FAIL; - } - return AT_READ_OK; + } + return AT_READ_OK; } /* at_gmcreate specifies that the owner can create items of a particular type */ diff --git a/src/common/util/attrib.c b/src/common/util/attrib.c index c98c5688e..a9cc822d9 100644 --- a/src/common/util/attrib.c +++ b/src/common/util/attrib.c @@ -305,5 +305,5 @@ a_write(FILE * f, const attrib * attribs) } na = na->next; } - fprintf(f, "end"); + fprintf(f, "end "); }