head 1.5; access; symbols OPENPKG_E1_MP_HEAD:1.4 OPENPKG_E1_MP:1.4 OPENPKG_E1_MP_2_STABLE:1.3.2.3 OPENPKG_E1_FP:1.3.2.3 OPENPKG_2_STABLE_MP:1.4 OPENPKG_2_STABLE_20061018:1.3.2.2 OPENPKG_2_STABLE:1.3.0.2; locks; strict; comment @# @; 1.5 date 2008.01.02.10.51.08; author rse; state Exp; branches; next 1.4; commitid Z5vETipFzbdVrPLs; 1.4 date 2006.10.24.11.06.48; author rse; state Exp; branches; next 1.3; commitid k4vDloZDzjxdwVRr; 1.3 date 2006.10.01.11.50.12; author rse; state Exp; branches 1.3.2.1; next 1.2; commitid SU0nOeF4BXnWuYOr; 1.2 date 2006.05.07.16.46.20; author rse; state Exp; branches; next 1.1; commitid cHWHfEQu8nKtR6wr; 1.1 date 2006.05.07.16.23.25; author rse; state Exp; branches; next ; commitid jN3yBatAUWTBJ6wr; 1.3.2.1 date 2006.10.01.11.50.12; author rse; state dead; branches; next 1.3.2.2; commitid iZxwRSmmWscPXUQr; 1.3.2.2 date 2006.10.16.14.52.35; author rse; state Exp; branches; next 1.3.2.3; commitid iZxwRSmmWscPXUQr; 1.3.2.3 date 2006.10.24.11.07.24; author rse; state Exp; branches; next ; commitid v4fM2yNV0yQpwVRr; desc @@ 1.5 log @fix building under latest Flex @ text @Index: configure --- configure.orig 2004-06-18 11:34:27 +0200 +++ configure 2006-10-24 12:35:57 +0200 @@@@ -20124,7 +20124,7 @@@@ echo "${ECHO_T}$ac_cv_lib_readline_add_history" >&6 if test $ac_cv_lib_readline_add_history = yes; then - READLINE_LIBS="$READLINE_LIBS -lreadline" + READLINE_LIBS="-lreadline $READLINE_LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_READLINE 1 Index: include/mdbsql.h --- include/mdbsql.h.orig 2004-03-07 00:59:54 +0100 +++ include/mdbsql.h 2006-10-24 12:35:57 +0200 @@@@ -6,6 +6,10 @@@@ #ifndef _mdbsql_h_ #define _mdbsql_h_ +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { MdbHandle *mdb; int all_columns; @@@@ -78,4 +82,7 @@@@ extern void mdb_sql_bind_column(MdbSQL *sql, int colnum, char *varaddr); extern void mdb_sql_bind_len(MdbSQL *sql, int colnum, int *len_ptr); +#ifdef __cplusplus +} +#endif #endif Index: include/mdbtools.h --- include/mdbtools.h.orig 2004-06-17 01:42:19 +0200 +++ include/mdbtools.h 2006-10-24 12:35:57 +0200 @@@@ -41,6 +41,10 @@@@ #define MDB_MEMO_OVERHEAD 12 #define MDB_BIND_SIZE 16384 +#ifdef __cplusplus +extern "C" { +#endif + enum { MDB_PAGE_DB = 0, MDB_PAGE_DATA, @@@@ -146,9 +150,6 @@@@ #define IS_JET4(mdb) (mdb->f->jet_version==MDB_VER_JET4) #define IS_JET3(mdb) (mdb->f->jet_version==MDB_VER_JET3) -/* hash to store registered backends */ -extern GHashTable *mdb_backends; - /* forward declarations */ typedef struct mdbindex MdbIndex; typedef struct mdbsargtree MdbSargNode; @@@@ -517,4 +518,7 @@@@ extern int mdb_unicode2ascii(MdbHandle *mdb, unsigned char *buf, int offset, int len, char *dest); extern int mdb_ascii2unicode(MdbHandle *mdb, unsigned char *buf, int offset, int len, char *dest); +#ifdef __cplusplus +} +#endif #endif /* _mdbtools_h_ */ Index: src/libmdb/mem.c --- src/libmdb/mem.c.orig 2004-05-30 07:06:27 +0200 +++ src/libmdb/mem.c 2006-10-24 12:36:22 +0200 @@@@ -18,7 +18,6 @@@@ */ #include "mdbtools.h" -#include #ifdef DMALLOC #include "dmalloc.h" Index: src/util/Makefile.in --- src/util/Makefile.in.orig 2004-06-18 11:34:23 +0200 +++ src/util/Makefile.in 2006-10-24 12:35:57 +0200 @@@@ -156,7 +156,7 @@@@ bin_PROGRAMS = mdb-export mdb-array mdb-schema mdb-tables mdb-parsecsv mdb-header mdb-sql mdb-ver mdb-prop mdb-import prtable prcat prdata prkkd prdump prole updrow prindex AM_CPPFLAGS = -I$(top_srcdir)/include $(GLIB_CFLAGS) LDADD = ../libmdb/libmdb.la -@@SQL_TRUE@@mdb_sql_LDADD = ../libmdb/libmdb.la ../sql/libmdbsql.la +@@SQL_TRUE@@mdb_sql_LDADD = ../sql/libmdbsql.la ../libmdb/libmdb.la subdir = src/util ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs Index: src/util/mdb-ver.c --- src/util/mdb-ver.c.orig 2004-04-14 07:58:53 +0200 +++ src/util/mdb-ver.c 2006-10-24 12:36:14 +0200 @@@@ -20,7 +20,6 @@@@ #include "mdbtools.h" #include "mdbver.h" #include "mdbprivate.h" -#include #ifdef DMALLOC #include "dmalloc.h" Index: src/sql/lexer.l --- src/sql/lexer.l.orig 2004-03-13 16:07:19 +0100 +++ src/sql/lexer.l 2008-01-02 11:43:40 +0100 @@@@ -43,18 +43,18 @@@@ (>=) { return GTEQ; } like { return LIKE; } [ \t\r] ; -\"[A-z][A-z0-9 _#@@]*\" { +\"[A-Za-z][A-Za-z0-9 _#@@]*\" { yylval.name = strdup(&yytext[1]); yylval.name[strlen(yylval.name)-1]='\0'; return IDENT; } -[A-z][A-z0-9_#@@]* { yylval.name = strdup(yytext); return NAME; } +[A-Za-z][A-Za-z0-9_#@@]* { yylval.name = strdup(yytext); return NAME; } -'[A-z0-9 !@@#$%^&*()-_+={}[\];:",.<>/?`~|\\]*' { yylval.name = strdup(yytext); return STRING; } -(-*[0-9]+|([0-9]*\.[0-9]+)([eE][-+]?[0-9]+)?) { +'[A-Za-z0-9 !@@#$%^&*()_+={}[\];:",.<>/?`~|\\-]*' { yylval.name = strdup(yytext); return STRING; } +(-*[0-9]+|(([0-9]*\.[0-9]+)((e|E)[-+]?[0-9]+)?)) { yylval.name = strdup(yytext); return NUMBER; } -~?(\/?[A-z0-9\.]+)+ { yylval.name = strdup(yytext); return PATH; } +~?(\/?[A-Za-z0-9\.]+)+ { yylval.name = strdup(yytext); return PATH; } . { return yytext[0]; } %% @ 1.4 log @do not use parallel build and do not include as Solaris 10 then wants to include a which isn't the gettext one @ text @d101 27 @ 1.3 log @upgrading package: mdbtools 0.5 -> 0.6pre1 @ text @d3 1 a3 1 +++ configure 2006-10-01 13:46:05 +0200 d15 1 a15 1 +++ include/mdbsql.h 2006-10-01 13:46:05 +0200 d37 1 a37 1 +++ include/mdbtools.h 2006-10-01 13:46:05 +0200 d67 11 d80 1 a80 1 +++ src/util/Makefile.in 2006-10-01 13:47:36 +0200 d90 11 @ 1.3.2.1 log @file mdbtools.patch was added on branch OPENPKG_2_STABLE on 2006-10-16 14:52:35 +0000 @ text @d1 78 @ 1.3.2.2 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @a0 78 Index: configure --- configure.orig 2004-06-18 11:34:27 +0200 +++ configure 2006-10-01 13:46:05 +0200 @@@@ -20124,7 +20124,7 @@@@ echo "${ECHO_T}$ac_cv_lib_readline_add_history" >&6 if test $ac_cv_lib_readline_add_history = yes; then - READLINE_LIBS="$READLINE_LIBS -lreadline" + READLINE_LIBS="-lreadline $READLINE_LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_READLINE 1 Index: include/mdbsql.h --- include/mdbsql.h.orig 2004-03-07 00:59:54 +0100 +++ include/mdbsql.h 2006-10-01 13:46:05 +0200 @@@@ -6,6 +6,10 @@@@ #ifndef _mdbsql_h_ #define _mdbsql_h_ +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { MdbHandle *mdb; int all_columns; @@@@ -78,4 +82,7 @@@@ extern void mdb_sql_bind_column(MdbSQL *sql, int colnum, char *varaddr); extern void mdb_sql_bind_len(MdbSQL *sql, int colnum, int *len_ptr); +#ifdef __cplusplus +} +#endif #endif Index: include/mdbtools.h --- include/mdbtools.h.orig 2004-06-17 01:42:19 +0200 +++ include/mdbtools.h 2006-10-01 13:46:05 +0200 @@@@ -41,6 +41,10 @@@@ #define MDB_MEMO_OVERHEAD 12 #define MDB_BIND_SIZE 16384 +#ifdef __cplusplus +extern "C" { +#endif + enum { MDB_PAGE_DB = 0, MDB_PAGE_DATA, @@@@ -146,9 +150,6 @@@@ #define IS_JET4(mdb) (mdb->f->jet_version==MDB_VER_JET4) #define IS_JET3(mdb) (mdb->f->jet_version==MDB_VER_JET3) -/* hash to store registered backends */ -extern GHashTable *mdb_backends; - /* forward declarations */ typedef struct mdbindex MdbIndex; typedef struct mdbsargtree MdbSargNode; @@@@ -517,4 +518,7 @@@@ extern int mdb_unicode2ascii(MdbHandle *mdb, unsigned char *buf, int offset, int len, char *dest); extern int mdb_ascii2unicode(MdbHandle *mdb, unsigned char *buf, int offset, int len, char *dest); +#ifdef __cplusplus +} +#endif #endif /* _mdbtools_h_ */ Index: src/util/Makefile.in --- src/util/Makefile.in.orig 2004-06-18 11:34:23 +0200 +++ src/util/Makefile.in 2006-10-01 13:47:36 +0200 @@@@ -156,7 +156,7 @@@@ bin_PROGRAMS = mdb-export mdb-array mdb-schema mdb-tables mdb-parsecsv mdb-header mdb-sql mdb-ver mdb-prop mdb-import prtable prcat prdata prkkd prdump prole updrow prindex AM_CPPFLAGS = -I$(top_srcdir)/include $(GLIB_CFLAGS) LDADD = ../libmdb/libmdb.la -@@SQL_TRUE@@mdb_sql_LDADD = ../libmdb/libmdb.la ../sql/libmdbsql.la +@@SQL_TRUE@@mdb_sql_LDADD = ../sql/libmdbsql.la ../libmdb/libmdb.la subdir = src/util ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @ 1.3.2.3 log @MFC: do not use parallel build and do not include as Solaris 10 then wants to include a which isn't the gettext one @ text @d3 1 a3 1 +++ configure 2006-10-24 12:35:57 +0200 d15 1 a15 1 +++ include/mdbsql.h 2006-10-24 12:35:57 +0200 d37 1 a37 1 +++ include/mdbtools.h 2006-10-24 12:35:57 +0200 a66 11 Index: src/libmdb/mem.c --- src/libmdb/mem.c.orig 2004-05-30 07:06:27 +0200 +++ src/libmdb/mem.c 2006-10-24 12:36:22 +0200 @@@@ -18,7 +18,6 @@@@ */ #include "mdbtools.h" -#include #ifdef DMALLOC #include "dmalloc.h" d69 1 a69 1 +++ src/util/Makefile.in 2006-10-24 12:35:57 +0200 a78 11 Index: src/util/mdb-ver.c --- src/util/mdb-ver.c.orig 2004-04-14 07:58:53 +0200 +++ src/util/mdb-ver.c 2006-10-24 12:36:14 +0200 @@@@ -20,7 +20,6 @@@@ #include "mdbtools.h" #include "mdbver.h" #include "mdbprivate.h" -#include #ifdef DMALLOC #include "dmalloc.h" @ 1.2 log @add a bunch of fixes from the FreeBSD port of mdbtools and fix dependencies @ text @d2 3 a4 3 --- configure.orig 2003-01-19 02:55:48 +0100 +++ configure 2006-05-07 18:43:22 +0200 @@@@ -8862,7 +8862,7 @@@@ d14 2 a15 2 --- include/mdbsql.h.orig 2002-03-27 14:00:01 +0100 +++ include/mdbsql.h 2006-05-07 18:43:22 +0200 d27 3 a29 3 @@@@ -59,4 +63,7 @@@@ void mdb_sql_listtables(MdbSQL *sql); void mdb_sql_select(MdbSQL *sql); d36 3 a38 3 --- include/mdbtools.h.orig 2003-01-12 23:59:42 +0100 +++ include/mdbtools.h 2006-05-07 18:43:22 +0200 @@@@ -40,6 +40,10 @@@@ d49 14 a62 5 @@@@ -345,4 +349,8 @@@@ /* index.c */ extern GPtrArray *mdb_read_indices(MdbTableDef *table); extern void mdb_index_dump(MdbTableDef *table, MdbIndex *idx); + d67 12 a78 73 Index: src/libmdb/backend.c --- src/libmdb/backend.c.orig 2002-12-11 00:35:25 +0100 +++ src/libmdb/backend.c 2006-05-07 18:43:22 +0200 @@@@ -112,10 +112,9 @@@@ char *mdb_get_coltype_string(MdbBackend *backend, int col_type) { -char buf[100]; + static char buf[16]; if (col_type > 0x10) { - // return NULL; - sprintf(buf,"type %04x", col_type); + sprintf(buf, "type %04x", col_type); return buf; } else { return backend->types_table[col_type]; Index: src/libmdb/data.c --- src/libmdb/data.c.orig 2003-01-12 23:59:43 +0100 +++ src/libmdb/data.c 2006-05-07 18:43:22 +0200 @@@@ -171,6 +171,9 @@@@ unsigned char null_mask[33]; /* 256 columns max / 8 bits per byte */ unsigned char isnull; + if (table->num_rows <= row) + return 0; + row_start = mdb_get_int16(mdb, (fmt->row_count_offset + 2) + (row*2)); row_end = mdb_find_end_of_row(mdb, row); Index: src/libmdb/file.c --- src/libmdb/file.c.orig 2003-01-12 23:59:43 +0100 +++ src/libmdb/file.c 2006-05-07 18:43:22 +0200 @@@@ -20,7 +20,7 @@@@ #include "mdbtools.h" MdbFormatConstants MdbJet4Constants = { - 4096, 0x0c, 12, 45, 47, 51, 55, 56, 63, 12, 15, 23, 5, 25 + 4096, 0x0c, 16, 45, 47, 51, 55, 56, 63, 12, 15, 23, 5, 25 }; MdbFormatConstants MdbJet3Constants = { 2048, 0x08, 12, 25, 27, 31, 35, 36, 43, 8, 13, 16, 1, 18 Index: src/libmdb/write.c --- src/libmdb/write.c.orig 2003-01-09 21:24:27 +0100 +++ src/libmdb/write.c 2006-05-07 18:43:22 +0200 @@@@ -306,7 +306,7 @@@@ return 0; } } - num_fields = mdb_crack_row(table, row_start, row_end, &fields); + num_fields = mdb_crack_row(table, row_start, row_end, fields); #if MDB_DEBUG_WRITE for (i=0;i