mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
Enhancements for getting Access 2000 to work (almost)
Fixes for working with bison
This commit is contained in:
@@ -84,7 +84,7 @@ CONFIG_CLEAN_FILES =
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
|
||||
|
||||
DEFS = -DPACKAGE=\"mdbtools\" -DVERSION=\"0.3\" -DYYTEXT_POINTER=1 -DHAVE_LIBMDB=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.3\" -DYYTEXT_POINTER=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 =
|
||||
|
||||
@@ -48,11 +48,12 @@ int offset;
|
||||
int rows;
|
||||
int i,j;
|
||||
|
||||
rows = mdb_get_int16(mdb, 8);
|
||||
rows = mdb_get_int16(mdb, mdb->row_count_offset);
|
||||
|
||||
if (rowid < 0 || rowid > rows) return NULL;
|
||||
|
||||
offset = mdb_get_int16(mdb, 10 + 2 * rowid);
|
||||
offset = mdb_get_int16(mdb, (mdb->row_count_offset + 2) + 2 * rowid);
|
||||
if (mdb->jet_version==MDB_VER_JET4) offset++;
|
||||
/*
|
||||
** ??? this happens, don't know what it means
|
||||
*/
|
||||
@@ -73,6 +74,7 @@ fprintf(stdout,"\n");
|
||||
if (j<=MDB_MAX_OBJ_NAME) {
|
||||
entry->object_name[j++]=mdb->pg_buf[i];
|
||||
}
|
||||
if (mdb->jet_version==MDB_VER_JET4) i++;
|
||||
}
|
||||
entry->object_name[j] = '\0';
|
||||
entry->kkd_pg = mdb_get_int16(mdb,offset+31+strlen(entry->object_name)+7);
|
||||
@@ -82,7 +84,7 @@ fprintf(stdout,"\n");
|
||||
}
|
||||
int mdb_catalog_rows(MdbHandle *mdb)
|
||||
{
|
||||
return mdb_get_int16(mdb, 0x08);
|
||||
return mdb_get_int16(mdb, mdb->row_count_offset);
|
||||
}
|
||||
GArray *mdb_read_catalog(MdbHandle *mdb, int obj_type)
|
||||
{
|
||||
|
||||
@@ -43,8 +43,10 @@ int j,pos;
|
||||
mdb->jet_version = mdb_get_int32(mdb, 0x14);
|
||||
if (mdb->jet_version == MDB_VER_JET4) {
|
||||
mdb->pg_size = 4096;
|
||||
mdb->row_count_offset = 0x0c;
|
||||
} else {
|
||||
mdb->pg_size = 2048;
|
||||
mdb->row_count_offset = 0x08;
|
||||
}
|
||||
|
||||
/* get the db encryption key and xor it back to clear text */
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
/* MDB Tools - A library for reading MS Access database file
|
||||
* Copyright (C) 2000 Brian Bruns
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int likecmp(char *s, char *r)
|
||||
|
||||
Reference in New Issue
Block a user