schema program from Karl

This commit is contained in:
brianb 2000-03-12 01:21:05 +00:00
parent 48d80d3de8
commit ed04cfac15
6 changed files with 14 additions and 7 deletions

8
README
View File

@ -11,13 +11,15 @@ The initial goal of these tools is to be able to extract data structures and
data from mdb files. This goal may of course expand over time as the file
format becomes more well understood (if it ever does).
To install type 'make' and hope it works :-)
To install type 'make' in the src directory and hope it works :-)
This will build three executables:
mdb-dump -- a simple hex dump utility that I've been using to look at mdb files
prcat -- print the catalog table from an mdb file (try offset 9000).
prkkd -- prints some info about a KKD record given the offset to it.
prcat -- print the catalog table from an mdb file,
prkkd -- prints some info about design view data given the offset to it.
prtable -- prints some info about a table definition.
prdata -- prints a dump of the data given a table name.
Check out http://mdbtools.sourceforge.net for CVS, mailing list and similar.

2
TODO
View File

@ -8,4 +8,4 @@ Things to Do
. Figure out what happens for varchar columns > 256
. Write schema-export utility supporting different backend databases
. Write data-export utility supporting different backend databases
. Get autoconf working

View File

@ -117,6 +117,7 @@ extern MdbHandle *mdb_open(char *filename);
extern void mdb_catalog_dump(MdbHandle *mdb, int obj_type);
extern int mdb_catalog_rows(MdbHandle *mdb);
extern MdbCatalogEntry *mdb_get_catalog_entry(MdbHandle *mdb, int rowid, MdbCatalogEntry *entry);
extern char *mdb_get_objtype_string(int obj_type);
/* table.c */
extern MdbTableDef *mdb_read_table(MdbCatalogEntry *entry);

View File

@ -3,12 +3,13 @@ CC = gcc
INC = -I ../include `glib-config --cflags`
LIBS = -L ../libmdb -lmdb `glib-config --libs`
PROGS = prcat prkkd prtable prdata prdump
PROGS = prcat prkkd prtable prdata prdump schema
PRCATOBJS = prcat.o
PRKKDOBJS = prkkd.o
PRTABLEOBJS = prtable.o
PRDATAOBJS = prdata.o
PRDUMPOBJS = prdump.o
SCHEMAOBJS = schema.o
all: $(PROGS)
@ -27,6 +28,9 @@ prdata: $(PRDATAOBJS)
prdump: $(PRDUMPOBJS)
$(CC) -g -o $@ $(PRDUMPOBJS) $(LIBS)
schema: $(SCHEMAOBJS)
$(CC) -g -o $@ $(SCHEMAOBJS) $(LIBS)
clean:
rm -f core *.o $(PROGS)

View File

@ -32,7 +32,7 @@ GList *l;
if (argc<2) {
fprintf(stderr,"Usage: prtable <file> <table>\n");
fprintf(stderr,"Usage: %s <file> <table>\n",argv[0]);
exit(1);
}

View File

@ -28,7 +28,7 @@ MdbCatalogEntry entry;
if (argc<2) {
fprintf(stderr,"Usage: prtable <file> <table>\n");
fprintf(stderr,"Usage: %s <file> <table>\n",argv[0]);
exit(1);
}