Commit Graph

7919 Commits

Author SHA1 Message Date
Linas Vepstas
656e03fb96 add check for null pointer
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10182 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-09 03:09:32 +00:00
Linas Vepstas
e1807cad13 port over to new typenames.
Make sure that accounts are properly anchored in a book.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10181 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-09 03:07:34 +00:00
Linas Vepstas
caf2017cfd re-order division so as to handle the failure of a special case
(this fixes the test-query bug)


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10180 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-07 06:20:44 +00:00
Linas Vepstas
9208d7ce8e add the failing test-query test as a special case
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10179 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-07 06:17:49 +00:00
Linas Vepstas
6ce3b3c2fc fix test case failure by re-ordering block of code that checks for LCD
flag.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10178 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-07 05:38:24 +00:00
Linas Vepstas
922d18d706 add code to make sure that split amount and value are valid numbers.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10174 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-07 02:59:28 +00:00
Linas Vepstas
8ac1f54b9f add code to create intentionally borked transactions
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10173 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-07 02:42:44 +00:00
Linas Vepstas
c56e1cf90b improve debug printing
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10172 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-06 14:41:02 +00:00
Linas Vepstas
441046b19e add check -- cap gains not possible is value and amount are in the same
currency


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10171 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-06 14:39:19 +00:00
Linas Vepstas
60f2797947 shuffle big blocks of code around; no actual changes to function
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10170 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-06 14:24:09 +00:00
Linas Vepstas
763b1ea012 handle yet another overflow case in numeric multiplication.
Turns out there were common factors between two fractions;
by eliminating these first, significant rounding errors can
be avoided.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10169 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-06 13:42:39 +00:00
Linas Vepstas
bc2faba5ff add to-do notes
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10168 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-06 03:46:41 +00:00
Linas Vepstas
a069fe265f clean up test generator to produce self-consistent data.
I make these changes with some trepidation, since this puts
a whole lot less stress on the 'scrub' infrastructure.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10167 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-06 03:40:57 +00:00
Linas Vepstas
5ac7a28aa8 improve debug printing
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10166 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-06 03:38:25 +00:00
Linas Vepstas
27726dde38 cleanup debug printing
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10165 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-06 03:37:31 +00:00
Linas Vepstas
b406054128 replace the algo in xaccTransGetImbalance() with a higher-performance version
also, clean up some debug outp[ut printing


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10164 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-06 03:36:47 +00:00
Linas Vepstas
ae2ea54415 the error log wasn't being initialized
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10162 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-05 17:22:30 +00:00
Derek Atkins
2168045b6f Improved checks for scanf %lld and %qd as per gc-devel mail.
* acinclude.m4: create a SCANF_QD_CHECK and make sure both
	  that and SCANF_LLD_CHECK are "long long" constant-safe
	* configure.in: use the new SCANF_QD_CHECK and use it
	  earlier in the configuration.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10161 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-05 03:24:04 +00:00
Linas Vepstas
f732926232 remove really dorky memory leak during debug printing
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10160 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-04 17:26:50 +00:00
Derek Atkins
abc0dfff51 Get test-lots to die consistently.
- Set the rng to a known seed.
- Loop the test so it fails.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10159 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-04 17:24:08 +00:00
Linas Vepstas
454a48e325 fix really trite memory leak
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10158 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-04 17:21:15 +00:00
Linas Vepstas
fe8ecadbdc fix null-pointer deref that results in core dump.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10157 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-04 17:18:43 +00:00
Derek Atkins
2291561fbf get test-query to fail consistently.
PERR() when xaccTransGetSharePrice() overflows.
Loop test-query, and start the rng to fail consistently.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10156 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-04 17:10:38 +00:00
Linas Vepstas
ae6b1c475e fix minor memory leak, the numeric_to-string returnes alloced memory
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10155 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-04 15:01:05 +00:00
Linas Vepstas
1a66b7b8d4 improved diagnostic messages
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10154 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-04 04:26:01 +00:00
Linas Vepstas
f76b3ad534 fix yet another intermediate-math overflow bug.
comparing two numbers gave incorrect results because
intermediate calculation overflowed


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10153 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-04 03:56:40 +00:00
Linas Vepstas
5ff6c419d6 add function to compare (order) two numbers
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10152 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-04 03:55:16 +00:00
Linas Vepstas
2e0ea64b27 ignore test case binaries
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10151 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 22:12:33 +00:00
Linas Vepstas
17dcfe61f6 style tweaks
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10150 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 22:11:52 +00:00
Linas Vepstas
6445a80a08 whitespace fixes
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10149 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 21:11:47 +00:00
Linas Vepstas
b601364047 change fifo/lifo policy to not serve up splits with a zero amount
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10148 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 19:03:45 +00:00
Linas Vepstas
cc663f2098 -- reject voided transactions in cap-gains caluclations;
-- improve diagnostic error messages


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10147 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 18:57:31 +00:00
Linas Vepstas
75fbd13b64 -- do not add voided transsactions to lots.
-- improve dagnostic prints for certain errors


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10146 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 18:54:48 +00:00
Linas Vepstas
bf408cb3c3 bugfix: failed to update list of frames correctly when the
first item in the list was delected.  This could lead to
infinite loops.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10145 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 18:38:37 +00:00
Linas Vepstas
492ed743ae re-order the way that random data is created,
making it slightly more random.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10144 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 15:29:39 +00:00
Linas Vepstas
16ef1b0e22 remove commented out cruddy code
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10143 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 15:19:19 +00:00
Derek Atkins
8fe7398fb4 Add TD Efunds (#145297).
* src/engine/gnc-commodity.c:
	  Apply David Grant's patch to add TD Efunds.  Fixes #145297.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10142 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 02:20:33 +00:00
Derek Atkins
c2e3dee382 Apply David Reiser's patch for Quicken(tm) cheques with stub.
* src/gnome/dialog-print-check.c:
	* src/gnome/glade/print.glade:
	* src/scm/printing/print-check.scm:
	  Apply David Reiser's patch for Quicken(tm) cheques with stub.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10140 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 02:11:51 +00:00
Linas Vepstas
c1f9d93c9c tweak yet another possible overflow path
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10138 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 01:49:22 +00:00
Linas Vepstas
3e14e8c3d3 That's not all, there's even more!
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10137 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 01:47:30 +00:00
Linas Vepstas
0e0482c2c8 test driver tweaks
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10136 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 01:24:01 +00:00
Linas Vepstas
0a68dbc6d8 fix what I beleive is the last of the overflow bugs.
If rounding is allowed, then multiplication should (never?) overflow.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10135 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 01:19:51 +00:00
Linas Vepstas
7c48896b8d Last of the Mohicans
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10134 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-03 01:17:26 +00:00
Linas Vepstas
4ffa9fff32 make the debug print statements more informational
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10133 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-02 04:06:12 +00:00
Linas Vepstas
7a7fee132e re-order math to make overflow less likely
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10132 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-02 04:05:25 +00:00
Linas Vepstas
fdbd2da2ab -- improve debug printing messages.
-- re-order math to make overflow less like to occur


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10131 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-02 04:03:59 +00:00
Linas Vepstas
f440c3ac8d bug-fix -- adding negative num to zero used to give a positive result.
(this bug was introduced only recently, about a week ago, with the changes
to 128-bit intermediate calculations, and does not/should not affect any
actual users).


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10130 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-02 03:13:43 +00:00
Linas Vepstas
56059a5a22 add more tests involving negative quantities
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10129 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-02 03:11:09 +00:00
Linas Vepstas
0ccd82473b adding a negative number to zero flips its sign! Oops!!
Add a test to make sure it never happens again.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10128 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-02 03:00:02 +00:00
Christian Stimming
063e545fc0 Add toolbar element for saving the current report.
2004-06-30  Christian Stimming  <stimming@tuhh.de>

	* src/report/report-gnome/window-report.c: Add toolbar element for
	saving the current report.

	* src/report/report-system/report.scm, report-system.scm: Add
	function for saving one particular report to the
	~/.gnucash/saved-reports-1.8 file. Add extra menu only for
	customized reports.

	* src/scm/main-window.scm, src/scm/main.scm: Remove the previous
	function for saving all reports since it is no longer necessary.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10127 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-06-30 20:08:15 +00:00