mirror of
https://github.com/chris2511/xca.git
synced 2026-09-13 18:46:25 +05:00
34 lines
550 B
C++
34 lines
550 B
C++
/* vi: set sw=4 ts=4:
|
|
*
|
|
* Copyright (C) 2001 - 2007 Christian Hohnstaedt.
|
|
*
|
|
* All rights reserved.
|
|
*/
|
|
|
|
#include "db.h"
|
|
#include <stdlib.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[] = "NKRCLTSUXX";
|
|
|
|
mydb.first(0);
|
|
while (!mydb.eof()) {
|
|
p = mydb.load(&h);
|
|
free(p);
|
|
printf("%3d: %c V%d O:%6zd, F:%x L:%5d %s\n",
|
|
i++, type[h.type], h.version, mydb.head_offset,
|
|
h.flags, h.len, h.name);
|
|
mydb.next(0);
|
|
}
|
|
}
|