add mdbtools
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
Index: configure.in
|
||||
===================================================================
|
||||
--- configure.in.orig
|
||||
+++ configure.in
|
||||
@@ -106,6 +106,7 @@ PKG_CHECK_MODULES(GNOME,libglade-2.0 lib
|
||||
if test "x$HAVE_GNOME" = "xtrue"; then
|
||||
AC_SUBST(GNOME_CFLAGS)
|
||||
AC_SUBST(GNOME_LIBS)
|
||||
+ AC_SUBST(GNOME_PREFIX)
|
||||
OPTDIRS="$OPTDIRS gmdb2"
|
||||
fi
|
||||
|
||||
Index: src/gmdb2/Makefile.am
|
||||
===================================================================
|
||||
--- src/gmdb2/Makefile.am.orig
|
||||
+++ src/gmdb2/Makefile.am
|
||||
@@ -1,3 +1,4 @@
|
||||
+prefix = @GNOME_PREFIX@
|
||||
SUBDIRS = help gladefiles pixmaps
|
||||
bin_PROGRAMS = gmdb2
|
||||
include_HEADERS = gmdb.h
|
||||
Index: src/gmdb2/gladefiles/Makefile.am
|
||||
===================================================================
|
||||
--- src/gmdb2/gladefiles/Makefile.am.orig
|
||||
+++ src/gmdb2/gladefiles/Makefile.am
|
||||
@@ -1,3 +1,4 @@
|
||||
+prefix = @GNOME_PREFIX@
|
||||
gladedir = $(datadir)/gmdb/glade/
|
||||
|
||||
glade_DATA = \
|
||||
Index: src/gmdb2/help/C/Makefile.am
|
||||
===================================================================
|
||||
--- src/gmdb2/help/C/Makefile.am.orig
|
||||
+++ src/gmdb2/help/C/Makefile.am
|
||||
@@ -1,3 +1,4 @@
|
||||
+prefix = @GNOME_PREFIX@
|
||||
figs = \
|
||||
figures/gmdb2_window.png \
|
||||
figures/gmdb2_sql_window.png
|
||||
Index: src/gmdb2/pixmaps/Makefile.am
|
||||
===================================================================
|
||||
--- src/gmdb2/pixmaps/Makefile.am.orig
|
||||
+++ src/gmdb2/pixmaps/Makefile.am
|
||||
@@ -1,3 +1,4 @@
|
||||
+prefix = @GNOME_PREFIX@
|
||||
|
||||
appicondir = $(datadir)/gmdb/glade
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
Index: src/gmdb2/Makefile.am
|
||||
===================================================================
|
||||
--- src/gmdb2/Makefile.am.orig 2009-12-02 19:57:27.000000000 +0100
|
||||
+++ src/gmdb2/Makefile.am 2009-12-02 19:57:27.000000000 +0100
|
||||
@@ -1,7 +1,7 @@
|
||||
prefix = @GNOME_PREFIX@
|
||||
SUBDIRS = help gladefiles pixmaps
|
||||
bin_PROGRAMS = gmdb2
|
||||
-include_HEADERS = gmdb.h
|
||||
+noinst_HEADERS = gmdb.h
|
||||
gmdb2_SOURCES = main2.c file.c util.c table.c query.c module.c macro.c report.c form.c info.c table_def.c table_data.c table_export.c debug.c sql.c schema.c prefs.c
|
||||
LIBS = -rdynamic $(GNOME_LIBS) @LIBS@ @LEXLIB@
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/include \
|
||||
@@ -0,0 +1,19 @@
|
||||
Index: src/libmdb/data.c
|
||||
===================================================================
|
||||
--- src/libmdb/data.c.orig
|
||||
+++ src/libmdb/data.c
|
||||
@@ -581,10 +581,13 @@ mdb_fetch_row(MdbTableDef *table)
|
||||
do {
|
||||
if (table->strategy==MDB_INDEX_SCAN) {
|
||||
|
||||
- if (!mdb_index_find_next(table->mdbidx, table->scan_idx, table->chain, &pg, (guint16 *) &(table->cur_row))) {
|
||||
+ guint16 tmp = (guint16)table->cur_row;
|
||||
+ if (!mdb_index_find_next(table->mdbidx, table->scan_idx, table->chain, &pg, &tmp)) {
|
||||
+ table->cur_row = tmp;
|
||||
mdb_index_scan_free(table);
|
||||
return 0;
|
||||
}
|
||||
+ table->cur_row = tmp;
|
||||
mdb_read_pg(mdb, pg);
|
||||
} else {
|
||||
rows = mdb_pg_get_int16(mdb,fmt->row_count_offset);
|
||||
@@ -0,0 +1,10 @@
|
||||
--- src/sql/lexer.l
|
||||
+++ src/sql/lexer.l
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "mdbsql.h"
|
||||
#include "parser.h"
|
||||
|
||||
+extern int mdb_sql_yyinput(char *buf, int need);
|
||||
%}
|
||||
|
||||
%%
|
||||
@@ -0,0 +1,13 @@
|
||||
basename is char[33]
|
||||
|
||||
--- src/gmdb2/file.c
|
||||
+++ src/gmdb2/file.c
|
||||
@@ -99,7 +99,7 @@
|
||||
} else {
|
||||
strncpy(basename,file_path,32);
|
||||
}
|
||||
- basename[33]='\0';
|
||||
+ basename[32]='\0';
|
||||
gnome_config_set_string("/gmdb/RecentFiles/menu_recent1.basename", basename);
|
||||
gnome_config_set_string("/gmdb/RecentFiles/menu_recent1.filepath", file_path);
|
||||
gnome_config_sync();
|
||||
@@ -0,0 +1,9 @@
|
||||
--- src/gmdb2/info.c
|
||||
+++ src/gmdb2/info.c
|
||||
@@ -71,4 +71,6 @@
|
||||
gtk_label_set_text(GTK_LABEL(label), tmpstr);
|
||||
|
||||
g_free(filepath);
|
||||
+
|
||||
+ return NULL;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- src/util/prindex.c
|
||||
+++ src/util/prindex.c
|
||||
@@ -115,7 +115,7 @@
|
||||
void
|
||||
walk_index(MdbHandle *mdb, MdbIndex *idx)
|
||||
{
|
||||
- int start, len;
|
||||
+ int start = 0, len = 0; // I seriously doubt this function does anything useful.
|
||||
guint32 pg;
|
||||
guint16 row;
|
||||
MdbHandle *mdbidx;
|
||||
@@ -0,0 +1,11 @@
|
||||
Index: mdbtools-0.6pre1/src/sql/Makefile.am
|
||||
===================================================================
|
||||
--- mdbtools-0.6pre1.orig/src/sql/Makefile.am 2005-01-15 06:02:06.000000000 +0100
|
||||
+++ mdbtools-0.6pre1/src/sql/Makefile.am 2010-06-07 08:05:16.652462537 +0200
|
||||
@@ -9,3 +9,6 @@ YACC = @YACC@ -d
|
||||
|
||||
dist-hook:
|
||||
rm -f $(distdir)/parser.c $(distdir)/parser.h $(distdir)/lexer.c
|
||||
+
|
||||
+lexer.o: parser.h
|
||||
+
|
||||
Reference in New Issue
Block a user