]> git.pond.sub.org Git - empserver/commitdiff
(defellipsis, chkflds, xundump2, need_uid): Use new need_uid to
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 14 Feb 2006 18:04:44 +0000 (18:04 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 14 Feb 2006 18:04:44 +0000 (18:04 +0000)
require index field in all parts of a split table.

src/lib/common/xundump.c

index 6ee1b5196c70636c64dd3dae6b23d766e4e59c4e..e34dcb3a567e7deb688211b4dd52fd03675eadbd 100644 (file)
@@ -53,7 +53,7 @@
 static char *fname;
 static int lineno;
 static int human;
-static int ellipsis;
+static int ellipsis, need_uid;
 static int cur_type, cur_id;
 static void *cur_obj;
 static int nflds;
@@ -325,6 +325,7 @@ defellipsis(int fldno)
     if (ca[0].ca_table != cur_type)
        return gripe("Table %s doesn't support ...", ef_nameof(cur_type));
     ellipsis = fldno;
+    need_uid = 1;
     return 0;
 }
 
@@ -334,7 +335,7 @@ chkflds(void)
     struct castr *ca = ef_cadef(cur_type);
     int i, len, res = 0;
 
-    if (ellipsis) {
+    if (need_uid) {
        if (!caflds[0])
            return gripe("Header field %s required with ...", ca[0].ca_name);
        return 0;
@@ -759,6 +760,8 @@ xundump(FILE *fp, char *file, int expected_table)
 static int
 xundump2(FILE *fp, int type, struct castr *ca)
 {
+    need_uid = 0;
+
     for (;;) {
        if (xuheader1(fp, type, ca) < 0)
            return -1;