~mh21/ubuntu/utopic/indicator-multiload/version-0.4

« back to all changes in this revision

Viewing changes to src/function.c

  • Committer: mh21 at mh21
  • Date: 2014-06-14 19:04:06 UTC
  • mfrom: (1.1.3)
  • Revision ID: mh21@mh21.de-20140614190406-tt27etcltj3oau1o
* New upstream release.
* Fixes and new features:
  - indicator-multiload segfaults immediately (LP: #942859)
  - Advanced preferences text boxes should have unit labels (LP: #1160980)
  - Change "Open System Monitor" Link (LP: #1171224)
  - Menu monitor items do not display (LP: #1251113)
  - Network graph doesn't have min scale settings (LP: #1302454)
  - Add GUI option to turn off autoranging on graphs (LP: #796398)
  - Provide monochrome option (LP: #894583)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* function.c generated by valac 0.14.2, the Vala compiler
 
1
/* function.c generated by valac 0.22.1, the Vala compiler
2
2
 * generated from function.vala, do not modify */
3
3
 
4
4
 
56
56
typedef struct _SpeedFunctionClass SpeedFunctionClass;
57
57
typedef struct _SpeedFunctionPrivate SpeedFunctionPrivate;
58
58
 
 
59
#define TYPE_FREQUENCY_FUNCTION (frequency_function_get_type ())
 
60
#define FREQUENCY_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FREQUENCY_FUNCTION, FrequencyFunction))
 
61
#define FREQUENCY_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FREQUENCY_FUNCTION, FrequencyFunctionClass))
 
62
#define IS_FREQUENCY_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FREQUENCY_FUNCTION))
 
63
#define IS_FREQUENCY_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FREQUENCY_FUNCTION))
 
64
#define FREQUENCY_FUNCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FREQUENCY_FUNCTION, FrequencyFunctionClass))
 
65
 
 
66
typedef struct _FrequencyFunction FrequencyFunction;
 
67
typedef struct _FrequencyFunctionClass FrequencyFunctionClass;
 
68
typedef struct _FrequencyFunctionPrivate FrequencyFunctionPrivate;
 
69
 
59
70
#define TYPE_PERCENT_FUNCTION (percent_function_get_type ())
60
71
#define PERCENT_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PERCENT_FUNCTION, PercentFunction))
61
72
#define PERCENT_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PERCENT_FUNCTION, PercentFunctionClass))
111
122
        FunctionClass parent_class;
112
123
};
113
124
 
 
125
struct _FrequencyFunction {
 
126
        Function parent_instance;
 
127
        FrequencyFunctionPrivate * priv;
 
128
};
 
129
 
 
130
struct _FrequencyFunctionClass {
 
131
        FunctionClass parent_class;
 
132
};
 
133
 
114
134
struct _PercentFunction {
115
135
        Function parent_instance;
116
136
        PercentFunctionPrivate * priv;
125
145
static gpointer decimals_function_parent_class = NULL;
126
146
static gpointer size_function_parent_class = NULL;
127
147
static gpointer speed_function_parent_class = NULL;
 
148
static gpointer frequency_function_parent_class = NULL;
128
149
static gpointer percent_function_parent_class = NULL;
129
150
 
130
151
GType function_get_type (void) G_GNUC_CONST;
142
163
static void function_set_id (Function* self, const gchar* value);
143
164
gchar** function_get_parameterdescs (Function* self, int* result_length1);
144
165
static void function_set_parameterdescs (Function* self, gchar** value, int value_length1);
145
 
static gchar** _vala_array_dup6 (gchar** self, int length);
 
166
static gchar** _vala_array_dup8 (gchar** self, int length);
146
167
static void function_finalize (GObject* obj);
147
168
static void _vala_function_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
148
169
static void _vala_function_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
169
190
SpeedFunction* speed_function_construct (GType object_type);
170
191
static gchar* speed_function_real_call (Function* base, gchar** parameters, int parameters_length1, gboolean widest, GError** error);
171
192
gchar* utils_format_speed (gdouble val);
 
193
GType frequency_function_get_type (void) G_GNUC_CONST;
 
194
enum  {
 
195
        FREQUENCY_FUNCTION_DUMMY_PROPERTY
 
196
};
 
197
FrequencyFunction* frequency_function_new (void);
 
198
FrequencyFunction* frequency_function_construct (GType object_type);
 
199
static gchar* frequency_function_real_call (Function* base, gchar** parameters, int parameters_length1, gboolean widest, GError** error);
 
200
gchar* utils_format_frequency (gdouble val);
172
201
GType percent_function_get_type (void) G_GNUC_CONST;
173
202
enum  {
174
203
        PERCENT_FUNCTION_DUMMY_PROPERTY
182
211
 
183
212
Function* function_construct (GType object_type, const gchar* id, gchar** parameterdescs, int parameterdescs_length1) {
184
213
        Function * self = NULL;
185
 
        const gchar* _tmp0_;
186
 
        gchar** _tmp1_;
187
 
        gint _tmp1__length1;
 
214
        const gchar* _tmp0_ = NULL;
 
215
        gchar** _tmp1_ = NULL;
 
216
        gint _tmp1__length1 = 0;
188
217
        g_return_val_if_fail (id != NULL, NULL);
189
218
        _tmp0_ = id;
190
219
        _tmp1_ = parameterdescs;
197
226
GError* function_error (const gchar* message) {
198
227
        GError* result = NULL;
199
228
        GQuark _tmp0_ = 0U;
200
 
        const gchar* _tmp1_;
201
 
        GError* _tmp2_;
 
229
        const gchar* _tmp1_ = NULL;
 
230
        GError* _tmp2_ = NULL;
202
231
        g_return_val_if_fail (message != NULL, NULL);
203
232
        _tmp0_ = g_quark_from_string ("function-error-quark");
204
233
        _tmp1_ = message;
222
251
 
223
252
const gchar* function_get_id (Function* self) {
224
253
        const gchar* result;
225
 
        const gchar* _tmp0_;
 
254
        const gchar* _tmp0_ = NULL;
226
255
        g_return_val_if_fail (IS_FUNCTION (self), NULL);
227
256
        _tmp0_ = self->priv->_id;
228
257
        result = _tmp0_;
231
260
 
232
261
 
233
262
static void function_set_id (Function* self, const gchar* value) {
234
 
        const gchar* _tmp0_;
235
 
        gchar* _tmp1_;
 
263
        const gchar* _tmp0_ = NULL;
 
264
        gchar* _tmp1_ = NULL;
236
265
        g_return_if_fail (IS_FUNCTION (self));
237
266
        _tmp0_ = value;
238
267
        _tmp1_ = g_strdup (_tmp0_);
244
273
 
245
274
gchar** function_get_parameterdescs (Function* self, int* result_length1) {
246
275
        gchar** result;
247
 
        gchar** _tmp0_;
248
 
        gint _tmp0__length1;
249
 
        gchar** _tmp1_;
250
 
        gint _tmp1__length1;
 
276
        gchar** _tmp0_ = NULL;
 
277
        gint _tmp0__length1 = 0;
 
278
        gchar** _tmp1_ = NULL;
 
279
        gint _tmp1__length1 = 0;
251
280
        g_return_val_if_fail (IS_FUNCTION (self), NULL);
252
281
        _tmp0_ = self->priv->_parameterdescs;
253
282
        _tmp0__length1 = self->priv->_parameterdescs_length1;
261
290
}
262
291
 
263
292
 
264
 
static gchar** _vala_array_dup6 (gchar** self, int length) {
 
293
static gchar** _vala_array_dup8 (gchar** self, int length) {
265
294
        gchar** result;
266
295
        int i;
267
296
        result = g_new0 (gchar*, length + 1);
268
297
        for (i = 0; i < length; i++) {
269
 
                gchar* _tmp0_;
 
298
                gchar* _tmp0_ = NULL;
270
299
                _tmp0_ = g_strdup (self[i]);
271
300
                result[i] = _tmp0_;
272
301
        }
275
304
 
276
305
 
277
306
static void function_set_parameterdescs (Function* self, gchar** value, int value_length1) {
278
 
        gchar** _tmp0_;
279
 
        gint _tmp0__length1;
280
 
        gchar** _tmp1_;
281
 
        gint _tmp1__length1;
 
307
        gchar** _tmp0_ = NULL;
 
308
        gint _tmp0__length1 = 0;
 
309
        gchar** _tmp1_ = NULL;
 
310
        gint _tmp1__length1 = 0;
282
311
        g_return_if_fail (IS_FUNCTION (self));
283
312
        _tmp0_ = value;
284
313
        _tmp0__length1 = value_length1;
285
 
        _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup6 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
 
314
        _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup8 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
286
315
        _tmp1__length1 = _tmp0__length1;
287
316
        self->priv->_parameterdescs = (_vala_array_free (self->priv->_parameterdescs, self->priv->_parameterdescs_length1, (GDestroyNotify) g_free), NULL);
288
317
        self->priv->_parameterdescs = _tmp1_;
311
340
 
312
341
static void function_finalize (GObject* obj) {
313
342
        Function * self;
314
 
        self = FUNCTION (obj);
 
343
        self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_FUNCTION, Function);
315
344
        _g_free0 (self->priv->_id);
316
345
        self->priv->_parameterdescs = (_vala_array_free (self->priv->_parameterdescs, self->priv->_parameterdescs_length1, (GDestroyNotify) g_free), NULL);
317
346
        G_OBJECT_CLASS (function_parent_class)->finalize (obj);
319
348
 
320
349
 
321
350
/******************************************************************************
322
 
 * Copyright (C) 2011  Michael Hofmann <mh21@piware.de>                       *
 
351
 * Copyright (C) 2011-2013  Michael Hofmann <mh21@mh21.de>                    *
323
352
 *                                                                            *
324
353
 * This program is free software; you can redistribute it and/or modify       *
325
354
 * it under the terms of the GNU General Public License as published by       *
349
378
 
350
379
static void _vala_function_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
351
380
        Function * self;
352
 
        self = FUNCTION (object);
 
381
        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_FUNCTION, Function);
353
382
        switch (property_id) {
354
383
                case FUNCTION_ID:
355
384
                g_value_set_string (value, function_get_id (self));
369
398
 
370
399
static void _vala_function_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
371
400
        Function * self;
372
 
        self = FUNCTION (object);
 
401
        self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_FUNCTION, Function);
373
402
        switch (property_id) {
374
403
                case FUNCTION_ID:
375
404
                function_set_id (self, g_value_get_string (value));
390
419
 
391
420
DecimalsFunction* decimals_function_construct (GType object_type) {
392
421
        DecimalsFunction * self = NULL;
393
 
        gchar* _tmp0_;
394
 
        gchar* _tmp1_;
 
422
        gchar* _tmp0_ = NULL;
 
423
        gchar* _tmp1_ = NULL;
395
424
        gchar** _tmp2_ = NULL;
396
 
        gchar** _tmp3_;
397
 
        gint _tmp3__length1;
 
425
        gchar** _tmp3_ = NULL;
 
426
        gint _tmp3__length1 = 0;
398
427
        _tmp0_ = g_strdup ("value");
399
428
        _tmp1_ = g_strdup ("decimals");
400
429
        _tmp2_ = g_new0 (gchar*, 2 + 1);
415
444
 
416
445
static gdouble double_parse (const gchar* str) {
417
446
        gdouble result = 0.0;
418
 
        const gchar* _tmp0_;
 
447
        const gchar* _tmp0_ = NULL;
419
448
        gdouble _tmp1_ = 0.0;
420
449
        g_return_val_if_fail (str != NULL, 0.0);
421
450
        _tmp0_ = str;
428
457
static gchar* decimals_function_real_call (Function* base, gchar** parameters, int parameters_length1, gboolean widest, GError** error) {
429
458
        DecimalsFunction * self;
430
459
        gchar* result = NULL;
431
 
        gchar** _tmp0_;
432
 
        gint _tmp0__length1;
433
 
        gboolean _tmp2_;
434
 
        gchar** _tmp6_;
435
 
        gint _tmp6__length1;
436
 
        const gchar* _tmp7_;
 
460
        gchar** _tmp0_ = NULL;
 
461
        gint _tmp0__length1 = 0;
 
462
        gboolean _tmp2_ = FALSE;
 
463
        gchar** _tmp6_ = NULL;
 
464
        gint _tmp6__length1 = 0;
 
465
        const gchar* _tmp7_ = NULL;
437
466
        gint _tmp8_ = 0;
438
 
        gchar** _tmp9_;
439
 
        gint _tmp9__length1;
440
 
        const gchar* _tmp10_;
 
467
        gchar** _tmp9_ = NULL;
 
468
        gint _tmp9__length1 = 0;
 
469
        const gchar* _tmp10_ = NULL;
441
470
        gdouble _tmp11_ = 0.0;
442
471
        gchar* _tmp12_ = NULL;
443
472
        GError * _inner_error_ = NULL;
444
 
        self = DECIMALS_FUNCTION (base);
 
473
        self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DECIMALS_FUNCTION, DecimalsFunction);
445
474
        _tmp0_ = parameters;
446
475
        _tmp0__length1 = parameters_length1;
447
476
        if (_tmp0__length1 != 2) {
453
482
        }
454
483
        _tmp2_ = widest;
455
484
        if (_tmp2_) {
456
 
                gchar** _tmp3_;
457
 
                gint _tmp3__length1;
458
 
                gchar* _tmp4_;
459
 
                gchar* _tmp5_;
 
485
                gchar** _tmp3_ = NULL;
 
486
                gint _tmp3__length1 = 0;
 
487
                gchar* _tmp4_ = NULL;
 
488
                gchar* _tmp5_ = NULL;
460
489
                _tmp3_ = parameters;
461
490
                _tmp3__length1 = parameters_length1;
462
491
                _tmp4_ = g_strdup ("8");
502
531
 
503
532
SizeFunction* size_function_construct (GType object_type) {
504
533
        SizeFunction * self = NULL;
505
 
        gchar* _tmp0_;
 
534
        gchar* _tmp0_ = NULL;
506
535
        gchar** _tmp1_ = NULL;
507
 
        gchar** _tmp2_;
508
 
        gint _tmp2__length1;
 
536
        gchar** _tmp2_ = NULL;
 
537
        gint _tmp2__length1 = 0;
509
538
        _tmp0_ = g_strdup ("value");
510
539
        _tmp1_ = g_new0 (gchar*, 1 + 1);
511
540
        _tmp1_[0] = _tmp0_;
525
554
static gchar* size_function_real_call (Function* base, gchar** parameters, int parameters_length1, gboolean widest, GError** error) {
526
555
        SizeFunction * self;
527
556
        gchar* result = NULL;
528
 
        gchar** _tmp0_;
529
 
        gint _tmp0__length1;
530
 
        gboolean _tmp2_;
531
 
        gchar** _tmp6_;
532
 
        gint _tmp6__length1;
533
 
        const gchar* _tmp7_;
 
557
        gchar** _tmp0_ = NULL;
 
558
        gint _tmp0__length1 = 0;
 
559
        gboolean _tmp2_ = FALSE;
 
560
        gchar** _tmp6_ = NULL;
 
561
        gint _tmp6__length1 = 0;
 
562
        const gchar* _tmp7_ = NULL;
534
563
        gdouble _tmp8_ = 0.0;
535
564
        gchar* _tmp9_ = NULL;
536
565
        GError * _inner_error_ = NULL;
537
 
        self = SIZE_FUNCTION (base);
 
566
        self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SIZE_FUNCTION, SizeFunction);
538
567
        _tmp0_ = parameters;
539
568
        _tmp0__length1 = parameters_length1;
540
569
        if (_tmp0__length1 != 1) {
546
575
        }
547
576
        _tmp2_ = widest;
548
577
        if (_tmp2_) {
549
 
                gchar** _tmp3_;
550
 
                gint _tmp3__length1;
551
 
                gchar* _tmp4_;
552
 
                gchar* _tmp5_;
 
578
                gchar** _tmp3_ = NULL;
 
579
                gint _tmp3__length1 = 0;
 
580
                gchar* _tmp4_ = NULL;
 
581
                gchar* _tmp5_ = NULL;
553
582
                _tmp3_ = parameters;
554
583
                _tmp3__length1 = parameters_length1;
555
584
                _tmp4_ = g_strdup ("999000000");
591
620
 
592
621
SpeedFunction* speed_function_construct (GType object_type) {
593
622
        SpeedFunction * self = NULL;
594
 
        gchar* _tmp0_;
 
623
        gchar* _tmp0_ = NULL;
595
624
        gchar** _tmp1_ = NULL;
596
 
        gchar** _tmp2_;
597
 
        gint _tmp2__length1;
 
625
        gchar** _tmp2_ = NULL;
 
626
        gint _tmp2__length1 = 0;
598
627
        _tmp0_ = g_strdup ("value");
599
628
        _tmp1_ = g_new0 (gchar*, 1 + 1);
600
629
        _tmp1_[0] = _tmp0_;
614
643
static gchar* speed_function_real_call (Function* base, gchar** parameters, int parameters_length1, gboolean widest, GError** error) {
615
644
        SpeedFunction * self;
616
645
        gchar* result = NULL;
617
 
        gchar** _tmp0_;
618
 
        gint _tmp0__length1;
619
 
        gboolean _tmp2_;
620
 
        gchar** _tmp6_;
621
 
        gint _tmp6__length1;
622
 
        const gchar* _tmp7_;
 
646
        gchar** _tmp0_ = NULL;
 
647
        gint _tmp0__length1 = 0;
 
648
        gboolean _tmp2_ = FALSE;
 
649
        gchar** _tmp6_ = NULL;
 
650
        gint _tmp6__length1 = 0;
 
651
        const gchar* _tmp7_ = NULL;
623
652
        gdouble _tmp8_ = 0.0;
624
653
        gchar* _tmp9_ = NULL;
625
654
        GError * _inner_error_ = NULL;
626
 
        self = SPEED_FUNCTION (base);
 
655
        self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SPEED_FUNCTION, SpeedFunction);
627
656
        _tmp0_ = parameters;
628
657
        _tmp0__length1 = parameters_length1;
629
658
        if (_tmp0__length1 != 1) {
635
664
        }
636
665
        _tmp2_ = widest;
637
666
        if (_tmp2_) {
638
 
                gchar** _tmp3_;
639
 
                gint _tmp3__length1;
640
 
                gchar* _tmp4_;
641
 
                gchar* _tmp5_;
 
667
                gchar** _tmp3_ = NULL;
 
668
                gint _tmp3__length1 = 0;
 
669
                gchar* _tmp4_ = NULL;
 
670
                gchar* _tmp5_ = NULL;
642
671
                _tmp3_ = parameters;
643
672
                _tmp3__length1 = parameters_length1;
644
673
                _tmp4_ = g_strdup ("999000000");
678
707
}
679
708
 
680
709
 
 
710
FrequencyFunction* frequency_function_construct (GType object_type) {
 
711
        FrequencyFunction * self = NULL;
 
712
        gchar* _tmp0_ = NULL;
 
713
        gchar** _tmp1_ = NULL;
 
714
        gchar** _tmp2_ = NULL;
 
715
        gint _tmp2__length1 = 0;
 
716
        _tmp0_ = g_strdup ("value");
 
717
        _tmp1_ = g_new0 (gchar*, 1 + 1);
 
718
        _tmp1_[0] = _tmp0_;
 
719
        _tmp2_ = _tmp1_;
 
720
        _tmp2__length1 = 1;
 
721
        self = (FrequencyFunction*) function_construct (object_type, "frequency", _tmp2_, 1);
 
722
        _tmp2_ = (_vala_array_free (_tmp2_, _tmp2__length1, (GDestroyNotify) g_free), NULL);
 
723
        return self;
 
724
}
 
725
 
 
726
 
 
727
FrequencyFunction* frequency_function_new (void) {
 
728
        return frequency_function_construct (TYPE_FREQUENCY_FUNCTION);
 
729
}
 
730
 
 
731
 
 
732
static gchar* frequency_function_real_call (Function* base, gchar** parameters, int parameters_length1, gboolean widest, GError** error) {
 
733
        FrequencyFunction * self;
 
734
        gchar* result = NULL;
 
735
        gchar** _tmp0_ = NULL;
 
736
        gint _tmp0__length1 = 0;
 
737
        gboolean _tmp2_ = FALSE;
 
738
        gchar** _tmp6_ = NULL;
 
739
        gint _tmp6__length1 = 0;
 
740
        const gchar* _tmp7_ = NULL;
 
741
        gdouble _tmp8_ = 0.0;
 
742
        gchar* _tmp9_ = NULL;
 
743
        GError * _inner_error_ = NULL;
 
744
        self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_FREQUENCY_FUNCTION, FrequencyFunction);
 
745
        _tmp0_ = parameters;
 
746
        _tmp0__length1 = parameters_length1;
 
747
        if (_tmp0__length1 != 1) {
 
748
                GError* _tmp1_ = NULL;
 
749
                _tmp1_ = function_error ("one parameter expected");
 
750
                _inner_error_ = _tmp1_;
 
751
                g_propagate_error (error, _inner_error_);
 
752
                return NULL;
 
753
        }
 
754
        _tmp2_ = widest;
 
755
        if (_tmp2_) {
 
756
                gchar** _tmp3_ = NULL;
 
757
                gint _tmp3__length1 = 0;
 
758
                gchar* _tmp4_ = NULL;
 
759
                gchar* _tmp5_ = NULL;
 
760
                _tmp3_ = parameters;
 
761
                _tmp3__length1 = parameters_length1;
 
762
                _tmp4_ = g_strdup ("999000000");
 
763
                _g_free0 (_tmp3_[0]);
 
764
                _tmp3_[0] = _tmp4_;
 
765
                _tmp5_ = _tmp3_[0];
 
766
        }
 
767
        _tmp6_ = parameters;
 
768
        _tmp6__length1 = parameters_length1;
 
769
        _tmp7_ = _tmp6_[0];
 
770
        _tmp8_ = double_parse (_tmp7_);
 
771
        _tmp9_ = utils_format_frequency (_tmp8_);
 
772
        result = _tmp9_;
 
773
        return result;
 
774
}
 
775
 
 
776
 
 
777
static void frequency_function_class_init (FrequencyFunctionClass * klass) {
 
778
        frequency_function_parent_class = g_type_class_peek_parent (klass);
 
779
        FUNCTION_CLASS (klass)->call = frequency_function_real_call;
 
780
}
 
781
 
 
782
 
 
783
static void frequency_function_instance_init (FrequencyFunction * self) {
 
784
}
 
785
 
 
786
 
 
787
GType frequency_function_get_type (void) {
 
788
        static volatile gsize frequency_function_type_id__volatile = 0;
 
789
        if (g_once_init_enter (&frequency_function_type_id__volatile)) {
 
790
                static const GTypeInfo g_define_type_info = { sizeof (FrequencyFunctionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) frequency_function_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FrequencyFunction), 0, (GInstanceInitFunc) frequency_function_instance_init, NULL };
 
791
                GType frequency_function_type_id;
 
792
                frequency_function_type_id = g_type_register_static (TYPE_FUNCTION, "FrequencyFunction", &g_define_type_info, 0);
 
793
                g_once_init_leave (&frequency_function_type_id__volatile, frequency_function_type_id);
 
794
        }
 
795
        return frequency_function_type_id__volatile;
 
796
}
 
797
 
 
798
 
681
799
PercentFunction* percent_function_construct (GType object_type) {
682
800
        PercentFunction * self = NULL;
683
 
        gchar* _tmp0_;
 
801
        gchar* _tmp0_ = NULL;
684
802
        gchar** _tmp1_ = NULL;
685
 
        gchar** _tmp2_;
686
 
        gint _tmp2__length1;
 
803
        gchar** _tmp2_ = NULL;
 
804
        gint _tmp2__length1 = 0;
687
805
        _tmp0_ = g_strdup ("value");
688
806
        _tmp1_ = g_new0 (gchar*, 1 + 1);
689
807
        _tmp1_[0] = _tmp0_;
703
821
static gchar* percent_function_real_call (Function* base, gchar** parameters, int parameters_length1, gboolean widest, GError** error) {
704
822
        PercentFunction * self;
705
823
        gchar* result = NULL;
706
 
        gchar** _tmp0_;
707
 
        gint _tmp0__length1;
708
 
        gboolean _tmp2_;
 
824
        gchar** _tmp0_ = NULL;
 
825
        gint _tmp0__length1 = 0;
 
826
        gboolean _tmp2_ = FALSE;
709
827
        const gchar* _tmp6_ = NULL;
710
 
        gchar** _tmp7_;
711
 
        gint _tmp7__length1;
712
 
        const gchar* _tmp8_;
 
828
        gchar** _tmp7_ = NULL;
 
829
        gint _tmp7__length1 = 0;
 
830
        const gchar* _tmp8_ = NULL;
713
831
        gdouble _tmp9_ = 0.0;
714
832
        gdouble _tmp10_ = 0.0;
715
833
        gchar* _tmp11_ = NULL;
716
834
        GError * _inner_error_ = NULL;
717
 
        self = PERCENT_FUNCTION (base);
 
835
        self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_PERCENT_FUNCTION, PercentFunction);
718
836
        _tmp0_ = parameters;
719
837
        _tmp0__length1 = parameters_length1;
720
838
        if (_tmp0__length1 != 1) {
726
844
        }
727
845
        _tmp2_ = widest;
728
846
        if (_tmp2_) {
729
 
                gchar** _tmp3_;
730
 
                gint _tmp3__length1;
731
 
                gchar* _tmp4_;
732
 
                gchar* _tmp5_;
 
847
                gchar** _tmp3_ = NULL;
 
848
                gint _tmp3__length1 = 0;
 
849
                gchar* _tmp4_ = NULL;
 
850
                gchar* _tmp5_ = NULL;
733
851
                _tmp3_ = parameters;
734
852
                _tmp3__length1 = parameters_length1;
735
853
                _tmp4_ = g_strdup ("1");