Files
mdbtools/src/util/prcat.c

45 lines
1.2 KiB
C
Raw Normal View History

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"
int
2000-02-12 23:51:37 +00:00
main(int argc, char **argv)
{
MdbHandle *mdb;
2000-02-12 23:51:37 +00: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);
}
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
mdb_dump_catalog(mdb,(argc > 2) ? atoi(argv[2]) : MDB_TABLE);
2000-02-12 23:51:37 +00:00
mdb_close(mdb);
mdb_exit();
exit(0);
2000-02-12 23:51:37 +00:00
}