Commit Graph

320 Commits

Author SHA1 Message Date
Nirgal Vourgère
2a70e16a8b Allow CFLGAS="-std=c99 -D_POSIX_C_SOURCE=2"
Use glib function:
strcasecmp -> g_ascii_strcasecmp
bzero -> memset
strdup -> g_strdump

Don't use arithmetic void*+int
2014-12-28 12:36:55 +01:00
Shane Mc Cormack
a3ab6c7969 Fix for dates in mdb-props 2014-10-18 06:25:54 +02:00
Maurus Cuelenaere
e2c46bad8b Add MySQL support to mdb_print_indexes() 2014-10-17 22:18:34 +02:00
Maurus Cuelenaere
97ddfcf8b2 Introduce MDB_BACKEND_* enum 2014-10-17 22:16:49 +02:00
tyzhaoqi
9ab40e83e6 Fix binary outout
Closes issue #44
2014-07-24 08:10:49 +02:00
lovelytwo
a89baeacf5 Segfault fix on memo zero length multiple page
While converting memo field to string, stop processing on zero length multiple
page.
2014-05-02 15:12:16 +02:00
Maurus Cuelenaere
65b573637e Add MySQL support to mdb_print_indexes() 2014-03-17 13:30:40 +01:00
Maurus Cuelenaere
cce6cfead2 Introduce MDB_BACKEND_* enum 2014-03-17 13:30:28 +01:00
Nirgal Vourgère
4a3f3492cd Prints "file not found" when that happens
... rather than the obscure "Can't alloc filename"
2013-07-18 15:21:14 +02:00
Nirgal Vourgère
7841d30d43 Revert use of config.h
Revert
7162e8db74
088493d499

And drop AC_CONFIG_HEADERS so that config goes though the command line.
No longer generating config.h, update .gitignore
2013-07-15 02:42:12 +02:00
Nirgal Vourgère
088493d499 Update autoconf/automake standards
Generated files config.guess config.sub depcomp install-sh ltmain.sh missing
and ylwrap have been moved to build-aux/

Ran autoupdate

Replaced AC_TRY_LINK/AC_TRY_COMPILE by AC_LINK_IFELSE/AC_COMPILE_IFELSE

Droped -I$(top_srcdir)/include from CFLAGS since AC_CONFIG_HEADERS already
adds the -I

Fixed bison detection

Added AM_PROG_AR as required by autoreconf -i -Wall

Updated NEWS and .gitignore
2013-07-09 18:39:03 +02:00
Nirgal Vourgère
7162e8db74 Include config.h in all .c files
Need to be the first file since it may define large files support
and other options.
2013-07-04 10:53:13 +02:00
Nirgal Vourgère
6ef7da0597 Disabled schema comments for mysql backend
They were using an incorrect syntax
2013-06-29 12:13:09 +02:00
Nirgal Vourgère
8f0f167ab2 Memory leak fix
Free temporary variable in mdb_print_indexes
2013-06-28 17:54:30 +02:00
Nirgal Vourgère
687eeebe78 Memory leak fix
Need to free previous backend name when changing it.
2013-06-28 16:41:29 +02:00
Nirgal Vourgère
0196d34d7b __attribute__ change into macro
Makes it easier to port to another compiler.
Thanks Jimmy Taker
2013-06-28 01:51:52 +02:00
Nirgal Vourgère
365f7959ed Fixed password decoding
Thanks Jimmy Taker compilation warning.
2013-06-27 23:46:46 +02:00
William Rogers
0bbe5d3ee6 Memory leak fix
Free the col->sargs
2013-06-27 20:58:43 +02:00
William Rogers
1d39126de6 Memory leak wrong fix
Free col->sargs
Note this patch causes SEGV
2013-06-27 16:09:53 +02:00
William Rogers
fd6e52f9bd Fixed MDBProps memory leaks 2013-06-25 21:33:38 +02:00
tyzhaoqi
9cd05ffdcc Added missing break in switch/case
That missing break is not just a memory leak:
It results in incorrect call to mdb_unicode2ascii for binary data!
I suspect that is what is causing segfault on some db as repported on
https://github.com/brianb/mdbtools/issues/19
2013-06-23 17:56:53 +02:00
Jimmytaker
46005ae009 MDB_DEPRECATED redefined, Constructor MACRO, generate_table_schema changed to not static, date_fmt to ISODate
__attribute__ does not exist in Visual Studio. Therefore replaced wherever it appeared with a macro:
Redefines MDB_DEPRECATED to support Visual Studio
Define a Constructor MACRO so that __attribute__((constructor/destructor)) behavior is achieved in Visual Studio.

Just using generate_table_schema through mdb_print_schema deletes the purpose of a very good tool. generate_table_schemas is a rewrite of generate_table_schema but sends the data to a char* instead of FILE*. There is NO fmemopen() or similar in Visual Studio, so there is NO way to access memory through a FILE* except for first writing to the disk and then reading from the disk in memory.

I cannot suggest how to handle the case when td == 0 for the dates. The databases I work with often have just 00:00:00 in the DateTime column which is not consistent with the rest of the column either, but I have to deal with it somehow.

Leaving void* where char* is needed as a function parameter returns a compilation error in Visual Studio.
2013-01-14 19:27:53 +01:00
Nirgal Vourgère
a972c1638d merge with master 2013-01-14 14:20:10 +01:00
Nirgal Vourgère
eeadcb54f3 Use macros for depreacated function attributes
This will help porting on compilers that don't support it
2013-01-13 23:50:42 +01:00
Jimmytaker
c9f602480b Code cleanup
Enforce consistency g_malloc - g_free and malloc - free
Move var declarations on top of functions
2013-01-13 23:17:07 +01:00
Jimmytaker
70c6fb7551 Added support for sqlite 2013-01-13 22:32:31 +01:00
Jimmytaker
9d81bdde56 t 2012-12-31 21:30:35 +01:00
Jimmytaker
6df0aa6ce0 Port to Windows and SQLite Extension 2012-12-31 20:40:12 +01:00
Nirgal Vourgère
473d820239 Replace map files by -export-symbols-regex use
We had to support -export-symbols-regex anways
And map file did not really support versions but only list which symbol
to export. So this is more simple.
2012-10-20 14:32:32 +02:00
Nirgal Vourgère
bd9091ce57 Backup --version-script with -export-symbols-regex
When ld doesn't support --version-script, use -export-symbols-regex
instead.
2012-10-12 14:33:36 +02:00
Nirgal Vourgère
ea9a4ef1e5 Drop support for SunOS style --version-script
Not working, and causes compilation problems on MacOS
2012-10-12 13:30:10 +02:00
Nirgal Vourgère
cca7001f98 Added support for SunOS style --version-script 2012-10-10 18:27:52 +02:00
Nirgal Vourgère
851877c86c Changed printf specifier for off_t
Fixes some warnings on OSX
2012-10-04 15:37:30 +02:00
Nirgal Vourgère
6b6e54bd14 Disable ld --version-script flag if not supported
See https://github.com/brianb/mdbtools/issues/17
Thanks libjpeg-turbo for the script (BSD license)
2012-10-04 14:31:14 +02:00
Nirgal Vourgère
5f09513c85 Deprecate more mdb_{init|remove}_backends
These functions now use the __attribute__((constructor)) & destructor.
Old names were keep for compatibility

Also put __attribute__((deprecated)) in mdbtools.h for all deprecated
functions.
2012-08-09 14:55:17 +02:00
Nirgal Vourgère
1700860912 Work around for missing __attribute((alias))
Some platforms such as OSX 10.7 don't have __attribute((alias)) enabled.
We need a work around there
2012-08-08 16:21:32 +02:00
Nirgal Vourgère
35c28b4efb Added __atribute((deprecated)) when possible 2012-08-08 15:32:00 +02:00
Nirgal Vourgère
c91950b157 Simple tabulation cleaning 2012-07-26 21:48:12 +02:00
Nirgal Vourgère
f6cd70494c Automatically init/exit libmdb code
mdb_init() and mdb_exit() are now deprecated.
2012-07-22 02:29:04 +02:00
Nirgal Vourgère
f8a3839c7f Misc fixes in prcat and mdb_dump_catalog
Identation
User ACL entries
Show 6 digits for pages #
2012-07-21 13:22:04 +02:00
Nirgal Vourgère
f587d30995 Remaining gmdb2 info data from properties
New method mdb_get_catalogentry_by_name()
Bumped libmdb version from 2.0.1 to 2.1.0
2012-07-08 02:24:42 +02:00
Nirgal Vourgère
b0fb6a4167 Add basic support for Access 2010
Thanks Jakob Egger:
a928a36804
2012-07-07 21:08:25 +02:00
jakob
88ff1c023e Basic support for Complex Columns (Access 2007+)
The major new feature in Access 2007 where so called complex columns.
These can be multivalued fields, attachments, or MEMO fields with
version history. All of them are implemented using hidden helper tables,
and the column itself has type MDB_COMPLEX (0x12) which is basically a
long int used as a key.

This commit adds basic support for this complex type to libmdb.
2012-07-07 20:23:20 +02:00
Jean-Michel Vourgère
c566407eaf Experimental support for JET5 .accdb files
Right now, they are handled like JET4 file.
2012-07-03 00:31:23 +02:00
Jean-Michel Vourgère
1db0a89ee2 Removed last compilation warnings, updated TODO 2012-07-02 23:29:05 +02:00
Jean-Michel Vourgère
212337cfaa Renamed _mdb_put_int* into mdb_put_int*
These were the only symbols exported not starting with mdb_
Old names stay available as aliases
Bumped libmdb version to 2.0.1

Added these prototypes to mdbtools.h: Fixes compilation warning

Added mdb_insert_row prototype to mdbtools.h: Fixes compilation warning
2012-07-02 21:38:26 +02:00
Jean-Michel Vourgère
8becb3fa6d Don't try to update index if it is not found
This quiets compiler warning about possibly uninitialized var
2012-07-01 12:50:00 +02:00
Will Daniels
04b6cf5232 Export REPID as string & use char(38) in mysql 2012-06-29 02:28:51 +02:00
Nirgal Vourgère
7634e329c7 Renamed namespace into dbnamespace: C++ keyword 2012-02-11 18:38:43 +01:00
Nirgal Vourgère
c37e82c356 Don't call exit() from libmdb.so
Libraries should return an error code, not kill the caller.
Thanks lintian.
2012-01-16 02:58:46 +01:00