Implement human-readable dialect for xdump

This is for the forthcoming empdump utility program.  The xdump
command still does not support the human-readable dialect.

xundump has supported the human-readable dialect for a long time
(commit 4871a10a).
This commit is contained in:
Markus Armbruster 2008-03-04 21:49:44 +01:00
parent f9e28d0491
commit ed0c98d3c8
3 changed files with 149 additions and 28 deletions

View file

@ -42,11 +42,13 @@
struct xdstr {
natid cnum; /* dump for this country */
int divine; /* is this a deity dump? */
int human; /* dump human-readable format */
void (*pr)(char *fmt, ...); /* callback for printing dump */
};
struct xdstr *xdinit(struct xdstr *, natid, void (*)(char *, ...));
struct xdstr *xdinit(struct xdstr *, natid, int, void (*)(char *, ...));
extern void xdhdr(struct xdstr *, char *, int);
extern void xdcolhdr(struct xdstr *, struct castr[]);
extern void xdflds(struct xdstr *, struct castr[], void *);
extern struct valstr *xdeval(struct valstr *, struct xdstr *, struct castr *, void *, int);
extern char *xdprval(struct xdstr *, struct valstr *, char *);