summaryrefslogtreecommitdiff
path: root/src/scanner.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scanner.c')
-rw-r--r--src/scanner.c984
1 files changed, 496 insertions, 488 deletions
diff --git a/src/scanner.c b/src/scanner.c
index ff756ec..c91ff4c 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -1,4 +1,4 @@
-/* scanner.c generated by valac 0.14.0, the Vala compiler
+/* scanner.c generated by valac 0.15.2, the Vala compiler
* generated from scanner.vala, do not modify */
/*
@@ -19,9 +19,9 @@
#include <string.h>
#include <float.h>
#include <math.h>
-#include <sane/sane.h>
+#include "sane/sane.h"
#include <glib/gi18n-lib.h>
-#include <sane/saneopts.h>
+#include "sane/saneopts.h"
#include <gobject/gvaluecollector.h>
@@ -3399,7 +3399,7 @@ static gchar* string_replace (const gchar* self, const gchar* old, const gchar*
regex = _tmp4_;
if (_inner_error_ != NULL) {
if (_inner_error_->domain == G_REGEX_ERROR) {
- goto __catch9_g_regex_error;
+ goto __catch13_g_regex_error;
}
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
@@ -3412,7 +3412,7 @@ static gchar* string_replace (const gchar* self, const gchar* old, const gchar*
if (_inner_error_ != NULL) {
_g_regex_unref0 (regex);
if (_inner_error_->domain == G_REGEX_ERROR) {
- goto __catch9_g_regex_error;
+ goto __catch13_g_regex_error;
}
_g_regex_unref0 (regex);
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
@@ -3423,8 +3423,8 @@ static gchar* string_replace (const gchar* self, const gchar* old, const gchar*
_g_regex_unref0 (regex);
return result;
}
- goto __finally9;
- __catch9_g_regex_error:
+ goto __finally13;
+ __catch13_g_regex_error:
{
GError* e = NULL;
e = _inner_error_;
@@ -3432,7 +3432,7 @@ static gchar* string_replace (const gchar* self, const gchar* old, const gchar*
g_assert_not_reached ();
_g_error_free0 (e);
}
- __finally9:
+ __finally13:
if (_inner_error_ != NULL) {
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
@@ -4160,120 +4160,126 @@ static gchar string_get (const gchar* self, glong index) {
static gboolean scanner_set_string_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, const gchar* value, gchar** _result_) {
gchar* _vala_result = NULL;
gboolean result = FALSE;
- SANE_Option_Descriptor* _tmp0_;
- SANE_Value_Type _tmp1_;
- SANE_Option_Descriptor* _tmp2_;
- SANE_Int _tmp3_;
- gchar* _tmp4_ = NULL;
+ gchar* _tmp0_;
+ SANE_Option_Descriptor* _tmp1_;
+ SANE_Value_Type _tmp2_;
+ SANE_Option_Descriptor* _tmp3_;
+ SANE_Int _tmp4_;
+ gchar* _tmp5_ = NULL;
gchar* s;
gint s_length1;
gint _s_size_;
gint i;
- gchar* _tmp22_;
- gint _tmp22__length1;
- gint _tmp23_;
- gchar _tmp24_;
- SANE_Handle _tmp25_;
- SANE_Int _tmp26_;
- gchar* _tmp27_;
- gint _tmp27__length1;
- SANE_Status _tmp28_ = 0;
+ gchar* _tmp23_;
+ gint _tmp23__length1;
+ gint _tmp24_;
+ gchar _tmp25_;
+ SANE_Handle _tmp26_;
+ SANE_Int _tmp27_;
+ gchar* _tmp28_;
+ gint _tmp28__length1;
+ SANE_Status _tmp29_ = 0;
SANE_Status status;
- gchar* _tmp29_;
- gint _tmp29__length1;
gchar* _tmp30_;
- SANE_Int _tmp31_;
- const gchar* _tmp32_;
- gchar* _tmp33_ = NULL;
- gchar* _tmp34_;
+ gint _tmp30__length1;
+ gchar* _tmp31_;
+ SANE_Int _tmp32_;
+ const gchar* _tmp33_;
+ gchar* _tmp34_ = NULL;
+ gchar* _tmp35_;
+ const gchar* _tmp36_;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (option != NULL, FALSE);
g_return_val_if_fail (value != NULL, FALSE);
- _tmp0_ = option;
- _tmp1_ = _tmp0_->type;
- g_return_val_if_fail (_tmp1_ == SANE_TYPE_STRING, FALSE);
- _tmp2_ = option;
- _tmp3_ = _tmp2_->size;
- _tmp4_ = g_new0 (gchar, _tmp3_);
- s = _tmp4_;
- s_length1 = _tmp3_;
+ _tmp0_ = g_strdup ("");
+ _g_free0 (_vala_result);
+ _vala_result = _tmp0_;
+ _tmp1_ = option;
+ _tmp2_ = _tmp1_->type;
+ g_return_val_if_fail (_tmp2_ == SANE_TYPE_STRING, FALSE);
+ _tmp3_ = option;
+ _tmp4_ = _tmp3_->size;
+ _tmp5_ = g_new0 (gchar, _tmp4_);
+ s = _tmp5_;
+ s_length1 = _tmp4_;
_s_size_ = s_length1;
i = 0;
{
- gboolean _tmp5_;
- _tmp5_ = TRUE;
+ gboolean _tmp6_;
+ _tmp6_ = TRUE;
while (TRUE) {
- gboolean _tmp6_;
- gboolean _tmp8_ = FALSE;
- gint _tmp9_;
- SANE_Option_Descriptor* _tmp10_;
- SANE_Int _tmp11_;
- gboolean _tmp15_;
- gchar* _tmp16_;
- gint _tmp16__length1;
- gint _tmp17_;
- const gchar* _tmp18_;
- gint _tmp19_;
- gchar _tmp20_ = '\0';
- gchar _tmp21_;
- _tmp6_ = _tmp5_;
- if (!_tmp6_) {
- gint _tmp7_;
- _tmp7_ = i;
- i = _tmp7_ + 1;
+ gboolean _tmp7_;
+ gboolean _tmp9_ = FALSE;
+ gint _tmp10_;
+ SANE_Option_Descriptor* _tmp11_;
+ SANE_Int _tmp12_;
+ gboolean _tmp16_;
+ gchar* _tmp17_;
+ gint _tmp17__length1;
+ gint _tmp18_;
+ const gchar* _tmp19_;
+ gint _tmp20_;
+ gchar _tmp21_ = '\0';
+ gchar _tmp22_;
+ _tmp7_ = _tmp6_;
+ if (!_tmp7_) {
+ gint _tmp8_;
+ _tmp8_ = i;
+ i = _tmp8_ + 1;
}
- _tmp5_ = FALSE;
- _tmp9_ = i;
- _tmp10_ = option;
- _tmp11_ = _tmp10_->size;
- if (((SANE_Int) _tmp9_) < (_tmp11_ - 1)) {
- const gchar* _tmp12_;
- gint _tmp13_;
- gchar _tmp14_ = '\0';
- _tmp12_ = value;
- _tmp13_ = i;
- _tmp14_ = string_get (_tmp12_, (glong) _tmp13_);
- _tmp8_ = _tmp14_ != '\0';
+ _tmp6_ = FALSE;
+ _tmp10_ = i;
+ _tmp11_ = option;
+ _tmp12_ = _tmp11_->size;
+ if (((SANE_Int) _tmp10_) < (_tmp12_ - 1)) {
+ const gchar* _tmp13_;
+ gint _tmp14_;
+ gchar _tmp15_ = '\0';
+ _tmp13_ = value;
+ _tmp14_ = i;
+ _tmp15_ = string_get (_tmp13_, (glong) _tmp14_);
+ _tmp9_ = _tmp15_ != '\0';
} else {
- _tmp8_ = FALSE;
+ _tmp9_ = FALSE;
}
- _tmp15_ = _tmp8_;
- if (!_tmp15_) {
+ _tmp16_ = _tmp9_;
+ if (!_tmp16_) {
break;
}
- _tmp16_ = s;
- _tmp16__length1 = s_length1;
- _tmp17_ = i;
- _tmp18_ = value;
- _tmp19_ = i;
- _tmp20_ = string_get (_tmp18_, (glong) _tmp19_);
- _tmp16_[_tmp17_] = _tmp20_;
- _tmp21_ = _tmp16_[_tmp17_];
+ _tmp17_ = s;
+ _tmp17__length1 = s_length1;
+ _tmp18_ = i;
+ _tmp19_ = value;
+ _tmp20_ = i;
+ _tmp21_ = string_get (_tmp19_, (glong) _tmp20_);
+ _tmp17_[_tmp18_] = _tmp21_;
+ _tmp22_ = _tmp17_[_tmp18_];
}
}
- _tmp22_ = s;
- _tmp22__length1 = s_length1;
- _tmp23_ = i;
- _tmp22_[_tmp23_] = '\0';
- _tmp24_ = _tmp22_[_tmp23_];
- _tmp25_ = handle;
- _tmp26_ = option_index;
- _tmp27_ = s;
- _tmp27__length1 = s_length1;
- _tmp28_ = sane_control_option (_tmp25_, _tmp26_, SANE_ACTION_SET_VALUE, _tmp27_, NULL);
- status = _tmp28_;
- _tmp29_ = s;
- _tmp29__length1 = s_length1;
- _tmp30_ = g_strdup ((const gchar*) _tmp29_);
+ _tmp23_ = s;
+ _tmp23__length1 = s_length1;
+ _tmp24_ = i;
+ _tmp23_[_tmp24_] = '\0';
+ _tmp25_ = _tmp23_[_tmp24_];
+ _tmp26_ = handle;
+ _tmp27_ = option_index;
+ _tmp28_ = s;
+ _tmp28__length1 = s_length1;
+ _tmp29_ = sane_control_option (_tmp26_, _tmp27_, SANE_ACTION_SET_VALUE, _tmp28_, NULL);
+ status = _tmp29_;
+ _tmp30_ = s;
+ _tmp30__length1 = s_length1;
+ _tmp31_ = g_strdup ((const gchar*) _tmp30_);
_g_free0 (_vala_result);
- _vala_result = _tmp30_;
- _tmp31_ = option_index;
- _tmp32_ = value;
- _tmp33_ = sane_status_to_string (status);
- _tmp34_ = _tmp33_;
- g_debug ("scanner.vala:479: sane_control_option (%d, SANE_ACTION_SET_VALUE, \"%s" \
-"\") -> (%s, \"%s\")", (gint) _tmp31_, _tmp32_, _tmp34_, _vala_result);
- _g_free0 (_tmp34_);
+ _vala_result = _tmp31_;
+ _tmp32_ = option_index;
+ _tmp33_ = value;
+ _tmp34_ = sane_status_to_string (status);
+ _tmp35_ = _tmp34_;
+ _tmp36_ = _vala_result;
+ g_debug ("scanner.vala:481: sane_control_option (%d, SANE_ACTION_SET_VALUE, \"%s" \
+"\") -> (%s, \"%s\")", (gint) _tmp32_, _tmp33_, _tmp35_, _tmp36_);
+ _g_free0 (_tmp35_);
result = status == SANE_STATUS_GOOD;
s = (g_free (s), NULL);
if (_result_) {
@@ -4292,6 +4298,7 @@ static gboolean scanner_set_constrained_string_option (Scanner* self, SANE_Handl
SANE_Value_Type _tmp1_;
SANE_Option_Descriptor* _tmp2_;
SANE_Constraint_Type _tmp3_;
+ gchar* _tmp36_;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (option != NULL, FALSE);
_tmp0_ = option;
@@ -4417,6 +4424,9 @@ static gboolean scanner_set_constrained_string_option (Scanner* self, SANE_Handl
}
}
}
+ _tmp36_ = g_strdup ("");
+ _g_free0 (_vala_result);
+ _vala_result = _tmp36_;
result = FALSE;
if (_result_) {
*_result_ = _vala_result;
@@ -5144,7 +5154,7 @@ static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descr
}
}
_tmp214_ = s;
- g_debug ("scanner.vala:666: %s", _tmp214_);
+ g_debug ("scanner.vala:669: %s", _tmp214_);
_tmp215_ = option;
_tmp216_ = _tmp215_->desc;
if (_tmp216_ != NULL) {
@@ -5152,7 +5162,7 @@ static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descr
const gchar* _tmp218_;
_tmp217_ = option;
_tmp218_ = _tmp217_->desc;
- g_debug ("scanner.vala:669: Description: %s", _tmp218_);
+ g_debug ("scanner.vala:672: Description: %s", _tmp218_);
}
_g_free0 (s);
}
@@ -5341,10 +5351,10 @@ static void scanner_close_device (Scanner* self) {
SANE_Handle _tmp2_;
_tmp1_ = self->priv->handle;
sane_cancel (_tmp1_);
- g_debug ("scanner.vala:696: sane_cancel ()");
+ g_debug ("scanner.vala:699: sane_cancel ()");
_tmp2_ = self->priv->handle;
sane_close (_tmp2_);
- g_debug ("scanner.vala:699: sane_close ()");
+ g_debug ("scanner.vala:702: sane_close ()");
self->priv->have_handle = FALSE;
}
self->priv->buffer = (g_free (self->priv->buffer), NULL);
@@ -5445,7 +5455,7 @@ static gboolean scanner_handle_requests (Scanner* self) {
_request_unref0 (request);
return result;
}
- g_debug ("scanner.vala:733: Processing request");
+ g_debug ("scanner.vala:736: Processing request");
_tmp14_ = request_count;
request_count = _tmp14_ + 1;
_tmp15_ = request;
@@ -5547,7 +5557,7 @@ static void scanner_do_open (Scanner* self) {
_tmp12_ = _tmp11_->device;
if (_tmp12_ == NULL) {
const gchar* _tmp13_ = NULL;
- g_warning ("scanner.vala:770: No scan device available");
+ g_warning ("scanner.vala:773: No scan device available");
_tmp13_ = _ ("No scanners available. Please connect a scanner.");
scanner_fail_scan (self, 0, _tmp13_);
_scan_job_unref0 (job);
@@ -5569,7 +5579,7 @@ static void scanner_do_open (Scanner* self) {
}
_tmp18_ = self->priv->handle;
sane_close (_tmp18_);
- g_debug ("scanner.vala:787: sane_close ()");
+ g_debug ("scanner.vala:790: sane_close ()");
self->priv->have_handle = FALSE;
}
_g_free0 (self->priv->current_device);
@@ -5585,7 +5595,7 @@ static void scanner_do_open (Scanner* self) {
_tmp25_ = status;
_tmp26_ = sane_status_to_string (_tmp25_);
_tmp27_ = _tmp26_;
- g_debug ("scanner.vala:795: sane_open (\"%s\") -> %s", _tmp24_, _tmp27_);
+ g_debug ("scanner.vala:798: sane_open (\"%s\") -> %s", _tmp24_, _tmp27_);
_g_free0 (_tmp27_);
_tmp28_ = status;
if (_tmp28_ != SANE_STATUS_GOOD) {
@@ -5595,7 +5605,7 @@ static void scanner_do_open (Scanner* self) {
const gchar* _tmp32_ = NULL;
_tmp29_ = status;
_tmp30_ = sane_strstatus (_tmp29_);
- g_warning ("scanner.vala:799: Unable to get open device: %s", _tmp30_);
+ g_warning ("scanner.vala:802: Unable to get open device: %s", _tmp30_);
_tmp31_ = status;
_tmp32_ = _ ("Unable to connect to scanner");
scanner_fail_scan (self, (gint) _tmp31_, _tmp32_);
@@ -5649,7 +5659,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp5_ = sane_get_option_descriptor (_tmp3_, _tmp4_);
option = _tmp5_;
_tmp6_ = self->priv->option_index;
- g_debug ("scanner.vala:816: sane_get_option_descriptor (%d)", (gint) _tmp6_);
+ g_debug ("scanner.vala:819: sane_get_option_descriptor (%d)", (gint) _tmp6_);
_tmp7_ = self->priv->option_index;
index = _tmp7_;
_tmp8_ = self->priv->option_index;
@@ -5671,7 +5681,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp13_ = sane_get_option_descriptor (_tmp11_, _tmp12_);
option = _tmp13_;
_tmp14_ = self->priv->br_x_option_index;
- g_debug ("scanner.vala:826: sane_get_option_descriptor (%d)", (gint) _tmp14_);
+ g_debug ("scanner.vala:829: sane_get_option_descriptor (%d)", (gint) _tmp14_);
_tmp15_ = option;
_tmp16_ = _tmp15_->constraint_type;
if (_tmp16_ == SANE_CONSTRAINT_RANGE) {
@@ -5725,7 +5735,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp35_ = sane_get_option_descriptor (_tmp33_, _tmp34_);
option = _tmp35_;
_tmp36_ = self->priv->br_y_option_index;
- g_debug ("scanner.vala:838: sane_get_option_descriptor (%d)", (gint) _tmp36_);
+ g_debug ("scanner.vala:841: sane_get_option_descriptor (%d)", (gint) _tmp36_);
_tmp37_ = option;
_tmp38_ = _tmp37_->constraint_type;
if (_tmp38_ == SANE_CONSTRAINT_RANGE) {
@@ -5981,7 +5991,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp124__length1 = flatbed_sources_length1;
_tmp125_ = scanner_set_constrained_string_option (self, _tmp121_, _tmp122_, _tmp123_, _tmp124_, _tmp124__length1, NULL);
if (!_tmp125_) {
- g_warning ("scanner.vala:922: Unable to set single page source, please file a bug");
+ g_warning ("scanner.vala:925: Unable to set single page source, please file a bug");
}
}
break;
@@ -6014,7 +6024,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp134__length1 = adf_sources_length1;
_tmp135_ = scanner_set_constrained_string_option (self, _tmp131_, _tmp132_, _tmp133_, _tmp134_, _tmp134__length1, NULL);
if (!(!_tmp135_)) {
- g_warning ("scanner.vala:927: Unable to set front ADF source, please file a bug");
+ g_warning ("scanner.vala:930: Unable to set front ADF source, please file a bug");
}
}
break;
@@ -6047,7 +6057,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp144__length1 = adf_sources_length1;
_tmp145_ = scanner_set_constrained_string_option (self, _tmp141_, _tmp142_, _tmp143_, _tmp144_, _tmp144__length1, NULL);
if (!_tmp145_) {
- g_warning ("scanner.vala:932: Unable to set back ADF source, please file a bug");
+ g_warning ("scanner.vala:935: Unable to set back ADF source, please file a bug");
}
}
break;
@@ -6080,7 +6090,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp154__length1 = adf_sources_length1;
_tmp155_ = scanner_set_constrained_string_option (self, _tmp151_, _tmp152_, _tmp153_, _tmp154_, _tmp154__length1, NULL);
if (!_tmp155_) {
- g_warning ("scanner.vala:937: Unable to set duplex ADF source, please file a bug");
+ g_warning ("scanner.vala:940: Unable to set duplex ADF source, please file a bug");
}
}
break;
@@ -6300,7 +6310,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp226__length1 = color_scan_modes_length1;
_tmp227_ = scanner_set_constrained_string_option (self, _tmp223_, _tmp224_, _tmp225_, _tmp226_, _tmp226__length1, NULL);
if (!_tmp227_) {
- g_warning ("scanner.vala:995: Unable to set Color mode, please file a bug");
+ g_warning ("scanner.vala:998: Unable to set Color mode, please file a bug");
}
break;
}
@@ -6319,7 +6329,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp231__length1 = gray_scan_modes_length1;
_tmp232_ = scanner_set_constrained_string_option (self, _tmp228_, _tmp229_, _tmp230_, _tmp231_, _tmp231__length1, NULL);
if (!_tmp232_) {
- g_warning ("scanner.vala:999: Unable to set Gray mode, please file a bug");
+ g_warning ("scanner.vala:1002: Unable to set Gray mode, please file a bug");
}
break;
}
@@ -6338,7 +6348,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp236__length1 = lineart_scan_modes_length1;
_tmp237_ = scanner_set_constrained_string_option (self, _tmp233_, _tmp234_, _tmp235_, _tmp236_, _tmp236__length1, NULL);
if (!_tmp237_) {
- g_warning ("scanner.vala:1003: Unable to set Lineart mode, please file a bug");
+ g_warning ("scanner.vala:1006: Unable to set Lineart mode, please file a bug");
}
break;
}
@@ -6393,7 +6403,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp250__length1 = disable_compression_names_length1;
_tmp251_ = scanner_set_constrained_string_option (self, _tmp247_, _tmp248_, _tmp249_, _tmp250_, _tmp250__length1, NULL);
if (!_tmp251_) {
- g_warning ("scanner.vala:1021: Unable to disable compression, please file a bug");
+ g_warning ("scanner.vala:1024: Unable to disable compression, please file a bug");
}
disable_compression_names = (_vala_array_free (disable_compression_names, disable_compression_names_length1, (GDestroyNotify) g_free), NULL);
} else {
@@ -6638,7 +6648,7 @@ static void scanner_do_start (Scanner* self) {
_tmp6_ = status;
_tmp7_ = sane_status_to_string (_tmp6_);
_tmp8_ = _tmp7_;
- g_debug ("scanner.vala:1091: sane_start (page=%d, pass=%d) -> %s", _tmp4_, _tmp5_, _tmp8_);
+ g_debug ("scanner.vala:1094: sane_start (page=%d, pass=%d) -> %s", _tmp4_, _tmp5_, _tmp8_);
_g_free0 (_tmp8_);
_tmp9_ = status;
if (_tmp9_ == SANE_STATUS_GOOD) {
@@ -6655,7 +6665,7 @@ static void scanner_do_start (Scanner* self) {
const gchar* _tmp14_ = NULL;
_tmp11_ = status;
_tmp12_ = sane_strstatus (_tmp11_);
- g_warning ("scanner.vala:1098: Unable to start device: %s", _tmp12_);
+ g_warning ("scanner.vala:1101: Unable to start device: %s", _tmp12_);
_tmp13_ = status;
_tmp14_ = _ ("Unable to start scan");
scanner_fail_scan (self, (gint) _tmp13_, _tmp14_);
@@ -6791,7 +6801,7 @@ static void scanner_do_get_parameters (Scanner* self) {
_tmp3_ = status;
_tmp4_ = sane_status_to_string (_tmp3_);
_tmp5_ = _tmp4_;
- g_debug ("scanner.vala:1108: sane_get_parameters () -> %s", _tmp5_);
+ g_debug ("scanner.vala:1111: sane_get_parameters () -> %s", _tmp5_);
_g_free0 (_tmp5_);
_tmp6_ = status;
if (_tmp6_ != SANE_STATUS_GOOD) {
@@ -6801,7 +6811,7 @@ static void scanner_do_get_parameters (Scanner* self) {
const gchar* _tmp10_ = NULL;
_tmp7_ = status;
_tmp8_ = sane_strstatus (_tmp7_);
- g_warning ("scanner.vala:1111: Unable to get device parameters: %s", _tmp8_);
+ g_warning ("scanner.vala:1114: Unable to get device parameters: %s", _tmp8_);
_tmp9_ = status;
_tmp10_ = _ ("Error communicating with scanner");
scanner_fail_scan (self, (gint) _tmp9_, _tmp10_);
@@ -6831,7 +6841,7 @@ static void scanner_do_get_parameters (Scanner* self) {
_tmp27_ = _tmp26_.lines;
_tmp28_ = self->priv->parameters;
_tmp29_ = _tmp28_.depth;
- g_debug ("scanner.vala:1120: Parameters: format=%s last_frame=%s bytes_per_line=" \
+ g_debug ("scanner.vala:1123: Parameters: format=%s last_frame=%s bytes_per_line=" \
"%d pixels_per_line=%d lines=%d depth=%d", _tmp20_, _tmp21_, _tmp23_, _tmp25_, _tmp27_, _tmp29_);
_g_free0 (_tmp20_);
_tmp30_ = scan_page_info_new ();
@@ -6991,7 +7001,7 @@ static void scanner_do_complete_page (Scanner* self) {
}
_tmp13_ = self->priv->handle;
sane_cancel (_tmp13_);
- g_debug ("scanner.vala:1180: sane_cancel ()");
+ g_debug ("scanner.vala:1183: sane_cancel ()");
scanner_do_complete_document (self);
_scan_job_unref0 (job);
}
@@ -7023,16 +7033,16 @@ static void scanner_do_read (Scanner* self) {
gchar* _tmp15_;
SANE_Int _tmp16_;
SANE_Status _tmp17_;
- SANE_Status _tmp31_;
+ SANE_Status _tmp30_;
gboolean full_read;
- gboolean _tmp36_ = FALSE;
- gint _tmp37_;
- gboolean _tmp40_;
- gint _tmp41_;
- SANE_Int _tmp42_;
- gint _tmp43_;
- SANE_Parameters _tmp44_;
- gint _tmp45_;
+ gboolean _tmp35_ = FALSE;
+ gint _tmp36_;
+ gboolean _tmp39_;
+ gint _tmp40_;
+ SANE_Int _tmp41_;
+ gint _tmp42_;
+ SANE_Parameters _tmp43_;
+ gint _tmp44_;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->job_queue;
_tmp1_ = _tmp0_->data;
@@ -7057,7 +7067,7 @@ static void scanner_do_read (Scanner* self) {
_tmp14_ = sane_status_to_string (_tmp13_);
_tmp15_ = _tmp14_;
_tmp16_ = n_read;
- g_debug ("scanner.vala:1195: sane_read (%d) -> (%s, %d)", _tmp12_, _tmp15_, (gint) _tmp16_);
+ g_debug ("scanner.vala:1198: sane_read (%d) -> (%s, %d)", _tmp12_, _tmp15_, (gint) _tmp16_);
_g_free0 (_tmp15_);
_tmp17_ = status;
if (_tmp17_ == SANE_STATUS_EOF) {
@@ -7065,7 +7075,7 @@ static void scanner_do_read (Scanner* self) {
SANE_Parameters _tmp19_;
gint _tmp20_;
gboolean _tmp24_;
- gint _tmp29_;
+ gint _tmp28_;
_tmp19_ = self->priv->parameters;
_tmp20_ = _tmp19_.lines;
if (_tmp20_ > 0) {
@@ -7081,307 +7091,305 @@ static void scanner_do_read (Scanner* self) {
}
_tmp24_ = _tmp18_;
if (_tmp24_) {
- SANE_Parameters _tmp25_;
- gint _tmp26_;
- SANE_Parameters _tmp27_;
- gint _tmp28_;
- _tmp25_ = self->priv->parameters;
- _tmp26_ = _tmp25_.lines;
- _tmp27_ = self->priv->parameters;
- _tmp28_ = _tmp27_.lines;
- g_warning ("scanner.vala:1201: Scan completed with %d lines, expected %d lines", _tmp26_, _tmp28_);
+ gint _tmp25_;
+ SANE_Parameters _tmp26_;
+ gint _tmp27_;
+ _tmp25_ = self->priv->line_count;
+ _tmp26_ = self->priv->parameters;
+ _tmp27_ = _tmp26_.lines;
+ g_warning ("scanner.vala:1204: Scan completed with %d lines, expected %d lines", _tmp25_, _tmp27_);
}
- _tmp29_ = self->priv->n_used;
- if (_tmp29_ > 0) {
- gint _tmp30_;
- _tmp30_ = self->priv->n_used;
- g_warning ("scanner.vala:1203: Scan complete with %d bytes of unused data", _tmp30_);
+ _tmp28_ = self->priv->n_used;
+ if (_tmp28_ > 0) {
+ gint _tmp29_;
+ _tmp29_ = self->priv->n_used;
+ g_warning ("scanner.vala:1206: Scan complete with %d bytes of unused data", _tmp29_);
}
scanner_do_complete_page (self);
_scan_job_unref0 (job);
return;
}
- _tmp31_ = status;
- if (_tmp31_ != SANE_STATUS_GOOD) {
- SANE_Status _tmp32_;
- const gchar* _tmp33_ = NULL;
- SANE_Status _tmp34_;
- const gchar* _tmp35_ = NULL;
- _tmp32_ = status;
- _tmp33_ = sane_strstatus (_tmp32_);
- g_warning ("scanner.vala:1211: Unable to read frame from device: %s", _tmp33_);
- _tmp34_ = status;
- _tmp35_ = _ ("Error communicating with scanner");
- scanner_fail_scan (self, (gint) _tmp34_, _tmp35_);
+ _tmp30_ = status;
+ if (_tmp30_ != SANE_STATUS_GOOD) {
+ SANE_Status _tmp31_;
+ const gchar* _tmp32_ = NULL;
+ SANE_Status _tmp33_;
+ const gchar* _tmp34_ = NULL;
+ _tmp31_ = status;
+ _tmp32_ = sane_strstatus (_tmp31_);
+ g_warning ("scanner.vala:1214: Unable to read frame from device: %s", _tmp32_);
+ _tmp33_ = status;
+ _tmp34_ = _ ("Error communicating with scanner");
+ scanner_fail_scan (self, (gint) _tmp33_, _tmp34_);
_scan_job_unref0 (job);
return;
}
full_read = FALSE;
- _tmp37_ = self->priv->n_used;
- if (_tmp37_ == 0) {
- SANE_Int _tmp38_;
- guchar* _tmp39_;
- gint _tmp39__length1;
- _tmp38_ = n_read;
- _tmp39_ = self->priv->buffer;
- _tmp39__length1 = self->priv->buffer_length1;
- _tmp36_ = _tmp38_ == ((SANE_Int) _tmp39__length1);
+ _tmp36_ = self->priv->n_used;
+ if (_tmp36_ == 0) {
+ SANE_Int _tmp37_;
+ guchar* _tmp38_;
+ gint _tmp38__length1;
+ _tmp37_ = n_read;
+ _tmp38_ = self->priv->buffer;
+ _tmp38__length1 = self->priv->buffer_length1;
+ _tmp35_ = _tmp37_ == ((SANE_Int) _tmp38__length1);
} else {
- _tmp36_ = FALSE;
+ _tmp35_ = FALSE;
}
- _tmp40_ = _tmp36_;
- if (_tmp40_) {
+ _tmp39_ = _tmp35_;
+ if (_tmp39_) {
full_read = TRUE;
}
- _tmp41_ = self->priv->n_used;
- _tmp42_ = n_read;
- self->priv->n_used = _tmp41_ + ((gint) _tmp42_);
- _tmp43_ = self->priv->n_used;
- _tmp44_ = self->priv->parameters;
- _tmp45_ = _tmp44_.bytes_per_line;
- if (_tmp43_ >= _tmp45_) {
- ScanLine* _tmp46_;
+ _tmp40_ = self->priv->n_used;
+ _tmp41_ = n_read;
+ self->priv->n_used = _tmp40_ + ((gint) _tmp41_);
+ _tmp42_ = self->priv->n_used;
+ _tmp43_ = self->priv->parameters;
+ _tmp44_ = _tmp43_.bytes_per_line;
+ if (_tmp42_ >= _tmp44_) {
+ ScanLine* _tmp45_;
ScanLine* line;
- SANE_Parameters _tmp47_;
- SANE_Frame _tmp48_;
- ScanLine* _tmp54_;
- SANE_Parameters _tmp55_;
- gint _tmp56_;
- ScanLine* _tmp57_;
- SANE_Parameters _tmp58_;
- gint _tmp59_;
- ScanLine* _tmp60_;
- guchar* _tmp61_;
- gint _tmp61__length1;
- ScanLine* _tmp62_;
- SANE_Parameters _tmp63_;
- gint _tmp64_;
- ScanLine* _tmp65_;
- gint _tmp66_;
- ScanLine* _tmp67_;
- gint _tmp68_;
- ScanLine* _tmp69_;
+ SANE_Parameters _tmp46_;
+ SANE_Frame _tmp47_;
+ ScanLine* _tmp53_;
+ SANE_Parameters _tmp54_;
+ gint _tmp55_;
+ ScanLine* _tmp56_;
+ SANE_Parameters _tmp57_;
+ gint _tmp58_;
+ ScanLine* _tmp59_;
+ guchar* _tmp60_;
+ gint _tmp60__length1;
+ ScanLine* _tmp61_;
+ SANE_Parameters _tmp62_;
+ gint _tmp63_;
+ ScanLine* _tmp64_;
+ gint _tmp65_;
+ ScanLine* _tmp66_;
+ gint _tmp67_;
+ ScanLine* _tmp68_;
+ gint _tmp69_;
gint _tmp70_;
- gint _tmp71_;
- ScanLine* _tmp72_;
- gint _tmp73_;
- guchar* _tmp74_;
- gint _tmp74__length1;
+ ScanLine* _tmp71_;
+ gint _tmp72_;
+ guchar* _tmp73_;
+ gint _tmp73__length1;
gint buffer_size;
- gboolean _tmp75_;
- gint _tmp79_;
- guchar* _tmp80_ = NULL;
- gint _tmp81_;
- ScanLine* _tmp82_;
- gint _tmp83_;
- ScanLine* _tmp84_;
- gint _tmp85_;
+ gboolean _tmp74_;
+ gint _tmp78_;
+ guchar* _tmp79_ = NULL;
+ gint _tmp80_;
+ ScanLine* _tmp81_;
+ gint _tmp82_;
+ ScanLine* _tmp83_;
+ gint _tmp84_;
gint n_remaining;
+ gboolean _tmp102_ = FALSE;
gboolean _tmp103_ = FALSE;
gboolean _tmp104_ = FALSE;
- gboolean _tmp105_ = FALSE;
- SANE_Parameters _tmp106_;
- gint _tmp107_;
- gboolean _tmp110_;
- gboolean _tmp113_;
- gboolean _tmp116_;
- ScanLine* _tmp161_;
+ SANE_Parameters _tmp105_;
+ gint _tmp106_;
+ gboolean _tmp109_;
+ gboolean _tmp112_;
+ gboolean _tmp115_;
+ ScanLine* _tmp160_;
+ NotifyGotLine* _tmp161_;
NotifyGotLine* _tmp162_;
- NotifyGotLine* _tmp163_;
- _tmp46_ = scan_line_new ();
- line = _tmp46_;
- _tmp47_ = self->priv->parameters;
- _tmp48_ = _tmp47_.format;
- switch (_tmp48_) {
+ _tmp45_ = scan_line_new ();
+ line = _tmp45_;
+ _tmp46_ = self->priv->parameters;
+ _tmp47_ = _tmp46_.format;
+ switch (_tmp47_) {
case SANE_FRAME_GRAY:
{
+ ScanLine* _tmp48_;
+ _tmp48_ = line;
+ _tmp48_->channel = 0;
+ break;
+ }
+ case SANE_FRAME_RGB:
+ {
ScanLine* _tmp49_;
_tmp49_ = line;
- _tmp49_->channel = 0;
+ _tmp49_->channel = -1;
break;
}
- case SANE_FRAME_RGB:
+ case SANE_FRAME_RED:
{
ScanLine* _tmp50_;
_tmp50_ = line;
- _tmp50_->channel = -1;
+ _tmp50_->channel = 0;
break;
}
- case SANE_FRAME_RED:
+ case SANE_FRAME_GREEN:
{
ScanLine* _tmp51_;
_tmp51_ = line;
- _tmp51_->channel = 0;
+ _tmp51_->channel = 1;
break;
}
- case SANE_FRAME_GREEN:
+ case SANE_FRAME_BLUE:
{
ScanLine* _tmp52_;
_tmp52_ = line;
- _tmp52_->channel = 1;
- break;
- }
- case SANE_FRAME_BLUE:
- {
- ScanLine* _tmp53_;
- _tmp53_ = line;
- _tmp53_->channel = 2;
+ _tmp52_->channel = 2;
break;
}
default:
break;
}
- _tmp54_ = line;
- _tmp55_ = self->priv->parameters;
- _tmp56_ = _tmp55_.pixels_per_line;
- _tmp54_->width = _tmp56_;
- _tmp57_ = line;
- _tmp58_ = self->priv->parameters;
- _tmp59_ = _tmp58_.depth;
- _tmp57_->depth = _tmp59_;
- _tmp60_ = line;
- _tmp61_ = self->priv->buffer;
- _tmp61__length1 = self->priv->buffer_length1;
+ _tmp53_ = line;
+ _tmp54_ = self->priv->parameters;
+ _tmp55_ = _tmp54_.pixels_per_line;
+ _tmp53_->width = _tmp55_;
+ _tmp56_ = line;
+ _tmp57_ = self->priv->parameters;
+ _tmp58_ = _tmp57_.depth;
+ _tmp56_->depth = _tmp58_;
+ _tmp59_ = line;
+ _tmp60_ = self->priv->buffer;
+ _tmp60__length1 = self->priv->buffer_length1;
self->priv->buffer = NULL;
- _tmp60_->data = (g_free (_tmp60_->data), NULL);
- _tmp60_->data = _tmp61_;
- _tmp60_->data_length1 = _tmp61__length1;
- _tmp62_ = line;
- _tmp63_ = self->priv->parameters;
- _tmp64_ = _tmp63_.bytes_per_line;
- _tmp62_->data_length = _tmp64_;
- _tmp65_ = line;
- _tmp66_ = self->priv->line_count;
- _tmp65_->number = _tmp66_;
- _tmp67_ = line;
- _tmp68_ = self->priv->n_used;
- _tmp69_ = line;
- _tmp70_ = _tmp69_->data_length;
- _tmp67_->n_lines = _tmp68_ / _tmp70_;
- _tmp71_ = self->priv->line_count;
- _tmp72_ = line;
- _tmp73_ = _tmp72_->n_lines;
- self->priv->line_count = _tmp71_ + _tmp73_;
- _tmp74_ = self->priv->buffer;
- _tmp74__length1 = self->priv->buffer_length1;
- buffer_size = _tmp74__length1;
- _tmp75_ = full_read;
- if (_tmp75_) {
- gint _tmp76_;
- SANE_Parameters _tmp77_;
- gint _tmp78_;
- _tmp76_ = buffer_size;
- _tmp77_ = self->priv->parameters;
- _tmp78_ = _tmp77_.bytes_per_line;
- buffer_size = _tmp76_ + _tmp78_;
+ _tmp59_->data = (g_free (_tmp59_->data), NULL);
+ _tmp59_->data = _tmp60_;
+ _tmp59_->data_length1 = _tmp60__length1;
+ _tmp61_ = line;
+ _tmp62_ = self->priv->parameters;
+ _tmp63_ = _tmp62_.bytes_per_line;
+ _tmp61_->data_length = _tmp63_;
+ _tmp64_ = line;
+ _tmp65_ = self->priv->line_count;
+ _tmp64_->number = _tmp65_;
+ _tmp66_ = line;
+ _tmp67_ = self->priv->n_used;
+ _tmp68_ = line;
+ _tmp69_ = _tmp68_->data_length;
+ _tmp66_->n_lines = _tmp67_ / _tmp69_;
+ _tmp70_ = self->priv->line_count;
+ _tmp71_ = line;
+ _tmp72_ = _tmp71_->n_lines;
+ self->priv->line_count = _tmp70_ + _tmp72_;
+ _tmp73_ = self->priv->buffer;
+ _tmp73__length1 = self->priv->buffer_length1;
+ buffer_size = _tmp73__length1;
+ _tmp74_ = full_read;
+ if (_tmp74_) {
+ gint _tmp75_;
+ SANE_Parameters _tmp76_;
+ gint _tmp77_;
+ _tmp75_ = buffer_size;
+ _tmp76_ = self->priv->parameters;
+ _tmp77_ = _tmp76_.bytes_per_line;
+ buffer_size = _tmp75_ + _tmp77_;
}
- _tmp79_ = buffer_size;
- _tmp80_ = g_new0 (guchar, _tmp79_);
+ _tmp78_ = buffer_size;
+ _tmp79_ = g_new0 (guchar, _tmp78_);
self->priv->buffer = (g_free (self->priv->buffer), NULL);
- self->priv->buffer = _tmp80_;
- self->priv->buffer_length1 = _tmp79_;
+ self->priv->buffer = _tmp79_;
+ self->priv->buffer_length1 = _tmp78_;
self->priv->_buffer_size_ = self->priv->buffer_length1;
- _tmp81_ = self->priv->n_used;
- _tmp82_ = line;
- _tmp83_ = _tmp82_->n_lines;
- _tmp84_ = line;
- _tmp85_ = _tmp84_->data_length;
- n_remaining = _tmp81_ - (_tmp83_ * _tmp85_);
+ _tmp80_ = self->priv->n_used;
+ _tmp81_ = line;
+ _tmp82_ = _tmp81_->n_lines;
+ _tmp83_ = line;
+ _tmp84_ = _tmp83_->data_length;
+ n_remaining = _tmp80_ - (_tmp82_ * _tmp84_);
self->priv->n_used = 0;
{
gint i;
i = 0;
{
- gboolean _tmp86_;
- _tmp86_ = TRUE;
+ gboolean _tmp85_;
+ _tmp85_ = TRUE;
while (TRUE) {
- gboolean _tmp87_;
+ gboolean _tmp86_;
+ gint _tmp88_;
gint _tmp89_;
- gint _tmp90_;
- guchar* _tmp91_;
- gint _tmp91__length1;
- gint _tmp92_;
- ScanLine* _tmp93_;
- guchar* _tmp94_;
- gint _tmp94__length1;
- gint _tmp95_;
- ScanLine* _tmp96_;
- gint _tmp97_;
- ScanLine* _tmp98_;
- gint _tmp99_;
+ guchar* _tmp90_;
+ gint _tmp90__length1;
+ gint _tmp91_;
+ ScanLine* _tmp92_;
+ guchar* _tmp93_;
+ gint _tmp93__length1;
+ gint _tmp94_;
+ ScanLine* _tmp95_;
+ gint _tmp96_;
+ ScanLine* _tmp97_;
+ gint _tmp98_;
+ guchar _tmp99_;
guchar _tmp100_;
- guchar _tmp101_;
- gint _tmp102_;
- _tmp87_ = _tmp86_;
- if (!_tmp87_) {
- gint _tmp88_;
- _tmp88_ = i;
- i = _tmp88_ + 1;
+ gint _tmp101_;
+ _tmp86_ = _tmp85_;
+ if (!_tmp86_) {
+ gint _tmp87_;
+ _tmp87_ = i;
+ i = _tmp87_ + 1;
}
- _tmp86_ = FALSE;
- _tmp89_ = i;
- _tmp90_ = n_remaining;
- if (!(_tmp89_ < _tmp90_)) {
+ _tmp85_ = FALSE;
+ _tmp88_ = i;
+ _tmp89_ = n_remaining;
+ if (!(_tmp88_ < _tmp89_)) {
break;
}
- _tmp91_ = self->priv->buffer;
- _tmp91__length1 = self->priv->buffer_length1;
- _tmp92_ = i;
- _tmp93_ = line;
- _tmp94_ = _tmp93_->data;
- _tmp94__length1 = _tmp93_->data_length1;
- _tmp95_ = i;
- _tmp96_ = line;
- _tmp97_ = _tmp96_->n_lines;
- _tmp98_ = line;
- _tmp99_ = _tmp98_->data_length;
- _tmp100_ = _tmp94_[_tmp95_ + (_tmp97_ * _tmp99_)];
- _tmp91_[_tmp92_] = _tmp100_;
- _tmp101_ = _tmp91_[_tmp92_];
- _tmp102_ = self->priv->n_used;
- self->priv->n_used = _tmp102_ + 1;
+ _tmp90_ = self->priv->buffer;
+ _tmp90__length1 = self->priv->buffer_length1;
+ _tmp91_ = i;
+ _tmp92_ = line;
+ _tmp93_ = _tmp92_->data;
+ _tmp93__length1 = _tmp92_->data_length1;
+ _tmp94_ = i;
+ _tmp95_ = line;
+ _tmp96_ = _tmp95_->n_lines;
+ _tmp97_ = line;
+ _tmp98_ = _tmp97_->data_length;
+ _tmp99_ = _tmp93_[_tmp94_ + (_tmp96_ * _tmp98_)];
+ _tmp90_[_tmp91_] = _tmp99_;
+ _tmp100_ = _tmp90_[_tmp91_];
+ _tmp101_ = self->priv->n_used;
+ self->priv->n_used = _tmp101_ + 1;
}
}
}
- _tmp106_ = self->priv->parameters;
- _tmp107_ = _tmp106_.depth;
- if (_tmp107_ == 8) {
- SANE_Parameters _tmp108_;
- SANE_Frame _tmp109_;
- _tmp108_ = self->priv->parameters;
- _tmp109_ = _tmp108_.format;
- _tmp105_ = _tmp109_ == SANE_FRAME_GRAY;
- } else {
- _tmp105_ = FALSE;
- }
- _tmp110_ = _tmp105_;
- if (_tmp110_) {
- ScanJob* _tmp111_;
- gint _tmp112_;
- _tmp111_ = job;
- _tmp112_ = _tmp111_->depth;
- _tmp104_ = _tmp112_ == 2;
+ _tmp105_ = self->priv->parameters;
+ _tmp106_ = _tmp105_.depth;
+ if (_tmp106_ == 8) {
+ SANE_Parameters _tmp107_;
+ SANE_Frame _tmp108_;
+ _tmp107_ = self->priv->parameters;
+ _tmp108_ = _tmp107_.format;
+ _tmp104_ = _tmp108_ == SANE_FRAME_GRAY;
} else {
_tmp104_ = FALSE;
}
- _tmp113_ = _tmp104_;
- if (_tmp113_) {
- ScanJob* _tmp114_;
- ScanMode _tmp115_;
- _tmp114_ = job;
- _tmp115_ = _tmp114_->scan_mode;
- _tmp103_ = _tmp115_ == SCAN_MODE_GRAY;
+ _tmp109_ = _tmp104_;
+ if (_tmp109_) {
+ ScanJob* _tmp110_;
+ gint _tmp111_;
+ _tmp110_ = job;
+ _tmp111_ = _tmp110_->depth;
+ _tmp103_ = _tmp111_ == 2;
} else {
_tmp103_ = FALSE;
}
- _tmp116_ = _tmp103_;
- if (_tmp116_) {
+ _tmp112_ = _tmp103_;
+ if (_tmp112_) {
+ ScanJob* _tmp113_;
+ ScanMode _tmp114_;
+ _tmp113_ = job;
+ _tmp114_ = _tmp113_->scan_mode;
+ _tmp102_ = _tmp114_ == SCAN_MODE_GRAY;
+ } else {
+ _tmp102_ = FALSE;
+ }
+ _tmp115_ = _tmp102_;
+ if (_tmp115_) {
guchar block;
gint write_offset;
gint block_shift;
+ ScanLine* _tmp157_;
ScanLine* _tmp158_;
- ScanLine* _tmp159_;
- gint _tmp160_;
+ gint _tmp159_;
block = (guchar) 0;
write_offset = 0;
block_shift = 6;
@@ -7389,163 +7397,163 @@ static void scanner_do_read (Scanner* self) {
gint i;
i = 0;
{
- gboolean _tmp117_;
- _tmp117_ = TRUE;
+ gboolean _tmp116_;
+ _tmp116_ = TRUE;
while (TRUE) {
- gboolean _tmp118_;
- gint _tmp120_;
- ScanLine* _tmp121_;
+ gboolean _tmp117_;
+ gint _tmp119_;
+ ScanLine* _tmp120_;
+ gint _tmp121_;
gint _tmp122_;
- gint _tmp123_;
- ScanLine* _tmp124_;
- gint _tmp125_;
+ ScanLine* _tmp123_;
+ gint _tmp124_;
gint offset;
- gint _tmp151_;
- _tmp118_ = _tmp117_;
- if (!_tmp118_) {
- gint _tmp119_;
- _tmp119_ = i;
- i = _tmp119_ + 1;
+ gint _tmp150_;
+ _tmp117_ = _tmp116_;
+ if (!_tmp117_) {
+ gint _tmp118_;
+ _tmp118_ = i;
+ i = _tmp118_ + 1;
}
- _tmp117_ = FALSE;
- _tmp120_ = i;
- _tmp121_ = line;
- _tmp122_ = _tmp121_->n_lines;
- if (!(_tmp120_ < _tmp122_)) {
+ _tmp116_ = FALSE;
+ _tmp119_ = i;
+ _tmp120_ = line;
+ _tmp121_ = _tmp120_->n_lines;
+ if (!(_tmp119_ < _tmp121_)) {
break;
}
- _tmp123_ = i;
- _tmp124_ = line;
- _tmp125_ = _tmp124_->data_length;
- offset = _tmp123_ * _tmp125_;
+ _tmp122_ = i;
+ _tmp123_ = line;
+ _tmp124_ = _tmp123_->data_length;
+ offset = _tmp122_ * _tmp124_;
{
gint x;
x = 0;
{
- gboolean _tmp126_;
- _tmp126_ = TRUE;
+ gboolean _tmp125_;
+ _tmp125_ = TRUE;
while (TRUE) {
- gboolean _tmp127_;
- gint _tmp129_;
- ScanLine* _tmp130_;
- gint _tmp131_;
- ScanLine* _tmp132_;
- guchar* _tmp133_;
- gint _tmp133__length1;
+ gboolean _tmp126_;
+ gint _tmp128_;
+ ScanLine* _tmp129_;
+ gint _tmp130_;
+ ScanLine* _tmp131_;
+ guchar* _tmp132_;
+ gint _tmp132__length1;
+ gint _tmp133_;
gint _tmp134_;
- gint _tmp135_;
- guchar _tmp136_;
+ guchar _tmp135_;
guchar p;
guchar sample = '\0';
- guchar _tmp137_;
+ guchar _tmp136_;
+ guchar _tmp139_;
guchar _tmp140_;
- guchar _tmp141_;
+ gint _tmp141_;
gint _tmp142_;
- gint _tmp143_;
- _tmp127_ = _tmp126_;
- if (!_tmp127_) {
- gint _tmp128_;
- _tmp128_ = x;
- x = _tmp128_ + 1;
+ _tmp126_ = _tmp125_;
+ if (!_tmp126_) {
+ gint _tmp127_;
+ _tmp127_ = x;
+ x = _tmp127_ + 1;
}
- _tmp126_ = FALSE;
- _tmp129_ = x;
- _tmp130_ = line;
- _tmp131_ = _tmp130_->width;
- if (!(_tmp129_ < _tmp131_)) {
+ _tmp125_ = FALSE;
+ _tmp128_ = x;
+ _tmp129_ = line;
+ _tmp130_ = _tmp129_->width;
+ if (!(_tmp128_ < _tmp130_)) {
break;
}
- _tmp132_ = line;
- _tmp133_ = _tmp132_->data;
- _tmp133__length1 = _tmp132_->data_length1;
- _tmp134_ = offset;
- _tmp135_ = x;
- _tmp136_ = _tmp133_[_tmp134_ + _tmp135_];
- p = _tmp136_;
- _tmp137_ = p;
- if (((gint) _tmp137_) >= 192) {
+ _tmp131_ = line;
+ _tmp132_ = _tmp131_->data;
+ _tmp132__length1 = _tmp131_->data_length1;
+ _tmp133_ = offset;
+ _tmp134_ = x;
+ _tmp135_ = _tmp132_[_tmp133_ + _tmp134_];
+ p = _tmp135_;
+ _tmp136_ = p;
+ if (((gint) _tmp136_) >= 192) {
sample = (guchar) 3;
} else {
- guchar _tmp138_;
- _tmp138_ = p;
- if (((gint) _tmp138_) >= 128) {
+ guchar _tmp137_;
+ _tmp137_ = p;
+ if (((gint) _tmp137_) >= 128) {
sample = (guchar) 2;
} else {
- guchar _tmp139_;
- _tmp139_ = p;
- if (((gint) _tmp139_) >= 64) {
+ guchar _tmp138_;
+ _tmp138_ = p;
+ if (((gint) _tmp138_) >= 64) {
sample = (guchar) 1;
} else {
sample = (guchar) 0;
}
}
}
- _tmp140_ = block;
- _tmp141_ = sample;
+ _tmp139_ = block;
+ _tmp140_ = sample;
+ _tmp141_ = block_shift;
+ block = _tmp139_ | (_tmp140_ << _tmp141_);
_tmp142_ = block_shift;
- block = _tmp140_ | (_tmp141_ << _tmp142_);
- _tmp143_ = block_shift;
- if (_tmp143_ == 0) {
- ScanLine* _tmp144_;
- guchar* _tmp145_;
- gint _tmp145__length1;
- gint _tmp146_;
+ if (_tmp142_ == 0) {
+ ScanLine* _tmp143_;
+ guchar* _tmp144_;
+ gint _tmp144__length1;
+ gint _tmp145_;
+ guchar _tmp146_;
guchar _tmp147_;
- guchar _tmp148_;
- gint _tmp149_;
- _tmp144_ = line;
- _tmp145_ = _tmp144_->data;
- _tmp145__length1 = _tmp144_->data_length1;
- _tmp146_ = write_offset;
- _tmp147_ = block;
- _tmp145_[_tmp146_] = _tmp147_;
- _tmp148_ = _tmp145_[_tmp146_];
- _tmp149_ = write_offset;
- write_offset = _tmp149_ + 1;
+ gint _tmp148_;
+ _tmp143_ = line;
+ _tmp144_ = _tmp143_->data;
+ _tmp144__length1 = _tmp143_->data_length1;
+ _tmp145_ = write_offset;
+ _tmp146_ = block;
+ _tmp144_[_tmp145_] = _tmp146_;
+ _tmp147_ = _tmp144_[_tmp145_];
+ _tmp148_ = write_offset;
+ write_offset = _tmp148_ + 1;
block = (guchar) 0;
block_shift = 6;
} else {
- gint _tmp150_;
- _tmp150_ = block_shift;
- block_shift = _tmp150_ - 2;
+ gint _tmp149_;
+ _tmp149_ = block_shift;
+ block_shift = _tmp149_ - 2;
}
}
}
}
- _tmp151_ = block_shift;
- if (_tmp151_ != 6) {
- ScanLine* _tmp152_;
- guchar* _tmp153_;
- gint _tmp153__length1;
- gint _tmp154_;
+ _tmp150_ = block_shift;
+ if (_tmp150_ != 6) {
+ ScanLine* _tmp151_;
+ guchar* _tmp152_;
+ gint _tmp152__length1;
+ gint _tmp153_;
+ guchar _tmp154_;
guchar _tmp155_;
- guchar _tmp156_;
- gint _tmp157_;
- _tmp152_ = line;
- _tmp153_ = _tmp152_->data;
- _tmp153__length1 = _tmp152_->data_length1;
- _tmp154_ = write_offset;
- _tmp155_ = block;
- _tmp153_[_tmp154_] = _tmp155_;
- _tmp156_ = _tmp153_[_tmp154_];
- _tmp157_ = write_offset;
- write_offset = _tmp157_ + 1;
+ gint _tmp156_;
+ _tmp151_ = line;
+ _tmp152_ = _tmp151_->data;
+ _tmp152__length1 = _tmp151_->data_length1;
+ _tmp153_ = write_offset;
+ _tmp154_ = block;
+ _tmp152_[_tmp153_] = _tmp154_;
+ _tmp155_ = _tmp152_[_tmp153_];
+ _tmp156_ = write_offset;
+ write_offset = _tmp156_ + 1;
block = (guchar) 0;
block_shift = 6;
}
}
}
}
+ _tmp157_ = line;
_tmp158_ = line;
- _tmp159_ = line;
- _tmp160_ = _tmp159_->width;
- _tmp158_->data_length = ((_tmp160_ * 2) + 7) / 8;
+ _tmp159_ = _tmp158_->width;
+ _tmp157_->data_length = ((_tmp159_ * 2) + 7) / 8;
}
- _tmp161_ = line;
- _tmp162_ = notify_got_line_new (_tmp161_);
- _tmp163_ = _tmp162_;
- scanner_notify (self, (Notify*) _tmp163_);
- _notify_unref0 (_tmp163_);
+ _tmp160_ = line;
+ _tmp161_ = notify_got_line_new (_tmp160_);
+ _tmp162_ = _tmp161_;
+ scanner_notify (self, (Notify*) _tmp162_);
+ _notify_unref0 (_tmp162_);
_scan_line_unref0 (line);
}
_scan_job_unref0 (job);
@@ -7581,7 +7589,7 @@ static void* scanner_scan_thread (Scanner* self) {
_tmp2_ = status;
_tmp3_ = sane_status_to_string (_tmp2_);
_tmp4_ = _tmp3_;
- g_debug ("scanner.vala:1328: sane_init () -> %s", _tmp4_);
+ g_debug ("scanner.vala:1331: sane_init () -> %s", _tmp4_);
_g_free0 (_tmp4_);
_tmp5_ = status;
if (_tmp5_ != SANE_STATUS_GOOD) {
@@ -7589,7 +7597,7 @@ static void* scanner_scan_thread (Scanner* self) {
const gchar* _tmp7_ = NULL;
_tmp6_ = status;
_tmp7_ = sane_strstatus (_tmp6_);
- g_warning ("scanner.vala:1331: Unable to initialize SANE backend: %s", _tmp7_);
+ g_warning ("scanner.vala:1334: Unable to initialize SANE backend: %s", _tmp7_);
result = NULL;
return result;
}
@@ -7599,7 +7607,7 @@ static void* scanner_scan_thread (Scanner* self) {
_tmp11_ = SANE_VERSION_MINOR (_tmp10_);
_tmp12_ = version_code;
_tmp13_ = SANE_VERSION_BUILD (_tmp12_);
- g_debug ("scanner.vala:1334: SANE version %d.%d.%d", _tmp9_, _tmp11_, _tmp13_);
+ g_debug ("scanner.vala:1337: SANE version %d.%d.%d", _tmp9_, _tmp11_, _tmp13_);
scanner_redetect (self);
while (TRUE) {
gboolean _tmp14_ = FALSE;
@@ -7675,12 +7683,12 @@ void scanner_start (Scanner* self) {
_tmp0_ = g_thread_create (_scanner_scan_thread_gthread_func, self, TRUE, &_inner_error_);
_tmp1_ = _tmp0_;
if (_inner_error_ != NULL) {
- goto __catch10_g_error;
+ goto __catch14_g_error;
}
self->priv->thread = _tmp1_;
}
- goto __finally10;
- __catch10_g_error:
+ goto __finally14;
+ __catch14_g_error:
{
GError* e = NULL;
GError* _tmp2_;
@@ -7689,10 +7697,10 @@ void scanner_start (Scanner* self) {
_inner_error_ = NULL;
_tmp2_ = e;
_tmp3_ = _tmp2_->message;
- g_critical ("scanner.vala:1385: Unable to create thread: %s", _tmp3_);
+ g_critical ("scanner.vala:1388: Unable to create thread: %s", _tmp3_);
_g_error_free0 (e);
}
- __finally10:
+ __finally14:
if (_inner_error_ != NULL) {
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
@@ -7711,7 +7719,7 @@ void scanner_redetect (Scanner* self) {
return;
}
self->priv->need_redetect = TRUE;
- g_debug ("scanner.vala:1395: Requesting redetection of scan devices");
+ g_debug ("scanner.vala:1398: Requesting redetection of scan devices");
_tmp1_ = self->priv->request_queue;
_tmp2_ = request_redetect_new ();
g_async_queue_push (_tmp1_, (Request*) _tmp2_);
@@ -7895,7 +7903,7 @@ void scanner_scan (Scanner* self, const gchar* device, ScanOptions* options) {
_tmp17_ = _tmp16_->paper_width;
_tmp18_ = options;
_tmp19_ = _tmp18_->paper_height;
- g_debug ("scanner.vala:1441: Scanner.scan (\"%s\", dpi=%d, scan_mode=%s, depth=%" \
+ g_debug ("scanner.vala:1444: Scanner.scan (\"%s\", dpi=%d, scan_mode=%s, depth=%" \
"d, type=%s, paper_width=%d, paper_height=%d)", _tmp3_, _tmp5_, _tmp9_, _tmp11_, _tmp15_, _tmp17_, _tmp19_);
_g_free0 (_tmp15_);
_g_free0 (_tmp9_);
@@ -7955,7 +7963,7 @@ void scanner_free (Scanner* self) {
RequestQuit* _tmp1_;
GThread* _tmp2_;
g_return_if_fail (self != NULL);
- g_debug ("scanner.vala:1463: Stopping scan thread");
+ g_debug ("scanner.vala:1466: Stopping scan thread");
_tmp0_ = self->priv->request_queue;
_tmp1_ = request_quit_new ();
g_async_queue_push (_tmp0_, (Request*) _tmp1_);
@@ -7966,7 +7974,7 @@ void scanner_free (Scanner* self) {
g_thread_join (_tmp3_);
}
sane_exit ();
- g_debug ("scanner.vala:1471: sane_exit ()");
+ g_debug ("scanner.vala:1474: sane_exit ()");
}