示例#1
0
static void
do_count (QofInstance * job_p, gpointer count_p)
{
    int *count = count_p;
    if (job_should_be_saved ((GncJob *)job_p))
        (*count)++;
}
示例#2
0
static void
do_count (QofInstance * job_p, gpointer count_p)
{
    int *count = static_cast<decltype(count)>(count_p);
    if (job_should_be_saved ((GncJob *)job_p))
        (*count)++;
}
示例#3
0
文件: gnc-job-sql.c 项目: 573/gnucash
static void
write_single_job( QofInstance *term_p, gpointer data_p )
{
    write_objects_t* s = (write_objects_t*)data_p;

    g_return_if_fail( term_p != NULL );
    g_return_if_fail( GNC_IS_JOB(term_p) );
    g_return_if_fail( data_p != NULL );

    if ( s->is_ok && job_should_be_saved( GNC_JOB(term_p) ) )
    {
        s->is_ok = save_job( s->be, term_p );
    }
}
示例#4
0
static void
xml_add_job (QofInstance * job_p, gpointer out_p)
{
    xmlNodePtr node;
    GncJob *job = (GncJob *) job_p;
    FILE *out = out_p;

    if (ferror(out))
        return;
    if (!job_should_be_saved (job))
        return;

    node = job_dom_tree_create (job);
    xmlElemDump(out, NULL, node);
    xmlFreeNode (node);
    if (ferror(out) || fprintf(out, "\n") < 0)
        return;
}