/* history.c generated by valac 0.34.0.4-5c9b2, the Vala compiler
 * generated from history.vala, do not modify */

/*
 * Copyright (C) 2010-2013 Robert Ancell
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 2 of the License, or (at your option) any later
 * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
 * license.
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gstdio.h>
#include <float.h>
#include <math.h>


#define TYPE_HISTORY (history_get_type ())
#define HISTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HISTORY, History))
#define HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HISTORY, HistoryClass))
#define IS_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HISTORY))
#define IS_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HISTORY))
#define HISTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HISTORY, HistoryClass))

typedef struct _History History;
typedef struct _HistoryClass HistoryClass;
typedef struct _HistoryPrivate HistoryPrivate;

#define TYPE_HISTORY_ENTRY (history_entry_get_type ())
#define HISTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HISTORY_ENTRY, HistoryEntry))
#define HISTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HISTORY_ENTRY, HistoryEntryClass))
#define IS_HISTORY_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HISTORY_ENTRY))
#define IS_HISTORY_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HISTORY_ENTRY))
#define HISTORY_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HISTORY_ENTRY, HistoryEntryClass))

typedef struct _HistoryEntry HistoryEntry;
typedef struct _HistoryEntryClass HistoryEntryClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _HistoryEntryPrivate HistoryEntryPrivate;
#define _g_time_zone_unref0(var) ((var == NULL) ? NULL : (var = (g_time_zone_unref (var), NULL)))

struct _History {
	GObject parent_instance;
	HistoryPrivate * priv;
	gchar* filename;
	GList* entries;
};

struct _HistoryClass {
	GObjectClass parent_class;
};

struct _HistoryEntry {
	GObject parent_instance;
	HistoryEntryPrivate * priv;
	GDateTime* date;
	gint score;
};

struct _HistoryEntryClass {
	GObjectClass parent_class;
};


static gpointer history_parent_class = NULL;
static gpointer history_entry_parent_class = NULL;

GType history_get_type (void) G_GNUC_CONST;
GType history_entry_get_type (void) G_GNUC_CONST;
enum  {
	HISTORY_DUMMY_PROPERTY
};
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
History* history_new (const gchar* filename);
History* history_construct (GType object_type, const gchar* filename);
void history_add (History* self, HistoryEntry* entry);
void history_load (History* self);
static GDateTime* history_parse_date (History* self, const gchar* date);
HistoryEntry* history_entry_new (GDateTime* date, gint score);
HistoryEntry* history_entry_construct (GType object_type, GDateTime* date, gint score);
void history_save (History* self);
static void history_finalize (GObject* obj);
enum  {
	HISTORY_ENTRY_DUMMY_PROPERTY
};
static void history_entry_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


static void _g_object_unref0_ (gpointer var) {
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 106 "history.c"
}


static void _g_list_free__g_object_unref0_ (GList* self) {
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	g_list_free (self);
#line 115 "history.c"
}


History* history_construct (GType object_type, const gchar* filename) {
	History * self = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 18 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	g_return_val_if_fail (filename != NULL, NULL);
#line 18 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	self = (History*) g_object_new (object_type, NULL);
#line 20 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp0_ = filename;
#line 20 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 20 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_g_free0 (self->filename);
#line 20 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	self->filename = _tmp1_;
#line 21 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	__g_list_free__g_object_unref0_0 (self->entries);
#line 21 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	self->entries = NULL;
#line 18 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	return self;
#line 141 "history.c"
}


History* history_new (const gchar* filename) {
#line 18 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	return history_construct (TYPE_HISTORY, filename);
#line 148 "history.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 26 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	return self ? g_object_ref (self) : NULL;
#line 155 "history.c"
}


void history_add (History* self, HistoryEntry* entry) {
	HistoryEntry* _tmp0_ = NULL;
	HistoryEntry* _tmp1_ = NULL;
	HistoryEntry* _tmp2_ = NULL;
#line 24 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	g_return_if_fail (self != NULL);
#line 24 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	g_return_if_fail (entry != NULL);
#line 26 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp0_ = entry;
#line 26 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 26 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	self->entries = g_list_append (self->entries, _tmp1_);
#line 27 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp2_ = entry;
#line 27 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	g_signal_emit_by_name (self, "entry-added", _tmp2_);
#line 177 "history.c"
}


void history_load (History* self) {
	gchar* contents = NULL;
	gchar* _tmp0_ = NULL;
	const gchar* _tmp6_ = NULL;
	gchar** _tmp7_ = NULL;
	gchar** _tmp8_ = NULL;
	GError * _inner_error_ = NULL;
#line 30 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	g_return_if_fail (self != NULL);
#line 32 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	__g_list_free__g_object_unref0_0 (self->entries);
#line 32 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	self->entries = NULL;
#line 34 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp0_ = g_strdup ("");
#line 34 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	contents = _tmp0_;
#line 198 "history.c"
	{
		const gchar* _tmp1_ = NULL;
		gchar* _tmp2_ = NULL;
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp1_ = self->filename;
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		g_file_get_contents (_tmp1_, &_tmp2_, NULL, &_inner_error_);
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_g_free0 (contents);
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		contents = _tmp2_;
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			if (_inner_error_->domain == G_FILE_ERROR) {
#line 214 "history.c"
				goto __catch3_g_file_error;
			}
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			_g_free0 (contents);
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			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);
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			g_clear_error (&_inner_error_);
#line 37 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			return;
#line 225 "history.c"
		}
	}
	goto __finally3;
	__catch3_g_file_error:
	{
		GError* e = NULL;
		GError* _tmp3_ = NULL;
#line 35 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		e = _inner_error_;
#line 35 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_inner_error_ = NULL;
#line 41 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp3_ = e;
#line 41 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		if (!g_error_matches (_tmp3_, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
#line 241 "history.c"
			GError* _tmp4_ = NULL;
			const gchar* _tmp5_ = NULL;
#line 42 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			_tmp4_ = e;
#line 42 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			_tmp5_ = _tmp4_->message;
#line 42 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			g_warning ("history.vala:42: Failed to load history: %s", _tmp5_);
#line 250 "history.c"
		}
#line 43 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_g_error_free0 (e);
#line 43 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_g_free0 (contents);
#line 43 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		return;
#line 258 "history.c"
	}
	__finally3:
#line 35 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 35 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_g_free0 (contents);
#line 35 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		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);
#line 35 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		g_clear_error (&_inner_error_);
#line 35 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		return;
#line 271 "history.c"
	}
#line 46 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp6_ = contents;
#line 46 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp8_ = _tmp7_ = g_strsplit (_tmp6_, "\n", 0);
#line 277 "history.c"
	{
		gchar** line_collection = NULL;
		gint line_collection_length1 = 0;
		gint _line_collection_size_ = 0;
		gint line_it = 0;
#line 46 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		line_collection = _tmp8_;
#line 46 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		line_collection_length1 = _vala_array_length (_tmp7_);
#line 46 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		for (line_it = 0; line_it < _vala_array_length (_tmp7_); line_it = line_it + 1) {
#line 289 "history.c"
			gchar* _tmp9_ = NULL;
			gchar* line = NULL;
#line 46 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			_tmp9_ = g_strdup (line_collection[line_it]);
#line 46 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			line = _tmp9_;
#line 296 "history.c"
			{
				gchar** tokens = NULL;
				const gchar* _tmp10_ = NULL;
				gchar** _tmp11_ = NULL;
				gchar** _tmp12_ = NULL;
				gint tokens_length1 = 0;
				gint _tokens_size_ = 0;
				gchar** _tmp13_ = NULL;
				gint _tmp13__length1 = 0;
				GDateTime* date = NULL;
				gchar** _tmp14_ = NULL;
				gint _tmp14__length1 = 0;
				const gchar* _tmp15_ = NULL;
				GDateTime* _tmp16_ = NULL;
				GDateTime* _tmp17_ = NULL;
				gint score = 0;
				gchar** _tmp18_ = NULL;
				gint _tmp18__length1 = 0;
				const gchar* _tmp19_ = NULL;
				gint _tmp20_ = 0;
				GDateTime* _tmp21_ = NULL;
				gint _tmp22_ = 0;
				HistoryEntry* _tmp23_ = NULL;
				HistoryEntry* _tmp24_ = NULL;
#line 48 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp10_ = line;
#line 48 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp12_ = _tmp11_ = g_strsplit (_tmp10_, " ", 0);
#line 48 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				tokens = _tmp12_;
#line 48 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				tokens_length1 = _vala_array_length (_tmp11_);
#line 48 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tokens_size_ = tokens_length1;
#line 49 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp13_ = tokens;
#line 49 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp13__length1 = tokens_length1;
#line 49 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				if (_tmp13__length1 != 2) {
#line 50 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
					tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
#line 50 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
					_g_free0 (line);
#line 50 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
					continue;
#line 343 "history.c"
				}
#line 52 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp14_ = tokens;
#line 52 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp14__length1 = tokens_length1;
#line 52 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp15_ = _tmp14_[0];
#line 52 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp16_ = history_parse_date (self, _tmp15_);
#line 52 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				date = _tmp16_;
#line 53 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp17_ = date;
#line 53 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				if (_tmp17_ == NULL) {
#line 54 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
					_g_date_time_unref0 (date);
#line 54 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
					tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
#line 54 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
					_g_free0 (line);
#line 54 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
					continue;
#line 367 "history.c"
				}
#line 55 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp18_ = tokens;
#line 55 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp18__length1 = tokens_length1;
#line 55 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp19_ = _tmp18_[1];
#line 55 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp20_ = atoi (_tmp19_);
#line 55 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				score = _tmp20_;
#line 57 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp21_ = date;
#line 57 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp22_ = score;
#line 57 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp23_ = history_entry_new (_tmp21_, _tmp22_);
#line 57 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp24_ = _tmp23_;
#line 57 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				history_add (self, _tmp24_);
#line 57 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_g_object_unref0 (_tmp24_);
#line 46 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_g_date_time_unref0 (date);
#line 46 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
#line 46 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_g_free0 (line);
#line 397 "history.c"
			}
		}
#line 46 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		line_collection = (_vala_array_free (line_collection, line_collection_length1, (GDestroyNotify) g_free), NULL);
#line 402 "history.c"
	}
#line 30 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_g_free0 (contents);
#line 406 "history.c"
}


static gchar* g_date_time_to_string (GDateTime* self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
#line 2834 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 2835 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp0_ = g_date_time_format (self, "%FT%H:%M:%S%z");
#line 2835 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	result = _tmp0_;
#line 2835 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	return result;
#line 421 "history.c"
}


void history_save (History* self) {
	gchar* contents = NULL;
	gchar* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	GError * _inner_error_ = NULL;
#line 61 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	g_return_if_fail (self != NULL);
#line 63 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp0_ = g_strdup ("");
#line 63 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	contents = _tmp0_;
#line 65 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp1_ = self->entries;
#line 438 "history.c"
	{
		GList* entry_collection = NULL;
		GList* entry_it = NULL;
#line 65 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		entry_collection = _tmp1_;
#line 65 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		for (entry_it = entry_collection; entry_it != NULL; entry_it = entry_it->next) {
#line 446 "history.c"
			HistoryEntry* _tmp2_ = NULL;
			HistoryEntry* entry = NULL;
#line 65 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			_tmp2_ = _g_object_ref0 ((HistoryEntry*) entry_it->data);
#line 65 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			entry = _tmp2_;
#line 453 "history.c"
			{
				gchar* line = NULL;
				HistoryEntry* _tmp3_ = NULL;
				GDateTime* _tmp4_ = NULL;
				gchar* _tmp5_ = NULL;
				gchar* _tmp6_ = NULL;
				HistoryEntry* _tmp7_ = NULL;
				gint _tmp8_ = 0;
				gchar* _tmp9_ = NULL;
				gchar* _tmp10_ = NULL;
				const gchar* _tmp11_ = NULL;
				const gchar* _tmp12_ = NULL;
				gchar* _tmp13_ = NULL;
#line 67 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp3_ = entry;
#line 67 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp4_ = _tmp3_->date;
#line 67 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp5_ = g_date_time_to_string (_tmp4_);
#line 67 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp6_ = _tmp5_;
#line 67 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp7_ = entry;
#line 67 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp8_ = _tmp7_->score;
#line 67 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp9_ = g_strdup_printf ("%s %i\n", _tmp6_, _tmp8_);
#line 67 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp10_ = _tmp9_;
#line 67 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_g_free0 (_tmp6_);
#line 67 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				line = _tmp10_;
#line 68 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp11_ = contents;
#line 68 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp12_ = line;
#line 68 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_tmp13_ = g_strconcat (_tmp11_, _tmp12_, NULL);
#line 68 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_g_free0 (contents);
#line 68 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				contents = _tmp13_;
#line 65 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_g_free0 (line);
#line 65 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
				_g_object_unref0 (entry);
#line 501 "history.c"
			}
		}
	}
	{
		const gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		gchar* _tmp16_ = NULL;
		const gchar* _tmp17_ = NULL;
		const gchar* _tmp18_ = NULL;
#line 73 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp14_ = self->filename;
#line 73 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp15_ = g_path_get_dirname (_tmp14_);
#line 73 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp16_ = _tmp15_;
#line 73 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		g_mkdir_with_parents (_tmp16_, 0775);
#line 73 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_g_free0 (_tmp16_);
#line 74 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp17_ = self->filename;
#line 74 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp18_ = contents;
#line 74 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		g_file_set_contents (_tmp17_, _tmp18_, (gssize) -1, &_inner_error_);
#line 74 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 74 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			if (_inner_error_->domain == G_FILE_ERROR) {
#line 531 "history.c"
				goto __catch4_g_file_error;
			}
#line 74 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			_g_free0 (contents);
#line 74 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			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);
#line 74 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			g_clear_error (&_inner_error_);
#line 74 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
			return;
#line 542 "history.c"
		}
	}
	goto __finally4;
	__catch4_g_file_error:
	{
		GError* e = NULL;
		GError* _tmp19_ = NULL;
		const gchar* _tmp20_ = NULL;
#line 71 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		e = _inner_error_;
#line 71 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_inner_error_ = NULL;
#line 78 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp19_ = e;
#line 78 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp20_ = _tmp19_->message;
#line 78 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		g_warning ("history.vala:78: Failed to save history: %s", _tmp20_);
#line 71 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_g_error_free0 (e);
#line 563 "history.c"
	}
	__finally4:
#line 71 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 71 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_g_free0 (contents);
#line 71 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		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);
#line 71 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		g_clear_error (&_inner_error_);
#line 71 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		return;
#line 576 "history.c"
	}
#line 61 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_g_free0 (contents);
#line 580 "history.c"
}


static gchar string_get (const gchar* self, glong index) {
	gchar result = '\0';
	glong _tmp0_ = 0L;
	gchar _tmp1_ = '\0';
#line 1086 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, '\0');
#line 1087 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp0_ = index;
#line 1087 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp1_ = ((gchar*) self)[_tmp0_];
#line 1087 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	result = _tmp1_;
#line 1087 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	return result;
#line 598 "history.c"
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_ = NULL;
	glong _tmp1_ = 0L;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 1295 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 1295 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp1_ = maxlen;
#line 1295 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
#line 1295 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	end = _tmp2_;
#line 1296 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp3_ = end;
#line 1296 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp3_ == NULL) {
#line 621 "history.c"
		glong _tmp4_ = 0L;
#line 1297 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp4_ = maxlen;
#line 1297 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		result = _tmp4_;
#line 1297 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		return result;
#line 629 "history.c"
	} else {
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
#line 1299 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp5_ = end;
#line 1299 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp6_ = str;
#line 1299 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		result = (glong) (_tmp5_ - _tmp6_);
#line 1299 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		return result;
#line 641 "history.c"
	}
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_ = 0L;
	glong _tmp8_ = 0L;
	glong _tmp14_ = 0L;
	glong _tmp17_ = 0L;
	glong _tmp18_ = 0L;
	glong _tmp19_ = 0L;
	glong _tmp20_ = 0L;
	glong _tmp21_ = 0L;
	gchar* _tmp22_ = NULL;
#line 1306 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1308 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp1_ = offset;
#line 1308 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp1_ >= ((glong) 0)) {
#line 665 "history.c"
		glong _tmp2_ = 0L;
#line 1308 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp2_ = len;
#line 1308 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp0_ = _tmp2_ >= ((glong) 0);
#line 671 "history.c"
	} else {
#line 1308 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp0_ = FALSE;
#line 675 "history.c"
	}
#line 1308 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp0_) {
#line 679 "history.c"
		glong _tmp3_ = 0L;
		glong _tmp4_ = 0L;
		glong _tmp5_ = 0L;
#line 1310 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp3_ = offset;
#line 1310 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp4_ = len;
#line 1310 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
#line 1310 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		string_length = _tmp5_;
#line 691 "history.c"
	} else {
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
#line 1312 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp6_ = strlen (self);
#line 1312 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp7_ = _tmp6_;
#line 1312 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		string_length = (glong) _tmp7_;
#line 701 "history.c"
	}
#line 1315 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp8_ = offset;
#line 1315 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp8_ < ((glong) 0)) {
#line 707 "history.c"
		glong _tmp9_ = 0L;
		glong _tmp10_ = 0L;
		glong _tmp11_ = 0L;
#line 1316 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp9_ = string_length;
#line 1316 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp10_ = offset;
#line 1316 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		offset = _tmp9_ + _tmp10_;
#line 1317 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp11_ = offset;
#line 1317 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
#line 721 "history.c"
	} else {
		glong _tmp12_ = 0L;
		glong _tmp13_ = 0L;
#line 1319 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp12_ = offset;
#line 1319 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp13_ = string_length;
#line 1319 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
#line 731 "history.c"
	}
#line 1321 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp14_ = len;
#line 1321 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	if (_tmp14_ < ((glong) 0)) {
#line 737 "history.c"
		glong _tmp15_ = 0L;
		glong _tmp16_ = 0L;
#line 1322 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp15_ = string_length;
#line 1322 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		_tmp16_ = offset;
#line 1322 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
		len = _tmp15_ - _tmp16_;
#line 746 "history.c"
	}
#line 1324 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp17_ = offset;
#line 1324 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp18_ = len;
#line 1324 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp19_ = string_length;
#line 1324 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
#line 1325 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp20_ = offset;
#line 1325 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp21_ = len;
#line 1325 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
#line 1325 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	result = _tmp22_;
#line 1325 "/home/mcatanzaro/src/jhbuild/install/share/vala-0.34/vapi/glib-2.0.vapi"
	return result;
#line 766 "history.c"
}


static GDateTime* history_parse_date (History* self, const gchar* date) {
	GDateTime* result = NULL;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	const gchar* _tmp5_ = NULL;
	gint _tmp6_ = 0;
	gint _tmp7_ = 0;
	gint year = 0;
	const gchar* _tmp18_ = NULL;
	gchar* _tmp19_ = NULL;
	gchar* _tmp20_ = NULL;
	gint _tmp21_ = 0;
	gint _tmp22_ = 0;
	gint month = 0;
	const gchar* _tmp23_ = NULL;
	gchar* _tmp24_ = NULL;
	gchar* _tmp25_ = NULL;
	gint _tmp26_ = 0;
	gint _tmp27_ = 0;
	gint day = 0;
	const gchar* _tmp28_ = NULL;
	gchar* _tmp29_ = NULL;
	gchar* _tmp30_ = NULL;
	gint _tmp31_ = 0;
	gint _tmp32_ = 0;
	gint hour = 0;
	const gchar* _tmp33_ = NULL;
	gchar* _tmp34_ = NULL;
	gchar* _tmp35_ = NULL;
	gint _tmp36_ = 0;
	gint _tmp37_ = 0;
	gint minute = 0;
	const gchar* _tmp38_ = NULL;
	gchar* _tmp39_ = NULL;
	gchar* _tmp40_ = NULL;
	gint _tmp41_ = 0;
	gint _tmp42_ = 0;
	gint seconds = 0;
	const gchar* _tmp43_ = NULL;
	gchar* _tmp44_ = NULL;
	gchar* _tmp45_ = NULL;
	gint _tmp46_ = 0;
	gint _tmp47_ = 0;
	gchar* timezone = NULL;
	const gchar* _tmp48_ = NULL;
	gchar* _tmp49_ = NULL;
	const gchar* _tmp50_ = NULL;
	GTimeZone* _tmp51_ = NULL;
	GTimeZone* _tmp52_ = NULL;
	gint _tmp53_ = 0;
	gint _tmp54_ = 0;
	gint _tmp55_ = 0;
	gint _tmp56_ = 0;
	gint _tmp57_ = 0;
	gint _tmp58_ = 0;
	GDateTime* _tmp59_ = NULL;
	GDateTime* _tmp60_ = NULL;
#line 82 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 82 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	g_return_val_if_fail (date != NULL, NULL);
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp5_ = date;
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp6_ = strlen (_tmp5_);
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp7_ = _tmp6_;
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	if (_tmp7_ < 19) {
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp4_ = TRUE;
#line 844 "history.c"
	} else {
		const gchar* _tmp8_ = NULL;
		gchar _tmp9_ = '\0';
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp8_ = date;
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp9_ = string_get (_tmp8_, (glong) 4);
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp4_ = _tmp9_ != '-';
#line 854 "history.c"
	}
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	if (_tmp4_) {
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp3_ = TRUE;
#line 860 "history.c"
	} else {
		const gchar* _tmp10_ = NULL;
		gchar _tmp11_ = '\0';
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp10_ = date;
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp11_ = string_get (_tmp10_, (glong) 7);
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp3_ = _tmp11_ != '-';
#line 870 "history.c"
	}
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	if (_tmp3_) {
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp2_ = TRUE;
#line 876 "history.c"
	} else {
		const gchar* _tmp12_ = NULL;
		gchar _tmp13_ = '\0';
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp12_ = date;
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp13_ = string_get (_tmp12_, (glong) 10);
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp2_ = _tmp13_ != 'T';
#line 886 "history.c"
	}
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	if (_tmp2_) {
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp1_ = TRUE;
#line 892 "history.c"
	} else {
		const gchar* _tmp14_ = NULL;
		gchar _tmp15_ = '\0';
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp14_ = date;
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp15_ = string_get (_tmp14_, (glong) 13);
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp1_ = _tmp15_ != ':';
#line 902 "history.c"
	}
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	if (_tmp1_) {
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp0_ = TRUE;
#line 908 "history.c"
	} else {
		const gchar* _tmp16_ = NULL;
		gchar _tmp17_ = '\0';
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp16_ = date;
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp17_ = string_get (_tmp16_, (glong) 16);
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		_tmp0_ = _tmp17_ != ':';
#line 918 "history.c"
	}
#line 84 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	if (_tmp0_) {
#line 85 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		result = NULL;
#line 85 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
		return result;
#line 926 "history.c"
	}
#line 87 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp18_ = date;
#line 87 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp19_ = string_substring (_tmp18_, (glong) 0, (glong) 4);
#line 87 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp20_ = _tmp19_;
#line 87 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp21_ = atoi (_tmp20_);
#line 87 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp22_ = _tmp21_;
#line 87 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_g_free0 (_tmp20_);
#line 87 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	year = _tmp22_;
#line 88 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp23_ = date;
#line 88 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp24_ = string_substring (_tmp23_, (glong) 5, (glong) 2);
#line 88 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp25_ = _tmp24_;
#line 88 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp26_ = atoi (_tmp25_);
#line 88 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp27_ = _tmp26_;
#line 88 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_g_free0 (_tmp25_);
#line 88 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	month = _tmp27_;
#line 89 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp28_ = date;
#line 89 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp29_ = string_substring (_tmp28_, (glong) 8, (glong) 2);
#line 89 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp30_ = _tmp29_;
#line 89 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp31_ = atoi (_tmp30_);
#line 89 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp32_ = _tmp31_;
#line 89 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_g_free0 (_tmp30_);
#line 89 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	day = _tmp32_;
#line 90 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp33_ = date;
#line 90 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp34_ = string_substring (_tmp33_, (glong) 11, (glong) 2);
#line 90 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp35_ = _tmp34_;
#line 90 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp36_ = atoi (_tmp35_);
#line 90 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp37_ = _tmp36_;
#line 90 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_g_free0 (_tmp35_);
#line 90 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	hour = _tmp37_;
#line 91 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp38_ = date;
#line 91 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp39_ = string_substring (_tmp38_, (glong) 14, (glong) 2);
#line 91 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp40_ = _tmp39_;
#line 91 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp41_ = atoi (_tmp40_);
#line 91 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp42_ = _tmp41_;
#line 91 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_g_free0 (_tmp40_);
#line 91 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	minute = _tmp42_;
#line 92 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp43_ = date;
#line 92 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp44_ = string_substring (_tmp43_, (glong) 17, (glong) 2);
#line 92 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp45_ = _tmp44_;
#line 92 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp46_ = atoi (_tmp45_);
#line 92 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp47_ = _tmp46_;
#line 92 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_g_free0 (_tmp45_);
#line 92 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	seconds = _tmp47_;
#line 93 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp48_ = date;
#line 93 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp49_ = string_substring (_tmp48_, (glong) 19, (glong) -1);
#line 93 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	timezone = _tmp49_;
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp50_ = timezone;
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp51_ = g_time_zone_new (_tmp50_);
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp52_ = _tmp51_;
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp53_ = year;
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp54_ = month;
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp55_ = day;
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp56_ = hour;
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp57_ = minute;
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp58_ = seconds;
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp59_ = g_date_time_new (_tmp52_, _tmp53_, _tmp54_, _tmp55_, _tmp56_, _tmp57_, (gdouble) _tmp58_);
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp60_ = _tmp59_;
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_g_time_zone_unref0 (_tmp52_);
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	result = _tmp60_;
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_g_free0 (timezone);
#line 95 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	return result;
#line 1048 "history.c"
}


static void history_class_init (HistoryClass * klass) {
#line 11 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	history_parent_class = g_type_class_peek_parent (klass);
#line 11 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	G_OBJECT_CLASS (klass)->finalize = history_finalize;
#line 11 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	g_signal_new ("entry_added", TYPE_HISTORY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TYPE_HISTORY_ENTRY);
#line 1059 "history.c"
}


static void history_instance_init (History * self) {
}


static void history_finalize (GObject* obj) {
	History * self;
#line 11 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_HISTORY, History);
#line 13 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_g_free0 (self->filename);
#line 14 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	__g_list_free__g_object_unref0_0 (self->entries);
#line 11 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	G_OBJECT_CLASS (history_parent_class)->finalize (obj);
#line 1077 "history.c"
}


GType history_get_type (void) {
	static volatile gsize history_type_id__volatile = 0;
	if (g_once_init_enter (&history_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (HistoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) history_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (History), 0, (GInstanceInitFunc) history_instance_init, NULL };
		GType history_type_id;
		history_type_id = g_type_register_static (G_TYPE_OBJECT, "History", &g_define_type_info, 0);
		g_once_init_leave (&history_type_id__volatile, history_type_id);
	}
	return history_type_id__volatile;
}


static gpointer _g_date_time_ref0 (gpointer self) {
#line 106 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	return self ? g_date_time_ref (self) : NULL;
#line 1096 "history.c"
}


HistoryEntry* history_entry_construct (GType object_type, GDateTime* date, gint score) {
	HistoryEntry * self = NULL;
	GDateTime* _tmp0_ = NULL;
	GDateTime* _tmp1_ = NULL;
	gint _tmp2_ = 0;
#line 104 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	g_return_val_if_fail (date != NULL, NULL);
#line 104 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	self = (HistoryEntry*) g_object_new (object_type, NULL);
#line 106 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp0_ = date;
#line 106 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp1_ = _g_date_time_ref0 (_tmp0_);
#line 106 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_g_date_time_unref0 (self->date);
#line 106 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	self->date = _tmp1_;
#line 107 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_tmp2_ = score;
#line 107 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	self->score = _tmp2_;
#line 104 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	return self;
#line 1123 "history.c"
}


HistoryEntry* history_entry_new (GDateTime* date, gint score) {
#line 104 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	return history_entry_construct (TYPE_HISTORY_ENTRY, date, score);
#line 1130 "history.c"
}


static void history_entry_class_init (HistoryEntryClass * klass) {
#line 99 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	history_entry_parent_class = g_type_class_peek_parent (klass);
#line 99 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	G_OBJECT_CLASS (klass)->finalize = history_entry_finalize;
#line 1139 "history.c"
}


static void history_entry_instance_init (HistoryEntry * self) {
}


static void history_entry_finalize (GObject* obj) {
	HistoryEntry * self;
#line 99 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_HISTORY_ENTRY, HistoryEntry);
#line 101 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	_g_date_time_unref0 (self->date);
#line 99 "/home/mcatanzaro/src/jhbuild/checkout/quadrapassel/src/history.vala"
	G_OBJECT_CLASS (history_entry_parent_class)->finalize (obj);
#line 1155 "history.c"
}


GType history_entry_get_type (void) {
	static volatile gsize history_entry_type_id__volatile = 0;
	if (g_once_init_enter (&history_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (HistoryEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) history_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (HistoryEntry), 0, (GInstanceInitFunc) history_entry_instance_init, NULL };
		GType history_entry_type_id;
		history_entry_type_id = g_type_register_static (G_TYPE_OBJECT, "HistoryEntry", &g_define_type_info, 0);
		g_once_init_leave (&history_entry_type_id__volatile, history_entry_type_id);
	}
	return history_entry_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



