mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Add xaccTransDump back, it is very useful when debugging.
It was removed in SVN r21579, "Cruft Reduction"< but it's not cruft. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22382 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
ea2d564c3d
commit
e1bd508f61
@ -452,6 +452,42 @@ xaccMallocTransaction (QofBook *book)
|
||||
return trans;
|
||||
}
|
||||
|
||||
#ifdef DUMP_FUNCTIONS
|
||||
/* Please don't delete this function. Although it is not called by
|
||||
any other code in GnuCash, it is useful when debugging. For example
|
||||
it can be called using the gdb "call" command when stopped at a
|
||||
breakpoint. */
|
||||
void
|
||||
xaccTransDump (const Transaction *trans, const char *tag)
|
||||
{
|
||||
GList *node;
|
||||
|
||||
printf("%s Trans %p", tag, trans);
|
||||
printf(" Entered: %s\n", gnc_print_date(trans->date_entered));
|
||||
printf(" Posted: %s\n", gnc_print_date(trans->date_posted));
|
||||
printf(" Num: %s\n", trans->num ? trans->num : "(null)");
|
||||
printf(" Description: %s\n",
|
||||
trans->description ? trans->description : "(null)");
|
||||
printf(" Currency: %s\n",
|
||||
gnc_commodity_get_printname(trans->common_currency));
|
||||
printf(" version: %x\n", qof_instance_get_version(trans));
|
||||
printf(" version_chk: %x\n", qof_instance_get_version_check(trans));
|
||||
printf(" editlevel: %x\n", qof_instance_get_editlevel(trans));
|
||||
printf(" orig: %p\n", trans->orig);
|
||||
printf(" idata: %x\n", qof_instance_get_idata(trans));
|
||||
printf(" splits: ");
|
||||
for (node = trans->splits; node; node = node->next)
|
||||
{
|
||||
printf("%p ", node->data);
|
||||
}
|
||||
printf("\n");
|
||||
for (node = trans->splits; node; node = node->next)
|
||||
{
|
||||
xaccSplitDump(node->data, tag);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
xaccTransSortSplits (Transaction *trans)
|
||||
|
@ -632,6 +632,10 @@ Timespec xaccTransGetVoidTime(const Transaction *tr);
|
||||
#define TRANS_SPLITLIST "split-list" /* for guid_match_all */
|
||||
/**@}*/
|
||||
|
||||
#ifdef DUMP_FUNCTIONS
|
||||
void xaccTransDump (const Transaction *trans, const char *tag);
|
||||
#endif
|
||||
|
||||
#define RECONCILED_MATCH_TYPE "reconciled-match"
|
||||
|
||||
/** \deprecated */
|
||||
|
Loading…
Reference in New Issue
Block a user