]> git.pond.sub.org Git - empserver/commit
Accept fields out of order in human-readable syntax (indexes must
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 8 Feb 2006 23:23:48 +0000 (23:23 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 8 Feb 2006 23:23:48 +0000 (23:23 +0000)
commitf5621c5a49214768485fce37e8c037d26bfed5d8
treec3f9895d40a32c5023c0576ddc588ee875e0b334
parent28787caa9534f6819036964599ea38179298dd46
Accept fields out of order in human-readable syntax (indexes must
still be in order), support abbreviated field names:
(nxt_sel, nxt_idx, nxtfld, ca4fld): Remove.
(nflds, fldca, fldidx, caflds, getfld): New.
(xundump): Initialize and finalize them.
(xundump1): New, factored out of xundump().
(deffld): Match names, record field order in fldca[], fldidx[] for
getfld().  Use caflds[] to detect duplicates.
(xufldname): Catch negative index.  Used to pass it to deffld(), which
now interprets it as no index.
(setnum, setstr, setsym, mtsymset, add2symset): Use getfld().

(xufld): Improve error message.

(setstr): Fix for NULL strings.

(xuheader): Catch null ef_cadef().

(xuheader): Don't oops when an unexpected table can't be undumped.
src/lib/common/xundump.c