File: common-functions.c

package info (click to toggle)
sqlheavy 0.1.1-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 3,400 kB
  • sloc: ansic: 30,371; sh: 11,012; makefile: 367; sql: 20
file content (558 lines) | stat: -rw-r--r-- 18,243 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
/* common-functions.c generated by valac 0.16.0, the Vala compiler
 * generated from common-functions.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <SQLHeavy.h>
#include <stdio.h>

#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))



gint _vala_main (gchar** args, int args_length1);


/**
 * Demonstrates a few of the user-defined functions SQLHeavy can
 * register.
 */
static gchar* string_to_utf8 (const gchar* self, int* result_length1) {
	gchar* result = NULL;
	gint _tmp0_;
	gint _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* _result_;
	gint _result__length1;
	gint __result__size_;
	gint _tmp3_;
	gchar* _tmp4_;
	gint _tmp4__length1;
	gint _tmp5_;
	gint _tmp6_;
	gchar* _tmp7_;
	gint _tmp7__length1;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_new0 (gchar, _tmp1_ + 1);
	_result_ = _tmp2_;
	_result__length1 = _tmp1_ + 1;
	__result__size_ = _result__length1;
	_tmp3_ = _result__length1;
	_result__length1 = _tmp3_ - 1;
	_tmp4_ = _result_;
	_tmp4__length1 = _result__length1;
	_tmp5_ = strlen (self);
	_tmp6_ = _tmp5_;
	memcpy (_tmp4_, self, (gsize) _tmp6_);
	_tmp7_ = _result_;
	_tmp7__length1 = _result__length1;
	if (result_length1) {
		*result_length1 = _tmp7__length1;
	}
	result = _tmp7_;
	return result;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GError * _inner_error_ = NULL;
	{
		SQLHeavyDatabase* _tmp0_;
		SQLHeavyDatabase* db;
		SQLHeavyDatabase* _tmp1_;
		gchar* _tmp2_;
		gchar* test_string;
		FILE* _tmp3_;
		SQLHeavyDatabase* _tmp4_;
		SQLHeavyQuery* _tmp5_ = NULL;
		SQLHeavyQuery* query;
		SQLHeavyQuery* _tmp6_;
		const gchar* _tmp7_;
		SQLHeavyQuery* _tmp8_;
		SQLHeavyQueryResult* _tmp9_ = NULL;
		SQLHeavyQueryResult* res;
		SQLHeavyQueryResult* _tmp10_;
		gchar* _tmp11_ = NULL;
		gchar* _tmp12_;
		FILE* _tmp13_;
		gchar* _tmp14_;
		SQLHeavyQueryResult* _tmp15_;
		gchar* _tmp16_ = NULL;
		gchar* _tmp17_;
		FILE* _tmp18_;
		gchar* _tmp19_;
		SQLHeavyQueryResult* _tmp20_;
		gchar* _tmp21_ = NULL;
		gchar* _tmp22_;
		FILE* _tmp23_;
		gchar* _tmp24_;
		FILE* _tmp25_;
		FILE* _tmp26_;
		const gchar* _tmp27_;
		gint _tmp28_ = 0;
		gchar* _tmp29_ = NULL;
		guint8* data;
		gint data_length1;
		gint _data_size_;
		FILE* _tmp30_;
		const gchar* _tmp31_;
		gint _tmp32_;
		gint _tmp33_;
		SQLHeavyDatabase* _tmp34_;
		SQLHeavyQuery* _tmp35_ = NULL;
		SQLHeavyQuery* _tmp36_;
		SQLHeavyQuery* _tmp37_;
		guint8* _tmp38_;
		gint _tmp38__length1;
		SQLHeavyQuery* _tmp39_;
		SQLHeavyQueryResult* _tmp40_ = NULL;
		SQLHeavyQueryResult* _tmp41_;
		SQLHeavyQueryResult* _tmp42_;
		gint _tmp43_ = 0;
		guint8* _tmp44_ = NULL;
		guint8* _tmp45_;
		gint _tmp45__length1;
		guint8* compressed;
		gint compressed_length1;
		gint _compressed_size_;
		FILE* _tmp46_;
		guint8* _tmp47_;
		gint _tmp47__length1;
		SQLHeavyDatabase* _tmp48_;
		SQLHeavyQuery* _tmp49_ = NULL;
		SQLHeavyQuery* _tmp50_;
		SQLHeavyQuery* _tmp51_;
		guint8* _tmp52_;
		gint _tmp52__length1;
		const gchar* _tmp53_ = NULL;
		SQLHeavyQuery* _tmp54_;
		SQLHeavyQueryResult* _tmp55_ = NULL;
		SQLHeavyQueryResult* _tmp56_;
		SQLHeavyQueryResult* _tmp57_;
		gchar* _tmp58_ = NULL;
		gchar* _tmp59_;
		gchar* _tmp60_;
		gchar* _tmp61_;
		const gchar* _tmp62_;
		gboolean _tmp63_;
		FILE* _tmp64_;
		const gchar* _tmp65_;
		gchar* _tmp66_;
		gchar* _tmp67_;
		gchar* _tmp68_;
		gchar* _tmp69_;
		_tmp0_ = sql_heavy_database_new (NULL, (SQL_HEAVY_FILE_MODE_READ | SQL_HEAVY_FILE_MODE_WRITE) | SQL_HEAVY_FILE_MODE_CREATE, &_inner_error_);
		db = _tmp0_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_tmp1_ = db;
		sql_heavy_database_register_common_functions (_tmp1_);
		_tmp2_ = g_strdup ("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ege" \
"stas, risus eu consectetur malesuada, lacus dolor lobortis arcu, id vu" \
"lputate justo quam ut quam. Aenean nulla arcu, placerat eu pellentesqu" \
"e et, scelerisque non nunc. Praesent id mi metus. Aenean dignissim ves" \
"tibulum dolor, ac blandit massa sodales a. Lorem ipsum dolor sit amet," \
" consectetur adipiscing elit. Integer sem nunc, faucibus vel vestibulu" \
"m nec, luctus eu leo. Class aptent taciti sociosqu ad litora torquent " \
"per conubia nostra, per inceptos himenaeos. Pellentesque ultricies odi" \
"o a turpis pharetra rhoncus. Curabitur ut lectus eu nisl elementum imp" \
"erdiet sed at lectus. Cras vehicula urna sit amet arcu accumsan tristi" \
"que. Proin ultrices, leo auctor tempor commodo, metus justo luctus lor" \
"em, a egestas urna purus sit amet dolor. Praesent ullamcorper elit et " \
"leo interdum porta.");
		test_string = _tmp2_;
		_tmp3_ = stdout;
		fputs ("Testing cryptographic hashes...\n", _tmp3_);
		_tmp4_ = db;
		_tmp5_ = sql_heavy_queryable_prepare ((SQLHeavyQueryable*) _tmp4_, "SELECT MD5(:data), SHA1(:data), SHA256(:data);", &_inner_error_);
		query = _tmp5_;
		if (_inner_error_ != NULL) {
			_g_free0 (test_string);
			_g_object_unref0 (db);
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			_g_free0 (test_string);
			_g_object_unref0 (db);
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_tmp6_ = query;
		_tmp7_ = test_string;
		sql_heavy_query_set_string (_tmp6_, ":data", _tmp7_, &_inner_error_);
		if (_inner_error_ != NULL) {
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_tmp8_ = query;
		_tmp9_ = sql_heavy_query_execute (_tmp8_, NULL, &_inner_error_, NULL);
		res = _tmp9_;
		if (_inner_error_ != NULL) {
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_tmp10_ = res;
		_tmp11_ = sql_heavy_record_fetch_string ((SQLHeavyRecord*) _tmp10_, 0, &_inner_error_);
		_tmp12_ = _tmp11_;
		if (_inner_error_ != NULL) {
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_tmp13_ = stdout;
		_tmp14_ = _tmp12_;
		fprintf (_tmp13_, "   MD5: %s\n", _tmp14_);
		_g_free0 (_tmp14_);
		_tmp15_ = res;
		_tmp16_ = sql_heavy_record_fetch_string ((SQLHeavyRecord*) _tmp15_, 1, &_inner_error_);
		_tmp17_ = _tmp16_;
		if (_inner_error_ != NULL) {
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_tmp18_ = stdout;
		_tmp19_ = _tmp17_;
		fprintf (_tmp18_, "  SHA1: %s\n", _tmp19_);
		_g_free0 (_tmp19_);
		_tmp20_ = res;
		_tmp21_ = sql_heavy_record_fetch_string ((SQLHeavyRecord*) _tmp20_, 2, &_inner_error_);
		_tmp22_ = _tmp21_;
		if (_inner_error_ != NULL) {
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_tmp23_ = stdout;
		_tmp24_ = _tmp22_;
		fprintf (_tmp23_, "SHA256: %s\n", _tmp24_);
		_g_free0 (_tmp24_);
		_tmp25_ = stdout;
		fputc ('\n', _tmp25_);
		_tmp26_ = stdout;
		fputs ("Testing compression...\n", _tmp26_);
		_tmp27_ = test_string;
		_tmp29_ = string_to_utf8 (_tmp27_, &_tmp28_);
		data = (guint8*) _tmp29_;
		data_length1 = _tmp28_;
		_data_size_ = data_length1;
		_tmp30_ = stdout;
		_tmp31_ = test_string;
		_tmp32_ = strlen (_tmp31_);
		_tmp33_ = _tmp32_;
		fprintf (_tmp30_, "Original size: %d bytes\n", (gint) _tmp33_);
		_tmp34_ = db;
		_tmp35_ = sql_heavy_queryable_prepare ((SQLHeavyQueryable*) _tmp34_, "SELECT COMPRESS(:data);", &_inner_error_);
		_tmp36_ = _tmp35_;
		if (_inner_error_ != NULL) {
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_g_object_unref0 (query);
		query = _tmp36_;
		_tmp37_ = query;
		_tmp38_ = data;
		_tmp38__length1 = data_length1;
		sql_heavy_query_set_blob (_tmp37_, ":data", _tmp38_, _tmp38__length1, &_inner_error_);
		if (_inner_error_ != NULL) {
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_tmp39_ = query;
		_tmp40_ = sql_heavy_query_execute (_tmp39_, NULL, &_inner_error_, NULL);
		_tmp41_ = _tmp40_;
		if (_inner_error_ != NULL) {
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_tmp42_ = _tmp41_;
		_tmp44_ = sql_heavy_record_fetch_blob ((SQLHeavyRecord*) _tmp42_, 0, &_tmp43_, &_inner_error_);
		_tmp45_ = _tmp44_;
		_tmp45__length1 = _tmp43_;
		_g_object_unref0 (_tmp42_);
		compressed = _tmp45_;
		compressed_length1 = _tmp45__length1;
		_compressed_size_ = compressed_length1;
		if (_inner_error_ != NULL) {
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_tmp46_ = stdout;
		_tmp47_ = compressed;
		_tmp47__length1 = compressed_length1;
		fprintf (_tmp46_, "Compressed size: %d bytes\n", _tmp47__length1);
		_tmp48_ = db;
		_tmp49_ = sql_heavy_queryable_prepare ((SQLHeavyQueryable*) _tmp48_, "SELECT DECOMPRESS(:data);", &_inner_error_);
		_tmp50_ = _tmp49_;
		if (_inner_error_ != NULL) {
			compressed = (g_free (compressed), NULL);
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			compressed = (g_free (compressed), NULL);
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_g_object_unref0 (query);
		query = _tmp50_;
		_tmp51_ = query;
		_tmp52_ = compressed;
		_tmp52__length1 = compressed_length1;
		sql_heavy_query_set_blob (_tmp51_, ":data", _tmp52_, _tmp52__length1, &_inner_error_);
		if (_inner_error_ != NULL) {
			compressed = (g_free (compressed), NULL);
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			compressed = (g_free (compressed), NULL);
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_tmp54_ = query;
		_tmp55_ = sql_heavy_query_execute (_tmp54_, NULL, &_inner_error_, NULL);
		_tmp56_ = _tmp55_;
		if (_inner_error_ != NULL) {
			compressed = (g_free (compressed), NULL);
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			compressed = (g_free (compressed), NULL);
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_tmp57_ = _tmp56_;
		_tmp58_ = sql_heavy_record_fetch_string ((SQLHeavyRecord*) _tmp57_, 0, &_inner_error_);
		_tmp59_ = _tmp58_;
		_g_object_unref0 (_tmp57_);
		_tmp60_ = _tmp59_;
		if (_inner_error_ != NULL) {
			compressed = (g_free (compressed), NULL);
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				goto __catch0_sql_heavy_error;
			}
			compressed = (g_free (compressed), NULL);
			data = (g_free (data), NULL);
			_g_object_unref0 (res);
			_g_object_unref0 (query);
			_g_free0 (test_string);
			_g_object_unref0 (db);
			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);
			g_clear_error (&_inner_error_);
			return 0;
		}
		_tmp61_ = _tmp60_;
		_tmp62_ = test_string;
		_tmp63_ = g_strcmp0 (_tmp61_, _tmp62_) == 0;
		_g_free0 (_tmp61_);
		if (_tmp63_) {
			_tmp53_ = "successful";
		} else {
			_tmp53_ = "failed";
		}
		_tmp64_ = stdout;
		_tmp65_ = _tmp53_;
		_tmp66_ = g_strconcat ("Decompression ", _tmp65_, NULL);
		_tmp67_ = _tmp66_;
		_tmp68_ = g_strconcat (_tmp67_, ".\n", NULL);
		_tmp69_ = _tmp68_;
		fputs (_tmp69_, _tmp64_);
		_g_free0 (_tmp69_);
		_g_free0 (_tmp67_);
		compressed = (g_free (compressed), NULL);
		data = (g_free (data), NULL);
		_g_object_unref0 (res);
		_g_object_unref0 (query);
		_g_free0 (test_string);
		_g_object_unref0 (db);
	}
	goto __finally0;
	__catch0_sql_heavy_error:
	{
		GError* e = NULL;
		const gchar* _tmp70_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp70_ = e->message;
		g_error ("common-functions.vala:34: %s", _tmp70_);
		_g_error_free0 (e);
	}
	__finally0:
	if (_inner_error_ != NULL) {
		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);
		g_clear_error (&_inner_error_);
		return 0;
	}
	result = 0;
	return result;
}


int main (int argc, char ** argv) {
	g_type_init ();
	return _vala_main (argv, argc);
}