mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-01-02 20:42:14 +08:00
Automatically init/exit libmdb code
mdb_init() and mdb_exit() are now deprecated.
This commit is contained in:
@@ -59,11 +59,8 @@ main(int argc, char **argv)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
mdb_init();
|
||||
|
||||
if (!(mdb = mdb_open(argv[optind], MDB_NOFLAGS))) {
|
||||
fprintf(stderr,_("Error: unable to open file %s\n"),argv[optind]);
|
||||
mdb_exit();
|
||||
exit(1);
|
||||
}
|
||||
switch(mdb->f->jet_version) {
|
||||
@@ -85,8 +82,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
mdb_close(mdb);
|
||||
mdb_exit();
|
||||
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user