mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
name change of some routines
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@685 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
520a16a54a
commit
09853fd050
@ -214,7 +214,7 @@ xaccGetAccountID (Account *acc)
|
|||||||
\********************************************************************/
|
\********************************************************************/
|
||||||
|
|
||||||
void
|
void
|
||||||
xaccInsertSplit ( Account *acc, Split *split )
|
xaccAccountInsertSplit ( Account *acc, Split *split )
|
||||||
{
|
{
|
||||||
int i,j;
|
int i,j;
|
||||||
int inserted = FALSE;
|
int inserted = FALSE;
|
||||||
@ -277,7 +277,7 @@ xaccInsertSplit ( Account *acc, Split *split )
|
|||||||
\********************************************************************/
|
\********************************************************************/
|
||||||
|
|
||||||
void
|
void
|
||||||
xaccRemoveSplit ( Account *acc, Split *split )
|
xaccAccountRemoveSplit ( Account *acc, Split *split )
|
||||||
{
|
{
|
||||||
int i,j;
|
int i,j;
|
||||||
|
|
||||||
@ -459,8 +459,8 @@ xaccCheckDateOrder (Account * acc, Split *split )
|
|||||||
|
|
||||||
/* take care of re-ordering, if necessary */
|
/* take care of re-ordering, if necessary */
|
||||||
if( outOfOrder ) {
|
if( outOfOrder ) {
|
||||||
xaccRemoveSplit( acc, split );
|
xaccAccountRemoveSplit( acc, split );
|
||||||
xaccInsertSplit( acc, split );
|
xaccAccountInsertSplit( acc, split );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -594,8 +594,8 @@ xaccMoveFarEnd (Split *split, Account *new_acc)
|
|||||||
/* remove the partner split from the old account */
|
/* remove the partner split from the old account */
|
||||||
acc = (Account *) (partner_split->acc);
|
acc = (Account *) (partner_split->acc);
|
||||||
if (acc != new_acc) {
|
if (acc != new_acc) {
|
||||||
xaccRemoveSplit (acc, partner_split);
|
xaccAccountRemoveSplit (acc, partner_split);
|
||||||
xaccInsertSplit (new_acc, partner_split);
|
xaccAccountInsertSplit (new_acc, partner_split);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,8 +70,8 @@ void xaccAccountCommitEdit (Account *);
|
|||||||
|
|
||||||
int xaccGetAccountID (Account *);
|
int xaccGetAccountID (Account *);
|
||||||
|
|
||||||
void xaccInsertSplit (Account *, Split *);
|
void xaccAccountInsertSplit (Account *, Split *);
|
||||||
void xaccRemoveSplit (Account *, Split *);
|
void xaccAccountRemoveSplit (Account *, Split *);
|
||||||
|
|
||||||
/* the following recompute the partial balances (stored with the transaction)
|
/* the following recompute the partial balances (stored with the transaction)
|
||||||
* and the total balance, for this account */
|
* and the total balance, for this account */
|
||||||
|
@ -659,7 +659,7 @@ readTransaction( int fd, Account *acc, int token )
|
|||||||
|
|
||||||
/* insert the split part of the transaction into
|
/* insert the split part of the transaction into
|
||||||
* the credited account */
|
* the credited account */
|
||||||
if (peer_acc) xaccInsertSplit( peer_acc, &(trans->source_split) );
|
if (peer_acc) xaccAccountInsertSplit( peer_acc, &(trans->source_split) );
|
||||||
|
|
||||||
/* next read the debit account number */
|
/* next read the debit account number */
|
||||||
err = read( fd, &acc_id, sizeof(int) );
|
err = read( fd, &acc_id, sizeof(int) );
|
||||||
@ -677,7 +677,7 @@ readTransaction( int fd, Account *acc, int token )
|
|||||||
split = xaccMallocSplit ();
|
split = xaccMallocSplit ();
|
||||||
xaccTransAppendSplit (trans, split);
|
xaccTransAppendSplit (trans, split);
|
||||||
split -> acc = (struct _account *) peer_acc;
|
split -> acc = (struct _account *) peer_acc;
|
||||||
xaccInsertSplit (peer_acc, split);
|
xaccAccountInsertSplit (peer_acc, split);
|
||||||
|
|
||||||
/* duplicate many of the attributes in the credit split */
|
/* duplicate many of the attributes in the credit split */
|
||||||
split->damount = -num_shares;
|
split->damount = -num_shares;
|
||||||
@ -692,7 +692,7 @@ readTransaction( int fd, Account *acc, int token )
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
/* Version 1 files did not do double-entry */
|
/* Version 1 files did not do double-entry */
|
||||||
xaccInsertSplit( acc, &(trans->source_split) );
|
xaccAccountInsertSplit( acc, &(trans->source_split) );
|
||||||
}
|
}
|
||||||
} else { /* else, read version-5 files */
|
} else { /* else, read version-5 files */
|
||||||
Split *split;
|
Split *split;
|
||||||
@ -708,7 +708,7 @@ readTransaction( int fd, Account *acc, int token )
|
|||||||
trans->source_split.parent = trans;
|
trans->source_split.parent = trans;
|
||||||
|
|
||||||
/* then wire it into place */
|
/* then wire it into place */
|
||||||
xaccInsertSplit( ((Account *) (trans->source_split.acc)), &(trans->source_split) );
|
xaccAccountInsertSplit( ((Account *) (trans->source_split.acc)), &(trans->source_split) );
|
||||||
|
|
||||||
/* free the thing that the read returned */
|
/* free the thing that the read returned */
|
||||||
split->acc = NULL;
|
split->acc = NULL;
|
||||||
@ -729,7 +729,7 @@ readTransaction( int fd, Account *acc, int token )
|
|||||||
split = readSplit (fd, token);
|
split = readSplit (fd, token);
|
||||||
split->parent = trans;
|
split->parent = trans;
|
||||||
xaccTransAppendSplit( trans, split);
|
xaccTransAppendSplit( trans, split);
|
||||||
xaccInsertSplit( ((Account *) (split->acc)), split);
|
xaccAccountInsertSplit( ((Account *) (split->acc)), split);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -539,7 +539,7 @@ xaccMergeAccounts (AccountGroup *grp)
|
|||||||
acc_b->splits[k] = NULL;
|
acc_b->splits[k] = NULL;
|
||||||
if (acc_b == (Account *) split->acc)
|
if (acc_b == (Account *) split->acc)
|
||||||
split->acc = (struct _account *) acc_a;
|
split->acc = (struct _account *) acc_a;
|
||||||
xaccInsertSplit (acc_a, split);
|
xaccAccountInsertSplit (acc_a, split);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* free the account structure itself */
|
/* free the account structure itself */
|
||||||
|
@ -803,10 +803,10 @@ char * xaccReadQIFTransaction (int fd, Account *acc)
|
|||||||
* was specified. */
|
* was specified. */
|
||||||
if (xfer_acc) {
|
if (xfer_acc) {
|
||||||
split->acc = (struct _account *) xfer_acc;
|
split->acc = (struct _account *) xfer_acc;
|
||||||
xaccInsertSplit (xfer_acc, split);
|
xaccAccountInsertSplit (xfer_acc, split);
|
||||||
} else {
|
} else {
|
||||||
split->acc = (struct _account *) acc;
|
split->acc = (struct _account *) acc;
|
||||||
xaccInsertSplit (acc, split);
|
xaccAccountInsertSplit (acc, split);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* normally, the security account is pointed at by
|
/* normally, the security account is pointed at by
|
||||||
@ -814,7 +814,7 @@ char * xaccReadQIFTransaction (int fd, Account *acc)
|
|||||||
* But, just in case its missing, avoid a core dump */
|
* But, just in case its missing, avoid a core dump */
|
||||||
if (sub_acc) {
|
if (sub_acc) {
|
||||||
trans->source_split.acc = (struct _account *) sub_acc;
|
trans->source_split.acc = (struct _account *) sub_acc;
|
||||||
xaccInsertSplit (sub_acc, split);
|
xaccAccountInsertSplit (sub_acc, split);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -826,10 +826,10 @@ char * xaccReadQIFTransaction (int fd, Account *acc)
|
|||||||
* main account gets it */
|
* main account gets it */
|
||||||
if (xfer_acc) {
|
if (xfer_acc) {
|
||||||
trans->source_split.acc = (struct _account *) xfer_acc;
|
trans->source_split.acc = (struct _account *) xfer_acc;
|
||||||
xaccInsertSplit (xfer_acc, &(trans->source_split));
|
xaccAccountInsertSplit (xfer_acc, &(trans->source_split));
|
||||||
} else {
|
} else {
|
||||||
trans->source_split.acc = (struct _account *) acc;
|
trans->source_split.acc = (struct _account *) acc;
|
||||||
xaccInsertSplit (acc, &(trans->source_split));
|
xaccAccountInsertSplit (acc, &(trans->source_split));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -842,12 +842,12 @@ char * xaccReadQIFTransaction (int fd, Account *acc)
|
|||||||
xaccTransAppendSplit (trans, split);
|
xaccTransAppendSplit (trans, split);
|
||||||
}
|
}
|
||||||
split->acc = (struct _account *) xfer_acc;
|
split->acc = (struct _account *) xfer_acc;
|
||||||
xaccInsertSplit (xfer_acc, split);
|
xaccAccountInsertSplit (xfer_acc, split);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* the transaction itself appears as a credit */
|
/* the transaction itself appears as a credit */
|
||||||
trans->source_split.acc = (struct _account *) acc;
|
trans->source_split.acc = (struct _account *) acc;
|
||||||
xaccInsertSplit (acc, &(trans->source_split));
|
xaccAccountInsertSplit (acc, &(trans->source_split));
|
||||||
}
|
}
|
||||||
|
|
||||||
return qifline;
|
return qifline;
|
||||||
|
@ -503,8 +503,8 @@ xaccTransSetDate (Transaction *trans, int day, int mon, int year)
|
|||||||
|
|
||||||
split = &(trans->source_split);
|
split = &(trans->source_split);
|
||||||
acc = (Account *) split->acc;
|
acc = (Account *) split->acc;
|
||||||
xaccRemoveSplit (acc, split);
|
xaccAccountRemoveSplit (acc, split);
|
||||||
xaccInsertSplit (acc, split);
|
xaccAccountInsertSplit (acc, split);
|
||||||
xaccRecomputeBalance (acc);
|
xaccRecomputeBalance (acc);
|
||||||
|
|
||||||
if (trans->dest_splits) {
|
if (trans->dest_splits) {
|
||||||
@ -512,8 +512,8 @@ xaccTransSetDate (Transaction *trans, int day, int mon, int year)
|
|||||||
split = trans->dest_splits[i];
|
split = trans->dest_splits[i];
|
||||||
while (split) {
|
while (split) {
|
||||||
acc = (Account *) split->acc;
|
acc = (Account *) split->acc;
|
||||||
xaccRemoveSplit (acc, split);
|
xaccAccountRemoveSplit (acc, split);
|
||||||
xaccInsertSplit (acc, split);
|
xaccAccountInsertSplit (acc, split);
|
||||||
xaccRecomputeBalance (acc);
|
xaccRecomputeBalance (acc);
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
|
Loading…
Reference in New Issue
Block a user