mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
change catalogentry to GPtrArray, documentation fixes, add ifdef wrapper to mdbsql.h
This commit is contained in:
@@ -24,7 +24,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
int i, j, k;
|
||||
MdbHandle *mdb;
|
||||
MdbCatalogEntry entry;
|
||||
MdbCatalogEntry *entry;
|
||||
MdbTableDef *table;
|
||||
MdbColumn *col;
|
||||
|
||||
@@ -48,22 +48,22 @@ MdbColumn *col;
|
||||
|
||||
for (i=0; i < mdb->num_catalog; i++)
|
||||
{
|
||||
entry = g_array_index (mdb->catalog, MdbCatalogEntry, i);
|
||||
entry = g_ptr_array_index (mdb->catalog, i);
|
||||
|
||||
/* if it's a table */
|
||||
|
||||
if (entry.object_type == MDB_TABLE)
|
||||
if (entry->object_type == MDB_TABLE)
|
||||
{
|
||||
/* skip the MSys tables */
|
||||
if (strncmp (entry.object_name, "MSys", 4))
|
||||
if (strncmp (entry->object_name, "MSys", 4))
|
||||
{
|
||||
|
||||
/* make sure it's a table (may be redundant) */
|
||||
|
||||
if (!strcmp (mdb_get_objtype_string (entry.object_type), "Table"))
|
||||
if (!strcmp (mdb_get_objtype_string (entry->object_type), "Table"))
|
||||
{
|
||||
/* drop the table if it exists */
|
||||
fprintf (stdout, "%s ", entry.object_name);
|
||||
fprintf (stdout, "%s ", entry->object_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user