~ubuntu-branches/ubuntu/intrepid/grisbi/intrepid

« back to all changes in this revision

Viewing changes to src/ofx.c

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drieu
  • Date: 2005-03-10 14:21:58 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050310142158-c3153bo29gsuz5fr
Tags: 0.5.5-2
Fix a FTBFS on mipsel (closes: #298234)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* ce fichier de la gestion du format ofx */
2
2
 
3
3
 
4
 
/*     Copyright (C) 2000-2003  C�dric Auger */
 
4
/*     Copyright (C) 2000-2003  Cédric Auger */
5
5
/*                      cedric@grisbi.org */
6
6
/*                      http://www.grisbi.org */
7
7
 
44
44
 
45
45
 
46
46
/* on doit mettre le compte en cours d'importation en global pour que la libofx puisse le traiter */
47
 
/* de plus un fichier ofx peut int�grer plusieurs comptes, donc on cr�e une liste... */
 
47
/* de plus un fichier ofx peut intégrer plusieurs comptes, donc on crée une liste... */
48
48
 
49
49
GSList *liste_comptes_importes_ofx;
50
50
struct struct_compte_importation *compte_ofx_importation_en_cours;
51
51
gint erreur_import_ofx;
52
52
gint  message_erreur_operation;
53
53
 
 
54
#ifdef OFX_0_7
 
55
LibofxContextPtr ofx_context;
 
56
int ofx_proc_status_cb(struct OfxStatusData data, void * status_data);
 
57
/* void ofx_proc_security_cb ( LibofxContextPtr, LibofxProcSecurityCallback, void * ); */
 
58
int ofx_proc_account_cb(struct OfxAccountData data, void * account_data);
 
59
int ofx_proc_transaction_cb(struct OfxTransactionData data, void * security_data);
 
60
int ofx_proc_statement_cb(struct OfxStatementData data, void * statement_data);
 
61
#endif /* OFX_0_7 */
 
62
 
 
63
 
54
64
/* *******************************************************************************/
55
65
gboolean recuperation_donnees_ofx ( gchar *nom_fichier )
56
66
{
64
74
    /*  la lib ofx ne tient pas compte du 1er argument */
65
75
    argv[1] = nom_fichier;
66
76
 
67
 
    ofx_proc_file ( 2,
68
 
                    argv );
69
 
 
70
 
    /*     le dernier compte n'a pas �t� ajout� � la liste */
 
77
#ifdef OFX_0_7
 
78
    ofx_context = libofx_get_new_context();
 
79
    ofx_set_status_cb ( ofx_context, ofx_proc_status_cb, NULL );
 
80
/*     ofx_set_security_cb ( ofx_context, sofx_proc_security_cb, NULL ); */
 
81
    ofx_set_account_cb ( ofx_context, ofx_proc_account_cb, NULL );
 
82
    ofx_set_transaction_cb ( ofx_context, ofx_proc_transaction_cb, NULL );
 
83
    ofx_set_statement_cb ( ofx_context, ofx_proc_statement_cb, NULL );
 
84
#endif /* OFX_0_7 */
 
85
 
 
86
#ifdef OFX_0_7
 
87
    if ( libofx_proc_file ( ofx_context, nom_fichier, AUTODETECT ) < 0 )
 
88
#else /* OFX_0_7 */
 
89
    if ( ofx_proc_file ( 2, argv ) < 0 )
 
90
#endif /* OFX_0_7 */
 
91
    { 
 
92
        // Case of Windows, libofx.dll is not present or Grisbi failed in dynamically loading ofx_proc_file
 
93
        dialogue_error_hint(_("The OFX support can not be enabled!"), 
 
94
                      g_strdup_printf (_("Cannot process OFX file '%s'"), nom_fichier));
 
95
        return (FALSE);
 
96
    }
 
97
 
 
98
    /*     le dernier compte n'a pas été ajouté à la liste */
71
99
 
72
100
    liste_comptes_importes_ofx = g_slist_append ( liste_comptes_importes_ofx,
73
 
                                                  compte_ofx_importation_en_cours       );
 
101
                                                  compte_ofx_importation_en_cours );
74
102
 
75
103
    if ( !compte_ofx_importation_en_cours )
76
104
    {
88
116
 
89
117
        liste_tmp = liste_comptes_importes_ofx;
90
118
 
91
 
        /* ajoute le ou les compte aux autres comptes import�s */
 
119
        /* ajoute le ou les compte aux autres comptes importés */
92
120
 
93
121
        while ( liste_tmp )
94
122
        {
105
133
 
106
134
 
107
135
 
108
 
/* *******************************************************************************/
 
136
 
 
137
#ifdef OFX_0_7
 
138
int ofx_proc_status_cb(struct OfxStatusData data, void * status_data)
 
139
#else /* OFX_0_7 */
109
140
int ofx_proc_status_cb(struct OfxStatusData data)
 
141
#endif /* OFX_0_7 */
110
142
{
111
 
    /*     printf ( "ofx_proc_status_cb:\n" ); */
112
 
    /*     printf ( "ofx_element_name_valid %d\n", data . ofx_element_name_valid); */
113
 
    /*     printf ( "ofx_element_name %s\n", data . ofx_element_name ); */
114
 
    /*     printf ( "code_valid %d\n", data . code_valid ); */
115
 
    /*     printf ( "code %d\n", data . code); */
116
 
    /*     printf ( "name %s\n", data . name); */
117
 
    /*     printf ( "description %s\n", data . description); */
118
 
    /*     printf ( "severity_valid %d\n", data . severity_valid ); */
119
 
    /*     printf ( "severity %d\n", data . severity); */
120
 
    /*     printf ( "server_message_valid %d\n", data.server_message_valid ); */
121
 
    /*     printf ( "server_message %s\n\n", data . server_message ); */
 
143
/*         printf ( "ofx_proc_status_cb:\n" ); */
 
144
/*         printf ( "ofx_element_name_valid %d\n", data . ofx_element_name_valid); */
 
145
/*         printf ( "ofx_element_name %s\n", data . ofx_element_name ); */
 
146
/*         printf ( "code_valid %d\n", data . code_valid ); */
 
147
/*         printf ( "code %d\n", data . code); */
 
148
/*         printf ( "name %s\n", data . name); */
 
149
/*         printf ( "description %s\n", data . description); */
 
150
/*         printf ( "severity_valid %d\n", data . severity_valid ); */
 
151
/*         printf ( "severity %d\n", data . severity); */
 
152
/*         printf ( "server_message_valid %d\n", data.server_message_valid ); */
 
153
/*         printf ( "server_message %s\n\n", data . server_message ); */
122
154
 
123
 
    /*          on v�rifie l'�tat, si c'est un warning, on l'affiche, si c'est une erreur, on vire */
 
155
    /*          on vérifie l'état, si c'est un warning, on l'affiche, si c'est une erreur, on vire */
124
156
 
125
157
    if ( data.severity_valid )
126
158
    {
127
159
        switch ( data.severity )
128
160
        {
129
 
            case INFO :
 
161
            case OFX_INFO :
130
162
                /*              pas de pb, on fait rien */
131
163
                break;
132
164
 
133
 
            case WARN :
 
165
            case OFX_WARN :
134
166
                if ( data.code_valid )
135
167
                    dialogue_warning ( g_strconcat ( _("The file has returned the next message :\n"),
136
168
                                                     data.name,
142
174
                erreur_import_ofx = 1;
143
175
                break;
144
176
 
145
 
            case ERROR:
 
177
            case OFX_ERROR:
146
178
                if ( data.code_valid )
147
179
                    dialogue_error ( g_strconcat ( _("The file has returned the next message :\n"),
148
180
                                                   data.name,
167
199
 
168
200
 
169
201
/* *******************************************************************************/
170
 
int ofx_proc_security_cb(struct OfxSecurityData data)
 
202
#ifdef OFX_0_7
 
203
int ofx_proc_security_cb ( LibofxContextPtr ctx, LibofxProcSecurityCallback cb, 
 
204
                            void * user_data )
 
205
#else /* OFX_0_7 */
 
206
int ofx_proc_security_cb ( struct OfxSecurityData data )
 
207
#endif /* OFX_0_7 */
171
208
{
172
 
    printf ( "ofx_proc_security_cb :\n" );
173
 
    printf ( "unique_id_valid %d\n", data.unique_id_valid );
174
 
    printf ( "unique_id %s\n", data.unique_id );
175
 
    printf ( "unique_id_type_valid %d\n", data.unique_id_type_valid );
176
 
    printf ( "unique_id_type %s\n", data.unique_id_type );
177
 
    printf ( "secname_valid %d\n", data.secname_valid );
178
 
    printf ( "secname %s\n", data.secname );
179
 
    printf ( "ticker_valid %d\n", data.ticker_valid );
180
 
    printf ( "ticker %s\n", data.ticker );
181
 
    printf ( "unitprice_valid %d\n", data.unitprice_valid );
182
 
    printf ( "unitprice %f\n", data.unitprice );
183
 
    printf ( "date_unitprice_valid %d\n", data.date_unitprice_valid );
184
 
    printf ( "date_unitprice %s\n", ctime ( &data.date_unitprice ));
185
 
    printf ( "currency_valid %d\n", data.currency_valid );
186
 
    printf ( "currency %s\n", data.currency );
187
 
    printf ( "memo_valid %d\n", data.memo_valid );
188
 
    printf ( "memo %s\n", data.memo );
 
209
/*     printf ( "ofx_proc_security_cb :\n" ); */
 
210
/*     printf ( "unique_id_valid %d\n", data.unique_id_valid ); */
 
211
/*     printf ( "unique_id %s\n", data.unique_id ); */
 
212
/*     printf ( "unique_id_type_valid %d\n", data.unique_id_type_valid ); */
 
213
/*     printf ( "unique_id_type %s\n", data.unique_id_type ); */
 
214
/*     printf ( "secname_valid %d\n", data.secname_valid ); */
 
215
/*     printf ( "secname %s\n", data.secname ); */
 
216
/*     printf ( "ticker_valid %d\n", data.ticker_valid ); */
 
217
/*     printf ( "ticker %s\n", data.ticker ); */
 
218
/*     printf ( "unitprice_valid %d\n", data.unitprice_valid ); */
 
219
/*     printf ( "unitprice %f\n", data.unitprice ); */
 
220
/*     printf ( "date_unitprice_valid %d\n", data.date_unitprice_valid ); */
 
221
/*     printf ( "date_unitprice %s\n", ctime ( &data.date_unitprice )); */
 
222
/*     printf ( "currency_valid %d\n", data.currency_valid ); */
 
223
/*     printf ( "currency %s\n", data.currency ); */
 
224
/*     printf ( "memo_valid %d\n", data.memo_valid ); */
 
225
/*     printf ( "memo %s\n", data.memo ); */
189
226
 
190
227
    dialogue ( _("That file contains something on proc_security_cb.\nI didn't have any file to test that function.\nPlease contact the grisbi team to implement that function."));
191
 
 
192
 
 
193
 
    return 0;
 
228
    return 0; 
194
229
}
195
230
/* *******************************************************************************/
196
231
 
199
234
 
200
235
/* *******************************************************************************/
201
236
 
 
237
#ifdef OFX_0_7
 
238
int ofx_proc_account_cb(struct OfxAccountData data, void * account_data)
 
239
#else /* OFX_0_7 */
202
240
int ofx_proc_account_cb(struct OfxAccountData data)
 
241
#endif /* OFX_0_7 */
203
242
{
204
 
    /*     printf ( "ofx_proc_account_cb\n" );  */
205
 
    /*     printf ( "account_id_valid %d\n", data.account_id_valid ); */
206
 
    /*     printf ( "account_id %s\n", data.account_id ); */
207
 
    /*     printf ( "account_name %s\n", data.account_name ); */
208
 
    /*     printf ( "account_type_valid %d\n", data.account_type_valid ); */
209
 
    /*     printf ( "account_type %d\n", data.account_type ); */
210
 
    /*     printf ( "currency_valid %d\n", data.currency_valid ); */
211
 
    /*     printf ( "currency %s\n", data. currency); */
 
243
/*         printf ( "ofx_proc_account_cb\n" ); */
 
244
/*         printf ( "account_id_valid %d\n", data.account_id_valid ); */
 
245
/*         printf ( "account_id %s\n", data.account_id ); */
 
246
/*         printf ( "account_name %s\n", data.account_name ); */
 
247
/*         printf ( "account_type_valid %d\n", data.account_type_valid ); */
 
248
/*         printf ( "account_type %d\n", data.account_type ); */
 
249
/*         printf ( "currency_valid %d\n", data.currency_valid ); */
 
250
/*         printf ( "currency %s\n", data. currency); */
212
251
 
213
 
    /*     si on revient ici et qu'un compte �tait en cours, c'est qu'il est fini et qu'on passe au compte */
 
252
    /*     si on revient ici et qu'un compte était en cours, c'est qu'il est fini et qu'on passe au compte */
214
253
    /*  suivant... */
215
254
 
216
255
    if ( compte_ofx_importation_en_cours )
243
282
 
244
283
 
245
284
/* *******************************************************************************/
 
285
#ifdef OFX_0_7
 
286
int ofx_proc_transaction_cb(struct OfxTransactionData data, void * security_data)
 
287
#else /* OFX_0_7 */
246
288
int ofx_proc_transaction_cb(struct OfxTransactionData data)
 
289
#endif /* OFX_0_7 */
247
290
{
248
291
    struct struct_ope_importation *ope_import;
249
292
    GDate *date;
250
293
 
251
 
 
252
 
    /*     printf ( "ofx_proc_transaction_cb\n" );  */
253
 
    /*     printf ( "account_id_valid : %d  \n", data.account_id_valid ); */
254
 
    /*     printf ( "account_id : %s  \n", data.account_id ); */
255
 
    /*     printf ( "transactiontype_valid : %d  \n", data.transactiontype_valid ); */
256
 
    /*     printf ( "transactiontype : %d  \n", data.transactiontype ); */
257
 
    /*     printf ( "invtransactiontype_valid : %d  \n", data.invtransactiontype_valid ); */
258
 
    /*     printf ( "invtransactiontype : %d  \n", data.invtransactiontype ); */
259
 
    /*     printf ( "units_valid : %d  \n", data. units_valid); */
260
 
    /*     printf ( "units : %f  \n", data.units ); */
261
 
    /*     printf ( "unitprice_valid : %d  \n", data.unitprice_valid ); */
262
 
    /*     printf ( "unitprice : %f  \n", data.unitprice ); */
263
 
    /*     printf ( "amount_valid : %d  \n", data.amount_valid ); */
264
 
    /*     printf ( "amount : %f  \n", data.amount ); */
265
 
    /*     printf ( "fi_id_valid : %d  \n", data.fi_id_valid ); */
266
 
    /*     printf ( "fi_id : %s  \n", data.fi_id ); */
267
 
    /*     printf ( "unique_id_valid : %d  \n", data.unique_id_valid ); */
268
 
    /*     printf ( "unique_id : %s  \n", data.unique_id ); */
269
 
    /*     printf ( "unique_id_type_valid : %d  \n", data.unique_id_type_valid ); */
270
 
    /*     printf ( "unique_id_type : %s  \n", data.unique_id_type ); */
271
 
    /*     printf ( "security_data_valid : %d  \n", data.security_data_valid ); */
272
 
    /*     printf ( "security_data_ptr : %s  \n", data.security_data_ptr ); */
273
 
    /*     printf ( "date_posted_valid : %d  \n", data.date_posted_valid ); */
274
 
    /*     printf ( "date_posted : %s  \n", ctime ( &data.date_posted )); */
275
 
    /*     printf ( "date_initiated_valid : %d  \n", data.date_initiated_valid ); */
276
 
    /*     printf ( "date_initiated : %s  \n", ctime ( &data.date_initiated )); */
277
 
    /*     printf ( "date_funds_available_valid : %d  \n", data.date_funds_available_valid ); */
278
 
    /*     printf ( "date_funds_available : %s  \n", ctime ( &data.date_funds_available )); */
279
 
    /*     printf ( "fi_id_corrected_valid : %d  \n", data.fi_id_corrected_valid ); */
280
 
    /*     printf ( "fi_id_corrected : %s  \n", data.fi_id_corrected ); */
281
 
    /*     printf ( "fi_id_correction_action_valid : %d  \n", data.fi_id_correction_action_valid ); */
282
 
    /*     printf ( "fi_id_correction_action : %d  \n", data.fi_id_correction_action ); */
283
 
    /*     printf ( "server_transaction_id_valid : %d  \n", data.server_transaction_id_valid ); */
284
 
    /*     printf ( "server_transaction_id : %s  \n", data.server_transaction_id ); */
285
 
    /*     printf ( "check_number_valid : %d  \n", data.check_number_valid ); */
286
 
    /*     printf ( "check_number : %s  \n", data.check_number ); */
287
 
    /*     printf ( "reference_number_valid : %d  \n", data.reference_number_valid ); */
288
 
    /*     printf ( "reference_number : %s  \n", data.reference_number ); */
289
 
    /*     printf ( "standard_industrial_code_valid : %d  \n", data.standard_industrial_code_valid ); */
290
 
    /*     printf ( "standard_industrial_code : %s  \n", data.standard_industrial_code ); */
291
 
    /*     printf ( "payee_id_valid : %d  \n", data.payee_id_valid ); */
292
 
    /*     printf ( "payee_id : %s  \n", data.payee_id ); */
293
 
    /*     printf ( "name_valid : %d  \n", data.name_valid ); */
294
 
    /*     printf ( "name : %s  \n", data.name ); */
295
 
    /*     printf ( "memo_valid : %d  \n", data.memo_valid ); */
296
 
    /*     printf ( "memo : %s  \n\n\n\n", data.memo ); */
297
 
 
298
 
    /* si � ce niveau le comtpe n'est pas cr��, c'est qu'il y a un pb... */
 
294
/*         printf ( "ofx_proc_transaction_cb\n" ); */
 
295
/*         printf ( "account_id_valid : %d  \n", data.account_id_valid ); */
 
296
/*         printf ( "account_id : %s  \n", data.account_id ); */
 
297
/*         printf ( "transactiontype_valid : %d  \n", data.transactiontype_valid ); */
 
298
/*         printf ( "transactiontype : %d  \n", data.transactiontype ); */
 
299
/*         printf ( "invtransactiontype_valid : %d  \n", data.invtransactiontype_valid ); */
 
300
/*         printf ( "invtransactiontype : %d  \n", data.invtransactiontype ); */
 
301
/*         printf ( "units_valid : %d  \n", data. units_valid); */
 
302
/*         printf ( "units : %f  \n", data.units ); */
 
303
/*         printf ( "unitprice_valid : %d  \n", data.unitprice_valid ); */
 
304
/*         printf ( "unitprice : %f  \n", data.unitprice ); */
 
305
/*         printf ( "amount_valid : %d  \n", data.amount_valid ); */
 
306
/*         printf ( "amount : %f  \n", data.amount ); */
 
307
/*         printf ( "fi_id_valid : %d  \n", data.fi_id_valid ); */
 
308
/*         printf ( "fi_id : %s  \n", data.fi_id ); */
 
309
/*         printf ( "unique_id_valid : %d  \n", data.unique_id_valid ); */
 
310
/*         printf ( "unique_id : %s  \n", data.unique_id ); */
 
311
/*         printf ( "unique_id_type_valid : %d  \n", data.unique_id_type_valid ); */
 
312
/*         printf ( "unique_id_type : %s  \n", data.unique_id_type ); */
 
313
/*         printf ( "security_data_valid : %d  \n", data.security_data_valid ); */
 
314
/*         printf ( "security_data_ptr : %s  \n", data.security_data_ptr ); */
 
315
/*         printf ( "date_posted_valid : %d  \n", data.date_posted_valid ); */
 
316
/*         printf ( "date_posted : %s  \n", ctime ( &data.date_posted )); */
 
317
/*         printf ( "date_initiated_valid : %d  \n", data.date_initiated_valid ); */
 
318
/*         printf ( "date_initiated : %s  \n", ctime ( &data.date_initiated )); */
 
319
/*         printf ( "date_funds_available_valid : %d  \n", data.date_funds_available_valid ); */
 
320
/*         printf ( "date_funds_available : %s  \n", ctime ( &data.date_funds_available )); */
 
321
/*         printf ( "fi_id_corrected_valid : %d  \n", data.fi_id_corrected_valid ); */
 
322
/*         printf ( "fi_id_corrected : %s  \n", data.fi_id_corrected ); */
 
323
/*         printf ( "fi_id_correction_action_valid : %d  \n", data.fi_id_correction_action_valid ); */
 
324
/*         printf ( "fi_id_correction_action : %d  \n", data.fi_id_correction_action ); */
 
325
/*         printf ( "server_transaction_id_valid : %d  \n", data.server_transaction_id_valid ); */
 
326
/*         printf ( "server_transaction_id : %s  \n", data.server_transaction_id ); */
 
327
/*         printf ( "check_number_valid : %d  \n", data.check_number_valid ); */
 
328
/*         printf ( "check_number : %s  \n", data.check_number ); */
 
329
/*         printf ( "reference_number_valid : %d  \n", data.reference_number_valid ); */
 
330
/*         printf ( "reference_number : %s  \n", data.reference_number ); */
 
331
/*         printf ( "standard_industrial_code_valid : %d  \n", data.standard_industrial_code_valid ); */
 
332
/*         printf ( "standard_industrial_code : %s  \n", data.standard_industrial_code ); */
 
333
/*         printf ( "payee_id_valid : %d  \n", data.payee_id_valid ); */
 
334
/*         printf ( "payee_id : %s  \n", data.payee_id ); */
 
335
/*         printf ( "name_valid : %d  \n", data.name_valid ); */
 
336
/*         printf ( "name : %s  \n", data.name ); */
 
337
/*         printf ( "memo_valid : %d  \n", data.memo_valid ); */
 
338
/*         printf ( "memo : %s  \n\n\n\n", data.memo ); */
 
339
 
 
340
    /* si à ce niveau le comtpe n'est pas créé, c'est qu'il y a un pb... */
299
341
 
300
342
    if ( !compte_ofx_importation_en_cours )
301
343
    {
308
350
        return 0;
309
351
    }
310
352
 
311
 
    /*     c'est parti, on cr�e et remplit l'op�ration */
 
353
    /*     c'est parti, on crée et remplit l'opération */
312
354
 
313
355
    ope_import = calloc ( 1,
314
356
                          sizeof ( struct struct_ope_importation ));
355
397
        ope_import -> type_de_transaction = data.transactiontype;
356
398
 
357
399
    /*     on peut faire ici des ptites modifs en fonction du type de transaction, */
358
 
    /*     mais tout n'est pas utilis� par les banques... */
 
400
    /*     mais tout n'est pas utilisé par les banques... */
359
401
 
360
402
    if ( data.transactiontype_valid )
361
403
    {
362
404
        switch ( data.transactiontype )
363
405
        {
364
406
            case OFX_CHECK:
365
 
                /*                 si c'est un ch�que, svt ya pas de tiers, on va mettre ch�que...  */
 
407
                /*                 si c'est un chèque, svt ya pas de tiers, on va mettre chèque...  */
366
408
 
367
409
                if ( !ope_import -> tiers )
368
410
                    ope_import -> tiers = g_strdup ( _("Check"));
426
468
                break;
427
469
        }
428
470
    }
429
 
    /*     on ajoute l'op� � son compte */
 
471
    /*     on ajoute l'opé à son compte */
430
472
 
431
473
    compte_ofx_importation_en_cours -> operations_importees = g_slist_append ( compte_ofx_importation_en_cours -> operations_importees,
432
474
                                                                               ope_import );
439
481
 
440
482
 
441
483
/* *******************************************************************************/
 
484
#ifdef OFX_0_7
 
485
int ofx_proc_statement_cb(struct OfxStatementData data, void * statement_data)
 
486
#else /* OFX_0_7 */
442
487
int ofx_proc_statement_cb(struct OfxStatementData data)
 
488
#endif /* OFX_0_7 */
443
489
{
444
490
    GDate *date;
445
491
 
446
 
    /*     printf ( "ofx_proc_statement_cb\n" ); */
447
 
    /*     printf ( "currency_valid : %d\n", data.currency_valid ); */
448
 
    /*     printf ( "currency : %s\n", data.currency ); */
449
 
    /*     printf ( "account_id_valid : %d\n", data.account_id_valid ); */
450
 
    /*     printf ( "account_id : %s\n", data.account_id ); */
451
 
    /*     printf ( "ledger_balance_valid : %d\n", data.ledger_balance_valid ); */
452
 
    /*     printf ( "ledger_balance : %f\n", data.ledger_balance ); */
453
 
    /*     printf ( "ledger_balance_date_valid : %d\n", data.ledger_balance_date_valid ); */
454
 
    /*     printf ( "ledger_balance_date : %s\n", ctime ( &data.ledger_balance_date)); */
455
 
    /*     printf ( "available_balance_valid : %d\n", data.available_balance_valid ); */
456
 
    /*     printf ( "available_balance : %f\n", data.available_balance ); */
457
 
    /*     printf ( "available_balance_date_valid : %d\n", data.available_balance_date_valid ); */
458
 
    /*     printf ( "available_balance_date : %s\n", ctime ( &data.available_balance_date )); */
459
 
    /*     printf ( "date_start_valid : %d\n", data.date_start_valid ); */
460
 
    /*     printf ( "date_start : %s\n", ctime ( &data.date_start )); */
461
 
    /*     printf ( "date_end_valid : %d\n", data.date_end_valid ); */
462
 
    /*     printf ( "date_end : %s\n", ctime ( &data.date_end )); */
463
 
    /*     printf ( "marketing_info_valid : %d\n", data.marketing_info_valid ); */
464
 
    /*     printf ( "marketing_info : %s\n", data.marketing_info ); */
 
492
/*         printf ( "ofx_proc_statement_cb\n" ); */
 
493
/*         printf ( "currency_valid : %d\n", data.currency_valid ); */
 
494
/*         printf ( "currency : %s\n", data.currency ); */
 
495
/*         printf ( "account_id_valid : %d\n", data.account_id_valid ); */
 
496
/*         printf ( "account_id : %s\n", data.account_id ); */
 
497
/*         printf ( "ledger_balance_valid : %d\n", data.ledger_balance_valid ); */
 
498
/*         printf ( "ledger_balance : %f\n", data.ledger_balance ); */
 
499
/*         printf ( "ledger_balance_date_valid : %d\n", data.ledger_balance_date_valid ); */
 
500
/*         printf ( "ledger_balance_date : %s\n", ctime ( &data.ledger_balance_date)); */
 
501
/*         printf ( "available_balance_valid : %d\n", data.available_balance_valid ); */
 
502
/*         printf ( "available_balance : %f\n", data.available_balance ); */
 
503
/*         printf ( "available_balance_date_valid : %d\n", data.available_balance_date_valid ); */
 
504
/*         printf ( "available_balance_date : %s\n", ctime ( &data.available_balance_date )); */
 
505
/*         printf ( "date_start_valid : %d\n", data.date_start_valid ); */
 
506
/*         printf ( "date_start : %s\n", ctime ( &data.date_start )); */
 
507
/*         printf ( "date_end_valid : %d\n", data.date_end_valid ); */
 
508
/*         printf ( "date_end : %s\n", ctime ( &data.date_end )); */
 
509
/*         printf ( "marketing_info_valid : %d\n", data.marketing_info_valid ); */
 
510
/*         printf ( "marketing_info : %s\n", data.marketing_info ); */
465
511
 
466
512
    if ( data.date_start_valid )
467
513
    {