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 "); }