* src/test/test-stuff.c (failure): don't print num if == -1.
(success): same.
(get_random_account): move here from test-xml-account.c
(get_random_split): move here from test-xml-transaction.c
(get_random_transaction): same.
(success_args): New func.
(success): Simplified version
(failure_args): new func.
(failure): Simplified version.
* src/engine/io-gncbin-r.c: same as below.
* src/engine/TransLog.c (xaccTransWriteLog): same as below.
* src/engine/Group.c (xaccGroupMergeAccounts): same as below.
* src/engine/Backend.c (xaccTransactionGetBackend): Convert to not
use the split's acc part directly, but only to access through
funcs
* src/engine/sixtp-dom-parsers.c (dom_tree_generic_parse): Add
generic parser.
* src/engine/gnc-account-xml-v2.c (gnc_account_end_handler): use
generic parser extracted from here and used here and
gnc-transaction-iml-v2.c
* src/engine/Transaction.c (xaccInitSplit): Add a split->acc_guid
field that is set to the account's guid. This way an Account is
not required to exist yet when loading the split. Later when
xaccSplitGetAccount is called the account is looked up, cached and
returned. Make sure everything accesses ->acc through the helper
function.
* src/engine/AccountP.h: same as below.
* src/engine/Account.c (xaccAccountSetGUID): mark guid argument
const since it doesn't keep a pointer to it.
* src/doc/xml/transactions-v2.dtd: change guid -> id.
* src/engine/Transaction.c (get_denom_internal): New helper func.
(get_currency_denom): use func.
(get_security_denom): use func.
* src/engine/sixtp.c: (sixtp_sax_end_handler,
sixtp_sax_characters_handler, sixtp_sax_start_handler): don't use
g_return_if_fail to test pdata->parsing_ok so we don't see the
million CRITICAL warnings. We'll print an error at the end
anyway.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3762 57a11ea4-9604-0410-9ed3-97b8803252fd
* src/test/test-xml-account.c (delete_random_account): new func to
cleanup commodities not generally freed at xaccAccountDestroy.
(node_and_account_equal): complete func to compare account and the
dom tree created. Looks good except for some warnings from
dom_tree_to_text.
* src/test/test-stuff.c (equals_node_val_vs_commodity): new func.
(equals_node_val_vs_guid): New func.
(equals_node_val_vs_string): new func.
* src/engine/gnc-account-xml-v2.c (account_code_handler): Add func.
(account_description_handler): Add func. Oops forgot a couple.
(gnc_account_dom_tree_create): Move all string tags in file to
const gchar*s.
(account_slots_handler): Complete func.
* make-gnucash-patch.in: Test to see if makepatch exists.
* src/engine/sixtp-dom-parsers.c (dom_tree_to_text): same as
below. Add NULL tests for arguments. Affected many functions in
this file.
* src/engine/gnc-pricedb-xml-v1.c (price_parse_xml_sub_node): Same
as below.
* src/engine/gnc-commodity-xml-v2.c (set_commodity_value): Convert
dom_tree_to_text to act as rest looking at children on it's own.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3718 57a11ea4-9604-0410-9ed3-97b8803252fd
1) More meta data updates (.cvsignore updates, debian/* updates,
gnucash.lsm)
2) Changes to make-gnucash-patch.in. I like the changes, but I don't
know whether they would be universally liked, so pay attention to
this one. Changes include:
a) check out compared source from cvs
b) use .cvsignore files to get a large part of the --exclude list.
c) Keep track of past patches by not automatically overwriting old
patches and put the patches in a directory to keep things neat.
3) Refactoring in src/engine/Transaction.c to remove the redundant
code setting dates in transactions.
4) remove all the #if 0 blocks in src/engine/io-gnc{bin,xml}* (helped
my see things more clearly when looking at the code. Again ignore
it if this is inappropriate.)
5) append emacs local variable settings stuff to save file so it's
known as an xml file.
6) Patch to cleanup startup some more.
a) src/gnome/top-level.c: don't run load-account-file, split up
startup into a couple of functions.
b) src/gnome/window-main.h; src/gulie/gnc.gwp: add the new functions
c) src/scm/main.scm: do the new startup sequence.
d) All this so in a batch environment you can start up the gui
system without bringing up the default window.
7) src/scm/report/budget-report.scm: some refactoring/cleanup done
while looking at the code. Nothing functional different (at least
there shouldn't be.)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3320 57a11ea4-9604-0410-9ed3-97b8803252fd