xca/lib/db_dump.cpp
Christian d0f3672798 - add undelete feature for deleted items
- fix database shrinking of curent db during opening of new db
2007-02-05 22:17:22 +01:00

26 lines
420 B
C++

#include "db.h"
int main(int argc, char *argv[])
{
if (argc<2)
return 1;
QString database = argv[1];
db mydb(database);
unsigned char *p;
db_header_t h;
int i=0;
char type[] = "NKRCLTSXX";
mydb.first(0);
while (!mydb.eof()) {
p = mydb.load(&h);
free(p);
printf("%3d: %c V%d O:%6d, F:%x L:%5d %s\n",
i++, type[h.type], h.version, mydb.head_offset,
h.flags, h.len, h.name);
mydb.next(0);
}
}