Move catalog functions to catalog.c

This commit is contained in:
whydoubt
2004-06-23 04:35:47 +00:00
parent 017c35df6a
commit 8e665e09e9
4 changed files with 20 additions and 17 deletions

View File

@@ -47,6 +47,21 @@ static char *type_name[] = {"Form",
}
}
void mdb_alloc_catalog(MdbHandle *mdb)
{
mdb->catalog = g_ptr_array_new();
}
void mdb_free_catalog(MdbHandle *mdb)
{
unsigned int i;
if (!mdb->catalog) return;
for (i=0; i<mdb->catalog->len; i++)
g_free (g_ptr_array_index(mdb->catalog, i));
g_ptr_array_free(mdb->catalog, TRUE);
mdb->catalog = NULL;
}
/* new method */
GPtrArray *mdb_read_catalog (MdbHandle *mdb, int objtype)
{

View File

@@ -65,21 +65,6 @@ mdb_free_stats(MdbHandle *mdb)
mdb->stats = NULL;
}
void mdb_alloc_catalog(MdbHandle *mdb)
{
mdb->catalog = g_ptr_array_new();
}
void mdb_free_catalog(MdbHandle *mdb)
{
unsigned int i;
if (!mdb->catalog) return;
for (i=0; i<mdb->catalog->len; i++)
g_free (g_ptr_array_index(mdb->catalog, i));
g_ptr_array_free(mdb->catalog, TRUE);
mdb->catalog = NULL;
}
MdbTableDef *mdb_alloc_tabledef(MdbCatalogEntry *entry)
{
MdbTableDef *table;