mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-09-19 02:27:55 +08:00
patches 604726 and 655057 and more gmdb2 work
This commit is contained in:
6
.cvsignore
Normal file
6
.cvsignore
Normal file
@@ -0,0 +1,6 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
configure
|
||||
config.log
|
||||
config.status
|
14
HACKING
14
HACKING
@@ -16,11 +16,11 @@ hex dump of the data they start on addreeses like xxx000 and xxx800. Access
|
||||
addresses ending in xxx000.
|
||||
|
||||
Each page is known by a page_id of 3 bytes (max value is 0x07FFFF).
|
||||
The start adresse of a page is at page_id * 0x800.
|
||||
The start address of a page is at page_id * 0x800.
|
||||
So the maximum of data storage for Access97 database is near
|
||||
0x080000 * 0x800 = 0x40000000 bytes (1 Go)
|
||||
|
||||
We have two differents structures which use page_id :
|
||||
We have two different structures which use page_id :
|
||||
|
||||
1) Data pointer structure (_dp):
|
||||
+------+---------+-------------+------------------------------------------+
|
||||
@@ -38,8 +38,8 @@ We have two differents structures which use page_id :
|
||||
| ???? | 1 byte | flags | If not null, indicate a system object. |
|
||||
+-------------------------------------------------------------------------+
|
||||
|
||||
The first byte of each page seems to be a type indentifier for instance the
|
||||
first page in the mdb file is 0x00, which no other pages seems to share. Other
|
||||
The first byte of each page seems to be a type identifier, for instance, the
|
||||
first page in the mdb file is 0x00, which no other page seems to share. Other
|
||||
pages have the following values:
|
||||
|
||||
0x00 Database definition page. (Page 0)
|
||||
@@ -105,14 +105,14 @@ Some of the offsets are not within the bounds of the page. The reason for this
|
||||
is not presently understood and the current code discards them silently.
|
||||
Offsets that have 0x40 in the high order byte point to a location within the
|
||||
page where a pointer to another catalog page is stored. This does not seem to
|
||||
yeild a complete chain of catalog pages and is currently being ignored in favor
|
||||
yield a complete chain of catalog pages and is currently being ignored in favor
|
||||
of a brute force read of the entire database for catalog pages.
|
||||
|
||||
Little is understood of the meaning of the bytes that make up the records. They
|
||||
vary in size, but portion prior to the objects name seems to be fixed. All
|
||||
records start with a '0x11'. The next two bytes are a page number to the column definitions. (see Column Definition).
|
||||
|
||||
Byte offset 9 from the beginning of the record contains it's type. Here is a
|
||||
Byte offset 9 from the beginning of the record contains its type. Here is a
|
||||
table of known types:
|
||||
|
||||
0x00 Form
|
||||
@@ -244,7 +244,7 @@ Column Type may be one of the following (not complete):
|
||||
UNKNOWN_0D = 0x0D
|
||||
REPID = 0x0F /* GUID */
|
||||
|
||||
Note: this is were my stuff didn't mesh with Yves Maingoy's who reworked the section above.
|
||||
Note: this is where my stuff didn't mesh with Yves Maingoy's who reworked the section above.
|
||||
|
||||
(start old stuff)
|
||||
Following the 18 byte column records begins the column names, listed in order
|
||||
|
3392
acinclude.m4
3392
acinclude.m4
File diff suppressed because it is too large
Load Diff
@@ -125,7 +125,7 @@ do
|
||||
fi
|
||||
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
|
||||
echo "Running libtoolize..."
|
||||
libtoolize --force --copy
|
||||
#libtoolize --force --copy
|
||||
fi
|
||||
echo "Running aclocal $aclocalinclude ..."
|
||||
aclocal $aclocalinclude
|
||||
|
@@ -5,7 +5,7 @@ AM_INIT_AUTOMAKE(mdbtools,0.4)
|
||||
AC_PROG_CC(gcc)
|
||||
dnl Checks for programs.
|
||||
AC_PROG_MAKE_SET
|
||||
AM_PROG_LIBTOOL
|
||||
AC_PROG_LIBTOOL
|
||||
AM_PROG_LEX
|
||||
AC_PROG_YACC
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
Summary: Several utilities for using MS-Access .mdb files.
|
||||
Name: mdbtools
|
||||
Version: 0.3
|
||||
Version: 0.5
|
||||
Release: 1
|
||||
Copyright: GPL
|
||||
Group: Development/Tools
|
||||
|
2
src/.cvsignore
Normal file
2
src/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
5
src/gmdb/.cvsignore
Normal file
5
src/gmdb/.cvsignore
Normal file
@@ -0,0 +1,5 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
.deps
|
||||
.libs
|
||||
gmdb
|
5
src/gmdb2/.cvsignore
Normal file
5
src/gmdb2/.cvsignore
Normal file
@@ -0,0 +1,5 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
.deps
|
||||
.libs
|
||||
gmdb2
|
@@ -7,6 +7,8 @@ GtkWidget *app;
|
||||
GladeXML *mainwin_xml;
|
||||
MdbSQL *sql;
|
||||
|
||||
gmdb_table_popup_cb(GtkWidget *button, GdkEvent *event);
|
||||
|
||||
/* called when the user closes the window */
|
||||
static gint
|
||||
delete_event(GtkWidget *widget, GdkEvent *event, gpointer data)
|
||||
@@ -31,7 +33,7 @@ const gchar *documenters[] = {
|
||||
};
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_file ("logo.gif", NULL);
|
||||
pixbuf = gdk_pixbuf_new_from_file ("logo.xpm", NULL);
|
||||
|
||||
gtk_widget_show (gnome_about_new ("Gnome MDB Viewer", "0.2",
|
||||
"Copyright 2002-2003 Brian Bruns",
|
||||
@@ -105,8 +107,10 @@ int pos;
|
||||
gil = glade_xml_get_widget (mainwin_xml, "module_iconlist");
|
||||
gnome_icon_list_clear(gil);
|
||||
}
|
||||
|
||||
void gmdb_init_popups()
|
||||
{
|
||||
gmdb_table_init_popup();
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@@ -73,8 +73,58 @@ gchar *text;
|
||||
}
|
||||
}
|
||||
}
|
||||
gmdb_table_popup_cb(GtkWidget *menu, GdkEvent *event)
|
||||
{
|
||||
GdkEventButton *event_button;
|
||||
//GtkWidget *menu;
|
||||
|
||||
if (event->type == GDK_BUTTON_PRESS) {
|
||||
event_button = (GdkEventButton *) event;
|
||||
if (event_button->button == 3) {
|
||||
gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
|
||||
event_button->button, event_button->time);
|
||||
g_print("button press\n");
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
/* functions */
|
||||
void
|
||||
gmdb_table_init_popup()
|
||||
{
|
||||
GnomeIconList *gil;
|
||||
GtkWidget *menu, *mi;
|
||||
|
||||
gil = glade_xml_get_widget (mainwin_xml, "table_iconlist");
|
||||
|
||||
menu = gtk_menu_new();
|
||||
gtk_widget_show(menu);
|
||||
mi = gtk_menu_item_new_with_label("Definition");
|
||||
gtk_widget_show(mi);
|
||||
g_signal_connect_swapped (G_OBJECT (mi), "activate",
|
||||
G_CALLBACK (gmdb_table_def_cb), gil);
|
||||
gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
|
||||
mi = gtk_menu_item_new_with_label("Data");
|
||||
gtk_widget_show(mi);
|
||||
gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
|
||||
mi = gtk_menu_item_new_with_label("Export");
|
||||
gtk_widget_show(mi);
|
||||
gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
|
||||
mi = gtk_separator_menu_item_new();
|
||||
gtk_widget_show(mi);
|
||||
gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
|
||||
mi = gtk_menu_item_new_with_label("Debug");
|
||||
gtk_widget_show(mi);
|
||||
gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
|
||||
mi = gtk_menu_item_new_with_label("Usage Map");
|
||||
gtk_widget_show(mi);
|
||||
gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
|
||||
|
||||
g_signal_connect_swapped (GTK_OBJECT (gil), "button_press_event",
|
||||
G_CALLBACK (gmdb_table_popup_cb), GTK_OBJECT(menu));
|
||||
}
|
||||
void
|
||||
gmdb_table_add_icon(gchar *text)
|
||||
{
|
||||
GnomeIconList *gil;
|
||||
|
6
src/libmdb/.cvsignore
Normal file
6
src/libmdb/.cvsignore
Normal file
@@ -0,0 +1,6 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
.deps
|
||||
.libs
|
||||
*.lo
|
||||
*.la
|
7
src/odbc/.cvsignore
Normal file
7
src/odbc/.cvsignore
Normal file
@@ -0,0 +1,7 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
.deps
|
||||
.libs
|
||||
*.lo
|
||||
*.la
|
||||
unittest
|
@@ -1,4 +1,3 @@
|
||||
if HAVE_ODBC
|
||||
include_HEADERS = connectparams.h
|
||||
SQLDIR = ../sql
|
||||
SQLSOURCES = mdbsql.c parser.c lexer.c
|
||||
@@ -19,4 +18,3 @@ unittest_LDADD = libmdbodbc.la ../libmdb/libmdb.la ../sql/libmdbsql.la
|
||||
## Need blank statement to avoid compiling odbc.c
|
||||
odbc: $(EXTRA_LTLIBRARIES)
|
||||
@echo ''
|
||||
endif
|
||||
|
8
src/sql/.cvsignore
Normal file
8
src/sql/.cvsignore
Normal file
@@ -0,0 +1,8 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
.deps
|
||||
.libs
|
||||
parser.c
|
||||
parser.h
|
||||
*.lo
|
||||
*.la
|
17
src/util/.cvsignore
Normal file
17
src/util/.cvsignore
Normal file
@@ -0,0 +1,17 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
.deps
|
||||
.libs
|
||||
mdb-array
|
||||
mdb-export
|
||||
mdb-header
|
||||
mdb-parsecsv
|
||||
mdb-schema
|
||||
mdb-sql
|
||||
mdb-tables
|
||||
mdb-ver
|
||||
prcat
|
||||
prdata
|
||||
prdump
|
||||
prkkd
|
||||
prtable
|
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "mdbtools.h"
|
||||
|
||||
void read_to_row(MdbTableDef *table, char *sargname);
|
||||
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int rows;
|
||||
|
Reference in New Issue
Block a user