~ubuntu-branches/ubuntu/wily/gnome-chess/wily

« back to all changes in this revision

Viewing changes to src/ai-profile.c

  • Committer: Package Import Robot
  • Author(s): Emilio Pozuelo Monfort, Jeremy Bicha, Emilio Pozuelo Monfort
  • Date: 2013-05-25 18:48:35 UTC
  • mfrom: (0.1.6 sid) (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130525184835-jdun5lv3y5ztbqx3
Tags: 1:3.8.2-1
[ Jeremy Bicha ]
* Package split from gnome-games
* Add transitional package for rename from glchess

[ Emilio Pozuelo Monfort ]
* debian/control.in:
  + Swith valac-0.18 build dependency to valac (>= 0.18).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* ai-profile.c generated by valac 0.20.0, the Vala compiler
 
1
/* ai-profile.c generated by valac 0.18.1, the Vala compiler
2
2
 * generated from ai-profile.vala, do not modify */
3
3
 
4
4
 
205
205
 
206
206
 
207
207
static void ai_profile_instance_init (AIProfile * self) {
208
 
        gchar* _tmp0_;
209
 
        _tmp0_ = g_strdup ("");
210
 
        self->args = _tmp0_;
211
208
        self->ref_count = 1;
212
209
}
213
210
 
365
362
                                const gchar* _tmp11_;
366
363
                                AIProfile* _tmp12_;
367
364
                                AIProfile* profile;
368
 
                                AIProfile* _tmp53_;
369
 
                                const gchar* _tmp54_;
370
 
                                gchar* _tmp55_ = NULL;
 
365
                                AIProfile* _tmp54_;
 
366
                                const gchar* _tmp55_;
 
367
                                gchar* _tmp56_ = NULL;
371
368
                                gchar* path;
372
 
                                const gchar* _tmp56_;
 
369
                                const gchar* _tmp57_;
373
370
                                _tmp11_ = name;
374
371
                                g_debug ("ai-profile.vala:35: Loading AI profile %s", _tmp11_);
375
372
                                _tmp12_ = ai_profile_new ();
392
389
                                        const gchar* _tmp27_;
393
390
                                        gboolean _tmp28_ = FALSE;
394
391
                                        gboolean _tmp29_;
395
 
                                        GKeyFile* _tmp35_;
396
 
                                        const gchar* _tmp36_;
397
 
                                        gint _tmp37_ = 0;
398
 
                                        gchar** _tmp38_ = NULL;
399
 
                                        gchar** _tmp39_;
400
 
                                        gint _tmp39__length1;
401
 
                                        gint __tmp39__size_;
402
 
                                        AIProfile* _tmp40_;
403
 
                                        GKeyFile* _tmp41_;
404
 
                                        const gchar* _tmp42_;
405
 
                                        gint _tmp43_ = 0;
406
 
                                        gchar** _tmp44_ = NULL;
407
 
                                        gchar** _tmp45_;
408
 
                                        gint _tmp45__length1;
409
 
                                        gint __tmp45__size_;
410
 
                                        AIProfile* _tmp46_;
411
 
                                        GKeyFile* _tmp47_;
412
 
                                        const gchar* _tmp48_;
413
 
                                        gint _tmp49_ = 0;
414
 
                                        gchar** _tmp50_ = NULL;
415
 
                                        gchar** _tmp51_;
416
 
                                        gint _tmp51__length1;
417
 
                                        gint __tmp51__size_;
418
 
                                        AIProfile* _tmp52_;
 
392
                                        GKeyFile* _tmp36_;
 
393
                                        const gchar* _tmp37_;
 
394
                                        gint _tmp38_ = 0;
 
395
                                        gchar** _tmp39_ = NULL;
 
396
                                        gchar** _tmp40_;
 
397
                                        gint _tmp40__length1;
 
398
                                        gint __tmp40__size_;
 
399
                                        AIProfile* _tmp41_;
 
400
                                        GKeyFile* _tmp42_;
 
401
                                        const gchar* _tmp43_;
 
402
                                        gint _tmp44_ = 0;
 
403
                                        gchar** _tmp45_ = NULL;
 
404
                                        gchar** _tmp46_;
 
405
                                        gint _tmp46__length1;
 
406
                                        gint __tmp46__size_;
 
407
                                        AIProfile* _tmp47_;
 
408
                                        GKeyFile* _tmp48_;
 
409
                                        const gchar* _tmp49_;
 
410
                                        gint _tmp50_ = 0;
 
411
                                        gchar** _tmp51_ = NULL;
 
412
                                        gchar** _tmp52_;
 
413
                                        gint _tmp52__length1;
 
414
                                        gint __tmp52__size_;
 
415
                                        AIProfile* _tmp53_;
419
416
                                        _tmp13_ = profile;
420
417
                                        _tmp14_ = name;
421
418
                                        _tmp15_ = g_strdup (_tmp14_);
504
501
                                                _tmp34_ = profile;
505
502
                                                _g_free0 (_tmp34_->args);
506
503
                                                _tmp34_->args = _tmp33_;
507
 
                                        }
508
 
                                        _tmp35_ = file;
509
 
                                        _tmp36_ = name;
510
 
                                        _tmp38_ = load_options (_tmp35_, _tmp36_, "easy", &_tmp37_, &_inner_error_);
511
 
                                        _tmp39_ = _tmp38_;
512
 
                                        _tmp39__length1 = _tmp37_;
513
 
                                        __tmp39__size_ = _tmp39__length1;
514
 
                                        if (_inner_error_ != NULL) {
515
 
                                                if (_inner_error_->domain == G_KEY_FILE_ERROR) {
516
 
                                                        goto __catch11_g_key_file_error;
517
 
                                                }
518
 
                                                _ai_profile_unref0 (profile);
519
 
                                                _g_free0 (name);
520
 
                                                name_collection = (_vala_array_free (name_collection, name_collection_length1, (GDestroyNotify) g_free), NULL);
521
 
                                                _g_key_file_free0 (file);
522
 
                                                __g_list_free__ai_profile_unref0_0 (profiles);
523
 
                                                g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
524
 
                                                g_clear_error (&_inner_error_);
525
 
                                                return NULL;
526
 
                                        }
527
 
                                        _tmp40_ = profile;
528
 
                                        _tmp40_->easy_options = (_vala_array_free (_tmp40_->easy_options, _tmp40_->easy_options_length1, (GDestroyNotify) g_free), NULL);
529
 
                                        _tmp40_->easy_options = _tmp39_;
530
 
                                        _tmp40_->easy_options_length1 = _tmp39__length1;
531
 
                                        _tmp41_ = file;
532
 
                                        _tmp42_ = name;
533
 
                                        _tmp44_ = load_options (_tmp41_, _tmp42_, "normal", &_tmp43_, &_inner_error_);
534
 
                                        _tmp45_ = _tmp44_;
535
 
                                        _tmp45__length1 = _tmp43_;
536
 
                                        __tmp45__size_ = _tmp45__length1;
537
 
                                        if (_inner_error_ != NULL) {
538
 
                                                if (_inner_error_->domain == G_KEY_FILE_ERROR) {
539
 
                                                        goto __catch11_g_key_file_error;
540
 
                                                }
541
 
                                                _ai_profile_unref0 (profile);
542
 
                                                _g_free0 (name);
543
 
                                                name_collection = (_vala_array_free (name_collection, name_collection_length1, (GDestroyNotify) g_free), NULL);
544
 
                                                _g_key_file_free0 (file);
545
 
                                                __g_list_free__ai_profile_unref0_0 (profiles);
546
 
                                                g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
547
 
                                                g_clear_error (&_inner_error_);
548
 
                                                return NULL;
549
 
                                        }
550
 
                                        _tmp46_ = profile;
551
 
                                        _tmp46_->normal_options = (_vala_array_free (_tmp46_->normal_options, _tmp46_->normal_options_length1, (GDestroyNotify) g_free), NULL);
552
 
                                        _tmp46_->normal_options = _tmp45_;
553
 
                                        _tmp46_->normal_options_length1 = _tmp45__length1;
554
 
                                        _tmp47_ = file;
555
 
                                        _tmp48_ = name;
556
 
                                        _tmp50_ = load_options (_tmp47_, _tmp48_, "hard", &_tmp49_, &_inner_error_);
557
 
                                        _tmp51_ = _tmp50_;
558
 
                                        _tmp51__length1 = _tmp49_;
559
 
                                        __tmp51__size_ = _tmp51__length1;
560
 
                                        if (_inner_error_ != NULL) {
561
 
                                                if (_inner_error_->domain == G_KEY_FILE_ERROR) {
562
 
                                                        goto __catch11_g_key_file_error;
563
 
                                                }
564
 
                                                _ai_profile_unref0 (profile);
565
 
                                                _g_free0 (name);
566
 
                                                name_collection = (_vala_array_free (name_collection, name_collection_length1, (GDestroyNotify) g_free), NULL);
567
 
                                                _g_key_file_free0 (file);
568
 
                                                __g_list_free__ai_profile_unref0_0 (profiles);
569
 
                                                g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
570
 
                                                g_clear_error (&_inner_error_);
571
 
                                                return NULL;
572
 
                                        }
573
 
                                        _tmp52_ = profile;
574
 
                                        _tmp52_->hard_options = (_vala_array_free (_tmp52_->hard_options, _tmp52_->hard_options_length1, (GDestroyNotify) g_free), NULL);
575
 
                                        _tmp52_->hard_options = _tmp51_;
576
 
                                        _tmp52_->hard_options_length1 = _tmp51__length1;
 
504
                                        } else {
 
505
                                                AIProfile* _tmp35_;
 
506
                                                _tmp35_ = profile;
 
507
                                                _g_free0 (_tmp35_->args);
 
508
                                                _tmp35_->args = NULL;
 
509
                                        }
 
510
                                        _tmp36_ = file;
 
511
                                        _tmp37_ = name;
 
512
                                        _tmp39_ = load_options (_tmp36_, _tmp37_, "easy", &_tmp38_, &_inner_error_);
 
513
                                        _tmp40_ = _tmp39_;
 
514
                                        _tmp40__length1 = _tmp38_;
 
515
                                        __tmp40__size_ = _tmp40__length1;
 
516
                                        if (_inner_error_ != NULL) {
 
517
                                                if (_inner_error_->domain == G_KEY_FILE_ERROR) {
 
518
                                                        goto __catch11_g_key_file_error;
 
519
                                                }
 
520
                                                _ai_profile_unref0 (profile);
 
521
                                                _g_free0 (name);
 
522
                                                name_collection = (_vala_array_free (name_collection, name_collection_length1, (GDestroyNotify) g_free), NULL);
 
523
                                                _g_key_file_free0 (file);
 
524
                                                __g_list_free__ai_profile_unref0_0 (profiles);
 
525
                                                g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
 
526
                                                g_clear_error (&_inner_error_);
 
527
                                                return NULL;
 
528
                                        }
 
529
                                        _tmp41_ = profile;
 
530
                                        _tmp41_->easy_options = (_vala_array_free (_tmp41_->easy_options, _tmp41_->easy_options_length1, (GDestroyNotify) g_free), NULL);
 
531
                                        _tmp41_->easy_options = _tmp40_;
 
532
                                        _tmp41_->easy_options_length1 = _tmp40__length1;
 
533
                                        _tmp42_ = file;
 
534
                                        _tmp43_ = name;
 
535
                                        _tmp45_ = load_options (_tmp42_, _tmp43_, "normal", &_tmp44_, &_inner_error_);
 
536
                                        _tmp46_ = _tmp45_;
 
537
                                        _tmp46__length1 = _tmp44_;
 
538
                                        __tmp46__size_ = _tmp46__length1;
 
539
                                        if (_inner_error_ != NULL) {
 
540
                                                if (_inner_error_->domain == G_KEY_FILE_ERROR) {
 
541
                                                        goto __catch11_g_key_file_error;
 
542
                                                }
 
543
                                                _ai_profile_unref0 (profile);
 
544
                                                _g_free0 (name);
 
545
                                                name_collection = (_vala_array_free (name_collection, name_collection_length1, (GDestroyNotify) g_free), NULL);
 
546
                                                _g_key_file_free0 (file);
 
547
                                                __g_list_free__ai_profile_unref0_0 (profiles);
 
548
                                                g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
 
549
                                                g_clear_error (&_inner_error_);
 
550
                                                return NULL;
 
551
                                        }
 
552
                                        _tmp47_ = profile;
 
553
                                        _tmp47_->normal_options = (_vala_array_free (_tmp47_->normal_options, _tmp47_->normal_options_length1, (GDestroyNotify) g_free), NULL);
 
554
                                        _tmp47_->normal_options = _tmp46_;
 
555
                                        _tmp47_->normal_options_length1 = _tmp46__length1;
 
556
                                        _tmp48_ = file;
 
557
                                        _tmp49_ = name;
 
558
                                        _tmp51_ = load_options (_tmp48_, _tmp49_, "hard", &_tmp50_, &_inner_error_);
 
559
                                        _tmp52_ = _tmp51_;
 
560
                                        _tmp52__length1 = _tmp50_;
 
561
                                        __tmp52__size_ = _tmp52__length1;
 
562
                                        if (_inner_error_ != NULL) {
 
563
                                                if (_inner_error_->domain == G_KEY_FILE_ERROR) {
 
564
                                                        goto __catch11_g_key_file_error;
 
565
                                                }
 
566
                                                _ai_profile_unref0 (profile);
 
567
                                                _g_free0 (name);
 
568
                                                name_collection = (_vala_array_free (name_collection, name_collection_length1, (GDestroyNotify) g_free), NULL);
 
569
                                                _g_key_file_free0 (file);
 
570
                                                __g_list_free__ai_profile_unref0_0 (profiles);
 
571
                                                g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
 
572
                                                g_clear_error (&_inner_error_);
 
573
                                                return NULL;
 
574
                                        }
 
575
                                        _tmp53_ = profile;
 
576
                                        _tmp53_->hard_options = (_vala_array_free (_tmp53_->hard_options, _tmp53_->hard_options_length1, (GDestroyNotify) g_free), NULL);
 
577
                                        _tmp53_->hard_options = _tmp52_;
 
578
                                        _tmp53_->hard_options_length1 = _tmp52__length1;
577
579
                                }
578
580
                                goto __finally11;
579
581
                                __catch11_g_key_file_error:
597
599
                                        g_clear_error (&_inner_error_);
598
600
                                        return NULL;
599
601
                                }
600
 
                                _tmp53_ = profile;
601
 
                                _tmp54_ = _tmp53_->binary;
602
 
                                _tmp55_ = g_find_program_in_path (_tmp54_);
603
 
                                path = _tmp55_;
604
 
                                _tmp56_ = path;
605
 
                                if (_tmp56_ != NULL) {
606
 
                                        AIProfile* _tmp57_;
607
 
                                        const gchar* _tmp58_;
608
 
                                        gchar* _tmp59_;
609
 
                                        AIProfile* _tmp60_;
 
602
                                _tmp54_ = profile;
 
603
                                _tmp55_ = _tmp54_->binary;
 
604
                                _tmp56_ = g_find_program_in_path (_tmp55_);
 
605
                                path = _tmp56_;
 
606
                                _tmp57_ = path;
 
607
                                if (_tmp57_ != NULL) {
 
608
                                        AIProfile* _tmp58_;
 
609
                                        const gchar* _tmp59_;
 
610
                                        gchar* _tmp60_;
610
611
                                        AIProfile* _tmp61_;
611
 
                                        _tmp57_ = profile;
612
 
                                        _tmp58_ = path;
613
 
                                        _tmp59_ = g_strdup (_tmp58_);
614
 
                                        _g_free0 (_tmp57_->path);
615
 
                                        _tmp57_->path = _tmp59_;
616
 
                                        _tmp60_ = profile;
617
 
                                        _tmp61_ = _ai_profile_ref0 (_tmp60_);
618
 
                                        profiles = g_list_append (profiles, _tmp61_);
 
612
                                        AIProfile* _tmp62_;
 
613
                                        _tmp58_ = profile;
 
614
                                        _tmp59_ = path;
 
615
                                        _tmp60_ = g_strdup (_tmp59_);
 
616
                                        _g_free0 (_tmp58_->path);
 
617
                                        _tmp58_->path = _tmp60_;
 
618
                                        _tmp61_ = profile;
 
619
                                        _tmp62_ = _ai_profile_ref0 (_tmp61_);
 
620
                                        profiles = g_list_append (profiles, _tmp62_);
619
621
                                }
620
622
                                _g_free0 (path);
621
623
                                _ai_profile_unref0 (profile);