/* post_processors.c generated by valac 0.12.0, the Vala compiler
 * generated from post_processors.vala, do not modify */

/*
 * This file is part of LaTeXila.
 *
 * Copyright © 2010-2011 Sébastien Wilmet
 *
 * LaTeXila 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 3 of the License, or
 * (at your option) any later version.
 *
 * LaTeXila is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with LaTeXila.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <gio/gio.h>
#include <stdio.h>


#define TYPE_POST_PROCESSOR_ISSUES (post_processor_issues_get_type ())

#define TYPE_PARTITION_STATE (partition_state_get_type ())

#define TYPE_BUILD_ISSUE (build_issue_get_type ())

#define TYPE_BUILD_MESSAGE_TYPE (build_message_type_get_type ())
typedef struct _BuildIssue BuildIssue;
typedef struct _PostProcessorIssues PostProcessorIssues;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_POST_PROCESSOR (post_processor_get_type ())
#define POST_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_POST_PROCESSOR, PostProcessor))
#define IS_POST_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_POST_PROCESSOR))
#define POST_PROCESSOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_POST_PROCESSOR, PostProcessorIface))

typedef struct _PostProcessor PostProcessor;
typedef struct _PostProcessorIface PostProcessorIface;

#define TYPE_NO_OUTPUT_POST_PROCESSOR (no_output_post_processor_get_type ())
#define NO_OUTPUT_POST_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_NO_OUTPUT_POST_PROCESSOR, NoOutputPostProcessor))
#define NO_OUTPUT_POST_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NO_OUTPUT_POST_PROCESSOR, NoOutputPostProcessorClass))
#define IS_NO_OUTPUT_POST_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_NO_OUTPUT_POST_PROCESSOR))
#define IS_NO_OUTPUT_POST_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NO_OUTPUT_POST_PROCESSOR))
#define NO_OUTPUT_POST_PROCESSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NO_OUTPUT_POST_PROCESSOR, NoOutputPostProcessorClass))

typedef struct _NoOutputPostProcessor NoOutputPostProcessor;
typedef struct _NoOutputPostProcessorClass NoOutputPostProcessorClass;
typedef struct _NoOutputPostProcessorPrivate NoOutputPostProcessorPrivate;

#define TYPE_ALL_OUTPUT_POST_PROCESSOR (all_output_post_processor_get_type ())
#define ALL_OUTPUT_POST_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALL_OUTPUT_POST_PROCESSOR, AllOutputPostProcessor))
#define ALL_OUTPUT_POST_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALL_OUTPUT_POST_PROCESSOR, AllOutputPostProcessorClass))
#define IS_ALL_OUTPUT_POST_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALL_OUTPUT_POST_PROCESSOR))
#define IS_ALL_OUTPUT_POST_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALL_OUTPUT_POST_PROCESSOR))
#define ALL_OUTPUT_POST_PROCESSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALL_OUTPUT_POST_PROCESSOR, AllOutputPostProcessorClass))

typedef struct _AllOutputPostProcessor AllOutputPostProcessor;
typedef struct _AllOutputPostProcessorClass AllOutputPostProcessorClass;
typedef struct _AllOutputPostProcessorPrivate AllOutputPostProcessorPrivate;

#define TYPE_RUBBER_POST_PROCESSOR (rubber_post_processor_get_type ())
#define RUBBER_POST_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RUBBER_POST_PROCESSOR, RubberPostProcessor))
#define RUBBER_POST_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_RUBBER_POST_PROCESSOR, RubberPostProcessorClass))
#define IS_RUBBER_POST_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RUBBER_POST_PROCESSOR))
#define IS_RUBBER_POST_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_RUBBER_POST_PROCESSOR))
#define RUBBER_POST_PROCESSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_RUBBER_POST_PROCESSOR, RubberPostProcessorClass))

typedef struct _RubberPostProcessor RubberPostProcessor;
typedef struct _RubberPostProcessorClass RubberPostProcessorClass;
typedef struct _RubberPostProcessorPrivate RubberPostProcessorPrivate;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_match_info_free0(var) ((var == NULL) ? NULL : (var = (g_match_info_free (var), NULL)))

#define TYPE_LATEXMK_POST_PROCESSOR (latexmk_post_processor_get_type ())
#define LATEXMK_POST_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LATEXMK_POST_PROCESSOR, LatexmkPostProcessor))
#define LATEXMK_POST_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LATEXMK_POST_PROCESSOR, LatexmkPostProcessorClass))
#define IS_LATEXMK_POST_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LATEXMK_POST_PROCESSOR))
#define IS_LATEXMK_POST_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LATEXMK_POST_PROCESSOR))
#define LATEXMK_POST_PROCESSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LATEXMK_POST_PROCESSOR, LatexmkPostProcessorClass))

typedef struct _LatexmkPostProcessor LatexmkPostProcessor;
typedef struct _LatexmkPostProcessorClass LatexmkPostProcessorClass;
typedef struct _LatexmkPostProcessorPrivate LatexmkPostProcessorPrivate;

#define TYPE_LATEX_POST_PROCESSOR (latex_post_processor_get_type ())
#define LATEX_POST_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LATEX_POST_PROCESSOR, LatexPostProcessor))
#define LATEX_POST_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LATEX_POST_PROCESSOR, LatexPostProcessorClass))
#define IS_LATEX_POST_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LATEX_POST_PROCESSOR))
#define IS_LATEX_POST_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LATEX_POST_PROCESSOR))
#define LATEX_POST_PROCESSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LATEX_POST_PROCESSOR, LatexPostProcessorClass))

typedef struct _LatexPostProcessor LatexPostProcessor;
typedef struct _LatexPostProcessorClass LatexPostProcessorClass;

typedef enum  {
	PARTITION_STATE_RUNNING,
	PARTITION_STATE_SUCCEEDED,
	PARTITION_STATE_FAILED,
	PARTITION_STATE_ABORTED
} PartitionState;

typedef enum  {
	BUILD_MESSAGE_TYPE_ERROR,
	BUILD_MESSAGE_TYPE_WARNING,
	BUILD_MESSAGE_TYPE_BADBOX,
	BUILD_MESSAGE_TYPE_OTHER
} BuildMessageType;

struct _BuildIssue {
	gchar* message;
	BuildMessageType message_type;
	gchar* filename;
	gint start_line;
	gint end_line;
};

struct _PostProcessorIssues {
	gchar* partition_msg;
	PartitionState partition_state;
	GeeArrayList* issues;
};

struct _PostProcessorIface {
	GTypeInterface parent_iface;
	void (*process) (PostProcessor* self, GFile* file, const gchar* output, gint status);
	PostProcessorIssues* (*get_issues) (PostProcessor* self, int* result_length1);
	gboolean (*get_successful) (PostProcessor* self);
	void (*set_successful) (PostProcessor* self, gboolean value);
};

struct _NoOutputPostProcessor {
	GObject parent_instance;
	NoOutputPostProcessorPrivate * priv;
};

struct _NoOutputPostProcessorClass {
	GObjectClass parent_class;
};

struct _NoOutputPostProcessorPrivate {
	gboolean _successful;
};

struct _AllOutputPostProcessor {
	GObject parent_instance;
	AllOutputPostProcessorPrivate * priv;
};

struct _AllOutputPostProcessorClass {
	GObjectClass parent_class;
};

struct _AllOutputPostProcessorPrivate {
	gboolean _successful;
	GeeArrayList* issues;
};

struct _RubberPostProcessor {
	GObject parent_instance;
	RubberPostProcessorPrivate * priv;
};

struct _RubberPostProcessorClass {
	GObjectClass parent_class;
};

struct _RubberPostProcessorPrivate {
	gboolean _successful;
	GeeArrayList* issues;
};

struct _LatexmkPostProcessor {
	GObject parent_instance;
	LatexmkPostProcessorPrivate * priv;
};

struct _LatexmkPostProcessorClass {
	GObjectClass parent_class;
};

struct _LatexmkPostProcessorPrivate {
	gboolean _successful;
	PostProcessorIssues* all_issues;
	gint all_issues_length1;
	gint _all_issues_size_;
	gboolean show_all;
};


static gpointer no_output_post_processor_parent_class = NULL;
static PostProcessorIface* no_output_post_processor_post_processor_parent_iface = NULL;
static gpointer all_output_post_processor_parent_class = NULL;
static PostProcessorIface* all_output_post_processor_post_processor_parent_iface = NULL;
static gpointer rubber_post_processor_parent_class = NULL;
static GRegex* rubber_post_processor_pattern;
static GRegex* rubber_post_processor_pattern = NULL;
static PostProcessorIface* rubber_post_processor_post_processor_parent_iface = NULL;
static gpointer latexmk_post_processor_parent_class = NULL;
static GRegex* latexmk_post_processor_reg_rule;
static GRegex* latexmk_post_processor_reg_rule = NULL;
static GRegex* latexmk_post_processor_reg_no_rule;
static GRegex* latexmk_post_processor_reg_no_rule = NULL;
static PostProcessorIface* latexmk_post_processor_post_processor_parent_iface = NULL;

GType post_processor_issues_get_type (void) G_GNUC_CONST;
GType partition_state_get_type (void) G_GNUC_CONST;
GType build_issue_get_type (void) G_GNUC_CONST;
GType build_message_type_get_type (void) G_GNUC_CONST;
BuildIssue* build_issue_dup (const BuildIssue* self);
void build_issue_free (BuildIssue* self);
void build_issue_copy (const BuildIssue* self, BuildIssue* dest);
void build_issue_destroy (BuildIssue* self);
PostProcessorIssues* post_processor_issues_dup (const PostProcessorIssues* self);
void post_processor_issues_free (PostProcessorIssues* self);
void post_processor_issues_copy (const PostProcessorIssues* self, PostProcessorIssues* dest);
void post_processor_issues_destroy (PostProcessorIssues* self);
GType post_processor_get_type (void) G_GNUC_CONST;
void post_processor_process (PostProcessor* self, GFile* file, const gchar* output, gint status);
PostProcessorIssues* post_processor_get_issues (PostProcessor* self, int* result_length1);
gboolean post_processor_get_successful (PostProcessor* self);
void post_processor_set_successful (PostProcessor* self, gboolean value);
GType no_output_post_processor_get_type (void) G_GNUC_CONST;
#define NO_OUTPUT_POST_PROCESSOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_NO_OUTPUT_POST_PROCESSOR, NoOutputPostProcessorPrivate))
enum  {
	NO_OUTPUT_POST_PROCESSOR_DUMMY_PROPERTY,
	NO_OUTPUT_POST_PROCESSOR_SUCCESSFUL
};
static void no_output_post_processor_real_process (PostProcessor* base, GFile* file, const gchar* output, gint status);
static PostProcessorIssues* no_output_post_processor_real_get_issues (PostProcessor* base, int* result_length1);
static void _vala_PostProcessorIssues_array_free (PostProcessorIssues* array, gint array_length);
NoOutputPostProcessor* no_output_post_processor_new (void);
NoOutputPostProcessor* no_output_post_processor_construct (GType object_type);
static void no_output_post_processor_finalize (GObject* obj);
static void _vala_no_output_post_processor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_no_output_post_processor_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType all_output_post_processor_get_type (void) G_GNUC_CONST;
#define ALL_OUTPUT_POST_PROCESSOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ALL_OUTPUT_POST_PROCESSOR, AllOutputPostProcessorPrivate))
enum  {
	ALL_OUTPUT_POST_PROCESSOR_DUMMY_PROPERTY,
	ALL_OUTPUT_POST_PROCESSOR_SUCCESSFUL
};
static void all_output_post_processor_real_process (PostProcessor* base, GFile* file, const gchar* output, gint status);
static PostProcessorIssues* all_output_post_processor_real_get_issues (PostProcessor* base, int* result_length1);
AllOutputPostProcessor* all_output_post_processor_new (void);
AllOutputPostProcessor* all_output_post_processor_construct (GType object_type);
static void all_output_post_processor_finalize (GObject* obj);
static void _vala_all_output_post_processor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_all_output_post_processor_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType rubber_post_processor_get_type (void) G_GNUC_CONST;
#define RUBBER_POST_PROCESSOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_RUBBER_POST_PROCESSOR, RubberPostProcessorPrivate))
enum  {
	RUBBER_POST_PROCESSOR_DUMMY_PROPERTY,
	RUBBER_POST_PROCESSOR_SUCCESSFUL
};
RubberPostProcessor* rubber_post_processor_new (void);
RubberPostProcessor* rubber_post_processor_construct (GType object_type);
static void rubber_post_processor_real_process (PostProcessor* base, GFile* file, const gchar* output, gint status);
static PostProcessorIssues* rubber_post_processor_real_get_issues (PostProcessor* base, int* result_length1);
static void rubber_post_processor_finalize (GObject* obj);
static void _vala_rubber_post_processor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_rubber_post_processor_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType latexmk_post_processor_get_type (void) G_GNUC_CONST;
#define LATEXMK_POST_PROCESSOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_LATEXMK_POST_PROCESSOR, LatexmkPostProcessorPrivate))
enum  {
	LATEXMK_POST_PROCESSOR_DUMMY_PROPERTY,
	LATEXMK_POST_PROCESSOR_SUCCESSFUL
};
LatexmkPostProcessor* latexmk_post_processor_new (gboolean show_all);
LatexmkPostProcessor* latexmk_post_processor_construct (GType object_type, gboolean show_all);
static void latexmk_post_processor_real_process (PostProcessor* base, GFile* file, const gchar* output, gint status);
static void _vala_array_add8 (PostProcessorIssues** array, int* length, int* size, const PostProcessorIssues* value);
LatexPostProcessor* latex_post_processor_new (void);
LatexPostProcessor* latex_post_processor_construct (GType object_type);
GType latex_post_processor_get_type (void) G_GNUC_CONST;
static PostProcessorIssues* _vala_array_dup4 (PostProcessorIssues* self, int length);
static PostProcessorIssues* latexmk_post_processor_real_get_issues (PostProcessor* base, int* result_length1);
static PostProcessorIssues* _vala_array_dup5 (PostProcessorIssues* self, int length);
static void latexmk_post_processor_finalize (GObject* obj);
static void _vala_latexmk_post_processor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_latexmk_post_processor_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
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 gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


void post_processor_issues_copy (const PostProcessorIssues* self, PostProcessorIssues* dest) {
	dest->partition_msg = g_strdup (self->partition_msg);
	dest->partition_state = self->partition_state;
	dest->issues = _g_object_ref0 (self->issues);
}


void post_processor_issues_destroy (PostProcessorIssues* self) {
	_g_free0 ((*self).partition_msg);
	_g_object_unref0 ((*self).issues);
}


PostProcessorIssues* post_processor_issues_dup (const PostProcessorIssues* self) {
	PostProcessorIssues* dup;
	dup = g_new0 (PostProcessorIssues, 1);
	post_processor_issues_copy (self, dup);
	return dup;
}


void post_processor_issues_free (PostProcessorIssues* self) {
	post_processor_issues_destroy (self);
	g_free (self);
}


GType post_processor_issues_get_type (void) {
	static volatile gsize post_processor_issues_type_id__volatile = 0;
	if (g_once_init_enter (&post_processor_issues_type_id__volatile)) {
		GType post_processor_issues_type_id;
		post_processor_issues_type_id = g_boxed_type_register_static ("PostProcessorIssues", (GBoxedCopyFunc) post_processor_issues_dup, (GBoxedFreeFunc) post_processor_issues_free);
		g_once_init_leave (&post_processor_issues_type_id__volatile, post_processor_issues_type_id);
	}
	return post_processor_issues_type_id__volatile;
}


void post_processor_process (PostProcessor* self, GFile* file, const gchar* output, gint status) {
	POST_PROCESSOR_GET_INTERFACE (self)->process (self, file, output, status);
}


PostProcessorIssues* post_processor_get_issues (PostProcessor* self, int* result_length1) {
	return POST_PROCESSOR_GET_INTERFACE (self)->get_issues (self, result_length1);
}


gboolean post_processor_get_successful (PostProcessor* self) {
	return POST_PROCESSOR_GET_INTERFACE (self)->get_successful (self);
}


void post_processor_set_successful (PostProcessor* self, gboolean value) {
	POST_PROCESSOR_GET_INTERFACE (self)->set_successful (self, value);
}


static void post_processor_base_init (PostProcessorIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		g_object_interface_install_property (iface, g_param_spec_boolean ("successful", "successful", "successful", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	}
}


GType post_processor_get_type (void) {
	static volatile gsize post_processor_type_id__volatile = 0;
	if (g_once_init_enter (&post_processor_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (PostProcessorIface), (GBaseInitFunc) post_processor_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType post_processor_type_id;
		post_processor_type_id = g_type_register_static (G_TYPE_INTERFACE, "PostProcessor", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (post_processor_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&post_processor_type_id__volatile, post_processor_type_id);
	}
	return post_processor_type_id__volatile;
}


static void no_output_post_processor_real_process (PostProcessor* base, GFile* file, const gchar* output, gint status) {
	NoOutputPostProcessor * self;
	self = (NoOutputPostProcessor*) base;
	g_return_if_fail (file != NULL);
	g_return_if_fail (output != NULL);
	post_processor_set_successful ((PostProcessor*) self, status == 0);
}


static void _vala_PostProcessorIssues_array_free (PostProcessorIssues* array, gint array_length) {
	if (array != NULL) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			post_processor_issues_destroy (&array[i]);
		}
	}
	g_free (array);
}


static PostProcessorIssues* no_output_post_processor_real_get_issues (PostProcessor* base, int* result_length1) {
	NoOutputPostProcessor * self;
	PostProcessorIssues* result = NULL;
	PostProcessorIssues* _tmp0_ = NULL;
	PostProcessorIssues* issues;
	gint issues_length1;
	gint _issues_size_;
	PostProcessorIssues* _tmp1_;
	self = (NoOutputPostProcessor*) base;
	_tmp0_ = g_new0 (PostProcessorIssues, 0);
	issues = _tmp0_;
	issues_length1 = 0;
	_issues_size_ = 0;
	_tmp1_ = issues;
	*result_length1 = issues_length1;
	result = _tmp1_;
	return result;
}


NoOutputPostProcessor* no_output_post_processor_construct (GType object_type) {
	NoOutputPostProcessor * self = NULL;
	self = (NoOutputPostProcessor*) g_object_new (object_type, NULL);
	return self;
}


NoOutputPostProcessor* no_output_post_processor_new (void) {
	return no_output_post_processor_construct (TYPE_NO_OUTPUT_POST_PROCESSOR);
}


static gboolean no_output_post_processor_real_get_successful (PostProcessor* base) {
	gboolean result;
	NoOutputPostProcessor* self;
	self = (NoOutputPostProcessor*) base;
	result = self->priv->_successful;
	return result;
}


static void no_output_post_processor_real_set_successful (PostProcessor* base, gboolean value) {
	NoOutputPostProcessor* self;
	self = (NoOutputPostProcessor*) base;
	self->priv->_successful = value;
	g_object_notify ((GObject *) self, "successful");
}


static void no_output_post_processor_class_init (NoOutputPostProcessorClass * klass) {
	no_output_post_processor_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (NoOutputPostProcessorPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_no_output_post_processor_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_no_output_post_processor_set_property;
	G_OBJECT_CLASS (klass)->finalize = no_output_post_processor_finalize;
	g_object_class_override_property (G_OBJECT_CLASS (klass), NO_OUTPUT_POST_PROCESSOR_SUCCESSFUL, "successful");
}


static void no_output_post_processor_post_processor_interface_init (PostProcessorIface * iface) {
	no_output_post_processor_post_processor_parent_iface = g_type_interface_peek_parent (iface);
	iface->process = (void (*)(PostProcessor* ,GFile* ,const gchar* ,gint)) no_output_post_processor_real_process;
	iface->get_issues = (PostProcessorIssues* (*)(PostProcessor* ,int*)) no_output_post_processor_real_get_issues;
	iface->get_successful = no_output_post_processor_real_get_successful;
	iface->set_successful = no_output_post_processor_real_set_successful;
}


static void no_output_post_processor_instance_init (NoOutputPostProcessor * self) {
	self->priv = NO_OUTPUT_POST_PROCESSOR_GET_PRIVATE (self);
}


static void no_output_post_processor_finalize (GObject* obj) {
	NoOutputPostProcessor * self;
	self = NO_OUTPUT_POST_PROCESSOR (obj);
	G_OBJECT_CLASS (no_output_post_processor_parent_class)->finalize (obj);
}


GType no_output_post_processor_get_type (void) {
	static volatile gsize no_output_post_processor_type_id__volatile = 0;
	if (g_once_init_enter (&no_output_post_processor_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (NoOutputPostProcessorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) no_output_post_processor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NoOutputPostProcessor), 0, (GInstanceInitFunc) no_output_post_processor_instance_init, NULL };
		static const GInterfaceInfo post_processor_info = { (GInterfaceInitFunc) no_output_post_processor_post_processor_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType no_output_post_processor_type_id;
		no_output_post_processor_type_id = g_type_register_static (G_TYPE_OBJECT, "NoOutputPostProcessor", &g_define_type_info, 0);
		g_type_add_interface_static (no_output_post_processor_type_id, TYPE_POST_PROCESSOR, &post_processor_info);
		g_once_init_leave (&no_output_post_processor_type_id__volatile, no_output_post_processor_type_id);
	}
	return no_output_post_processor_type_id__volatile;
}


static void _vala_no_output_post_processor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	NoOutputPostProcessor * self;
	self = NO_OUTPUT_POST_PROCESSOR (object);
	switch (property_id) {
		case NO_OUTPUT_POST_PROCESSOR_SUCCESSFUL:
		g_value_set_boolean (value, post_processor_get_successful ((PostProcessor*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_no_output_post_processor_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	NoOutputPostProcessor * self;
	self = NO_OUTPUT_POST_PROCESSOR (object);
	switch (property_id) {
		case NO_OUTPUT_POST_PROCESSOR_SUCCESSFUL:
		post_processor_set_successful ((PostProcessor*) self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void all_output_post_processor_real_process (PostProcessor* base, GFile* file, const gchar* output, gint status) {
	AllOutputPostProcessor * self;
	gint _tmp0_;
	gchar** _tmp1_;
	gchar** _tmp2_ = NULL;
	gchar** lines;
	gint lines_length1;
	gint _lines_size_;
	gint l;
	gint _tmp3_;
	BuildIssue issue = {0};
	self = (AllOutputPostProcessor*) base;
	g_return_if_fail (file != NULL);
	g_return_if_fail (output != NULL);
	post_processor_set_successful ((PostProcessor*) self, status == 0);
	_tmp0_ = strlen (output);
	if (_tmp0_ == 0) {
		return;
	}
	_tmp2_ = _tmp1_ = g_strsplit (output, "\n", 0);
	lines = _tmp2_;
	lines_length1 = _vala_array_length (_tmp1_);
	_lines_size_ = _vala_array_length (_tmp1_);
	l = lines_length1;
	g_return_if_fail (l > 0);
	_tmp3_ = strlen (lines[l - 1]);
	if (_tmp3_ == 0) {
		l--;
	}
	memset (&issue, 0, sizeof (BuildIssue));
	issue.message_type = BUILD_MESSAGE_TYPE_OTHER;
	_g_free0 (issue.filename);
	issue.filename = NULL;
	issue.start_line = -1;
	issue.end_line = -1;
	{
		gint i;
		i = 0;
		{
			gboolean _tmp4_;
			_tmp4_ = TRUE;
			while (TRUE) {
				gchar* _tmp5_;
				if (!_tmp4_) {
					i++;
				}
				_tmp4_ = FALSE;
				if (!(i < l)) {
					break;
				}
				_tmp5_ = g_strdup (lines[i]);
				_g_free0 (issue.message);
				issue.message = _tmp5_;
				gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->issues, &issue);
			}
		}
	}
	build_issue_destroy (&issue);
	lines = (_vala_array_free (lines, lines_length1, (GDestroyNotify) g_free), NULL);
}


static PostProcessorIssues* all_output_post_processor_real_get_issues (PostProcessor* base, int* result_length1) {
	AllOutputPostProcessor * self;
	PostProcessorIssues* result = NULL;
	PostProcessorIssues* _tmp0_ = NULL;
	PostProcessorIssues* pp_issues;
	gint pp_issues_length1;
	gint _pp_issues_size_;
	GeeArrayList* _tmp1_;
	PostProcessorIssues* _tmp2_;
	self = (AllOutputPostProcessor*) base;
	_tmp0_ = g_new0 (PostProcessorIssues, 1);
	pp_issues = _tmp0_;
	pp_issues_length1 = 1;
	_pp_issues_size_ = 1;
	_g_free0 (pp_issues[0].partition_msg);
	pp_issues[0].partition_msg = NULL;
	_tmp1_ = _g_object_ref0 (self->priv->issues);
	_g_object_unref0 (pp_issues[0].issues);
	pp_issues[0].issues = _tmp1_;
	_tmp2_ = pp_issues;
	*result_length1 = pp_issues_length1;
	result = _tmp2_;
	return result;
}


AllOutputPostProcessor* all_output_post_processor_construct (GType object_type) {
	AllOutputPostProcessor * self = NULL;
	self = (AllOutputPostProcessor*) g_object_new (object_type, NULL);
	return self;
}


AllOutputPostProcessor* all_output_post_processor_new (void) {
	return all_output_post_processor_construct (TYPE_ALL_OUTPUT_POST_PROCESSOR);
}


static gboolean all_output_post_processor_real_get_successful (PostProcessor* base) {
	gboolean result;
	AllOutputPostProcessor* self;
	self = (AllOutputPostProcessor*) base;
	result = self->priv->_successful;
	return result;
}


static void all_output_post_processor_real_set_successful (PostProcessor* base, gboolean value) {
	AllOutputPostProcessor* self;
	self = (AllOutputPostProcessor*) base;
	self->priv->_successful = value;
	g_object_notify ((GObject *) self, "successful");
}


static void all_output_post_processor_class_init (AllOutputPostProcessorClass * klass) {
	all_output_post_processor_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (AllOutputPostProcessorPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_all_output_post_processor_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_all_output_post_processor_set_property;
	G_OBJECT_CLASS (klass)->finalize = all_output_post_processor_finalize;
	g_object_class_override_property (G_OBJECT_CLASS (klass), ALL_OUTPUT_POST_PROCESSOR_SUCCESSFUL, "successful");
}


static void all_output_post_processor_post_processor_interface_init (PostProcessorIface * iface) {
	all_output_post_processor_post_processor_parent_iface = g_type_interface_peek_parent (iface);
	iface->process = (void (*)(PostProcessor* ,GFile* ,const gchar* ,gint)) all_output_post_processor_real_process;
	iface->get_issues = (PostProcessorIssues* (*)(PostProcessor* ,int*)) all_output_post_processor_real_get_issues;
	iface->get_successful = all_output_post_processor_real_get_successful;
	iface->set_successful = all_output_post_processor_real_set_successful;
}


static void all_output_post_processor_instance_init (AllOutputPostProcessor * self) {
	GeeArrayList* _tmp0_ = NULL;
	self->priv = ALL_OUTPUT_POST_PROCESSOR_GET_PRIVATE (self);
	_tmp0_ = gee_array_list_new (TYPE_BUILD_ISSUE, (GBoxedCopyFunc) build_issue_dup, build_issue_free, NULL);
	self->priv->issues = _tmp0_;
}


static void all_output_post_processor_finalize (GObject* obj) {
	AllOutputPostProcessor * self;
	self = ALL_OUTPUT_POST_PROCESSOR (obj);
	_g_object_unref0 (self->priv->issues);
	G_OBJECT_CLASS (all_output_post_processor_parent_class)->finalize (obj);
}


GType all_output_post_processor_get_type (void) {
	static volatile gsize all_output_post_processor_type_id__volatile = 0;
	if (g_once_init_enter (&all_output_post_processor_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AllOutputPostProcessorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) all_output_post_processor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AllOutputPostProcessor), 0, (GInstanceInitFunc) all_output_post_processor_instance_init, NULL };
		static const GInterfaceInfo post_processor_info = { (GInterfaceInitFunc) all_output_post_processor_post_processor_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType all_output_post_processor_type_id;
		all_output_post_processor_type_id = g_type_register_static (G_TYPE_OBJECT, "AllOutputPostProcessor", &g_define_type_info, 0);
		g_type_add_interface_static (all_output_post_processor_type_id, TYPE_POST_PROCESSOR, &post_processor_info);
		g_once_init_leave (&all_output_post_processor_type_id__volatile, all_output_post_processor_type_id);
	}
	return all_output_post_processor_type_id__volatile;
}


static void _vala_all_output_post_processor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	AllOutputPostProcessor * self;
	self = ALL_OUTPUT_POST_PROCESSOR (object);
	switch (property_id) {
		case ALL_OUTPUT_POST_PROCESSOR_SUCCESSFUL:
		g_value_set_boolean (value, post_processor_get_successful ((PostProcessor*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_all_output_post_processor_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	AllOutputPostProcessor * self;
	self = ALL_OUTPUT_POST_PROCESSOR (object);
	switch (property_id) {
		case ALL_OUTPUT_POST_PROCESSOR_SUCCESSFUL:
		post_processor_set_successful ((PostProcessor*) self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


RubberPostProcessor* rubber_post_processor_construct (GType object_type) {
	RubberPostProcessor * self = NULL;
	GError * _inner_error_ = NULL;
	self = (RubberPostProcessor*) g_object_new (object_type, NULL);
	if (rubber_post_processor_pattern == NULL) {
		GRegex* _tmp0_ = NULL;
		GRegex* _tmp1_;
		_tmp0_ = g_regex_new ("(?P<file>[^:\n]+)(:(?P<line>[0-9\\-]+))?:(?P<text>.+)$", G_REGEX_MULTILINE, 0, &_inner_error_);
		_tmp1_ = _tmp0_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch27_g_regex_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 NULL;
		}
		_g_regex_unref0 (rubber_post_processor_pattern);
		rubber_post_processor_pattern = _tmp1_;
		goto __finally27;
		__catch27_g_regex_error:
		{
			GError * e;
			e = _inner_error_;
			_inner_error_ = NULL;
			fprintf (stderr, "RubberPostProcessor: %s\n", e->message);
			_g_error_free0 (e);
		}
		__finally27:
		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 NULL;
		}
	}
	return self;
}


RubberPostProcessor* rubber_post_processor_new (void) {
	return rubber_post_processor_construct (TYPE_RUBBER_POST_PROCESSOR);
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	gchar* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}


static gchar string_get (const gchar* self, glong index) {
	gchar result = '\0';
	g_return_val_if_fail (self != NULL, '\0');
	result = ((gchar*) self)[index];
	return result;
}


static void rubber_post_processor_real_process (PostProcessor* base, GFile* file, const gchar* output, gint status) {
	RubberPostProcessor * self;
	GMatchInfo* match_info = NULL;
	GMatchInfo* _tmp0_ = NULL;
	GError * _inner_error_ = NULL;
	self = (RubberPostProcessor*) base;
	g_return_if_fail (file != NULL);
	g_return_if_fail (output != NULL);
	post_processor_set_successful ((PostProcessor*) self, status == 0);
	if (rubber_post_processor_pattern == NULL) {
		return;
	}
	g_regex_match (rubber_post_processor_pattern, output, 0, &_tmp0_);
	_g_match_info_free0 (match_info);
	match_info = _tmp0_;
	while (TRUE) {
		gboolean _tmp1_;
		BuildIssue issue = {0};
		gchar* _tmp2_ = NULL;
		gchar* _tmp3_;
		gchar* text;
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_;
		gchar* _tmp7_ = NULL;
		gchar* line;
		gboolean _tmp8_ = FALSE;
		gchar* _tmp17_ = NULL;
		gchar _tmp18_;
		_tmp1_ = g_match_info_matches (match_info);
		if (!_tmp1_) {
			break;
		}
		memset (&issue, 0, sizeof (BuildIssue));
		_tmp2_ = g_match_info_fetch_named (match_info, "text");
		_g_free0 (issue.message);
		issue.message = _tmp2_;
		_tmp3_ = g_strdup (issue.message);
		text = _tmp3_;
		issue.message_type = BUILD_MESSAGE_TYPE_ERROR;
		_tmp5_ = string_contains (text, "Underfull");
		if (_tmp5_) {
			_tmp4_ = TRUE;
		} else {
			gboolean _tmp6_;
			_tmp6_ = string_contains (text, "Overfull");
			_tmp4_ = _tmp6_;
		}
		if (_tmp4_) {
			issue.message_type = BUILD_MESSAGE_TYPE_BADBOX;
		}
		issue.end_line = -1;
		issue.start_line = issue.end_line;
		_tmp7_ = g_match_info_fetch_named (match_info, "line");
		line = _tmp7_;
		if (line != NULL) {
			gint _tmp9_;
			_tmp9_ = strlen (line);
			_tmp8_ = _tmp9_ > 0;
		} else {
			_tmp8_ = FALSE;
		}
		if (_tmp8_) {
			gchar** _tmp10_;
			gchar** _tmp11_ = NULL;
			gchar** parts;
			gint parts_length1;
			gint _parts_size_;
			gint _tmp12_;
			gboolean _tmp13_ = FALSE;
			gboolean _tmp14_ = FALSE;
			_tmp11_ = _tmp10_ = g_strsplit (line, "-", 0);
			parts = _tmp11_;
			parts_length1 = _vala_array_length (_tmp10_);
			_parts_size_ = _vala_array_length (_tmp10_);
			_tmp12_ = atoi (parts[0]);
			issue.start_line = _tmp12_;
			if (parts_length1 > 1) {
				_tmp14_ = parts[1] != NULL;
			} else {
				_tmp14_ = FALSE;
			}
			if (_tmp14_) {
				gint _tmp15_;
				_tmp15_ = strlen (parts[1]);
				_tmp13_ = _tmp15_ > 0;
			} else {
				_tmp13_ = FALSE;
			}
			if (_tmp13_) {
				gint _tmp16_;
				_tmp16_ = atoi (parts[1]);
				issue.end_line = _tmp16_;
			}
			parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL);
		}
		_tmp17_ = g_match_info_fetch_named (match_info, "file");
		_g_free0 (issue.filename);
		issue.filename = _tmp17_;
		_tmp18_ = string_get (issue.filename, (glong) 0);
		if (_tmp18_ != '/') {
			GFile* _tmp19_ = NULL;
			GFile* _tmp20_;
			gchar* _tmp21_ = NULL;
			gchar* _tmp22_;
			gchar* _tmp23_ = NULL;
			_tmp19_ = g_file_get_parent (file);
			_tmp20_ = _tmp19_;
			_tmp21_ = g_file_get_parse_name (_tmp20_);
			_tmp22_ = _tmp21_;
			_tmp23_ = g_strdup_printf ("%s/%s", _tmp22_, issue.filename);
			_g_free0 (issue.filename);
			issue.filename = _tmp23_;
			_g_free0 (_tmp22_);
			_g_object_unref0 (_tmp20_);
		}
		gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->issues, &issue);
		g_match_info_next (match_info, &_inner_error_);
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch28_g_regex_error;
			}
			_g_free0 (line);
			_g_free0 (text);
			build_issue_destroy (&issue);
			_g_match_info_free0 (match_info);
			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;
		}
		goto __finally28;
		__catch28_g_regex_error:
		{
			GError * e;
			e = _inner_error_;
			_inner_error_ = NULL;
			fprintf (stderr, "Warning: RubberPostProcessor: %s\n", e->message);
			_g_error_free0 (e);
			_g_free0 (line);
			_g_free0 (text);
			build_issue_destroy (&issue);
			break;
		}
		__finally28:
		if (_inner_error_ != NULL) {
			_g_free0 (line);
			_g_free0 (text);
			build_issue_destroy (&issue);
			_g_match_info_free0 (match_info);
			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;
		}
		_g_free0 (line);
		_g_free0 (text);
		build_issue_destroy (&issue);
	}
	_g_match_info_free0 (match_info);
}


static PostProcessorIssues* rubber_post_processor_real_get_issues (PostProcessor* base, int* result_length1) {
	RubberPostProcessor * self;
	PostProcessorIssues* result = NULL;
	PostProcessorIssues* _tmp0_ = NULL;
	PostProcessorIssues* pp_issues;
	gint pp_issues_length1;
	gint _pp_issues_size_;
	GeeArrayList* _tmp1_;
	PostProcessorIssues* _tmp2_;
	self = (RubberPostProcessor*) base;
	_tmp0_ = g_new0 (PostProcessorIssues, 1);
	pp_issues = _tmp0_;
	pp_issues_length1 = 1;
	_pp_issues_size_ = 1;
	_g_free0 (pp_issues[0].partition_msg);
	pp_issues[0].partition_msg = NULL;
	_tmp1_ = _g_object_ref0 (self->priv->issues);
	_g_object_unref0 (pp_issues[0].issues);
	pp_issues[0].issues = _tmp1_;
	_tmp2_ = pp_issues;
	*result_length1 = pp_issues_length1;
	result = _tmp2_;
	return result;
}


static gboolean rubber_post_processor_real_get_successful (PostProcessor* base) {
	gboolean result;
	RubberPostProcessor* self;
	self = (RubberPostProcessor*) base;
	result = self->priv->_successful;
	return result;
}


static void rubber_post_processor_real_set_successful (PostProcessor* base, gboolean value) {
	RubberPostProcessor* self;
	self = (RubberPostProcessor*) base;
	self->priv->_successful = value;
	g_object_notify ((GObject *) self, "successful");
}


static void rubber_post_processor_class_init (RubberPostProcessorClass * klass) {
	rubber_post_processor_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (RubberPostProcessorPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_rubber_post_processor_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_rubber_post_processor_set_property;
	G_OBJECT_CLASS (klass)->finalize = rubber_post_processor_finalize;
	g_object_class_override_property (G_OBJECT_CLASS (klass), RUBBER_POST_PROCESSOR_SUCCESSFUL, "successful");
}


static void rubber_post_processor_post_processor_interface_init (PostProcessorIface * iface) {
	rubber_post_processor_post_processor_parent_iface = g_type_interface_peek_parent (iface);
	iface->process = (void (*)(PostProcessor* ,GFile* ,const gchar* ,gint)) rubber_post_processor_real_process;
	iface->get_issues = (PostProcessorIssues* (*)(PostProcessor* ,int*)) rubber_post_processor_real_get_issues;
	iface->get_successful = rubber_post_processor_real_get_successful;
	iface->set_successful = rubber_post_processor_real_set_successful;
}


static void rubber_post_processor_instance_init (RubberPostProcessor * self) {
	GeeArrayList* _tmp0_ = NULL;
	self->priv = RUBBER_POST_PROCESSOR_GET_PRIVATE (self);
	_tmp0_ = gee_array_list_new (TYPE_BUILD_ISSUE, (GBoxedCopyFunc) build_issue_dup, build_issue_free, NULL);
	self->priv->issues = _tmp0_;
}


static void rubber_post_processor_finalize (GObject* obj) {
	RubberPostProcessor * self;
	self = RUBBER_POST_PROCESSOR (obj);
	_g_object_unref0 (self->priv->issues);
	G_OBJECT_CLASS (rubber_post_processor_parent_class)->finalize (obj);
}


GType rubber_post_processor_get_type (void) {
	static volatile gsize rubber_post_processor_type_id__volatile = 0;
	if (g_once_init_enter (&rubber_post_processor_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RubberPostProcessorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rubber_post_processor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RubberPostProcessor), 0, (GInstanceInitFunc) rubber_post_processor_instance_init, NULL };
		static const GInterfaceInfo post_processor_info = { (GInterfaceInitFunc) rubber_post_processor_post_processor_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType rubber_post_processor_type_id;
		rubber_post_processor_type_id = g_type_register_static (G_TYPE_OBJECT, "RubberPostProcessor", &g_define_type_info, 0);
		g_type_add_interface_static (rubber_post_processor_type_id, TYPE_POST_PROCESSOR, &post_processor_info);
		g_once_init_leave (&rubber_post_processor_type_id__volatile, rubber_post_processor_type_id);
	}
	return rubber_post_processor_type_id__volatile;
}


static void _vala_rubber_post_processor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	RubberPostProcessor * self;
	self = RUBBER_POST_PROCESSOR (object);
	switch (property_id) {
		case RUBBER_POST_PROCESSOR_SUCCESSFUL:
		g_value_set_boolean (value, post_processor_get_successful ((PostProcessor*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_rubber_post_processor_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	RubberPostProcessor * self;
	self = RUBBER_POST_PROCESSOR (object);
	switch (property_id) {
		case RUBBER_POST_PROCESSOR_SUCCESSFUL:
		post_processor_set_successful ((PostProcessor*) self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


LatexmkPostProcessor* latexmk_post_processor_construct (GType object_type, gboolean show_all) {
	LatexmkPostProcessor * self = NULL;
	GError * _inner_error_ = NULL;
	self = (LatexmkPostProcessor*) g_object_new (object_type, NULL);
	self->priv->show_all = show_all;
	if (latexmk_post_processor_reg_rule == NULL) {
		gchar* _tmp0_;
		gchar* reg_rule_str;
		gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		GRegex* _tmp9_ = NULL;
		GRegex* _tmp10_;
		gchar* _tmp11_;
		gchar* reg_no_rule_str;
		gchar* _tmp12_;
		gchar* _tmp13_;
		GRegex* _tmp14_ = NULL;
		GRegex* _tmp15_;
		_tmp0_ = g_strdup ("^-{12}\n");
		reg_rule_str = _tmp0_;
		_tmp1_ = g_strconcat (reg_rule_str, "(?P<line>Run number [0-9]+ of rule '(?P<rule>.*)')\n", NULL);
		_g_free0 (reg_rule_str);
		reg_rule_str = _tmp1_;
		_tmp2_ = g_strconcat (reg_rule_str, "(-{12}\n){2}", NULL);
		_g_free0 (reg_rule_str);
		reg_rule_str = _tmp2_;
		_tmp3_ = g_strconcat (reg_rule_str, "Running '(?P<cmd>.*)'\n", NULL);
		_g_free0 (reg_rule_str);
		reg_rule_str = _tmp3_;
		_tmp4_ = g_strconcat (reg_rule_str, "-{12}\n", NULL);
		_g_free0 (reg_rule_str);
		reg_rule_str = _tmp4_;
		_tmp5_ = g_strconcat (reg_rule_str, "Latexmk: applying rule .*\n", NULL);
		_g_free0 (reg_rule_str);
		reg_rule_str = _tmp5_;
		_tmp6_ = g_strconcat (reg_rule_str, "(For rule '.*', running .*\n)?", NULL);
		_g_free0 (reg_rule_str);
		reg_rule_str = _tmp6_;
		_tmp7_ = g_strconcat (reg_rule_str, "(?P<output>(?U)(.*\n)*)", NULL);
		_g_free0 (reg_rule_str);
		reg_rule_str = _tmp7_;
		_tmp8_ = g_strconcat (reg_rule_str, "(Latexmk:|Rule '.*':)", NULL);
		_g_free0 (reg_rule_str);
		reg_rule_str = _tmp8_;
		_tmp9_ = g_regex_new (reg_rule_str, G_REGEX_MULTILINE | G_REGEX_OPTIMIZE, 0, &_inner_error_);
		_tmp10_ = _tmp9_;
		if (_inner_error_ != NULL) {
			_g_free0 (reg_rule_str);
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch29_g_regex_error;
			}
			_g_free0 (reg_rule_str);
			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 NULL;
		}
		_g_regex_unref0 (latexmk_post_processor_reg_rule);
		latexmk_post_processor_reg_rule = _tmp10_;
		_tmp11_ = g_strdup ("^(Latexmk: This is Latexmk.*\n)?");
		reg_no_rule_str = _tmp11_;
		_tmp12_ = g_strconcat (reg_no_rule_str, "(\\*{4} Report bugs.*\n)?", NULL);
		_g_free0 (reg_no_rule_str);
		reg_no_rule_str = _tmp12_;
		_tmp13_ = g_strconcat (reg_no_rule_str, "(?P<output>(.*\n)*)", NULL);
		_g_free0 (reg_no_rule_str);
		reg_no_rule_str = _tmp13_;
		_tmp14_ = g_regex_new (reg_no_rule_str, G_REGEX_MULTILINE, 0, &_inner_error_);
		_tmp15_ = _tmp14_;
		if (_inner_error_ != NULL) {
			_g_free0 (reg_no_rule_str);
			_g_free0 (reg_rule_str);
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch29_g_regex_error;
			}
			_g_free0 (reg_no_rule_str);
			_g_free0 (reg_rule_str);
			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 NULL;
		}
		_g_regex_unref0 (latexmk_post_processor_reg_no_rule);
		latexmk_post_processor_reg_no_rule = _tmp15_;
		_g_free0 (reg_no_rule_str);
		_g_free0 (reg_rule_str);
		goto __finally29;
		__catch29_g_regex_error:
		{
			GError * e;
			e = _inner_error_;
			_inner_error_ = NULL;
			fprintf (stderr, "LatexmkPostProcessor: %s\n", e->message);
			_g_error_free0 (e);
		}
		__finally29:
		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 NULL;
		}
	}
	return self;
}


LatexmkPostProcessor* latexmk_post_processor_new (gboolean show_all) {
	return latexmk_post_processor_construct (TYPE_LATEXMK_POST_PROCESSOR, show_all);
}


static void _vala_array_add8 (PostProcessorIssues** array, int* length, int* size, const PostProcessorIssues* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (PostProcessorIssues, *array, *size);
	}
	(*array)[(*length)++] = *value;
}


static PostProcessorIssues* _vala_array_dup4 (PostProcessorIssues* self, int length) {
	PostProcessorIssues* result;
	int i;
	result = g_new0 (PostProcessorIssues, length);
	for (i = 0; i < length; i++) {
		PostProcessorIssues _tmp0_ = {0};
		post_processor_issues_copy (&self[i], &_tmp0_);
		result[i] = _tmp0_;
	}
	return result;
}


static void latexmk_post_processor_real_process (PostProcessor* base, GFile* file, const gchar* output, gint status) {
	LatexmkPostProcessor * self;
	gboolean _tmp0_ = FALSE;
	gchar* latex_output;
	gint last_latex_cmd_index;
	GMatchInfo* match_info = NULL;
	GMatchInfo* _tmp1_ = NULL;
	gint i = 0;
	AllOutputPostProcessor* _tmp29_ = NULL;
	PostProcessor* all_output_pp;
	GMatchInfo* _tmp30_ = NULL;
	gboolean _tmp31_;
	gint _tmp33_;
	PostProcessorIssues* _tmp34_ = NULL;
	GError * _inner_error_ = NULL;
	self = (LatexmkPostProcessor*) base;
	g_return_if_fail (file != NULL);
	g_return_if_fail (output != NULL);
	post_processor_set_successful ((PostProcessor*) self, status == 0);
	if (latexmk_post_processor_reg_rule != NULL) {
		_tmp0_ = latexmk_post_processor_reg_no_rule != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	g_return_if_fail (_tmp0_);
	latex_output = NULL;
	last_latex_cmd_index = 0;
	g_regex_match (latexmk_post_processor_reg_rule, output, 0, &_tmp1_);
	_g_match_info_free0 (match_info);
	match_info = _tmp1_;
	{
		gboolean _tmp2_;
		i = 0;
		_tmp2_ = TRUE;
		while (TRUE) {
			gboolean _tmp3_;
			PostProcessorIssues pp_issues = {0};
			gchar* _tmp4_ = NULL;
			GeeArrayList* _tmp5_ = NULL;
			GeeArrayList* issues;
			BuildIssue issue = {0};
			gchar* _tmp6_ = NULL;
			gchar* _tmp7_;
			gchar* _tmp8_;
			gchar* _tmp9_ = NULL;
			gchar* rule;
			gboolean _tmp10_;
			GeeArrayList* _tmp17_;
			PostProcessorIssues _tmp18_;
			PostProcessorIssues _tmp19_ = {0};
			if (!_tmp2_) {
				i++;
			}
			_tmp2_ = FALSE;
			_tmp3_ = g_match_info_matches (match_info);
			if (!_tmp3_) {
				break;
			}
			memset (&pp_issues, 0, sizeof (PostProcessorIssues));
			_tmp4_ = g_match_info_fetch_named (match_info, "line");
			_g_free0 (pp_issues.partition_msg);
			pp_issues.partition_msg = _tmp4_;
			pp_issues.partition_state = PARTITION_STATE_SUCCEEDED;
			_tmp5_ = gee_array_list_new (TYPE_BUILD_ISSUE, (GBoxedCopyFunc) build_issue_dup, build_issue_free, NULL);
			issues = _tmp5_;
			memset (&issue, 0, sizeof (BuildIssue));
			issue.message_type = BUILD_MESSAGE_TYPE_OTHER;
			issue.start_line = -1;
			_tmp6_ = g_match_info_fetch_named (match_info, "cmd");
			_tmp7_ = _tmp6_;
			_tmp8_ = g_strconcat ("$ ", _tmp7_, NULL);
			_g_free0 (issue.message);
			issue.message = _tmp8_;
			_g_free0 (_tmp7_);
			gee_abstract_collection_add ((GeeAbstractCollection*) issues, &issue);
			_tmp9_ = g_match_info_fetch_named (match_info, "rule");
			rule = _tmp9_;
			_tmp10_ = g_str_has_suffix (rule, "latex");
			if (_tmp10_) {
				gchar* _tmp11_ = NULL;
				_tmp11_ = g_match_info_fetch_named (match_info, "output");
				_g_free0 (latex_output);
				latex_output = _tmp11_;
				last_latex_cmd_index = i;
			} else {
				gchar* _tmp12_ = NULL;
				gchar* cmd_output;
				AllOutputPostProcessor* _tmp13_ = NULL;
				PostProcessor* all_output_pp;
				gint _tmp14_;
				PostProcessorIssues* _tmp15_ = NULL;
				PostProcessorIssues* all_output_issues;
				gint all_output_issues_length1;
				gint _all_output_issues_size_;
				gboolean _tmp16_ = FALSE;
				_tmp12_ = g_match_info_fetch_named (match_info, "output");
				cmd_output = _tmp12_;
				_tmp13_ = all_output_post_processor_new ();
				all_output_pp = (PostProcessor*) _tmp13_;
				post_processor_process (all_output_pp, file, cmd_output, 0);
				_tmp15_ = post_processor_get_issues (all_output_pp, &_tmp14_);
				all_output_issues = _tmp15_;
				all_output_issues_length1 = _tmp14_;
				_all_output_issues_size_ = _tmp14_;
				if (all_output_issues_length1 == 1) {
					_tmp16_ = all_output_issues[0].partition_msg == NULL;
				} else {
					_tmp16_ = FALSE;
				}
				g_return_if_fail (_tmp16_);
				gee_abstract_collection_add_all ((GeeAbstractCollection*) issues, (GeeCollection*) all_output_issues[0].issues);
				all_output_issues = (_vala_PostProcessorIssues_array_free (all_output_issues, all_output_issues_length1), NULL);
				_g_object_unref0 (all_output_pp);
				_g_free0 (cmd_output);
			}
			_tmp17_ = _g_object_ref0 (issues);
			_g_object_unref0 (pp_issues.issues);
			pp_issues.issues = _tmp17_;
			post_processor_issues_copy (&pp_issues, &_tmp19_);
			_tmp18_ = _tmp19_;
			_vala_array_add8 (&self->priv->all_issues, &self->priv->all_issues_length1, &self->priv->_all_issues_size_, &_tmp18_);
			g_match_info_next (match_info, &_inner_error_);
			if (_inner_error_ != NULL) {
				if (_inner_error_->domain == G_REGEX_ERROR) {
					goto __catch30_g_regex_error;
				}
				_g_free0 (rule);
				build_issue_destroy (&issue);
				_g_object_unref0 (issues);
				post_processor_issues_destroy (&pp_issues);
				_g_match_info_free0 (match_info);
				_g_free0 (latex_output);
				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;
			}
			goto __finally30;
			__catch30_g_regex_error:
			{
				GError * e;
				e = _inner_error_;
				_inner_error_ = NULL;
				fprintf (stderr, "Warning: LatexmkPostProcessor: %s\n", e->message);
				_g_error_free0 (e);
				_g_free0 (rule);
				build_issue_destroy (&issue);
				_g_object_unref0 (issues);
				post_processor_issues_destroy (&pp_issues);
				break;
			}
			__finally30:
			if (_inner_error_ != NULL) {
				_g_free0 (rule);
				build_issue_destroy (&issue);
				_g_object_unref0 (issues);
				post_processor_issues_destroy (&pp_issues);
				_g_match_info_free0 (match_info);
				_g_free0 (latex_output);
				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;
			}
			_g_free0 (rule);
			build_issue_destroy (&issue);
			_g_object_unref0 (issues);
			post_processor_issues_destroy (&pp_issues);
		}
	}
	if (latex_output != NULL) {
		LatexPostProcessor* _tmp20_ = NULL;
		PostProcessor* latex_pp;
		gint _tmp21_;
		PostProcessorIssues* _tmp22_ = NULL;
		PostProcessorIssues* latex_issues;
		gint latex_issues_length1;
		gint _latex_issues_size_;
		gboolean _tmp23_ = FALSE;
		gboolean _tmp24_ = FALSE;
		_tmp20_ = latex_post_processor_new ();
		latex_pp = (PostProcessor*) _tmp20_;
		post_processor_process (latex_pp, file, latex_output, 0);
		_tmp22_ = post_processor_get_issues (latex_pp, &_tmp21_);
		latex_issues = _tmp22_;
		latex_issues_length1 = _tmp21_;
		_latex_issues_size_ = _tmp21_;
		if (latex_issues_length1 == 1) {
			_tmp23_ = latex_issues[0].partition_msg == NULL;
		} else {
			_tmp23_ = FALSE;
		}
		g_return_if_fail (_tmp23_);
		if (!self->priv->show_all) {
			gboolean _tmp25_ = FALSE;
			gboolean _tmp26_;
			_tmp26_ = post_processor_get_successful ((PostProcessor*) self);
			if (_tmp26_) {
				_tmp25_ = TRUE;
			} else {
				_tmp25_ = last_latex_cmd_index == (i - 1);
			}
			_tmp24_ = _tmp25_;
		} else {
			_tmp24_ = FALSE;
		}
		if (_tmp24_) {
			PostProcessorIssues* _tmp27_;
			PostProcessorIssues* _tmp28_;
			_tmp27_ = (_tmp28_ = latex_issues, (_tmp28_ == NULL) ? ((gpointer) _tmp28_) : _vala_array_dup4 (_tmp28_, latex_issues_length1));
			self->priv->all_issues = (_vala_PostProcessorIssues_array_free (self->priv->all_issues, self->priv->all_issues_length1), NULL);
			self->priv->all_issues = _tmp27_;
			self->priv->all_issues_length1 = latex_issues_length1;
			self->priv->_all_issues_size_ = latex_issues_length1;
		} else {
			gee_abstract_collection_add_all ((GeeAbstractCollection*) self->priv->all_issues[last_latex_cmd_index].issues, (GeeCollection*) latex_issues[0].issues);
		}
		latex_issues = (_vala_PostProcessorIssues_array_free (latex_issues, latex_issues_length1), NULL);
		_g_object_unref0 (latex_pp);
	}
	if (i > 0) {
		_g_match_info_free0 (match_info);
		_g_free0 (latex_output);
		return;
	}
	_tmp29_ = all_output_post_processor_new ();
	all_output_pp = (PostProcessor*) _tmp29_;
	_tmp31_ = g_regex_match (latexmk_post_processor_reg_no_rule, output, 0, &_tmp30_);
	_g_match_info_free0 (match_info);
	match_info = _tmp30_;
	if (_tmp31_) {
		gchar* _tmp32_ = NULL;
		gchar* all_output;
		_tmp32_ = g_match_info_fetch_named (match_info, "output");
		all_output = _tmp32_;
		post_processor_process (all_output_pp, file, all_output, 0);
		_g_free0 (all_output);
	} else {
		post_processor_process (all_output_pp, file, output, 0);
	}
	_tmp34_ = post_processor_get_issues (all_output_pp, &_tmp33_);
	self->priv->all_issues = (_vala_PostProcessorIssues_array_free (self->priv->all_issues, self->priv->all_issues_length1), NULL);
	self->priv->all_issues = _tmp34_;
	self->priv->all_issues_length1 = _tmp33_;
	self->priv->_all_issues_size_ = _tmp33_;
	_g_object_unref0 (all_output_pp);
	_g_match_info_free0 (match_info);
	_g_free0 (latex_output);
}


static PostProcessorIssues* _vala_array_dup5 (PostProcessorIssues* self, int length) {
	PostProcessorIssues* result;
	int i;
	result = g_new0 (PostProcessorIssues, length);
	for (i = 0; i < length; i++) {
		PostProcessorIssues _tmp0_ = {0};
		post_processor_issues_copy (&self[i], &_tmp0_);
		result[i] = _tmp0_;
	}
	return result;
}


static PostProcessorIssues* latexmk_post_processor_real_get_issues (PostProcessor* base, int* result_length1) {
	LatexmkPostProcessor * self;
	PostProcessorIssues* result = NULL;
	PostProcessorIssues* _tmp0_;
	PostProcessorIssues* _tmp1_;
	PostProcessorIssues* _tmp2_;
	self = (LatexmkPostProcessor*) base;
	_tmp0_ = (_tmp1_ = self->priv->all_issues, (_tmp1_ == NULL) ? ((gpointer) _tmp1_) : _vala_array_dup5 (_tmp1_, self->priv->all_issues_length1));
	_tmp2_ = _tmp0_;
	*result_length1 = self->priv->all_issues_length1;
	result = _tmp2_;
	return result;
}


static gboolean latexmk_post_processor_real_get_successful (PostProcessor* base) {
	gboolean result;
	LatexmkPostProcessor* self;
	self = (LatexmkPostProcessor*) base;
	result = self->priv->_successful;
	return result;
}


static void latexmk_post_processor_real_set_successful (PostProcessor* base, gboolean value) {
	LatexmkPostProcessor* self;
	self = (LatexmkPostProcessor*) base;
	self->priv->_successful = value;
	g_object_notify ((GObject *) self, "successful");
}


static void latexmk_post_processor_class_init (LatexmkPostProcessorClass * klass) {
	latexmk_post_processor_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (LatexmkPostProcessorPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_latexmk_post_processor_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_latexmk_post_processor_set_property;
	G_OBJECT_CLASS (klass)->finalize = latexmk_post_processor_finalize;
	g_object_class_override_property (G_OBJECT_CLASS (klass), LATEXMK_POST_PROCESSOR_SUCCESSFUL, "successful");
}


static void latexmk_post_processor_post_processor_interface_init (PostProcessorIface * iface) {
	latexmk_post_processor_post_processor_parent_iface = g_type_interface_peek_parent (iface);
	iface->process = (void (*)(PostProcessor* ,GFile* ,const gchar* ,gint)) latexmk_post_processor_real_process;
	iface->get_issues = (PostProcessorIssues* (*)(PostProcessor* ,int*)) latexmk_post_processor_real_get_issues;
	iface->get_successful = latexmk_post_processor_real_get_successful;
	iface->set_successful = latexmk_post_processor_real_set_successful;
}


static void latexmk_post_processor_instance_init (LatexmkPostProcessor * self) {
	PostProcessorIssues* _tmp0_ = NULL;
	self->priv = LATEXMK_POST_PROCESSOR_GET_PRIVATE (self);
	_tmp0_ = g_new0 (PostProcessorIssues, 0);
	self->priv->all_issues = _tmp0_;
	self->priv->all_issues_length1 = 0;
	self->priv->_all_issues_size_ = self->priv->all_issues_length1;
}


static void latexmk_post_processor_finalize (GObject* obj) {
	LatexmkPostProcessor * self;
	self = LATEXMK_POST_PROCESSOR (obj);
	self->priv->all_issues = (_vala_PostProcessorIssues_array_free (self->priv->all_issues, self->priv->all_issues_length1), NULL);
	G_OBJECT_CLASS (latexmk_post_processor_parent_class)->finalize (obj);
}


GType latexmk_post_processor_get_type (void) {
	static volatile gsize latexmk_post_processor_type_id__volatile = 0;
	if (g_once_init_enter (&latexmk_post_processor_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (LatexmkPostProcessorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) latexmk_post_processor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LatexmkPostProcessor), 0, (GInstanceInitFunc) latexmk_post_processor_instance_init, NULL };
		static const GInterfaceInfo post_processor_info = { (GInterfaceInitFunc) latexmk_post_processor_post_processor_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType latexmk_post_processor_type_id;
		latexmk_post_processor_type_id = g_type_register_static (G_TYPE_OBJECT, "LatexmkPostProcessor", &g_define_type_info, 0);
		g_type_add_interface_static (latexmk_post_processor_type_id, TYPE_POST_PROCESSOR, &post_processor_info);
		g_once_init_leave (&latexmk_post_processor_type_id__volatile, latexmk_post_processor_type_id);
	}
	return latexmk_post_processor_type_id__volatile;
}


static void _vala_latexmk_post_processor_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	LatexmkPostProcessor * self;
	self = LATEXMK_POST_PROCESSOR (object);
	switch (property_id) {
		case LATEXMK_POST_PROCESSOR_SUCCESSFUL:
		g_value_set_boolean (value, post_processor_get_successful ((PostProcessor*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_latexmk_post_processor_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	LatexmkPostProcessor * self;
	self = LATEXMK_POST_PROCESSOR (object);
	switch (property_id) {
		case LATEXMK_POST_PROCESSOR_SUCCESSFUL:
		post_processor_set_successful ((PostProcessor*) self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


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;
}



