2000-02-12 23:51:37 +00:00
|
|
|
/* MDB Tools - A library for reading MS Access database file
|
|
|
|
|
* Copyright (C) 2000 Brian Bruns
|
|
|
|
|
*
|
2000-03-04 17:31:07 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
2000-02-12 23:51:37 +00:00
|
|
|
*
|
2000-03-04 17:31:07 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
2000-02-12 23:51:37 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2000-03-04 17:31:07 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
2000-02-12 23:51:37 +00:00
|
|
|
*
|
2000-03-04 17:31:07 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2000-02-12 23:51:37 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "mdbtools.h"
|
|
|
|
|
|
|
|
|
|
main(int argc, char **argv)
|
|
|
|
|
{
|
|
|
|
|
off_t offset=0;
|
|
|
|
|
int fd, i, j;
|
|
|
|
|
char xdigit;
|
|
|
|
|
short digit;
|
|
|
|
|
struct stat status;
|
|
|
|
|
int rows, cur, off;
|
|
|
|
|
unsigned char buf[2048];
|
2000-02-27 19:24:44 +00:00
|
|
|
MdbHandle *mdb;
|
2000-02-12 23:51:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
if (argc<2) {
|
2000-03-16 12:05:47 +00:00
|
|
|
fprintf(stderr,"Usage: %s <file> [<objtype>]\n",argv[0]);
|
2000-02-12 23:51:37 +00:00
|
|
|
exit(1);
|
|
|
|
|
}
|
|
|
|
|
|
2000-04-02 17:08:30 +00:00
|
|
|
mdb_init();
|
|
|
|
|
|
2000-02-12 23:51:37 +00:00
|
|
|
mdb = mdb_open(argv[1]);
|
|
|
|
|
|
2000-02-17 03:04:13 +00:00
|
|
|
mdb_dump_catalog(mdb,(argc > 2) ? atoi(argv[2]) : MDB_TABLE);
|
2000-02-12 23:51:37 +00:00
|
|
|
|
|
|
|
|
mdb_free_handle(mdb);
|
2000-04-02 17:08:30 +00:00
|
|
|
mdb_exit();
|
2000-02-12 23:51:37 +00:00
|
|
|
}
|
|
|
|
|
|