]> git.pond.sub.org Git - empserver/commitdiff
(xundump1): Remove parameter type. Use cur_type instead. Caller
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 5 Aug 2007 17:05:22 +0000 (17:05 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 5 Aug 2007 17:05:22 +0000 (17:05 +0000)
changed.

src/lib/common/xundump.c

index e806d2fa9128e5d4796b5c57deb194422a3ddf7d..ab408b4c4d5f6d8856bdf43b695db50db0befc16 100644 (file)
@@ -81,7 +81,7 @@ static int xunsymbol(char *, struct castr *, int);
 static int setsym(int, char *);
 static int mtsymset(int, long *);
 static int add2symset(int, long *, char *);
-static int xundump1(FILE *, int);
+static int xundump1(FILE *);
 static int xundump2(FILE *, int, struct castr *);
 
 static int
@@ -790,7 +790,7 @@ xundump2(FILE *fp, int type, struct castr *ca)
     for (;;) {
        if (xuheader1(fp, ca) < 0)
            return -1;
-       if (xundump1(fp, type) < 0)
+       if (xundump1(fp) < 0)
            return -1;
        if (!ellipsis)
            return 0;
@@ -802,10 +802,10 @@ xundump2(FILE *fp, int type, struct castr *ca)
 }
 
 static int
-xundump1(FILE *fp, int type)
+xundump1(FILE *fp)
 {
-    struct empfile *ep = &empfile[type];
-    int need_sentinel = !EF_IS_GAME_STATE(type);
+    struct empfile *ep = &empfile[cur_type];
+    int need_sentinel = !EF_IS_GAME_STATE(cur_type);
     int row, n, ch;
 
     n = 0;
@@ -825,15 +825,15 @@ xundump1(FILE *fp, int type)
     if (CANT_HAPPEN(n > ep->fids))
        n = ep->fids;
     if (n < ep->fids) {
-       if (EF_IS_GAME_STATE(type) && n != ep->csize)
+       if (EF_IS_GAME_STATE(cur_type) && n != ep->csize)
            /* TODO truncate file */
            gripe("Warning: should resize table %s from %d to %d, not implemented",
-                 ef_nameof(type), ep->csize, n);
-       else if (type >= EF_SHIP_CHR && type <= EF_NUKE_CHR)
+                 ef_nameof(cur_type), ep->csize, n);
+       else if (cur_type >= EF_SHIP_CHR && cur_type <= EF_NUKE_CHR)
            ep->cids = ep->fids = n;
        else
            return gripe("Table %s requires %d rows, got %d",
-                        ef_nameof(type), ep->fids, n);
+                        ef_nameof(cur_type), ep->fids, n);
     }
 
     if (need_sentinel) {