summaryrefslogtreecommitdiff
path: root/src/simple-scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/simple-scan.c')
-rw-r--r--src/simple-scan.c2340
1 files changed, 1211 insertions, 1129 deletions
diff --git a/src/simple-scan.c b/src/simple-scan.c
index b75f90d..754893a 100644
--- a/src/simple-scan.c
+++ b/src/simple-scan.c
@@ -1,4 +1,4 @@
-/* simple-scan.c generated by valac 0.20.1, the Vala compiler
+/* simple-scan.c generated by valac 0.22.1, the Vala compiler
* generated from simple-scan.vala, do not modify */
/*
@@ -140,7 +140,7 @@ typedef struct _ScanOptionsPrivate ScanOptionsPrivate;
#define TYPE_SCAN_TYPE (scan_type_get_type ())
#define _fclose0(var) ((var == NULL) ? NULL : (var = (fclose (var), NULL)))
-#define _g_match_info_free0(var) ((var == NULL) ? NULL : (var = (g_match_info_free (var), NULL)))
+#define _g_match_info_unref0(var) ((var == NULL) ? NULL : (var = (g_match_info_unref (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL)))
@@ -335,7 +335,7 @@ static void _simple_scan_scanner_scanning_changed_cb_scanner_scanning_changed (S
static void simple_scan_on_uevent (SimpleScan* self, GUdevClient* client, const gchar* action, GUdevDevice* device);
static void _simple_scan_on_uevent_g_udev_client_uevent (GUdevClient* _sender, const gchar* action, GUdevDevice* device, gpointer self);
void user_interface_set_scan_devices (UserInterface* self, GList* devices);
-void user_interface_set_selected_device (UserInterface* self, const gchar* device);
+void user_interface_set_selected_device (UserInterface* self, const gchar* value);
static void _scan_device_unref0_ (gpointer var);
static void _g_list_free__scan_device_unref0_ (GList* self);
static void simple_scan_real_activate (GApplication* base);
@@ -354,35 +354,40 @@ gpointer value_get_page (const GValue* value);
GType page_get_type (void) G_GNUC_CONST;
static Page* simple_scan_append_page (SimpleScan* self);
Page* book_get_page (Book* self, gint page_number);
-gboolean page_has_data (Page* self);
-void user_interface_set_selected_page (UserInterface* self, Page* page);
+gboolean page_get_has_data (Page* self);
+void user_interface_set_selected_page (UserInterface* self, Page* value);
void page_start (Page* self);
GType scan_direction_get_type (void) G_GNUC_CONST;
ScanDirection page_get_scan_direction (Page* self);
gint page_get_width (Page* self);
gint page_get_height (Page* self);
gint page_get_dpi (Page* self);
-gboolean page_has_crop (Page* self);
-gchar* page_get_named_crop (Page* self);
-void page_get_crop (Page* self, gint* x, gint* y, gint* width, gint* height);
-Page* book_append_page (Book* self, gint width, gint height, gint dpi, ScanDirection scan_direction);
+gboolean page_get_has_crop (Page* self);
+const gchar* page_get_crop_name (Page* self);
+gint page_get_crop_x (Page* self);
+gint page_get_crop_y (Page* self);
+gint page_get_crop_width (Page* self);
+gint page_get_crop_height (Page* self);
+Page* page_new (gint width, gint height, gint dpi, ScanDirection scan_direction);
+Page* page_construct (GType object_type, gint width, gint height, gint dpi, ScanDirection scan_direction);
+void book_append_page (Book* self, Page* page);
void page_set_named_crop (Page* self, const gchar* name);
void page_set_custom_crop (Page* self, gint width, gint height);
void page_move_crop (Page* self, gint x, gint y);
static gchar* simple_scan_get_profile_for_device (SimpleScan* self, const gchar* device_name);
void page_set_page_info (Page* self, ScanPageInfo* info);
-void page_set_color_profile (Page* self, const gchar* color_profile);
+void page_set_color_profile (Page* self, const gchar* value);
guint book_get_n_pages (Book* self);
void page_parse_scan_line (Page* self, ScanLine* line);
void page_finish (Page* self);
static void simple_scan_remove_empty_page (SimpleScan* self);
void book_delete_page (Book* self, Page* page);
void user_interface_show_error (UserInterface* self, const gchar* error_title, const gchar* error_text, gboolean change_scanner_hint);
-void user_interface_set_scanning (UserInterface* self, gboolean scanning);
gboolean scanner_is_scanning (Scanner* self);
+void user_interface_set_scanning (UserInterface* self, gboolean value);
GType scan_mode_get_type (void) G_GNUC_CONST;
GType scan_type_get_type (void) G_GNUC_CONST;
-void user_interface_set_default_file_name (UserInterface* self, const gchar* default_file_name);
+void user_interface_set_default_file_name (UserInterface* self, const gchar* value);
void scanner_scan (Scanner* self, const gchar* device, ScanOptions* options);
void scanner_cancel (Scanner* self);
static gchar* simple_scan_get_temporary_filename (SimpleScan* self, const gchar* prefix, const gchar* extension);
@@ -406,14 +411,14 @@ const GOptionEntry SIMPLE_SCAN_options[4] = {{"version", 'v', 0, G_OPTION_ARG_NO
static gpointer _scan_device_ref0 (gpointer self) {
#line 41 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return self ? scan_device_ref (self) : NULL;
-#line 410 "simple-scan.c"
+#line 415 "simple-scan.c"
}
SimpleScan* simple_scan_construct (GType object_type, ScanDevice* device) {
SimpleScan * self = NULL;
- ScanDevice* _tmp0_;
- ScanDevice* _tmp1_;
+ ScanDevice* _tmp0_ = NULL;
+ ScanDevice* _tmp1_ = NULL;
#line 39 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
self = (SimpleScan*) g_object_new (object_type, NULL);
#line 41 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -426,112 +431,119 @@ SimpleScan* simple_scan_construct (GType object_type, ScanDevice* device) {
self->priv->default_device = _tmp1_;
#line 39 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return self;
-#line 430 "simple-scan.c"
+#line 435 "simple-scan.c"
}
SimpleScan* simple_scan_new (ScanDevice* device) {
#line 39 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return simple_scan_construct (TYPE_SIMPLE_SCAN, device);
-#line 437 "simple-scan.c"
+#line 442 "simple-scan.c"
+}
+
+
+static gpointer _book_ref0 (gpointer self) {
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ return self ? book_ref (self) : NULL;
+#line 449 "simple-scan.c"
}
static void _simple_scan_scan_cb_user_interface_start_scan (UserInterface* _sender, const gchar* device, ScanOptions* options, gpointer self) {
#line 50 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_scan_cb (self, _sender, device, options);
-#line 444 "simple-scan.c"
+#line 456 "simple-scan.c"
}
static void _simple_scan_cancel_cb_user_interface_stop_scan (UserInterface* _sender, gpointer self) {
#line 51 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_cancel_cb (self, _sender);
-#line 451 "simple-scan.c"
+#line 463 "simple-scan.c"
}
static void _simple_scan_email_cb_user_interface_email (UserInterface* _sender, const gchar* profile, gint quality, gpointer self) {
#line 52 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_email_cb (self, _sender, profile, quality);
-#line 458 "simple-scan.c"
+#line 470 "simple-scan.c"
}
static void _simple_scan_update_scan_devices_cb_scanner_update_devices (Scanner* _sender, GList* devices, gpointer self) {
#line 55 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_update_scan_devices_cb (self, _sender, devices);
-#line 465 "simple-scan.c"
+#line 477 "simple-scan.c"
}
static void _simple_scan_authorize_cb_scanner_request_authorization (Scanner* _sender, const gchar* resource, gpointer self) {
#line 56 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_authorize_cb (self, _sender, resource);
-#line 472 "simple-scan.c"
+#line 484 "simple-scan.c"
}
static void _simple_scan_scanner_new_page_cb_scanner_expect_page (Scanner* _sender, gpointer self) {
#line 57 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_scanner_new_page_cb (self, _sender);
-#line 479 "simple-scan.c"
+#line 491 "simple-scan.c"
}
static void _simple_scan_scanner_page_info_cb_scanner_got_page_info (Scanner* _sender, ScanPageInfo* info, gpointer self) {
#line 58 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_scanner_page_info_cb (self, _sender, info);
-#line 486 "simple-scan.c"
+#line 498 "simple-scan.c"
}
static void _simple_scan_scanner_line_cb_scanner_got_line (Scanner* _sender, ScanLine* line, gpointer self) {
#line 59 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_scanner_line_cb (self, _sender, line);
-#line 493 "simple-scan.c"
+#line 505 "simple-scan.c"
}
static void _simple_scan_scanner_page_done_cb_scanner_page_done (Scanner* _sender, gpointer self) {
#line 60 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_scanner_page_done_cb (self, _sender);
-#line 500 "simple-scan.c"
+#line 512 "simple-scan.c"
}
static void _simple_scan_scanner_document_done_cb_scanner_document_done (Scanner* _sender, gpointer self) {
#line 61 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_scanner_document_done_cb (self, _sender);
-#line 507 "simple-scan.c"
+#line 519 "simple-scan.c"
}
static void _simple_scan_scanner_failed_cb_scanner_scan_failed (Scanner* _sender, gint error_code, const gchar* error_string, gpointer self) {
#line 62 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_scanner_failed_cb (self, _sender, error_code, error_string);
-#line 514 "simple-scan.c"
+#line 526 "simple-scan.c"
}
static void _simple_scan_scanner_scanning_changed_cb_scanner_scanning_changed (Scanner* _sender, gpointer self) {
#line 63 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_scanner_scanning_changed_cb (self, _sender);
-#line 521 "simple-scan.c"
+#line 533 "simple-scan.c"
}
static void _simple_scan_on_uevent_g_udev_client_uevent (GUdevClient* _sender, const gchar* action, GUdevDevice* device, gpointer self) {
#line 67 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_on_uevent (self, _sender, action, device);
-#line 528 "simple-scan.c"
+#line 540 "simple-scan.c"
}
static void _scan_device_unref0_ (gpointer var) {
#line 69 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
(var == NULL) ? NULL : (var = (scan_device_unref (var), NULL));
-#line 535 "simple-scan.c"
+#line 547 "simple-scan.c"
}
@@ -540,38 +552,40 @@ static void _g_list_free__scan_device_unref0_ (GList* self) {
g_list_foreach (self, (GFunc) _scan_device_unref0_, NULL);
#line 69 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_list_free (self);
-#line 544 "simple-scan.c"
+#line 556 "simple-scan.c"
}
static void simple_scan_real_startup (GApplication* base) {
SimpleScan * self;
- UserInterface* _tmp0_;
- UserInterface* _tmp1_;
+ UserInterface* _tmp0_ = NULL;
+ UserInterface* _tmp1_ = NULL;
Book* _tmp2_ = NULL;
- UserInterface* _tmp3_;
- UserInterface* _tmp4_;
- UserInterface* _tmp5_;
- Scanner* _tmp6_ = NULL;
- Scanner* _tmp7_;
- Scanner* _tmp8_;
- Scanner* _tmp9_;
- Scanner* _tmp10_;
- Scanner* _tmp11_;
- Scanner* _tmp12_;
- Scanner* _tmp13_;
- Scanner* _tmp14_;
- Scanner* _tmp15_;
- gchar* _tmp16_;
- gchar** _tmp17_ = NULL;
- gchar** subsystems;
- gint subsystems_length1;
- gint _subsystems_size_;
- gchar** _tmp18_;
- gint _tmp18__length1;
- GUdevClient* _tmp19_;
- GUdevClient* _tmp20_;
- ScanDevice* _tmp21_;
+ Book* _tmp3_ = NULL;
+ Book* _tmp4_ = NULL;
+ UserInterface* _tmp5_ = NULL;
+ UserInterface* _tmp6_ = NULL;
+ UserInterface* _tmp7_ = NULL;
+ Scanner* _tmp8_ = NULL;
+ Scanner* _tmp9_ = NULL;
+ Scanner* _tmp10_ = NULL;
+ Scanner* _tmp11_ = NULL;
+ Scanner* _tmp12_ = NULL;
+ Scanner* _tmp13_ = NULL;
+ Scanner* _tmp14_ = NULL;
+ Scanner* _tmp15_ = NULL;
+ Scanner* _tmp16_ = NULL;
+ Scanner* _tmp17_ = NULL;
+ gchar** subsystems = NULL;
+ gchar* _tmp18_ = NULL;
+ gchar** _tmp19_ = NULL;
+ gint subsystems_length1 = 0;
+ gint _subsystems_size_ = 0;
+ gchar** _tmp20_ = NULL;
+ gint _tmp20__length1 = 0;
+ GUdevClient* _tmp21_ = NULL;
+ GUdevClient* _tmp22_ = NULL;
+ ScanDevice* _tmp23_ = NULL;
#line 44 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
self = (SimpleScan*) base;
#line 46 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -587,140 +601,144 @@ static void simple_scan_real_startup (GApplication* base) {
#line 49 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp2_ = user_interface_get_book (_tmp1_);
#line 49 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = _tmp2_;
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = _book_ref0 (_tmp3_);
+#line 49 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_book_unref0 (self->priv->book);
#line 49 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- self->priv->book = _tmp2_;
+ self->priv->book = _tmp4_;
#line 50 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp3_ = self->priv->ui;
+ _tmp5_ = self->priv->ui;
#line 50 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_signal_connect_object (_tmp3_, "start-scan", (GCallback) _simple_scan_scan_cb_user_interface_start_scan, self, 0);
+ g_signal_connect_object (_tmp5_, "start-scan", (GCallback) _simple_scan_scan_cb_user_interface_start_scan, self, 0);
#line 51 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp4_ = self->priv->ui;
+ _tmp6_ = self->priv->ui;
#line 51 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_signal_connect_object (_tmp4_, "stop-scan", (GCallback) _simple_scan_cancel_cb_user_interface_stop_scan, self, 0);
+ g_signal_connect_object (_tmp6_, "stop-scan", (GCallback) _simple_scan_cancel_cb_user_interface_stop_scan, self, 0);
#line 52 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp5_ = self->priv->ui;
+ _tmp7_ = self->priv->ui;
#line 52 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_signal_connect_object (_tmp5_, "email", (GCallback) _simple_scan_email_cb_user_interface_email, self, 0);
+ g_signal_connect_object (_tmp7_, "email", (GCallback) _simple_scan_email_cb_user_interface_email, self, 0);
#line 54 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp6_ = scanner_get_instance ();
+ _tmp8_ = scanner_get_instance ();
#line 54 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_scanner_unref0 (self->priv->scanner);
#line 54 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- self->priv->scanner = _tmp6_;
+ self->priv->scanner = _tmp8_;
#line 55 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp7_ = self->priv->scanner;
+ _tmp9_ = self->priv->scanner;
#line 55 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_signal_connect_object (_tmp7_, "update-devices", (GCallback) _simple_scan_update_scan_devices_cb_scanner_update_devices, self, 0);
+ g_signal_connect_object (_tmp9_, "update-devices", (GCallback) _simple_scan_update_scan_devices_cb_scanner_update_devices, self, 0);
#line 56 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp8_ = self->priv->scanner;
+ _tmp10_ = self->priv->scanner;
#line 56 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_signal_connect_object (_tmp8_, "request-authorization", (GCallback) _simple_scan_authorize_cb_scanner_request_authorization, self, 0);
+ g_signal_connect_object (_tmp10_, "request-authorization", (GCallback) _simple_scan_authorize_cb_scanner_request_authorization, self, 0);
#line 57 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp9_ = self->priv->scanner;
+ _tmp11_ = self->priv->scanner;
#line 57 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_signal_connect_object (_tmp9_, "expect-page", (GCallback) _simple_scan_scanner_new_page_cb_scanner_expect_page, self, 0);
+ g_signal_connect_object (_tmp11_, "expect-page", (GCallback) _simple_scan_scanner_new_page_cb_scanner_expect_page, self, 0);
#line 58 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp10_ = self->priv->scanner;
+ _tmp12_ = self->priv->scanner;
#line 58 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_signal_connect_object (_tmp10_, "got-page-info", (GCallback) _simple_scan_scanner_page_info_cb_scanner_got_page_info, self, 0);
+ g_signal_connect_object (_tmp12_, "got-page-info", (GCallback) _simple_scan_scanner_page_info_cb_scanner_got_page_info, self, 0);
#line 59 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp11_ = self->priv->scanner;
+ _tmp13_ = self->priv->scanner;
#line 59 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_signal_connect_object (_tmp11_, "got-line", (GCallback) _simple_scan_scanner_line_cb_scanner_got_line, self, 0);
+ g_signal_connect_object (_tmp13_, "got-line", (GCallback) _simple_scan_scanner_line_cb_scanner_got_line, self, 0);
#line 60 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp12_ = self->priv->scanner;
+ _tmp14_ = self->priv->scanner;
#line 60 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_signal_connect_object (_tmp12_, "page-done", (GCallback) _simple_scan_scanner_page_done_cb_scanner_page_done, self, 0);
+ g_signal_connect_object (_tmp14_, "page-done", (GCallback) _simple_scan_scanner_page_done_cb_scanner_page_done, self, 0);
#line 61 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp13_ = self->priv->scanner;
+ _tmp15_ = self->priv->scanner;
#line 61 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_signal_connect_object (_tmp13_, "document-done", (GCallback) _simple_scan_scanner_document_done_cb_scanner_document_done, self, 0);
+ g_signal_connect_object (_tmp15_, "document-done", (GCallback) _simple_scan_scanner_document_done_cb_scanner_document_done, self, 0);
#line 62 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp14_ = self->priv->scanner;
+ _tmp16_ = self->priv->scanner;
#line 62 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_signal_connect_object (_tmp14_, "scan-failed", (GCallback) _simple_scan_scanner_failed_cb_scanner_scan_failed, self, 0);
+ g_signal_connect_object (_tmp16_, "scan-failed", (GCallback) _simple_scan_scanner_failed_cb_scanner_scan_failed, self, 0);
#line 63 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp15_ = self->priv->scanner;
+ _tmp17_ = self->priv->scanner;
#line 63 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_signal_connect_object (_tmp15_, "scanning-changed", (GCallback) _simple_scan_scanner_scanning_changed_cb_scanner_scanning_changed, self, 0);
+ g_signal_connect_object (_tmp17_, "scanning-changed", (GCallback) _simple_scan_scanner_scanning_changed_cb_scanner_scanning_changed, self, 0);
#line 65 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp16_ = g_strdup ("usb");
+ _tmp18_ = g_strdup ("usb");
#line 65 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp17_ = g_new0 (gchar*, 2 + 1);
+ _tmp19_ = g_new0 (gchar*, 2 + 1);
#line 65 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp17_[0] = _tmp16_;
+ _tmp19_[0] = _tmp18_;
#line 65 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp17_[1] = NULL;
+ _tmp19_[1] = NULL;
#line 65 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- subsystems = _tmp17_;
+ subsystems = _tmp19_;
#line 65 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
subsystems_length1 = 2;
#line 65 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_subsystems_size_ = subsystems_length1;
#line 66 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp18_ = subsystems;
+ _tmp20_ = subsystems;
#line 66 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp18__length1 = subsystems_length1;
+ _tmp20__length1 = subsystems_length1;
#line 66 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp19_ = g_udev_client_new (_tmp18_);
+ _tmp21_ = g_udev_client_new (_tmp20_);
#line 66 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (self->priv->udev_client);
#line 66 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- self->priv->udev_client = _tmp19_;
+ self->priv->udev_client = _tmp21_;
#line 67 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp20_ = self->priv->udev_client;
+ _tmp22_ = self->priv->udev_client;
#line 67 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_signal_connect_object (_tmp20_, "uevent", (GCallback) _simple_scan_on_uevent_g_udev_client_uevent, self, 0);
+ g_signal_connect_object (_tmp22_, "uevent", (GCallback) _simple_scan_on_uevent_g_udev_client_uevent, self, 0);
#line 69 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp21_ = self->priv->default_device;
+ _tmp23_ = self->priv->default_device;
#line 69 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- if (_tmp21_ != NULL) {
-#line 680 "simple-scan.c"
- GList* device_list;
- ScanDevice* _tmp22_;
- ScanDevice* _tmp23_;
- UserInterface* _tmp24_;
- GList* _tmp25_;
- UserInterface* _tmp26_;
- ScanDevice* _tmp27_;
- const gchar* _tmp28_;
+ if (_tmp23_ != NULL) {
+#line 698 "simple-scan.c"
+ GList* device_list = NULL;
+ ScanDevice* _tmp24_ = NULL;
+ ScanDevice* _tmp25_ = NULL;
+ UserInterface* _tmp26_ = NULL;
+ GList* _tmp27_ = NULL;
+ UserInterface* _tmp28_ = NULL;
+ ScanDevice* _tmp29_ = NULL;
+ const gchar* _tmp30_ = NULL;
#line 71 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
device_list = NULL;
#line 73 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp22_ = self->priv->default_device;
+ _tmp24_ = self->priv->default_device;
#line 73 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp23_ = _scan_device_ref0 (_tmp22_);
+ _tmp25_ = _scan_device_ref0 (_tmp24_);
#line 73 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- device_list = g_list_append (device_list, _tmp23_);
+ device_list = g_list_append (device_list, _tmp25_);
#line 74 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp24_ = self->priv->ui;
+ _tmp26_ = self->priv->ui;
#line 74 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp25_ = device_list;
+ _tmp27_ = device_list;
#line 74 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- user_interface_set_scan_devices (_tmp24_, _tmp25_);
+ user_interface_set_scan_devices (_tmp26_, _tmp27_);
#line 75 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp26_ = self->priv->ui;
+ _tmp28_ = self->priv->ui;
#line 75 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp27_ = self->priv->default_device;
+ _tmp29_ = self->priv->default_device;
#line 75 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp28_ = _tmp27_->name;
+ _tmp30_ = _tmp29_->name;
#line 75 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- user_interface_set_selected_device (_tmp26_, _tmp28_);
+ user_interface_set_selected_device (_tmp28_, _tmp30_);
#line 69 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
__g_list_free__scan_device_unref0_0 (device_list);
-#line 713 "simple-scan.c"
+#line 731 "simple-scan.c"
}
#line 44 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
subsystems = (_vala_array_free (subsystems, subsystems_length1, (GDestroyNotify) g_free), NULL);
-#line 717 "simple-scan.c"
+#line 735 "simple-scan.c"
}
static void simple_scan_real_activate (GApplication* base) {
SimpleScan * self;
- UserInterface* _tmp0_;
- Scanner* _tmp1_;
+ UserInterface* _tmp0_ = NULL;
+ Scanner* _tmp1_ = NULL;
#line 79 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
self = (SimpleScan*) base;
#line 81 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -733,13 +751,13 @@ static void simple_scan_real_activate (GApplication* base) {
_tmp1_ = self->priv->scanner;
#line 83 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
scanner_start (_tmp1_);
-#line 737 "simple-scan.c"
+#line 755 "simple-scan.c"
}
static void simple_scan_real_shutdown (GApplication* base) {
SimpleScan * self;
- Scanner* _tmp0_;
+ Scanner* _tmp0_ = NULL;
#line 86 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
self = (SimpleScan*) base;
#line 88 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -760,19 +778,19 @@ static void simple_scan_real_shutdown (GApplication* base) {
_tmp0_ = self->priv->scanner;
#line 92 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
scanner_free (_tmp0_);
-#line 764 "simple-scan.c"
+#line 782 "simple-scan.c"
}
static void simple_scan_update_scan_devices_cb (SimpleScan* self, Scanner* scanner, GList* devices) {
- GList* _tmp0_;
+ GList* devices_copy = NULL;
+ GList* _tmp0_ = NULL;
GList* _tmp1_ = NULL;
- GList* devices_copy;
- ScanDevice* _tmp2_;
- GList* _tmp10_;
+ ScanDevice* _tmp2_ = NULL;
+ GList* _tmp10_ = NULL;
guint _tmp11_ = 0U;
- UserInterface* _tmp12_;
- GList* _tmp13_;
+ UserInterface* _tmp12_ = NULL;
+ GList* _tmp13_ = NULL;
#line 95 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (self != NULL);
#line 95 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -787,15 +805,15 @@ static void simple_scan_update_scan_devices_cb (SimpleScan* self, Scanner* scann
_tmp2_ = self->priv->default_device;
#line 100 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp2_ != NULL) {
-#line 791 "simple-scan.c"
- gboolean default_in_list;
- GList* _tmp3_;
- gboolean _tmp8_;
+#line 809 "simple-scan.c"
+ gboolean default_in_list = FALSE;
+ GList* _tmp3_ = NULL;
+ gboolean _tmp8_ = FALSE;
#line 102 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
default_in_list = FALSE;
#line 103 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp3_ = devices_copy;
-#line 799 "simple-scan.c"
+#line 817 "simple-scan.c"
{
GList* device_collection = NULL;
GList* device_it = NULL;
@@ -803,16 +821,16 @@ static void simple_scan_update_scan_devices_cb (SimpleScan* self, Scanner* scann
device_collection = _tmp3_;
#line 103 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
for (device_it = device_collection; device_it != NULL; device_it = device_it->next) {
-#line 807 "simple-scan.c"
+#line 825 "simple-scan.c"
ScanDevice* device = NULL;
#line 103 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
device = (ScanDevice*) device_it->data;
-#line 811 "simple-scan.c"
+#line 829 "simple-scan.c"
{
- ScanDevice* _tmp4_;
- const gchar* _tmp5_;
- ScanDevice* _tmp6_;
- const gchar* _tmp7_;
+ ScanDevice* _tmp4_ = NULL;
+ const gchar* _tmp5_ = NULL;
+ ScanDevice* _tmp6_ = NULL;
+ const gchar* _tmp7_ = NULL;
#line 105 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp4_ = device;
#line 105 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -827,7 +845,7 @@ static void simple_scan_update_scan_devices_cb (SimpleScan* self, Scanner* scann
default_in_list = TRUE;
#line 108 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 831 "simple-scan.c"
+#line 849 "simple-scan.c"
}
}
}
@@ -836,13 +854,13 @@ static void simple_scan_update_scan_devices_cb (SimpleScan* self, Scanner* scann
_tmp8_ = default_in_list;
#line 112 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (!_tmp8_) {
-#line 840 "simple-scan.c"
- ScanDevice* _tmp9_;
+#line 858 "simple-scan.c"
+ ScanDevice* _tmp9_ = NULL;
#line 113 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp9_ = self->priv->default_device;
#line 113 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
devices_copy = g_list_prepend (devices_copy, _tmp9_);
-#line 846 "simple-scan.c"
+#line 864 "simple-scan.c"
}
}
#line 116 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -859,18 +877,18 @@ static void simple_scan_update_scan_devices_cb (SimpleScan* self, Scanner* scann
user_interface_set_scan_devices (_tmp12_, _tmp13_);
#line 95 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_list_free0 (devices_copy);
-#line 863 "simple-scan.c"
+#line 881 "simple-scan.c"
}
static void simple_scan_authorize_cb (SimpleScan* self, Scanner* scanner, const gchar* resource) {
gchar* username = NULL;
gchar* password = NULL;
- UserInterface* _tmp0_;
- const gchar* _tmp1_;
+ UserInterface* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
gchar* _tmp2_ = NULL;
gchar* _tmp3_ = NULL;
- Scanner* _tmp4_;
+ Scanner* _tmp4_ = NULL;
#line 120 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (self != NULL);
#line 120 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -899,39 +917,40 @@ static void simple_scan_authorize_cb (SimpleScan* self, Scanner* scanner, const
_g_free0 (password);
#line 120 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (username);
-#line 903 "simple-scan.c"
+#line 921 "simple-scan.c"
}
static Page* simple_scan_append_page (SimpleScan* self) {
Page* result = NULL;
- Book* _tmp0_;
+ Page* page = NULL;
+ Book* _tmp0_ = NULL;
Page* _tmp1_ = NULL;
- Page* page;
gboolean _tmp2_ = FALSE;
- Page* _tmp3_;
- gboolean _tmp6_;
- ScanDirection scan_direction;
- gboolean do_crop;
- gchar* named_crop;
- gint width;
- gint height;
- gint dpi;
- gint cx;
- gint cy;
- gint cw;
- gint ch;
- Page* _tmp10_;
- Book* _tmp29_;
- gint _tmp30_;
- gint _tmp31_;
- gint _tmp32_;
- ScanDirection _tmp33_;
- Page* _tmp34_ = NULL;
- gboolean _tmp35_;
- UserInterface* _tmp45_;
- Page* _tmp46_;
- Page* _tmp47_;
+ Page* _tmp3_ = NULL;
+ gboolean _tmp7_ = FALSE;
+ ScanDirection scan_direction = 0;
+ gboolean do_crop = FALSE;
+ gchar* named_crop = NULL;
+ gint width = 0;
+ gint height = 0;
+ gint dpi = 0;
+ gint cx = 0;
+ gint cy = 0;
+ gint cw = 0;
+ gint ch = 0;
+ Page* _tmp11_ = NULL;
+ gint _tmp44_ = 0;
+ gint _tmp45_ = 0;
+ gint _tmp46_ = 0;
+ ScanDirection _tmp47_ = 0;
+ Page* _tmp48_ = NULL;
+ Book* _tmp49_ = NULL;
+ Page* _tmp50_ = NULL;
+ gboolean _tmp51_ = FALSE;
+ UserInterface* _tmp61_ = NULL;
+ Page* _tmp62_ = NULL;
+ Page* _tmp63_ = NULL;
#line 127 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_val_if_fail (self != NULL, NULL);
#line 130 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -944,44 +963,47 @@ static Page* simple_scan_append_page (SimpleScan* self) {
_tmp3_ = page;
#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp3_ != NULL) {
-#line 948 "simple-scan.c"
- Page* _tmp4_;
+#line 967 "simple-scan.c"
+ Page* _tmp4_ = NULL;
gboolean _tmp5_ = FALSE;
+ gboolean _tmp6_ = FALSE;
#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp4_ = page;
#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp5_ = page_has_data (_tmp4_);
+ _tmp5_ = page_get_has_data (_tmp4_);
#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp2_ = !_tmp5_;
-#line 957 "simple-scan.c"
+ _tmp6_ = _tmp5_;
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp2_ = !_tmp6_;
+#line 979 "simple-scan.c"
} else {
#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp2_ = FALSE;
-#line 961 "simple-scan.c"
+#line 983 "simple-scan.c"
}
#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp6_ = _tmp2_;
+ _tmp7_ = _tmp2_;
#line 131 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- if (_tmp6_) {
-#line 967 "simple-scan.c"
- UserInterface* _tmp7_;
- Page* _tmp8_;
- Page* _tmp9_;
+ if (_tmp7_) {
+#line 989 "simple-scan.c"
+ UserInterface* _tmp8_ = NULL;
+ Page* _tmp9_ = NULL;
+ Page* _tmp10_ = NULL;
#line 133 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp7_ = self->priv->ui;
+ _tmp8_ = self->priv->ui;
#line 133 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp8_ = page;
+ _tmp9_ = page;
#line 133 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- user_interface_set_selected_page (_tmp7_, _tmp8_);
+ user_interface_set_selected_page (_tmp8_, _tmp9_);
#line 134 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp9_ = page;
+ _tmp10_ = page;
#line 134 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- page_start (_tmp9_);
+ page_start (_tmp10_);
#line 135 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
result = page;
#line 135 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 985 "simple-scan.c"
+#line 1007 "simple-scan.c"
}
#line 139 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
scan_direction = SCAN_DIRECTION_TOP_TO_BOTTOM;
@@ -1004,239 +1026,291 @@ static Page* simple_scan_append_page (SimpleScan* self) {
#line 142 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
ch = 0;
#line 143 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp10_ = page;
+ _tmp11_ = page;
#line 143 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- if (_tmp10_ != NULL) {
-#line 1011 "simple-scan.c"
- Page* _tmp11_;
- ScanDirection _tmp12_ = 0;
- Page* _tmp13_;
- gint _tmp14_ = 0;
- Page* _tmp15_;
+ if (_tmp11_ != NULL) {
+#line 1033 "simple-scan.c"
+ Page* _tmp12_ = NULL;
+ ScanDirection _tmp13_ = 0;
+ ScanDirection _tmp14_ = 0;
+ Page* _tmp15_ = NULL;
gint _tmp16_ = 0;
- Page* _tmp17_;
- gint _tmp18_ = 0;
- Page* _tmp19_;
- gboolean _tmp20_ = FALSE;
- gboolean _tmp21_;
+ gint _tmp17_ = 0;
+ Page* _tmp18_ = NULL;
+ gint _tmp19_ = 0;
+ gint _tmp20_ = 0;
+ Page* _tmp21_ = NULL;
+ gint _tmp22_ = 0;
+ gint _tmp23_ = 0;
+ Page* _tmp24_ = NULL;
+ gboolean _tmp25_ = FALSE;
+ gboolean _tmp26_ = FALSE;
+ gboolean _tmp27_ = FALSE;
+#line 145 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp12_ = page;
#line 145 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp11_ = page;
+ _tmp13_ = page_get_scan_direction (_tmp12_);
#line 145 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp12_ = page_get_scan_direction (_tmp11_);
+ _tmp14_ = _tmp13_;
#line 145 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- scan_direction = _tmp12_;
+ scan_direction = _tmp14_;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp15_ = page;
#line 146 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp13_ = page;
+ _tmp16_ = page_get_width (_tmp15_);
#line 146 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp14_ = page_get_width (_tmp13_);
+ _tmp17_ = _tmp16_;
#line 146 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- width = _tmp14_;
+ width = _tmp17_;
#line 147 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp15_ = page;
+ _tmp18_ = page;
+#line 147 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp19_ = page_get_height (_tmp18_);
#line 147 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp16_ = page_get_height (_tmp15_);
+ _tmp20_ = _tmp19_;
#line 147 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- height = _tmp16_;
+ height = _tmp20_;
#line 148 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp17_ = page;
+ _tmp21_ = page;
#line 148 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp18_ = page_get_dpi (_tmp17_);
+ _tmp22_ = page_get_dpi (_tmp21_);
#line 148 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- dpi = _tmp18_;
+ _tmp23_ = _tmp22_;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ dpi = _tmp23_;
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp24_ = page;
#line 150 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp19_ = page;
+ _tmp25_ = page_get_has_crop (_tmp24_);
#line 150 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp20_ = page_has_crop (_tmp19_);
+ _tmp26_ = _tmp25_;
#line 150 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- do_crop = _tmp20_;
+ do_crop = _tmp26_;
#line 151 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp21_ = do_crop;
+ _tmp27_ = do_crop;
#line 151 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- if (_tmp21_) {
-#line 1057 "simple-scan.c"
- Page* _tmp22_;
- gchar* _tmp23_ = NULL;
- Page* _tmp24_;
- gint _tmp25_ = 0;
- gint _tmp26_ = 0;
- gint _tmp27_ = 0;
- gint _tmp28_ = 0;
+ if (_tmp27_) {
+#line 1094 "simple-scan.c"
+ Page* _tmp28_ = NULL;
+ const gchar* _tmp29_ = NULL;
+ const gchar* _tmp30_ = NULL;
+ gchar* _tmp31_ = NULL;
+ Page* _tmp32_ = NULL;
+ gint _tmp33_ = 0;
+ gint _tmp34_ = 0;
+ Page* _tmp35_ = NULL;
+ gint _tmp36_ = 0;
+ gint _tmp37_ = 0;
+ Page* _tmp38_ = NULL;
+ gint _tmp39_ = 0;
+ gint _tmp40_ = 0;
+ Page* _tmp41_ = NULL;
+ gint _tmp42_ = 0;
+ gint _tmp43_ = 0;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp28_ = page;
#line 153 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp22_ = page;
+ _tmp29_ = page_get_crop_name (_tmp28_);
#line 153 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp23_ = page_get_named_crop (_tmp22_);
+ _tmp30_ = _tmp29_;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp31_ = g_strdup (_tmp30_);
#line 153 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (named_crop);
#line 153 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- named_crop = _tmp23_;
-#line 154 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp24_ = page;
+ named_crop = _tmp31_;
#line 154 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- page_get_crop (_tmp24_, &_tmp25_, &_tmp26_, &_tmp27_, &_tmp28_);
+ _tmp32_ = page;
#line 154 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- cx = _tmp25_;
+ _tmp33_ = page_get_crop_x (_tmp32_);
#line 154 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- cy = _tmp26_;
+ _tmp34_ = _tmp33_;
#line 154 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- cw = _tmp27_;
-#line 154 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- ch = _tmp28_;
-#line 1085 "simple-scan.c"
+ cx = _tmp34_;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp35_ = page;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp36_ = page_get_crop_y (_tmp35_);
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp37_ = _tmp36_;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ cy = _tmp37_;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp38_ = page;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp39_ = page_get_crop_width (_tmp38_);
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp40_ = _tmp39_;
+#line 156 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ cw = _tmp40_;
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp41_ = page;
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp42_ = page_get_crop_height (_tmp41_);
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp43_ = _tmp42_;
+#line 157 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ ch = _tmp43_;
+#line 1155 "simple-scan.c"
}
}
-#line 158 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp29_ = self->priv->book;
-#line 158 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp30_ = width;
-#line 158 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp31_ = height;
-#line 158 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp32_ = dpi;
-#line 158 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp33_ = scan_direction;
-#line 158 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp34_ = book_append_page (_tmp29_, _tmp30_, _tmp31_, _tmp32_, _tmp33_);
-#line 158 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _page_unref0 (page);
-#line 158 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- page = _tmp34_;
-#line 159 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp35_ = do_crop;
-#line 159 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- if (_tmp35_) {
-#line 1108 "simple-scan.c"
- const gchar* _tmp36_;
- Page* _tmp42_;
- gint _tmp43_;
- gint _tmp44_;
#line 161 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp36_ = named_crop;
+ _tmp44_ = width;
#line 161 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- if (_tmp36_ != NULL) {
-#line 1117 "simple-scan.c"
- Page* _tmp37_;
- const gchar* _tmp38_;
-#line 163 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp37_ = page;
+ _tmp45_ = height;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp46_ = dpi;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp47_ = scan_direction;
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp48_ = page_new (_tmp44_, _tmp45_, _tmp46_, _tmp47_);
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _page_unref0 (page);
+#line 161 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page = _tmp48_;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp49_ = self->priv->book;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp50_ = page;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ book_append_page (_tmp49_, _tmp50_);
#line 163 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp38_ = named_crop;
+ _tmp51_ = do_crop;
#line 163 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- page_set_named_crop (_tmp37_, _tmp38_);
-#line 1126 "simple-scan.c"
- } else {
- Page* _tmp39_;
- gint _tmp40_;
- gint _tmp41_;
-#line 166 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp39_ = page;
-#line 166 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp40_ = cw;
-#line 166 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp41_ = ch;
-#line 166 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- page_set_custom_crop (_tmp39_, _tmp40_, _tmp41_);
-#line 1139 "simple-scan.c"
- }
+ if (_tmp51_) {
+#line 1182 "simple-scan.c"
+ const gchar* _tmp52_ = NULL;
+ Page* _tmp58_ = NULL;
+ gint _tmp59_ = 0;
+ gint _tmp60_ = 0;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp52_ = named_crop;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (_tmp52_ != NULL) {
+#line 1191 "simple-scan.c"
+ Page* _tmp53_ = NULL;
+ const gchar* _tmp54_ = NULL;
#line 167 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp42_ = page;
+ _tmp53_ = page;
#line 167 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp43_ = cx;
+ _tmp54_ = named_crop;
#line 167 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp44_ = cy;
-#line 167 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- page_move_crop (_tmp42_, _tmp43_, _tmp44_);
-#line 1149 "simple-scan.c"
- }
-#line 169 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp45_ = self->priv->ui;
-#line 169 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp46_ = page;
-#line 169 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- user_interface_set_selected_page (_tmp45_, _tmp46_);
+ page_set_named_crop (_tmp53_, _tmp54_);
+#line 1200 "simple-scan.c"
+ } else {
+ Page* _tmp55_ = NULL;
+ gint _tmp56_ = 0;
+ gint _tmp57_ = 0;
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp55_ = page;
#line 170 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp47_ = page;
+ _tmp56_ = cw;
#line 170 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- page_start (_tmp47_);
-#line 172 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp57_ = ch;
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page_set_custom_crop (_tmp55_, _tmp56_, _tmp57_);
+#line 1213 "simple-scan.c"
+ }
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp58_ = page;
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp59_ = cx;
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp60_ = cy;
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page_move_crop (_tmp58_, _tmp59_, _tmp60_);
+#line 1223 "simple-scan.c"
+ }
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp61_ = self->priv->ui;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp62_ = page;
+#line 173 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ user_interface_set_selected_page (_tmp61_, _tmp62_);
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp63_ = page;
+#line 174 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page_start (_tmp63_);
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
result = page;
-#line 172 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (named_crop);
-#line 172 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 176 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 1167 "simple-scan.c"
+#line 1241 "simple-scan.c"
}
static void simple_scan_scanner_new_page_cb (SimpleScan* self, Scanner* scanner) {
Page* _tmp0_ = NULL;
- Page* _tmp1_;
-#line 175 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ Page* _tmp1_ = NULL;
+#line 179 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (self != NULL);
-#line 175 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 179 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (scanner != NULL);
-#line 177 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp0_ = simple_scan_append_page (self);
-#line 177 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp1_ = _tmp0_;
-#line 177 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 181 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_page_unref0 (_tmp1_);
-#line 1184 "simple-scan.c"
+#line 1258 "simple-scan.c"
}
static gchar* simple_scan_get_profile_for_device (SimpleScan* self, const gchar* device_name) {
gchar* result = NULL;
- const gchar* _tmp0_;
+ gchar* device_id = NULL;
+ const gchar* _tmp0_ = NULL;
gchar* _tmp1_ = NULL;
- gchar* device_id;
- const gchar* _tmp2_;
- CdClient* _tmp3_;
- CdClient* client;
+ const gchar* _tmp2_ = NULL;
+ CdClient* client = NULL;
+ CdClient* _tmp3_ = NULL;
CdDevice* device = NULL;
- CdDevice* _tmp18_;
+ CdProfile* profile = NULL;
+ CdDevice* _tmp18_ = NULL;
CdProfile* _tmp19_ = NULL;
- CdProfile* profile;
- CdProfile* _tmp20_;
- CdProfile* _tmp26_;
- const gchar* _tmp27_;
- const gchar* _tmp28_;
- CdProfile* _tmp30_;
- const gchar* _tmp31_;
- const gchar* _tmp32_;
- const gchar* _tmp33_;
- CdProfile* _tmp34_;
- const gchar* _tmp35_;
- const gchar* _tmp36_;
- gchar* _tmp37_;
+ CdProfile* _tmp20_ = NULL;
+ CdProfile* _tmp26_ = NULL;
+ const gchar* _tmp27_ = NULL;
+ const gchar* _tmp28_ = NULL;
+ CdProfile* _tmp30_ = NULL;
+ const gchar* _tmp31_ = NULL;
+ const gchar* _tmp32_ = NULL;
+ const gchar* _tmp33_ = NULL;
+ CdProfile* _tmp34_ = NULL;
+ const gchar* _tmp35_ = NULL;
+ const gchar* _tmp36_ = NULL;
+ gchar* _tmp37_ = NULL;
GError * _inner_error_ = NULL;
-#line 180 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 184 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_val_if_fail (self != NULL, NULL);
-#line 180 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 184 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_val_if_fail (device_name != NULL, NULL);
-#line 183 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 187 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp0_ = device_name;
-#line 183 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 187 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp1_ = g_strdup_printf ("sane:%s", _tmp0_);
-#line 183 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 187 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
device_id = _tmp1_;
-#line 184 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp2_ = device_name;
-#line 184 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_debug ("simple-scan.vala:184: Getting color profile for device %s", _tmp2_);
-#line 186 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 188 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:188: Getting color profile for device %s", _tmp2_);
+#line 190 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp3_ = cd_client_new ();
-#line 186 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 190 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
client = _tmp3_;
-#line 1231 "simple-scan.c"
+#line 1305 "simple-scan.c"
{
- CdClient* _tmp4_;
-#line 189 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ CdClient* _tmp4_ = NULL;
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp4_ = client;
-#line 189 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
cd_client_connect_sync (_tmp4_, NULL, &_inner_error_);
-#line 189 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 1240 "simple-scan.c"
+#line 1314 "simple-scan.c"
goto __catch4_g_error;
}
}
@@ -1244,128 +1318,128 @@ static gchar* simple_scan_get_profile_for_device (SimpleScan* self, const gchar*
__catch4_g_error:
{
GError* e = NULL;
- GError* _tmp5_;
- const gchar* _tmp6_;
-#line 187 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ GError* _tmp5_ = NULL;
+ const gchar* _tmp6_ = NULL;
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
e = _inner_error_;
-#line 187 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_inner_error_ = NULL;
-#line 193 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 197 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp5_ = e;
-#line 193 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 197 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp6_ = _tmp5_->message;
-#line 193 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_debug ("simple-scan.vala:193: Failed to connect to colord: %s", _tmp6_);
-#line 194 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 197 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:197: Failed to connect to colord: %s", _tmp6_);
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
result = NULL;
-#line 194 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_error_free0 (e);
-#line 194 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (client);
-#line 194 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (device_id);
-#line 194 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 1270 "simple-scan.c"
+#line 1344 "simple-scan.c"
}
__finally4:
-#line 187 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 187 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (client);
-#line 187 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (device_id);
-#line 187 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.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 187 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_clear_error (&_inner_error_);
-#line 187 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return NULL;
-#line 1285 "simple-scan.c"
+#line 1359 "simple-scan.c"
}
{
- CdClient* _tmp7_;
- const gchar* _tmp8_;
- CdDevice* _tmp9_ = NULL;
- CdDevice* _tmp10_;
-#line 200 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp7_ = client;
-#line 200 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp8_ = device_id;
-#line 200 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp9_ = cd_client_find_device_by_property_sync (_tmp7_, CD_DEVICE_PROPERTY_SERIAL, _tmp8_, NULL, &_inner_error_);
-#line 200 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp10_ = _tmp9_;
-#line 200 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ CdDevice* _tmp7_ = NULL;
+ CdClient* _tmp8_ = NULL;
+ const gchar* _tmp9_ = NULL;
+ CdDevice* _tmp10_ = NULL;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp8_ = client;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp9_ = device_id;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp10_ = cd_client_find_device_by_property_sync (_tmp8_, CD_DEVICE_PROPERTY_SERIAL, _tmp9_, NULL, &_inner_error_);
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = _tmp10_;
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 1302 "simple-scan.c"
+#line 1376 "simple-scan.c"
goto __catch5_g_error;
}
-#line 200 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (device);
-#line 200 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- device = _tmp10_;
-#line 1309 "simple-scan.c"
+#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ device = _tmp7_;
+#line 1383 "simple-scan.c"
}
goto __finally5;
__catch5_g_error:
{
GError* e = NULL;
- const gchar* _tmp11_;
- GError* _tmp12_;
- const gchar* _tmp13_;
-#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ const gchar* _tmp11_ = NULL;
+ GError* _tmp12_ = NULL;
+ const gchar* _tmp13_ = NULL;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
e = _inner_error_;
-#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_inner_error_ = NULL;
-#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp11_ = device_name;
-#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp12_ = e;
-#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp13_ = _tmp12_->message;
-#line 204 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_debug ("simple-scan.vala:204: Unable to find colord device %s: %s", _tmp11_, _tmp13_);
-#line 205 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:208: Unable to find colord device %s: %s", _tmp11_, _tmp13_);
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
result = NULL;
-#line 205 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_error_free0 (e);
-#line 205 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (device);
-#line 205 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (client);
-#line 205 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (device_id);
-#line 205 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 209 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 1342 "simple-scan.c"
+#line 1416 "simple-scan.c"
}
__finally5:
-#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (device);
-#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (client);
-#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (device_id);
-#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.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 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_clear_error (&_inner_error_);
-#line 198 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return NULL;
-#line 1359 "simple-scan.c"
+#line 1433 "simple-scan.c"
}
{
- CdDevice* _tmp14_;
-#line 210 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ CdDevice* _tmp14_ = NULL;
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp14_ = device;
-#line 210 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
cd_device_connect_sync (_tmp14_, NULL, &_inner_error_);
-#line 210 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 214 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 1369 "simple-scan.c"
+#line 1443 "simple-scan.c"
goto __catch6_g_error;
}
}
@@ -1373,91 +1447,91 @@ static gchar* simple_scan_get_profile_for_device (SimpleScan* self, const gchar*
__catch6_g_error:
{
GError* e = NULL;
- const gchar* _tmp15_;
- GError* _tmp16_;
- const gchar* _tmp17_;
-#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ const gchar* _tmp15_ = NULL;
+ GError* _tmp16_ = NULL;
+ const gchar* _tmp17_ = NULL;
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
e = _inner_error_;
-#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_inner_error_ = NULL;
-#line 214 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp15_ = device_name;
-#line 214 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp16_ = e;
-#line 214 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp17_ = _tmp16_->message;
-#line 214 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_debug ("simple-scan.vala:214: Failed to get properties from the device %s: %s", _tmp15_, _tmp17_);
-#line 215 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:218: Failed to get properties from the device %s: %s", _tmp15_, _tmp17_);
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
result = NULL;
-#line 215 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_error_free0 (e);
-#line 215 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (device);
-#line 215 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (client);
-#line 215 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (device_id);
-#line 215 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 1404 "simple-scan.c"
+#line 1478 "simple-scan.c"
}
__finally6:
-#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (device);
-#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (client);
-#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (device_id);
-#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.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 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_clear_error (&_inner_error_);
-#line 208 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 212 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return NULL;
-#line 1421 "simple-scan.c"
+#line 1495 "simple-scan.c"
}
-#line 218 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp18_ = device;
-#line 218 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp19_ = cd_device_get_default_profile (_tmp18_);
-#line 218 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
profile = _tmp19_;
-#line 219 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp20_ = profile;
-#line 219 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp20_ == NULL) {
-#line 1433 "simple-scan.c"
- const gchar* _tmp21_;
-#line 221 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 1507 "simple-scan.c"
+ const gchar* _tmp21_ = NULL;
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp21_ = device_name;
-#line 221 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_debug ("simple-scan.vala:221: No default color profile for device: %s", _tmp21_);
-#line 222 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 225 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:225: No default color profile for device: %s", _tmp21_);
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
result = NULL;
-#line 222 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (profile);
-#line 222 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (device);
-#line 222 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (client);
-#line 222 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (device_id);
-#line 222 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 1451 "simple-scan.c"
+#line 1525 "simple-scan.c"
}
{
- CdProfile* _tmp22_;
-#line 227 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ CdProfile* _tmp22_ = NULL;
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp22_ = profile;
-#line 227 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
cd_profile_connect_sync (_tmp22_, NULL, &_inner_error_);
-#line 227 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 231 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 1461 "simple-scan.c"
+#line 1535 "simple-scan.c"
goto __catch7_g_error;
}
}
@@ -1465,287 +1539,292 @@ static gchar* simple_scan_get_profile_for_device (SimpleScan* self, const gchar*
__catch7_g_error:
{
GError* e = NULL;
- const gchar* _tmp23_;
- GError* _tmp24_;
- const gchar* _tmp25_;
-#line 225 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ const gchar* _tmp23_ = NULL;
+ GError* _tmp24_ = NULL;
+ const gchar* _tmp25_ = NULL;
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
e = _inner_error_;
-#line 225 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_inner_error_ = NULL;
-#line 231 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp23_ = device_name;
-#line 231 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp24_ = e;
-#line 231 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp25_ = _tmp24_->message;
-#line 231 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_debug ("simple-scan.vala:231: Failed to get properties from the profile %s: %s", _tmp23_, _tmp25_);
-#line 232 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 235 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:235: Failed to get properties from the profile %s: %s", _tmp23_, _tmp25_);
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
result = NULL;
-#line 232 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_error_free0 (e);
-#line 232 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (profile);
-#line 232 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (device);
-#line 232 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (client);
-#line 232 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (device_id);
-#line 232 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 1498 "simple-scan.c"
+#line 1572 "simple-scan.c"
}
__finally7:
-#line 225 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 225 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (profile);
-#line 225 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (device);
-#line 225 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (client);
-#line 225 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (device_id);
-#line 225 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.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 225 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_clear_error (&_inner_error_);
-#line 225 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return NULL;
-#line 1517 "simple-scan.c"
+#line 1591 "simple-scan.c"
}
-#line 235 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp26_ = profile;
-#line 235 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp27_ = cd_profile_get_filename (_tmp26_);
-#line 235 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp28_ = _tmp27_;
-#line 235 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp28_ == NULL) {
-#line 1527 "simple-scan.c"
- const gchar* _tmp29_;
-#line 237 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 1601 "simple-scan.c"
+ const gchar* _tmp29_ = NULL;
+#line 241 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp29_ = device_name;
-#line 237 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_debug ("simple-scan.vala:237: No icc color profile for the device %s", _tmp29_);
-#line 238 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 241 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:241: No icc color profile for the device %s", _tmp29_);
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
result = NULL;
-#line 238 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (profile);
-#line 238 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (device);
-#line 238 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (client);
-#line 238 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (device_id);
-#line 238 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 1545 "simple-scan.c"
+#line 1619 "simple-scan.c"
}
-#line 241 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp30_ = profile;
-#line 241 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp31_ = cd_profile_get_filename (_tmp30_);
-#line 241 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp32_ = _tmp31_;
-#line 241 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp33_ = device_name;
-#line 241 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_debug ("simple-scan.vala:241: Using color profile %s for device %s", _tmp32_, _tmp33_);
-#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 245 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:245: Using color profile %s for device %s", _tmp32_, _tmp33_);
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp34_ = profile;
-#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp35_ = cd_profile_get_filename (_tmp34_);
-#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp36_ = _tmp35_;
-#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp37_ = g_strdup (_tmp36_);
-#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
result = _tmp37_;
-#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (profile);
-#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (device);
-#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (client);
-#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (device_id);
-#line 242 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 1577 "simple-scan.c"
+#line 1651 "simple-scan.c"
}
static void simple_scan_scanner_page_info_cb (SimpleScan* self, Scanner* scanner, ScanPageInfo* info) {
- ScanPageInfo* _tmp0_;
- gint _tmp1_;
- ScanPageInfo* _tmp2_;
- gint _tmp3_;
- ScanPageInfo* _tmp4_;
- gint _tmp5_;
+ ScanPageInfo* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ ScanPageInfo* _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+ ScanPageInfo* _tmp4_ = NULL;
+ gint _tmp5_ = 0;
+ Page* page = NULL;
Page* _tmp6_ = NULL;
- Page* page;
- ScanPageInfo* _tmp7_;
- ScanPageInfo* _tmp8_;
- const gchar* _tmp9_;
+ ScanPageInfo* _tmp7_ = NULL;
+ ScanPageInfo* _tmp8_ = NULL;
+ const gchar* _tmp9_ = NULL;
gchar* _tmp10_ = NULL;
- gchar* _tmp11_;
-#line 248 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ gchar* _tmp11_ = NULL;
+#line 252 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (self != NULL);
-#line 248 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 252 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (scanner != NULL);
-#line 248 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 252 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (info != NULL);
-#line 250 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp0_ = info;
-#line 250 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp1_ = _tmp0_->width;
-#line 250 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp2_ = info;
-#line 250 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp3_ = _tmp2_->height;
-#line 250 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp4_ = info;
-#line 250 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp5_ = _tmp4_->depth;
-#line 250 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_debug ("simple-scan.vala:250: Page is %d pixels wide, %d pixels high, %d bits " \
-"per pixel", _tmp1_, _tmp3_, _tmp5_);
#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ g_debug ("simple-scan.vala:254: Page is %d pixels wide, %d pixels high, %d bits " \
+"per pixel", _tmp1_, _tmp3_, _tmp5_);
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp6_ = simple_scan_append_page (self);
-#line 254 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
page = _tmp6_;
-#line 255 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 259 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp7_ = info;
-#line 255 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 259 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
page_set_page_info (page, _tmp7_);
-#line 260 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp8_ = info;
-#line 260 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp9_ = _tmp8_->device;
-#line 260 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp10_ = simple_scan_get_profile_for_device (self, _tmp9_);
-#line 260 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp11_ = _tmp10_;
-#line 260 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
page_set_color_profile (page, _tmp11_);
-#line 260 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (_tmp11_);
-#line 248 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 252 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_page_unref0 (page);
-#line 1637 "simple-scan.c"
+#line 1711 "simple-scan.c"
}
static void simple_scan_scanner_line_cb (SimpleScan* self, Scanner* scanner, ScanLine* line) {
- Book* _tmp0_;
- Book* _tmp1_;
+ Page* page = NULL;
+ Book* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
guint _tmp2_ = 0U;
- Page* _tmp3_ = NULL;
- Page* page;
- ScanLine* _tmp4_;
-#line 263 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ guint _tmp3_ = 0U;
+ Page* _tmp4_ = NULL;
+ ScanLine* _tmp5_ = NULL;
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (self != NULL);
-#line 263 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (scanner != NULL);
-#line 263 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (line != NULL);
-#line 265 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp0_ = self->priv->book;
-#line 265 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp1_ = self->priv->book;
-#line 265 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp2_ = book_get_n_pages (_tmp1_);
-#line 265 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp3_ = book_get_page (_tmp0_, ((gint) _tmp2_) - 1);
-#line 265 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- page = _tmp3_;
-#line 266 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp4_ = line;
-#line 266 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- page_parse_scan_line (page, _tmp4_);
-#line 263 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = _tmp2_;
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = book_get_page (_tmp0_, ((gint) _tmp3_) - 1);
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page = _tmp4_;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = line;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page_parse_scan_line (page, _tmp5_);
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_page_unref0 (page);
-#line 1670 "simple-scan.c"
+#line 1747 "simple-scan.c"
}
static void simple_scan_scanner_page_done_cb (SimpleScan* self, Scanner* scanner) {
- Book* _tmp0_;
- Book* _tmp1_;
+ Page* page = NULL;
+ Book* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
guint _tmp2_ = 0U;
- Page* _tmp3_ = NULL;
- Page* page;
-#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ guint _tmp3_ = 0U;
+ Page* _tmp4_ = NULL;
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (self != NULL);
-#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (scanner != NULL);
-#line 271 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp0_ = self->priv->book;
-#line 271 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp1_ = self->priv->book;
-#line 271 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp2_ = book_get_n_pages (_tmp1_);
-#line 271 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp3_ = book_get_page (_tmp0_, ((gint) _tmp2_) - 1);
-#line 271 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- page = _tmp3_;
-#line 272 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp3_ = _tmp2_;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp4_ = book_get_page (_tmp0_, ((gint) _tmp3_) - 1);
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page = _tmp4_;
+#line 276 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
page_finish (page);
-#line 269 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_page_unref0 (page);
-#line 1698 "simple-scan.c"
+#line 1778 "simple-scan.c"
}
static void simple_scan_remove_empty_page (SimpleScan* self) {
- Book* _tmp0_;
- Book* _tmp1_;
+ Page* page = NULL;
+ Book* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
guint _tmp2_ = 0U;
- Page* _tmp3_ = NULL;
- Page* page;
- Page* _tmp4_;
- gboolean _tmp5_ = FALSE;
-#line 275 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ guint _tmp3_ = 0U;
+ Page* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+ gboolean _tmp6_ = FALSE;
+ gboolean _tmp7_ = FALSE;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (self != NULL);
-#line 277 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp0_ = self->priv->book;
-#line 277 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp1_ = self->priv->book;
-#line 277 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp2_ = book_get_n_pages (_tmp1_);
-#line 277 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp3_ = book_get_page (_tmp0_, ((gint) _tmp2_) - 1);
-#line 277 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- page = _tmp3_;
-#line 280 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp4_ = page;
-#line 280 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp5_ = page_has_data (_tmp4_);
-#line 280 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- if (_tmp5_) {
-#line 1728 "simple-scan.c"
- Page* _tmp6_;
#line 281 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp6_ = page;
+ _tmp3_ = _tmp2_;
#line 281 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- page_finish (_tmp6_);
-#line 1734 "simple-scan.c"
- } else {
- Book* _tmp7_;
- Page* _tmp8_;
+ _tmp4_ = book_get_page (_tmp0_, ((gint) _tmp3_) - 1);
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ page = _tmp4_;
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp5_ = page;
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp6_ = page_get_has_data (_tmp5_);
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ _tmp7_ = _tmp6_;
+#line 282 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (!_tmp7_) {
+#line 1814 "simple-scan.c"
+ Book* _tmp8_ = NULL;
+ Page* _tmp9_ = NULL;
#line 283 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp7_ = self->priv->book;
+ _tmp8_ = self->priv->book;
#line 283 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp8_ = page;
+ _tmp9_ = page;
#line 283 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- book_delete_page (_tmp7_, _tmp8_);
-#line 1744 "simple-scan.c"
+ book_delete_page (_tmp8_, _tmp9_);
+#line 1823 "simple-scan.c"
}
-#line 275 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_page_unref0 (page);
-#line 1748 "simple-scan.c"
+#line 1827 "simple-scan.c"
}
@@ -1756,12 +1835,12 @@ static void simple_scan_scanner_document_done_cb (SimpleScan* self, Scanner* sca
g_return_if_fail (scanner != NULL);
#line 288 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_remove_empty_page (self);
-#line 1759 "simple-scan.c"
+#line 1838 "simple-scan.c"
}
static void simple_scan_scanner_failed_cb (SimpleScan* self, Scanner* scanner, gint error_code, const gchar* error_string) {
- gint _tmp0_;
+ gint _tmp0_ = 0;
#line 291 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (self != NULL);
#line 291 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -1774,11 +1853,11 @@ static void simple_scan_scanner_failed_cb (SimpleScan* self, Scanner* scanner, g
_tmp0_ = error_code;
#line 294 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp0_ != ((gint) SANE_STATUS_CANCELLED)) {
-#line 1777 "simple-scan.c"
- UserInterface* _tmp1_;
+#line 1856 "simple-scan.c"
+ UserInterface* _tmp1_ = NULL;
const gchar* _tmp2_ = NULL;
- const gchar* _tmp3_;
- gboolean _tmp4_;
+ const gchar* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
#line 296 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp1_ = self->priv->ui;
#line 296 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -1789,14 +1868,14 @@ static void simple_scan_scanner_failed_cb (SimpleScan* self, Scanner* scanner, g
_tmp4_ = self->priv->have_devices;
#line 296 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
user_interface_show_error (_tmp1_, _tmp2_, _tmp3_, _tmp4_);
-#line 1792 "simple-scan.c"
+#line 1871 "simple-scan.c"
}
}
static void simple_scan_scanner_scanning_changed_cb (SimpleScan* self, Scanner* scanner) {
- UserInterface* _tmp0_;
- Scanner* _tmp1_;
+ UserInterface* _tmp0_ = NULL;
+ Scanner* _tmp1_ = NULL;
gboolean _tmp2_ = FALSE;
#line 303 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (self != NULL);
@@ -1810,30 +1889,30 @@ static void simple_scan_scanner_scanning_changed_cb (SimpleScan* self, Scanner*
_tmp2_ = scanner_is_scanning (_tmp1_);
#line 305 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
user_interface_set_scanning (_tmp0_, _tmp2_);
-#line 1813 "simple-scan.c"
+#line 1892 "simple-scan.c"
}
static void simple_scan_scan_cb (SimpleScan* self, UserInterface* ui, const gchar* device, ScanOptions* options) {
- ScanOptions* _tmp0_;
- gint _tmp1_;
- const gchar* _tmp2_;
- Scanner* _tmp3_;
+ ScanOptions* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ const gchar* _tmp2_ = NULL;
+ Scanner* _tmp3_ = NULL;
gboolean _tmp4_ = FALSE;
+ gchar* filename_prefix = NULL;
const gchar* _tmp7_ = NULL;
- gchar* _tmp8_;
- gchar* filename_prefix;
+ gchar* _tmp8_ = NULL;
gchar* extension = NULL;
- ScanOptions* _tmp9_;
- ScanMode _tmp10_;
- const gchar* _tmp13_;
- const gchar* _tmp14_;
+ ScanOptions* _tmp9_ = NULL;
+ ScanMode _tmp10_ = 0;
+ gchar* filename = NULL;
+ const gchar* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
gchar* _tmp15_ = NULL;
- gchar* filename;
- UserInterface* _tmp16_;
- Scanner* _tmp17_;
- const gchar* _tmp18_;
- ScanOptions* _tmp19_;
+ UserInterface* _tmp16_ = NULL;
+ Scanner* _tmp17_ = NULL;
+ const gchar* _tmp18_ = NULL;
+ ScanOptions* _tmp19_ = NULL;
#line 308 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (self != NULL);
#line 308 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -1854,16 +1933,16 @@ static void simple_scan_scan_cb (SimpleScan* self, UserInterface* ui, const gcha
_tmp4_ = scanner_is_scanning (_tmp3_);
#line 312 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (!_tmp4_) {
-#line 1857 "simple-scan.c"
+#line 1936 "simple-scan.c"
Page* _tmp5_ = NULL;
- Page* _tmp6_;
+ Page* _tmp6_ = NULL;
#line 313 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp5_ = simple_scan_append_page (self);
#line 313 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp6_ = _tmp5_;
#line 313 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_page_unref0 (_tmp6_);
-#line 1866 "simple-scan.c"
+#line 1945 "simple-scan.c"
}
#line 316 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp7_ = _ ("Scanned Document");
@@ -1877,24 +1956,24 @@ static void simple_scan_scan_cb (SimpleScan* self, UserInterface* ui, const gcha
_tmp10_ = _tmp9_->scan_mode;
#line 318 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp10_ == SCAN_MODE_COLOR) {
-#line 1880 "simple-scan.c"
- gchar* _tmp11_;
+#line 1959 "simple-scan.c"
+ gchar* _tmp11_ = NULL;
#line 319 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp11_ = g_strdup ("jpg");
#line 319 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (extension);
#line 319 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
extension = _tmp11_;
-#line 1888 "simple-scan.c"
+#line 1967 "simple-scan.c"
} else {
- gchar* _tmp12_;
+ gchar* _tmp12_ = NULL;
#line 321 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp12_ = g_strdup ("pdf");
#line 321 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (extension);
#line 321 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
extension = _tmp12_;
-#line 1897 "simple-scan.c"
+#line 1976 "simple-scan.c"
}
#line 322 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp13_ = filename_prefix;
@@ -1922,12 +2001,12 @@ static void simple_scan_scan_cb (SimpleScan* self, UserInterface* ui, const gcha
_g_free0 (extension);
#line 308 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (filename_prefix);
-#line 1925 "simple-scan.c"
+#line 2004 "simple-scan.c"
}
static void simple_scan_cancel_cb (SimpleScan* self, UserInterface* ui) {
- Scanner* _tmp0_;
+ Scanner* _tmp0_ = NULL;
#line 327 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (self != NULL);
#line 327 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -1936,16 +2015,16 @@ static void simple_scan_cancel_cb (SimpleScan* self, UserInterface* ui) {
_tmp0_ = self->priv->scanner;
#line 329 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
scanner_cancel (_tmp0_);
-#line 1939 "simple-scan.c"
+#line 2018 "simple-scan.c"
}
static gchar* simple_scan_get_temporary_filename (SimpleScan* self, const gchar* prefix, const gchar* extension) {
gchar* result = NULL;
- const gchar* _tmp0_;
- const gchar* _tmp1_;
+ gchar* filename = NULL;
+ const gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
gchar* _tmp2_ = NULL;
- gchar* filename;
gchar* path = NULL;
GError * _inner_error_ = NULL;
#line 332 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -1962,13 +2041,13 @@ static gchar* simple_scan_get_temporary_filename (SimpleScan* self, const gchar*
_tmp2_ = g_strdup_printf ("%sXXXXXX.%s", _tmp0_, _tmp1_);
#line 337 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
filename = _tmp2_;
-#line 1965 "simple-scan.c"
+#line 2044 "simple-scan.c"
{
- const gchar* _tmp3_;
+ gint fd = 0;
+ const gchar* _tmp3_ = NULL;
gchar* _tmp4_ = NULL;
gint _tmp5_ = 0;
- gint fd;
- gint _tmp6_;
+ gint _tmp6_ = 0;
#line 341 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp3_ = filename;
#line 341 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -1981,21 +2060,21 @@ static gchar* simple_scan_get_temporary_filename (SimpleScan* self, const gchar*
fd = _tmp5_;
#line 341 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 1984 "simple-scan.c"
+#line 2063 "simple-scan.c"
goto __catch8_g_error;
}
#line 342 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp6_ = fd;
#line 342 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
close (_tmp6_);
-#line 1991 "simple-scan.c"
+#line 2070 "simple-scan.c"
}
goto __finally8;
__catch8_g_error:
{
GError* e = NULL;
- GError* _tmp7_;
- const gchar* _tmp8_;
+ GError* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
#line 339 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
e = _inner_error_;
#line 339 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2016,7 +2095,7 @@ static gchar* simple_scan_get_temporary_filename (SimpleScan* self, const gchar*
_g_free0 (filename);
#line 347 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 2019 "simple-scan.c"
+#line 2098 "simple-scan.c"
}
__finally8:
#line 339 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2031,7 +2110,7 @@ static gchar* simple_scan_get_temporary_filename (SimpleScan* self, const gchar*
g_clear_error (&_inner_error_);
#line 339 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return NULL;
-#line 2034 "simple-scan.c"
+#line 2113 "simple-scan.c"
}
#line 350 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
result = path;
@@ -2039,16 +2118,16 @@ static gchar* simple_scan_get_temporary_filename (SimpleScan* self, const gchar*
_g_free0 (filename);
#line 350 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 2042 "simple-scan.c"
+#line 2121 "simple-scan.c"
}
static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gchar* profile, gint quality) {
- gboolean saved;
- gchar* _tmp0_;
- gchar* command_line;
- const gchar* _tmp1_;
- const gchar* _tmp42_;
+ gboolean saved = FALSE;
+ gchar* command_line = NULL;
+ gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+ const gchar* _tmp43_ = NULL;
GError * _inner_error_ = NULL;
#line 353 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (self != NULL);
@@ -2066,10 +2145,10 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
_tmp1_ = profile;
#line 359 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (g_strcmp0 (_tmp1_, "text") == 0) {
-#line 2069 "simple-scan.c"
+#line 2148 "simple-scan.c"
+ gchar* path = NULL;
gchar* _tmp2_ = NULL;
- gchar* path;
- const gchar* _tmp3_;
+ const gchar* _tmp3_ = NULL;
#line 362 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp2_ = simple_scan_get_temporary_filename (self, "scan", "pdf");
#line 362 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2078,16 +2157,16 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
_tmp3_ = path;
#line 363 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp3_ != NULL) {
-#line 2081 "simple-scan.c"
- const gchar* _tmp4_;
+#line 2160 "simple-scan.c"
+ GFile* file = NULL;
+ const gchar* _tmp4_ = NULL;
GFile* _tmp5_ = NULL;
- GFile* file;
- UserInterface* _tmp6_;
- const gchar* _tmp13_;
- const gchar* _tmp14_;
+ UserInterface* _tmp6_ = NULL;
+ const gchar* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
gchar* _tmp15_ = NULL;
- gchar* _tmp16_;
- gchar* _tmp17_;
+ gchar* _tmp16_ = NULL;
+ gchar* _tmp17_ = NULL;
#line 365 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp4_ = path;
#line 365 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2098,11 +2177,11 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
_tmp6_ = ui;
#line 366 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
user_interface_show_progress_dialog (_tmp6_);
-#line 2101 "simple-scan.c"
+#line 2180 "simple-scan.c"
{
- Book* _tmp7_;
- gint _tmp8_;
- GFile* _tmp9_;
+ Book* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+ GFile* _tmp9_ = NULL;
#line 369 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp7_ = self->priv->book;
#line 369 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2113,7 +2192,7 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
book_save (_tmp7_, "pdf", _tmp8_, _tmp9_, &_inner_error_);
#line 369 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 2116 "simple-scan.c"
+#line 2195 "simple-scan.c"
goto __catch9_g_error;
}
}
@@ -2121,9 +2200,9 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
__catch9_g_error:
{
GError* e = NULL;
- UserInterface* _tmp10_;
- GError* _tmp11_;
- const gchar* _tmp12_;
+ UserInterface* _tmp10_ = NULL;
+ GError* _tmp11_ = NULL;
+ const gchar* _tmp12_ = NULL;
#line 367 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
e = _inner_error_;
#line 367 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2148,7 +2227,7 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
_g_free0 (command_line);
#line 375 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return;
-#line 2151 "simple-scan.c"
+#line 2230 "simple-scan.c"
}
__finally9:
#line 367 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2165,7 +2244,7 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
g_clear_error (&_inner_error_);
#line 367 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return;
-#line 2168 "simple-scan.c"
+#line 2247 "simple-scan.c"
}
#line 377 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp13_ = command_line;
@@ -2185,51 +2264,52 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
_g_free0 (_tmp16_);
#line 363 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (file);
-#line 2188 "simple-scan.c"
+#line 2267 "simple-scan.c"
}
#line 359 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (path);
-#line 2192 "simple-scan.c"
+#line 2271 "simple-scan.c"
} else {
{
- gint i;
+ gint i = 0;
#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
i = 0;
-#line 2198 "simple-scan.c"
+#line 2277 "simple-scan.c"
{
- gboolean _tmp18_;
+ gboolean _tmp18_ = FALSE;
#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp18_ = TRUE;
#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
while (TRUE) {
-#line 2205 "simple-scan.c"
- gboolean _tmp19_;
- gint _tmp21_;
- Book* _tmp22_;
+#line 2284 "simple-scan.c"
+ gboolean _tmp19_ = FALSE;
+ gint _tmp21_ = 0;
+ Book* _tmp22_ = NULL;
guint _tmp23_ = 0U;
- gchar* _tmp24_ = NULL;
- gchar* path;
- const gchar* _tmp25_;
- const gchar* _tmp26_;
- GFile* _tmp27_ = NULL;
- GFile* file;
- const gchar* _tmp36_;
- const gchar* _tmp37_;
- gchar* _tmp38_ = NULL;
- gchar* _tmp39_;
- gchar* _tmp40_;
- gboolean _tmp41_;
+ guint _tmp24_ = 0U;
+ gchar* path = NULL;
+ gchar* _tmp25_ = NULL;
+ const gchar* _tmp26_ = NULL;
+ GFile* file = NULL;
+ const gchar* _tmp27_ = NULL;
+ GFile* _tmp28_ = NULL;
+ const gchar* _tmp37_ = NULL;
+ const gchar* _tmp38_ = NULL;
+ gchar* _tmp39_ = NULL;
+ gchar* _tmp40_ = NULL;
+ gchar* _tmp41_ = NULL;
+ gboolean _tmp42_ = FALSE;
#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp19_ = _tmp18_;
#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (!_tmp19_) {
-#line 2226 "simple-scan.c"
- gint _tmp20_;
+#line 2306 "simple-scan.c"
+ gint _tmp20_ = 0;
#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp20_ = i;
#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
i = _tmp20_ + 1;
-#line 2232 "simple-scan.c"
+#line 2312 "simple-scan.c"
}
#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp18_ = FALSE;
@@ -2240,60 +2320,62 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp23_ = book_get_n_pages (_tmp22_);
#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- if (!(((guint) _tmp21_) < _tmp23_)) {
+ _tmp24_ = _tmp23_;
+#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
+ if (!(((guint) _tmp21_) < _tmp24_)) {
#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 2246 "simple-scan.c"
+#line 2328 "simple-scan.c"
}
#line 384 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp24_ = simple_scan_get_temporary_filename (self, "scan", "jpg");
+ _tmp25_ = simple_scan_get_temporary_filename (self, "scan", "jpg");
#line 384 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- path = _tmp24_;
+ path = _tmp25_;
#line 385 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp25_ = path;
+ _tmp26_ = path;
#line 385 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- if (_tmp25_ == NULL) {
+ if (_tmp26_ == NULL) {
#line 387 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
saved = FALSE;
#line 388 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (path);
#line 388 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 2262 "simple-scan.c"
+#line 2344 "simple-scan.c"
}
#line 391 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp26_ = path;
+ _tmp27_ = path;
#line 391 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp27_ = g_file_new_for_path (_tmp26_);
+ _tmp28_ = g_file_new_for_path (_tmp27_);
#line 391 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- file = _tmp27_;
-#line 2270 "simple-scan.c"
+ file = _tmp28_;
+#line 2352 "simple-scan.c"
{
- Book* _tmp28_;
- gint _tmp29_;
- Page* _tmp30_ = NULL;
- Page* _tmp31_;
- gint _tmp32_;
- GFile* _tmp33_;
+ Book* _tmp29_ = NULL;
+ gint _tmp30_ = 0;
+ Page* _tmp31_ = NULL;
+ Page* _tmp32_ = NULL;
+ gint _tmp33_ = 0;
+ GFile* _tmp34_ = NULL;
#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp28_ = self->priv->book;
+ _tmp29_ = self->priv->book;
#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp29_ = i;
+ _tmp30_ = i;
#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp30_ = book_get_page (_tmp28_, _tmp29_);
+ _tmp31_ = book_get_page (_tmp29_, _tmp30_);
#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp31_ = _tmp30_;
+ _tmp32_ = _tmp31_;
#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp32_ = quality;
+ _tmp33_ = quality;
#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp33_ = file;
+ _tmp34_ = file;
#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- page_save (_tmp31_, "jpeg", _tmp32_, _tmp33_, &_inner_error_);
+ page_save (_tmp32_, "jpeg", _tmp33_, _tmp34_, &_inner_error_);
#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _page_unref0 (_tmp31_);
+ _page_unref0 (_tmp32_);
#line 394 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 2296 "simple-scan.c"
+#line 2378 "simple-scan.c"
goto __catch10_g_error;
}
}
@@ -2301,18 +2383,18 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
__catch10_g_error:
{
GError* e = NULL;
- GError* _tmp34_;
- const gchar* _tmp35_;
+ GError* _tmp35_ = NULL;
+ const gchar* _tmp36_ = NULL;
#line 392 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
e = _inner_error_;
#line 392 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_inner_error_ = NULL;
#line 398 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp34_ = e;
+ _tmp35_ = e;
#line 398 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp35_ = _tmp34_->message;
+ _tmp36_ = _tmp35_->message;
#line 398 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_warning ("simple-scan.vala:398: Unable to save email file: %s", _tmp35_);
+ g_warning ("simple-scan.vala:398: Unable to save email file: %s", _tmp36_);
#line 399 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_error_free0 (e);
#line 399 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2323,7 +2405,7 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
_g_free0 (command_line);
#line 399 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return;
-#line 2326 "simple-scan.c"
+#line 2408 "simple-scan.c"
}
__finally10:
#line 392 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2340,59 +2422,59 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
g_clear_error (&_inner_error_);
#line 392 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return;
-#line 2343 "simple-scan.c"
+#line 2425 "simple-scan.c"
}
#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp36_ = command_line;
+ _tmp37_ = command_line;
#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp37_ = path;
+ _tmp38_ = path;
#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp38_ = g_strdup_printf (" --attach %s", _tmp37_);
+ _tmp39_ = g_strdup_printf (" --attach %s", _tmp38_);
#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp39_ = _tmp38_;
+ _tmp40_ = _tmp39_;
#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp40_ = g_strconcat (_tmp36_, _tmp39_, NULL);
+ _tmp41_ = g_strconcat (_tmp37_, _tmp40_, NULL);
#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (command_line);
#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- command_line = _tmp40_;
+ command_line = _tmp41_;
#line 401 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _g_free0 (_tmp39_);
+ _g_free0 (_tmp40_);
#line 403 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp41_ = saved;
+ _tmp42_ = saved;
#line 403 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- if (!_tmp41_) {
+ if (!_tmp42_) {
#line 404 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (file);
#line 404 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (path);
#line 404 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 2371 "simple-scan.c"
+#line 2453 "simple-scan.c"
}
#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_object_unref0 (file);
#line 382 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (path);
-#line 2377 "simple-scan.c"
+#line 2459 "simple-scan.c"
}
}
}
}
#line 408 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp42_ = command_line;
+ _tmp43_ = command_line;
#line 408 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_debug ("simple-scan.vala:408: Launching email client: %s", _tmp42_);
-#line 2386 "simple-scan.c"
+ g_debug ("simple-scan.vala:408: Launching email client: %s", _tmp43_);
+#line 2468 "simple-scan.c"
{
- const gchar* _tmp43_;
+ const gchar* _tmp44_ = NULL;
#line 411 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp43_ = command_line;
+ _tmp44_ = command_line;
#line 411 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_spawn_command_line_async (_tmp43_, &_inner_error_);
+ g_spawn_command_line_async (_tmp44_, &_inner_error_);
#line 411 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 2395 "simple-scan.c"
+#line 2477 "simple-scan.c"
goto __catch11_g_error;
}
}
@@ -2400,21 +2482,21 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
__catch11_g_error:
{
GError* e = NULL;
- GError* _tmp44_;
- const gchar* _tmp45_;
+ GError* _tmp45_ = NULL;
+ const gchar* _tmp46_ = NULL;
#line 409 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
e = _inner_error_;
#line 409 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_inner_error_ = NULL;
#line 415 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp44_ = e;
+ _tmp45_ = e;
#line 415 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _tmp45_ = _tmp44_->message;
+ _tmp46_ = _tmp45_->message;
#line 415 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- g_warning ("simple-scan.vala:415: Unable to start email: %s", _tmp45_);
+ g_warning ("simple-scan.vala:415: Unable to start email: %s", _tmp46_);
#line 409 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_error_free0 (e);
-#line 2417 "simple-scan.c"
+#line 2499 "simple-scan.c"
}
__finally11:
#line 409 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2427,23 +2509,23 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
g_clear_error (&_inner_error_);
#line 409 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return;
-#line 2430 "simple-scan.c"
+#line 2512 "simple-scan.c"
}
#line 353 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (command_line);
-#line 2434 "simple-scan.c"
+#line 2516 "simple-scan.c"
}
static void simple_scan_log_cb (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message) {
gchar* prefix = NULL;
- GLogLevelFlags _tmp0_;
- FILE* _tmp8_;
- GTimer* _tmp9_;
+ GLogLevelFlags _tmp0_ = 0;
+ FILE* _tmp8_ = NULL;
+ GTimer* _tmp9_ = NULL;
gdouble _tmp10_ = 0.0;
- const gchar* _tmp11_;
- const gchar* _tmp12_;
- gboolean _tmp13_;
+ const gchar* _tmp11_ = NULL;
+ const gchar* _tmp12_ = NULL;
+ gboolean _tmp13_ = FALSE;
#line 419 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (message != NULL);
#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2452,9 +2534,9 @@ static void simple_scan_log_cb (const gchar* log_domain, GLogLevelFlags log_leve
switch (_tmp0_ & G_LOG_LEVEL_MASK) {
#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
case G_LOG_LEVEL_ERROR:
-#line 2455 "simple-scan.c"
+#line 2537 "simple-scan.c"
{
- gchar* _tmp1_;
+ gchar* _tmp1_ = NULL;
#line 426 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp1_ = g_strdup ("ERROR:");
#line 426 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2463,13 +2545,13 @@ static void simple_scan_log_cb (const gchar* log_domain, GLogLevelFlags log_leve
prefix = _tmp1_;
#line 427 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 2466 "simple-scan.c"
+#line 2548 "simple-scan.c"
}
#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
case G_LOG_LEVEL_CRITICAL:
-#line 2470 "simple-scan.c"
+#line 2552 "simple-scan.c"
{
- gchar* _tmp2_;
+ gchar* _tmp2_ = NULL;
#line 429 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp2_ = g_strdup ("CRITICAL:");
#line 429 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2478,13 +2560,13 @@ static void simple_scan_log_cb (const gchar* log_domain, GLogLevelFlags log_leve
prefix = _tmp2_;
#line 430 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 2481 "simple-scan.c"
+#line 2563 "simple-scan.c"
}
#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
case G_LOG_LEVEL_WARNING:
-#line 2485 "simple-scan.c"
+#line 2567 "simple-scan.c"
{
- gchar* _tmp3_;
+ gchar* _tmp3_ = NULL;
#line 432 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp3_ = g_strdup ("WARNING:");
#line 432 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2493,13 +2575,13 @@ static void simple_scan_log_cb (const gchar* log_domain, GLogLevelFlags log_leve
prefix = _tmp3_;
#line 433 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 2496 "simple-scan.c"
+#line 2578 "simple-scan.c"
}
#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
case G_LOG_LEVEL_MESSAGE:
-#line 2500 "simple-scan.c"
+#line 2582 "simple-scan.c"
{
- gchar* _tmp4_;
+ gchar* _tmp4_ = NULL;
#line 435 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp4_ = g_strdup ("MESSAGE:");
#line 435 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2508,13 +2590,13 @@ static void simple_scan_log_cb (const gchar* log_domain, GLogLevelFlags log_leve
prefix = _tmp4_;
#line 436 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 2511 "simple-scan.c"
+#line 2593 "simple-scan.c"
}
#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
case G_LOG_LEVEL_INFO:
-#line 2515 "simple-scan.c"
+#line 2597 "simple-scan.c"
{
- gchar* _tmp5_;
+ gchar* _tmp5_ = NULL;
#line 438 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp5_ = g_strdup ("INFO:");
#line 438 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2523,13 +2605,13 @@ static void simple_scan_log_cb (const gchar* log_domain, GLogLevelFlags log_leve
prefix = _tmp5_;
#line 439 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 2526 "simple-scan.c"
+#line 2608 "simple-scan.c"
}
#line 423 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
case G_LOG_LEVEL_DEBUG:
-#line 2530 "simple-scan.c"
+#line 2612 "simple-scan.c"
{
- gchar* _tmp6_;
+ gchar* _tmp6_ = NULL;
#line 441 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp6_ = g_strdup ("DEBUG:");
#line 441 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2538,11 +2620,11 @@ static void simple_scan_log_cb (const gchar* log_domain, GLogLevelFlags log_leve
prefix = _tmp6_;
#line 442 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 2541 "simple-scan.c"
+#line 2623 "simple-scan.c"
}
default:
{
- gchar* _tmp7_;
+ gchar* _tmp7_ = NULL;
#line 444 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp7_ = g_strdup ("LOG:");
#line 444 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2551,7 +2633,7 @@ static void simple_scan_log_cb (const gchar* log_domain, GLogLevelFlags log_leve
prefix = _tmp7_;
#line 445 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 2554 "simple-scan.c"
+#line 2636 "simple-scan.c"
}
}
#line 448 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2570,12 +2652,12 @@ static void simple_scan_log_cb (const gchar* log_domain, GLogLevelFlags log_leve
_tmp13_ = simple_scan_debug_enabled;
#line 449 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp13_) {
-#line 2573 "simple-scan.c"
- FILE* _tmp14_;
- GTimer* _tmp15_;
+#line 2655 "simple-scan.c"
+ FILE* _tmp14_ = NULL;
+ GTimer* _tmp15_ = NULL;
gdouble _tmp16_ = 0.0;
- const gchar* _tmp17_;
- const gchar* _tmp18_;
+ const gchar* _tmp17_ = NULL;
+ const gchar* _tmp18_ = NULL;
#line 450 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp14_ = stderr;
#line 450 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2588,16 +2670,16 @@ static void simple_scan_log_cb (const gchar* log_domain, GLogLevelFlags log_leve
_tmp18_ = message;
#line 450 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
fprintf (_tmp14_, "[%+.2fs] %s %s\n", _tmp16_, _tmp17_, _tmp18_);
-#line 2591 "simple-scan.c"
+#line 2673 "simple-scan.c"
}
#line 419 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (prefix);
-#line 2595 "simple-scan.c"
+#line 2677 "simple-scan.c"
}
static void simple_scan_on_uevent (SimpleScan* self, GUdevClient* client, const gchar* action, GUdevDevice* device) {
- Scanner* _tmp0_;
+ Scanner* _tmp0_ = NULL;
#line 453 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (self != NULL);
#line 453 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2610,50 +2692,50 @@ static void simple_scan_on_uevent (SimpleScan* self, GUdevClient* client, const
_tmp0_ = self->priv->scanner;
#line 455 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
scanner_redetect (_tmp0_);
-#line 2613 "simple-scan.c"
+#line 2695 "simple-scan.c"
}
static glong string_strnlen (gchar* str, glong maxlen) {
glong result = 0L;
- gchar* _tmp0_;
- glong _tmp1_;
+ gchar* end = NULL;
+ gchar* _tmp0_ = NULL;
+ glong _tmp1_ = 0L;
gchar* _tmp2_ = NULL;
- gchar* end;
- gchar* _tmp3_;
-#line 1157 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+ gchar* _tmp3_ = NULL;
+#line 1156 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp0_ = str;
-#line 1157 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1156 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp1_ = maxlen;
-#line 1157 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1156 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
-#line 1157 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1156 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
end = _tmp2_;
-#line 1158 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1157 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp3_ = end;
-#line 1158 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1157 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
if (_tmp3_ == NULL) {
-#line 2636 "simple-scan.c"
- glong _tmp4_;
-#line 1159 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 2718 "simple-scan.c"
+ glong _tmp4_ = 0L;
+#line 1158 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp4_ = maxlen;
-#line 1159 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1158 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
result = _tmp4_;
-#line 1159 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1158 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
return result;
-#line 2644 "simple-scan.c"
+#line 2726 "simple-scan.c"
} else {
- gchar* _tmp5_;
- gchar* _tmp6_;
-#line 1161 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+#line 1160 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp5_ = end;
-#line 1161 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1160 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp6_ = str;
-#line 1161 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1160 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
result = (glong) (_tmp5_ - _tmp6_);
-#line 1161 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1160 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
return result;
-#line 2656 "simple-scan.c"
+#line 2738 "simple-scan.c"
}
}
@@ -2662,126 +2744,126 @@ static gchar* string_substring (const gchar* self, glong offset, glong len) {
gchar* result = NULL;
glong string_length = 0L;
gboolean _tmp0_ = FALSE;
- glong _tmp1_;
- gboolean _tmp3_;
- glong _tmp9_;
- glong _tmp15_;
- glong _tmp18_;
- glong _tmp19_;
- glong _tmp20_;
- glong _tmp21_;
- glong _tmp22_;
+ glong _tmp1_ = 0L;
+ gboolean _tmp3_ = FALSE;
+ glong _tmp9_ = 0L;
+ glong _tmp15_ = 0L;
+ glong _tmp18_ = 0L;
+ glong _tmp19_ = 0L;
+ glong _tmp20_ = 0L;
+ glong _tmp21_ = 0L;
+ glong _tmp22_ = 0L;
gchar* _tmp23_ = NULL;
-#line 1168 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1167 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, NULL);
-#line 1170 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1169 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp1_ = offset;
-#line 1170 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1169 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
if (_tmp1_ >= ((glong) 0)) {
-#line 2681 "simple-scan.c"
- glong _tmp2_;
-#line 1170 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 2763 "simple-scan.c"
+ glong _tmp2_ = 0L;
+#line 1169 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp2_ = len;
-#line 1170 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1169 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp0_ = _tmp2_ >= ((glong) 0);
-#line 2687 "simple-scan.c"
+#line 2769 "simple-scan.c"
} else {
-#line 1170 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1169 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp0_ = FALSE;
-#line 2691 "simple-scan.c"
+#line 2773 "simple-scan.c"
}
-#line 1170 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1169 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp3_ = _tmp0_;
-#line 1170 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1169 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
if (_tmp3_) {
-#line 2697 "simple-scan.c"
- glong _tmp4_;
- glong _tmp5_;
+#line 2779 "simple-scan.c"
+ glong _tmp4_ = 0L;
+ glong _tmp5_ = 0L;
glong _tmp6_ = 0L;
-#line 1172 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1171 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp4_ = offset;
-#line 1172 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1171 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp5_ = len;
-#line 1172 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1171 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp6_ = string_strnlen ((gchar*) self, _tmp4_ + _tmp5_);
-#line 1172 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1171 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
string_length = _tmp6_;
-#line 2709 "simple-scan.c"
+#line 2791 "simple-scan.c"
} else {
- gint _tmp7_;
- gint _tmp8_;
-#line 1174 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+ gint _tmp7_ = 0;
+ gint _tmp8_ = 0;
+#line 1173 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp7_ = strlen (self);
-#line 1174 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1173 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp8_ = _tmp7_;
-#line 1174 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1173 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
string_length = (glong) _tmp8_;
-#line 2719 "simple-scan.c"
+#line 2801 "simple-scan.c"
}
-#line 1177 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1176 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp9_ = offset;
-#line 1177 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1176 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
if (_tmp9_ < ((glong) 0)) {
-#line 2725 "simple-scan.c"
- glong _tmp10_;
- glong _tmp11_;
- glong _tmp12_;
-#line 1178 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 2807 "simple-scan.c"
+ glong _tmp10_ = 0L;
+ glong _tmp11_ = 0L;
+ glong _tmp12_ = 0L;
+#line 1177 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp10_ = string_length;
-#line 1178 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1177 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp11_ = offset;
-#line 1178 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1177 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
offset = _tmp10_ + _tmp11_;
-#line 1179 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1178 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp12_ = offset;
-#line 1179 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1178 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
g_return_val_if_fail (_tmp12_ >= ((glong) 0), NULL);
-#line 2739 "simple-scan.c"
+#line 2821 "simple-scan.c"
} else {
- glong _tmp13_;
- glong _tmp14_;
-#line 1181 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+ glong _tmp13_ = 0L;
+ glong _tmp14_ = 0L;
+#line 1180 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp13_ = offset;
-#line 1181 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1180 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp14_ = string_length;
-#line 1181 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1180 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
g_return_val_if_fail (_tmp13_ <= _tmp14_, NULL);
-#line 2749 "simple-scan.c"
+#line 2831 "simple-scan.c"
}
-#line 1183 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1182 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp15_ = len;
-#line 1183 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1182 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
if (_tmp15_ < ((glong) 0)) {
-#line 2755 "simple-scan.c"
- glong _tmp16_;
- glong _tmp17_;
-#line 1184 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 2837 "simple-scan.c"
+ glong _tmp16_ = 0L;
+ glong _tmp17_ = 0L;
+#line 1183 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp16_ = string_length;
-#line 1184 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1183 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp17_ = offset;
-#line 1184 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1183 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
len = _tmp16_ - _tmp17_;
-#line 2764 "simple-scan.c"
+#line 2846 "simple-scan.c"
}
-#line 1186 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1185 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp18_ = offset;
-#line 1186 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1185 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp19_ = len;
-#line 1186 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1185 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp20_ = string_length;
-#line 1186 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1185 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
g_return_val_if_fail ((_tmp18_ + _tmp19_) <= _tmp20_, NULL);
-#line 1187 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1186 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp21_ = offset;
-#line 1187 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1186 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp22_ = len;
-#line 1187 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1186 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
_tmp23_ = g_strndup (((gchar*) self) + _tmp21_, (gsize) _tmp22_);
-#line 1187 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1186 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
result = _tmp23_;
-#line 1187 "/usr/share/vala-0.20/vapi/glib-2.0.vapi"
+#line 1186 "/usr/share/vala-0.22/vapi/glib-2.0.vapi"
return result;
-#line 2784 "simple-scan.c"
+#line 2866 "simple-scan.c"
}
@@ -2789,30 +2871,30 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
guint8* data = NULL;
gint data_length1 = 0;
gint _data_size_ = 0;
- const gchar* _tmp0_;
+ const gchar* _tmp0_ = NULL;
guint8* _tmp1_ = NULL;
size_t _tmp2_;
- const gchar* _tmp3_;
- gchar* _tmp4_;
- gchar* _tmp5_;
+ FILE* fixed_file = NULL;
+ const gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
FILE* _tmp6_ = NULL;
- FILE* _tmp7_;
- FILE* fixed_file;
- gint offset;
- gint line_number;
- gint xref_offset;
- gint xref_line;
- GRegex* _tmp8_;
- GRegex* xref_regex;
+ FILE* _tmp7_ = NULL;
+ gint offset = 0;
+ gint line_number = 0;
+ gint xref_offset = 0;
+ gint xref_line = 0;
+ GRegex* xref_regex = NULL;
+ GRegex* _tmp8_ = NULL;
GMatchInfo* xref_match = NULL;
- GString* _tmp9_;
- GString* line;
- const gchar* _tmp84_;
- const gchar* _tmp85_;
- gchar* _tmp86_;
- gchar* _tmp87_;
+ GString* line = NULL;
+ GString* _tmp9_ = NULL;
+ const gchar* _tmp84_ = NULL;
+ const gchar* _tmp85_ = NULL;
+ gchar* _tmp86_ = NULL;
+ gchar* _tmp87_ = NULL;
gint _tmp88_ = 0;
- gboolean _tmp89_;
+ gboolean _tmp89_ = FALSE;
GError * _inner_error_ = NULL;
#line 458 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_return_if_fail (filename != NULL);
@@ -2836,7 +2918,7 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
data = (g_free (data), NULL);
#line 461 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return;
-#line 2839 "simple-scan.c"
+#line 2921 "simple-scan.c"
}
#line 463 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp3_ = filename;
@@ -2874,7 +2956,7 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
data = (g_free (data), NULL);
#line 469 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return;
-#line 2877 "simple-scan.c"
+#line 2959 "simple-scan.c"
}
#line 471 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp9_ = g_string_new ("");
@@ -2882,20 +2964,20 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
line = _tmp9_;
#line 472 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
while (TRUE) {
-#line 2885 "simple-scan.c"
- gint _tmp10_;
- guint8* _tmp11_;
- gint _tmp11__length1;
- gint _tmp12_;
- gint end_offset;
- GString* _tmp13_;
- GString* _tmp23_;
- const gchar* _tmp24_;
+#line 2967 "simple-scan.c"
+ gint _tmp10_ = 0;
+ guint8* _tmp11_ = NULL;
+ gint _tmp11__length1 = 0;
+ gint end_offset = 0;
+ gint _tmp12_ = 0;
+ GString* _tmp13_ = NULL;
+ GString* _tmp23_ = NULL;
+ const gchar* _tmp24_ = NULL;
gboolean _tmp26_ = FALSE;
- gint _tmp27_;
- gboolean _tmp31_;
- gint _tmp82_;
- gint _tmp83_;
+ gint _tmp27_ = 0;
+ gboolean _tmp31_ = FALSE;
+ gint _tmp82_ = 0;
+ gint _tmp83_ = 0;
#line 472 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp10_ = offset;
#line 472 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2906,7 +2988,7 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
if (!(_tmp10_ < _tmp11__length1)) {
#line 472 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 2909 "simple-scan.c"
+#line 2991 "simple-scan.c"
}
#line 474 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp12_ = offset;
@@ -2918,19 +3000,19 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
g_string_assign (_tmp13_, "");
#line 476 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
while (TRUE) {
-#line 2921 "simple-scan.c"
- gint _tmp14_;
- guint8* _tmp15_;
- gint _tmp15__length1;
- guint8* _tmp16_;
- gint _tmp16__length1;
- gint _tmp17_;
- guint8 _tmp18_;
- guint8 c;
- GString* _tmp19_;
- guint8 _tmp20_;
- gint _tmp21_;
- guint8 _tmp22_;
+#line 3003 "simple-scan.c"
+ gint _tmp14_ = 0;
+ guint8* _tmp15_ = NULL;
+ gint _tmp15__length1 = 0;
+ guint8 c = 0U;
+ guint8* _tmp16_ = NULL;
+ gint _tmp16__length1 = 0;
+ gint _tmp17_ = 0;
+ guint8 _tmp18_ = 0U;
+ GString* _tmp19_ = NULL;
+ guint8 _tmp20_ = 0U;
+ gint _tmp21_ = 0;
+ guint8 _tmp22_ = 0U;
#line 476 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp14_ = end_offset;
#line 476 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2941,7 +3023,7 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
if (!(_tmp14_ < _tmp15__length1)) {
#line 476 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 2944 "simple-scan.c"
+#line 3026 "simple-scan.c"
}
#line 478 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp16_ = data;
@@ -2969,7 +3051,7 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
if (_tmp22_ == ((guint8) '\n')) {
#line 482 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 2972 "simple-scan.c"
+#line 3054 "simple-scan.c"
}
}
#line 485 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -2978,21 +3060,21 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
_tmp24_ = _tmp23_->str;
#line 485 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (g_strcmp0 (_tmp24_, "startxref\n") == 0) {
-#line 2981 "simple-scan.c"
- gint _tmp25_;
+#line 3063 "simple-scan.c"
+ gint _tmp25_ = 0;
#line 486 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp25_ = line_number;
#line 486 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
xref_line = _tmp25_;
-#line 2987 "simple-scan.c"
+#line 3069 "simple-scan.c"
}
#line 489 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp27_ = line_number;
#line 489 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp27_ < 2) {
-#line 2993 "simple-scan.c"
- GString* _tmp28_;
- const gchar* _tmp29_;
+#line 3075 "simple-scan.c"
+ GString* _tmp28_ = NULL;
+ const gchar* _tmp29_ = NULL;
gboolean _tmp30_ = FALSE;
#line 489 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp28_ = line;
@@ -3002,23 +3084,23 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
_tmp30_ = g_str_has_prefix (_tmp29_, "%%");
#line 489 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp26_ = _tmp30_;
-#line 3005 "simple-scan.c"
+#line 3087 "simple-scan.c"
} else {
#line 489 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp26_ = FALSE;
-#line 3009 "simple-scan.c"
+#line 3091 "simple-scan.c"
}
#line 489 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp31_ = _tmp26_;
#line 489 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp31_) {
-#line 3015 "simple-scan.c"
- gint _tmp32_;
- FILE* _tmp33_;
- GString* _tmp34_;
- const gchar* _tmp35_;
+#line 3097 "simple-scan.c"
+ gint _tmp32_ = 0;
+ FILE* _tmp33_ = NULL;
+ GString* _tmp34_ = NULL;
+ const gchar* _tmp35_ = NULL;
gchar* _tmp36_ = NULL;
- gchar* _tmp37_;
+ gchar* _tmp37_ = NULL;
#line 491 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp32_ = xref_offset;
#line 491 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -3037,11 +3119,11 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
fprintf (_tmp33_, "%s", _tmp37_);
#line 492 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (_tmp37_);
-#line 3040 "simple-scan.c"
+#line 3122 "simple-scan.c"
} else {
- GRegex* _tmp38_;
- GString* _tmp39_;
- const gchar* _tmp40_;
+ GRegex* _tmp38_ = NULL;
+ GString* _tmp39_ = NULL;
+ const gchar* _tmp40_ = NULL;
GMatchInfo* _tmp41_ = NULL;
gboolean _tmp42_ = FALSE;
#line 496 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -3053,17 +3135,17 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
#line 496 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp42_ = g_regex_match (_tmp38_, _tmp40_, 0, &_tmp41_);
#line 496 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _g_match_info_free0 (xref_match);
+ _g_match_info_unref0 (xref_match);
#line 496 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
xref_match = _tmp41_;
#line 496 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp42_) {
-#line 3061 "simple-scan.c"
- FILE* _tmp43_;
- GMatchInfo* _tmp44_;
+#line 3143 "simple-scan.c"
+ FILE* _tmp43_ = NULL;
+ GMatchInfo* _tmp44_ = NULL;
const gchar* _tmp45_ = NULL;
gint _tmp46_ = 0;
- gint _tmp47_;
+ gint _tmp47_ = 0;
#line 497 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp43_ = fixed_file;
#line 497 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -3076,42 +3158,42 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
_tmp47_ = xref_offset;
#line 497 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
fprintf (_tmp43_, "%010d 00000 n \n", _tmp46_ + _tmp47_);
-#line 3079 "simple-scan.c"
+#line 3161 "simple-scan.c"
} else {
gboolean _tmp48_ = FALSE;
- gint _tmp49_;
- gboolean _tmp52_;
+ gint _tmp49_ = 0;
+ gboolean _tmp52_ = FALSE;
#line 500 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp49_ = xref_line;
#line 500 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp49_ > 0) {
-#line 3088 "simple-scan.c"
- gint _tmp50_;
- gint _tmp51_;
+#line 3170 "simple-scan.c"
+ gint _tmp50_ = 0;
+ gint _tmp51_ = 0;
#line 500 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp50_ = line_number;
#line 500 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp51_ = xref_line;
#line 500 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp48_ = _tmp50_ == (_tmp51_ + 1);
-#line 3097 "simple-scan.c"
+#line 3179 "simple-scan.c"
} else {
#line 500 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp48_ = FALSE;
-#line 3101 "simple-scan.c"
+#line 3183 "simple-scan.c"
}
#line 500 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp52_ = _tmp48_;
#line 500 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp52_) {
-#line 3107 "simple-scan.c"
- FILE* _tmp53_;
- GString* _tmp54_;
- const gchar* _tmp55_;
+#line 3189 "simple-scan.c"
+ FILE* _tmp53_ = NULL;
+ GString* _tmp54_ = NULL;
+ const gchar* _tmp55_ = NULL;
gint _tmp56_ = 0;
- gint _tmp57_;
+ gint _tmp57_ = 0;
gchar* _tmp58_ = NULL;
- gchar* _tmp59_;
+ gchar* _tmp59_ = NULL;
#line 501 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp53_ = fixed_file;
#line 501 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -3130,21 +3212,21 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
fprintf (_tmp53_, "%s", _tmp59_);
#line 501 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (_tmp59_);
-#line 3133 "simple-scan.c"
+#line 3215 "simple-scan.c"
} else {
gboolean _tmp60_ = FALSE;
- gint _tmp61_;
- gint _tmp62_;
- gboolean _tmp66_;
+ gint _tmp61_ = 0;
+ gint _tmp62_ = 0;
+ gboolean _tmp66_ = FALSE;
#line 504 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp61_ = line_number;
#line 504 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp62_ = xref_line;
#line 504 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp61_ == (_tmp62_ + 2)) {
-#line 3145 "simple-scan.c"
- GString* _tmp63_;
- const gchar* _tmp64_;
+#line 3227 "simple-scan.c"
+ GString* _tmp63_ = NULL;
+ const gchar* _tmp64_ = NULL;
gboolean _tmp65_ = FALSE;
#line 504 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp63_ = line;
@@ -3154,22 +3236,22 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
_tmp65_ = g_str_has_prefix (_tmp64_, "%%%%");
#line 504 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp60_ = _tmp65_;
-#line 3157 "simple-scan.c"
+#line 3239 "simple-scan.c"
} else {
#line 504 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp60_ = FALSE;
-#line 3161 "simple-scan.c"
+#line 3243 "simple-scan.c"
}
#line 504 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp66_ = _tmp60_;
#line 504 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp66_) {
-#line 3167 "simple-scan.c"
- FILE* _tmp67_;
- GString* _tmp68_;
- const gchar* _tmp69_;
+#line 3249 "simple-scan.c"
+ FILE* _tmp67_ = NULL;
+ GString* _tmp68_ = NULL;
+ const gchar* _tmp69_ = NULL;
gchar* _tmp70_ = NULL;
- gchar* _tmp71_;
+ gchar* _tmp71_ = NULL;
#line 505 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp67_ = fixed_file;
#line 505 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -3184,42 +3266,42 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
fprintf (_tmp67_, "%s", _tmp71_);
#line 505 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (_tmp71_);
-#line 3187 "simple-scan.c"
+#line 3269 "simple-scan.c"
} else {
{
- gint _tmp72_;
- gint i;
+ gint i = 0;
+ gint _tmp72_ = 0;
#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp72_ = offset;
#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
i = _tmp72_;
-#line 3196 "simple-scan.c"
+#line 3278 "simple-scan.c"
{
- gboolean _tmp73_;
+ gboolean _tmp73_ = FALSE;
#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp73_ = TRUE;
#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
while (TRUE) {
-#line 3203 "simple-scan.c"
- gboolean _tmp74_;
- gint _tmp76_;
- gint _tmp77_;
- FILE* _tmp78_;
- guint8* _tmp79_;
- gint _tmp79__length1;
- gint _tmp80_;
- guint8 _tmp81_;
+#line 3285 "simple-scan.c"
+ gboolean _tmp74_ = FALSE;
+ gint _tmp76_ = 0;
+ gint _tmp77_ = 0;
+ FILE* _tmp78_ = NULL;
+ guint8* _tmp79_ = NULL;
+ gint _tmp79__length1 = 0;
+ gint _tmp80_ = 0;
+ guint8 _tmp81_ = 0U;
#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp74_ = _tmp73_;
#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (!_tmp74_) {
-#line 3216 "simple-scan.c"
- gint _tmp75_;
+#line 3298 "simple-scan.c"
+ gint _tmp75_ = 0;
#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp75_ = i;
#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
i = _tmp75_ + 1;
-#line 3222 "simple-scan.c"
+#line 3304 "simple-scan.c"
}
#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp73_ = FALSE;
@@ -3231,7 +3313,7 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
if (!(_tmp76_ < _tmp77_)) {
#line 508 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 3234 "simple-scan.c"
+#line 3316 "simple-scan.c"
}
#line 509 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp78_ = fixed_file;
@@ -3245,7 +3327,7 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
_tmp81_ = _tmp79_[_tmp80_];
#line 509 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
fputc ((gchar) _tmp81_, _tmp78_);
-#line 3248 "simple-scan.c"
+#line 3330 "simple-scan.c"
}
}
}
@@ -3261,7 +3343,7 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
_tmp83_ = end_offset;
#line 512 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
offset = _tmp83_;
-#line 3264 "simple-scan.c"
+#line 3346 "simple-scan.c"
}
#line 515 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp84_ = filename;
@@ -3279,11 +3361,11 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
_g_free0 (_tmp87_);
#line 515 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp89_) {
-#line 3282 "simple-scan.c"
- const gchar* _tmp90_;
- gchar* _tmp91_;
- gchar* _tmp92_;
- const gchar* _tmp93_;
+#line 3364 "simple-scan.c"
+ const gchar* _tmp90_ = NULL;
+ gchar* _tmp91_ = NULL;
+ gchar* _tmp92_ = NULL;
+ const gchar* _tmp93_ = NULL;
#line 516 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp90_ = filename;
#line 516 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -3296,56 +3378,56 @@ static void simple_scan_fix_pdf (const gchar* filename, GError** error) {
g_rename (_tmp92_, _tmp93_);
#line 516 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_free0 (_tmp92_);
-#line 3299 "simple-scan.c"
+#line 3381 "simple-scan.c"
}
#line 458 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_string_free0 (line);
#line 458 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
- _g_match_info_free0 (xref_match);
+ _g_match_info_unref0 (xref_match);
#line 458 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_g_regex_unref0 (xref_regex);
#line 458 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_fclose0 (fixed_file);
#line 458 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
data = (g_free (data), NULL);
-#line 3311 "simple-scan.c"
+#line 3393 "simple-scan.c"
}
static void _simple_scan_log_cb_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self) {
#line 580 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_log_cb (log_domain, log_levels, message);
-#line 3318 "simple-scan.c"
+#line 3400 "simple-scan.c"
}
gint simple_scan_main (gchar** args, int args_length1) {
gint result = 0;
+ GOptionContext* c = NULL;
const gchar* _tmp0_ = NULL;
- GOptionContext* _tmp1_;
- GOptionContext* c;
- GOptionContext* _tmp2_;
- GOptionContext* _tmp3_;
+ GOptionContext* _tmp1_ = NULL;
+ GOptionContext* _tmp2_ = NULL;
+ GOptionContext* _tmp3_ = NULL;
GOptionGroup* _tmp4_ = NULL;
- gboolean _tmp14_;
- const gchar* _tmp16_;
- ScanDevice* device;
- gchar** _tmp29_;
- gint _tmp29__length1;
- GTimer* _tmp39_;
+ gboolean _tmp14_ = FALSE;
+ const gchar* _tmp16_ = NULL;
+ ScanDevice* device = NULL;
+ gchar** _tmp29_ = NULL;
+ gint _tmp29__length1 = 0;
+ GTimer* _tmp39_ = NULL;
+ gchar* path = NULL;
const gchar* _tmp40_ = NULL;
gchar* _tmp41_ = NULL;
- gchar* path;
- const gchar* _tmp42_;
+ const gchar* _tmp42_ = NULL;
const gchar* _tmp43_ = NULL;
gchar* _tmp44_ = NULL;
- const gchar* _tmp45_;
+ const gchar* _tmp45_ = NULL;
FILE* _tmp46_ = NULL;
pid_t _tmp47_ = 0;
- ScanDevice* _tmp48_;
- SimpleScan* _tmp49_;
- SimpleScan* app;
- SimpleScan* _tmp50_;
+ SimpleScan* app = NULL;
+ ScanDevice* _tmp48_ = NULL;
+ SimpleScan* _tmp49_ = NULL;
+ SimpleScan* _tmp50_ = NULL;
gint _tmp51_ = 0;
GError * _inner_error_ = NULL;
#line 521 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -3374,16 +3456,16 @@ gint simple_scan_main (gchar** args, int args_length1) {
_tmp4_ = gtk_get_option_group (TRUE);
#line 531 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_option_context_add_group (_tmp3_, _tmp4_);
-#line 3377 "simple-scan.c"
+#line 3459 "simple-scan.c"
{
- GOptionContext* _tmp5_;
+ GOptionContext* _tmp5_ = NULL;
#line 534 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp5_ = c;
#line 534 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
g_option_context_parse (_tmp5_, &args_length1, &args, &_inner_error_);
#line 534 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 3386 "simple-scan.c"
+#line 3468 "simple-scan.c"
goto __catch12_g_error;
}
}
@@ -3391,15 +3473,15 @@ gint simple_scan_main (gchar** args, int args_length1) {
__catch12_g_error:
{
GError* e = NULL;
- FILE* _tmp6_;
- GError* _tmp7_;
- const gchar* _tmp8_;
- FILE* _tmp9_;
+ FILE* _tmp6_ = NULL;
+ GError* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+ FILE* _tmp9_ = NULL;
const gchar* _tmp10_ = NULL;
- gchar** _tmp11_;
- gint _tmp11__length1;
- const gchar* _tmp12_;
- FILE* _tmp13_;
+ gchar** _tmp11_ = NULL;
+ gint _tmp11__length1 = 0;
+ const gchar* _tmp12_ = NULL;
+ FILE* _tmp13_ = NULL;
#line 532 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
e = _inner_error_;
#line 532 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -3436,7 +3518,7 @@ gint simple_scan_main (gchar** args, int args_length1) {
_g_option_context_free0 (c);
#line 542 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 3439 "simple-scan.c"
+#line 3521 "simple-scan.c"
}
__finally12:
#line 532 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -3449,14 +3531,14 @@ gint simple_scan_main (gchar** args, int args_length1) {
g_clear_error (&_inner_error_);
#line 532 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return 0;
-#line 3452 "simple-scan.c"
+#line 3534 "simple-scan.c"
}
#line 544 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp14_ = simple_scan_show_version;
#line 544 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp14_) {
-#line 3458 "simple-scan.c"
- FILE* _tmp15_;
+#line 3540 "simple-scan.c"
+ FILE* _tmp15_ = NULL;
#line 547 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp15_ = stderr;
#line 547 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -3467,55 +3549,55 @@ gint simple_scan_main (gchar** args, int args_length1) {
_g_option_context_free0 (c);
#line 548 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 3470 "simple-scan.c"
+#line 3552 "simple-scan.c"
}
#line 550 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp16_ = simple_scan_fix_pdf_filename;
#line 550 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp16_ != NULL) {
-#line 3476 "simple-scan.c"
+#line 3558 "simple-scan.c"
{
- const gchar* _tmp17_;
+ const gchar* _tmp17_ = NULL;
#line 554 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp17_ = simple_scan_fix_pdf_filename;
#line 554 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
simple_scan_fix_pdf (_tmp17_, &_inner_error_);
#line 554 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 3485 "simple-scan.c"
+#line 3567 "simple-scan.c"
goto __catch13_g_error;
}
{
- gint i;
+ gint i = 0;
#line 555 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
i = 1;
-#line 3492 "simple-scan.c"
+#line 3574 "simple-scan.c"
{
- gboolean _tmp18_;
+ gboolean _tmp18_ = FALSE;
#line 555 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp18_ = TRUE;
#line 555 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
while (TRUE) {
-#line 3499 "simple-scan.c"
- gboolean _tmp19_;
- gint _tmp21_;
- gchar** _tmp22_;
- gint _tmp22__length1;
- gchar** _tmp23_;
- gint _tmp23__length1;
- gint _tmp24_;
- const gchar* _tmp25_;
+#line 3581 "simple-scan.c"
+ gboolean _tmp19_ = FALSE;
+ gint _tmp21_ = 0;
+ gchar** _tmp22_ = NULL;
+ gint _tmp22__length1 = 0;
+ gchar** _tmp23_ = NULL;
+ gint _tmp23__length1 = 0;
+ gint _tmp24_ = 0;
+ const gchar* _tmp25_ = NULL;
#line 555 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp19_ = _tmp18_;
#line 555 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (!_tmp19_) {
-#line 3512 "simple-scan.c"
- gint _tmp20_;
+#line 3594 "simple-scan.c"
+ gint _tmp20_ = 0;
#line 555 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp20_ = i;
#line 555 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
i = _tmp20_ + 1;
-#line 3518 "simple-scan.c"
+#line 3600 "simple-scan.c"
}
#line 555 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp18_ = FALSE;
@@ -3529,7 +3611,7 @@ gint simple_scan_main (gchar** args, int args_length1) {
if (!(_tmp21_ < _tmp22__length1)) {
#line 555 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
break;
-#line 3532 "simple-scan.c"
+#line 3614 "simple-scan.c"
}
#line 556 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp23_ = args;
@@ -3543,7 +3625,7 @@ gint simple_scan_main (gchar** args, int args_length1) {
simple_scan_fix_pdf (_tmp25_, &_inner_error_);
#line 556 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_inner_error_ != NULL) {
-#line 3546 "simple-scan.c"
+#line 3628 "simple-scan.c"
goto __catch13_g_error;
}
}
@@ -3554,9 +3636,9 @@ gint simple_scan_main (gchar** args, int args_length1) {
__catch13_g_error:
{
GError* e = NULL;
- FILE* _tmp26_;
- GError* _tmp27_;
- const gchar* _tmp28_;
+ FILE* _tmp26_ = NULL;
+ GError* _tmp27_ = NULL;
+ const gchar* _tmp28_ = NULL;
#line 552 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
e = _inner_error_;
#line 552 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -3577,7 +3659,7 @@ gint simple_scan_main (gchar** args, int args_length1) {
_g_option_context_free0 (c);
#line 561 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 3580 "simple-scan.c"
+#line 3662 "simple-scan.c"
}
__finally13:
#line 552 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -3590,7 +3672,7 @@ gint simple_scan_main (gchar** args, int args_length1) {
g_clear_error (&_inner_error_);
#line 552 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return 0;
-#line 3593 "simple-scan.c"
+#line 3675 "simple-scan.c"
}
#line 563 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
result = EXIT_SUCCESS;
@@ -3598,7 +3680,7 @@ gint simple_scan_main (gchar** args, int args_length1) {
_g_option_context_free0 (c);
#line 563 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 3601 "simple-scan.c"
+#line 3683 "simple-scan.c"
}
#line 566 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
device = NULL;
@@ -3608,18 +3690,18 @@ gint simple_scan_main (gchar** args, int args_length1) {
_tmp29__length1 = args_length1;
#line 567 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
if (_tmp29__length1 > 1) {
-#line 3611 "simple-scan.c"
- ScanDevice* _tmp30_;
- ScanDevice* _tmp31_;
- gchar** _tmp32_;
- gint _tmp32__length1;
- const gchar* _tmp33_;
- gchar* _tmp34_;
- ScanDevice* _tmp35_;
- gchar** _tmp36_;
- gint _tmp36__length1;
- const gchar* _tmp37_;
- gchar* _tmp38_;
+#line 3693 "simple-scan.c"
+ ScanDevice* _tmp30_ = NULL;
+ ScanDevice* _tmp31_ = NULL;
+ gchar** _tmp32_ = NULL;
+ gint _tmp32__length1 = 0;
+ const gchar* _tmp33_ = NULL;
+ gchar* _tmp34_ = NULL;
+ ScanDevice* _tmp35_ = NULL;
+ gchar** _tmp36_ = NULL;
+ gint _tmp36__length1 = 0;
+ const gchar* _tmp37_ = NULL;
+ gchar* _tmp38_ = NULL;
#line 569 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp30_ = scan_device_new ();
#line 569 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
@@ -3654,7 +3736,7 @@ gint simple_scan_main (gchar** args, int args_length1) {
_g_free0 (_tmp35_->label);
#line 571 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp35_->label = _tmp38_;
-#line 3657 "simple-scan.c"
+#line 3739 "simple-scan.c"
}
#line 575 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
_tmp39_ = g_timer_new ();
@@ -3716,7 +3798,7 @@ gint simple_scan_main (gchar** args, int args_length1) {
_g_option_context_free0 (c);
#line 585 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return result;
-#line 3719 "simple-scan.c"
+#line 3801 "simple-scan.c"
}
@@ -3725,7 +3807,7 @@ int main (int argc, char ** argv) {
g_type_init ();
#line 519 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
return simple_scan_main (argv, argc);
-#line 3728 "simple-scan.c"
+#line 3810 "simple-scan.c"
}
@@ -3742,7 +3824,7 @@ static void simple_scan_class_init (SimpleScanClass * klass) {
G_APPLICATION_CLASS (klass)->shutdown = simple_scan_real_shutdown;
#line 12 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
G_OBJECT_CLASS (klass)->finalize = simple_scan_finalize;
-#line 3745 "simple-scan.c"
+#line 3827 "simple-scan.c"
}
@@ -3753,7 +3835,7 @@ static void simple_scan_instance_init (SimpleScan * self) {
self->priv->default_device = NULL;
#line 33 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
self->priv->have_devices = FALSE;
-#line 3756 "simple-scan.c"
+#line 3838 "simple-scan.c"
}
@@ -3773,7 +3855,7 @@ static void simple_scan_finalize (GObject* obj) {
_book_unref0 (self->priv->book);
#line 12 "/home/bob/bzr/simple-scan/trunk/src/simple-scan.vala"
G_OBJECT_CLASS (simple_scan_parent_class)->finalize (obj);
-#line 3776 "simple-scan.c"
+#line 3858 "simple-scan.c"
}