From d0010daf7b06d933013bd09aebd5a2a0752135ca Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Fri, 19 May 2000 06:07:27 +0000 Subject: [PATCH] some cosmetic changes git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2352 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/engine/Account.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/engine/Account.c b/src/engine/Account.c index ae807ffa7c..40bce55c5a 100644 --- a/src/engine/Account.c +++ b/src/engine/Account.c @@ -29,14 +29,14 @@ #include "Account.h" #include "AccountP.h" +#include "date.h" +#include "GNCIdP.h" #include "Group.h" #include "GroupP.h" -#include "date.h" #include "messages.h" #include "Queue.h" #include "Transaction.h" #include "TransactionP.h" -#include "GNCIdP.h" #include "util.h" /* The unsafe_ops flag allows certain unsafe manipulations to be @@ -67,6 +67,7 @@ static short module = MOD_ENGINE; /********************************************************************\ \********************************************************************/ + void xaccInitAccount (Account * acc) { @@ -101,6 +102,9 @@ xaccInitAccount (Account * acc) acc->changed = 0; acc->open = 0; acc->mark = 0; + + xaccGUIDNew(&acc->guid); + xaccStoreEntity(acc, &acc->guid, GNC_ID_ACCOUNT); } /********************************************************************\ @@ -110,13 +114,7 @@ Account * xaccMallocAccount( void ) { Account *acc = (Account *)_malloc(sizeof(Account)); - xaccInitAccount (acc); - - xaccGUIDNew(&acc->guid); - - xaccStoreEntity(acc, &acc->guid, GNC_ID_ACCOUNT); - return acc; } @@ -220,6 +218,7 @@ xaccAccountCommitEdit (Account *acc) /********************************************************************\ \********************************************************************/ + const GUID * xaccAccountGetGUID (Account *account) { @@ -231,7 +230,9 @@ xaccAccountGetGUID (Account *account) /********************************************************************\ \********************************************************************/ -void xaccAccountSetGUID (Account *account, GUID *guid) + +void +xaccAccountSetGUID (Account *account, GUID *guid) { if (!account || !guid) return; @@ -244,6 +245,7 @@ void xaccAccountSetGUID (Account *account, GUID *guid) /********************************************************************\ \********************************************************************/ + Account * xaccAccountLookup (const GUID *guid) {