name change

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1315 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1998-10-18 15:33:00 +00:00
parent d5c8b61d35
commit 0b978cf006
5 changed files with 14 additions and 44 deletions

View File

@ -319,7 +319,7 @@ xaccReadAccountGroup( char *datafile )
xaccAccountSetName (acc, LOST_ACC_STR);
acc -> children = holder;
xaccAccountCommitEdit (acc);
insertAccount (grp, acc);
xaccGroupInsertAccount (grp, acc);
} else {
xaccFreeAccountGroup (holder);
holder = NULL;
@ -412,7 +412,7 @@ readAccount( int fd, AccountGroup *grp, int token )
acc = locateAccount (accID);
} else {
acc = xaccMallocAccount();
insertAccount (holder, acc);
xaccGroupInsertAccount (holder, acc);
}
xaccAccountBeginEdit (acc, 1);
@ -520,7 +520,7 @@ readAccount( int fd, AccountGroup *grp, int token )
}
springAccount (acc->id);
insertAccount (grp, acc);
xaccGroupInsertAccount (grp, acc);
/* version 4 is the first file version that introduces
* sub-accounts */
@ -576,7 +576,7 @@ locateAccount (int acc_id)
acc = xaccMallocAccount ();
acc->id = acc_id;
acc->open = ACC_DEFER_REBALANCE;
insertAccount (holder, acc);
xaccGroupInsertAccount (holder, acc);
/* normalize the account numbers -- positive-definite.
* That is, the unique id must never decrease,

View File

@ -281,34 +281,6 @@ xaccGetPeerAccountFromName ( Account *acc, const char * name )
return peer_acc;
}
/********************************************************************\
\********************************************************************/
Account *
removeAccount( AccountGroup *grp, int num )
{
int i,j, nacc;
Account **arr;
Account *acc = NULL;
if (!grp) return NULL;
arr = grp->account;
grp->saved = FALSE;
nacc = grp->numAcc;
for( i=0,j=0; i<nacc; i++,j++ )
{
arr[i] = arr[j];
if (j == num) { acc = arr[j]; i--; }
}
grp->numAcc--;
arr[grp->numAcc] = NULL;
return acc;
}
/********************************************************************\
\********************************************************************/
@ -396,14 +368,14 @@ xaccInsertSubAccount( Account *adult, Account *child )
/* allow side-effect of creating a child-less account group */
if (NULL == child) return -1;
retval = insertAccount (adult->children, child);
retval = xaccGroupInsertAccount (adult->children, child);
return retval;
}
/********************************************************************\
\********************************************************************/
int
insertAccount( AccountGroup *grp, Account *acc )
xaccGroupInsertAccount( AccountGroup *grp, Account *acc )
{
int i=-1;
Account **oldAcc;
@ -484,7 +456,7 @@ xaccConcatGroups (AccountGroup *togrp, AccountGroup *fromgrp)
for (i=0; i<fromgrp->numAcc; i++) {
acc = fromgrp->account[i];
insertAccount (togrp, acc);
xaccGroupInsertAccount (togrp, acc);
fromgrp->account[i] = NULL;
}
fromgrp->account[0] = NULL;

View File

@ -57,9 +57,6 @@ void xaccMergeAccounts (AccountGroup *grp);
int xaccAccountGroupNotSaved (AccountGroup *grp);
void xaccAccountGroupMarkSaved (AccountGroup *grp);
Account *removeAccount( AccountGroup *grp, int num );
int insertAccount( AccountGroup *grp, Account *acc );
/*
* The xaccRemoveAccount() subroutine will remove the indicated
* account from its parent account group. It will NOT free the
@ -77,6 +74,7 @@ int insertAccount( AccountGroup *grp, Account *acc );
*/
void xaccRemoveAccount (Account *);
void xaccRemoveGroup (AccountGroup *);
int xaccGroupInsertAccount( AccountGroup *grp, Account *acc );
int xaccInsertSubAccount( Account *parent, Account *child );
/*

View File

@ -365,10 +365,10 @@ char * xaccReadQIFAccList (int fd, AccountGroup *grp, int cat)
xaccInsertSubAccount( parent, acc );
} else {
/* we should never get here if the qif file is OK */
insertAccount( grp, acc );
xaccGroupInsertAccount( grp, acc );
}
} else {
insertAccount( grp, acc );
xaccGroupInsertAccount( grp, acc );
}
} while (qifline);
@ -501,7 +501,7 @@ GetSubQIFAccount (AccountGroup *rootgrp, char *qifline, int acc_type)
if (0 > acc_type) acc_type = GuessAccountType (qifline);
xaccAccountSetType (xfer_acc, acc_type);
insertAccount (rootgrp, xfer_acc);
xaccGroupInsertAccount (rootgrp, xfer_acc);
}
/* if this account name had sub-accounts, get those */
@ -1014,7 +1014,7 @@ xaccReadQIFAccountGroup( char *datafile )
xaccAccountSetType (acc, typo);
xaccAccountSetName (acc, name);
insertAccount( grp, acc );
xaccGroupInsertAccount( grp, acc );
qifline = xaccReadQIFTransList (fd, acc, &bogus_acc_name);
typo = -1; name = NULL;
continue;
@ -1091,7 +1091,7 @@ xaccReadQIFAccountGroup( char *datafile )
}
else
{
insertAccount( grp, acc );
xaccGroupInsertAccount( grp, acc );
}
/* spin until start of transaction records */

View File

@ -110,7 +110,7 @@ add_account_dialog_okclicked_cb(GtkWidget * dialog, gpointer data)
if (info->parent_account) {
g_print( "Return Code (SUB): %d\n", xaccInsertSubAccount (info->parent_account, account));
} else {
g_print( "Return Code (TOPGROUP): %d\n", insertAccount( topgroup, account ));
g_print( "Return Code (TOPGROUP): %d\n", xaccGroupInsertAccount( topgroup, account ));
}
xaccAccountCommitEdit (account);