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

@@ -1,7 +1,7 @@
# Generated automatically from Makefile.in by configure.
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -96,7 +96,7 @@ libmdbsql_la_LIBADD =
libmdbsql_la_OBJECTS = mdbsql.lo parser.lo lexer.lo
LEX_OUTPUT_ROOT = lex.yy
LEXLIB = -lfl
CFLAGS = -g -O2
CFLAGS = -g -O2 -DSQL
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)

View File

@@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

View File

@@ -286,7 +286,7 @@ int vlen;
void mdb_sql_listtables(MdbSQL *sql)
{
int i;
MdbCatalogEntry entry;
MdbCatalogEntry *entry;
MdbHandle *mdb = sql->mdb;
if (!mdb) {
@@ -304,11 +304,11 @@ MdbHandle *mdb = sql->mdb;
fprintf(stdout,"\n");
/* loop over each entry in the catalog */
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 (strncmp (entry.object_name, "MSys", 4)) {
print_value (entry.object_name,30,1);
if (entry->object_type == MDB_TABLE) {
if (strncmp (entry->object_name, "MSys", 4)) {
print_value (entry->object_name,30,1);
fprintf(stdout,"\n");
}
}
@@ -320,7 +320,7 @@ void mdb_sql_describe_table(MdbSQL *sql)
{
MdbTableDef *table = NULL;
MdbSQLTable *sql_tab;
MdbCatalogEntry entry;
MdbCatalogEntry *entry;
MdbHandle *mdb = sql->mdb;
MdbColumn *col;
int i;
@@ -336,10 +336,10 @@ char colsize[11];
mdb_read_catalog(mdb, MDB_TABLE);
for (i=0;i<mdb->num_catalog;i++) {
entry = g_array_index(mdb->catalog,MdbCatalogEntry,i);
if (entry.object_type == MDB_TABLE &&
!strcasecmp(entry.object_name,sql_tab->name)) {
table = mdb_read_table(&entry);
entry = g_ptr_array_index(mdb->catalog,i);
if (entry->object_type == MDB_TABLE &&
!strcasecmp(entry->object_name,sql_tab->name)) {
table = mdb_read_table(entry);
break;
}
}
@@ -385,7 +385,7 @@ char colsize[11];
void mdb_sql_select(MdbSQL *sql)
{
int i,j;
MdbCatalogEntry entry;
MdbCatalogEntry *entry;
MdbHandle *mdb = sql->mdb;
MdbTableDef *table = NULL;
MdbSQLTable *sql_tab;
@@ -404,10 +404,10 @@ int found = 0;
mdb_read_catalog(mdb, MDB_TABLE);
for (i=0;i<mdb->num_catalog;i++) {
entry = g_array_index(mdb->catalog,MdbCatalogEntry,i);
if (entry.object_type == MDB_TABLE &&
!strcasecmp(entry.object_name,sql_tab->name)) {
table = mdb_read_table(&entry);
entry = g_ptr_array_index(mdb->catalog,i);
if (entry->object_type == MDB_TABLE &&
!strcasecmp(entry->object_name,sql_tab->name)) {
table = mdb_read_table(entry);
break;
}
}