Commit graph

8 commits

Author SHA1 Message Date
a4131805d9 xundump: Polish error messages
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2015-02-01 16:53:00 +01:00
8afb9c8cb7 xundump: Permit omitting non-trailing realms
This involves computing the realm ID from fields cnum, realm.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2015-02-01 16:53:00 +01:00
1c2860c8f6 xundump: Permit omitting non-trailing sectors
This involves computing the sector ID from fields xloc, yloc.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2015-02-01 16:53:00 +01:00
13e3ce4e59 xundump: Don't require ID field to come first
The code needs it first so it can store field values into the object
right away.  Save the values instead, and store them when the row is
complete.

The improvement is hardly worth the trouble by itself, but it'll
simplify supporting keys consisting of multiple fields, like sector
xloc, yloc or realm cnum, realm, so we can omit rows in those tables,
too.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2015-02-01 16:53:00 +01:00
cfa0eac32a xundump: Permit omitting trailing sectors and realms
We currently require all rows to be present for tables item, sect-chr,
infrastructure, sect, realm.

The first three make sense: the code hard-codes indexes for them, and
malfunctions when entries are blank, so we want to make it hard to
leave any blank by accident.

The last two don't: blank sectors and realms work fine.  There, the
restriction is arbitrary.  Drop it.

Sectors and realms still can't be omitted "in the middle" (can do that
only with an ID selector), but that's coming soon.

See also commit 4a4ec91.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2015-02-01 16:53:00 +01:00
515beef12e xundump: Support splitting any table
Each part of a split table needs to supply rows for the same objects.
We currently require each part to name its objects explicitly, with an
object ID field, and don't support splitting tables that don't have
such IDs.  These restrictions became arbitrary when commit 4e23c45
implemented checking each partial table supplies the same rows.  Relax
them.

Affects tables sect, news, lost, realm, game, infrastructure.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2015-02-01 16:52:59 +01:00
67425a06d9 xundump: Report all missing fields, not just first one
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2015-02-01 16:52:59 +01:00
5a1544f925 tests/empdump: New; exercising the empdump utility
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2015-02-01 16:52:59 +01:00