Commit Graph

366 Commits

Author SHA1 Message Date
Geert Janssens
54324efc7f Remove local srfi's and require guile 1.6.7 or better.
All now supported versions of guile come bundled with these
srfi's, so there's no need to keep our own copies.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18995 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-04-05 16:48:09 +00:00
Christian Stimming
b53205e903 Set some more line-ending style properties.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18961 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-24 19:28:20 +00:00
Phil Longstaff
be4fce5ed5 If gmtime_r is defined as a macro, undef it
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18834 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-05 17:55:01 +00:00
Phil Longstaff
78d8fba84e Undefine localtime_r as a macro (new mingw pthreads package defines it)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18828 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 22:06:23 +00:00
Phil Longstaff
210472586c Add braces to make if-if-then-else structure clear and avoid GCC 4.4.0 error message
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18827 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-04 22:04:23 +00:00
Christian Stimming
04ffda604b Win32: Add more header includes where necessary to avoid using undeclared functions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18797 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-03 20:45:58 +00:00
Christian Stimming
ce99c42871 Re-indentation of source code, next batch.
This also strips trailing whitespaces from lines where they existed.
This re-indentation was done using astyle-1.24 using the following options:

astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix=none

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18787 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-02 21:40:02 +00:00
Christian Stimming
49658f362a MSVC compatibility: Fix r18748, r18761 by replacing strncasecmp() with strnicmp().
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18773 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-01 18:44:49 +00:00
Christian Stimming
ce7f2889b9 Partly revert r18748, "Win32 compatibility": lib/libc directory doesn't have glib available.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18761 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-28 13:56:59 +00:00
Christian Stimming
f101adee5c Win32 compatibility: Use glib wrappers of non-usual POSIX functions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18748 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-27 18:39:15 +00:00
Geert Janssens
86c7ae019c Bump glib2 minimum requirement to 2.12.
At the same time, remove all the conditional code and workarounds
that were in the code to cater for glib < 2.12.

Note: this commit will require a rerun of autogen.sh and configure.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18696 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-02-20 13:57:10 +00:00
Phil Longstaff
dc394c0030 Add win32 version of gmtime_r.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18277 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-08-24 02:00:39 +00:00
Phil Longstaff
89bfcce989 Rename lib/libqof -> src/libqof
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18029 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-04-07 00:48:53 +00:00
Phil Longstaff
4e47416ede 1) Add new files to po/POTFILES.in
2) Fix some unmatched quotes (in some cases, they were spelling errors)


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18016 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-04-05 00:52:30 +00:00
Phil Longstaff
945e700a37 Fix lots of splint issues (including memory leaks). This includes some changes
in qof and gnc files adding annotation comments to help splint analyze ownership
of memory and objects.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17983 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-03-09 17:17:57 +00:00
Phil Longstaff
c67b86b470 1) Before saving file contents via save-as, ensure that all data has been loaded. This
doesn't matter for the file backend, but does for the SQL backend, because the SQL backend 
only loads transactions/splits as needed.
2) Partially solve problem where int64 values are loaded incorrectly.  This started because 
num and denom for prices were seen to be limited to 32 bits.  libdbi provides a 
libdbi_result_get_longlong() routine, but unfortunately, on my system (with libdbi 0.8.2-3), 
it seems to have some bugs a) it returns negative values unsigned and b) it seems limited to 
a 32 bit value even when the correct value is in the db.  


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17925 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-02-15 19:26:38 +00:00
Charles Day
a0a034f2ce Documentation: Fix a wide range of small mistakes in doxygen comments, including a few spots where .c and .h function declarations didn't agree on parameter names.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17841 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-01-22 21:14:08 +00:00
Christian Stimming
3fe13a6733 Bug #566567: [Win32] Do not touch .scm-links on windows - always copy scm files
.scm files must be copied on windows because linking won't work.

Note: existing build directories will be fixed only after make clean.

Patch by C. Ernst.
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17817 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-01-14 19:59:38 +00:00
Andreas Köhler
cda274944e Initialize GError in qof_log_parse_log_config().
This avoids a crash when the log configuration is not valid.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17813 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-01-11 20:23:12 +00:00
Christian Stimming
9285d7b575 Fix missing correct CPPFLAGS when compiling qofmath test program.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17722 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-11-26 13:40:02 +00:00
Derek Atkins
d4448d19aa Fix gcc warning from qof's lookup macro
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17671 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-10-28 14:58:15 +00:00
Christian Stimming
60c32fd16b Bug #514043: Use AM_CPPFLAGS instead of AM_CFLAGS.
AM_CFLAGS is passed both to the compiler (.c -> .o) and to the linker, so it
should only have flags that are appropriate for both steps. AM_CPPFLAGS is
passed only to the compiler, so flags that are only appropriate for that step
(-I and -D flags, for example), should be in _CPPFLAGS instead of _CFLAGS.
Every gnucash-2.2.3 Makefile.am that passes -I flags gets it wrong, placing
them in _CFLAGS. It's not a functional bug (the linker ignores -I flags), but a
ton of superfluous flags makes the build output pretty verbose and hard to
debug when things do go wrong.

To make matters more confusing as a developer, the FOO_CFLAGS variable set by
PKG_CHECK_MODULES(FOO) is actually for _CPPFLAGS in the Makefile.am
('pkg-config --cflags' returns the -I flags).

A related -I bug (one that *is* functionally broken) is that sometimes a local
(build dir) -I flag is passed after a global (installed dependent library) one.
If my system happens to have a header installed from some unrelated thing,
compiler will find *that* one instead of the expected one in the source
directory. Should always pass all local -I before any global ones.

Patch by andi5 plus one manual addition in src/gnome-utils/Makefile.am

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17655 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-10-25 20:30:47 +00:00
Andreas Köhler
cb5b3ab59c Bug #539947: Replace __FUNCTION__ by G_STRFUNC.
Patch from Halton Huo.
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17585 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-09-21 15:18:50 +00:00
Charles Day
ad6df218a0 gnc_numeric: Support reciprocals (negative denominators) in gnc_numeric_to_decimal().
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17554 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-09-18 08:33:27 +00:00
Andreas Köhler
44a07ec81c Optimize gnc_numeric_check() by G_LIKELY-fying that the denominator is non-zero.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17534 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-09-16 23:00:01 +00:00
Charles Day
eb29fc8e6d Make gnc_numeric values of zero always convertible to decimal form.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17456 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-08-07 18:18:00 +00:00
Phil Longstaff
9173035d57 Merge gda-dev2 branch into trunk.
This introduces the dbi backend and the --enable-dbi configure option.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17444 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-08-01 16:02:07 +00:00
Charles Day
399a1eb989 Add a new function to the gnc_numeric library that converts denominators to exact powers of ten.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17421 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-07-27 15:33:23 +00:00
Derek Atkins
ef25c17cd4 Get GnuCash building again.
- move the #include of g18n.h from gnc-date.h to gnc-date.c
- add gnc-date.c to POTFILES.in

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17250 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-24 23:28:31 +00:00
Charles Day
fe554f7fd9 Bug #532405: Make the default strftime format use %#d instead of %e on win32 platforms.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17249 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-24 22:28:40 +00:00
Charles Day
669470ad48 Bug #539829: Make sure msg gets assigned before it can get dereferenced.
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17248 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-24 22:08:12 +00:00
Phil Longstaff
3370604c8d Fix memory leak in qof_session_save() - "msg" is never freed.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17228 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-06-13 00:21:35 +00:00
Derek Atkins
8d532f650c Match NULL and guid_null() for NULL GUID Matches
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17160 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-05-17 17:46:40 +00:00
Andreas Köhler
733d0dfe70 Fix two memory leaks in QOF. Add qof_backend_destroy().
Backends should call this function to make sure they free the kvp frame
for the backend configuration.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17058 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-29 01:20:01 +00:00
Andreas Köhler
7d5e0985f4 A few doxygen fixes.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17041 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-23 00:01:05 +00:00
Andreas Köhler
a53fecde93 Pass better size parameter to qof_strftime() to make use of whole buffer.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17005 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-04 00:20:07 +00:00
Andreas Köhler
2cbd6ccdd6 Improve performance of qof_query_invert().
Prepend terms and reverse once at the end instead of "reverse, prepend,
reverse" for each term.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17001 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-03-02 22:12:00 +00:00
Andreas Köhler
5d303b9c2d #506074: Handle fractional timezone offsets correctly in gnc_timespec_to_iso8601_buff().
Patch from Daniel Harding
BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16776 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-12-31 13:52:24 +00:00
Andreas Köhler
e576797c0f Fix a few automake warnings.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16770 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-12-30 18:34:08 +00:00
Phil Longstaff
0ed4af2ef1 Make some parameters const
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16764 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-12-29 19:40:28 +00:00
Andreas Köhler
9c1785f933 Fix two memory leaks.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16756 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-12-28 21:44:25 +00:00
Andreas Köhler
15039eaaa9 Remove deprecated qof wrappers.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16579 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-11-03 01:56:28 +00:00
Andreas Köhler
a6839478a4 Merge csv-import branch back into trunk.
configure.in                                       |    2
 lib/Makefile.am                                    |    4
 lib/stf/Makefile.am                                |   13
 lib/stf/README                                     |    2
 lib/stf/stf-parse.c                                | 1414 +++++++++++++++++++++
 lib/stf/stf-parse.h                                |  112 +
 src/bin/gnucash-bin.c                              |    1
 src/import-export/Makefile.am                      |    4
 src/import-export/csv/Makefile.am                  |   59
 src/import-export/csv/example-file.csv             |    4
 src/import-export/csv/gnc-csv-gnumeric-popup.c     |  194 ++
 src/import-export/csv/gnc-csv-gnumeric-popup.h     |   78 +
 src/import-export/csv/gnc-csv-import.c             | 1173 +++++++++++++++++
 src/import-export/csv/gnc-csv-import.h             |   33
 src/import-export/csv/gnc-csv-model.c              | 1199 +++++++++++++++++
 src/import-export/csv/gnc-csv-model.h              |  122 +
 src/import-export/csv/gnc-csv-preview-dialog.glade |  496 +++++++
 src/import-export/csv/gnc-csv2glist.c              |  187 --
 src/import-export/csv/gnc-csv2glist.h              |   39
 src/import-export/csv/gnc-plugin-csv-ui.xml        |   11
 src/import-export/csv/gnc-plugin-csv.c             |  160 ++
 src/import-export/csv/gnc-plugin-csv.h             |   60
 src/import-export/csv/gncmod-csv-import.c          |   91 +
 23 files changed, 5228 insertions(+), 230 deletions(-)


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16561 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-10-12 22:51:34 +00:00
Andreas Köhler
fcfb7bdb95 #438360: Replace str{,n}casestr and strcasecmp by qof_utf8_{substr_nocase,strcasecmp}.
The functions used did not work for non-ascii characters.  The new
implementations use g_utf8_casefold and g_utf8_normalize to improve case
insensitive searches and comparisons.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16547 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-10-03 01:18:13 +00:00
Joshua Sled
86f3842984 Move g_strdup inside of set_log_level to be a slightly better citizen and fix a serious bug. :/
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16402 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-08-08 04:19:22 +00:00
Joshua Sled
f5923ae956 Remove FreqSpec.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16387 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-08-05 21:24:16 +00:00
Joshua Sled
1a9a4fb4de Bug#361604: patch from Mike Alexander <mta umich edu> to fix datatype for gnc-date.h to allow ranging negative, which is important in a few places.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16370 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-07-29 16:00:06 +00:00
Christian Stimming
ea0d0c6274 Add warning when overwriting an already installed dirty-callback.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16228 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-06-30 11:38:33 +00:00
Andreas Köhler
dcfda18f7c Revert some qof_instance_get_guid() calls to qof_entity_get_guid().
Those two functions were merged into one, qof_instance_get_guid(), in
r15773, but they returned different values if the parameter was NULL.
Some code depends on the return value being guid_null(), or maybe even
NULL, so revert the changes entity->instance, where the entity is not
guaranteed to be non-NULL.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16212 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-06-25 17:18:28 +00:00
Andreas Köhler
fa28f0e4f0 Avoid a global static variable by using g_list_sort_with_data.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16211 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-06-25 17:18:11 +00:00