change catalogentry to GPtrArray, documentation fixes, add ifdef wrapper to mdbsql.h

This commit is contained in:
brianb
2002-03-27 13:00:00 +00:00
parent 16ecc4fe4d
commit 9b8285d937
24 changed files with 111 additions and 112 deletions

View File

@@ -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);
}
}
}