Commit Graph

16273 Commits

Author SHA1 Message Date
John Ralls
ab94094523 Lose the value returns for various reasons of inequality. 2014-12-03 16:28:54 -08:00
John Ralls
a99335104f Assert that the quotient and remainder references aren't this.
Otherwise this gets zeroed and produces a wrong result.
2014-12-03 16:28:54 -08:00
John Ralls
f4c69dbc48 Ensure that the sign is correctly preserved and transferred. 2014-12-03 16:28:54 -08:00
John Ralls
9e37ad27b3 Implement QofInt128.pow. 2014-12-03 16:28:54 -08:00
John Ralls
f5c7b1101d Implement QofInt128::gcd and lcm. 2014-12-03 16:28:54 -08:00
John Ralls
765d5583c1 Fix mask error in operator<<= and operator>>=
Must specify 1 as a uint64_t to get the right masks.
2014-12-03 16:28:54 -08:00
John Ralls
7c22669a76 Check for incoming overflow and NaN on all class computational operators. 2014-12-03 16:28:54 -08:00
John Ralls
296ce314a3 Extract a class function bits() to return a size value.
Helps to pre-determine overflow. Also correct the original implementation
in operator *=, which got the wrong answer.
2014-12-03 16:28:53 -08:00
John Ralls
1b288df20d Add bitwise operators and binary operators. 2014-12-03 16:28:53 -08:00
John Ralls
c649aa9736 Some more constructors, for convenience. 2014-12-03 16:28:53 -08:00
John Ralls
810a6bc8ae Operators /= and %= plus function div() for QofInt128. 2014-12-03 16:28:53 -08:00
John Ralls
1c83db5896 Add increment, decrement, and shift-eauals operators to QofInt128.
They'll be needed for division.
2014-12-03 16:28:53 -08:00
John Ralls
c7752d5d3c Add zero and abs functions to QofInt128. 2014-12-03 16:28:53 -08:00
John Ralls
1e6855efe5 Implement operator*= for QofInt128 2014-12-03 16:28:53 -08:00
John Ralls
d4fdd9ef17 Begin QofInt128 class.
Constructs, adds & subtracts, prints, and compares.

Includes unit tests.
2014-12-03 16:28:53 -08:00
John Ralls
9d029d7f82 More realistic get_random_gnc_numeric()
Increases the possible denominators to 1E10, but clamps the numerator to
1E13 * denom with 1E19 max. This is equivalent to $1E8/1 US in
Indonesian Rupiah, the currency with the lowest per-unit value in the
world at the time of this commit.
2014-12-03 16:28:53 -08:00
John Ralls
996345a00f Fix gperformance-tools setup and apply it to src/engine/tests. 2014-12-03 16:26:38 -08:00
Robert Fewell
3c46aac94a Bug 738462 - CSV Import This patch adds some text to clarify that the transaction export is not a match for the import. 2014-11-30 15:43:18 +01:00
Robert Fewell
32dd199326 Bug 679791 - Import Template for importing CSV files - part2
This patch adds the option to Save and Load the CSV import settings.
2014-11-30 15:32:12 +01:00
Robert Fewell
eec86eec80 Bug 679791 - Import Template for importing CSV files - part 1.
This patch fixes the resetting of the widgets on the setting
preview page when you navigate back to the file selection page
in the assistant.
2014-11-30 15:31:37 +01:00
Geert Janssens
1b53d7fa2e Merge branch 'master' of https://github.com/c-holtermann/gnucash 2014-11-29 16:32:50 +01:00
Geert Janssens
e219ef22ea Merge branch 'maint' 2014-11-29 14:26:27 +01:00
Geert Janssens
abf78a202c Python bindings - fix creation of new xml files 2014-11-24 11:51:33 +01:00
John Ralls
19f08da56b Implement copy and move operator= and move constructor for KvpValueImpl
Fixes double-delete crash of the embedded ptr when copy-initializing.
2014-11-18 17:00:04 -08:00
lmat
ba59350f69 Adding KvpValueImpl test suite 2014-11-18 09:54:34 -08:00
Geert Janssens
e59c3e0639 Fix a few typos in python example scripts and align them with the latest api changes 2014-11-17 17:59:07 +01:00
Geert Janssens
22490a37ab Fix build-time hard-coded path introduced by the guile2 compile changes
These changes hardcoded the standards-reports path at build time.
On Windows and OS X the final path is only known at installation time.
So after installation the build-time hard-coded path would be invalid and
the standard-reports directory could no longer be found.
2014-11-17 14:48:02 +01:00
Geert Janssens
64d9a3b99e Prevent crash when standards-report dir doesn't exist 2014-11-17 15:43:16 +01:00
Christoph Holtermann
67b807fbf1 Small doc changes 2014-11-12 16:50:00 +01:00
Christoph Holtermann
de47330288 Change latex_invoices.py to query for all invoices
Before invoices were catched by going through lots
and getting associated invoices.
2014-11-12 16:45:53 +01:00
Christoph Holtermann
c86c69ad05 Additional doxygen doc 2014-11-12 16:39:08 +01:00
Christoph Holtermann
7d6caa8232 latex_invoices.py includes gncinvoicefkt.py 2014-11-12 15:30:13 +01:00
Geert Janssens
578dfd810b Fix head-or-tail stylesheet after guile2 compile changes
In particular the N_ macro is now defined in a separate module
which should be 'use-module'd when N_ is used.
2014-11-12 15:24:47 +01:00
Geert Janssens
dd65a6e39e Periodic merge of branch 'maint'
Fixed conflicts:
	src/test-core/Makefile.am

Most important changes:
* precompile scm files in case guile 2 is detected
* several new and updated translations
* several bugfixes since the 2.6.4 release
2014-11-12 15:23:04 +01:00
Christoph Holtermann
ea39d65372 Some doc for gncinvoicefkt.py 2014-11-12 15:08:57 +01:00
Christoph Holtermann
398fb96065 Doxygen doc extended for python invoice export 2014-11-12 14:54:56 +01:00
Geert Janssens
d6826976ef Fix parallel make for guile2 compilation 2014-11-12 14:43:01 +01:00
Christoph Holtermann
3818f3272e small fixes for doxygen 2014-11-12 13:28:25 +01:00
Christoph Holtermann
66a9ee80ce polishing the template 2014-11-12 13:27:46 +01:00
Geert Janssens
3a825c929f QIF Import crashes when closing via the 'X' button on the last page
Using the 'Close' button works correctly. The difference is that
the 'X' button triggers a cancel action while the 'Close' button
triggers a close action. I have changed this such that when the
import already happened (that is when the user is looking at the
summary page), a close action will be triggered in both cases.
2014-11-12 12:07:51 +01:00
Christoph Holtermann
415b8c7b97 Invoice templates 2014-11-11 21:57:21 +01:00
Christoph Holtermann
eb9578648e locale formatting added 2014-11-11 21:35:15 +01:00
Christoph Holtermann
a53f615f80 This question has been solved 2014-11-11 17:08:57 +01:00
Christoph Holtermann
765d73f903 Querying and listing all invoices now possible 2014-11-11 16:59:45 +01:00
Christoph Holtermann
9595062e5f Invoice.tex is to be created not to be on github 2014-11-10 18:52:24 +01:00
Geert Janssens
5f3f9a525a Omit extension on calls to load-extension
.so was platform specific. By omitting the extension
guile properly finds the right library on both linux
and Windows (haven't tested on OS X but I assume it
to work there as well).
2014-11-10 18:31:17 +01:00
Geert Janssens
c9bfaa8bb3 Use one common base directory to store all scheme files and modules
This makes it easier for humans to locate a file after
installation and simplifies the build system.
2014-11-10 18:31:16 +01:00
Geert Janssens
be0e3581c2 Guile 2 pre-compilation improvements
1. Tell the engine to look in the build dir for the backend modules
   Guile compilation loads the engine libraries for
   some guile modules. This triggers the engine
   initialization code which tries to load the xml backend module
   and optionally the dbi module as well.
   By default it looks for these modules in the installed directory
   but during build they are not installed yet, so use a few
   environment variables to tell the engine to look in the build
   dir instead.

2. Wait for the c library to be linked before attempting to
   compile the guile files. Some guile files need the library
   to be available.

Note that neither fix is necessary for all directories that has
scheme files to compile. For consistency between makefiles, I have
chosen to add them to all, which won't hurt.
2014-11-10 18:31:16 +01:00
Geert Janssens
97f8f39dc6 Pre-compile scm files when building with guile 2
With pre-compiled scm files, guile will no longer
resort to autocompilation at first startup. This avoids
bugs like downstream
https://bugzilla.redhat.com/show_bug.cgi?id=1151870
(Where autocompiled files for an older version of
gnucash are more recent than the source files installed
with the newer version)

Note that a new variable GUILE_LOAD_COMPILED_PATH is added
for this in the environment file. This variable should probably
be updated in the OSX and Windows build scrips if/when these
are building with guile 2.

Strictly speaking this new variable is only needed for guile 2.
However since guile 1.8 simply ignores the environment variable,
it's just set unconditionally regardless of the guile version
being active.
2014-11-10 18:31:15 +01:00
Geert Janssens
2a6fcf1cd5 Guile module structure cleanup
- fix circular dependency between business-reports.scm and owner-report.scm
- split out gettext routines to properly handle N_ for all files that use it
- remove some unused module inclusions
- tax module depends on app-utils -> fix build order
2014-11-10 18:31:14 +01:00