From e7927f94bc5b27866fa314407117dbb1b1c03640 Mon Sep 17 00:00:00 2001 From: brianb Date: Sun, 14 Apr 2002 23:35:39 +0000 Subject: [PATCH] Fixed unixODBC 2.1.0+ bug. fixed GTK/Gnome handling. more debugger stuff. --- INSTALL | 7 +- Makefile | 9 +- Makefile.in | 7 +- README | 15 +++- configure | 192 ++++++++++++++++++++++++----------------- configure.in | 45 +++++++--- include/Makefile | 11 +-- include/Makefile.am | 2 +- include/Makefile.in | 9 +- src/Makefile | 13 +-- src/Makefile.am | 2 +- src/Makefile.in | 11 +-- src/extras/Makefile | 11 +-- src/extras/Makefile.in | 7 +- src/gmdb/Makefile.am | 16 ++-- src/gmdb/debug.c | 24 ++++++ src/gmdb/main.c | 4 + src/libmdb/Makefile | 11 +-- src/libmdb/Makefile.in | 7 +- src/odbc/Makefile | 23 +++-- src/odbc/Makefile.am | 3 +- src/odbc/Makefile.in | 57 ++++++------ src/odbc/odbc.c | 126 ++++++++++++++++++++++++++- src/sql/Makefile | 11 +-- src/sql/Makefile.in | 7 +- src/util/Makefile | 11 +-- src/util/Makefile.in | 7 +- 27 files changed, 443 insertions(+), 205 deletions(-) diff --git a/INSTALL b/INSTALL index 2636a4e..90bed81 100644 --- a/INSTALL +++ b/INSTALL @@ -4,6 +4,11 @@ Basic Installation $ ./configure $ make +or for a complete install (requires bison, flex, and unixODBC): + + $ ./configure --enable-sql --with-unixodbc=/usr/local + $ make + This will build some useful utilities: mdb-ver -- prints the version (JET 3 or 4) of an mdb file @@ -15,6 +20,7 @@ mdb-header -- generates a C header to be used in exporting mdb data to a C prog. mdb-parsecvs -- generates a C program given a CSV file made with mdb-export mdb-sql -- if --enable-sql is specified, a simple SQL engine (also used by ODBC and gmdb). +gmdb -- a graphical utility to browse MDB files. And some utilities useful for debugging: @@ -38,4 +44,3 @@ capabilities. bison installed for this option. --with-unixodbc specifies the location of the unixODBC driver manager and causes the ODBC driver to be built. - diff --git a/Makefile b/Makefile index 9bd33f8..21aba6b 100644 --- a/Makefile +++ b/Makefile @@ -62,9 +62,11 @@ host_triplet = i686-pc-linux-gnu AS = @AS@ CC = gcc DLLTOOL = @DLLTOOL@ -GTK_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -GTK_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GMDB_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include +GMDB_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl HAVE_GNOME = +HAVE_GTK = +HAVE_ODBC = LD = /usr/bin/ld LEX = flex LIBTOOL = $(SHELL) $(top_builddir)/libtool @@ -72,13 +74,12 @@ LN_S = ln -s MAKEINFO = makeinfo NM = /usr/bin/nm -B OBJDUMP = @OBJDUMP@ -ODBC = ODBC_INC = /usr/local/include PACKAGE = mdbtools RANLIB = ranlib READLINE_LIBS = -lncurses -lreadline SQL = -VERSION = 0.3 +VERSION = 0.4 YACC = bison -y SUBDIRS = src include diff --git a/Makefile.in b/Makefile.in index 45220a9..9e41ca2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -62,9 +62,11 @@ host_triplet = @host@ AS = @AS@ CC = @CC@ DLLTOOL = @DLLTOOL@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ +GMDB_CFLAGS = @GMDB_CFLAGS@ +GMDB_LIBS = @GMDB_LIBS@ HAVE_GNOME = @HAVE_GNOME@ +HAVE_GTK = @HAVE_GTK@ +HAVE_ODBC = @HAVE_ODBC@ LD = @LD@ LEX = @LEX@ LIBTOOL = @LIBTOOL@ @@ -72,7 +74,6 @@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ NM = @NM@ OBJDUMP = @OBJDUMP@ -ODBC = @ODBC@ ODBC_INC = @ODBC_INC@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ diff --git a/README b/README index 6d029cf..e34d733 100644 --- a/README +++ b/README @@ -1,6 +1,19 @@ This is mdbtools version 0.4 -This software is still beta so don't expect too much. +Welcome to the exciting world of MDB Tools! In short, MDB Tools is a set of +program to help you use Microsoft Access file in various settings. The major +pieces are: + +. libmdb - the core library that allows access to MDB files programatically. +. libmdbsql - builds on libmdb to provide a SQL engine (ala Jet) +. utils - provides command line utilities to list tables, export schema, + and data, show the version of the files, and other useful stuff. +. mdb-sql - a command line SQL tool that allows one to type sql queries and + get results. +. odbc - An ODBC driver for use with unixODBC driver manager. Allows + one to use MDB files with PHP for example. +. gmdb - The GTK MDB File Viewer and debugger. Still alpha, but making + great progress. If you are interested in helping, read the HACKING file for a description of where the code stands and what has been gleened of the file format. diff --git a/configure b/configure index 3652436..346c40a 100755 --- a/configure +++ b/configure @@ -707,7 +707,7 @@ fi PACKAGE=mdbtools -VERSION=0.3 +VERSION=0.4 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -1039,7 +1039,6 @@ else SET_MAKE="MAKE=${MAKE-make}" fi -#AC_PROG_RANLIB # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -1116,7 +1115,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1120: checking host system type" >&5 +echo "configure:1119: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1137,7 +1136,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1141: checking build system type" >&5 +echo "configure:1140: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1157,7 +1156,7 @@ echo "$ac_t""$build" 1>&6 # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1161: checking for $ac_word" >&5 +echo "configure:1160: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1196,7 +1195,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1200: checking for ld used by GCC" >&5 +echo "configure:1199: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -1220,10 +1219,10 @@ echo "configure:1200: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1224: checking for GNU ld" >&5 +echo "configure:1223: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1227: checking for non-GNU ld" >&5 +echo "configure:1226: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1259,7 +1258,7 @@ fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1263: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1262: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1275,7 +1274,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1279: checking for BSD-compatible nm" >&5 +echo "configure:1278: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1312,7 +1311,7 @@ echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1316: checking whether ln -s works" >&5 +echo "configure:1315: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1356,8 +1355,8 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1360 "configure"' > conftest.$ac_ext - if { (eval echo configure:1361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1359 "configure"' > conftest.$ac_ext + if { (eval echo configure:1360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1378,19 +1377,19 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1382: checking whether the C compiler needs -belf" >&5 +echo "configure:1381: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1492,7 +1491,7 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' exec 5>>./config.log echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1496: checking how to run the C preprocessor" >&5 +echo "configure:1495: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1507,13 +1506,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1524,13 +1523,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1541,13 +1540,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1577,7 +1576,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1581: checking for $ac_word" >&5 +echo "configure:1580: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1610,7 +1609,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex"" # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1614: checking for $ac_word" >&5 +echo "configure:1613: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1644,7 +1643,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:1648: checking for yywrap in -l$ac_lib" >&5 +echo "configure:1647: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1652,7 +1651,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1686,7 +1685,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:1690: checking lex output file root" >&5 +echo "configure:1689: checking lex output file root" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1707,7 +1706,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:1711: checking whether yytext is a pointer" >&5 +echo "configure:1710: checking whether yytext is a pointer" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1719,14 +1718,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yes else @@ -1752,7 +1751,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1756: checking for $ac_word" >&5 +echo "configure:1755: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1784,12 +1783,12 @@ test -n "$YACC" || YACC="yacc" echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1788: checking for ANSI C header files" >&5 +echo "configure:1787: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1797,7 +1796,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1814,7 +1813,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1832,7 +1831,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1853,7 +1852,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1864,7 +1863,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1891,17 +1890,17 @@ for ac_hdr in fcntl.h limits.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1895: checking for $ac_hdr" >&5 +echo "configure:1894: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1931,17 +1930,17 @@ for ac_hdr in wordexp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1935: checking for $ac_hdr" >&5 +echo "configure:1934: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1969,12 +1968,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1973: checking for working const" >&5 +echo "configure:1972: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2044,12 +2043,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2048: checking for size_t" >&5 +echo "configure:2047: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2078,14 +2077,14 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2082: checking whether byte ordering is bigendian" >&5 +echo "configure:2081: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -2096,11 +2095,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -2111,7 +2110,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2131,7 +2130,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -2194,11 +2193,11 @@ fi if test x$odbc = xtrue; then - ODBC_TRUE= - ODBC_FALSE='#' + HAVE_ODBC_TRUE= + HAVE_ODBC_FALSE='#' else - ODBC_TRUE='#' - ODBC_FALSE= + HAVE_ODBC_TRUE='#' + HAVE_ODBC_FALSE= fi @@ -2211,7 +2210,6 @@ fi if test "$enable_sql" = "yes" ; then - echo "SQL ENABLED!" CFLAGS="$CFLAGS -DSQL" sql=true fi @@ -2226,8 +2224,40 @@ else fi +echo $ac_n "checking for GTK >= 1.2.0""... $ac_c" 1>&6 +echo "configure:2229: checking for GTK >= 1.2.0" >&5 +if gnome-config --version > /dev/null 2>&1 +then + verstxt=`gtk-config --version` + vers=`echo "$verstxt" | \ + awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` + if test "$vers" -ge 1002000 + then + echo "$ac_t""found" 1>&6 + GMDB_LIBS=`gtk-config --libs` + GMDB_CFLAGS=`gtk-config --cflags` + havegtk=true + else + echo "$ac_t""not found" 1>&6 + havegtk=false + fi +else + echo "$ac_t""not found" 1>&6 + havegtk=false +fi + + +if test x$havegtk = xtrue; then + HAVE_GTK_TRUE= + HAVE_GTK_FALSE='#' +else + HAVE_GTK_TRUE='#' + HAVE_GTK_FALSE= +fi + + echo $ac_n "checking for Gnome >= 1.2.0""... $ac_c" 1>&6 -echo "configure:2231: checking for Gnome >= 1.2.0" >&5 +echo "configure:2261: checking for Gnome >= 1.2.0" >&5 if gnome-config --version > /dev/null 2>&1 then verstxt=`gnome-config --version` @@ -2237,20 +2267,16 @@ then then echo "$ac_t""found" 1>&6 CFLAGS="$CFLAGS -DHAVE_GNOME" - GTK_LIBS=`gnome-config gnome gnomeui --libs` - GTK_CFLAGS=`gnome-config gnome gnomeui --cflags` + GMDB_LIBS=`gnome-config gnome gnomeui --libs` + GMDB_CFLAGS=`gnome-config gnome gnomeui --cflags` havegnome=true else echo "$ac_t""not found" 1>&6 - GTK_LIBS=`gtk-config --libs` - GTK_CFLAGS=`gtk-config --cflags` havegnome=false fi else echo "$ac_t""not found" 1>&6 havegnome=false - GTK_LIBS=`gtk-config --libs` - GTK_CFLAGS=`gtk-config --cflags` fi @@ -2266,10 +2292,11 @@ fi + OLDLDFLAGS=$LDFLAGS echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:2273: checking for initscr in -lncurses" >&5 +echo "configure:2300: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2277,7 +2304,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2313,7 +2340,7 @@ fi echo $ac_n "checking for add_history in -lreadline""... $ac_c" 1>&6 -echo "configure:2317: checking for add_history in -lreadline" >&5 +echo "configure:2344: checking for add_history in -lreadline" >&5 ac_lib_var=`echo readline'_'add_history | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2321,7 +2348,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2540,18 +2567,21 @@ s%@LEXLIB@%$LEXLIB%g s%@CPP@%$CPP%g s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g s%@YACC@%$YACC%g -s%@ODBC_TRUE@%$ODBC_TRUE%g -s%@ODBC_FALSE@%$ODBC_FALSE%g -s%@ODBC@%$ODBC%g +s%@HAVE_ODBC_TRUE@%$HAVE_ODBC_TRUE%g +s%@HAVE_ODBC_FALSE@%$HAVE_ODBC_FALSE%g +s%@HAVE_ODBC@%$HAVE_ODBC%g s%@ODBC_INC@%$ODBC_INC%g s%@SQL_TRUE@%$SQL_TRUE%g s%@SQL_FALSE@%$SQL_FALSE%g s%@SQL@%$SQL%g +s%@HAVE_GTK_TRUE@%$HAVE_GTK_TRUE%g +s%@HAVE_GTK_FALSE@%$HAVE_GTK_FALSE%g +s%@HAVE_GTK@%$HAVE_GTK%g s%@HAVE_GNOME_TRUE@%$HAVE_GNOME_TRUE%g s%@HAVE_GNOME_FALSE@%$HAVE_GNOME_FALSE%g s%@HAVE_GNOME@%$HAVE_GNOME%g -s%@GTK_LIBS@%$GTK_LIBS%g -s%@GTK_CFLAGS@%$GTK_CFLAGS%g +s%@GMDB_LIBS@%$GMDB_LIBS%g +s%@GMDB_CFLAGS@%$GMDB_CFLAGS%g s%@READLINE_LIBS@%$READLINE_LIBS%g CEOF diff --git a/configure.in b/configure.in index 86e2d48..cc541d9 100644 --- a/configure.in +++ b/configure.in @@ -1,11 +1,10 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(src/extras/mdb-dump.c) -AM_INIT_AUTOMAKE(mdbtools,0.3) +AM_INIT_AUTOMAKE(mdbtools,0.4) AC_PROG_CC(gcc) dnl Checks for programs. AC_PROG_MAKE_SET -#AC_PROG_RANLIB AM_PROG_LIBTOOL AM_PROG_LEX AC_PROG_YACC @@ -39,21 +38,44 @@ if test "$with_unixodbc"; then ODBC_INC=$with_unixodbc/include odbc=true fi -AM_CONDITIONAL(ODBC, test x$odbc = xtrue) -AC_SUBST(ODBC) +AM_CONDITIONAL(HAVE_ODBC, test x$odbc = xtrue) +AC_SUBST(HAVE_ODBC) AC_SUBST(ODBC_INC) AC_ARG_ENABLE(sql, [ --enable-sql Enable SQL engine]) if test "$enable_sql" = "yes" ; then - echo "SQL ENABLED!" CFLAGS="$CFLAGS -DSQL" sql=true fi AM_CONDITIONAL(SQL, test x$sql = xtrue) AC_SUBST(SQL) +dnl gnome check modified from gnome-db +AC_MSG_CHECKING(for GTK >= 1.2.0) +if gnome-config --version > /dev/null 2>&1 +then + verstxt=`gtk-config --version` + vers=`echo "$verstxt" | \ + awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` + if test "$vers" -ge 1002000 + then + AC_MSG_RESULT(found) + GMDB_LIBS=`gtk-config --libs` + GMDB_CFLAGS=`gtk-config --cflags` + havegtk=true + else + AC_MSG_RESULT(not found) + havegtk=false + fi +else + AC_MSG_RESULT(not found) + havegtk=false +fi +AM_CONDITIONAL(HAVE_GTK, test x$havegtk = xtrue) +AC_SUBST(HAVE_GTK) + dnl gnome check modified from gnome-db AC_MSG_CHECKING(for Gnome >= 1.2.0) if gnome-config --version > /dev/null 2>&1 @@ -65,25 +87,22 @@ then then AC_MSG_RESULT(found) CFLAGS="$CFLAGS -DHAVE_GNOME" - GTK_LIBS=`gnome-config gnome gnomeui --libs` - GTK_CFLAGS=`gnome-config gnome gnomeui --cflags` + GMDB_LIBS=`gnome-config gnome gnomeui --libs` + GMDB_CFLAGS=`gnome-config gnome gnomeui --cflags` havegnome=true else AC_MSG_RESULT(not found) - GTK_LIBS=`gtk-config --libs` - GTK_CFLAGS=`gtk-config --cflags` havegnome=false fi else AC_MSG_RESULT(not found) havegnome=false - GTK_LIBS=`gtk-config --libs` - GTK_CFLAGS=`gtk-config --cflags` fi AM_CONDITIONAL(HAVE_GNOME, test x$havegnome = xtrue) AC_SUBST(HAVE_GNOME) -AC_SUBST(GTK_LIBS) -AC_SUBST(GTK_CFLAGS) + +AC_SUBST(GMDB_LIBS) +AC_SUBST(GMDB_CFLAGS) dnl Checks for library functions. diff --git a/include/Makefile b/include/Makefile index 32c1d82..a8f3c40 100644 --- a/include/Makefile +++ b/include/Makefile @@ -62,9 +62,11 @@ host_triplet = i686-pc-linux-gnu AS = @AS@ CC = gcc DLLTOOL = @DLLTOOL@ -GTK_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -GTK_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GMDB_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include +GMDB_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl HAVE_GNOME = +HAVE_GTK = +HAVE_ODBC = LD = /usr/bin/ld LEX = flex LIBTOOL = $(SHELL) $(top_builddir)/libtool @@ -72,16 +74,15 @@ LN_S = ln -s MAKEINFO = makeinfo NM = /usr/bin/nm -B OBJDUMP = @OBJDUMP@ -ODBC = ODBC_INC = /usr/local/include PACKAGE = mdbtools RANLIB = ranlib READLINE_LIBS = -lncurses -lreadline SQL = -VERSION = 0.3 +VERSION = 0.4 YACC = bison -y -include_HEADERS = mdbtools.h mdbsql.h +include_HEADERS = mdbtools.h mdbsql.h mdbodbc.h mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = HEADERS = $(include_HEADERS) diff --git a/include/Makefile.am b/include/Makefile.am index 1b7d753..25e5397 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1 +1 @@ -include_HEADERS = mdbtools.h mdbsql.h +include_HEADERS = mdbtools.h mdbsql.h mdbodbc.h diff --git a/include/Makefile.in b/include/Makefile.in index 5f1d962..4d1702b 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -62,9 +62,11 @@ host_triplet = @host@ AS = @AS@ CC = @CC@ DLLTOOL = @DLLTOOL@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ +GMDB_CFLAGS = @GMDB_CFLAGS@ +GMDB_LIBS = @GMDB_LIBS@ HAVE_GNOME = @HAVE_GNOME@ +HAVE_GTK = @HAVE_GTK@ +HAVE_ODBC = @HAVE_ODBC@ LD = @LD@ LEX = @LEX@ LIBTOOL = @LIBTOOL@ @@ -72,7 +74,6 @@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ NM = @NM@ OBJDUMP = @OBJDUMP@ -ODBC = @ODBC@ ODBC_INC = @ODBC_INC@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ @@ -81,7 +82,7 @@ SQL = @SQL@ VERSION = @VERSION@ YACC = @YACC@ -include_HEADERS = mdbtools.h mdbsql.h +include_HEADERS = mdbtools.h mdbsql.h mdbodbc.h mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = HEADERS = $(include_HEADERS) diff --git a/src/Makefile b/src/Makefile index 885010f..ae6dd6c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -62,9 +62,11 @@ host_triplet = i686-pc-linux-gnu AS = @AS@ CC = gcc DLLTOOL = @DLLTOOL@ -GTK_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -GTK_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GMDB_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include +GMDB_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl HAVE_GNOME = +HAVE_GTK = +HAVE_ODBC = LD = /usr/bin/ld LEX = flex LIBTOOL = $(SHELL) $(top_builddir)/libtool @@ -72,15 +74,14 @@ LN_S = ln -s MAKEINFO = makeinfo NM = /usr/bin/nm -B OBJDUMP = @OBJDUMP@ -ODBC = ODBC_INC = /usr/local/include PACKAGE = mdbtools RANLIB = ranlib READLINE_LIBS = -lncurses -lreadline SQL = -VERSION = 0.3 +VERSION = 0.4 YACC = bison -y -SUBDIRS = libmdb sql util extras +SUBDIRS = libmdb sql util extras odbc gmdb #SUBDIRS = #libmdb util extras DEFDIR = $(prefix) #DEFDIR = #$(prefix) @@ -93,7 +94,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best -DIST_SUBDIRS = libmdb sql util extras libmdb util extras +DIST_SUBDIRS = libmdb sql util extras odbc gmdb libmdb util extras all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) diff --git a/src/Makefile.am b/src/Makefile.am index 5fbc255..642b5ae 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,5 @@ if SQL -SUBDIRS = libmdb sql util extras +SUBDIRS = libmdb sql util extras odbc gmdb DEFDIR = $(prefix) else SUBDIRS = libmdb util extras diff --git a/src/Makefile.in b/src/Makefile.in index 27781a4..fd248c4 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -62,9 +62,11 @@ host_triplet = @host@ AS = @AS@ CC = @CC@ DLLTOOL = @DLLTOOL@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ +GMDB_CFLAGS = @GMDB_CFLAGS@ +GMDB_LIBS = @GMDB_LIBS@ HAVE_GNOME = @HAVE_GNOME@ +HAVE_GTK = @HAVE_GTK@ +HAVE_ODBC = @HAVE_ODBC@ LD = @LD@ LEX = @LEX@ LIBTOOL = @LIBTOOL@ @@ -72,7 +74,6 @@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ NM = @NM@ OBJDUMP = @OBJDUMP@ -ODBC = @ODBC@ ODBC_INC = @ODBC_INC@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ @@ -80,7 +81,7 @@ READLINE_LIBS = @READLINE_LIBS@ SQL = @SQL@ VERSION = @VERSION@ YACC = @YACC@ -@SQL_TRUE@SUBDIRS = @SQL_TRUE@libmdb sql util extras +@SQL_TRUE@SUBDIRS = @SQL_TRUE@libmdb sql util extras odbc gmdb @SQL_FALSE@SUBDIRS = @SQL_FALSE@libmdb util extras @SQL_TRUE@DEFDIR = @SQL_TRUE@$(prefix) @SQL_FALSE@DEFDIR = @SQL_FALSE@$(prefix) @@ -93,7 +94,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best -DIST_SUBDIRS = libmdb sql util extras libmdb util extras +DIST_SUBDIRS = libmdb sql util extras odbc gmdb libmdb util extras all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) diff --git a/src/extras/Makefile b/src/extras/Makefile index a7b73dc..2507da0 100644 --- a/src/extras/Makefile +++ b/src/extras/Makefile @@ -62,9 +62,11 @@ host_triplet = i686-pc-linux-gnu AS = @AS@ CC = gcc DLLTOOL = @DLLTOOL@ -GTK_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -GTK_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GMDB_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include +GMDB_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl HAVE_GNOME = +HAVE_GTK = +HAVE_ODBC = LD = /usr/bin/ld LEX = flex LIBTOOL = $(SHELL) $(top_builddir)/libtool @@ -72,13 +74,12 @@ LN_S = ln -s MAKEINFO = makeinfo NM = /usr/bin/nm -B OBJDUMP = @OBJDUMP@ -ODBC = ODBC_INC = /usr/local/include PACKAGE = mdbtools RANLIB = ranlib READLINE_LIBS = -lncurses -lreadline SQL = -VERSION = 0.3 +VERSION = 0.4 YACC = bison -y bin_PROGRAMS = mdb-dump @@ -91,7 +92,7 @@ CONFIG_CLEAN_FILES = PROGRAMS = $(bin_PROGRAMS) -DEFS = -DPACKAGE=\"mdbtools\" -DVERSION=\"0.3\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WORDEXP_H=1 -DHAVE_READLINE=1 -I. -I$(srcdir) +DEFS = -DPACKAGE=\"mdbtools\" -DVERSION=\"0.4\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WORDEXP_H=1 -DHAVE_READLINE=1 -I. -I$(srcdir) CPPFLAGS = LDFLAGS = mdb_dump_OBJECTS = mdb-dump.o mdbsupport.o diff --git a/src/extras/Makefile.in b/src/extras/Makefile.in index 79205b5..a7e9fcf 100644 --- a/src/extras/Makefile.in +++ b/src/extras/Makefile.in @@ -62,9 +62,11 @@ host_triplet = @host@ AS = @AS@ CC = @CC@ DLLTOOL = @DLLTOOL@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ +GMDB_CFLAGS = @GMDB_CFLAGS@ +GMDB_LIBS = @GMDB_LIBS@ HAVE_GNOME = @HAVE_GNOME@ +HAVE_GTK = @HAVE_GTK@ +HAVE_ODBC = @HAVE_ODBC@ LD = @LD@ LEX = @LEX@ LIBTOOL = @LIBTOOL@ @@ -72,7 +74,6 @@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ NM = @NM@ OBJDUMP = @OBJDUMP@ -ODBC = @ODBC@ ODBC_INC = @ODBC_INC@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ diff --git a/src/gmdb/Makefile.am b/src/gmdb/Makefile.am index 2fb585e..c516f04 100644 --- a/src/gmdb/Makefile.am +++ b/src/gmdb/Makefile.am @@ -1,10 +1,16 @@ +if HAVE_GTK bin_PROGRAMS = gmdb +include_HEADERS = gmdb.h gtkhlist.h debug.xpm forms.xpm macros.xpm pk.xpm \ + table.xpm query.xpm code.xpm reports.xpm gmdb_SOURCES = debug.c file.c form.c gtkhlist.c info.c macro.c main.c \ module.c query.c report.c sql.c table.c table_data.c table_def.c \ table_export.c util.c -LIBS = $(GTK_LIBS) @LEXLIB@ -INCLUDES = -I$(top_srcdir)/include $(GTK_CFLAGS) -LDADD = ../libmdb/libmdb.la -if SQL -gmdb_LDADD = ../libmdb/libmdb.la ../sql/libmdbsql.la +LIBS = $(GMDB_LIBS) @LEXLIB@ +INCLUDES = -I$(top_srcdir)/include $(GMDB_CFLAGS) +#LDADD = ../libmdb/libmdb.la +LDADD = ../libmdb/libmdb.la ../sql/libmdbsql.la +#if SQL +#gmdb_LDADD = ../libmdb/libmdb.la ../sql/libmdbsql.la +#endif + endif diff --git a/src/gmdb/debug.c b/src/gmdb/debug.c index 591dbfb..22ac8be 100644 --- a/src/gmdb/debug.c +++ b/src/gmdb/debug.c @@ -95,19 +95,31 @@ int i; gmdb_debug_redraw(dbug->textbox, dbug->font, &dbug->white, &dbug->black, dbug->linesz * start_row + start_col, dbug->linesz * start_row + end_col + 2); + gmdb_debug_redraw(dbug->textbox, dbug->font, &dbug->white, &dbug->black, + dbug->linesz * start_row + 59 + (range->start_byte % 16), + dbug->linesz * start_row + 59 + (range->end_byte % 16) + 1); } else { gmdb_debug_redraw(dbug->textbox, dbug->font, &dbug->white, &dbug->black, dbug->linesz * start_row + start_col, /* 55 = 8 (addr) + 15 (bytes) * 3 (%02x " ") + 2 (last byte) */ dbug->linesz * start_row + 55); + gmdb_debug_redraw(dbug->textbox, dbug->font, &dbug->white, &dbug->black, + dbug->linesz * start_row + 59 + (range->start_byte % 16), + dbug->linesz * start_row + 75); for (i=start_row + 1; i < end_row; i++) { gmdb_debug_redraw(dbug->textbox, dbug->font, &dbug->white, &dbug->black, dbug->linesz * i + 8, dbug->linesz * i + 55); + gmdb_debug_redraw(dbug->textbox, dbug->font, + &dbug->white, &dbug->black, + dbug->linesz * i + 59, dbug->linesz * i + 75); } gmdb_debug_redraw(dbug->textbox, dbug->font, &dbug->white, &dbug->black, dbug->linesz * end_row + 8, dbug->linesz * end_row + end_col + 2); + gmdb_debug_redraw(dbug->textbox, dbug->font, &dbug->white, &dbug->black, + dbug->linesz * end_row + 59, + dbug->linesz * end_row + 59 + (range->end_byte % 16) + 1); } gtk_text_thaw(GTK_TEXT(dbug->textbox)); } @@ -132,19 +144,31 @@ int i; gmdb_debug_redraw(dbug->textbox, dbug->font, &dbug->black, &dbug->white, dbug->linesz * start_row + start_col, dbug->linesz * start_row + end_col + 2); + gmdb_debug_redraw(dbug->textbox, dbug->font, &dbug->black, &dbug->white, + dbug->linesz * start_row + 59 + (range->start_byte % 16), + dbug->linesz * start_row + 59 + (range->end_byte % 16) + 1); } else { gmdb_debug_redraw(dbug->textbox, dbug->font, &dbug->black, &dbug->white, dbug->linesz * start_row + start_col, /* 55 = 8 (addr) + 15 (bytes) * 3 (%02x " ") + 2 (last byte) */ dbug->linesz * start_row + 55); + gmdb_debug_redraw(dbug->textbox, dbug->font, &dbug->black, &dbug->white, + dbug->linesz * start_row + 59 + (range->start_byte % 16), + dbug->linesz * start_row + 75); for (i=start_row + 1; i < end_row; i++) { gmdb_debug_redraw(dbug->textbox, dbug->font, &dbug->black, &dbug->white, dbug->linesz * i + 8, dbug->linesz * i + 55); + gmdb_debug_redraw(dbug->textbox, dbug->font, + &dbug->black, &dbug->white, + dbug->linesz * i + 59, dbug->linesz * i + 75); } gmdb_debug_redraw(dbug->textbox, dbug->font, &dbug->black, &dbug->white, dbug->linesz * end_row + 8, dbug->linesz * end_row + end_col + 2); + gmdb_debug_redraw(dbug->textbox, dbug->font, &dbug->black, &dbug->white, + dbug->linesz * end_row + 59, + dbug->linesz * end_row + 59 + (range->end_byte % 16) + 1); } } void diff --git a/src/gmdb/main.c b/src/gmdb/main.c index 1b16c44..b16de52 100644 --- a/src/gmdb/main.c +++ b/src/gmdb/main.c @@ -242,8 +242,10 @@ gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]); #endif +#ifdef SQL /* initialize the SQL engine */ sql = mdb_sql_init(); +#endif /* initialize MDB Tools library */ mdb_init(); @@ -314,8 +316,10 @@ gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]); /* enter the main loop */ gtk_main (); +#ifdef SQL /* free MDB Tools library */ mdb_sql_exit(sql); +#endif mdb_exit(); return 0; diff --git a/src/libmdb/Makefile b/src/libmdb/Makefile index 296ba75..4e3a7c1 100644 --- a/src/libmdb/Makefile +++ b/src/libmdb/Makefile @@ -62,9 +62,11 @@ host_triplet = i686-pc-linux-gnu AS = @AS@ CC = gcc DLLTOOL = @DLLTOOL@ -GTK_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -GTK_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GMDB_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include +GMDB_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl HAVE_GNOME = +HAVE_GTK = +HAVE_ODBC = LD = /usr/bin/ld LEX = flex LIBTOOL = $(SHELL) $(top_builddir)/libtool @@ -72,13 +74,12 @@ LN_S = ln -s MAKEINFO = makeinfo NM = /usr/bin/nm -B OBJDUMP = @OBJDUMP@ -ODBC = ODBC_INC = /usr/local/include PACKAGE = mdbtools RANLIB = ranlib READLINE_LIBS = -lncurses -lreadline SQL = -VERSION = 0.3 +VERSION = 0.4 YACC = bison -y lib_LTLIBRARIES = libmdb.la @@ -90,7 +91,7 @@ CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) -DEFS = -DPACKAGE=\"mdbtools\" -DVERSION=\"0.3\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WORDEXP_H=1 -DHAVE_READLINE=1 -I. -I$(srcdir) +DEFS = -DPACKAGE=\"mdbtools\" -DVERSION=\"0.4\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WORDEXP_H=1 -DHAVE_READLINE=1 -I. -I$(srcdir) CPPFLAGS = LDFLAGS = libmdb_la_LDFLAGS = diff --git a/src/libmdb/Makefile.in b/src/libmdb/Makefile.in index f2ea88b..9d10a0a 100644 --- a/src/libmdb/Makefile.in +++ b/src/libmdb/Makefile.in @@ -62,9 +62,11 @@ host_triplet = @host@ AS = @AS@ CC = @CC@ DLLTOOL = @DLLTOOL@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ +GMDB_CFLAGS = @GMDB_CFLAGS@ +GMDB_LIBS = @GMDB_LIBS@ HAVE_GNOME = @HAVE_GNOME@ +HAVE_GTK = @HAVE_GTK@ +HAVE_ODBC = @HAVE_ODBC@ LD = @LD@ LEX = @LEX@ LIBTOOL = @LIBTOOL@ @@ -72,7 +74,6 @@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ NM = @NM@ OBJDUMP = @OBJDUMP@ -ODBC = @ODBC@ ODBC_INC = @ODBC_INC@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ diff --git a/src/odbc/Makefile b/src/odbc/Makefile index 9952913..dfeda5a 100644 --- a/src/odbc/Makefile +++ b/src/odbc/Makefile @@ -62,9 +62,11 @@ host_triplet = i686-pc-linux-gnu AS = @AS@ CC = gcc DLLTOOL = @DLLTOOL@ -GTK_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -GTK_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl +GMDB_CFLAGS = -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include +GMDB_LIBS = -rdynamic -L/usr/lib -L/usr/X11R6/lib -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb1 -lglib -ldl HAVE_GNOME = +HAVE_GTK = +HAVE_ODBC = LD = /usr/bin/ld LEX = flex LIBTOOL = $(SHELL) $(top_builddir)/libtool @@ -72,13 +74,12 @@ LN_S = ln -s MAKEINFO = makeinfo NM = /usr/bin/nm -B OBJDUMP = @OBJDUMP@ -ODBC = ODBC_INC = /usr/local/include PACKAGE = mdbtools RANLIB = ranlib READLINE_LIBS = -lncurses -lreadline SQL = -VERSION = 0.3 +VERSION = 0.4 YACC = bison -y include_HEADERS = connectparams.h @@ -87,7 +88,6 @@ SQLSOURCES = mdbsql.c parser.c lexer.c MDBDIR = ../libmdb MDBSOURCES = backend.c index.c money.c catalog.c kkd.c sargs.c \ data.c like.c table.c dump.c file.c mem.c - bin_PROGRAMS = unittest lib_LTLIBRARIES = libmdbodbc.la INCLUDES = -I ../../include `glib-config --cflags` @@ -96,7 +96,6 @@ libmdbodbc_la_LIBADD = $(patsubst %, $(SQLDIR)/%, \ $(patsubst %.c, %.lo, $(SQLSOURCES))) \ $(patsubst %, $(MDBDIR)/%, \ $(patsubst %.c, %.lo, $(MDBSOURCES))) -lglib - LIBS = -lfl `glib-config --libs` unittest_LDADD = libmdbodbc.la ../libmdb/libmdb.la ../sql/libmdbsql.la mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -104,20 +103,20 @@ CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) -DEFS = -DPACKAGE=\"mdbtools\" -DVERSION=\"0.3\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WORDEXP_H=1 -DHAVE_READLINE=1 -I. -I$(srcdir) +DEFS = -DPACKAGE=\"mdbtools\" -DVERSION=\"0.4\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WORDEXP_H=1 -DHAVE_READLINE=1 -I. -I$(srcdir) CPPFLAGS = LDFLAGS = libmdbodbc_la_LDFLAGS = -libmdbodbc_la_DEPENDENCIES = $(patsubst %, $(SQLDIR)/%, $(patsubst %.c, \ -%.lo, $(SQLSOURCES))) $(patsubst %, $(MDBDIR)/%, $(patsubst %.c, %.lo, \ -$(MDBSOURCES))) +libmdbodbc_la_DEPENDENCIES = $(patsubst %, $(SQLDIR)/%, \ +$(patsubst %.c, %.lo, $(SQLSOURCES))) $(patsubst %, \ +$(MDBDIR)/%, $(patsubst %.c, %.lo, $(MDBSOURCES))) libmdbodbc_la_OBJECTS = odbc.lo connectparams.lo PROGRAMS = $(bin_PROGRAMS) unittest_SOURCES = unittest.c unittest_OBJECTS = unittest.o -unittest_DEPENDENCIES = libmdbodbc.la ../libmdb/libmdb.la \ -../sql/libmdbsql.la +unittest_DEPENDENCIES = libmdbodbc.la \ +../libmdb/libmdb.la ../sql/libmdbsql.la unittest_LDFLAGS = CFLAGS = -g -O2 -DUNIXODBC -DSQL -DHAVE_GNOME COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) diff --git a/src/odbc/Makefile.am b/src/odbc/Makefile.am index 79077af..e729228 100644 --- a/src/odbc/Makefile.am +++ b/src/odbc/Makefile.am @@ -1,3 +1,4 @@ +if HAVE_ODBC include_HEADERS = connectparams.h SQLDIR = ../sql SQLSOURCES = mdbsql.c parser.c lexer.c @@ -18,4 +19,4 @@ unittest_LDADD = libmdbodbc.la ../libmdb/libmdb.la ../sql/libmdbsql.la ## Need blank statement to avoid compiling odbc.c odbc: $(EXTRA_LTLIBRARIES) @echo '' - +endif diff --git a/src/odbc/Makefile.in b/src/odbc/Makefile.in index 0512e97..a7840c7 100644 --- a/src/odbc/Makefile.in +++ b/src/odbc/Makefile.in @@ -62,9 +62,11 @@ host_triplet = @host@ AS = @AS@ CC = @CC@ DLLTOOL = @DLLTOOL@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ +GMDB_CFLAGS = @GMDB_CFLAGS@ +GMDB_LIBS = @GMDB_LIBS@ HAVE_GNOME = @HAVE_GNOME@ +HAVE_GTK = @HAVE_GTK@ +HAVE_ODBC = @HAVE_ODBC@ LD = @LD@ LEX = @LEX@ LIBTOOL = @LIBTOOL@ @@ -72,7 +74,6 @@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ NM = @NM@ OBJDUMP = @OBJDUMP@ -ODBC = @ODBC@ ODBC_INC = @ODBC_INC@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ @@ -81,24 +82,22 @@ SQL = @SQL@ VERSION = @VERSION@ YACC = @YACC@ -include_HEADERS = connectparams.h -SQLDIR = ../sql -SQLSOURCES = mdbsql.c parser.c lexer.c -MDBDIR = ../libmdb -MDBSOURCES = backend.c index.c money.c catalog.c kkd.c sargs.c \ - data.c like.c table.c dump.c file.c mem.c - -bin_PROGRAMS = unittest -lib_LTLIBRARIES = libmdbodbc.la -INCLUDES = -I ../../include `glib-config --cflags` -libmdbodbc_la_SOURCES = odbc.c connectparams.c -libmdbodbc_la_LIBADD = $(patsubst %, $(SQLDIR)/%, \ - $(patsubst %.c, %.lo, $(SQLSOURCES))) \ - $(patsubst %, $(MDBDIR)/%, \ - $(patsubst %.c, %.lo, $(MDBSOURCES))) -lglib - -LIBS = @LEXLIB@ `glib-config --libs` -unittest_LDADD = libmdbodbc.la ../libmdb/libmdb.la ../sql/libmdbsql.la +@HAVE_ODBC_TRUE@include_HEADERS = @HAVE_ODBC_TRUE@connectparams.h +@HAVE_ODBC_TRUE@SQLDIR = @HAVE_ODBC_TRUE@../sql +@HAVE_ODBC_TRUE@SQLSOURCES = @HAVE_ODBC_TRUE@mdbsql.c parser.c lexer.c +@HAVE_ODBC_TRUE@MDBDIR = @HAVE_ODBC_TRUE@../libmdb +@HAVE_ODBC_TRUE@MDBSOURCES = @HAVE_ODBC_TRUE@backend.c index.c money.c catalog.c kkd.c sargs.c \ +@HAVE_ODBC_TRUE@ data.c like.c table.c dump.c file.c mem.c +@HAVE_ODBC_TRUE@bin_PROGRAMS = @HAVE_ODBC_TRUE@unittest +@HAVE_ODBC_TRUE@lib_LTLIBRARIES = @HAVE_ODBC_TRUE@libmdbodbc.la +@HAVE_ODBC_TRUE@INCLUDES = @HAVE_ODBC_TRUE@-I ../../include `glib-config --cflags` +@HAVE_ODBC_TRUE@libmdbodbc_la_SOURCES = @HAVE_ODBC_TRUE@odbc.c connectparams.c +@HAVE_ODBC_TRUE@libmdbodbc_la_LIBADD = @HAVE_ODBC_TRUE@$(patsubst %, $(SQLDIR)/%, \ +@HAVE_ODBC_TRUE@ $(patsubst %.c, %.lo, $(SQLSOURCES))) \ +@HAVE_ODBC_TRUE@ $(patsubst %, $(MDBDIR)/%, \ +@HAVE_ODBC_TRUE@ $(patsubst %.c, %.lo, $(MDBSOURCES))) -lglib +@HAVE_ODBC_TRUE@LIBS = @HAVE_ODBC_TRUE@@LEXLIB@ `glib-config --libs` +@HAVE_ODBC_TRUE@unittest_LDADD = @HAVE_ODBC_TRUE@libmdbodbc.la ../libmdb/libmdb.la ../sql/libmdbsql.la mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) @@ -108,16 +107,16 @@ DEFS = @DEFS@ -I. -I$(srcdir) CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ libmdbodbc_la_LDFLAGS = -libmdbodbc_la_DEPENDENCIES = $(patsubst %, $(SQLDIR)/%, $(patsubst %.c, \ -%.lo, $(SQLSOURCES))) $(patsubst %, $(MDBDIR)/%, $(patsubst %.c, %.lo, \ -$(MDBSOURCES))) -libmdbodbc_la_OBJECTS = odbc.lo connectparams.lo +@HAVE_ODBC_TRUE@libmdbodbc_la_DEPENDENCIES = $(patsubst %, $(SQLDIR)/%, \ +@HAVE_ODBC_TRUE@$(patsubst %.c, %.lo, $(SQLSOURCES))) $(patsubst %, \ +@HAVE_ODBC_TRUE@$(MDBDIR)/%, $(patsubst %.c, %.lo, $(MDBSOURCES))) +@HAVE_ODBC_TRUE@libmdbodbc_la_OBJECTS = odbc.lo connectparams.lo PROGRAMS = $(bin_PROGRAMS) unittest_SOURCES = unittest.c unittest_OBJECTS = unittest.o -unittest_DEPENDENCIES = libmdbodbc.la ../libmdb/libmdb.la \ -../sql/libmdbsql.la +@HAVE_ODBC_TRUE@unittest_DEPENDENCIES = libmdbodbc.la \ +@HAVE_ODBC_TRUE@../libmdb/libmdb.la ../sql/libmdbsql.la unittest_LDFLAGS = CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -418,8 +417,8 @@ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean -odbc: $(EXTRA_LTLIBRARIES) - @echo '' +@HAVE_ODBC_TRUE@odbc: $(EXTRA_LTLIBRARIES) +@HAVE_ODBC_TRUE@ @echo '' # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/odbc/odbc.c b/src/odbc/odbc.c index 45a6cde..5c56a47 100644 --- a/src/odbc/odbc.c +++ b/src/odbc/odbc.c @@ -32,7 +32,7 @@ #include "connectparams.h" -static char software_version[] = "$Id: odbc.c,v 1.6 2002/04/09 01:19:26 brianb Exp $"; +static char software_version[] = "$Id: odbc.c,v 1.7 2002/04/14 23:35:39 brianb Exp $"; static void *no_unused_var_warn[] = {software_version, no_unused_var_warn}; @@ -1038,12 +1038,136 @@ int i; return 0; } +static void _set_func_exists(SQLUSMALLINT FAR *pfExists, SQLUSMALLINT fFunction) +{ +SQLUSMALLINT FAR *mod; + + mod = pfExists + (fFunction >> 4); + *mod |= (1 << (fFunction & 0x0f)); +} SQLRETURN SQL_API SQLGetFunctions( SQLHDBC hdbc, SQLUSMALLINT fFunction, SQLUSMALLINT FAR *pfExists) { +int i; + TRACE("SQLGetFunctions"); + switch (fFunction) { +#if ODBCVER >= 0x0300 + case SQL_API_ODBC3_ALL_FUNCTIONS: + +/* for (i=0;i