mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2001-06-18 Dave Peticolas <dave@krondo.com>
* src/MultiLedger.c: same as below * src/SplitLedger.c: same as below. fix indentation. please use the indentation style already present in the file. * src/engine/gnc-freqspec-xml-v2.c: same as below * src/engine/FreqSpec.[ch]: fix warnings. use standard C comments * doc/sgml/C/xacc-about.sgml: update credits git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4726 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
d5f96b9ba2
commit
34500dc4eb
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
|||||||
|
2001-06-18 Dave Peticolas <dave@krondo.com>
|
||||||
|
|
||||||
|
* src/MultiLedger.c: same as below
|
||||||
|
|
||||||
|
* src/SplitLedger.c: same as below. fix indentation. please
|
||||||
|
use the indentation style already present in the file.
|
||||||
|
|
||||||
|
* src/engine/gnc-freqspec-xml-v2.c: same as below
|
||||||
|
|
||||||
|
* src/engine/FreqSpec.[ch]: fix warnings. use standard C comments
|
||||||
|
|
||||||
|
* doc/sgml/C/xacc-about.sgml: update credits
|
||||||
|
|
||||||
2001-06-17 Joshua Sled <jsled@asynchronous.org>
|
2001-06-17 Joshua Sled <jsled@asynchronous.org>
|
||||||
|
|
||||||
* src/engine/gnc-account-xml-v2.c (dom_tree_to_account): Added.
|
* src/engine/gnc-account-xml-v2.c (dom_tree_to_account): Added.
|
||||||
|
@ -173,6 +173,15 @@ linkend="scheme"> Scheme </link>, the <link linkend="gwrap"> g-wrap
|
|||||||
</glossdef>
|
</glossdef>
|
||||||
</glossentry>
|
</glossentry>
|
||||||
|
|
||||||
|
<glossentry>
|
||||||
|
<glossterm><email>jsled@asynchronous.org</email>Joshua Sled</glossterm>
|
||||||
|
<glossdef>
|
||||||
|
<para>
|
||||||
|
works on scheduled transactions and budgeting.
|
||||||
|
</para>
|
||||||
|
</glossdef>
|
||||||
|
</glossentry>
|
||||||
|
|
||||||
</glosslist>
|
</glosslist>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
@ -16,9 +16,11 @@ src/gnome/dialog-commodities.c
|
|||||||
src/gnome/dialog-commodity.c
|
src/gnome/dialog-commodity.c
|
||||||
src/gnome/dialog-filebox.c
|
src/gnome/dialog-filebox.c
|
||||||
src/gnome/dialog-fincalc.c
|
src/gnome/dialog-fincalc.c
|
||||||
|
src/gnome/dialog-nextrun.c
|
||||||
src/gnome/dialog-options.c
|
src/gnome/dialog-options.c
|
||||||
src/gnome/dialog-price-editor.c
|
src/gnome/dialog-price-editor.c
|
||||||
src/gnome/dialog-progress.c
|
src/gnome/dialog-progress.c
|
||||||
|
src/gnome/dialog-scheduledxaction.c
|
||||||
src/gnome/dialog-totd.c
|
src/gnome/dialog-totd.c
|
||||||
src/gnome/dialog-transfer.c
|
src/gnome/dialog-transfer.c
|
||||||
src/gnome/dialog-utils.c
|
src/gnome/dialog-utils.c
|
||||||
@ -37,6 +39,7 @@ src/gnome/glade/progress_strings.c
|
|||||||
src/gnome/glade/qif_strings.c
|
src/gnome/glade/qif_strings.c
|
||||||
src/gnome/glade/register_strings.c
|
src/gnome/glade/register_strings.c
|
||||||
src/gnome/glade/report_strings.c
|
src/gnome/glade/report_strings.c
|
||||||
|
src/gnome/glade/sched-xact_strings.c
|
||||||
src/gnome/glade/stocks_strings.c
|
src/gnome/glade/stocks_strings.c
|
||||||
src/gnome/glade/tax_strings.c
|
src/gnome/glade/tax_strings.c
|
||||||
src/gnome/glade/transfer_strings.c
|
src/gnome/glade/transfer_strings.c
|
||||||
|
@ -454,7 +454,7 @@ xaccLedgerDisplayTemplateGL( char *id )
|
|||||||
ag = gnc_book_get_template_group( gncGetCurrentBook() );
|
ag = gnc_book_get_template_group( gncGetCurrentBook() );
|
||||||
acct = xaccGetAccountFromName( ag, id );
|
acct = xaccGetAccountFromName( ag, id );
|
||||||
if ( acct == NULL ) {
|
if ( acct == NULL ) {
|
||||||
// FIXME
|
/* FIXME */
|
||||||
printf( "can't get template account for id \"%s\"\n", id );
|
printf( "can't get template account for id \"%s\"\n", id );
|
||||||
}
|
}
|
||||||
xaccQueryAddSingleAccountMatch( q, acct, QUERY_AND );
|
xaccQueryAddSingleAccountMatch( q, acct, QUERY_AND );
|
||||||
@ -464,7 +464,7 @@ xaccLedgerDisplayTemplateGL( char *id )
|
|||||||
ld = xaccLedgerDisplayInternal( NULL, q, LD_GL,
|
ld = xaccLedgerDisplayInternal( NULL, q, LD_GL,
|
||||||
GENERAL_LEDGER,
|
GENERAL_LEDGER,
|
||||||
REG_STYLE_JOURNAL,
|
REG_STYLE_JOURNAL,
|
||||||
TRUE ); // template mode? TRUE.
|
TRUE ); /* template mode? TRUE. */
|
||||||
|
|
||||||
sr = xaccLedgerDisplayGetSR( ld );
|
sr = xaccLedgerDisplayGetSR( ld );
|
||||||
sr->templateAcct = acct;
|
sr->templateAcct = acct;
|
||||||
@ -759,8 +759,8 @@ xaccLedgerDisplayInternal (Account *lead_account, Query *q,
|
|||||||
|
|
||||||
case LD_TEMPLATE:
|
case LD_TEMPLATE:
|
||||||
class = REGISTER_TEMPLATE_CM_CLASS;
|
class = REGISTER_TEMPLATE_CM_CLASS;
|
||||||
// FIXME: sanity checks?
|
/* FIXME: sanity checks?
|
||||||
// Check for kvp-frame data?
|
Check for kvp-frame data? */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -805,7 +805,7 @@ xaccLedgerDisplayInternal (Account *lead_account, Query *q,
|
|||||||
view.bg_color_handler = xaccSRGetBGColorHandler;
|
view.bg_color_handler = xaccSRGetBGColorHandler;
|
||||||
view.cell_border_handler = xaccSRGetCellBorderHandler;
|
view.cell_border_handler = xaccSRGetCellBorderHandler;
|
||||||
view.handler_user_data = NULL;
|
view.handler_user_data = NULL;
|
||||||
// The following handlers are changed in template mode.
|
/* The following handlers are changed in template mode. */
|
||||||
if ( templateMode ) {
|
if ( templateMode ) {
|
||||||
view.entry_handler = xaccSRTemplateGetEntryHandler;
|
view.entry_handler = xaccSRTemplateGetEntryHandler;
|
||||||
view.io_flag_handler = xaccSRTemplateGetIOFlagsHandler;
|
view.io_flag_handler = xaccSRTemplateGetIOFlagsHandler;
|
||||||
@ -886,8 +886,6 @@ xaccLedgerDisplayRefresh (xaccLedgerDisplay *ld)
|
|||||||
if (!ld || ld->loading)
|
if (!ld || ld->loading)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//xaccQueryPrint( ld->query );
|
|
||||||
|
|
||||||
xaccLedgerDisplayRefreshInternal (ld, xaccQueryGetSplits (ld->query));
|
xaccLedgerDisplayRefreshInternal (ld, xaccQueryGetSplits (ld->query));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -962,8 +960,8 @@ xaccDestroyLedgerDisplay (Account *account)
|
|||||||
xaccDestroyLedgerDisplayClass (account, REGISTER_SINGLE_CM_CLASS);
|
xaccDestroyLedgerDisplayClass (account, REGISTER_SINGLE_CM_CLASS);
|
||||||
xaccDestroyLedgerDisplayClass (account, REGISTER_SUBACCOUNT_CM_CLASS);
|
xaccDestroyLedgerDisplayClass (account, REGISTER_SUBACCOUNT_CM_CLASS);
|
||||||
xaccDestroyLedgerDisplayClass (account, REGISTER_GL_CM_CLASS);
|
xaccDestroyLedgerDisplayClass (account, REGISTER_GL_CM_CLASS);
|
||||||
// no TEMPLATE_CM_CLASS, because it doesn't correspond to any account
|
/* no TEMPLATE_CM_CLASS, because it doesn't correspond to any account
|
||||||
// FIXME: but there probably should be an analagous method
|
* FIXME: but there probably should be an analagous method */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -84,7 +84,7 @@ xaccLedgerDisplay * xaccLedgerDisplaySimple (Account *account);
|
|||||||
xaccLedgerDisplay * xaccLedgerDisplayAccGroup (Account *account);
|
xaccLedgerDisplay * xaccLedgerDisplayAccGroup (Account *account);
|
||||||
|
|
||||||
xaccLedgerDisplay * xaccLedgerDisplayGL (void);
|
xaccLedgerDisplay * xaccLedgerDisplayGL (void);
|
||||||
xaccLedgerDisplay * xaccLedgerDisplayGLTemplate( char *id );
|
xaccLedgerDisplay * xaccLedgerDisplayGLTemplate (char *id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a template ledger.
|
* Displays a template ledger.
|
||||||
@ -93,7 +93,7 @@ xaccLedgerDisplay * xaccLedgerDisplayGLTemplate( char *id );
|
|||||||
* Really, requires a GList of scheduled transactions and kvp-frame
|
* Really, requires a GList of scheduled transactions and kvp-frame
|
||||||
* data.
|
* data.
|
||||||
**/
|
**/
|
||||||
xaccLedgerDisplay * xaccLedgerDisplayTemplateGL( );
|
xaccLedgerDisplay * xaccLedgerDisplayTemplateGL (char *id);
|
||||||
|
|
||||||
/* display a general ledger for an arbitrary query */
|
/* display a general ledger for an arbitrary query */
|
||||||
xaccLedgerDisplay * xaccLedgerDisplayQuery (Query *query,
|
xaccLedgerDisplay * xaccLedgerDisplayQuery (Query *query,
|
||||||
|
@ -2684,7 +2684,7 @@ xaccSRRedrawReg (SplitRegister *reg)
|
|||||||
* in sync with xaccSRSaveRegEntry and xaccSRSaveChangedCells. */
|
* in sync with xaccSRSaveRegEntry and xaccSRSaveChangedCells. */
|
||||||
|
|
||||||
|
|
||||||
// jsled: This will need to be modified, as well.
|
/* jsled: This will need to be modified, as well. */
|
||||||
static gboolean
|
static gboolean
|
||||||
xaccSRSaveRegEntryToSCM (SplitRegister *reg, SCM trans_scm, SCM split_scm,
|
xaccSRSaveRegEntryToSCM (SplitRegister *reg, SCM trans_scm, SCM split_scm,
|
||||||
gboolean use_cut_semantics)
|
gboolean use_cut_semantics)
|
||||||
@ -2827,9 +2827,8 @@ xaccSRSaveRegEntryToSCM (SplitRegister *reg, SCM trans_scm, SCM split_scm,
|
|||||||
|
|
||||||
/* ======================================================== */
|
/* ======================================================== */
|
||||||
/* Copy from the register object to the engine */
|
/* Copy from the register object to the engine */
|
||||||
// jsled: okay... the fun.
|
/* jsled: okay... the fun. actually, not really the fun, but scan
|
||||||
// actually, not really the fun, but scan this to see if anything
|
this to see if anything jumps out */
|
||||||
// jumps out; the
|
|
||||||
gboolean
|
gboolean
|
||||||
xaccSRSaveRegEntry (SplitRegister *reg, gboolean do_commit)
|
xaccSRSaveRegEntry (SplitRegister *reg, gboolean do_commit)
|
||||||
{
|
{
|
||||||
@ -2843,8 +2842,6 @@ xaccSRSaveRegEntry (SplitRegister *reg, gboolean do_commit)
|
|||||||
const char *memo;
|
const char *memo;
|
||||||
const char *desc;
|
const char *desc;
|
||||||
|
|
||||||
//DEBUG( "=== In xaccSRSaveRegEntry\n" );
|
|
||||||
|
|
||||||
/* get the handle to the current split and transaction */
|
/* get the handle to the current split and transaction */
|
||||||
split = xaccSRGetCurrentSplit (reg);
|
split = xaccSRGetCurrentSplit (reg);
|
||||||
trans = xaccSRGetCurrentTrans (reg);
|
trans = xaccSRGetCurrentTrans (reg);
|
||||||
@ -3222,8 +3219,6 @@ xaccSRSaveChangedTemplateCells( SplitRegister *reg,
|
|||||||
|
|
||||||
DEBUG( "=== In xaccSRSaveChangedTemplateCells\n" );
|
DEBUG( "=== In xaccSRSaveChangedTemplateCells\n" );
|
||||||
|
|
||||||
//template_acc = gncGetTemplateAccount();
|
|
||||||
//template_ag = gnc_book_get_template_group( gncGetCurrentBook() );
|
|
||||||
template_acc = reg->templateAcct;
|
template_acc = reg->templateAcct;
|
||||||
|
|
||||||
changed = xaccSplitRegisterGetChangeFlag( reg );
|
changed = xaccSplitRegisterGetChangeFlag( reg );
|
||||||
@ -3232,23 +3227,24 @@ xaccSRSaveChangedTemplateCells( SplitRegister *reg,
|
|||||||
(MOD_NUM & changed) ||
|
(MOD_NUM & changed) ||
|
||||||
(MOD_RECN & changed) )
|
(MOD_RECN & changed) )
|
||||||
{
|
{
|
||||||
PERR( "unexpected changed field in a template register: %32x\n", changed );
|
PERR( "unexpected changed field in a template register: %32x\n",
|
||||||
|
changed );
|
||||||
}
|
}
|
||||||
|
|
||||||
// We'll be using the Split's KVP frame a lot...
|
/* We'll be using the Split's KVP frame a lot */
|
||||||
kvpf = xaccSplitGetSlots( split );
|
kvpf = xaccSplitGetSlots( split );
|
||||||
|
|
||||||
if ( MOD_XFRM & changed )
|
if ( MOD_XFRM & changed )
|
||||||
{
|
{
|
||||||
// FIXME: This should probably do the same checks as
|
/* FIXME: This should probably do the same checks as
|
||||||
// xaccSRSaveChangedCells regarding account types
|
xaccSRSaveChangedCells regarding account types
|
||||||
// [between different currency accounts, mainly]
|
[between different currency accounts, mainly] */
|
||||||
char *new_name;
|
char *new_name;
|
||||||
Account *acct;
|
Account *acct;
|
||||||
AccountGroup *acctGrp;
|
AccountGroup *acctGrp;
|
||||||
GUID *acctGUID;
|
const GUID *acctGUID;
|
||||||
|
|
||||||
// save the account GUID into the kvp_data.
|
/* save the account GUID into the kvp_data. */
|
||||||
new_name = reg->xfrmCell->cell.value;
|
new_name = reg->xfrmCell->cell.value;
|
||||||
acctGrp = gnc_book_get_group( gncGetCurrentBook() );
|
acctGrp = gnc_book_get_group( gncGetCurrentBook() );
|
||||||
acct = xaccGetAccountFromFullName( acctGrp, new_name,
|
acct = xaccGetAccountFromFullName( acctGrp, new_name,
|
||||||
@ -3257,12 +3253,13 @@ xaccSRSaveChangedTemplateCells( SplitRegister *reg,
|
|||||||
PERR( "unknown group \"%s\"\n", new_name );
|
PERR( "unknown group \"%s\"\n", new_name );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
acctGUID = (const GUID *)xaccAccountGetGUID( acct );
|
acctGUID = xaccAccountGetGUID( acct );
|
||||||
kvp_frame_set_slot( kvpf, "sched-xaction/xfrm",
|
kvp_frame_set_slot( kvpf, "sched-xaction/xfrm",
|
||||||
kvp_value_new_guid( acctGUID ) );
|
kvp_value_new_guid( acctGUID ) );
|
||||||
kvpf = xaccSplitGetSlots( split );
|
kvpf = xaccSplitGetSlots( split );
|
||||||
changed ^= MOD_XFRM;
|
changed ^= MOD_XFRM;
|
||||||
// +DEBUG
|
|
||||||
|
/* DEBUG */
|
||||||
if ( 0 ) {
|
if ( 0 ) {
|
||||||
GList *foo = xaccAccountGetSplitList( template_acc );
|
GList *foo = xaccAccountGetSplitList( template_acc );
|
||||||
if ( foo ) {
|
if ( foo ) {
|
||||||
@ -3274,13 +3271,12 @@ xaccSRSaveChangedTemplateCells( SplitRegister *reg,
|
|||||||
printf( "No Splits.\n" );
|
printf( "No Splits.\n" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// -DEBUG
|
|
||||||
|
|
||||||
// set the actual account to the fake account for
|
|
||||||
// these templates...
|
/* set the actual account to the fake account for these templates */
|
||||||
xaccAccountInsertSplit (template_acc, split);
|
xaccAccountInsertSplit (template_acc, split);
|
||||||
|
|
||||||
// +DEBUG
|
/* DEBUG */
|
||||||
if ( 0 ) {
|
if ( 0 ) {
|
||||||
GList *foo = xaccAccountGetSplitList( template_acc );
|
GList *foo = xaccAccountGetSplitList( template_acc );
|
||||||
if ( foo ) {
|
if ( foo ) {
|
||||||
@ -3292,12 +3288,10 @@ xaccSRSaveChangedTemplateCells( SplitRegister *reg,
|
|||||||
printf( "No Splits.\n" );
|
printf( "No Splits.\n" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// -DEBUG
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if ( MOD_MXFRM & changed )
|
if ( MOD_MXFRM & changed )
|
||||||
{
|
{
|
||||||
// DTRT
|
/* DTRT */
|
||||||
DEBUG( "Template: Got MOD_MXFRM changed\n" );
|
DEBUG( "Template: Got MOD_MXFRM changed\n" );
|
||||||
changed ^= MOD_MXFRM;
|
changed ^= MOD_MXFRM;
|
||||||
}
|
}
|
||||||
@ -3308,35 +3302,35 @@ xaccSRSaveChangedTemplateCells( SplitRegister *reg,
|
|||||||
gnc_numeric credit;
|
gnc_numeric credit;
|
||||||
gnc_numeric debit;
|
gnc_numeric debit;
|
||||||
|
|
||||||
//credit = xaccGetPriceCellValue(reg->creditCell);
|
/* credit = xaccGetPriceCellValue(reg->creditCell); */
|
||||||
//debit = xaccGetPriceCellValue(reg->debitCell);
|
/* debit = xaccGetPriceCellValue(reg->debitCell); */
|
||||||
//new_amount = gnc_numeric_sub_fixed (debit, credit);
|
/* new_amount = gnc_numeric_sub_fixed (debit, credit); */
|
||||||
|
|
||||||
// FIXME: the credit/debit cells are limited to
|
/* FIXME: the credit/debit cells are limited to
|
||||||
// numeric values by definition [and code]. Blegh.
|
numeric values by definition [and code]. Blegh. */
|
||||||
DEBUG( "kvp_frame before: %s\n", kvp_frame_to_string( kvpf ) );
|
DEBUG( "kvp_frame before: %s\n", kvp_frame_to_string( kvpf ) );
|
||||||
//amountStr = gnc_numeric_to_string( new_amount );
|
/* amountStr = gnc_numeric_to_string( new_amount ); */
|
||||||
kvp_frame_set_slot( kvpf, "sched-xaction/credit_formula",
|
kvp_frame_set_slot( kvpf, "sched-xaction/credit_formula",
|
||||||
kvp_value_new_string( reg->formCreditCell->cell.value ) );
|
kvp_value_new_string( reg->formCreditCell->cell.value ) );
|
||||||
kvp_frame_set_slot( kvpf, "sched-xaction/debit_formula",
|
kvp_frame_set_slot( kvpf, "sched-xaction/debit_formula",
|
||||||
kvp_value_new_string( reg->formDebitCell->cell.value ) );
|
kvp_value_new_string( reg->formDebitCell->cell.value ) );
|
||||||
DEBUG( "kvp_frame after: %s\n", kvp_frame_to_string( kvpf ) );
|
DEBUG( "kvp_frame after: %s\n", kvp_frame_to_string( kvpf ) );
|
||||||
changed ^= MOD_AMNT;
|
changed ^= MOD_AMNT;
|
||||||
// set the amount to an innocuous value
|
/* set the amount to an innocuous value */
|
||||||
xaccSplitSetValue (split, gnc_numeric_create(0, 1) );
|
xaccSplitSetValue (split, gnc_numeric_create(0, 1) );
|
||||||
}
|
}
|
||||||
if ( MOD_SHRS & changed )
|
if ( MOD_SHRS & changed )
|
||||||
{
|
{
|
||||||
char *sharesStr = "(x + y)/42";
|
char *sharesStr = "(x + y)/42";
|
||||||
|
|
||||||
// FIXME: shares cells are numeric by definition.
|
/* FIXME: shares cells are numeric by definition. */
|
||||||
DEBUG( "kvp_frame before: %s\n", kvp_frame_to_string( kvpf ) );
|
DEBUG( "kvp_frame before: %s\n", kvp_frame_to_string( kvpf ) );
|
||||||
|
|
||||||
//sharesStr = gnc_numeric_to_string( sharesStr );
|
/* sharesStr = gnc_numeric_to_string( sharesStr ); */
|
||||||
kvp_frame_set_slot( kvpf, "sched-xaction/shares",
|
kvp_frame_set_slot( kvpf, "sched-xaction/shares",
|
||||||
kvp_value_new_string( sharesStr ) );
|
kvp_value_new_string( sharesStr ) );
|
||||||
DEBUG( "kvp_frame after: %s\n", kvp_frame_to_string( kvpf ) );
|
DEBUG( "kvp_frame after: %s\n", kvp_frame_to_string( kvpf ) );
|
||||||
// set the shares to an innocuous value
|
/* set the shares to an innocuous value */
|
||||||
xaccSplitSetSharePriceAndAmount (split,
|
xaccSplitSetSharePriceAndAmount (split,
|
||||||
gnc_numeric_create(0, 1),
|
gnc_numeric_create(0, 1),
|
||||||
gnc_numeric_create(0, 1) );
|
gnc_numeric_create(0, 1) );
|
||||||
@ -3426,9 +3420,9 @@ xaccSRActuallySaveChangedCells( SplitRegister *reg, Transaction *trans, Split *s
|
|||||||
* only if there is one. XFRM is the straight split, MXFRM is the
|
* only if there is one. XFRM is the straight split, MXFRM is the
|
||||||
* mirrored split. */
|
* mirrored split. */
|
||||||
|
|
||||||
// jsled: this is where it starts to get fun. in the template
|
/* jsled: this is where it starts to get fun. in the template
|
||||||
// register, we save the XFRM account in the kvp frame.
|
* register, we save the XFRM account in the kvp frame.
|
||||||
// also, when loading, we load from the kvp data.
|
* also, when loading, we load from the kvp data. */
|
||||||
if (MOD_XFRM & changed)
|
if (MOD_XFRM & changed)
|
||||||
{
|
{
|
||||||
Account *old_acc;
|
Account *old_acc;
|
||||||
@ -3642,8 +3636,8 @@ xaccSRSaveChangedCells (SplitRegister *reg, Transaction *trans, Split *split)
|
|||||||
changed = xaccSplitRegisterGetChangeFlag (reg);
|
changed = xaccSplitRegisterGetChangeFlag (reg);
|
||||||
changed |= xaccSplitRegisterGetConditionalChangeFlag (reg);
|
changed |= xaccSplitRegisterGetConditionalChangeFlag (reg);
|
||||||
|
|
||||||
// all the code in xaccSRActuallySaveChangedCells was right here,
|
/* all the code in xaccSRActuallySaveChangedCells was right here,
|
||||||
// before. -- jsled
|
before. -- jsled */
|
||||||
xaccSRActuallySaveChangedCells( reg, trans, split, changed );
|
xaccSRActuallySaveChangedCells( reg, trans, split, changed );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3818,8 +3812,6 @@ xaccSRTemplateGetEntryHandler( VirtualLocation virt_loc,
|
|||||||
kvp_frame *kvpf;
|
kvp_frame *kvpf;
|
||||||
GUID *tmpguid;
|
GUID *tmpguid;
|
||||||
|
|
||||||
//DEBUG( "In xaccSRTemplateGetEntryHandler\n" );
|
|
||||||
|
|
||||||
cell_type = xaccSplitRegisterGetCellType (reg, virt_loc);
|
cell_type = xaccSplitRegisterGetCellType (reg, virt_loc);
|
||||||
|
|
||||||
split = sr_get_split (reg, virt_loc.vcell_loc);
|
split = sr_get_split (reg, virt_loc.vcell_loc);
|
||||||
@ -3841,8 +3833,8 @@ xaccSRTemplateGetEntryHandler( VirtualLocation virt_loc,
|
|||||||
|
|
||||||
if ( kvpf != NULL ) {
|
if ( kvpf != NULL ) {
|
||||||
DEBUG( "kvp_frame: %s\n", kvp_frame_to_string( kvpf ) );
|
DEBUG( "kvp_frame: %s\n", kvp_frame_to_string( kvpf ) );
|
||||||
tmpguid = kvp_value_get_guid( kvp_frame_get_slot( kvpf,
|
tmpguid = kvp_value_get_guid
|
||||||
"sched-xaction/xfrm" ) );
|
( kvp_frame_get_slot( kvpf, "sched-xaction/xfrm" ) );
|
||||||
DEBUG( "Got the guid \"%s\"\n", guid_to_string( tmpguid ) );
|
DEBUG( "Got the guid \"%s\"\n", guid_to_string( tmpguid ) );
|
||||||
account_separator = gnc_get_account_separator();
|
account_separator = gnc_get_account_separator();
|
||||||
DEBUG( "foo\n" );
|
DEBUG( "foo\n" );
|
||||||
@ -3865,8 +3857,8 @@ xaccSRTemplateGetEntryHandler( VirtualLocation virt_loc,
|
|||||||
gnc_numeric amount;
|
gnc_numeric amount;
|
||||||
|
|
||||||
if ( kvpf != NULL ) {
|
if ( kvpf != NULL ) {
|
||||||
amtStr = kvp_value_get_string( kvp_frame_get_slot( kvpf,
|
amtStr = kvp_value_get_string
|
||||||
"sched-xaction/amnt" ) );
|
( kvp_frame_get_slot( kvpf, "sched-xaction/amnt" ) );
|
||||||
amount = gnc_numeric_create( 0, 1 );
|
amount = gnc_numeric_create( 0, 1 );
|
||||||
string_to_gnc_numeric( amtStr, &amount );
|
string_to_gnc_numeric( amtStr, &amount );
|
||||||
|
|
||||||
@ -3881,11 +3873,11 @@ xaccSRTemplateGetEntryHandler( VirtualLocation virt_loc,
|
|||||||
|
|
||||||
amount = gnc_numeric_abs (amount);
|
amount = gnc_numeric_abs (amount);
|
||||||
|
|
||||||
//return xaccPrintAmount (amount,
|
/* return xaccPrintAmount (amount,
|
||||||
//gnc_split_value_print_info (split, FALSE));
|
gnc_split_value_print_info (split, FALSE)); */
|
||||||
|
|
||||||
// jsled_FIXME: This should be fixed
|
/* jsled_FIXME: This should be fixed
|
||||||
// to be correct for the "fake" account.
|
to be correct for the "fake" account. */
|
||||||
return xaccPrintAmount( amount,
|
return xaccPrintAmount( amount,
|
||||||
gnc_default_print_info( FALSE ) );
|
gnc_default_print_info( FALSE ) );
|
||||||
} else {
|
} else {
|
||||||
@ -3897,8 +3889,8 @@ xaccSRTemplateGetEntryHandler( VirtualLocation virt_loc,
|
|||||||
{
|
{
|
||||||
char *formulaStr;
|
char *formulaStr;
|
||||||
if ( kvpf != NULL ) {
|
if ( kvpf != NULL ) {
|
||||||
return kvp_value_get_string( kvp_frame_get_slot( kvpf,
|
return kvp_value_get_string
|
||||||
"sched-xaction/credit_formula" ) );
|
( kvp_frame_get_slot( kvpf, "sched-xaction/credit_formula" ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -3906,8 +3898,8 @@ xaccSRTemplateGetEntryHandler( VirtualLocation virt_loc,
|
|||||||
{
|
{
|
||||||
char *formulaStr;
|
char *formulaStr;
|
||||||
if ( kvpf != NULL ) {
|
if ( kvpf != NULL ) {
|
||||||
return kvp_value_get_string( kvp_frame_get_slot( kvpf,
|
return kvp_value_get_string
|
||||||
"sched-xaction/debit_formula" ) );
|
( kvp_frame_get_slot( kvpf, "sched-xaction/debit_formula" ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -3916,7 +3908,10 @@ xaccSRTemplateGetEntryHandler( VirtualLocation virt_loc,
|
|||||||
return "FIXME:MXFRM";
|
return "FIXME:MXFRM";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
} // end switch
|
default:
|
||||||
|
break;
|
||||||
|
} /* end switch */
|
||||||
|
|
||||||
return xaccSRGetEntryHandler( virt_loc,
|
return xaccSRGetEntryHandler( virt_loc,
|
||||||
translate,
|
translate,
|
||||||
conditionally_changed,
|
conditionally_changed,
|
||||||
@ -4416,7 +4411,7 @@ CellIOFlags
|
|||||||
xaccSRTemplateGetIOFlagsHandler( VirtualLocation virt_loc,
|
xaccSRTemplateGetIOFlagsHandler( VirtualLocation virt_loc,
|
||||||
gpointer user_data )
|
gpointer user_data )
|
||||||
{
|
{
|
||||||
//printf( "In xaccSRTemplateGetIOFlagsHandler\n" );
|
/* printf( "In xaccSRTemplateGetIOFlagsHandler\n" ); */
|
||||||
return xaccSRGetIOFlagsHandler( virt_loc,
|
return xaccSRGetIOFlagsHandler( virt_loc,
|
||||||
user_data );
|
user_data );
|
||||||
}
|
}
|
||||||
@ -4748,7 +4743,6 @@ gboolean
|
|||||||
xaccSRTemplateConfirmHandler( VirtualLocation virt_loc,
|
xaccSRTemplateConfirmHandler( VirtualLocation virt_loc,
|
||||||
gpointer user_data )
|
gpointer user_data )
|
||||||
{
|
{
|
||||||
//DEBUG( "In xaccSRConfirmHandler\n" );
|
|
||||||
return xaccSRConfirmHandler( virt_loc, user_data );
|
return xaccSRConfirmHandler( virt_loc, user_data );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,11 +166,11 @@ struct monthDesc monthInfo[] = {
|
|||||||
/** Local Prototypes *****/
|
/** Local Prototypes *****/
|
||||||
|
|
||||||
FreqSpec*
|
FreqSpec*
|
||||||
xaccFreqSpecMalloc()
|
xaccFreqSpecMalloc(void)
|
||||||
{
|
{
|
||||||
FreqSpec *fs = g_new0(FreqSpec, 1);
|
FreqSpec *fs = g_new0(FreqSpec, 1);
|
||||||
xaccFreqSpecInit( fs );
|
xaccFreqSpecInit( fs );
|
||||||
// FIXME:event
|
/* FIXME:event */
|
||||||
gnc_engine_generate_event( &fs->guid, GNC_EVENT_CREATE );
|
gnc_engine_generate_event( &fs->guid, GNC_EVENT_CREATE );
|
||||||
return fs;
|
return fs;
|
||||||
}
|
}
|
||||||
@ -654,11 +654,11 @@ xaccFreqSpecGetFreqStr( FreqSpec *fs, GString *str )
|
|||||||
char *tmpStr;
|
char *tmpStr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
// FIXME: fill in.
|
/* FIXME: fill in. */
|
||||||
switch( xaccFreqSpecGetUIType( fs ) ) {
|
switch( xaccFreqSpecGetUIType( fs ) ) {
|
||||||
case UIFREQ_ONCE:
|
case UIFREQ_ONCE:
|
||||||
tmpStr = g_new0( char, 25 );
|
tmpStr = g_new0( char, 25 );
|
||||||
// this is now a GDate.
|
/* this is now a GDate. */
|
||||||
g_date_strftime( tmpStr, 25,
|
g_date_strftime( tmpStr, 25,
|
||||||
"%a, %b %e, %Y",
|
"%a, %b %e, %Y",
|
||||||
&fs->s.once.date );
|
&fs->s.once.date );
|
||||||
@ -701,11 +701,11 @@ xaccFreqSpecGetFreqStr( FreqSpec *fs, GString *str )
|
|||||||
if ( tmpInt == -1 ) {
|
if ( tmpInt == -1 ) {
|
||||||
tmpInt = tmpFS->s.weekly.interval_weeks;
|
tmpInt = tmpFS->s.weekly.interval_weeks;
|
||||||
}
|
}
|
||||||
// put the first letter of the weekday name in
|
/* put the first letter of the weekday name in
|
||||||
// the appropriate position.
|
the appropriate position.
|
||||||
|
|
||||||
// FIXME: need the offset from the day-of-week
|
FIXME: need the offset from the day-of-week
|
||||||
// of the Julian epoch
|
of the Julian epoch */
|
||||||
/*
|
/*
|
||||||
tmpStr[tmpFS->specData.dateAnchor[1]] =
|
tmpStr[tmpFS->specData.dateAnchor[1]] =
|
||||||
weekDayNames[tmpFS->specData.dateAnchor[1]][0];
|
weekDayNames[tmpFS->specData.dateAnchor[1]][0];
|
||||||
@ -775,7 +775,7 @@ xaccFreqSpecGetFreqStr( FreqSpec *fs, GString *str )
|
|||||||
g_string_sprintf( str, "Semi-Yearly" );
|
g_string_sprintf( str, "Semi-Yearly" );
|
||||||
if ( fs->s.monthly.interval_months != 6 ) {
|
if ( fs->s.monthly.interval_months != 6 ) {
|
||||||
if ( (fs->s.monthly.interval_months % 6) != 0 ) {
|
if ( (fs->s.monthly.interval_months % 6) != 0 ) {
|
||||||
// FIXME:error
|
/* FIXME:error */
|
||||||
printf( "ERROR: FreqSpec Semi-Yearly month-interval "
|
printf( "ERROR: FreqSpec Semi-Yearly month-interval "
|
||||||
"is not a multiple of 6 [%d]",
|
"is not a multiple of 6 [%d]",
|
||||||
fs->s.monthly.interval_months );
|
fs->s.monthly.interval_months );
|
||||||
@ -791,7 +791,7 @@ xaccFreqSpecGetFreqStr( FreqSpec *fs, GString *str )
|
|||||||
g_string_sprintf( str, "Yearly" );
|
g_string_sprintf( str, "Yearly" );
|
||||||
if ( fs->s.monthly.interval_months != 12 ) {
|
if ( fs->s.monthly.interval_months != 12 ) {
|
||||||
if ( (fs->s.monthly.interval_months % 12) != 0 ) {
|
if ( (fs->s.monthly.interval_months % 12) != 0 ) {
|
||||||
// FIXME:error
|
/* FIXME:error */
|
||||||
printf( "ERROR: \"Yearly\" FreqSpec month-interval "
|
printf( "ERROR: \"Yearly\" FreqSpec month-interval "
|
||||||
"is not a multiple of 12 [%d]",
|
"is not a multiple of 12 [%d]",
|
||||||
fs->s.monthly.interval_months );
|
fs->s.monthly.interval_months );
|
||||||
@ -800,7 +800,7 @@ xaccFreqSpecGetFreqStr( FreqSpec *fs, GString *str )
|
|||||||
fs->s.monthly.interval_months/12 );
|
fs->s.monthly.interval_months/12 );
|
||||||
}
|
}
|
||||||
g_string_sprintfa( str, ": %s/%u",
|
g_string_sprintfa( str, ": %s/%u",
|
||||||
// FIXME: need the year-of-month value.
|
/* FIXME: need the year-of-month value. */
|
||||||
monthInfo[/*fs->specData.dateAnchor[2]*/ 0].dshort,
|
monthInfo[/*fs->specData.dateAnchor[2]*/ 0].dshort,
|
||||||
fs->s.monthly.day_of_month );
|
fs->s.monthly.day_of_month );
|
||||||
break;
|
break;
|
||||||
|
@ -40,11 +40,11 @@ typedef enum gncp_FreqType {
|
|||||||
ONCE,
|
ONCE,
|
||||||
DAILY,
|
DAILY,
|
||||||
WEEKLY, /* Hmmm... This is sort of DAILY[7]... */
|
WEEKLY, /* Hmmm... This is sort of DAILY[7]... */
|
||||||
// BI_WEEKLY: weekly[2]
|
/* BI_WEEKLY: weekly[2] */
|
||||||
// SEMI_MONTHLY: use composite
|
/* SEMI_MONTHLY: use composite */
|
||||||
MONTHLY,
|
MONTHLY,
|
||||||
MONTH_RELATIVE,
|
MONTH_RELATIVE,
|
||||||
// YEARLY: monthly[12]
|
/* YEARLY: monthly[12] */
|
||||||
COMPOSITE,
|
COMPOSITE,
|
||||||
} FreqType;
|
} FreqType;
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ typedef struct gncp_freq_spec FreqSpec;
|
|||||||
* Allocates memory for a FreqSpec.
|
* Allocates memory for a FreqSpec.
|
||||||
* Calls xaccFreqSpecInit() to initialise.
|
* Calls xaccFreqSpecInit() to initialise.
|
||||||
**/
|
**/
|
||||||
FreqSpec* xaccFreqSpecMalloc();
|
FreqSpec* xaccFreqSpecMalloc(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes a FreqSpec by setting it's to type INVALID.
|
* Initializes a FreqSpec by setting it's to type INVALID.
|
||||||
|
@ -121,18 +121,18 @@ struct uiFreqTypeTuple uiFreqTypeStrs[] = {
|
|||||||
* Struct passed around as user-data when parsing the FreqSpec.
|
* Struct passed around as user-data when parsing the FreqSpec.
|
||||||
**/
|
**/
|
||||||
typedef struct _freqSpecParseData {
|
typedef struct _freqSpecParseData {
|
||||||
FreqSpec *fs; // FreqSpec we're parsing into.
|
FreqSpec *fs; /* FreqSpec we're parsing into. */
|
||||||
// fields used in the union of unions... :)
|
/* fields used in the union of unions... :) */
|
||||||
GDate once_day; // once
|
GDate once_day; /* once */
|
||||||
gint64 interval; // all [except once]
|
gint64 interval; /* all [except once] */
|
||||||
gint64 offset; // all [except once]
|
gint64 offset; /* all [except once] */
|
||||||
gint64 day; // monthly or month-relative
|
gint64 day; /* monthly or month-relative */
|
||||||
gint64 occurrence; // month-relative
|
gint64 occurrence; /* month-relative */
|
||||||
GList *list; // composite
|
GList *list; /* composite */
|
||||||
} fsParseData;
|
} fsParseData;
|
||||||
|
|
||||||
void
|
static void
|
||||||
_fspd_init( fsParseData *fspd )
|
fspd_init( fsParseData *fspd )
|
||||||
{
|
{
|
||||||
fspd->fs = NULL;
|
fspd->fs = NULL;
|
||||||
fspd->list = NULL;
|
fspd->list = NULL;
|
||||||
@ -274,15 +274,16 @@ static
|
|||||||
gboolean
|
gboolean
|
||||||
gnc_fs_handler( xmlNodePtr node, gpointer d )
|
gnc_fs_handler( xmlNodePtr node, gpointer d )
|
||||||
{
|
{
|
||||||
// we ignore the wrapper... we were just called at the wrong
|
/* we ignore the wrapper... we were just called at the wrong
|
||||||
// level.
|
level. */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_uift_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_uift_handler( xmlNodePtr node, gpointer data)
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
int i;
|
int i;
|
||||||
char *nodeTxt;
|
char *nodeTxt;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
@ -303,8 +304,9 @@ fs_uift_handler( xmlNodePtr node, fsParseData *fspd )
|
|||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_date_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_date_handler( xmlNodePtr node, gpointer data )
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
GDate *foo;
|
GDate *foo;
|
||||||
foo = dom_tree_to_gdate( node );
|
foo = dom_tree_to_gdate( node );
|
||||||
if ( foo == NULL )
|
if ( foo == NULL )
|
||||||
@ -316,8 +318,9 @@ fs_date_handler( xmlNodePtr node, fsParseData *fspd )
|
|||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_interval_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_interval_handler( xmlNodePtr node, gpointer data )
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
gint64 foo;
|
gint64 foo;
|
||||||
|
|
||||||
@ -331,8 +334,9 @@ fs_interval_handler( xmlNodePtr node, fsParseData *fspd )
|
|||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_offset_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_offset_handler( xmlNodePtr node, gpointer data )
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
gint64 foo;
|
gint64 foo;
|
||||||
|
|
||||||
@ -345,8 +349,9 @@ fs_offset_handler( xmlNodePtr node, fsParseData *fspd )
|
|||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_day_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_day_handler( xmlNodePtr node, gpointer data )
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
gint64 foo;
|
gint64 foo;
|
||||||
|
|
||||||
@ -359,8 +364,9 @@ fs_day_handler( xmlNodePtr node, fsParseData *fspd )
|
|||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_weekday_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_weekday_handler( xmlNodePtr node, gpointer data)
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
gint64 foo;
|
gint64 foo;
|
||||||
ret = dom_tree_to_integer( node, &foo );
|
ret = dom_tree_to_integer( node, &foo );
|
||||||
@ -372,8 +378,9 @@ fs_weekday_handler( xmlNodePtr node, fsParseData *fspd )
|
|||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_occurrence_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_occurrence_handler( xmlNodePtr node, gpointer data )
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
gint64 foo;
|
gint64 foo;
|
||||||
ret = dom_tree_to_integer( node, &foo );
|
ret = dom_tree_to_integer( node, &foo );
|
||||||
@ -385,8 +392,9 @@ fs_occurrence_handler( xmlNodePtr node, fsParseData *fspd )
|
|||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_subelement_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_subelement_handler( xmlNodePtr node, gpointer data )
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
FreqSpec *fs;
|
FreqSpec *fs;
|
||||||
gboolean successful;
|
gboolean successful;
|
||||||
fs = dom_tree_to_freqSpec( node );
|
fs = dom_tree_to_freqSpec( node );
|
||||||
@ -409,8 +417,9 @@ struct dom_tree_handler fs_union_dom_handlers[] = {
|
|||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_once_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_once_handler( xmlNodePtr node, gpointer data )
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
gboolean successful;
|
gboolean successful;
|
||||||
|
|
||||||
successful = dom_tree_generic_parse( node,
|
successful = dom_tree_generic_parse( node,
|
||||||
@ -425,8 +434,9 @@ fs_once_handler( xmlNodePtr node, fsParseData *fspd )
|
|||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_daily_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_daily_handler( xmlNodePtr node, gpointer data)
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
gboolean successful;
|
gboolean successful;
|
||||||
successful = dom_tree_generic_parse( node,
|
successful = dom_tree_generic_parse( node,
|
||||||
fs_union_dom_handlers,
|
fs_union_dom_handlers,
|
||||||
@ -441,8 +451,9 @@ fs_daily_handler( xmlNodePtr node, fsParseData *fspd )
|
|||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_weekly_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_weekly_handler( xmlNodePtr node, gpointer data )
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
gboolean successful;
|
gboolean successful;
|
||||||
successful = dom_tree_generic_parse( node,
|
successful = dom_tree_generic_parse( node,
|
||||||
fs_union_dom_handlers,
|
fs_union_dom_handlers,
|
||||||
@ -457,8 +468,9 @@ fs_weekly_handler( xmlNodePtr node, fsParseData *fspd )
|
|||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_monthly_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_monthly_handler( xmlNodePtr node, gpointer data)
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
gboolean successful;
|
gboolean successful;
|
||||||
successful = dom_tree_generic_parse( node,
|
successful = dom_tree_generic_parse( node,
|
||||||
fs_union_dom_handlers,
|
fs_union_dom_handlers,
|
||||||
@ -474,8 +486,9 @@ fs_monthly_handler( xmlNodePtr node, fsParseData *fspd )
|
|||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_month_relative_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_month_relative_handler( xmlNodePtr node, gpointer data)
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
gboolean successful;
|
gboolean successful;
|
||||||
successful = dom_tree_generic_parse( node,
|
successful = dom_tree_generic_parse( node,
|
||||||
fs_union_dom_handlers,
|
fs_union_dom_handlers,
|
||||||
@ -492,8 +505,9 @@ fs_month_relative_handler( xmlNodePtr node, fsParseData *fspd )
|
|||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_guid_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_guid_handler( xmlNodePtr node, gpointer data)
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
GUID *guid;
|
GUID *guid;
|
||||||
guid = dom_tree_to_guid( node );
|
guid = dom_tree_to_guid( node );
|
||||||
fspd->fs->guid = *guid;
|
fspd->fs->guid = *guid;
|
||||||
@ -502,8 +516,9 @@ fs_guid_handler( xmlNodePtr node, fsParseData *fspd )
|
|||||||
|
|
||||||
static
|
static
|
||||||
gboolean
|
gboolean
|
||||||
fs_composite_handler( xmlNodePtr node, fsParseData *fspd )
|
fs_composite_handler( xmlNodePtr node, gpointer data)
|
||||||
{
|
{
|
||||||
|
fsParseData *fspd = data;
|
||||||
gboolean successful;
|
gboolean successful;
|
||||||
successful = dom_tree_generic_parse( node,
|
successful = dom_tree_generic_parse( node,
|
||||||
fs_union_dom_handlers,
|
fs_union_dom_handlers,
|
||||||
@ -541,10 +556,10 @@ gnc_freqSpec_end_handler(gpointer data_for_children,
|
|||||||
xmlNodePtr tree = (xmlNodePtr)data_for_children;
|
xmlNodePtr tree = (xmlNodePtr)data_for_children;
|
||||||
sixtp_gdv2 *globaldata = (sixtp_gdv2*)global_data;
|
sixtp_gdv2 *globaldata = (sixtp_gdv2*)global_data;
|
||||||
|
|
||||||
_fspd_init( &fspd );
|
fspd_init( &fspd );
|
||||||
|
|
||||||
// this won't actually get invoked [FreqSpecs aren't top-level
|
/* this won't actually get invoked [FreqSpecs aren't top-level
|
||||||
// elements]; see dom_tree_to_freqSpec(), below.
|
elements]; see dom_tree_to_freqSpec(), below. */
|
||||||
if ( parent_data )
|
if ( parent_data )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
@ -577,7 +592,7 @@ dom_tree_to_freqSpec(xmlNodePtr node)
|
|||||||
gboolean successful;
|
gboolean successful;
|
||||||
fsParseData fspd;
|
fsParseData fspd;
|
||||||
|
|
||||||
_fspd_init( &fspd );
|
fspd_init( &fspd );
|
||||||
|
|
||||||
fspd.fs = xaccFreqSpecMalloc();
|
fspd.fs = xaccFreqSpecMalloc();
|
||||||
successful = dom_tree_generic_parse( node, fs_dom_handlers, &fspd );
|
successful = dom_tree_generic_parse( node, fs_dom_handlers, &fspd );
|
||||||
|
Loading…
Reference in New Issue
Block a user