Skip to content

Commit

Permalink
major changes to qifio to sheild engine from it;
Browse files Browse the repository at this point in the history
minor cleanups in engine


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@738 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
linas committed Mar 27, 1998
1 parent 5c7f13a commit e2893dd
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 111 deletions.
17 changes: 13 additions & 4 deletions src/engine/Account.c
Expand Up @@ -233,7 +233,7 @@ xaccAccountInsertSplit ( Account *acc, Split *split )
acc -> changed = TRUE;
if( acc->parent != NULL ) acc->parent->saved = FALSE;

split->acc = (struct _account *) acc;
split->acc = acc;

oldsplits = acc->splits;
acc->numSplits ++;
Expand Down Expand Up @@ -677,31 +677,40 @@ xaccAccountSetType (Account *acc, int tip)
void
xaccAccountSetName (Account *acc, char *str)
{
char * tmp;
if (!acc) return;
CHECK (acc);

/* make strdup before freeing */
tmp = strdup (str);
if (acc->accountName) free (acc->accountName);
acc->accountName = strdup (str);
acc->accountName = tmp;
}

void
xaccAccountSetDescription (Account *acc, char *str)
{
char * tmp;
if (!acc) return;
CHECK (acc);

/* make strdup before freeing */
tmp = strdup (str);
if (acc->description) free (acc->description);
acc->description = strdup (str);
acc->description = tmp;
}

void
xaccAccountSetNotes (Account *acc, char *str)
{
char * tmp;
if (!acc) return;
CHECK (acc);

/* make strdup before freeing */
tmp = strdup (str);
if (acc->notes) free (acc->notes);
acc->notes = strdup (str);
acc->notes = tmp;
}

/********************************************************************\
Expand Down

0 comments on commit e2893dd

Please sign in to comment.