Single-pass audit/cleanup of Account.c

* standardize on 'acc' as variable name for Account.
 * removed 'acc->inst.dirty = TRUE' when preceeded by mark_account.
 * slightly more consistent whitespace.
 * short-circuit no-op in many cases where we thought we were changing state but we really weren't.  Don't dirty Accounts in these cases.
 * fix a couple cases where we dirtied the account without dirtying the parent
 * fix one BUG where we just blew away the account's Lots for no reason.
 * comment possible bug where we don't dirty a split.
 * comment two possible buglets where we generate double CM events.
 * comment on possible bugs related to conditional sorting of the Split list.
 * heavy conversion from lower-level to higher-level KVP api.
 * plug mem leak of entire GList of splits.
 * document minor change to corner-case behavior of xaccAccountHasAncestor().
 * several control flow simplifications.
 * fixed one case where we were changing the Account without dirtying it. (Can't find this one now.  Maybe I imagined it.)

Please note where I've marked 'BUG'.  I think there are still (at
least) 2 medium and 2 minor bugs remaining in this file.  I'll have
another look some other day.




git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12199 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Chris Shoemaker 2005-12-29 22:22:33 +00:00
parent b12cf9b46f
commit 24391d1955
2 changed files with 415 additions and 645 deletions

File diff suppressed because it is too large Load Diff

View File

@ -441,10 +441,10 @@ void xaccAccountSetReconcileChildrenStatus(Account *account, gboolean
/** DOCUMENT ME! */
gboolean xaccAccountGetReconcileChildrenStatus(Account *account);
/** Returns true if the account has 'ancestor' as an ancestor.
* An ancestor account my be the accounts parent, its parent's parent,
* its parent,s parent's parent, etc.
* Returns false if either one is NULL.
/** Returns true if the account is 'ancestor' or has 'ancestor' as an
* ancestor. An ancestor account may be the accounts parent, its
* parent's parent, its parent's parent's parent, etc. Returns false
* if either one is NULL.
*/
gboolean xaccAccountHasAncestor (Account *account, Account *ancestor);