~ubuntu-branches/ubuntu/trusty/gnome-calculator/trusty-proposed

« back to all changes in this revision

Viewing changes to src/currency.c

  • Committer: Package Import Robot
  • Author(s): Chris Malton
  • Date: 2014-09-23 14:47:07 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140923144707-6fo0jssbhuloccp3
Tags: 1:3.10.3-0ubuntu0.1
New upstream version, drop patches included in the new version
(lp: #1209326)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* currency.c generated by valac 0.18.1, the Vala compiler
 
1
/* currency.c generated by valac 0.24.0, the Vala compiler
2
2
 * generated from currency.vala, do not modify */
3
3
 
4
4
/*
189
189
 
190
190
CurrencyManager* currency_manager_get_default (void) {
191
191
        CurrencyManager* result = NULL;
192
 
        CurrencyManager* _tmp0_;
193
 
        CurrencyManager* _tmp3_;
194
 
        CurrencyManager* _tmp4_;
 
192
        CurrencyManager* _tmp0_ = NULL;
 
193
        CurrencyManager* _tmp3_ = NULL;
 
194
        CurrencyManager* _tmp4_ = NULL;
195
195
        const gchar* _tmp5_ = NULL;
196
 
        Currency* _tmp6_;
197
 
        CurrencyManager* _tmp7_;
 
196
        Currency* _tmp6_ = NULL;
 
197
        CurrencyManager* _tmp7_ = NULL;
198
198
        const gchar* _tmp8_ = NULL;
199
 
        Currency* _tmp9_;
200
 
        CurrencyManager* _tmp10_;
 
199
        Currency* _tmp9_ = NULL;
 
200
        CurrencyManager* _tmp10_ = NULL;
201
201
        const gchar* _tmp11_ = NULL;
202
 
        Currency* _tmp12_;
203
 
        CurrencyManager* _tmp13_;
 
202
        Currency* _tmp12_ = NULL;
 
203
        CurrencyManager* _tmp13_ = NULL;
204
204
        const gchar* _tmp14_ = NULL;
205
 
        Currency* _tmp15_;
206
 
        CurrencyManager* _tmp16_;
 
205
        Currency* _tmp15_ = NULL;
 
206
        CurrencyManager* _tmp16_ = NULL;
207
207
        const gchar* _tmp17_ = NULL;
208
 
        Currency* _tmp18_;
209
 
        CurrencyManager* _tmp19_;
 
208
        Currency* _tmp18_ = NULL;
 
209
        CurrencyManager* _tmp19_ = NULL;
210
210
        const gchar* _tmp20_ = NULL;
211
 
        Currency* _tmp21_;
212
 
        CurrencyManager* _tmp22_;
 
211
        Currency* _tmp21_ = NULL;
 
212
        CurrencyManager* _tmp22_ = NULL;
213
213
        const gchar* _tmp23_ = NULL;
214
 
        Currency* _tmp24_;
215
 
        CurrencyManager* _tmp25_;
 
214
        Currency* _tmp24_ = NULL;
 
215
        CurrencyManager* _tmp25_ = NULL;
216
216
        const gchar* _tmp26_ = NULL;
217
 
        Currency* _tmp27_;
218
 
        CurrencyManager* _tmp28_;
 
217
        Currency* _tmp27_ = NULL;
 
218
        CurrencyManager* _tmp28_ = NULL;
219
219
        const gchar* _tmp29_ = NULL;
220
 
        Currency* _tmp30_;
221
 
        CurrencyManager* _tmp31_;
 
220
        Currency* _tmp30_ = NULL;
 
221
        CurrencyManager* _tmp31_ = NULL;
222
222
        const gchar* _tmp32_ = NULL;
223
 
        Currency* _tmp33_;
224
 
        CurrencyManager* _tmp34_;
 
223
        Currency* _tmp33_ = NULL;
 
224
        CurrencyManager* _tmp34_ = NULL;
225
225
        const gchar* _tmp35_ = NULL;
226
 
        Currency* _tmp36_;
227
 
        CurrencyManager* _tmp37_;
 
226
        Currency* _tmp36_ = NULL;
 
227
        CurrencyManager* _tmp37_ = NULL;
228
228
        const gchar* _tmp38_ = NULL;
229
 
        Currency* _tmp39_;
230
 
        CurrencyManager* _tmp40_;
 
229
        Currency* _tmp39_ = NULL;
 
230
        CurrencyManager* _tmp40_ = NULL;
231
231
        const gchar* _tmp41_ = NULL;
232
 
        Currency* _tmp42_;
233
 
        CurrencyManager* _tmp43_;
 
232
        Currency* _tmp42_ = NULL;
 
233
        CurrencyManager* _tmp43_ = NULL;
234
234
        const gchar* _tmp44_ = NULL;
235
 
        Currency* _tmp45_;
236
 
        CurrencyManager* _tmp46_;
 
235
        Currency* _tmp45_ = NULL;
 
236
        CurrencyManager* _tmp46_ = NULL;
237
237
        const gchar* _tmp47_ = NULL;
238
 
        Currency* _tmp48_;
239
 
        CurrencyManager* _tmp49_;
 
238
        Currency* _tmp48_ = NULL;
 
239
        CurrencyManager* _tmp49_ = NULL;
240
240
        const gchar* _tmp50_ = NULL;
241
 
        Currency* _tmp51_;
242
 
        CurrencyManager* _tmp52_;
 
241
        Currency* _tmp51_ = NULL;
 
242
        CurrencyManager* _tmp52_ = NULL;
243
243
        const gchar* _tmp53_ = NULL;
244
 
        Currency* _tmp54_;
245
 
        CurrencyManager* _tmp55_;
 
244
        Currency* _tmp54_ = NULL;
 
245
        CurrencyManager* _tmp55_ = NULL;
246
246
        const gchar* _tmp56_ = NULL;
247
 
        Currency* _tmp57_;
248
 
        CurrencyManager* _tmp58_;
 
247
        Currency* _tmp57_ = NULL;
 
248
        CurrencyManager* _tmp58_ = NULL;
249
249
        const gchar* _tmp59_ = NULL;
250
 
        Currency* _tmp60_;
251
 
        CurrencyManager* _tmp61_;
 
250
        Currency* _tmp60_ = NULL;
 
251
        CurrencyManager* _tmp61_ = NULL;
252
252
        const gchar* _tmp62_ = NULL;
253
 
        Currency* _tmp63_;
254
 
        CurrencyManager* _tmp64_;
 
253
        Currency* _tmp63_ = NULL;
 
254
        CurrencyManager* _tmp64_ = NULL;
255
255
        const gchar* _tmp65_ = NULL;
256
 
        Currency* _tmp66_;
257
 
        CurrencyManager* _tmp67_;
 
256
        Currency* _tmp66_ = NULL;
 
257
        CurrencyManager* _tmp67_ = NULL;
258
258
        const gchar* _tmp68_ = NULL;
259
 
        Currency* _tmp69_;
260
 
        CurrencyManager* _tmp70_;
 
259
        Currency* _tmp69_ = NULL;
 
260
        CurrencyManager* _tmp70_ = NULL;
261
261
        const gchar* _tmp71_ = NULL;
262
 
        Currency* _tmp72_;
263
 
        CurrencyManager* _tmp73_;
 
262
        Currency* _tmp72_ = NULL;
 
263
        CurrencyManager* _tmp73_ = NULL;
264
264
        const gchar* _tmp74_ = NULL;
265
 
        Currency* _tmp75_;
266
 
        CurrencyManager* _tmp76_;
 
265
        Currency* _tmp75_ = NULL;
 
266
        CurrencyManager* _tmp76_ = NULL;
267
267
        const gchar* _tmp77_ = NULL;
268
 
        Currency* _tmp78_;
269
 
        CurrencyManager* _tmp79_;
 
268
        Currency* _tmp78_ = NULL;
 
269
        CurrencyManager* _tmp79_ = NULL;
270
270
        const gchar* _tmp80_ = NULL;
271
 
        Currency* _tmp81_;
272
 
        CurrencyManager* _tmp82_;
 
271
        Currency* _tmp81_ = NULL;
 
272
        CurrencyManager* _tmp82_ = NULL;
273
273
        const gchar* _tmp83_ = NULL;
274
 
        Currency* _tmp84_;
275
 
        CurrencyManager* _tmp85_;
 
274
        Currency* _tmp84_ = NULL;
 
275
        CurrencyManager* _tmp85_ = NULL;
276
276
        const gchar* _tmp86_ = NULL;
277
 
        Currency* _tmp87_;
278
 
        CurrencyManager* _tmp88_;
 
277
        Currency* _tmp87_ = NULL;
 
278
        CurrencyManager* _tmp88_ = NULL;
279
279
        const gchar* _tmp89_ = NULL;
280
 
        Currency* _tmp90_;
281
 
        CurrencyManager* _tmp91_;
 
280
        Currency* _tmp90_ = NULL;
 
281
        CurrencyManager* _tmp91_ = NULL;
282
282
        const gchar* _tmp92_ = NULL;
283
 
        Currency* _tmp93_;
284
 
        CurrencyManager* _tmp94_;
 
283
        Currency* _tmp93_ = NULL;
 
284
        CurrencyManager* _tmp94_ = NULL;
285
285
        const gchar* _tmp95_ = NULL;
286
 
        Currency* _tmp96_;
287
 
        CurrencyManager* _tmp97_;
 
286
        Currency* _tmp96_ = NULL;
 
287
        CurrencyManager* _tmp97_ = NULL;
288
288
        const gchar* _tmp98_ = NULL;
289
 
        Currency* _tmp99_;
290
 
        CurrencyManager* _tmp100_;
 
289
        Currency* _tmp99_ = NULL;
 
290
        CurrencyManager* _tmp100_ = NULL;
291
291
        const gchar* _tmp101_ = NULL;
292
 
        Currency* _tmp102_;
293
 
        CurrencyManager* _tmp103_;
 
292
        Currency* _tmp102_ = NULL;
 
293
        CurrencyManager* _tmp103_ = NULL;
294
294
        const gchar* _tmp104_ = NULL;
295
 
        Currency* _tmp105_;
296
 
        CurrencyManager* _tmp106_;
 
295
        Currency* _tmp105_ = NULL;
 
296
        CurrencyManager* _tmp106_ = NULL;
297
297
        const gchar* _tmp107_ = NULL;
298
 
        Currency* _tmp108_;
299
 
        CurrencyManager* _tmp109_;
 
298
        Currency* _tmp108_ = NULL;
 
299
        CurrencyManager* _tmp109_ = NULL;
300
300
        const gchar* _tmp110_ = NULL;
301
 
        Currency* _tmp111_;
302
 
        CurrencyManager* _tmp112_;
 
301
        Currency* _tmp111_ = NULL;
 
302
        CurrencyManager* _tmp112_ = NULL;
303
303
        const gchar* _tmp113_ = NULL;
304
 
        Currency* _tmp114_;
305
 
        CurrencyManager* _tmp115_;
 
304
        Currency* _tmp114_ = NULL;
 
305
        CurrencyManager* _tmp115_ = NULL;
306
306
        const gchar* _tmp116_ = NULL;
307
 
        Currency* _tmp117_;
308
 
        CurrencyManager* _tmp118_;
 
307
        Currency* _tmp117_ = NULL;
 
308
        CurrencyManager* _tmp118_ = NULL;
309
309
        const gchar* _tmp119_ = NULL;
310
 
        Currency* _tmp120_;
311
 
        CurrencyManager* _tmp121_;
 
310
        Currency* _tmp120_ = NULL;
 
311
        CurrencyManager* _tmp121_ = NULL;
312
312
        const gchar* _tmp122_ = NULL;
313
 
        Currency* _tmp123_;
314
 
        CurrencyManager* _tmp124_;
 
313
        Currency* _tmp123_ = NULL;
 
314
        CurrencyManager* _tmp124_ = NULL;
315
315
        const gchar* _tmp125_ = NULL;
316
 
        Currency* _tmp126_;
317
 
        CurrencyManager* _tmp127_;
 
316
        Currency* _tmp126_ = NULL;
 
317
        CurrencyManager* _tmp127_ = NULL;
318
318
        const gchar* _tmp128_ = NULL;
319
 
        Currency* _tmp129_;
320
 
        CurrencyManager* _tmp130_;
 
319
        Currency* _tmp129_ = NULL;
 
320
        CurrencyManager* _tmp130_ = NULL;
321
321
        const gchar* _tmp131_ = NULL;
322
 
        Currency* _tmp132_;
323
 
        CurrencyManager* _tmp133_;
 
322
        Currency* _tmp132_ = NULL;
 
323
        CurrencyManager* _tmp133_ = NULL;
324
324
        const gchar* _tmp134_ = NULL;
325
 
        Currency* _tmp135_;
326
 
        CurrencyManager* _tmp136_;
 
325
        Currency* _tmp135_ = NULL;
 
326
        CurrencyManager* _tmp136_ = NULL;
327
327
        const gchar* _tmp137_ = NULL;
328
 
        Currency* _tmp138_;
329
 
        CurrencyManager* _tmp139_;
 
328
        Currency* _tmp138_ = NULL;
 
329
        CurrencyManager* _tmp139_ = NULL;
330
330
        const gchar* _tmp140_ = NULL;
331
 
        Currency* _tmp141_;
332
 
        CurrencyManager* _tmp142_;
 
331
        Currency* _tmp141_ = NULL;
 
332
        CurrencyManager* _tmp142_ = NULL;
333
333
        const gchar* _tmp143_ = NULL;
334
 
        Currency* _tmp144_;
335
 
        CurrencyManager* _tmp145_;
 
334
        Currency* _tmp144_ = NULL;
 
335
        CurrencyManager* _tmp145_ = NULL;
336
336
        const gchar* _tmp146_ = NULL;
337
 
        Currency* _tmp147_;
338
 
        CurrencyManager* _tmp148_;
 
337
        Currency* _tmp147_ = NULL;
 
338
        CurrencyManager* _tmp148_ = NULL;
339
339
        const gchar* _tmp149_ = NULL;
340
 
        Currency* _tmp150_;
341
 
        CurrencyManager* _tmp151_;
 
340
        Currency* _tmp150_ = NULL;
 
341
        CurrencyManager* _tmp151_ = NULL;
342
342
        const gchar* _tmp152_ = NULL;
343
 
        Currency* _tmp153_;
344
 
        CurrencyManager* _tmp154_;
 
343
        Currency* _tmp153_ = NULL;
 
344
        CurrencyManager* _tmp154_ = NULL;
345
345
        const gchar* _tmp155_ = NULL;
346
 
        Currency* _tmp156_;
347
 
        CurrencyManager* _tmp157_;
 
346
        Currency* _tmp156_ = NULL;
 
347
        CurrencyManager* _tmp157_ = NULL;
348
348
        const gchar* _tmp158_ = NULL;
349
 
        Currency* _tmp159_;
350
 
        CurrencyManager* _tmp160_;
 
349
        Currency* _tmp159_ = NULL;
 
350
        CurrencyManager* _tmp160_ = NULL;
351
351
        const gchar* _tmp161_ = NULL;
352
 
        Currency* _tmp162_;
353
 
        CurrencyManager* _tmp163_;
 
352
        Currency* _tmp162_ = NULL;
 
353
        CurrencyManager* _tmp163_ = NULL;
354
354
        const gchar* _tmp164_ = NULL;
355
 
        Currency* _tmp165_;
356
 
        CurrencyManager* _tmp166_;
 
355
        Currency* _tmp165_ = NULL;
 
356
        CurrencyManager* _tmp166_ = NULL;
357
357
        const gchar* _tmp167_ = NULL;
358
 
        Currency* _tmp168_;
359
 
        CurrencyManager* _tmp169_;
 
358
        Currency* _tmp168_ = NULL;
 
359
        CurrencyManager* _tmp169_ = NULL;
360
360
        const gchar* _tmp170_ = NULL;
361
 
        Currency* _tmp171_;
362
 
        CurrencyManager* _tmp172_;
 
361
        Currency* _tmp171_ = NULL;
 
362
        CurrencyManager* _tmp172_ = NULL;
363
363
        const gchar* _tmp173_ = NULL;
364
 
        Currency* _tmp174_;
365
 
        CurrencyManager* _tmp175_;
 
364
        Currency* _tmp174_ = NULL;
 
365
        CurrencyManager* _tmp175_ = NULL;
366
366
        const gchar* _tmp176_ = NULL;
367
 
        Currency* _tmp177_;
368
 
        CurrencyManager* _tmp178_;
 
367
        Currency* _tmp177_ = NULL;
 
368
        CurrencyManager* _tmp178_ = NULL;
369
369
        const gchar* _tmp179_ = NULL;
370
 
        Currency* _tmp180_;
371
 
        CurrencyManager* _tmp181_;
 
370
        Currency* _tmp180_ = NULL;
 
371
        CurrencyManager* _tmp181_ = NULL;
372
372
        const gchar* _tmp182_ = NULL;
373
 
        Currency* _tmp183_;
374
 
        CurrencyManager* _tmp184_;
375
 
        CurrencyManager* _tmp185_;
 
373
        Currency* _tmp183_ = NULL;
 
374
        CurrencyManager* _tmp184_ = NULL;
 
375
        CurrencyManager* _tmp185_ = NULL;
376
376
        _tmp0_ = default_currency_manager;
377
377
        if (_tmp0_ != NULL) {
378
 
                CurrencyManager* _tmp1_;
379
 
                CurrencyManager* _tmp2_;
 
378
                CurrencyManager* _tmp1_ = NULL;
 
379
                CurrencyManager* _tmp2_ = NULL;
380
380
                _tmp1_ = default_currency_manager;
381
381
                _tmp2_ = _g_object_ref0 (_tmp1_);
382
382
                result = _tmp2_;
634
634
 
635
635
GList* currency_manager_get_currencies (CurrencyManager* self) {
636
636
        GList* result = NULL;
637
 
        GList* r;
638
 
        GList* _tmp0_;
 
637
        GList* r = NULL;
 
638
        GList* _tmp0_ = NULL;
639
639
        g_return_val_if_fail (self != NULL, NULL);
640
640
        r = NULL;
641
641
        _tmp0_ = self->priv->currencies;
644
644
                GList* c_it = NULL;
645
645
                c_collection = _tmp0_;
646
646
                for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
647
 
                        Currency* _tmp1_;
 
647
                        Currency* _tmp1_ = NULL;
648
648
                        Currency* c = NULL;
649
649
                        _tmp1_ = _g_object_ref0 ((Currency*) c_it->data);
650
650
                        c = _tmp1_;
651
651
                        {
652
 
                                Currency* _tmp2_;
653
 
                                Currency* _tmp3_;
 
652
                                Currency* _tmp2_ = NULL;
 
653
                                Currency* _tmp3_ = NULL;
654
654
                                _tmp2_ = c;
655
655
                                _tmp3_ = _g_object_ref0 (_tmp2_);
656
656
                                r = g_list_append (r, _tmp3_);
665
665
 
666
666
Currency* currency_manager_get_currency (CurrencyManager* self, const gchar* name) {
667
667
        Currency* result = NULL;
668
 
        GList* _tmp0_;
 
668
        GList* _tmp0_ = NULL;
669
669
        g_return_val_if_fail (self != NULL, NULL);
670
670
        g_return_val_if_fail (name != NULL, NULL);
671
671
        _tmp0_ = self->priv->currencies;
674
674
                GList* c_it = NULL;
675
675
                c_collection = _tmp0_;
676
676
                for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
677
 
                        Currency* _tmp1_;
 
677
                        Currency* _tmp1_ = NULL;
678
678
                        Currency* c = NULL;
679
679
                        _tmp1_ = _g_object_ref0 ((Currency*) c_it->data);
680
680
                        c = _tmp1_;
681
681
                        {
682
 
                                const gchar* _tmp2_;
683
 
                                Currency* _tmp3_;
684
 
                                gchar* _tmp4_;
685
 
                                gchar* _tmp5_;
686
 
                                gchar* _tmp6_;
687
 
                                gboolean _tmp7_;
 
682
                                const gchar* _tmp2_ = NULL;
 
683
                                Currency* _tmp3_ = NULL;
 
684
                                gchar* _tmp4_ = NULL;
 
685
                                gchar* _tmp5_ = NULL;
 
686
                                gchar* _tmp6_ = NULL;
 
687
                                gboolean _tmp7_ = FALSE;
688
688
                                _tmp2_ = name;
689
689
                                _tmp3_ = c;
690
690
                                _tmp4_ = currency_get_name (_tmp3_);
693
693
                                _tmp7_ = g_strcmp0 (_tmp2_, _tmp6_) == 0;
694
694
                                _g_free0 (_tmp6_);
695
695
                                if (_tmp7_) {
696
 
                                        Currency* _tmp8_;
 
696
                                        Number* value = NULL;
 
697
                                        Currency* _tmp8_ = NULL;
697
698
                                        Number* _tmp9_ = NULL;
698
 
                                        Number* value;
699
699
                                        gboolean _tmp10_ = FALSE;
700
700
                                        gboolean _tmp11_ = FALSE;
701
 
                                        Number* _tmp12_;
702
 
                                        gboolean _tmp15_;
703
 
                                        gboolean _tmp18_;
 
701
                                        Number* _tmp12_ = NULL;
704
702
                                        _tmp8_ = c;
705
703
                                        _tmp9_ = currency_get_value (_tmp8_);
706
704
                                        value = _tmp9_;
708
706
                                        if (_tmp12_ == NULL) {
709
707
                                                _tmp11_ = TRUE;
710
708
                                        } else {
711
 
                                                Number* _tmp13_;
 
709
                                                Number* _tmp13_ = NULL;
712
710
                                                gboolean _tmp14_ = FALSE;
713
711
                                                _tmp13_ = value;
714
712
                                                _tmp14_ = number_is_negative (_tmp13_);
715
713
                                                _tmp11_ = _tmp14_;
716
714
                                        }
717
 
                                        _tmp15_ = _tmp11_;
718
 
                                        if (_tmp15_) {
 
715
                                        if (_tmp11_) {
719
716
                                                _tmp10_ = TRUE;
720
717
                                        } else {
721
 
                                                Number* _tmp16_;
722
 
                                                gboolean _tmp17_ = FALSE;
723
 
                                                _tmp16_ = value;
724
 
                                                _tmp17_ = number_is_zero (_tmp16_);
725
 
                                                _tmp10_ = _tmp17_;
 
718
                                                Number* _tmp15_ = NULL;
 
719
                                                gboolean _tmp16_ = FALSE;
 
720
                                                _tmp15_ = value;
 
721
                                                _tmp16_ = number_is_zero (_tmp15_);
 
722
                                                _tmp10_ = _tmp16_;
726
723
                                        }
727
 
                                        _tmp18_ = _tmp10_;
728
 
                                        if (_tmp18_) {
 
724
                                        if (_tmp10_) {
729
725
                                                result = NULL;
730
726
                                                _number_unref0 (value);
731
727
                                                _g_object_unref0 (c);
772
768
 
773
769
static Currency* currency_manager_add_currency (CurrencyManager* self, const gchar* short_name) {
774
770
        Currency* result = NULL;
775
 
        GList* _tmp0_;
776
 
        const gchar* _tmp8_;
777
 
        const gchar* _tmp9_;
778
 
        const gchar* _tmp10_;
779
 
        const gchar* _tmp11_;
780
 
        Currency* _tmp12_;
781
 
        Currency* c;
782
 
        Currency* _tmp13_;
783
 
        Currency* _tmp14_;
 
771
        GList* _tmp0_ = NULL;
 
772
        const gchar* _tmp8_ = NULL;
 
773
        Currency* c = NULL;
 
774
        const gchar* _tmp9_ = NULL;
 
775
        const gchar* _tmp10_ = NULL;
 
776
        const gchar* _tmp11_ = NULL;
 
777
        Currency* _tmp12_ = NULL;
 
778
        Currency* _tmp13_ = NULL;
 
779
        Currency* _tmp14_ = NULL;
784
780
        g_return_val_if_fail (self != NULL, NULL);
785
781
        g_return_val_if_fail (short_name != NULL, NULL);
786
782
        _tmp0_ = self->priv->currencies;
789
785
                GList* c_it = NULL;
790
786
                c_collection = _tmp0_;
791
787
                for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
792
 
                        Currency* _tmp1_;
 
788
                        Currency* _tmp1_ = NULL;
793
789
                        Currency* c = NULL;
794
790
                        _tmp1_ = _g_object_ref0 ((Currency*) c_it->data);
795
791
                        c = _tmp1_;
796
792
                        {
797
 
                                Currency* _tmp2_;
798
 
                                gchar* _tmp3_;
799
 
                                gchar* _tmp4_;
800
 
                                gchar* _tmp5_;
801
 
                                const gchar* _tmp6_;
802
 
                                gboolean _tmp7_;
 
793
                                Currency* _tmp2_ = NULL;
 
794
                                gchar* _tmp3_ = NULL;
 
795
                                gchar* _tmp4_ = NULL;
 
796
                                gchar* _tmp5_ = NULL;
 
797
                                const gchar* _tmp6_ = NULL;
 
798
                                gboolean _tmp7_ = FALSE;
803
799
                                _tmp2_ = c;
804
800
                                _tmp3_ = currency_get_name (_tmp2_);
805
801
                                _tmp4_ = _tmp3_;
832
828
 
833
829
static gboolean currency_manager_file_needs_update (CurrencyManager* self, const gchar* filename, gdouble max_age) {
834
830
        gboolean result = FALSE;
835
 
        const gchar* _tmp0_;
 
831
        const gchar* _tmp0_ = NULL;
836
832
        gboolean _tmp1_ = FALSE;
837
833
        struct stat buf = {0};
838
 
        const gchar* _tmp2_;
 
834
        const gchar* _tmp2_ = NULL;
839
835
        struct stat _tmp3_ = {0};
840
836
        gint _tmp4_ = 0;
841
 
        struct stat _tmp5_;
842
 
        time_t _tmp6_;
843
 
        time_t modify_time;
844
 
        time_t _tmp7_;
845
 
        time_t now;
846
 
        time_t _tmp8_;
847
 
        time_t _tmp9_;
848
 
        gdouble _tmp10_;
 
837
        time_t modify_time = 0;
 
838
        struct stat _tmp5_ = {0};
 
839
        time_t _tmp6_ = 0;
 
840
        time_t now = 0;
 
841
        time_t _tmp7_ = 0;
 
842
        time_t _tmp8_ = 0;
 
843
        time_t _tmp9_ = 0;
 
844
        gdouble _tmp10_ = 0.0;
849
845
        g_return_val_if_fail (self != NULL, FALSE);
850
846
        g_return_val_if_fail (filename != NULL, FALSE);
851
847
        _tmp0_ = filename;
886
882
 
887
883
static gchar* string_chug (const gchar* self) {
888
884
        gchar* result = NULL;
 
885
        gchar* _result_ = NULL;
889
886
        gchar* _tmp0_ = NULL;
890
 
        gchar* _result_;
891
 
        const gchar* _tmp1_;
 
887
        const gchar* _tmp1_ = NULL;
892
888
        g_return_val_if_fail (self != NULL, NULL);
893
889
        _tmp0_ = g_strdup (self);
894
890
        _result_ = _tmp0_;
900
896
 
901
897
 
902
898
static void currency_manager_load_imf_rates (CurrencyManager* self) {
903
 
        GHashFunc _tmp0_;
904
 
        GEqualFunc _tmp1_;
905
 
        GHashTable* _tmp2_;
906
 
        GHashTable* name_map;
907
 
        GHashTable* _tmp3_;
908
 
        gchar* _tmp4_;
909
 
        gchar* _tmp5_;
910
 
        GHashTable* _tmp6_;
911
 
        gchar* _tmp7_;
912
 
        gchar* _tmp8_;
913
 
        GHashTable* _tmp9_;
914
 
        gchar* _tmp10_;
915
 
        gchar* _tmp11_;
916
 
        GHashTable* _tmp12_;
917
 
        gchar* _tmp13_;
918
 
        gchar* _tmp14_;
919
 
        GHashTable* _tmp15_;
920
 
        gchar* _tmp16_;
921
 
        gchar* _tmp17_;
922
 
        GHashTable* _tmp18_;
923
 
        gchar* _tmp19_;
924
 
        gchar* _tmp20_;
925
 
        GHashTable* _tmp21_;
926
 
        gchar* _tmp22_;
927
 
        gchar* _tmp23_;
928
 
        GHashTable* _tmp24_;
929
 
        gchar* _tmp25_;
930
 
        gchar* _tmp26_;
931
 
        GHashTable* _tmp27_;
932
 
        gchar* _tmp28_;
933
 
        gchar* _tmp29_;
934
 
        GHashTable* _tmp30_;
935
 
        gchar* _tmp31_;
936
 
        gchar* _tmp32_;
937
 
        GHashTable* _tmp33_;
938
 
        gchar* _tmp34_;
939
 
        gchar* _tmp35_;
940
 
        GHashTable* _tmp36_;
941
 
        gchar* _tmp37_;
942
 
        gchar* _tmp38_;
943
 
        GHashTable* _tmp39_;
944
 
        gchar* _tmp40_;
945
 
        gchar* _tmp41_;
946
 
        GHashTable* _tmp42_;
947
 
        gchar* _tmp43_;
948
 
        gchar* _tmp44_;
949
 
        GHashTable* _tmp45_;
950
 
        gchar* _tmp46_;
951
 
        gchar* _tmp47_;
952
 
        GHashTable* _tmp48_;
953
 
        gchar* _tmp49_;
954
 
        gchar* _tmp50_;
955
 
        GHashTable* _tmp51_;
956
 
        gchar* _tmp52_;
957
 
        gchar* _tmp53_;
958
 
        GHashTable* _tmp54_;
959
 
        gchar* _tmp55_;
960
 
        gchar* _tmp56_;
961
 
        GHashTable* _tmp57_;
962
 
        gchar* _tmp58_;
963
 
        gchar* _tmp59_;
964
 
        GHashTable* _tmp60_;
965
 
        gchar* _tmp61_;
966
 
        gchar* _tmp62_;
967
 
        GHashTable* _tmp63_;
968
 
        gchar* _tmp64_;
969
 
        gchar* _tmp65_;
970
 
        GHashTable* _tmp66_;
971
 
        gchar* _tmp67_;
972
 
        gchar* _tmp68_;
973
 
        GHashTable* _tmp69_;
974
 
        gchar* _tmp70_;
975
 
        gchar* _tmp71_;
976
 
        GHashTable* _tmp72_;
977
 
        gchar* _tmp73_;
978
 
        gchar* _tmp74_;
979
 
        GHashTable* _tmp75_;
980
 
        gchar* _tmp76_;
981
 
        gchar* _tmp77_;
982
 
        GHashTable* _tmp78_;
983
 
        gchar* _tmp79_;
984
 
        gchar* _tmp80_;
985
 
        GHashTable* _tmp81_;
986
 
        gchar* _tmp82_;
987
 
        gchar* _tmp83_;
988
 
        GHashTable* _tmp84_;
989
 
        gchar* _tmp85_;
990
 
        gchar* _tmp86_;
991
 
        GHashTable* _tmp87_;
992
 
        gchar* _tmp88_;
993
 
        gchar* _tmp89_;
994
 
        GHashTable* _tmp90_;
995
 
        gchar* _tmp91_;
996
 
        gchar* _tmp92_;
997
 
        GHashTable* _tmp93_;
998
 
        gchar* _tmp94_;
999
 
        gchar* _tmp95_;
1000
 
        GHashTable* _tmp96_;
1001
 
        gchar* _tmp97_;
1002
 
        gchar* _tmp98_;
1003
 
        GHashTable* _tmp99_;
1004
 
        gchar* _tmp100_;
1005
 
        gchar* _tmp101_;
1006
 
        GHashTable* _tmp102_;
1007
 
        gchar* _tmp103_;
1008
 
        gchar* _tmp104_;
1009
 
        GHashTable* _tmp105_;
1010
 
        gchar* _tmp106_;
1011
 
        gchar* _tmp107_;
1012
 
        GHashTable* _tmp108_;
1013
 
        gchar* _tmp109_;
1014
 
        gchar* _tmp110_;
1015
 
        GHashTable* _tmp111_;
1016
 
        gchar* _tmp112_;
1017
 
        gchar* _tmp113_;
1018
 
        GHashTable* _tmp114_;
1019
 
        gchar* _tmp115_;
1020
 
        gchar* _tmp116_;
1021
 
        GHashTable* _tmp117_;
1022
 
        gchar* _tmp118_;
1023
 
        gchar* _tmp119_;
1024
 
        GHashTable* _tmp120_;
1025
 
        gchar* _tmp121_;
1026
 
        gchar* _tmp122_;
1027
 
        GHashTable* _tmp123_;
1028
 
        gchar* _tmp124_;
1029
 
        gchar* _tmp125_;
1030
 
        GHashTable* _tmp126_;
1031
 
        gchar* _tmp127_;
1032
 
        gchar* _tmp128_;
1033
 
        GHashTable* _tmp129_;
1034
 
        gchar* _tmp130_;
1035
 
        gchar* _tmp131_;
1036
 
        GHashTable* _tmp132_;
1037
 
        gchar* _tmp133_;
1038
 
        gchar* _tmp134_;
1039
 
        GHashTable* _tmp135_;
1040
 
        gchar* _tmp136_;
1041
 
        gchar* _tmp137_;
1042
 
        GHashTable* _tmp138_;
1043
 
        gchar* _tmp139_;
1044
 
        gchar* _tmp140_;
1045
 
        GHashTable* _tmp141_;
1046
 
        gchar* _tmp142_;
1047
 
        gchar* _tmp143_;
1048
 
        GHashTable* _tmp144_;
1049
 
        gchar* _tmp145_;
1050
 
        gchar* _tmp146_;
1051
 
        GHashTable* _tmp147_;
1052
 
        gchar* _tmp148_;
1053
 
        gchar* _tmp149_;
1054
 
        GHashTable* _tmp150_;
1055
 
        gchar* _tmp151_;
1056
 
        gchar* _tmp152_;
1057
 
        GHashTable* _tmp153_;
1058
 
        gchar* _tmp154_;
1059
 
        gchar* _tmp155_;
 
899
        GHashTable* name_map = NULL;
 
900
        GHashFunc _tmp0_ = NULL;
 
901
        GEqualFunc _tmp1_ = NULL;
 
902
        GHashTable* _tmp2_ = NULL;
 
903
        GHashTable* _tmp3_ = NULL;
 
904
        gchar* _tmp4_ = NULL;
 
905
        gchar* _tmp5_ = NULL;
 
906
        GHashTable* _tmp6_ = NULL;
 
907
        gchar* _tmp7_ = NULL;
 
908
        gchar* _tmp8_ = NULL;
 
909
        GHashTable* _tmp9_ = NULL;
 
910
        gchar* _tmp10_ = NULL;
 
911
        gchar* _tmp11_ = NULL;
 
912
        GHashTable* _tmp12_ = NULL;
 
913
        gchar* _tmp13_ = NULL;
 
914
        gchar* _tmp14_ = NULL;
 
915
        GHashTable* _tmp15_ = NULL;
 
916
        gchar* _tmp16_ = NULL;
 
917
        gchar* _tmp17_ = NULL;
 
918
        GHashTable* _tmp18_ = NULL;
 
919
        gchar* _tmp19_ = NULL;
 
920
        gchar* _tmp20_ = NULL;
 
921
        GHashTable* _tmp21_ = NULL;
 
922
        gchar* _tmp22_ = NULL;
 
923
        gchar* _tmp23_ = NULL;
 
924
        GHashTable* _tmp24_ = NULL;
 
925
        gchar* _tmp25_ = NULL;
 
926
        gchar* _tmp26_ = NULL;
 
927
        GHashTable* _tmp27_ = NULL;
 
928
        gchar* _tmp28_ = NULL;
 
929
        gchar* _tmp29_ = NULL;
 
930
        GHashTable* _tmp30_ = NULL;
 
931
        gchar* _tmp31_ = NULL;
 
932
        gchar* _tmp32_ = NULL;
 
933
        GHashTable* _tmp33_ = NULL;
 
934
        gchar* _tmp34_ = NULL;
 
935
        gchar* _tmp35_ = NULL;
 
936
        GHashTable* _tmp36_ = NULL;
 
937
        gchar* _tmp37_ = NULL;
 
938
        gchar* _tmp38_ = NULL;
 
939
        GHashTable* _tmp39_ = NULL;
 
940
        gchar* _tmp40_ = NULL;
 
941
        gchar* _tmp41_ = NULL;
 
942
        GHashTable* _tmp42_ = NULL;
 
943
        gchar* _tmp43_ = NULL;
 
944
        gchar* _tmp44_ = NULL;
 
945
        GHashTable* _tmp45_ = NULL;
 
946
        gchar* _tmp46_ = NULL;
 
947
        gchar* _tmp47_ = NULL;
 
948
        GHashTable* _tmp48_ = NULL;
 
949
        gchar* _tmp49_ = NULL;
 
950
        gchar* _tmp50_ = NULL;
 
951
        GHashTable* _tmp51_ = NULL;
 
952
        gchar* _tmp52_ = NULL;
 
953
        gchar* _tmp53_ = NULL;
 
954
        GHashTable* _tmp54_ = NULL;
 
955
        gchar* _tmp55_ = NULL;
 
956
        gchar* _tmp56_ = NULL;
 
957
        GHashTable* _tmp57_ = NULL;
 
958
        gchar* _tmp58_ = NULL;
 
959
        gchar* _tmp59_ = NULL;
 
960
        GHashTable* _tmp60_ = NULL;
 
961
        gchar* _tmp61_ = NULL;
 
962
        gchar* _tmp62_ = NULL;
 
963
        GHashTable* _tmp63_ = NULL;
 
964
        gchar* _tmp64_ = NULL;
 
965
        gchar* _tmp65_ = NULL;
 
966
        GHashTable* _tmp66_ = NULL;
 
967
        gchar* _tmp67_ = NULL;
 
968
        gchar* _tmp68_ = NULL;
 
969
        GHashTable* _tmp69_ = NULL;
 
970
        gchar* _tmp70_ = NULL;
 
971
        gchar* _tmp71_ = NULL;
 
972
        GHashTable* _tmp72_ = NULL;
 
973
        gchar* _tmp73_ = NULL;
 
974
        gchar* _tmp74_ = NULL;
 
975
        GHashTable* _tmp75_ = NULL;
 
976
        gchar* _tmp76_ = NULL;
 
977
        gchar* _tmp77_ = NULL;
 
978
        GHashTable* _tmp78_ = NULL;
 
979
        gchar* _tmp79_ = NULL;
 
980
        gchar* _tmp80_ = NULL;
 
981
        GHashTable* _tmp81_ = NULL;
 
982
        gchar* _tmp82_ = NULL;
 
983
        gchar* _tmp83_ = NULL;
 
984
        GHashTable* _tmp84_ = NULL;
 
985
        gchar* _tmp85_ = NULL;
 
986
        gchar* _tmp86_ = NULL;
 
987
        GHashTable* _tmp87_ = NULL;
 
988
        gchar* _tmp88_ = NULL;
 
989
        gchar* _tmp89_ = NULL;
 
990
        GHashTable* _tmp90_ = NULL;
 
991
        gchar* _tmp91_ = NULL;
 
992
        gchar* _tmp92_ = NULL;
 
993
        GHashTable* _tmp93_ = NULL;
 
994
        gchar* _tmp94_ = NULL;
 
995
        gchar* _tmp95_ = NULL;
 
996
        GHashTable* _tmp96_ = NULL;
 
997
        gchar* _tmp97_ = NULL;
 
998
        gchar* _tmp98_ = NULL;
 
999
        GHashTable* _tmp99_ = NULL;
 
1000
        gchar* _tmp100_ = NULL;
 
1001
        gchar* _tmp101_ = NULL;
 
1002
        GHashTable* _tmp102_ = NULL;
 
1003
        gchar* _tmp103_ = NULL;
 
1004
        gchar* _tmp104_ = NULL;
 
1005
        GHashTable* _tmp105_ = NULL;
 
1006
        gchar* _tmp106_ = NULL;
 
1007
        gchar* _tmp107_ = NULL;
 
1008
        GHashTable* _tmp108_ = NULL;
 
1009
        gchar* _tmp109_ = NULL;
 
1010
        gchar* _tmp110_ = NULL;
 
1011
        GHashTable* _tmp111_ = NULL;
 
1012
        gchar* _tmp112_ = NULL;
 
1013
        gchar* _tmp113_ = NULL;
 
1014
        GHashTable* _tmp114_ = NULL;
 
1015
        gchar* _tmp115_ = NULL;
 
1016
        gchar* _tmp116_ = NULL;
 
1017
        GHashTable* _tmp117_ = NULL;
 
1018
        gchar* _tmp118_ = NULL;
 
1019
        gchar* _tmp119_ = NULL;
 
1020
        GHashTable* _tmp120_ = NULL;
 
1021
        gchar* _tmp121_ = NULL;
 
1022
        gchar* _tmp122_ = NULL;
 
1023
        GHashTable* _tmp123_ = NULL;
 
1024
        gchar* _tmp124_ = NULL;
 
1025
        gchar* _tmp125_ = NULL;
 
1026
        GHashTable* _tmp126_ = NULL;
 
1027
        gchar* _tmp127_ = NULL;
 
1028
        gchar* _tmp128_ = NULL;
 
1029
        GHashTable* _tmp129_ = NULL;
 
1030
        gchar* _tmp130_ = NULL;
 
1031
        gchar* _tmp131_ = NULL;
 
1032
        GHashTable* _tmp132_ = NULL;
 
1033
        gchar* _tmp133_ = NULL;
 
1034
        gchar* _tmp134_ = NULL;
 
1035
        GHashTable* _tmp135_ = NULL;
 
1036
        gchar* _tmp136_ = NULL;
 
1037
        gchar* _tmp137_ = NULL;
 
1038
        GHashTable* _tmp138_ = NULL;
 
1039
        gchar* _tmp139_ = NULL;
 
1040
        gchar* _tmp140_ = NULL;
 
1041
        GHashTable* _tmp141_ = NULL;
 
1042
        gchar* _tmp142_ = NULL;
 
1043
        gchar* _tmp143_ = NULL;
 
1044
        GHashTable* _tmp144_ = NULL;
 
1045
        gchar* _tmp145_ = NULL;
 
1046
        gchar* _tmp146_ = NULL;
 
1047
        GHashTable* _tmp147_ = NULL;
 
1048
        gchar* _tmp148_ = NULL;
 
1049
        gchar* _tmp149_ = NULL;
 
1050
        GHashTable* _tmp150_ = NULL;
 
1051
        gchar* _tmp151_ = NULL;
 
1052
        gchar* _tmp152_ = NULL;
 
1053
        GHashTable* _tmp153_ = NULL;
 
1054
        gchar* _tmp154_ = NULL;
 
1055
        gchar* _tmp155_ = NULL;
 
1056
        gchar* filename = NULL;
1060
1057
        gchar* _tmp156_ = NULL;
1061
 
        gchar* filename;
1062
1058
        gchar* data = NULL;
1063
 
        const gchar* _tmp161_;
1064
 
        gchar** _tmp162_;
 
1059
        gchar** lines = NULL;
 
1060
        const gchar* _tmp161_ = NULL;
 
1061
        gchar** _tmp162_ = NULL;
1065
1062
        gchar** _tmp163_ = NULL;
1066
 
        gchar** lines;
1067
 
        gint lines_length1;
1068
 
        gint _lines_size_;
1069
 
        gboolean in_data;
1070
 
        gchar** _tmp164_;
1071
 
        gint _tmp164__length1;
 
1063
        gint lines_length1 = 0;
 
1064
        gint _lines_size_ = 0;
 
1065
        gboolean in_data = FALSE;
 
1066
        gchar** _tmp164_ = NULL;
 
1067
        gint _tmp164__length1 = 0;
1072
1068
        GError * _inner_error_ = NULL;
1073
1069
        g_return_if_fail (self != NULL);
1074
1070
        _tmp0_ = g_str_hash;
1282
1278
        _tmp156_ = currency_manager_get_imf_rate_filepath (self);
1283
1279
        filename = _tmp156_;
1284
1280
        {
1285
 
                const gchar* _tmp157_;
 
1281
                const gchar* _tmp157_ = NULL;
1286
1282
                gchar* _tmp158_ = NULL;
1287
1283
                _tmp157_ = filename;
1288
1284
                g_file_get_contents (_tmp157_, &_tmp158_, NULL, &_inner_error_);
1289
1285
                _g_free0 (data);
1290
1286
                data = _tmp158_;
1291
1287
                if (_inner_error_ != NULL) {
1292
 
                        goto __catch1_g_error;
 
1288
                        goto __catch4_g_error;
1293
1289
                }
1294
1290
        }
1295
 
        goto __finally1;
1296
 
        __catch1_g_error:
 
1291
        goto __finally4;
 
1292
        __catch4_g_error:
1297
1293
        {
1298
1294
                GError* e = NULL;
1299
 
                GError* _tmp159_;
1300
 
                const gchar* _tmp160_;
 
1295
                GError* _tmp159_ = NULL;
 
1296
                const gchar* _tmp160_ = NULL;
1301
1297
                e = _inner_error_;
1302
1298
                _inner_error_ = NULL;
1303
1299
                _tmp159_ = e;
1309
1305
                _g_hash_table_unref0 (name_map);
1310
1306
                return;
1311
1307
        }
1312
 
        __finally1:
 
1308
        __finally4:
1313
1309
        if (_inner_error_ != NULL) {
1314
1310
                _g_free0 (data);
1315
1311
                _g_free0 (filename);
1334
1330
                line_collection = _tmp164_;
1335
1331
                line_collection_length1 = _tmp164__length1;
1336
1332
                for (line_it = 0; line_it < _tmp164__length1; line_it = line_it + 1) {
1337
 
                        gchar* _tmp165_;
 
1333
                        gchar* _tmp165_ = NULL;
1338
1334
                        gchar* line = NULL;
1339
1335
                        _tmp165_ = g_strdup (line_collection[line_it]);
1340
1336
                        line = _tmp165_;
1341
1337
                        {
1342
 
                                const gchar* _tmp166_;
 
1338
                                const gchar* _tmp166_ = NULL;
1343
1339
                                gchar* _tmp167_ = NULL;
1344
 
                                const gchar* _tmp168_;
1345
 
                                gboolean _tmp170_;
1346
 
                                const gchar* _tmp171_;
1347
 
                                gchar** _tmp172_;
 
1340
                                const gchar* _tmp168_ = NULL;
 
1341
                                gboolean _tmp170_ = FALSE;
 
1342
                                gchar** tokens = NULL;
 
1343
                                const gchar* _tmp171_ = NULL;
 
1344
                                gchar** _tmp172_ = NULL;
1348
1345
                                gchar** _tmp173_ = NULL;
1349
 
                                gchar** tokens;
1350
 
                                gint tokens_length1;
1351
 
                                gint _tokens_size_;
1352
 
                                gchar** _tmp174_;
1353
 
                                gint _tmp174__length1;
1354
 
                                const gchar* _tmp175_;
 
1346
                                gint tokens_length1 = 0;
 
1347
                                gint _tokens_size_ = 0;
 
1348
                                gchar** _tmp174_ = NULL;
 
1349
                                gint _tmp174__length1 = 0;
 
1350
                                const gchar* _tmp175_ = NULL;
1355
1351
                                _tmp166_ = line;
1356
1352
                                _tmp167_ = string_chug (_tmp166_);
1357
1353
                                _g_free0 (line);
1358
1354
                                line = _tmp167_;
1359
1355
                                _tmp168_ = line;
1360
1356
                                if (g_strcmp0 (_tmp168_, "") == 0) {
1361
 
                                        gboolean _tmp169_;
 
1357
                                        gboolean _tmp169_ = FALSE;
1362
1358
                                        _tmp169_ = in_data;
1363
1359
                                        if (!_tmp169_) {
1364
1360
                                                in_data = TRUE;
1384
1380
                                _tmp175_ = _tmp174_[0];
1385
1381
                                if (g_strcmp0 (_tmp175_, "Currency") != 0) {
1386
1382
                                        gint value_index = 0;
1387
 
                                        gint _tmp186_;
1388
 
                                        gchar** _tmp187_;
1389
 
                                        gint _tmp187__length1;
 
1383
                                        gint _tmp185_ = 0;
 
1384
                                        gchar** _tmp186_ = NULL;
 
1385
                                        gint _tmp186__length1 = 0;
1390
1386
                                        {
1391
 
                                                gboolean _tmp176_;
 
1387
                                                gboolean _tmp176_ = FALSE;
1392
1388
                                                value_index = 1;
1393
1389
                                                _tmp176_ = TRUE;
1394
1390
                                                while (TRUE) {
1395
 
                                                        gboolean _tmp177_;
1396
 
                                                        gint _tmp179_;
1397
 
                                                        gchar** _tmp180_;
1398
 
                                                        gint _tmp180__length1;
1399
 
                                                        gchar** _tmp181_;
1400
 
                                                        gint _tmp181__length1;
1401
 
                                                        gint _tmp182_;
1402
 
                                                        const gchar* _tmp183_;
1403
 
                                                        gchar* _tmp184_ = NULL;
1404
 
                                                        gchar* value;
1405
 
                                                        const gchar* _tmp185_;
1406
 
                                                        _tmp177_ = _tmp176_;
1407
 
                                                        if (!_tmp177_) {
1408
 
                                                                gint _tmp178_;
1409
 
                                                                _tmp178_ = value_index;
1410
 
                                                                value_index = _tmp178_ + 1;
 
1391
                                                        gint _tmp178_ = 0;
 
1392
                                                        gchar** _tmp179_ = NULL;
 
1393
                                                        gint _tmp179__length1 = 0;
 
1394
                                                        gchar* value = NULL;
 
1395
                                                        gchar** _tmp180_ = NULL;
 
1396
                                                        gint _tmp180__length1 = 0;
 
1397
                                                        gint _tmp181_ = 0;
 
1398
                                                        const gchar* _tmp182_ = NULL;
 
1399
                                                        gchar* _tmp183_ = NULL;
 
1400
                                                        const gchar* _tmp184_ = NULL;
 
1401
                                                        if (!_tmp176_) {
 
1402
                                                                gint _tmp177_ = 0;
 
1403
                                                                _tmp177_ = value_index;
 
1404
                                                                value_index = _tmp177_ + 1;
1411
1405
                                                        }
1412
1406
                                                        _tmp176_ = FALSE;
1413
 
                                                        _tmp179_ = value_index;
 
1407
                                                        _tmp178_ = value_index;
 
1408
                                                        _tmp179_ = tokens;
 
1409
                                                        _tmp179__length1 = tokens_length1;
 
1410
                                                        if (!(_tmp178_ < _tmp179__length1)) {
 
1411
                                                                break;
 
1412
                                                        }
1414
1413
                                                        _tmp180_ = tokens;
1415
1414
                                                        _tmp180__length1 = tokens_length1;
1416
 
                                                        if (!(_tmp179_ < _tmp180__length1)) {
1417
 
                                                                break;
1418
 
                                                        }
1419
 
                                                        _tmp181_ = tokens;
1420
 
                                                        _tmp181__length1 = tokens_length1;
1421
 
                                                        _tmp182_ = value_index;
1422
 
                                                        _tmp183_ = _tmp181_[_tmp182_];
1423
 
                                                        _tmp184_ = string_chug (_tmp183_);
1424
 
                                                        value = _tmp184_;
1425
 
                                                        _tmp185_ = value;
1426
 
                                                        if (g_strcmp0 (_tmp185_, "") != 0) {
 
1415
                                                        _tmp181_ = value_index;
 
1416
                                                        _tmp182_ = _tmp180_[_tmp181_];
 
1417
                                                        _tmp183_ = string_chug (_tmp182_);
 
1418
                                                        value = _tmp183_;
 
1419
                                                        _tmp184_ = value;
 
1420
                                                        if (g_strcmp0 (_tmp184_, "") != 0) {
1427
1421
                                                                _g_free0 (value);
1428
1422
                                                                break;
1429
1423
                                                        }
1430
1424
                                                        _g_free0 (value);
1431
1425
                                                }
1432
1426
                                        }
1433
 
                                        _tmp186_ = value_index;
1434
 
                                        _tmp187_ = tokens;
1435
 
                                        _tmp187__length1 = tokens_length1;
1436
 
                                        if (_tmp186_ < _tmp187__length1) {
1437
 
                                                GHashTable* _tmp188_;
1438
 
                                                gchar** _tmp189_;
1439
 
                                                gint _tmp189__length1;
1440
 
                                                const gchar* _tmp190_;
1441
 
                                                gconstpointer _tmp191_ = NULL;
1442
 
                                                gchar* _tmp192_;
1443
 
                                                gchar* symbol;
1444
 
                                                const gchar* _tmp193_;
1445
 
                                                _tmp188_ = name_map;
1446
 
                                                _tmp189_ = tokens;
1447
 
                                                _tmp189__length1 = tokens_length1;
1448
 
                                                _tmp190_ = _tmp189_[0];
1449
 
                                                _tmp191_ = g_hash_table_lookup (_tmp188_, _tmp190_);
1450
 
                                                _tmp192_ = g_strdup ((const gchar*) _tmp191_);
1451
 
                                                symbol = _tmp192_;
1452
 
                                                _tmp193_ = symbol;
1453
 
                                                if (_tmp193_ != NULL) {
1454
 
                                                        const gchar* _tmp194_;
 
1427
                                        _tmp185_ = value_index;
 
1428
                                        _tmp186_ = tokens;
 
1429
                                        _tmp186__length1 = tokens_length1;
 
1430
                                        if (_tmp185_ < _tmp186__length1) {
 
1431
                                                gchar* symbol = NULL;
 
1432
                                                GHashTable* _tmp187_ = NULL;
 
1433
                                                gchar** _tmp188_ = NULL;
 
1434
                                                gint _tmp188__length1 = 0;
 
1435
                                                const gchar* _tmp189_ = NULL;
 
1436
                                                gconstpointer _tmp190_ = NULL;
 
1437
                                                gchar* _tmp191_ = NULL;
 
1438
                                                const gchar* _tmp192_ = NULL;
 
1439
                                                _tmp187_ = name_map;
 
1440
                                                _tmp188_ = tokens;
 
1441
                                                _tmp188__length1 = tokens_length1;
 
1442
                                                _tmp189_ = _tmp188_[0];
 
1443
                                                _tmp190_ = g_hash_table_lookup (_tmp187_, _tmp189_);
 
1444
                                                _tmp191_ = g_strdup ((const gchar*) _tmp190_);
 
1445
                                                symbol = _tmp191_;
 
1446
                                                _tmp192_ = symbol;
 
1447
                                                if (_tmp192_ != NULL) {
 
1448
                                                        Currency* c = NULL;
 
1449
                                                        const gchar* _tmp193_ = NULL;
 
1450
                                                        Currency* _tmp194_ = NULL;
1455
1451
                                                        Currency* _tmp195_ = NULL;
1456
 
                                                        Currency* c;
1457
 
                                                        Currency* _tmp196_;
1458
 
                                                        gchar** _tmp203_;
1459
 
                                                        gint _tmp203__length1;
1460
 
                                                        gint _tmp204_;
1461
 
                                                        const gchar* _tmp205_;
 
1452
                                                        Number* value = NULL;
 
1453
                                                        gchar** _tmp202_ = NULL;
 
1454
                                                        gint _tmp202__length1 = 0;
 
1455
                                                        gint _tmp203_ = 0;
 
1456
                                                        const gchar* _tmp204_ = NULL;
 
1457
                                                        Number* _tmp205_ = NULL;
1462
1458
                                                        Number* _tmp206_ = NULL;
1463
 
                                                        Number* value;
1464
 
                                                        Number* _tmp207_;
1465
 
                                                        Number* _tmp208_ = NULL;
1466
 
                                                        Currency* _tmp209_;
1467
 
                                                        Number* _tmp210_;
1468
 
                                                        _tmp194_ = symbol;
1469
 
                                                        _tmp195_ = currency_manager_get_currency (self, _tmp194_);
1470
 
                                                        c = _tmp195_;
1471
 
                                                        _tmp196_ = c;
1472
 
                                                        if (_tmp196_ == NULL) {
1473
 
                                                                gchar** _tmp197_;
1474
 
                                                                gint _tmp197__length1;
1475
 
                                                                gint _tmp198_;
1476
 
                                                                const gchar* _tmp199_;
1477
 
                                                                const gchar* _tmp200_;
1478
 
                                                                const gchar* _tmp201_;
1479
 
                                                                Currency* _tmp202_ = NULL;
1480
 
                                                                _tmp197_ = tokens;
1481
 
                                                                _tmp197__length1 = tokens_length1;
1482
 
                                                                _tmp198_ = value_index;
1483
 
                                                                _tmp199_ = _tmp197_[_tmp198_];
 
1459
                                                        Number* _tmp207_ = NULL;
 
1460
                                                        Currency* _tmp208_ = NULL;
 
1461
                                                        Number* _tmp209_ = NULL;
 
1462
                                                        _tmp193_ = symbol;
 
1463
                                                        _tmp194_ = currency_manager_get_currency (self, _tmp193_);
 
1464
                                                        c = _tmp194_;
 
1465
                                                        _tmp195_ = c;
 
1466
                                                        if (_tmp195_ == NULL) {
 
1467
                                                                gchar** _tmp196_ = NULL;
 
1468
                                                                gint _tmp196__length1 = 0;
 
1469
                                                                gint _tmp197_ = 0;
 
1470
                                                                const gchar* _tmp198_ = NULL;
 
1471
                                                                const gchar* _tmp199_ = NULL;
 
1472
                                                                const gchar* _tmp200_ = NULL;
 
1473
                                                                Currency* _tmp201_ = NULL;
 
1474
                                                                _tmp196_ = tokens;
 
1475
                                                                _tmp196__length1 = tokens_length1;
 
1476
                                                                _tmp197_ = value_index;
 
1477
                                                                _tmp198_ = _tmp196_[_tmp197_];
 
1478
                                                                _tmp199_ = symbol;
 
1479
                                                                g_debug ("currency.vala:267: Using IMF rate of %s for %s", _tmp198_, _tmp199_);
1484
1480
                                                                _tmp200_ = symbol;
1485
 
                                                                g_debug ("currency.vala:267: Using IMF rate of %s for %s", _tmp199_, _tmp200_);
1486
 
                                                                _tmp201_ = symbol;
1487
 
                                                                _tmp202_ = currency_manager_add_currency (self, _tmp201_);
 
1481
                                                                _tmp201_ = currency_manager_add_currency (self, _tmp200_);
1488
1482
                                                                _g_object_unref0 (c);
1489
 
                                                                c = _tmp202_;
 
1483
                                                                c = _tmp201_;
1490
1484
                                                        }
1491
 
                                                        _tmp203_ = tokens;
1492
 
                                                        _tmp203__length1 = tokens_length1;
1493
 
                                                        _tmp204_ = value_index;
1494
 
                                                        _tmp205_ = _tmp203_[_tmp204_];
1495
 
                                                        _tmp206_ = mp_set_from_string (_tmp205_, 10);
1496
 
                                                        value = _tmp206_;
1497
 
                                                        _tmp207_ = value;
1498
 
                                                        _tmp208_ = number_reciprocal (_tmp207_);
 
1485
                                                        _tmp202_ = tokens;
 
1486
                                                        _tmp202__length1 = tokens_length1;
 
1487
                                                        _tmp203_ = value_index;
 
1488
                                                        _tmp204_ = _tmp202_[_tmp203_];
 
1489
                                                        _tmp205_ = mp_set_from_string (_tmp204_, 10);
 
1490
                                                        value = _tmp205_;
 
1491
                                                        _tmp206_ = value;
 
1492
                                                        _tmp207_ = number_reciprocal (_tmp206_);
1499
1493
                                                        _number_unref0 (value);
1500
 
                                                        value = _tmp208_;
1501
 
                                                        _tmp209_ = c;
1502
 
                                                        _tmp210_ = value;
1503
 
                                                        currency_set_value (_tmp209_, _tmp210_);
 
1494
                                                        value = _tmp207_;
 
1495
                                                        _tmp208_ = c;
 
1496
                                                        _tmp209_ = value;
 
1497
                                                        currency_set_value (_tmp208_, _tmp209_);
1504
1498
                                                        _number_unref0 (value);
1505
1499
                                                        _g_object_unref0 (c);
1506
1500
                                                } else {
1507
 
                                                        gchar** _tmp211_;
1508
 
                                                        gint _tmp211__length1;
1509
 
                                                        const gchar* _tmp212_;
1510
 
                                                        _tmp211_ = tokens;
1511
 
                                                        _tmp211__length1 = tokens_length1;
1512
 
                                                        _tmp212_ = _tmp211_[0];
1513
 
                                                        g_warning ("currency.vala:275: Unknown currency '%s'", _tmp212_);
 
1501
                                                        gchar** _tmp210_ = NULL;
 
1502
                                                        gint _tmp210__length1 = 0;
 
1503
                                                        const gchar* _tmp211_ = NULL;
 
1504
                                                        _tmp210_ = tokens;
 
1505
                                                        _tmp210__length1 = tokens_length1;
 
1506
                                                        _tmp211_ = _tmp210_[0];
 
1507
                                                        g_warning ("currency.vala:275: Unknown currency '%s'", _tmp211_);
1514
1508
                                                }
1515
1509
                                                _g_free0 (symbol);
1516
1510
                                        }
1528
1522
 
1529
1523
 
1530
1524
static void currency_manager_set_ecb_rate (CurrencyManager* self, xmlNode* node, Currency* eur_rate) {
1531
 
        gchar* name;
1532
 
        gchar* value;
 
1525
        gchar* name = NULL;
 
1526
        gchar* value = NULL;
 
1527
        gboolean _tmp15_ = FALSE;
1533
1528
        gboolean _tmp16_ = FALSE;
1534
 
        gboolean _tmp17_ = FALSE;
1535
 
        const gchar* _tmp18_;
1536
 
        gboolean _tmp20_;
1537
 
        gboolean _tmp24_;
 
1529
        const gchar* _tmp17_ = NULL;
1538
1530
        g_return_if_fail (self != NULL);
1539
1531
        g_return_if_fail (node != NULL);
1540
1532
        g_return_if_fail (eur_rate != NULL);
1541
1533
        name = NULL;
1542
1534
        value = NULL;
1543
1535
        {
1544
 
                xmlNode* _tmp0_;
1545
 
                xmlAttr* _tmp1_;
1546
 
                xmlAttr* attribute;
 
1536
                xmlAttr* attribute = NULL;
 
1537
                xmlNode* _tmp0_ = NULL;
 
1538
                xmlAttr* _tmp1_ = NULL;
1547
1539
                _tmp0_ = node;
1548
1540
                _tmp1_ = _tmp0_->properties;
1549
1541
                attribute = _tmp1_;
1550
1542
                {
1551
 
                        gboolean _tmp2_;
 
1543
                        gboolean _tmp2_ = FALSE;
1552
1544
                        _tmp2_ = TRUE;
1553
1545
                        while (TRUE) {
1554
 
                                gboolean _tmp3_;
1555
 
                                xmlAttr* _tmp6_;
1556
 
                                xmlAttr* _tmp7_;
1557
 
                                xmlNode* n;
1558
 
                                xmlAttr* _tmp8_;
1559
 
                                const gchar* _tmp9_;
1560
 
                                _tmp3_ = _tmp2_;
1561
 
                                if (!_tmp3_) {
1562
 
                                        xmlAttr* _tmp4_;
1563
 
                                        xmlAttr* _tmp5_;
1564
 
                                        _tmp4_ = attribute;
1565
 
                                        _tmp5_ = _tmp4_->next;
1566
 
                                        attribute = _tmp5_;
 
1546
                                xmlAttr* _tmp5_ = NULL;
 
1547
                                xmlNode* n = NULL;
 
1548
                                xmlAttr* _tmp6_ = NULL;
 
1549
                                xmlAttr* _tmp7_ = NULL;
 
1550
                                const gchar* _tmp8_ = NULL;
 
1551
                                if (!_tmp2_) {
 
1552
                                        xmlAttr* _tmp3_ = NULL;
 
1553
                                        xmlAttr* _tmp4_ = NULL;
 
1554
                                        _tmp3_ = attribute;
 
1555
                                        _tmp4_ = _tmp3_->next;
 
1556
                                        attribute = _tmp4_;
1567
1557
                                }
1568
1558
                                _tmp2_ = FALSE;
 
1559
                                _tmp5_ = attribute;
 
1560
                                if (!(_tmp5_ != NULL)) {
 
1561
                                        break;
 
1562
                                }
1569
1563
                                _tmp6_ = attribute;
1570
 
                                if (!(_tmp6_ != NULL)) {
1571
 
                                        break;
1572
 
                                }
 
1564
                                n = (xmlNode*) _tmp6_;
1573
1565
                                _tmp7_ = attribute;
1574
 
                                n = (xmlNode*) _tmp7_;
1575
 
                                _tmp8_ = attribute;
1576
 
                                _tmp9_ = _tmp8_->name;
1577
 
                                if (g_strcmp0 (_tmp9_, "currency") == 0) {
1578
 
                                        xmlNode* _tmp10_;
1579
 
                                        gchar* _tmp11_ = NULL;
1580
 
                                        _tmp10_ = n;
1581
 
                                        _tmp11_ = xmlNodeGetContent (_tmp10_);
 
1566
                                _tmp8_ = _tmp7_->name;
 
1567
                                if (g_strcmp0 (_tmp8_, "currency") == 0) {
 
1568
                                        xmlNode* _tmp9_ = NULL;
 
1569
                                        gchar* _tmp10_ = NULL;
 
1570
                                        _tmp9_ = n;
 
1571
                                        _tmp10_ = (gchar*) xmlNodeGetContent (_tmp9_);
1582
1572
                                        _g_free0 (name);
1583
 
                                        name = _tmp11_;
 
1573
                                        name = _tmp10_;
1584
1574
                                } else {
1585
 
                                        xmlAttr* _tmp12_;
1586
 
                                        const gchar* _tmp13_;
1587
 
                                        _tmp12_ = attribute;
1588
 
                                        _tmp13_ = _tmp12_->name;
1589
 
                                        if (g_strcmp0 (_tmp13_, "rate") == 0) {
1590
 
                                                xmlNode* _tmp14_;
1591
 
                                                gchar* _tmp15_ = NULL;
1592
 
                                                _tmp14_ = n;
1593
 
                                                _tmp15_ = xmlNodeGetContent (_tmp14_);
 
1575
                                        xmlAttr* _tmp11_ = NULL;
 
1576
                                        const gchar* _tmp12_ = NULL;
 
1577
                                        _tmp11_ = attribute;
 
1578
                                        _tmp12_ = _tmp11_->name;
 
1579
                                        if (g_strcmp0 (_tmp12_, "rate") == 0) {
 
1580
                                                xmlNode* _tmp13_ = NULL;
 
1581
                                                gchar* _tmp14_ = NULL;
 
1582
                                                _tmp13_ = n;
 
1583
                                                _tmp14_ = (gchar*) xmlNodeGetContent (_tmp13_);
1594
1584
                                                _g_free0 (value);
1595
 
                                                value = _tmp15_;
 
1585
                                                value = _tmp14_;
1596
1586
                                        }
1597
1587
                                }
1598
1588
                        }
1599
1589
                }
1600
1590
        }
1601
 
        _tmp18_ = name;
1602
 
        if (_tmp18_ != NULL) {
1603
 
                const gchar* _tmp19_;
1604
 
                _tmp19_ = value;
1605
 
                _tmp17_ = _tmp19_ != NULL;
1606
 
        } else {
1607
 
                _tmp17_ = FALSE;
1608
 
        }
1609
 
        _tmp20_ = _tmp17_;
1610
 
        if (_tmp20_) {
1611
 
                const gchar* _tmp21_;
1612
 
                Currency* _tmp22_ = NULL;
1613
 
                Currency* _tmp23_;
1614
 
                _tmp21_ = name;
1615
 
                _tmp22_ = currency_manager_get_currency (self, _tmp21_);
1616
 
                _tmp23_ = _tmp22_;
1617
 
                _tmp16_ = _tmp23_ == NULL;
1618
 
                _g_object_unref0 (_tmp23_);
 
1591
        _tmp17_ = name;
 
1592
        if (_tmp17_ != NULL) {
 
1593
                const gchar* _tmp18_ = NULL;
 
1594
                _tmp18_ = value;
 
1595
                _tmp16_ = _tmp18_ != NULL;
1619
1596
        } else {
1620
1597
                _tmp16_ = FALSE;
1621
1598
        }
1622
 
        _tmp24_ = _tmp16_;
1623
 
        if (_tmp24_) {
1624
 
                const gchar* _tmp25_;
1625
 
                const gchar* _tmp26_;
1626
 
                const gchar* _tmp27_;
 
1599
        if (_tmp16_) {
 
1600
                const gchar* _tmp19_ = NULL;
 
1601
                Currency* _tmp20_ = NULL;
 
1602
                Currency* _tmp21_ = NULL;
 
1603
                _tmp19_ = name;
 
1604
                _tmp20_ = currency_manager_get_currency (self, _tmp19_);
 
1605
                _tmp21_ = _tmp20_;
 
1606
                _tmp15_ = _tmp21_ == NULL;
 
1607
                _g_object_unref0 (_tmp21_);
 
1608
        } else {
 
1609
                _tmp15_ = FALSE;
 
1610
        }
 
1611
        if (_tmp15_) {
 
1612
                const gchar* _tmp22_ = NULL;
 
1613
                const gchar* _tmp23_ = NULL;
 
1614
                Currency* c = NULL;
 
1615
                const gchar* _tmp24_ = NULL;
 
1616
                Currency* _tmp25_ = NULL;
 
1617
                Number* r = NULL;
 
1618
                const gchar* _tmp26_ = NULL;
 
1619
                Number* _tmp27_ = NULL;
 
1620
                Number* v = NULL;
1627
1621
                Currency* _tmp28_ = NULL;
1628
 
                Currency* c;
1629
 
                const gchar* _tmp29_;
 
1622
                Number* _tmp29_ = NULL;
1630
1623
                Number* _tmp30_ = NULL;
1631
 
                Number* r;
1632
 
                Currency* _tmp31_;
 
1624
                Number* _tmp31_ = NULL;
1633
1625
                Number* _tmp32_ = NULL;
1634
 
                Number* v;
1635
 
                Number* _tmp33_;
1636
 
                Number* _tmp34_;
1637
 
                Number* _tmp35_ = NULL;
1638
 
                Currency* _tmp36_;
1639
 
                Number* _tmp37_;
1640
 
                _tmp25_ = value;
1641
 
                _tmp26_ = name;
1642
 
                g_debug ("currency.vala:297: Using ECB rate of %s for %s", _tmp25_, _tmp26_);
1643
 
                _tmp27_ = name;
1644
 
                _tmp28_ = currency_manager_add_currency (self, _tmp27_);
1645
 
                c = _tmp28_;
1646
 
                _tmp29_ = value;
1647
 
                _tmp30_ = mp_set_from_string (_tmp29_, 10);
1648
 
                r = _tmp30_;
1649
 
                _tmp31_ = eur_rate;
1650
 
                _tmp32_ = currency_get_value (_tmp31_);
 
1626
                Currency* _tmp33_ = NULL;
 
1627
                Number* _tmp34_ = NULL;
 
1628
                _tmp22_ = value;
 
1629
                _tmp23_ = name;
 
1630
                g_debug ("currency.vala:297: Using ECB rate of %s for %s", _tmp22_, _tmp23_);
 
1631
                _tmp24_ = name;
 
1632
                _tmp25_ = currency_manager_add_currency (self, _tmp24_);
 
1633
                c = _tmp25_;
 
1634
                _tmp26_ = value;
 
1635
                _tmp27_ = mp_set_from_string (_tmp26_, 10);
 
1636
                r = _tmp27_;
 
1637
                _tmp28_ = eur_rate;
 
1638
                _tmp29_ = currency_get_value (_tmp28_);
 
1639
                v = _tmp29_;
 
1640
                _tmp30_ = v;
 
1641
                _tmp31_ = r;
 
1642
                _tmp32_ = number_multiply (_tmp30_, _tmp31_);
 
1643
                _number_unref0 (v);
1651
1644
                v = _tmp32_;
1652
 
                _tmp33_ = v;
1653
 
                _tmp34_ = r;
1654
 
                _tmp35_ = number_multiply (_tmp33_, _tmp34_);
1655
 
                _number_unref0 (v);
1656
 
                v = _tmp35_;
1657
 
                _tmp36_ = c;
1658
 
                _tmp37_ = v;
1659
 
                currency_set_value (_tmp36_, _tmp37_);
 
1645
                _tmp33_ = c;
 
1646
                _tmp34_ = v;
 
1647
                currency_set_value (_tmp33_, _tmp34_);
1660
1648
                _number_unref0 (v);
1661
1649
                _number_unref0 (r);
1662
1650
                _g_object_unref0 (c);
1667
1655
 
1668
1656
 
1669
1657
static void currency_manager_set_ecb_fixed_rate (CurrencyManager* self, const gchar* name, const gchar* value, Currency* eur_rate) {
1670
 
        const gchar* _tmp0_;
1671
 
        const gchar* _tmp1_;
1672
 
        const gchar* _tmp2_;
 
1658
        const gchar* _tmp0_ = NULL;
 
1659
        const gchar* _tmp1_ = NULL;
 
1660
        Currency* c = NULL;
 
1661
        const gchar* _tmp2_ = NULL;
1673
1662
        Currency* _tmp3_ = NULL;
1674
 
        Currency* c;
1675
 
        const gchar* _tmp4_;
 
1663
        Number* r = NULL;
 
1664
        const gchar* _tmp4_ = NULL;
1676
1665
        Number* _tmp5_ = NULL;
1677
 
        Number* r;
1678
 
        Currency* _tmp6_;
 
1666
        Number* v = NULL;
 
1667
        Currency* _tmp6_ = NULL;
1679
1668
        Number* _tmp7_ = NULL;
1680
 
        Number* v;
1681
 
        Number* _tmp8_;
 
1669
        Number* _tmp8_ = NULL;
1682
1670
        Number* _tmp9_ = NULL;
1683
 
        Number* _tmp10_;
 
1671
        Number* _tmp10_ = NULL;
1684
1672
        g_return_if_fail (self != NULL);
1685
1673
        g_return_if_fail (name != NULL);
1686
1674
        g_return_if_fail (value != NULL);
1710
1698
 
1711
1699
 
1712
1700
static void currency_manager_load_ecb_rates (CurrencyManager* self) {
 
1701
        Currency* eur_rate = NULL;
1713
1702
        Currency* _tmp0_ = NULL;
1714
 
        Currency* eur_rate;
1715
 
        Currency* _tmp1_;
1716
 
        Currency* _tmp2_;
1717
 
        Currency* _tmp3_;
 
1703
        Currency* _tmp1_ = NULL;
 
1704
        Currency* _tmp2_ = NULL;
 
1705
        Currency* _tmp3_ = NULL;
 
1706
        gchar* filename = NULL;
1718
1707
        gchar* _tmp4_ = NULL;
1719
 
        gchar* filename;
1720
 
        const gchar* _tmp5_;
 
1708
        xmlDoc* document = NULL;
 
1709
        const gchar* _tmp5_ = NULL;
1721
1710
        xmlDoc* _tmp6_ = NULL;
1722
 
        xmlDoc* document;
1723
 
        xmlDoc* _tmp7_;
1724
 
        xmlDoc* _tmp9_;
1725
 
        xmlXPathContext* _tmp10_;
1726
 
        xmlXPathContext* xpath_ctx;
1727
 
        xmlXPathContext* _tmp11_;
1728
 
        xmlXPathContext* _tmp12_;
1729
 
        xmlXPathContext* _tmp13_;
 
1711
        xmlDoc* _tmp7_ = NULL;
 
1712
        xmlXPathContext* xpath_ctx = NULL;
 
1713
        xmlDoc* _tmp9_ = NULL;
 
1714
        xmlXPathContext* _tmp10_ = NULL;
 
1715
        xmlXPathContext* _tmp11_ = NULL;
 
1716
        xmlXPathContext* _tmp12_ = NULL;
 
1717
        xmlXPathObject* xpath_obj = NULL;
 
1718
        xmlXPathContext* _tmp13_ = NULL;
1730
1719
        xmlXPathObject* _tmp14_ = NULL;
1731
 
        xmlXPathObject* xpath_obj;
1732
 
        xmlXPathObject* _tmp15_;
 
1720
        xmlXPathObject* _tmp15_ = NULL;
1733
1721
        gint _tmp16_ = 0;
1734
 
        xmlXPathObject* _tmp17_;
1735
 
        xmlNodeSet* _tmp18_;
1736
 
        gint _tmp22_;
1737
 
        gint len;
 
1722
        xmlXPathObject* _tmp17_ = NULL;
 
1723
        xmlNodeSet* _tmp18_ = NULL;
 
1724
        gint len = 0;
1738
1725
        g_return_if_fail (self != NULL);
1739
1726
        _tmp0_ = currency_manager_get_currency (self, "EUR");
1740
1727
        eur_rate = _tmp0_;
1756
1743
        document = _tmp6_;
1757
1744
        _tmp7_ = document;
1758
1745
        if (_tmp7_ == NULL) {
1759
 
                const gchar* _tmp8_;
 
1746
                const gchar* _tmp8_ = NULL;
1760
1747
                _tmp8_ = filename;
1761
1748
                g_warning ("currency.vala:335: Couldn't parse ECB rate file %s", _tmp8_);
1762
1749
                _g_free0 (filename);
1775
1762
                return;
1776
1763
        }
1777
1764
        _tmp12_ = xpath_ctx;
1778
 
        xmlXPathRegisterNs (_tmp12_, "xref", "http://www.ecb.int/vocabulary/2002-08-01/eurofxref");
 
1765
        xmlXPathRegisterNs (_tmp12_, (xmlChar*) "xref", (xmlChar*) "http://www.ecb.int/vocabulary/2002-08-01/eurofxref");
1779
1766
        _tmp13_ = xpath_ctx;
1780
 
        _tmp14_ = xmlXPathEvalExpression ("//xref:Cube[@currency][@rate]", _tmp13_);
 
1767
        _tmp14_ = xmlXPathEvalExpression ((xmlChar*) "//xref:Cube[@currency][@rate]", _tmp13_);
1781
1768
        xpath_obj = _tmp14_;
1782
1769
        _tmp15_ = xpath_obj;
1783
1770
        if (_tmp15_ == NULL) {
1790
1777
        _tmp17_ = xpath_obj;
1791
1778
        _tmp18_ = _tmp17_->nodesetval;
1792
1779
        if (_tmp18_ != NULL) {
1793
 
                xmlXPathObject* _tmp19_;
1794
 
                xmlNodeSet* _tmp20_;
 
1780
                xmlXPathObject* _tmp19_ = NULL;
 
1781
                xmlNodeSet* _tmp20_ = NULL;
1795
1782
                gint _tmp21_ = 0;
1796
1783
                _tmp19_ = xpath_obj;
1797
1784
                _tmp20_ = _tmp19_->nodesetval;
1800
1787
        } else {
1801
1788
                _tmp16_ = 0;
1802
1789
        }
1803
 
        _tmp22_ = _tmp16_;
1804
 
        len = _tmp22_;
 
1790
        len = _tmp16_;
1805
1791
        {
1806
 
                gint i;
 
1792
                gint i = 0;
1807
1793
                i = 0;
1808
1794
                {
1809
 
                        gboolean _tmp23_;
1810
 
                        _tmp23_ = TRUE;
 
1795
                        gboolean _tmp22_ = FALSE;
 
1796
                        _tmp22_ = TRUE;
1811
1797
                        while (TRUE) {
1812
 
                                gboolean _tmp24_;
1813
 
                                gint _tmp26_;
1814
 
                                gint _tmp27_;
1815
 
                                xmlXPathObject* _tmp28_;
1816
 
                                xmlNodeSet* _tmp29_;
1817
 
                                gint _tmp30_;
1818
 
                                xmlNode* _tmp31_ = NULL;
1819
 
                                xmlNode* node;
1820
 
                                xmlNode* _tmp32_;
1821
 
                                xmlElementType _tmp33_;
1822
 
                                xmlNode* _tmp36_;
1823
 
                                xmlElementType _tmp37_;
1824
 
                                _tmp24_ = _tmp23_;
1825
 
                                if (!_tmp24_) {
1826
 
                                        gint _tmp25_;
1827
 
                                        _tmp25_ = i;
1828
 
                                        i = _tmp25_ + 1;
 
1798
                                gint _tmp24_ = 0;
 
1799
                                gint _tmp25_ = 0;
 
1800
                                xmlNode* node = NULL;
 
1801
                                xmlXPathObject* _tmp26_ = NULL;
 
1802
                                xmlNodeSet* _tmp27_ = NULL;
 
1803
                                gint _tmp28_ = 0;
 
1804
                                xmlNode* _tmp29_ = NULL;
 
1805
                                xmlNode* _tmp30_ = NULL;
 
1806
                                xmlElementType _tmp31_ = 0;
 
1807
                                xmlNode* _tmp34_ = NULL;
 
1808
                                xmlElementType _tmp35_ = 0;
 
1809
                                if (!_tmp22_) {
 
1810
                                        gint _tmp23_ = 0;
 
1811
                                        _tmp23_ = i;
 
1812
                                        i = _tmp23_ + 1;
1829
1813
                                }
1830
 
                                _tmp23_ = FALSE;
1831
 
                                _tmp26_ = i;
1832
 
                                _tmp27_ = len;
1833
 
                                if (!(_tmp26_ < _tmp27_)) {
 
1814
                                _tmp22_ = FALSE;
 
1815
                                _tmp24_ = i;
 
1816
                                _tmp25_ = len;
 
1817
                                if (!(_tmp24_ < _tmp25_)) {
1834
1818
                                        break;
1835
1819
                                }
1836
 
                                _tmp28_ = xpath_obj;
1837
 
                                _tmp29_ = _tmp28_->nodesetval;
1838
 
                                _tmp30_ = i;
1839
 
                                _tmp31_ = xmlXPathNodeSetItem (_tmp29_, _tmp30_);
1840
 
                                node = _tmp31_;
1841
 
                                _tmp32_ = node;
1842
 
                                _tmp33_ = _tmp32_->type;
1843
 
                                if (_tmp33_ == XML_ELEMENT_NODE) {
1844
 
                                        xmlNode* _tmp34_;
1845
 
                                        Currency* _tmp35_;
1846
 
                                        _tmp34_ = node;
1847
 
                                        _tmp35_ = eur_rate;
1848
 
                                        currency_manager_set_ecb_rate (self, _tmp34_, _tmp35_);
 
1820
                                _tmp26_ = xpath_obj;
 
1821
                                _tmp27_ = _tmp26_->nodesetval;
 
1822
                                _tmp28_ = i;
 
1823
                                _tmp29_ = xmlXPathNodeSetItem (_tmp27_, _tmp28_);
 
1824
                                node = _tmp29_;
 
1825
                                _tmp30_ = node;
 
1826
                                _tmp31_ = _tmp30_->type;
 
1827
                                if (_tmp31_ == XML_ELEMENT_NODE) {
 
1828
                                        xmlNode* _tmp32_ = NULL;
 
1829
                                        Currency* _tmp33_ = NULL;
 
1830
                                        _tmp32_ = node;
 
1831
                                        _tmp33_ = eur_rate;
 
1832
                                        currency_manager_set_ecb_rate (self, _tmp32_, _tmp33_);
1849
1833
                                }
1850
 
                                _tmp36_ = node;
1851
 
                                _tmp37_ = _tmp36_->type;
1852
 
                                if (_tmp37_ != XML_NAMESPACE_DECL) {
 
1834
                                _tmp34_ = node;
 
1835
                                _tmp35_ = _tmp34_->type;
 
1836
                                if (_tmp35_ != XML_NAMESPACE_DECL) {
1853
1837
                                        node = NULL;
1854
1838
                                }
1855
1839
                        }
1864
1848
 
1865
1849
static gboolean currency_manager_load_rates (CurrencyManager* self) {
1866
1850
        gboolean result = FALSE;
1867
 
        gboolean _tmp0_;
 
1851
        gboolean _tmp0_ = FALSE;
1868
1852
        gboolean _tmp1_ = FALSE;
1869
 
        gboolean _tmp2_;
1870
 
        gboolean _tmp4_;
1871
 
        GList* _tmp5_;
 
1853
        gboolean _tmp2_ = FALSE;
 
1854
        GList* _tmp4_ = NULL;
1872
1855
        g_return_val_if_fail (self != NULL, FALSE);
1873
1856
        _tmp0_ = loaded_rates;
1874
1857
        if (_tmp0_) {
1879
1862
        if (_tmp2_) {
1880
1863
                _tmp1_ = TRUE;
1881
1864
        } else {
1882
 
                gboolean _tmp3_;
 
1865
                gboolean _tmp3_ = FALSE;
1883
1866
                _tmp3_ = downloading_ecb_rates;
1884
1867
                _tmp1_ = _tmp3_;
1885
1868
        }
1886
 
        _tmp4_ = _tmp1_;
1887
 
        if (_tmp4_) {
 
1869
        if (_tmp1_) {
1888
1870
                result = FALSE;
1889
1871
                return result;
1890
1872
        }
1891
1873
        currency_manager_load_imf_rates (self);
1892
1874
        currency_manager_load_ecb_rates (self);
1893
 
        _tmp5_ = self->priv->currencies;
 
1875
        _tmp4_ = self->priv->currencies;
1894
1876
        {
1895
1877
                GList* c_collection = NULL;
1896
1878
                GList* c_it = NULL;
1897
 
                c_collection = _tmp5_;
 
1879
                c_collection = _tmp4_;
1898
1880
                for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
1899
 
                        Currency* _tmp6_;
 
1881
                        Currency* _tmp5_ = NULL;
1900
1882
                        Currency* c = NULL;
1901
 
                        _tmp6_ = _g_object_ref0 ((Currency*) c_it->data);
1902
 
                        c = _tmp6_;
 
1883
                        _tmp5_ = _g_object_ref0 ((Currency*) c_it->data);
 
1884
                        c = _tmp5_;
1903
1885
                        {
1904
 
                                Currency* _tmp7_;
 
1886
                                Currency* _tmp6_ = NULL;
 
1887
                                Number* _tmp7_ = NULL;
1905
1888
                                Number* _tmp8_ = NULL;
1906
 
                                Number* _tmp9_;
 
1889
                                gboolean _tmp9_ = FALSE;
1907
1890
                                gboolean _tmp10_ = FALSE;
1908
 
                                gboolean _tmp11_;
1909
 
                                _tmp7_ = c;
1910
 
                                _tmp8_ = currency_get_value (_tmp7_);
1911
 
                                _tmp9_ = _tmp8_;
1912
 
                                _tmp10_ = number_is_zero (_tmp9_);
1913
 
                                _tmp11_ = _tmp10_;
1914
 
                                _number_unref0 (_tmp9_);
1915
 
                                if (_tmp11_) {
1916
 
                                        Currency* _tmp12_;
1917
 
                                        gchar* _tmp13_;
1918
 
                                        gchar* _tmp14_;
1919
 
                                        gchar* _tmp15_;
1920
 
                                        _tmp12_ = c;
1921
 
                                        _tmp13_ = currency_get_name (_tmp12_);
 
1891
                                _tmp6_ = c;
 
1892
                                _tmp7_ = currency_get_value (_tmp6_);
 
1893
                                _tmp8_ = _tmp7_;
 
1894
                                _tmp9_ = number_is_zero (_tmp8_);
 
1895
                                _tmp10_ = _tmp9_;
 
1896
                                _number_unref0 (_tmp8_);
 
1897
                                if (_tmp10_) {
 
1898
                                        Currency* _tmp11_ = NULL;
 
1899
                                        gchar* _tmp12_ = NULL;
 
1900
                                        gchar* _tmp13_ = NULL;
 
1901
                                        gchar* _tmp14_ = NULL;
 
1902
                                        _tmp11_ = c;
 
1903
                                        _tmp12_ = currency_get_name (_tmp11_);
 
1904
                                        _tmp13_ = _tmp12_;
1922
1905
                                        _tmp14_ = _tmp13_;
1923
 
                                        _tmp15_ = _tmp14_;
1924
 
                                        g_warning ("currency.vala:386: Currency %s is not provided by IMF or ECB", _tmp15_);
1925
 
                                        _g_free0 (_tmp15_);
 
1906
                                        g_warning ("currency.vala:386: Currency %s is not provided by IMF or ECB", _tmp14_);
 
1907
                                        _g_free0 (_tmp14_);
1926
1908
                                }
1927
1909
                                _g_object_unref0 (c);
1928
1910
                        }
1937
1919
 
1938
1920
 
1939
1921
static void _currency_manager_download_imf_cb_gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
1940
 
        currency_manager_download_imf_cb (self, source_object, res);
 
1922
        currency_manager_download_imf_cb ((CurrencyManager*) self, source_object, res);
1941
1923
}
1942
1924
 
1943
1925
 
1944
1926
static void _currency_manager_download_ecb_cb_gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
1945
 
        currency_manager_download_ecb_cb (self, source_object, res);
 
1927
        currency_manager_download_ecb_cb ((CurrencyManager*) self, source_object, res);
1946
1928
}
1947
1929
 
1948
1930
 
1949
1931
Number* currency_manager_get_value (CurrencyManager* self, const gchar* currency) {
1950
1932
        Number* result = NULL;
 
1933
        gchar* path = NULL;
1951
1934
        gchar* _tmp0_ = NULL;
1952
 
        gchar* path;
1953
1935
        gboolean _tmp1_ = FALSE;
1954
 
        gboolean _tmp2_;
1955
 
        gboolean _tmp5_;
1956
 
        gchar* _tmp7_ = NULL;
 
1936
        gboolean _tmp2_ = FALSE;
 
1937
        gchar* _tmp6_ = NULL;
 
1938
        gboolean _tmp7_ = FALSE;
1957
1939
        gboolean _tmp8_ = FALSE;
1958
 
        gboolean _tmp9_;
1959
 
        gboolean _tmp12_;
1960
 
        gboolean _tmp14_ = FALSE;
1961
 
        const gchar* _tmp15_;
1962
 
        Currency* _tmp16_ = NULL;
1963
 
        Currency* c;
1964
 
        Currency* _tmp17_;
 
1940
        gboolean _tmp12_ = FALSE;
 
1941
        Currency* c = NULL;
 
1942
        const gchar* _tmp13_ = NULL;
 
1943
        Currency* _tmp14_ = NULL;
 
1944
        Currency* _tmp15_ = NULL;
1965
1945
        g_return_val_if_fail (self != NULL, NULL);
1966
1946
        g_return_val_if_fail (currency != NULL, NULL);
1967
1947
        _tmp0_ = currency_manager_get_imf_rate_filepath (self);
1968
1948
        path = _tmp0_;
1969
1949
        _tmp2_ = downloading_imf_rates;
1970
1950
        if (!_tmp2_) {
1971
 
                const gchar* _tmp3_;
 
1951
                const gchar* _tmp3_ = NULL;
1972
1952
                gboolean _tmp4_ = FALSE;
1973
1953
                _tmp3_ = path;
1974
1954
                _tmp4_ = currency_manager_file_needs_update (self, _tmp3_, (gdouble) (((60 * 60) * 24) * 7));
1976
1956
        } else {
1977
1957
                _tmp1_ = FALSE;
1978
1958
        }
1979
 
        _tmp5_ = _tmp1_;
1980
 
        if (_tmp5_) {
1981
 
                const gchar* _tmp6_;
 
1959
        if (_tmp1_) {
 
1960
                const gchar* _tmp5_ = NULL;
1982
1961
                downloading_imf_rates = TRUE;
1983
1962
                g_debug ("currency.vala:403: Downloading rates from the IMF...");
1984
 
                _tmp6_ = path;
1985
 
                currency_manager_download_file (self, "http://www.imf.org/external/np/fin/data/rms_five.aspx?tsvflag=Y", _tmp6_, _currency_manager_download_imf_cb_gasync_ready_callback, self);
 
1963
                _tmp5_ = path;
 
1964
                currency_manager_download_file (self, "http://www.imf.org/external/np/fin/data/rms_five.aspx?tsvflag=Y", _tmp5_, _currency_manager_download_imf_cb_gasync_ready_callback, self);
1986
1965
        }
1987
 
        _tmp7_ = currency_manager_get_ecb_rate_filepath (self);
 
1966
        _tmp6_ = currency_manager_get_ecb_rate_filepath (self);
1988
1967
        _g_free0 (path);
1989
 
        path = _tmp7_;
1990
 
        _tmp9_ = downloading_ecb_rates;
1991
 
        if (!_tmp9_) {
1992
 
                const gchar* _tmp10_;
1993
 
                gboolean _tmp11_ = FALSE;
1994
 
                _tmp10_ = path;
1995
 
                _tmp11_ = currency_manager_file_needs_update (self, _tmp10_, (gdouble) (((60 * 60) * 24) * 7));
1996
 
                _tmp8_ = _tmp11_;
 
1968
        path = _tmp6_;
 
1969
        _tmp8_ = downloading_ecb_rates;
 
1970
        if (!_tmp8_) {
 
1971
                const gchar* _tmp9_ = NULL;
 
1972
                gboolean _tmp10_ = FALSE;
 
1973
                _tmp9_ = path;
 
1974
                _tmp10_ = currency_manager_file_needs_update (self, _tmp9_, (gdouble) (((60 * 60) * 24) * 7));
 
1975
                _tmp7_ = _tmp10_;
1997
1976
        } else {
1998
 
                _tmp8_ = FALSE;
 
1977
                _tmp7_ = FALSE;
1999
1978
        }
2000
 
        _tmp12_ = _tmp8_;
2001
 
        if (_tmp12_) {
2002
 
                const gchar* _tmp13_;
 
1979
        if (_tmp7_) {
 
1980
                const gchar* _tmp11_ = NULL;
2003
1981
                downloading_ecb_rates = TRUE;
2004
1982
                g_debug ("currency.vala:410: Downloading rates from the ECB...");
2005
 
                _tmp13_ = path;
2006
 
                currency_manager_download_file (self, "http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml", _tmp13_, _currency_manager_download_ecb_cb_gasync_ready_callback, self);
 
1983
                _tmp11_ = path;
 
1984
                currency_manager_download_file (self, "http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml", _tmp11_, _currency_manager_download_ecb_cb_gasync_ready_callback, self);
2007
1985
        }
2008
 
        _tmp14_ = currency_manager_load_rates (self);
2009
 
        if (!_tmp14_) {
 
1986
        _tmp12_ = currency_manager_load_rates (self);
 
1987
        if (!_tmp12_) {
2010
1988
                result = NULL;
2011
1989
                _g_free0 (path);
2012
1990
                return result;
2013
1991
        }
2014
 
        _tmp15_ = currency;
2015
 
        _tmp16_ = currency_manager_get_currency (self, _tmp15_);
2016
 
        c = _tmp16_;
2017
 
        _tmp17_ = c;
2018
 
        if (_tmp17_ != NULL) {
2019
 
                Currency* _tmp18_;
2020
 
                Number* _tmp19_ = NULL;
2021
 
                _tmp18_ = c;
2022
 
                _tmp19_ = currency_get_value (_tmp18_);
2023
 
                result = _tmp19_;
 
1992
        _tmp13_ = currency;
 
1993
        _tmp14_ = currency_manager_get_currency (self, _tmp13_);
 
1994
        c = _tmp14_;
 
1995
        _tmp15_ = c;
 
1996
        if (_tmp15_ != NULL) {
 
1997
                Currency* _tmp16_ = NULL;
 
1998
                Number* _tmp17_ = NULL;
 
1999
                _tmp16_ = c;
 
2000
                _tmp17_ = currency_get_value (_tmp16_);
 
2001
                result = _tmp17_;
2024
2002
                _g_object_unref0 (c);
2025
2003
                _g_free0 (path);
2026
2004
                return result;
2036
2014
 
2037
2015
 
2038
2016
static void currency_manager_download_file (CurrencyManager* self, const gchar* uri, const gchar* filename, GAsyncReadyCallback callback, void* callback_target) {
2039
 
        const gchar* _tmp0_;
 
2017
        gchar* directory = NULL;
 
2018
        const gchar* _tmp0_ = NULL;
2040
2019
        gchar* _tmp1_ = NULL;
2041
 
        gchar* directory;
2042
 
        const gchar* _tmp2_;
 
2020
        GFile* source = NULL;
 
2021
        const gchar* _tmp2_ = NULL;
2043
2022
        GFile* _tmp3_ = NULL;
2044
 
        GFile* source;
2045
 
        const gchar* _tmp4_;
 
2023
        GFile* dest = NULL;
 
2024
        const gchar* _tmp4_ = NULL;
2046
2025
        GFile* _tmp5_ = NULL;
2047
 
        GFile* dest;
2048
 
        GAsyncReadyCallback _tmp6_;
2049
 
        void* _tmp6__target;
 
2026
        GAsyncReadyCallback _tmp6_ = NULL;
 
2027
        void* _tmp6__target = NULL;
2050
2028
        g_return_if_fail (self != NULL);
2051
2029
        g_return_if_fail (uri != NULL);
2052
2030
        g_return_if_fail (filename != NULL);
2070
2048
 
2071
2049
 
2072
2050
static void currency_manager_download_imf_cb (CurrencyManager* self, GObject* object, GAsyncResult* _result_) {
2073
 
        GObject* _tmp0_;
2074
 
        GFile* _tmp1_;
2075
 
        GFile* f;
 
2051
        GFile* f = NULL;
 
2052
        GObject* _tmp0_ = NULL;
 
2053
        GFile* _tmp1_ = NULL;
2076
2054
        GError * _inner_error_ = NULL;
2077
2055
        g_return_if_fail (self != NULL);
2078
2056
        g_return_if_fail (_result_ != NULL);
2080
2058
        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, G_TYPE_FILE) ? ((GFile*) _tmp0_) : NULL);
2081
2059
        f = _tmp1_;
2082
2060
        {
2083
 
                GAsyncResult* _tmp2_;
 
2061
                GAsyncResult* _tmp2_ = NULL;
2084
2062
                _tmp2_ = _result_;
2085
2063
                g_file_copy_finish (f, _tmp2_, &_inner_error_);
2086
2064
                if (_inner_error_ != NULL) {
2087
 
                        goto __catch2_g_error;
 
2065
                        goto __catch5_g_error;
2088
2066
                }
2089
2067
                g_debug ("currency.vala:442: IMF rates updated");
2090
2068
        }
2091
 
        goto __finally2;
2092
 
        __catch2_g_error:
 
2069
        goto __finally5;
 
2070
        __catch5_g_error:
2093
2071
        {
2094
2072
                GError* e = NULL;
2095
 
                GError* _tmp3_;
2096
 
                const gchar* _tmp4_;
 
2073
                GError* _tmp3_ = NULL;
 
2074
                const gchar* _tmp4_ = NULL;
2097
2075
                e = _inner_error_;
2098
2076
                _inner_error_ = NULL;
2099
2077
                _tmp3_ = e;
2101
2079
                g_warning ("currency.vala:446: Couldn't download IMF currency rate file: %s", _tmp4_);
2102
2080
                _g_error_free0 (e);
2103
2081
        }
2104
 
        __finally2:
 
2082
        __finally5:
2105
2083
        if (_inner_error_ != NULL) {
2106
2084
                _g_object_unref0 (f);
2107
2085
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
2115
2093
 
2116
2094
 
2117
2095
static void currency_manager_download_ecb_cb (CurrencyManager* self, GObject* object, GAsyncResult* _result_) {
2118
 
        GObject* _tmp0_;
2119
 
        GFile* _tmp1_;
2120
 
        GFile* f;
 
2096
        GFile* f = NULL;
 
2097
        GObject* _tmp0_ = NULL;
 
2098
        GFile* _tmp1_ = NULL;
2121
2099
        GError * _inner_error_ = NULL;
2122
2100
        g_return_if_fail (self != NULL);
2123
2101
        g_return_if_fail (_result_ != NULL);
2125
2103
        _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, G_TYPE_FILE) ? ((GFile*) _tmp0_) : NULL);
2126
2104
        f = _tmp1_;
2127
2105
        {
2128
 
                GAsyncResult* _tmp2_;
 
2106
                GAsyncResult* _tmp2_ = NULL;
2129
2107
                _tmp2_ = _result_;
2130
2108
                g_file_copy_finish (f, _tmp2_, &_inner_error_);
2131
2109
                if (_inner_error_ != NULL) {
2132
 
                        goto __catch3_g_error;
 
2110
                        goto __catch6_g_error;
2133
2111
                }
2134
2112
                g_debug ("currency.vala:459: ECB rates updated");
2135
2113
        }
2136
 
        goto __finally3;
2137
 
        __catch3_g_error:
 
2114
        goto __finally6;
 
2115
        __catch6_g_error:
2138
2116
        {
2139
2117
                GError* e = NULL;
2140
 
                GError* _tmp3_;
2141
 
                const gchar* _tmp4_;
 
2118
                GError* _tmp3_ = NULL;
 
2119
                const gchar* _tmp4_ = NULL;
2142
2120
                e = _inner_error_;
2143
2121
                _inner_error_ = NULL;
2144
2122
                _tmp3_ = e;
2146
2124
                g_warning ("currency.vala:463: Couldn't download ECB currency rate file: %s", _tmp4_);
2147
2125
                _g_error_free0 (e);
2148
2126
        }
2149
 
        __finally3:
 
2127
        __finally6:
2150
2128
        if (_inner_error_ != NULL) {
2151
2129
                _g_object_unref0 (f);
2152
2130
                g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
2206
2184
 
2207
2185
Currency* currency_construct (GType object_type, const gchar* name, const gchar* display_name, const gchar* symbol) {
2208
2186
        Currency * self = NULL;
2209
 
        const gchar* _tmp0_;
2210
 
        gchar* _tmp1_;
2211
 
        const gchar* _tmp2_;
2212
 
        gchar* _tmp3_;
2213
 
        const gchar* _tmp4_;
2214
 
        gchar* _tmp5_;
 
2187
        const gchar* _tmp0_ = NULL;
 
2188
        gchar* _tmp1_ = NULL;
 
2189
        const gchar* _tmp2_ = NULL;
 
2190
        gchar* _tmp3_ = NULL;
 
2191
        const gchar* _tmp4_ = NULL;
 
2192
        gchar* _tmp5_ = NULL;
2215
2193
        g_return_val_if_fail (name != NULL, NULL);
2216
2194
        g_return_val_if_fail (display_name != NULL, NULL);
2217
2195
        g_return_val_if_fail (symbol != NULL, NULL);
2243
2221
 
2244
2222
 
2245
2223
void currency_set_value (Currency* self, Number* value) {
2246
 
        Number* _tmp0_;
2247
 
        Number* _tmp1_;
 
2224
        Number* _tmp0_ = NULL;
 
2225
        Number* _tmp1_ = NULL;
2248
2226
        g_return_if_fail (self != NULL);
2249
2227
        g_return_if_fail (value != NULL);
2250
2228
        _tmp0_ = value;
2256
2234
 
2257
2235
Number* currency_get_value (Currency* self) {
2258
2236
        Number* result = NULL;
2259
 
        Number* _tmp0_;
2260
 
        Number* _tmp1_;
 
2237
        Number* _tmp0_ = NULL;
 
2238
        Number* _tmp1_ = NULL;
2261
2239
        g_return_val_if_fail (self != NULL, NULL);
2262
2240
        _tmp0_ = self->priv->value;
2263
2241
        _tmp1_ = _number_ref0 (_tmp0_);
2268
2246
 
2269
2247
gchar* currency_get_name (Currency* self) {
2270
2248
        gchar* result;
2271
 
        const gchar* _tmp0_;
2272
 
        gchar* _tmp1_;
 
2249
        const gchar* _tmp0_ = NULL;
 
2250
        gchar* _tmp1_ = NULL;
2273
2251
        g_return_val_if_fail (self != NULL, NULL);
2274
2252
        _tmp0_ = self->priv->_name;
2275
2253
        _tmp1_ = g_strdup (_tmp0_);
2280
2258
 
2281
2259
gchar* currency_get_display_name (Currency* self) {
2282
2260
        gchar* result;
2283
 
        const gchar* _tmp0_;
2284
 
        gchar* _tmp1_;
 
2261
        const gchar* _tmp0_ = NULL;
 
2262
        gchar* _tmp1_ = NULL;
2285
2263
        g_return_val_if_fail (self != NULL, NULL);
2286
2264
        _tmp0_ = self->priv->_display_name;
2287
2265
        _tmp1_ = g_strdup (_tmp0_);
2292
2270
 
2293
2271
gchar* currency_get_symbol (Currency* self) {
2294
2272
        gchar* result;
2295
 
        const gchar* _tmp0_;
2296
 
        gchar* _tmp1_;
 
2273
        const gchar* _tmp0_ = NULL;
 
2274
        gchar* _tmp1_ = NULL;
2297
2275
        g_return_val_if_fail (self != NULL, NULL);
2298
2276
        _tmp0_ = self->priv->_symbol;
2299
2277
        _tmp1_ = g_strdup (_tmp0_);