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
|
|
|
*
|
2011-08-28 19:53:29 -04: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.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2000-02-12 23:51:37 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "mdbtools.h"
|
|
|
|
|
|
2003-01-20 16:04:24 +00:00
|
|
|
int
|
2000-02-12 23:51:37 +00:00
|
|
|
main(int argc, char **argv)
|
|
|
|
|
{
|
2003-01-20 16:04:24 +00:00
|
|
|
MdbHandle *mdb;
|
2000-02-12 23:51:37 +00:00
|
|
|
|
|
|
|
|
|
2012-07-21 13:22:04 +02:00
|
|
|
if (argc<2 || argc>3) {
|
|
|
|
|
fprintf(stderr, "Usage: %s <file> [<objtype>]\n", argv[0]);
|
|
|
|
|
fprintf(stderr, "Use objtype -1 for all\n");
|
2000-02-12 23:51:37 +00:00
|
|
|
exit(1);
|
|
|
|
|
}
|
|
|
|
|
|
2000-04-02 17:08:30 +00:00
|
|
|
mdb_init();
|
|
|
|
|
|
2004-04-13 20:06:04 +00:00
|
|
|
mdb = mdb_open(argv[1], MDB_NOFLAGS);
|
2000-02-12 23:51:37 +00:00
|
|
|
|
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
|
|
|
|
2004-04-14 05:58:52 +00:00
|
|
|
mdb_close(mdb);
|
2000-04-02 17:08:30 +00:00
|
|
|
mdb_exit();
|
2002-08-12 17:37:04 +00:00
|
|
|
|
|
|
|
|
exit(0);
|
2000-02-12 23:51:37 +00:00
|
|
|
}
|
|
|
|
|
|