Commit Graph

16111 Commits

Author SHA1 Message Date
Erik Johansson
13ef7eec6e Update Swedish translation
Copied from the Translation Project
2014-08-01 10:36:29 +02:00
lmat
726ab02d65 Simplified some of the GUID code.
This change applies some recommendations from jralls. It better utilizes for loops,
and usage of swap. We also try to make sure the null guid is not freed since it's
reused, and catch a c++ exception to make sure it doens't escape into C code when
parsing a GUID.
2014-07-28 17:03:07 -04:00
lmat
ce94872ec8 Cleaned up some code and comments.
There should be no impacting changes in this commit.
2014-07-28 16:52:22 -04:00
lmat
cbc292cc91 Removed the md5 file and updated the build system.
We no longer need md5.h or md5.c because all that work is done in the boost
uuid implementation.
2014-07-28 11:15:28 -04:00
John Ralls
2f189c38e9 Fix a couple of minor issues noticed by Robert Frewell. 2014-07-27 17:11:34 +01:00
lmat
f40a93c6e1 Remove guid_init and guid_shutdown
They no longer do anything, and it's not probable that they ever will.
2014-07-25 17:38:33 -04:00
lmat
30fac05e35 Corrected uses of guid_to_string.
Previously, guid_to_string had been marked deprecated with a note about
it not being thread-safe. It was much worse than "not thread safe", it
was only safe in a particular situation, and its safety was being violated
throughout the code. It was clear that users of guid_to_string did not
understand what it was purporting to do because of its varied uses. Most
uses simply treated it like a Garbage-Collected Java String (use and forget).
I actually found at least one instance where the string was being freed. (!!!)

I made the method have a particular easy-to-understand semantic: it returns
a pointer to a string which must be freed by the caller. I then tried to
track down all uses of this function and correct them. Mostly, I just changed
the usage to guid_to_string_buff with a stack-allocated string to avoid the
the malloc/free cycle.
2014-07-25 17:30:55 -04:00
lmat
2a408ab9ef Cleared up GUID construction and allocation
To allocate a GUID, use guid_malloc. To allocate and construct a guid
(which is actually unique), use guid_new (and be sure to free it using
guid_free).
2014-07-25 14:14:09 -04:00
lmat
9c82a1e9bc Rename guid_new to guid_replace
`new` implies some allocation. Since guid_new was actually constructing
a guid in place rather than allocating it, it makes much more sense to
call it guid_replace (or guid_construct). We went with guid_replace.
2014-07-25 08:26:54 -04:00
lmat
26a49f9644 Implement GUID using boost's implementation
Since we're maintaining a C api, the implementation is sometimes less than
intuitive from either a C or C++ perspective. I am trying to use as much
boost as possible while making all the guarantees that the C code makes.

One function was declared deprecated because it "wasn't thread safe". This
was straightforward to repair, and is no longer marked deprecated, and there
are now two ways to convert GUID to String: passing your own character
buffer, and having one returned to you that you need to free.
2014-07-25 08:17:28 -04:00
John Ralls
2869e9412e Really make it 1.48 instead of 1.49. 2014-07-21 10:17:17 +01:00
John Ralls
a995196d3e Lower Boost minimum version to 1.48.0 per user request. 2014-07-21 10:08:03 +01:00
Mike Alexander
0c41f3bc5e Merge branch 'maint' 2014-07-13 22:50:30 -04:00
Mike Alexander
359327e942 Bug 733107: Search for reconcile status doesn't work right. 2014-07-13 22:50:12 -04:00
Mike Alexander
8b76ff21a2 Use symbols to access lot owner type and owner GUID properties. 2014-07-05 01:12:20 -04:00
Mike Alexander
bacc0b2a65 Fix crash in gncOwnerGetOwnerFromLot due to clobbered stack variable.
The "owner-type" lot property is 64 bits, don't store it in a 32 bit variable.
2014-07-05 01:12:12 -04:00
Geert Janssens
147a5f5d00 Disable non-literal-null-conversion warning issued by clang 2014-07-04 16:25:12 +02:00
Geert Janssens
4b3373c96b More '\0' -> NULL replacements to avoid clang warnings 2014-07-03 19:20:33 +02:00
John Ralls
1d3cee110c Revert unintended restoration of AC_MSG_RESULT. 2014-07-03 09:51:53 +02:00
John Ralls
29923b1fd9 Replace '\0' with NULL as char* argument, avoiding warning. 2014-07-02 22:55:36 +02:00
John Ralls
773326b7c5 Fix typo from 859866a. 2014-07-02 22:54:39 +02:00
Mike Alexander
d338982828 Properly nest AC_MSG_CHECKING and AC_MSG_RESULT calls to avoid confusing output. 2014-07-02 15:27:59 -04:00
John Ralls
859866ad28 Replace clang check with ax_check_compile_flags for -Wno-deprecated-register 2014-07-02 11:40:18 +02:00
Mike Alexander
97618e00c8 Use guint64 instead of uint64_t with G_GUINT64_FORMAT to avoid warnings. 2014-07-01 23:29:35 -04:00
Mike Alexander
84384ea565 Merge branch 'maint' 2014-07-01 22:51:30 -04:00
Mike Alexander
19737113ad Merge branch 'maint' into 'master' 2014-07-01 16:29:34 -04:00
Geert Janssens
2952df937c Drop packaging/win32
Windows build specifics are now handled in gnucash-on-windows repository
2014-07-01 22:16:37 +02:00
John Ralls
4aed8b37e1 Don't try to use -Wno-deprecated-register with Clang.
It doesn't work.
2014-06-29 15:20:20 +02:00
Geert Janssens
17ed25229f First unit test for gncEntry and fix first bug it revealed 2014-06-21 23:39:50 +02:00
Geert Janssens
031943c565 Fix whitespace 2014-06-21 23:19:36 +02:00
Geert Janssens
f2ffaf23ae Revert "Bug726674-BudgetReverseSignSupport"
This patch got pushed by accident before it was ready to be committed.
This reverts commit 247f086703.
2014-06-21 15:17:42 +02:00
Carsten Rinke
3b4111c16d Bug 726535 - Budget BarChart Report - add option to change to a line chart
Rebasing the patch for 2.6.3 to master commit ea2389f0932beae..
(done manually, not using git)
2014-06-19 11:46:30 +02:00
John Ralls
ea2389f093 Merge branch 'c++-build' 2014-06-16 11:04:18 -07:00
John Ralls
34a7e8d62c Add Boost requirement to CMake. 2014-06-16 11:03:45 -07:00
John Ralls
273648ea80 Allow C/C++ extensions
MinGW declares any standard functions not part of the ISO C standard
in #ifndef __STRICT_ANSI__ blocks; Gcc defines __STRICT_ANSI__ with
-std=c++11; Pass 'ext' to the C++11 macro to get -std=gnu++ll, which allows
all those extensions we use.
2014-06-15 14:42:49 -07:00
lmat
949702d04d Added a GUID test suite
The plan is to change gnc guid to use boost's guid implementation. There were
no tests for guid before, but we need them to ensure that we don't have regressions
when that work begins.
2014-06-15 14:42:47 -07:00
John Ralls
ce409753b8 Disable C++11 deprecation warning for register storage class
It's used in GLib, so we're stuck with it for the short term.
2014-06-15 14:42:46 -07:00
John Ralls
b36a98149b Better test for conflict between optimization and FORTIFY_SOURCE 2014-06-15 14:42:45 -07:00
John Ralls
33aa8a13a7 Don't override CFLAGS, CPPFLAGS, etc.
Doing so gives the hardcoded values precedence over the user's environment.
Use AM_CFLAGS, AM_CPPFLAGS, etc. instead.
2014-06-15 14:42:43 -07:00
John Ralls
8e25412d20 Add optional use of Google Profiler.
See https://code.google.com/p/gperftools
2014-06-15 14:42:42 -07:00
John Ralls
8a899fc47a Add dependency on Boost. 2014-06-15 14:42:41 -07:00
John Ralls
ae93f2b9c9 Check for C++11 support, fail if it's not there. 2014-06-15 14:42:39 -07:00
John Ralls
bd93cb26dd Fix reaches end of function error 2014-06-15 13:48:42 -07:00
Geert Janssens
2182746baf Bug 723442 - Report Options - Report Name too short 2014-06-10 13:40:28 +02:00
Carsten Rinke
247f086703 Bug726674-BudgetReverseSignSupport 2014-06-09 20:56:49 +02:00
Michalis Kamprianis
8e56cc88c0 Bug 719457 - Template for Home Mortgage Loan isn't properly nested.
modified:   accounts/C/acctchrt_full.gnucash-xea
	modified:   accounts/en_GB/acctchrt_full.gnucash-xea
	modified:   accounts/ja/acctchrt_homeloan.gnucash-xea
	modified:   accounts/ja/acctchrt_otherloan.gnucash-xea
	modified:   accounts/ja/acctchrt_retiremt.gnucash-xea
	modified:   accounts/ja/acctchrt_spouseretire.gnucash-xea
	modified:   accounts/ko/acctchrt_homeloan.gnucash-xea
	modified:   accounts/ko/acctchrt_otherloan.gnucash-xea
	modified:   accounts/ko/acctchrt_retiremt.gnucash-xea
	modified:   accounts/ko/acctchrt_spouseretire.gnucash-xea
	modified:   accounts/lv/acctchrt_full.gnucash-xea
	modified:   accounts/lv/acctchrt_homeloan.gnucash-xea
	modified:   accounts/lv/acctchrt_retiremt.gnucash-xea
	modified:   accounts/lv/acctchrt_spouseretire.gnucash-xea
	modified:   accounts/nl/acctchrt_full.gnucash-xea
	modified:   accounts/pl/acctchrt_full.gnucash-xea
	modified:   accounts/pl/acctchrt_homeloan.gnucash-xea
	modified:   accounts/pl/acctchrt_otherloan.gnucash-xea
	modified:   accounts/pl/acctchrt_retiremt.gnucash-xea
	modified:   accounts/pl/acctchrt_spouseretire.gnucash-xea
	modified:   accounts/ru/acctchrt_homeloan.gnucash-xea
	modified:   accounts/tr_TR/acctchrt_homeloan.gnucash-xea
	modified:   accounts/zh_CN/acctchrt_full.gnucash-xea
	modified:   accounts/zh_CN/acctchrt_homeloan.gnucash-xea
	modified:   accounts/zh_CN/acctchrt_otherloan.gnucash-xea
	modified:   accounts/zh_CN/acctchrt_retiremt.gnucash-xea
	modified:   accounts/zh_CN/acctchrt_spouseretire.gnucash-xea
2014-06-09 20:21:56 +02:00
Christoph Holtermann
2c955a4713 Some adjustments, new IPython version 2014-06-09 20:13:06 +02:00
John Ralls
2c910ed1bb Fix signed int overflow warning. 2014-06-09 08:34:20 -07:00
John Ralls
8d723f1b1e double_to_gnc_numeric: Return overflow error immediately on invalid input.
Which is either nan or outside the range that gnc_numeric supports.
Also extend the powten array to support the full range of gnc_numeric.
2014-06-08 13:48:06 -07:00
John Ralls
0fc71ed4c7 Use more significant digits for SX function returns.
gnc_sxed_check_consistent() was failing to balance mortgage payments with
large payments or small interest amounts because of rounding errors with
only 6 significant digits. Using 18 causes values < 1 to overflow, so I
compromised on 12.

Also log an error and return NULL if there's an overflow, since the value
won't be useful.
2014-06-08 13:48:06 -07:00