diff options
author | Alessio Treglia <alessio@debian.org> | 2014-04-10 15:37:13 +0100 |
---|---|---|
committer | Alessio Treglia <alessio@debian.org> | 2014-04-10 15:37:13 +0100 |
commit | 0e3875acae9028d1abc1b23a13afa6d6d6a55232 (patch) | |
tree | a549b87482145f061c06ffd510a977bda7bcc3ac /src/book.c | |
parent | 168e62c2d48659ddf1250524614272c08b935b4a (diff) | |
parent | e9ca3b0060facd753744602a3baca5a1effdbd83 (diff) |
Merge tag 'upstream/3.12.0'
Upstream version 3.12.0
Diffstat (limited to 'src/book.c')
-rw-r--r-- | src/book.c | 6212 |
1 files changed, 3118 insertions, 3094 deletions
@@ -1,4 +1,4 @@ -/* book.c generated by valac 0.20.1, the Vala compiler +/* book.c generated by valac 0.22.1, the Vala compiler * generated from book.vala, do not modify */ /* @@ -50,8 +50,6 @@ typedef struct _PageClass PageClass; #define _page_unref0(var) ((var == NULL) ? NULL : (var = (page_unref (var), NULL))) #define __g_list_free__page_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__page_unref0_ (var), NULL))) #define _g_byte_array_unref0(var) ((var == NULL) ? NULL : (var = (g_byte_array_unref (var), NULL))) - -#define TYPE_SCAN_DIRECTION (scan_direction_get_type ()) #define _g_free0(var) (var = (g_free (var), NULL)) #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) #define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL))) @@ -99,17 +97,10 @@ struct _BookClass { struct _BookPrivate { GList* pages; - gboolean needs_saving; + gboolean needs_saving_; GByteArray* jpeg_data; }; -typedef enum { - SCAN_DIRECTION_TOP_TO_BOTTOM, - SCAN_DIRECTION_LEFT_TO_RIGHT, - SCAN_DIRECTION_BOTTOM_TO_TOP, - SCAN_DIRECTION_RIGHT_TO_LEFT -} ScanDirection; - struct _PsWriter { GTypeInstance parent_instance; volatile int ref_count; @@ -183,23 +174,18 @@ static void _g_list_free__page_unref0_ (GList* self); Book* book_new (void); Book* book_construct (GType object_type); void book_clear (Book* self); -void book_set_needs_saving (Book* self, gboolean needs_saving); -GType scan_direction_get_type (void) G_GNUC_CONST; -Page* book_append_page (Book* self, gint width, gint height, gint dpi, ScanDirection scan_direction); -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_set_needs_saving (Book* self, gboolean value); +void book_append_page (Book* self, Page* page); void book_move_page (Book* self, Page* page, guint location); void book_delete_page (Book* self, Page* page); -guint book_get_n_pages (Book* self); Page* book_get_page (Book* self, gint page_number); guint book_get_page_index (Book* self, Page* page); static GFile* book_make_indexed_file (Book* self, const gchar* uri, gint i); +guint book_get_n_pages (Book* self); static void book_save_multi_file (Book* self, const gchar* type, gint quality, GFile* file, GError** error); void page_save (Page* self, const gchar* type, gint quality, GFile* file, GError** error); static void book_save_ps_pdf_surface (Book* self, cairo_surface_t* surface, GdkPixbuf* image, gdouble dpi); static void book_save_ps (Book* self, GFile* file, GError** error); -PsWriter* ps_writer_new (GFileOutputStream* stream); -PsWriter* ps_writer_construct (GType object_type, GFileOutputStream* stream); gpointer ps_writer_ref (gpointer instance); void ps_writer_unref (gpointer instance); GParamSpec* param_spec_ps_writer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); @@ -207,6 +193,8 @@ void value_set_ps_writer (GValue* value, gpointer v_object); void value_take_ps_writer (GValue* value, gpointer v_object); gpointer value_get_ps_writer (const GValue* value); GType ps_writer_get_type (void) G_GNUC_CONST; +PsWriter* ps_writer_new (GFileOutputStream* stream); +PsWriter* ps_writer_construct (GType object_type, GFileOutputStream* stream); GdkPixbuf* page_get_image (Page* self, gboolean apply_crop); gint page_get_dpi (Page* self); static guint8* book_compress_zlib (Book* self, guint8* data, int data_length1, int* result_length1); @@ -214,8 +202,6 @@ static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gint quality, g static gboolean book_write_pixbuf_data (Book* self, guint8* buf, int buf_length1, GError** error); static gboolean _book_write_pixbuf_data_gdk_pixbuf_save_func (guint8* buf, gsize buf_length1, GError** error, gpointer self); static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error); -PDFWriter* pdf_writer_new (GFileOutputStream* stream); -PDFWriter* pdf_writer_construct (GType object_type, GFileOutputStream* stream); gpointer pdf_writer_ref (gpointer instance); void pdf_writer_unref (gpointer instance); GParamSpec* param_spec_pdf_writer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); @@ -223,9 +209,11 @@ void value_set_pdf_writer (GValue* value, gpointer v_object); void value_take_pdf_writer (GValue* value, gpointer v_object); gpointer value_get_pdf_writer (const GValue* value); GType pdf_writer_get_type (void) G_GNUC_CONST; +PDFWriter* pdf_writer_new (GFileOutputStream* stream); +PDFWriter* pdf_writer_construct (GType object_type, GFileOutputStream* stream); void pdf_writer_write_string (PDFWriter* self, const gchar* text); guint pdf_writer_start_object (PDFWriter* self); -gboolean page_is_color (Page* self); +gboolean page_get_is_color (Page* self); gint page_get_depth (Page* self); static guint8* _vala_array_dup1 (guint8* self, int length); static guint8* _vala_array_dup2 (guint8* self, int length); @@ -250,30 +238,30 @@ static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify static gpointer _page_ref0 (gpointer self) { -#line 32 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return self ? page_ref (self) : NULL; -#line 256 "book.c" +#line 244 "book.c" } static void _book_page_changed_cb_page_pixels_changed (Page* _sender, gpointer self) { -#line 34 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 47 "/home/bob/bzr/simple-scan/trunk/src/book.vala" book_page_changed_cb (self, _sender); -#line 263 "book.c" +#line 251 "book.c" } static void _book_page_changed_cb_page_crop_changed (Page* _sender, gpointer self) { -#line 35 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 48 "/home/bob/bzr/simple-scan/trunk/src/book.vala" book_page_changed_cb (self, _sender); -#line 270 "book.c" +#line 258 "book.c" } static void _page_unref0_ (gpointer var) { #line 14 "/home/bob/bzr/simple-scan/trunk/src/book.vala" (var == NULL) ? NULL : (var = (page_unref (var), NULL)); -#line 277 "book.c" +#line 265 "book.c" } @@ -282,145 +270,103 @@ static void _g_list_free__page_unref0_ (GList* self) { g_list_foreach (self, (GFunc) _page_unref0_, NULL); #line 14 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_list_free (self); -#line 286 "book.c" +#line 274 "book.c" } Book* book_construct (GType object_type) { Book* self = NULL; -#line 25 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 38 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self = (Book*) g_type_create_instance (object_type); -#line 27 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 40 "/home/bob/bzr/simple-scan/trunk/src/book.vala" __g_list_free__page_unref0_0 (self->priv->pages); -#line 27 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 40 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->priv->pages = NULL; -#line 25 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 38 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return self; -#line 300 "book.c" +#line 288 "book.c" } Book* book_new (void) { -#line 25 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 38 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return book_construct (TYPE_BOOK); -#line 307 "book.c" +#line 295 "book.c" } void book_clear (Book* self) { - GList* _tmp0_; -#line 39 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + GList* _tmp0_ = NULL; +#line 52 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (self != NULL); -#line 41 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = self->priv->pages; -#line 317 "book.c" +#line 305 "book.c" { GList* page_collection = NULL; GList* page_it = NULL; -#line 41 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala" page_collection = _tmp0_; -#line 41 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala" for (page_it = page_collection; page_it != NULL; page_it = page_it->next) { -#line 325 "book.c" - Page* _tmp1_; +#line 313 "book.c" + Page* _tmp1_ = NULL; Page* page = NULL; -#line 41 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = _page_ref0 ((Page*) page_it->data); -#line 41 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala" page = _tmp1_; -#line 332 "book.c" +#line 320 "book.c" { - Page* _tmp2_; + Page* _tmp2_ = NULL; guint _tmp3_ = 0U; - Page* _tmp4_; + Page* _tmp4_ = NULL; guint _tmp5_ = 0U; -#line 43 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 56 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = page; -#line 43 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 56 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_parse_name ("pixels-changed", TYPE_PAGE, &_tmp3_, NULL, FALSE); -#line 43 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 56 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _book_page_changed_cb_page_pixels_changed, self); -#line 44 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 57 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp4_ = page; -#line 44 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 57 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_parse_name ("crop-changed", TYPE_PAGE, &_tmp5_, NULL, FALSE); -#line 44 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 57 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _book_page_changed_cb_page_crop_changed, self); -#line 41 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _page_unref0 (page); -#line 352 "book.c" +#line 340 "book.c" } } } -#line 46 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 59 "/home/bob/bzr/simple-scan/trunk/src/book.vala" __g_list_free__page_unref0_0 (self->priv->pages); -#line 46 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 59 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->priv->pages = NULL; -#line 47 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 60 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_emit_by_name (self, "cleared"); -#line 362 "book.c" +#line 350 "book.c" } static void book_page_changed_cb (Book* self, Page* page) { -#line 50 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 63 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (self != NULL); -#line 50 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - g_return_if_fail (page != NULL); -#line 52 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - book_set_needs_saving (self, TRUE); -#line 373 "book.c" -} - - -Page* book_append_page (Book* self, gint width, gint height, gint dpi, ScanDirection scan_direction) { - Page* result = NULL; - gint _tmp0_; - gint _tmp1_; - gint _tmp2_; - ScanDirection _tmp3_; - Page* _tmp4_; - Page* page; - Page* _tmp5_; -#line 55 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - g_return_val_if_fail (self != NULL, NULL); -#line 57 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp0_ = width; -#line 57 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp1_ = height; -#line 57 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp2_ = dpi; -#line 57 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp3_ = scan_direction; -#line 57 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp4_ = page_new (_tmp0_, _tmp1_, _tmp2_, _tmp3_); -#line 57 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - page = _tmp4_; -#line 58 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - g_signal_connect (page, "pixels-changed", (GCallback) _book_page_changed_cb_page_pixels_changed, self); -#line 59 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - g_signal_connect (page, "crop-changed", (GCallback) _book_page_changed_cb_page_crop_changed, self); -#line 61 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp5_ = _page_ref0 (page); -#line 61 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - self->priv->pages = g_list_append (self->priv->pages, _tmp5_); -#line 62 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - g_signal_emit_by_name (self, "page-added", page); #line 63 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - book_set_needs_saving (self, TRUE); -#line 65 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - result = page; + g_return_if_fail (page != NULL); #line 65 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - return result; -#line 416 "book.c" + book_set_needs_saving (self, TRUE); +#line 361 "book.c" } -void book_move_page (Book* self, Page* page, guint location) { - Page* _tmp0_; - Page* _tmp1_; - Page* _tmp2_; - guint _tmp3_; +void book_append_page (Book* self, Page* page) { + Page* _tmp0_ = NULL; + Page* _tmp1_ = NULL; + Page* _tmp2_ = NULL; + Page* _tmp3_ = NULL; + Page* _tmp4_ = NULL; #line 68 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (self != NULL); #line 68 "/home/bob/bzr/simple-scan/trunk/src/book.vala" @@ -428,633 +374,657 @@ void book_move_page (Book* self, Page* page, guint location) { #line 70 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = page; #line 70 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - self->priv->pages = g_list_remove (self->priv->pages, _tmp0_); + g_signal_connect (_tmp0_, "pixels-changed", (GCallback) _book_page_changed_cb_page_pixels_changed, self); #line 71 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = page; #line 71 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + g_signal_connect (_tmp1_, "crop-changed", (GCallback) _book_page_changed_cb_page_crop_changed, self); +#line 73 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp2_ = page; +#line 73 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp3_ = _page_ref0 (_tmp2_); +#line 73 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + self->priv->pages = g_list_append (self->priv->pages, _tmp3_); +#line 74 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp4_ = page; +#line 74 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + g_signal_emit_by_name (self, "page-added", _tmp4_); +#line 75 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + book_set_needs_saving (self, TRUE); +#line 395 "book.c" +} + + +void book_move_page (Book* self, Page* page, guint location) { + Page* _tmp0_ = NULL; + Page* _tmp1_ = NULL; + Page* _tmp2_ = NULL; + guint _tmp3_ = 0U; +#line 78 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + g_return_if_fail (self != NULL); +#line 78 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + g_return_if_fail (page != NULL); +#line 80 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp0_ = page; +#line 80 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + self->priv->pages = g_list_remove (self->priv->pages, _tmp0_); +#line 81 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp1_ = page; +#line 81 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = _page_ref0 (_tmp1_); -#line 71 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 81 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3_ = location; -#line 71 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 81 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->priv->pages = g_list_insert (self->priv->pages, _tmp2_, (gint) _tmp3_); -#line 72 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 82 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_emit_by_name (self, "reordered"); -#line 73 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 83 "/home/bob/bzr/simple-scan/trunk/src/book.vala" book_set_needs_saving (self, TRUE); -#line 445 "book.c" +#line 424 "book.c" } void book_delete_page (Book* self, Page* page) { - Page* _tmp0_; + Page* _tmp0_ = NULL; guint _tmp1_ = 0U; - Page* _tmp2_; + Page* _tmp2_ = NULL; guint _tmp3_ = 0U; - Page* _tmp4_; - Page* _tmp5_; -#line 76 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + Page* _tmp4_ = NULL; + Page* _tmp5_ = NULL; +#line 86 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (self != NULL); -#line 76 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 86 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (page != NULL); -#line 78 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 88 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = page; -#line 78 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 88 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_parse_name ("pixels-changed", TYPE_PAGE, &_tmp1_, NULL, FALSE); -#line 78 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 88 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _book_page_changed_cb_page_pixels_changed, self); -#line 79 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 89 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = page; -#line 79 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 89 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_parse_name ("crop-changed", TYPE_PAGE, &_tmp3_, NULL, FALSE); -#line 79 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 89 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _book_page_changed_cb_page_crop_changed, self); -#line 80 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 90 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp4_ = page; -#line 80 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 90 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_emit_by_name (self, "page-removed", _tmp4_); -#line 81 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 91 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5_ = page; -#line 81 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 91 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->priv->pages = g_list_remove (self->priv->pages, _tmp5_); -#line 82 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 92 "/home/bob/bzr/simple-scan/trunk/src/book.vala" book_set_needs_saving (self, TRUE); -#line 482 "book.c" -} - - -guint book_get_n_pages (Book* self) { - guint result = 0U; - GList* _tmp0_; - guint _tmp1_ = 0U; -#line 85 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - g_return_val_if_fail (self != NULL, 0U); -#line 87 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp0_ = self->priv->pages; -#line 87 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp1_ = g_list_length (_tmp0_); -#line 87 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - result = _tmp1_; -#line 87 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - return result; -#line 500 "book.c" +#line 461 "book.c" } Page* book_get_page (Book* self, gint page_number) { Page* result = NULL; - gint _tmp0_; - GList* _tmp4_; - gint _tmp5_; + gint _tmp0_ = 0; + GList* _tmp4_ = NULL; + gint _tmp5_ = 0; gconstpointer _tmp6_ = NULL; - Page* _tmp7_; -#line 90 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + Page* _tmp7_ = NULL; +#line 95 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (self != NULL, NULL); -#line 92 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 97 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = page_number; -#line 92 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 97 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_tmp0_ < 0) { -#line 517 "book.c" - GList* _tmp1_; +#line 478 "book.c" + GList* _tmp1_ = NULL; guint _tmp2_ = 0U; - gint _tmp3_; -#line 93 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gint _tmp3_ = 0; +#line 98 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = self->priv->pages; -#line 93 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 98 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = g_list_length (_tmp1_); -#line 93 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 98 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3_ = page_number; -#line 93 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 98 "/home/bob/bzr/simple-scan/trunk/src/book.vala" page_number = ((gint) _tmp2_) + _tmp3_; -#line 529 "book.c" +#line 490 "book.c" } -#line 94 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp4_ = self->priv->pages; -#line 94 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5_ = page_number; -#line 94 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp6_ = g_list_nth_data (_tmp4_, (guint) _tmp5_); -#line 94 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp7_ = _page_ref0 ((Page*) _tmp6_); -#line 94 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala" result = _tmp7_; -#line 94 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return result; -#line 543 "book.c" +#line 504 "book.c" } guint book_get_page_index (Book* self, Page* page) { guint result = 0U; - GList* _tmp0_; - Page* _tmp1_; + GList* _tmp0_ = NULL; + Page* _tmp1_ = NULL; gint _tmp2_ = 0; -#line 97 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 102 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (self != NULL, 0U); -#line 97 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 102 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (page != NULL, 0U); -#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 104 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = self->priv->pages; -#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 104 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = page; -#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 104 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = g_list_index (_tmp0_, _tmp1_); -#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 104 "/home/bob/bzr/simple-scan/trunk/src/book.vala" result = (guint) _tmp2_; -#line 99 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 104 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return result; -#line 566 "book.c" +#line 527 "book.c" } static gint string_last_index_of_char (const gchar* self, gunichar c, gint start_index) { gint result = 0; - gint _tmp0_; - gunichar _tmp1_; + gchar* _result_ = NULL; + gint _tmp0_ = 0; + gunichar _tmp1_ = 0U; gchar* _tmp2_ = NULL; - gchar* _result_; - gchar* _tmp3_; -#line 928 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" + gchar* _tmp3_ = NULL; +#line 928 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, 0); -#line 929 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 929 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp0_ = start_index; -#line 929 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 929 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp1_ = c; -#line 929 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 929 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp2_ = g_utf8_strrchr (((gchar*) self) + _tmp0_, (gssize) (-1), _tmp1_); -#line 929 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 929 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _result_ = _tmp2_; -#line 931 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 931 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp3_ = _result_; -#line 931 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 931 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" if (_tmp3_ != NULL) { -#line 591 "book.c" - gchar* _tmp4_; -#line 932 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 552 "book.c" + gchar* _tmp4_ = NULL; +#line 932 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp4_ = _result_; -#line 932 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 932 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" result = (gint) (_tmp4_ - ((gchar*) self)); -#line 932 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 932 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" return result; -#line 599 "book.c" +#line 560 "book.c" } else { -#line 934 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 934 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" result = -1; -#line 934 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 934 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" return result; -#line 605 "book.c" +#line 566 "book.c" } } static gchar* string_slice (const gchar* self, glong start, glong end) { gchar* result = NULL; - gint _tmp0_; - gint _tmp1_; - glong string_length; - glong _tmp2_; - glong _tmp5_; + glong string_length = 0L; + gint _tmp0_ = 0; + gint _tmp1_ = 0; + glong _tmp2_ = 0L; + glong _tmp5_ = 0L; gboolean _tmp8_ = FALSE; - glong _tmp9_; - gboolean _tmp12_; + glong _tmp9_ = 0L; + gboolean _tmp12_ = FALSE; gboolean _tmp13_ = FALSE; - glong _tmp14_; - gboolean _tmp17_; - glong _tmp18_; - glong _tmp19_; - glong _tmp20_; - glong _tmp21_; - glong _tmp22_; + glong _tmp14_ = 0L; + gboolean _tmp17_ = FALSE; + glong _tmp18_ = 0L; + glong _tmp19_ = 0L; + glong _tmp20_ = 0L; + glong _tmp21_ = 0L; + glong _tmp22_ = 0L; gchar* _tmp23_ = NULL; -#line 1190 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1189 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, NULL); -#line 1191 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1190 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp0_ = strlen (self); -#line 1191 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1190 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp1_ = _tmp0_; -#line 1191 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1190 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" string_length = (glong) _tmp1_; -#line 1192 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1191 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp2_ = start; -#line 1192 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1191 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" if (_tmp2_ < ((glong) 0)) { -#line 641 "book.c" - glong _tmp3_; - glong _tmp4_; -#line 1193 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 602 "book.c" + glong _tmp3_ = 0L; + glong _tmp4_ = 0L; +#line 1192 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp3_ = string_length; -#line 1193 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1192 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp4_ = start; -#line 1193 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1192 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" start = _tmp3_ + _tmp4_; -#line 650 "book.c" +#line 611 "book.c" } -#line 1195 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1194 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp5_ = end; -#line 1195 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1194 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" if (_tmp5_ < ((glong) 0)) { -#line 656 "book.c" - glong _tmp6_; - glong _tmp7_; -#line 1196 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 617 "book.c" + glong _tmp6_ = 0L; + glong _tmp7_ = 0L; +#line 1195 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp6_ = string_length; -#line 1196 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1195 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp7_ = end; -#line 1196 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1195 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" end = _tmp6_ + _tmp7_; -#line 665 "book.c" +#line 626 "book.c" } -#line 1198 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1197 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp9_ = start; -#line 1198 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1197 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" if (_tmp9_ >= ((glong) 0)) { -#line 671 "book.c" - glong _tmp10_; - glong _tmp11_; -#line 1198 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 632 "book.c" + glong _tmp10_ = 0L; + glong _tmp11_ = 0L; +#line 1197 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp10_ = start; -#line 1198 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1197 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp11_ = string_length; -#line 1198 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1197 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp8_ = _tmp10_ <= _tmp11_; -#line 680 "book.c" +#line 641 "book.c" } else { -#line 1198 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1197 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp8_ = FALSE; -#line 684 "book.c" +#line 645 "book.c" } -#line 1198 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1197 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp12_ = _tmp8_; -#line 1198 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1197 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" g_return_val_if_fail (_tmp12_, NULL); -#line 1199 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1198 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp14_ = end; -#line 1199 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1198 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" if (_tmp14_ >= ((glong) 0)) { -#line 694 "book.c" - glong _tmp15_; - glong _tmp16_; -#line 1199 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 655 "book.c" + glong _tmp15_ = 0L; + glong _tmp16_ = 0L; +#line 1198 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp15_ = end; -#line 1199 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1198 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp16_ = string_length; -#line 1199 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1198 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp13_ = _tmp15_ <= _tmp16_; -#line 703 "book.c" +#line 664 "book.c" } else { -#line 1199 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1198 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp13_ = FALSE; -#line 707 "book.c" +#line 668 "book.c" } -#line 1199 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1198 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp17_ = _tmp13_; -#line 1199 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1198 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" g_return_val_if_fail (_tmp17_, NULL); -#line 1200 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1199 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp18_ = start; -#line 1200 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1199 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp19_ = end; -#line 1200 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1199 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" g_return_val_if_fail (_tmp18_ <= _tmp19_, NULL); -#line 1201 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1200 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp20_ = start; -#line 1201 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1200 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp21_ = end; -#line 1201 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1200 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp22_ = start; -#line 1201 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1200 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp23_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) (_tmp21_ - _tmp22_)); -#line 1201 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1200 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" result = _tmp23_; -#line 1201 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1200 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" return result; -#line 731 "book.c" +#line 692 "book.c" } static GFile* book_make_indexed_file (Book* self, const gchar* uri, gint i) { GFile* result = NULL; guint _tmp0_ = 0U; - const gchar* _tmp3_; - gchar* _tmp4_ = NULL; - gchar* basename; - const gchar* _tmp5_; - gchar* _tmp6_; - gchar* prefix; - gchar* _tmp7_; - gchar* suffix; - const gchar* _tmp8_; - gint _tmp9_ = 0; - gint extension_index; - gint _tmp10_; - guint _tmp25_ = 0U; - gchar* _tmp26_ = NULL; - gchar* _tmp27_; - gint _tmp28_; - gint _tmp29_; - gint _tmp30_; - gint width; - gint _tmp31_; - gchar* _tmp32_ = NULL; - gchar* number_format; - const gchar* _tmp33_; - gchar* _tmp34_; - gchar* _tmp35_; - const gchar* _tmp36_; - gint _tmp37_; - gchar* _tmp38_ = NULL; - gchar* _tmp39_; - gchar* _tmp40_; - gchar* _tmp41_; - const gchar* _tmp42_; - gchar* _tmp43_; - gchar* _tmp44_; - gchar* filename; - const gchar* _tmp45_; - GFile* _tmp46_ = NULL; -#line 102 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + guint _tmp1_ = 0U; + gchar* basename = NULL; + const gchar* _tmp4_ = NULL; + gchar* _tmp5_ = NULL; + gchar* prefix = NULL; + const gchar* _tmp6_ = NULL; + gchar* _tmp7_ = NULL; + gchar* suffix = NULL; + gchar* _tmp8_ = NULL; + gint extension_index = 0; + const gchar* _tmp9_ = NULL; + gint _tmp10_ = 0; + gint _tmp11_ = 0; + gint width = 0; + guint _tmp26_ = 0U; + guint _tmp27_ = 0U; + gchar* _tmp28_ = NULL; + gchar* _tmp29_ = NULL; + gint _tmp30_ = 0; + gint _tmp31_ = 0; + gint _tmp32_ = 0; + gchar* number_format = NULL; + gint _tmp33_ = 0; + gchar* _tmp34_ = NULL; + gchar* filename = NULL; + const gchar* _tmp35_ = NULL; + gchar* _tmp36_ = NULL; + gchar* _tmp37_ = NULL; + const gchar* _tmp38_ = NULL; + gint _tmp39_ = 0; + gchar* _tmp40_ = NULL; + gchar* _tmp41_ = NULL; + gchar* _tmp42_ = NULL; + gchar* _tmp43_ = NULL; + const gchar* _tmp44_ = NULL; + gchar* _tmp45_ = NULL; + gchar* _tmp46_ = NULL; + const gchar* _tmp47_ = NULL; + GFile* _tmp48_ = NULL; +#line 107 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (self != NULL, NULL); -#line 102 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 107 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (uri != NULL, NULL); -#line 104 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp0_ = book_get_n_pages (self); -#line 104 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp0_ == ((guint) 1)) { -#line 783 "book.c" - const gchar* _tmp1_; - GFile* _tmp2_ = NULL; -#line 105 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp1_ = uri; -#line 105 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp2_ = g_file_new_for_uri (_tmp1_); -#line 105 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - result = _tmp2_; -#line 105 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - return result; -#line 794 "book.c" - } -#line 108 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp3_ = uri; -#line 108 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp4_ = g_path_get_basename (_tmp3_); -#line 108 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - basename = _tmp4_; #line 109 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp5_ = uri; -#line 109 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp6_ = g_strdup (_tmp5_); -#line 109 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - prefix = _tmp6_; + _tmp0_ = book_get_n_pages (self); #line 109 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp7_ = g_strdup (""); + _tmp1_ = _tmp0_; #line 109 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - suffix = _tmp7_; + if (_tmp1_ == ((guint) 1)) { +#line 748 "book.c" + const gchar* _tmp2_ = NULL; + GFile* _tmp3_ = NULL; #line 110 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp8_ = basename; + _tmp2_ = uri; #line 110 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp9_ = string_last_index_of_char (_tmp8_, (gunichar) '.', 0); + _tmp3_ = g_file_new_for_uri (_tmp2_); #line 110 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - extension_index = _tmp9_; -#line 111 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp10_ = extension_index; -#line 111 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp10_ >= 0) { -#line 822 "book.c" - const gchar* _tmp11_; - gint _tmp12_; - const gchar* _tmp13_; - gint _tmp14_; - gint _tmp15_; - gchar* _tmp16_ = NULL; - const gchar* _tmp17_; - const gchar* _tmp18_; - gint _tmp19_; - gint _tmp20_; - const gchar* _tmp21_; - gint _tmp22_; - gint _tmp23_; - gchar* _tmp24_ = NULL; -#line 113 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp11_ = basename; -#line 113 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp12_ = extension_index; -#line 113 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp13_ = basename; -#line 113 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp14_ = strlen (_tmp13_); -#line 113 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp15_ = _tmp14_; + result = _tmp3_; +#line 110 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + return result; +#line 759 "book.c" + } #line 113 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp16_ = string_slice (_tmp11_, (glong) _tmp12_, (glong) _tmp15_); + _tmp4_ = uri; #line 113 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (suffix); + _tmp5_ = g_path_get_basename (_tmp4_); #line 113 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - suffix = _tmp16_; -#line 114 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp17_ = uri; + basename = _tmp5_; #line 114 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp18_ = uri; + _tmp6_ = uri; #line 114 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp19_ = strlen (_tmp18_); + _tmp7_ = g_strdup (_tmp6_); #line 114 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp20_ = _tmp19_; + prefix = _tmp7_; #line 114 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp21_ = suffix; -#line 114 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp22_ = strlen (_tmp21_); -#line 114 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp23_ = _tmp22_; -#line 114 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp24_ = string_slice (_tmp17_, (glong) 0, (glong) (_tmp20_ - _tmp23_)); -#line 114 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (prefix); + _tmp8_ = g_strdup (""); #line 114 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - prefix = _tmp24_; -#line 873 "book.c" - } -#line 116 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp25_ = book_get_n_pages (self); -#line 116 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp26_ = g_strdup_printf ("%u", _tmp25_); -#line 116 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp27_ = _tmp26_; -#line 116 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp28_ = strlen (_tmp27_); + suffix = _tmp8_; +#line 115 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp9_ = basename; +#line 115 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp10_ = string_last_index_of_char (_tmp9_, (gunichar) '.', 0); +#line 115 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + extension_index = _tmp10_; #line 116 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp29_ = _tmp28_; -#line 116 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp30_ = _tmp29_; -#line 116 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp27_); + _tmp11_ = extension_index; #line 116 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - width = _tmp30_; -#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp31_ = width; -#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp32_ = g_strdup_printf ("%%0%dd", _tmp31_); -#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - number_format = _tmp32_; + if (_tmp11_ >= 0) { +#line 787 "book.c" + const gchar* _tmp12_ = NULL; + gint _tmp13_ = 0; + const gchar* _tmp14_ = NULL; + gint _tmp15_ = 0; + gint _tmp16_ = 0; + gchar* _tmp17_ = NULL; + const gchar* _tmp18_ = NULL; + const gchar* _tmp19_ = NULL; + gint _tmp20_ = 0; + gint _tmp21_ = 0; + const gchar* _tmp22_ = NULL; + gint _tmp23_ = 0; + gint _tmp24_ = 0; + gchar* _tmp25_ = NULL; #line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp33_ = prefix; + _tmp12_ = basename; #line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp34_ = g_strconcat (_tmp33_, "-", NULL); + _tmp13_ = extension_index; #line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp35_ = _tmp34_; + _tmp14_ = basename; #line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp36_ = number_format; + _tmp15_ = strlen (_tmp14_); #line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp37_ = i; + _tmp16_ = _tmp15_; #line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp38_ = g_strdup_printf (_tmp36_, _tmp37_ + 1); + _tmp17_ = string_slice (_tmp12_, (glong) _tmp13_, (glong) _tmp16_); #line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp39_ = _tmp38_; -#line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp40_ = g_strconcat (_tmp35_, _tmp39_, NULL); -#line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp41_ = _tmp40_; -#line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp42_ = suffix; -#line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp43_ = g_strconcat (_tmp41_, _tmp42_, NULL); -#line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp44_ = _tmp43_; -#line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp41_); -#line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp39_); -#line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp35_); + _g_free0 (suffix); #line 118 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - filename = _tmp44_; + suffix = _tmp17_; #line 119 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp45_ = filename; + _tmp18_ = uri; #line 119 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp46_ = g_file_new_for_uri (_tmp45_); + _tmp19_ = uri; #line 119 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - result = _tmp46_; + _tmp20_ = strlen (_tmp19_); #line 119 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (filename); + _tmp21_ = _tmp20_; #line 119 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (number_format); + _tmp22_ = suffix; #line 119 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (suffix); + _tmp23_ = strlen (_tmp22_); #line 119 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (prefix); + _tmp24_ = _tmp23_; #line 119 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (basename); + _tmp25_ = string_slice (_tmp18_, (glong) 0, (glong) (_tmp21_ - _tmp24_)); #line 119 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (prefix); +#line 119 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + prefix = _tmp25_; +#line 838 "book.c" + } +#line 121 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp26_ = book_get_n_pages (self); +#line 121 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp27_ = _tmp26_; +#line 121 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp28_ = g_strdup_printf ("%u", _tmp27_); +#line 121 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp29_ = _tmp28_; +#line 121 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp30_ = strlen (_tmp29_); +#line 121 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp31_ = _tmp30_; +#line 121 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp32_ = _tmp31_; +#line 121 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp29_); +#line 121 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + width = _tmp32_; +#line 122 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp33_ = width; +#line 122 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp34_ = g_strdup_printf ("%%0%dd", _tmp33_); +#line 122 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + number_format = _tmp34_; +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp35_ = prefix; +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp36_ = g_strconcat (_tmp35_, "-", NULL); +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp37_ = _tmp36_; +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp38_ = number_format; +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp39_ = i; +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp40_ = g_strdup_printf (_tmp38_, _tmp39_ + 1); +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp41_ = _tmp40_; +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp42_ = g_strconcat (_tmp37_, _tmp41_, NULL); +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp43_ = _tmp42_; +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp44_ = suffix; +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp45_ = g_strconcat (_tmp43_, _tmp44_, NULL); +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp46_ = _tmp45_; +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp43_); +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp41_); +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp37_); +#line 123 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + filename = _tmp46_; +#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp47_ = filename; +#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp48_ = g_file_new_for_uri (_tmp47_); +#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + result = _tmp48_; +#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (filename); +#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (number_format); +#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (suffix); +#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (prefix); +#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (basename); +#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return result; -#line 947 "book.c" +#line 914 "book.c" } static void book_save_multi_file (Book* self, const gchar* type, gint quality, GFile* file, GError** error) { GError * _inner_error_ = NULL; -#line 122 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (self != NULL); -#line 122 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (type != NULL); -#line 122 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (file != NULL); -#line 959 "book.c" +#line 926 "book.c" { - gint i; -#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gint i = 0; +#line 129 "/home/bob/bzr/simple-scan/trunk/src/book.vala" i = 0; -#line 964 "book.c" +#line 931 "book.c" { - gboolean _tmp0_; -#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gboolean _tmp0_ = FALSE; +#line 129 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = TRUE; -#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 129 "/home/bob/bzr/simple-scan/trunk/src/book.vala" while (TRUE) { -#line 971 "book.c" - gboolean _tmp1_; - gint _tmp3_; +#line 938 "book.c" + gboolean _tmp1_ = FALSE; + gint _tmp3_ = 0; guint _tmp4_ = 0U; - gint _tmp5_; - Page* _tmp6_ = NULL; - Page* page; - Page* _tmp7_; - const gchar* _tmp8_; - gint _tmp9_; - GFile* _tmp10_; - gchar* _tmp11_ = NULL; - gchar* _tmp12_; - gint _tmp13_; - GFile* _tmp14_ = NULL; - GFile* _tmp15_; - gint _tmp16_; -#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + guint _tmp5_ = 0U; + Page* page = NULL; + gint _tmp6_ = 0; + Page* _tmp7_ = NULL; + Page* _tmp8_ = NULL; + const gchar* _tmp9_ = NULL; + gint _tmp10_ = 0; + GFile* _tmp11_ = NULL; + gchar* _tmp12_ = NULL; + gchar* _tmp13_ = NULL; + gint _tmp14_ = 0; + GFile* _tmp15_ = NULL; + GFile* _tmp16_ = NULL; + gint _tmp17_ = 0; +#line 129 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = _tmp0_; -#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 129 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (!_tmp1_) { -#line 992 "book.c" - gint _tmp2_; -#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 960 "book.c" + gint _tmp2_ = 0; +#line 129 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = i; -#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 129 "/home/bob/bzr/simple-scan/trunk/src/book.vala" i = _tmp2_ + 1; -#line 998 "book.c" +#line 966 "book.c" } -#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 129 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = FALSE; -#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 129 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3_ = i; -#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 129 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp4_ = book_get_n_pages (self); -#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!(((guint) _tmp3_) < _tmp4_)) { -#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 129 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp5_ = _tmp4_; +#line 129 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!(((guint) _tmp3_) < _tmp5_)) { +#line 129 "/home/bob/bzr/simple-scan/trunk/src/book.vala" break; -#line 1010 "book.c" +#line 980 "book.c" } -#line 126 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp5_ = i; -#line 126 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp6_ = book_get_page (self, _tmp5_); -#line 126 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - page = _tmp6_; -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp7_ = page; -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp8_ = type; -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp9_ = quality; -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp10_ = file; -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp11_ = g_file_get_uri (_tmp10_); -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp12_ = _tmp11_; -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp13_ = i; -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp14_ = book_make_indexed_file (self, _tmp12_, _tmp13_); -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp15_ = _tmp14_; -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - page_save (_tmp7_, _tmp8_, _tmp9_, _tmp15_, &_inner_error_); -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_object_unref0 (_tmp15_); -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp12_); -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 131 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp6_ = i; +#line 131 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp7_ = book_get_page (self, _tmp6_); +#line 131 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + page = _tmp7_; +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp8_ = page; +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp9_ = type; +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp10_ = quality; +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp11_ = file; +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp12_ = g_file_get_uri (_tmp11_); +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp13_ = _tmp12_; +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp14_ = i; +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp15_ = book_make_indexed_file (self, _tmp13_, _tmp14_); +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp16_ = _tmp15_; +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + page_save (_tmp8_, _tmp9_, _tmp10_, _tmp16_, &_inner_error_); +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_object_unref0 (_tmp16_); +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp13_); +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_inner_error_ != NULL) { -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_propagate_error (error, _inner_error_); -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _page_unref0 (page); -#line 127 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return; -#line 1050 "book.c" +#line 1020 "book.c" } -#line 128 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp16_ = i; -#line 128 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - g_signal_emit_by_name (self, "saving", _tmp16_); -#line 124 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 133 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp17_ = i; +#line 133 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + g_signal_emit_by_name (self, "saving", _tmp17_); +#line 129 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _page_unref0 (page); -#line 1058 "book.c" +#line 1028 "book.c" } } } @@ -1062,506 +1032,518 @@ static void book_save_multi_file (Book* self, const gchar* type, gint quality, G static void book_save_ps_pdf_surface (Book* self, cairo_surface_t* surface, GdkPixbuf* image, gdouble dpi) { - cairo_surface_t* _tmp0_; - cairo_t* _tmp1_; - cairo_t* context; - gdouble _tmp2_; - gdouble _tmp3_; - GdkPixbuf* _tmp4_; + cairo_t* context = NULL; + cairo_surface_t* _tmp0_ = NULL; + cairo_t* _tmp1_ = NULL; + gdouble _tmp2_ = 0.0; + gdouble _tmp3_ = 0.0; + GdkPixbuf* _tmp4_ = NULL; cairo_pattern_t* _tmp5_ = NULL; -#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 137 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (self != NULL); -#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 137 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (surface != NULL); -#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 137 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (image != NULL); -#line 134 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 139 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = surface; -#line 134 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 139 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = cairo_create (_tmp0_); -#line 134 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 139 "/home/bob/bzr/simple-scan/trunk/src/book.vala" context = _tmp1_; -#line 135 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 140 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = dpi; -#line 135 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 140 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3_ = dpi; -#line 135 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 140 "/home/bob/bzr/simple-scan/trunk/src/book.vala" cairo_scale (context, 72.0 / _tmp2_, 72.0 / _tmp3_); -#line 136 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 141 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp4_ = image; -#line 136 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 141 "/home/bob/bzr/simple-scan/trunk/src/book.vala" gdk_cairo_set_source_pixbuf (context, _tmp4_, (gdouble) 0, (gdouble) 0); -#line 137 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 142 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5_ = cairo_get_source (context); -#line 137 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 142 "/home/bob/bzr/simple-scan/trunk/src/book.vala" cairo_pattern_set_filter (_tmp5_, CAIRO_FILTER_BEST); -#line 138 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala" cairo_paint (context); -#line 132 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 137 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _cairo_destroy0 (context); -#line 1103 "book.c" +#line 1073 "book.c" } static gpointer _cairo_surface_reference0 (gpointer self) { -#line 145 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 150 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return self ? cairo_surface_reference (self) : NULL; -#line 1110 "book.c" +#line 1080 "book.c" } static void book_save_ps (Book* self, GFile* file, GError** error) { - GFile* _tmp0_; + GFileOutputStream* stream = NULL; + GFile* _tmp0_ = NULL; GFileOutputStream* _tmp1_ = NULL; - GFileOutputStream* stream; - PsWriter* _tmp2_; - PsWriter* writer; - PsWriter* _tmp3_; - cairo_surface_t* _tmp4_; - cairo_surface_t* _tmp5_; - cairo_surface_t* surface; + PsWriter* writer = NULL; + PsWriter* _tmp2_ = NULL; + cairo_surface_t* surface = NULL; + PsWriter* _tmp3_ = NULL; + cairo_surface_t* _tmp4_ = NULL; + cairo_surface_t* _tmp5_ = NULL; GError * _inner_error_ = NULL; -#line 141 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 146 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (self != NULL); -#line 141 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 146 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (file != NULL); -#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 148 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = file; -#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 148 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = g_file_replace (_tmp0_, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &_inner_error_); -#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 148 "/home/bob/bzr/simple-scan/trunk/src/book.vala" stream = _tmp1_; -#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 148 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_inner_error_ != NULL) { -#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 148 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_propagate_error (error, _inner_error_); -#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 148 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return; -#line 1141 "book.c" +#line 1111 "book.c" } -#line 144 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 149 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = ps_writer_new (stream); -#line 144 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 149 "/home/bob/bzr/simple-scan/trunk/src/book.vala" writer = _tmp2_; -#line 145 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 150 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3_ = writer; -#line 145 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 150 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp4_ = _tmp3_->surface; -#line 145 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 150 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5_ = _cairo_surface_reference0 (_tmp4_); -#line 145 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 150 "/home/bob/bzr/simple-scan/trunk/src/book.vala" surface = _tmp5_; -#line 1155 "book.c" +#line 1125 "book.c" { - gint i; -#line 147 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gint i = 0; +#line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" i = 0; -#line 1160 "book.c" +#line 1130 "book.c" { - gboolean _tmp6_; -#line 147 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gboolean _tmp6_ = FALSE; +#line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp6_ = TRUE; -#line 147 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" while (TRUE) { -#line 1167 "book.c" - gboolean _tmp7_; - gint _tmp9_; +#line 1137 "book.c" + gboolean _tmp7_ = FALSE; + gint _tmp9_ = 0; guint _tmp10_ = 0U; - gint _tmp11_; - Page* _tmp12_ = NULL; - Page* page; - Page* _tmp13_; - GdkPixbuf* _tmp14_ = NULL; - GdkPixbuf* image; - GdkPixbuf* _tmp15_; - gint _tmp16_ = 0; - Page* _tmp17_; - gint _tmp18_ = 0; - gdouble width; - GdkPixbuf* _tmp19_; + guint _tmp11_ = 0U; + Page* page = NULL; + gint _tmp12_ = 0; + Page* _tmp13_ = NULL; + GdkPixbuf* image = NULL; + Page* _tmp14_ = NULL; + GdkPixbuf* _tmp15_ = NULL; + gdouble width = 0.0; + GdkPixbuf* _tmp16_ = NULL; + gint _tmp17_ = 0; + Page* _tmp18_ = NULL; + gint _tmp19_ = 0; gint _tmp20_ = 0; - Page* _tmp21_; + gdouble height = 0.0; + GdkPixbuf* _tmp21_ = NULL; gint _tmp22_ = 0; - gdouble height; - cairo_surface_t* _tmp23_; - gdouble _tmp24_; - gdouble _tmp25_; - cairo_surface_t* _tmp26_; - GdkPixbuf* _tmp27_; - Page* _tmp28_; - gint _tmp29_ = 0; - cairo_surface_t* _tmp30_; - gint _tmp31_; -#line 147 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + Page* _tmp23_ = NULL; + gint _tmp24_ = 0; + gint _tmp25_ = 0; + cairo_surface_t* _tmp26_ = NULL; + gdouble _tmp27_ = 0.0; + gdouble _tmp28_ = 0.0; + cairo_surface_t* _tmp29_ = NULL; + GdkPixbuf* _tmp30_ = NULL; + Page* _tmp31_ = NULL; + gint _tmp32_ = 0; + gint _tmp33_ = 0; + cairo_surface_t* _tmp34_ = NULL; + gint _tmp35_ = 0; +#line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp7_ = _tmp6_; -#line 147 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (!_tmp7_) { -#line 1200 "book.c" - gint _tmp8_; -#line 147 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 1174 "book.c" + gint _tmp8_ = 0; +#line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp8_ = i; -#line 147 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" i = _tmp8_ + 1; -#line 1206 "book.c" +#line 1180 "book.c" } -#line 147 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp6_ = FALSE; -#line 147 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp9_ = i; -#line 147 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp10_ = book_get_n_pages (self); -#line 147 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!(((guint) _tmp9_) < _tmp10_)) { -#line 147 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - break; -#line 1218 "book.c" - } -#line 149 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp11_ = i; -#line 149 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp12_ = book_get_page (self, _tmp11_); -#line 149 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - page = _tmp12_; -#line 150 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp13_ = page; -#line 150 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp14_ = page_get_image (_tmp13_, TRUE); -#line 150 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - image = _tmp14_; -#line 151 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp15_ = image; -#line 151 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp16_ = gdk_pixbuf_get_width (_tmp15_); -#line 151 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp17_ = page; -#line 151 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp18_ = page_get_dpi (_tmp17_); -#line 151 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - width = (_tmp16_ * 72.0) / _tmp18_; #line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp19_ = image; + _tmp9_ = i; #line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp20_ = gdk_pixbuf_get_height (_tmp19_); + _tmp10_ = book_get_n_pages (self); #line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp21_ = page; + _tmp11_ = _tmp10_; #line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp22_ = page_get_dpi (_tmp21_); + if (!(((guint) _tmp9_) < _tmp11_)) { #line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - height = (_tmp20_ * 72.0) / _tmp22_; -#line 153 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp23_ = surface; -#line 153 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp24_ = width; -#line 153 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp25_ = height; -#line 153 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - cairo_ps_surface_set_size (_tmp23_, _tmp24_, _tmp25_); -#line 154 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp26_ = surface; -#line 154 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp27_ = image; + break; +#line 1194 "book.c" + } #line 154 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp28_ = page; + _tmp12_ = i; #line 154 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp29_ = page_get_dpi (_tmp28_); + _tmp13_ = book_get_page (self, _tmp12_); #line 154 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - book_save_ps_pdf_surface (self, _tmp26_, _tmp27_, (gdouble) _tmp29_); + page = _tmp13_; +#line 155 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp14_ = page; #line 155 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp30_ = surface; + _tmp15_ = page_get_image (_tmp14_, TRUE); #line 155 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - cairo_surface_show_page (_tmp30_); + image = _tmp15_; #line 156 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp31_ = i; + _tmp16_ = image; #line 156 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - g_signal_emit_by_name (self, "saving", _tmp31_); -#line 147 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp17_ = gdk_pixbuf_get_width (_tmp16_); +#line 156 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp18_ = page; +#line 156 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp19_ = page_get_dpi (_tmp18_); +#line 156 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp20_ = _tmp19_; +#line 156 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + width = (_tmp17_ * 72.0) / _tmp20_; +#line 157 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp21_ = image; +#line 157 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp22_ = gdk_pixbuf_get_height (_tmp21_); +#line 157 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp23_ = page; +#line 157 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp24_ = page_get_dpi (_tmp23_); +#line 157 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp25_ = _tmp24_; +#line 157 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + height = (_tmp22_ * 72.0) / _tmp25_; +#line 158 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp26_ = surface; +#line 158 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp27_ = width; +#line 158 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp28_ = height; +#line 158 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + cairo_ps_surface_set_size (_tmp26_, _tmp27_, _tmp28_); +#line 159 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp29_ = surface; +#line 159 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp30_ = image; +#line 159 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp31_ = page; +#line 159 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp32_ = page_get_dpi (_tmp31_); +#line 159 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp33_ = _tmp32_; +#line 159 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + book_save_ps_pdf_surface (self, _tmp29_, _tmp30_, (gdouble) _tmp33_); +#line 160 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp34_ = surface; +#line 160 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + cairo_surface_show_page (_tmp34_); +#line 161 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp35_ = i; +#line 161 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + g_signal_emit_by_name (self, "saving", _tmp35_); +#line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_object_unref0 (image); -#line 147 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 152 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _page_unref0 (page); -#line 1282 "book.c" +#line 1264 "book.c" } } } -#line 141 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 146 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _cairo_surface_destroy0 (surface); -#line 141 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 146 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _ps_writer_unref0 (writer); -#line 141 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 146 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_object_unref0 (stream); -#line 1292 "book.c" +#line 1274 "book.c" } static guint8* book_compress_zlib (Book* self, guint8* data, int data_length1, int* result_length1) { guint8* result = NULL; z_stream stream = {0}; - guint8* _tmp0_; - gint _tmp0__length1; + guint8* out_data = NULL; + guint8* _tmp0_ = NULL; + gint _tmp0__length1 = 0; guint8* _tmp1_ = NULL; - guint8* out_data; - gint out_data_length1; - gint _out_data_size_; - guint8* _tmp2_; - gint _tmp2__length1; - guint8* _tmp3_; - gint _tmp3__length1; - z_stream _tmp7_; - guint _tmp8_; - guint8* _tmp10_; - gint _tmp10__length1; - z_stream _tmp11_; - guint _tmp12_; - guint n_written; - guint _tmp13_; + gint out_data_length1 = 0; + gint _out_data_size_ = 0; + guint8* _tmp2_ = NULL; + gint _tmp2__length1 = 0; + guint8* _tmp3_ = NULL; + gint _tmp3__length1 = 0; + z_stream _tmp7_ = {0}; + guint _tmp8_ = 0U; + guint n_written = 0U; + guint8* _tmp10_ = NULL; + gint _tmp10__length1 = 0; + z_stream _tmp11_ = {0}; + guint _tmp12_ = 0U; + guint _tmp13_ = 0U; gint _tmp14_ = 0; - guint8* _tmp15_; - gint _tmp15__length1; -#line 160 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + guint8* _tmp15_ = NULL; + gint _tmp15__length1 = 0; +#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (self != NULL, NULL); -#line 162 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala" deflateInit (&stream, (gint) Z_BEST_COMPRESSION); -#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = data; -#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0__length1 = data_length1; -#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = g_new0 (guint8, _tmp0__length1); -#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala" out_data = _tmp1_; -#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala" out_data_length1 = _tmp0__length1; -#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _out_data_size_ = out_data_length1; -#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 170 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = data; -#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 170 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2__length1 = data_length1; -#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 170 "/home/bob/bzr/simple-scan/trunk/src/book.vala" stream.next_in = _tmp2_; -#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 170 "/home/bob/bzr/simple-scan/trunk/src/book.vala" stream.avail_in = _tmp2__length1; -#line 166 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 171 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3_ = out_data; -#line 166 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 171 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3__length1 = out_data_length1; -#line 166 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 171 "/home/bob/bzr/simple-scan/trunk/src/book.vala" stream.next_out = _tmp3_; -#line 166 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 171 "/home/bob/bzr/simple-scan/trunk/src/book.vala" stream.avail_out = _tmp3__length1; -#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 172 "/home/bob/bzr/simple-scan/trunk/src/book.vala" while (TRUE) { -#line 1354 "book.c" - z_stream _tmp4_; - guint _tmp5_; +#line 1336 "book.c" + z_stream _tmp4_ = {0}; + guint _tmp5_ = 0U; gint _tmp6_ = 0; -#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 172 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp4_ = stream; -#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 172 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5_ = _tmp4_.avail_in; -#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 172 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (!(_tmp5_ > ((guint) 0))) { -#line 167 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 172 "/home/bob/bzr/simple-scan/trunk/src/book.vala" break; -#line 1366 "book.c" +#line 1348 "book.c" } -#line 169 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 174 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp6_ = deflate (&stream, (gint) Z_FINISH); -#line 169 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 174 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_tmp6_ == ((gint) Z_STREAM_ERROR)) { -#line 170 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 175 "/home/bob/bzr/simple-scan/trunk/src/book.vala" break; -#line 1374 "book.c" +#line 1356 "book.c" } } -#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 178 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp7_ = stream; -#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 178 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp8_ = _tmp7_.avail_in; -#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 178 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_tmp8_ > ((guint) 0)) { -#line 1383 "book.c" - guint8* _tmp9_; - gint _tmp9__length1; -#line 174 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 1365 "book.c" + guint8* _tmp9_ = NULL; + gint _tmp9__length1 = 0; +#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp9_ = NULL; -#line 174 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp9__length1 = 0; -#line 174 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (result_length1) { -#line 174 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" *result_length1 = _tmp9__length1; -#line 1394 "book.c" +#line 1376 "book.c" } -#line 174 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" result = _tmp9_; -#line 174 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" out_data = (g_free (out_data), NULL); -#line 174 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" deflateEnd (&stream); -#line 174 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return result; -#line 1404 "book.c" +#line 1386 "book.c" } -#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 181 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp10_ = data; -#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 181 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp10__length1 = data_length1; -#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 181 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp11_ = stream; -#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 181 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp12_ = _tmp11_.avail_out; -#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 181 "/home/bob/bzr/simple-scan/trunk/src/book.vala" n_written = _tmp10__length1 - _tmp12_; -#line 177 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 182 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp13_ = n_written; -#line 177 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 182 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp14_ = (gint) _tmp13_; -#line 177 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 182 "/home/bob/bzr/simple-scan/trunk/src/book.vala" out_data = g_renew (guint8, out_data, (gint) _tmp13_); -#line 177 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 182 "/home/bob/bzr/simple-scan/trunk/src/book.vala" (_tmp14_ > out_data_length1) ? memset (out_data + out_data_length1, 0, sizeof (guint8) * (_tmp14_ - out_data_length1)) : NULL; -#line 177 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 182 "/home/bob/bzr/simple-scan/trunk/src/book.vala" out_data_length1 = _tmp14_; -#line 177 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 182 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _out_data_size_ = _tmp14_; -#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 184 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp15_ = out_data; -#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 184 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp15__length1 = out_data_length1; -#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 184 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (result_length1) { -#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 184 "/home/bob/bzr/simple-scan/trunk/src/book.vala" *result_length1 = _tmp15__length1; -#line 1436 "book.c" +#line 1418 "book.c" } -#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 184 "/home/bob/bzr/simple-scan/trunk/src/book.vala" result = _tmp15_; -#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 184 "/home/bob/bzr/simple-scan/trunk/src/book.vala" deflateEnd (&stream); -#line 179 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 184 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return result; -#line 1444 "book.c" +#line 1426 "book.c" } static gboolean _book_write_pixbuf_data_gdk_pixbuf_save_func (guint8* buf, gsize buf_length1, GError** error, gpointer self) { gboolean result; result = book_write_pixbuf_data (self, buf, buf_length1, error); -#line 191 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return result; -#line 1453 "book.c" +#line 1435 "book.c" } static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gint quality, gint dpi, int* result_length1) { guint8* result = NULL; - GByteArray* _tmp0_; - gchar* _tmp1_; - gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; + GByteArray* _tmp0_ = NULL; + gchar** keys = NULL; + gchar* _tmp1_ = NULL; + gchar* _tmp2_ = NULL; + gchar* _tmp3_ = NULL; + gchar* _tmp4_ = NULL; gchar** _tmp5_ = NULL; - gchar** keys; - gint keys_length1; - gint _keys_size_; - gint _tmp6_; + gint keys_length1 = 0; + gint _keys_size_ = 0; + gchar** values = NULL; + gint _tmp6_ = 0; gchar* _tmp7_ = NULL; - gchar* _tmp8_; - gint _tmp9_; + gchar* _tmp8_ = NULL; + gint _tmp9_ = 0; gchar* _tmp10_ = NULL; - gint _tmp11_; + gint _tmp11_ = 0; gchar* _tmp12_ = NULL; gchar** _tmp13_ = NULL; - gchar** values; - gint values_length1; - gint _values_size_; - GByteArray* _tmp15_; - guint8* _tmp16_; - gint _tmp16__length1; - guint8* data; - gint data_length1; - gint _data_size_; - guint8* _tmp17_; - gint _tmp17__length1; + gint values_length1 = 0; + gint _values_size_ = 0; + guint8* data = NULL; + GByteArray* _tmp15_ = NULL; + guint8* _tmp16_ = NULL; + gint _tmp16__length1 = 0; + gint data_length1 = 0; + gint _data_size_ = 0; + guint8* _tmp17_ = NULL; + gint _tmp17__length1 = 0; GError * _inner_error_ = NULL; -#line 184 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 189 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (self != NULL, NULL); -#line 184 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 189 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (image != NULL, NULL); -#line 186 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 191 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = g_byte_array_new (); -#line 186 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 191 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_byte_array_unref0 (self->priv->jpeg_data); -#line 186 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 191 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->priv->jpeg_data = _tmp0_; -#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = g_strdup ("quality"); -#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = g_strdup ("density-unit"); -#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3_ = g_strdup ("x-density"); -#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp4_ = g_strdup ("y-density"); -#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5_ = g_new0 (gchar*, 5 + 1); -#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5_[0] = _tmp1_; -#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5_[1] = _tmp2_; -#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5_[2] = _tmp3_; -#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5_[3] = _tmp4_; -#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5_[4] = NULL; -#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala" keys = _tmp5_; -#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala" keys_length1 = 5; -#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _keys_size_ = keys_length1; -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp6_ = quality; -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp7_ = g_strdup_printf ("%d", _tmp6_); -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp8_ = g_strdup ("dots-per-inch"); -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp9_ = dpi; -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp10_ = g_strdup_printf ("%d", _tmp9_); -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp11_ = dpi; -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp12_ = g_strdup_printf ("%d", _tmp11_); -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp13_ = g_new0 (gchar*, 5 + 1); -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp13_[0] = _tmp7_; -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp13_[1] = _tmp8_; -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp13_[2] = _tmp10_; -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp13_[3] = _tmp12_; -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp13_[4] = NULL; -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" values = _tmp13_; -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" values_length1 = 5; -#line 188 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _values_size_ = values_length1; -#line 1556 "book.c" +#line 1538 "book.c" { - GdkPixbuf* _tmp14_; -#line 191 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + GdkPixbuf* _tmp14_ = NULL; +#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp14_ = image; -#line 191 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala" gdk_pixbuf_save_to_callbackv (_tmp14_, _book_write_pixbuf_data_gdk_pixbuf_save_func, self, "jpeg", keys, values, &_inner_error_); -#line 191 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_inner_error_ != NULL) { -#line 1565 "book.c" +#line 1547 "book.c" goto __catch0_g_error; } } @@ -1569,904 +1551,922 @@ static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gint quality, g __catch0_g_error: { GError* e = NULL; -#line 189 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala" e = _inner_error_; -#line 189 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _inner_error_ = NULL; -#line 189 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_error_free0 (e); -#line 1579 "book.c" +#line 1561 "book.c" } __finally0: -#line 189 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_inner_error_ != NULL) { -#line 189 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala" values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL); -#line 189 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala" keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL); -#line 189 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.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 189 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_clear_error (&_inner_error_); -#line 189 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return NULL; -#line 1594 "book.c" +#line 1576 "book.c" } -#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 201 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp15_ = self->priv->jpeg_data; -#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 201 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp16_ = _tmp15_->data; -#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 201 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp16__length1 = _tmp15_->len; -#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 201 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp15_->data = NULL; -#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 201 "/home/bob/bzr/simple-scan/trunk/src/book.vala" data = _tmp16_; -#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 201 "/home/bob/bzr/simple-scan/trunk/src/book.vala" data_length1 = _tmp16__length1; -#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 201 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _data_size_ = data_length1; -#line 197 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 202 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_byte_array_unref0 (self->priv->jpeg_data); -#line 197 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 202 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->priv->jpeg_data = NULL; -#line 199 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 204 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp17_ = data; -#line 199 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 204 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp17__length1 = data_length1; -#line 199 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 204 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (result_length1) { -#line 199 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 204 "/home/bob/bzr/simple-scan/trunk/src/book.vala" *result_length1 = _tmp17__length1; -#line 1622 "book.c" +#line 1604 "book.c" } -#line 199 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 204 "/home/bob/bzr/simple-scan/trunk/src/book.vala" result = _tmp17_; -#line 199 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 204 "/home/bob/bzr/simple-scan/trunk/src/book.vala" values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL); -#line 199 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 204 "/home/bob/bzr/simple-scan/trunk/src/book.vala" keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL); -#line 199 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 204 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return result; -#line 1632 "book.c" +#line 1614 "book.c" } static gboolean book_write_pixbuf_data (Book* self, guint8* buf, int buf_length1, GError** error) { gboolean result = FALSE; - GByteArray* _tmp0_; - guint8* _tmp1_; - gint _tmp1__length1; -#line 202 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + GByteArray* _tmp0_ = NULL; + guint8* _tmp1_ = NULL; + gint _tmp1__length1 = 0; +#line 207 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (self != NULL, FALSE); -#line 204 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 209 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = self->priv->jpeg_data; -#line 204 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 209 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = buf; -#line 204 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 209 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1__length1 = buf_length1; -#line 204 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 209 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_byte_array_append (_tmp0_, _tmp1_, _tmp1__length1); -#line 205 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 210 "/home/bob/bzr/simple-scan/trunk/src/book.vala" result = TRUE; -#line 205 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 210 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return result; -#line 1655 "book.c" +#line 1637 "book.c" } static guint8* _vala_array_dup1 (guint8* self, int length) { -#line 404 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 409 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return g_memdup (self, length * sizeof (guint8)); -#line 1662 "book.c" +#line 1644 "book.c" } static guint8* _vala_array_dup2 (guint8* self, int length) { -#line 411 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return g_memdup (self, length * sizeof (guint8)); -#line 1669 "book.c" +#line 1651 "book.c" } static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error) { - GFile* _tmp0_; + GFileOutputStream* stream = NULL; + GFile* _tmp0_ = NULL; GFileOutputStream* _tmp1_ = NULL; - GFileOutputStream* stream; - PDFWriter* _tmp2_; - PDFWriter* writer; - PDFWriter* _tmp3_; - PDFWriter* _tmp4_; - PDFWriter* _tmp5_; + PDFWriter* writer = NULL; + PDFWriter* _tmp2_ = NULL; + PDFWriter* _tmp3_ = NULL; + PDFWriter* _tmp4_ = NULL; + guint catalog_number = 0U; + PDFWriter* _tmp5_ = NULL; guint _tmp6_ = 0U; - guint catalog_number; - PDFWriter* _tmp7_; - guint _tmp8_; + PDFWriter* _tmp7_ = NULL; + guint _tmp8_ = 0U; gchar* _tmp9_ = NULL; - gchar* _tmp10_; - PDFWriter* _tmp11_; - PDFWriter* _tmp12_; - PDFWriter* _tmp13_; - guint _tmp14_; + gchar* _tmp10_ = NULL; + PDFWriter* _tmp11_ = NULL; + PDFWriter* _tmp12_ = NULL; + PDFWriter* _tmp13_ = NULL; + guint _tmp14_ = 0U; gchar* _tmp15_ = NULL; - gchar* _tmp16_; - PDFWriter* _tmp17_; - PDFWriter* _tmp18_; - PDFWriter* _tmp19_; - PDFWriter* _tmp20_; + gchar* _tmp16_ = NULL; + PDFWriter* _tmp17_ = NULL; + PDFWriter* _tmp18_ = NULL; + PDFWriter* _tmp19_ = NULL; + guint pages_number = 0U; + PDFWriter* _tmp20_ = NULL; guint _tmp21_ = 0U; - guint pages_number; - PDFWriter* _tmp22_; - guint _tmp23_; + PDFWriter* _tmp22_ = NULL; + guint _tmp23_ = 0U; gchar* _tmp24_ = NULL; - gchar* _tmp25_; - PDFWriter* _tmp26_; - PDFWriter* _tmp27_; - PDFWriter* _tmp28_; - PDFWriter* _tmp39_; - PDFWriter* _tmp40_; - guint _tmp41_ = 0U; - gchar* _tmp42_ = NULL; - gchar* _tmp43_; - PDFWriter* _tmp44_; - PDFWriter* _tmp45_; - PDFWriter* _tmp352_; - PDFWriter* _tmp353_; - guint _tmp354_ = 0U; - guint info_number; - PDFWriter* _tmp355_; - guint _tmp356_; - gchar* _tmp357_ = NULL; - gchar* _tmp358_; - PDFWriter* _tmp359_; - PDFWriter* _tmp360_; - gchar* _tmp361_ = NULL; - gchar* _tmp362_; - PDFWriter* _tmp363_; - PDFWriter* _tmp364_; - PDFWriter* _tmp365_; - gsize _tmp366_; - gsize xref_offset; - PDFWriter* _tmp367_; - PDFWriter* _tmp368_; - PDFWriter* _tmp369_; - GList* _tmp370_; - guint _tmp371_ = 0U; - gchar* _tmp372_ = NULL; - gchar* _tmp373_; - PDFWriter* _tmp374_; - GList* _tmp375_; - PDFWriter* _tmp380_; - PDFWriter* _tmp381_; - PDFWriter* _tmp382_; - PDFWriter* _tmp383_; - GList* _tmp384_; - guint _tmp385_ = 0U; - gchar* _tmp386_ = NULL; - gchar* _tmp387_; - PDFWriter* _tmp388_; - guint _tmp389_; - gchar* _tmp390_ = NULL; - gchar* _tmp391_; - PDFWriter* _tmp392_; - guint _tmp393_; - gchar* _tmp394_ = NULL; - gchar* _tmp395_; - PDFWriter* _tmp396_; - PDFWriter* _tmp397_; - PDFWriter* _tmp398_; - gsize _tmp399_; + gchar* _tmp25_ = NULL; + PDFWriter* _tmp26_ = NULL; + PDFWriter* _tmp27_ = NULL; + PDFWriter* _tmp28_ = NULL; + PDFWriter* _tmp40_ = NULL; + PDFWriter* _tmp41_ = NULL; + guint _tmp42_ = 0U; + guint _tmp43_ = 0U; + gchar* _tmp44_ = NULL; + gchar* _tmp45_ = NULL; + PDFWriter* _tmp46_ = NULL; + PDFWriter* _tmp47_ = NULL; + PDFWriter* _tmp361_ = NULL; + guint info_number = 0U; + PDFWriter* _tmp362_ = NULL; + guint _tmp363_ = 0U; + PDFWriter* _tmp364_ = NULL; + guint _tmp365_ = 0U; + gchar* _tmp366_ = NULL; + gchar* _tmp367_ = NULL; + PDFWriter* _tmp368_ = NULL; + PDFWriter* _tmp369_ = NULL; + gchar* _tmp370_ = NULL; + gchar* _tmp371_ = NULL; + PDFWriter* _tmp372_ = NULL; + PDFWriter* _tmp373_ = NULL; + gsize xref_offset = 0UL; + PDFWriter* _tmp374_ = NULL; + gsize _tmp375_ = 0UL; + PDFWriter* _tmp376_ = NULL; + PDFWriter* _tmp377_ = NULL; + PDFWriter* _tmp378_ = NULL; + GList* _tmp379_ = NULL; + guint _tmp380_ = 0U; + gchar* _tmp381_ = NULL; + gchar* _tmp382_ = NULL; + PDFWriter* _tmp383_ = NULL; + GList* _tmp384_ = NULL; + PDFWriter* _tmp389_ = NULL; + PDFWriter* _tmp390_ = NULL; + PDFWriter* _tmp391_ = NULL; + PDFWriter* _tmp392_ = NULL; + GList* _tmp393_ = NULL; + guint _tmp394_ = 0U; + gchar* _tmp395_ = NULL; + gchar* _tmp396_ = NULL; + PDFWriter* _tmp397_ = NULL; + guint _tmp398_ = 0U; + gchar* _tmp399_ = NULL; gchar* _tmp400_ = NULL; - gchar* _tmp401_; - PDFWriter* _tmp402_; + PDFWriter* _tmp401_ = NULL; + guint _tmp402_ = 0U; + gchar* _tmp403_ = NULL; + gchar* _tmp404_ = NULL; + PDFWriter* _tmp405_ = NULL; + PDFWriter* _tmp406_ = NULL; + PDFWriter* _tmp407_ = NULL; + gsize _tmp408_ = 0UL; + gchar* _tmp409_ = NULL; + gchar* _tmp410_ = NULL; + PDFWriter* _tmp411_ = NULL; GError * _inner_error_ = NULL; -#line 208 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 213 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (self != NULL); -#line 208 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 213 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (file != NULL); -#line 210 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 215 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = file; -#line 210 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 215 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = g_file_replace (_tmp0_, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &_inner_error_); -#line 210 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 215 "/home/bob/bzr/simple-scan/trunk/src/book.vala" stream = _tmp1_; -#line 210 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 215 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_inner_error_ != NULL) { -#line 210 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 215 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_propagate_error (error, _inner_error_); -#line 210 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 215 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return; -#line 1780 "book.c" +#line 1763 "book.c" } -#line 211 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 216 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = pdf_writer_new (stream); -#line 211 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 216 "/home/bob/bzr/simple-scan/trunk/src/book.vala" writer = _tmp2_; -#line 214 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 219 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3_ = writer; -#line 214 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 219 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write_string (_tmp3_, "%PDF-1.3\n"); -#line 217 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 222 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp4_ = writer; -#line 217 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 222 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write_string (_tmp4_, "%\xe2\xe3\xcf\xd3\n"); -#line 220 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5_ = writer; -#line 220 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp6_ = pdf_writer_start_object (_tmp5_); -#line 220 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala" catalog_number = _tmp6_; -#line 221 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 226 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp7_ = writer; -#line 221 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 226 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp8_ = catalog_number; -#line 221 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 226 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp9_ = g_strdup_printf ("%u 0 obj\n", _tmp8_); -#line 221 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 226 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp10_ = _tmp9_; -#line 221 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 226 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write_string (_tmp7_, _tmp10_); -#line 221 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 226 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_free0 (_tmp10_); -#line 222 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 227 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp11_ = writer; -#line 222 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 227 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write_string (_tmp11_, "<<\n"); -#line 223 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 228 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp12_ = writer; -#line 223 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 228 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write_string (_tmp12_, "/Type /Catalog\n"); -#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 230 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp13_ = writer; -#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 230 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp14_ = catalog_number; -#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 230 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp15_ = g_strdup_printf ("/Pages %u 0 R\n", _tmp14_ + 1); -#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 230 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp16_ = _tmp15_; -#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 230 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write_string (_tmp13_, _tmp16_); -#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 230 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_free0 (_tmp16_); -#line 226 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 231 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp17_ = writer; -#line 226 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 231 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write_string (_tmp17_, ">>\n"); -#line 227 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 232 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp18_ = writer; -#line 227 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 232 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write_string (_tmp18_, "endobj\n"); -#line 245 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 250 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp19_ = writer; -#line 245 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 250 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write_string (_tmp19_, "\n"); -#line 246 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp20_ = writer; -#line 246 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp21_ = pdf_writer_start_object (_tmp20_); -#line 246 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pages_number = _tmp21_; -#line 247 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 252 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp22_ = writer; -#line 247 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 252 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp23_ = pages_number; -#line 247 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 252 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp24_ = g_strdup_printf ("%u 0 obj\n", _tmp23_); -#line 247 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 252 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp25_ = _tmp24_; -#line 247 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 252 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write_string (_tmp22_, _tmp25_); -#line 247 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 252 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_free0 (_tmp25_); -#line 248 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 253 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp26_ = writer; -#line 248 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 253 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write_string (_tmp26_, "<<\n"); -#line 249 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 254 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp27_ = writer; -#line 249 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 254 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write_string (_tmp27_, "/Type /Pages\n"); -#line 250 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 255 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp28_ = writer; -#line 250 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 255 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write_string (_tmp28_, "/Kids ["); -#line 1874 "book.c" +#line 1857 "book.c" { - gint i; -#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gint i = 0; +#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" i = 0; -#line 1879 "book.c" +#line 1862 "book.c" { - gboolean _tmp29_; -#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gboolean _tmp29_ = FALSE; +#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp29_ = TRUE; -#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" while (TRUE) { -#line 1886 "book.c" - gboolean _tmp30_; - gint _tmp32_; +#line 1869 "book.c" + gboolean _tmp30_ = FALSE; + gint _tmp32_ = 0; guint _tmp33_ = 0U; - PDFWriter* _tmp34_; - guint _tmp35_; - gint _tmp36_; - gchar* _tmp37_ = NULL; - gchar* _tmp38_; -#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + guint _tmp34_ = 0U; + PDFWriter* _tmp35_ = NULL; + guint _tmp36_ = 0U; + gint _tmp37_ = 0; + gchar* _tmp38_ = NULL; + gchar* _tmp39_ = NULL; +#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp30_ = _tmp29_; -#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (!_tmp30_) { -#line 1899 "book.c" - gint _tmp31_; -#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 1883 "book.c" + gint _tmp31_ = 0; +#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp31_ = i; -#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" i = _tmp31_ + 1; -#line 1905 "book.c" +#line 1889 "book.c" } -#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp29_ = FALSE; -#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp32_ = i; -#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp33_ = book_get_n_pages (self); -#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!(((guint) _tmp32_) < _tmp33_)) { -#line 251 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp34_ = _tmp33_; +#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!(((guint) _tmp32_) < _tmp34_)) { +#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" break; -#line 1917 "book.c" +#line 1903 "book.c" } -#line 252 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp34_ = writer; -#line 252 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp35_ = pages_number; -#line 252 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp36_ = i; -#line 252 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp37_ = g_strdup_printf (" %u 0 R", (_tmp35_ + 1) + (_tmp36_ * 3)); -#line 252 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp38_ = _tmp37_; -#line 252 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp34_, _tmp38_); -#line 252 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp38_); -#line 1933 "book.c" +#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp35_ = writer; +#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp36_ = pages_number; +#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp37_ = i; +#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp38_ = g_strdup_printf (" %u 0 R", (_tmp36_ + 1) + (_tmp37_ * 3)); +#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp39_ = _tmp38_; +#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp35_, _tmp39_); +#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp39_); +#line 1919 "book.c" } } } -#line 253 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp39_ = writer; -#line 253 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp39_, " ]\n"); -#line 254 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp40_ = writer; -#line 254 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp41_ = book_get_n_pages (self); -#line 254 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp42_ = g_strdup_printf ("/Count %u\n", _tmp41_); -#line 254 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp40_, " ]\n"); +#line 259 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp41_ = writer; +#line 259 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp42_ = book_get_n_pages (self); +#line 259 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp43_ = _tmp42_; -#line 254 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp40_, _tmp43_); -#line 254 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp43_); -#line 255 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp44_ = writer; -#line 255 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp44_, ">>\n"); -#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp45_ = writer; -#line 256 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp45_, "endobj\n"); -#line 1961 "book.c" +#line 259 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp44_ = g_strdup_printf ("/Count %u\n", _tmp43_); +#line 259 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp45_ = _tmp44_; +#line 259 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp41_, _tmp45_); +#line 259 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp45_); +#line 260 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp46_ = writer; +#line 260 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp46_, ">>\n"); +#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp47_ = writer; +#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp47_, "endobj\n"); +#line 1949 "book.c" { - gint i; -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gint i = 0; +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" i = 0; -#line 1966 "book.c" +#line 1954 "book.c" { - gboolean _tmp46_; -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp46_ = TRUE; -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gboolean _tmp48_ = FALSE; +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp48_ = TRUE; +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" while (TRUE) { -#line 1973 "book.c" - gboolean _tmp47_; - gint _tmp49_; - guint _tmp50_ = 0U; - gint _tmp51_; - Page* _tmp52_ = NULL; - Page* page; - Page* _tmp53_; - GdkPixbuf* _tmp54_ = NULL; - GdkPixbuf* image; - GdkPixbuf* _tmp55_; - gint _tmp56_ = 0; - gint width; - GdkPixbuf* _tmp57_; - gint _tmp58_ = 0; - gint height; - GdkPixbuf* _tmp59_; - guint8* _tmp60_ = NULL; - guint8* pixels; - gint pixels_length1; - gint _pixels_size_; - gint _tmp61_; - Page* _tmp62_; - gint _tmp63_ = 0; - gdouble page_width; - gint _tmp64_; - Page* _tmp65_; +#line 1961 "book.c" + gboolean _tmp49_ = FALSE; + gint _tmp51_ = 0; + guint _tmp52_ = 0U; + guint _tmp53_ = 0U; + Page* page = NULL; + gint _tmp54_ = 0; + Page* _tmp55_ = NULL; + GdkPixbuf* image = NULL; + Page* _tmp56_ = NULL; + GdkPixbuf* _tmp57_ = NULL; + gint width = 0; + GdkPixbuf* _tmp58_ = NULL; + gint _tmp59_ = 0; + gint height = 0; + GdkPixbuf* _tmp60_ = NULL; + gint _tmp61_ = 0; + guint8* pixels = NULL; + GdkPixbuf* _tmp62_ = NULL; + guint8* _tmp63_ = NULL; + gint pixels_length1 = 0; + gint _pixels_size_ = 0; + gdouble page_width = 0.0; + gint _tmp64_ = 0; + Page* _tmp65_ = NULL; gint _tmp66_ = 0; - gdouble page_height; - gint depth; - gchar* _tmp67_; - gchar* color_space; - gchar* filter; - gchar* _tmp68_ = NULL; - gchar* width_buffer; - gint width_buffer_length1; - gint _width_buffer_size_; - gchar* _tmp69_ = NULL; - gchar* height_buffer; - gint height_buffer_length1; - gint _height_buffer_size_; + gint _tmp67_ = 0; + gdouble page_height = 0.0; + gint _tmp68_ = 0; + Page* _tmp69_ = NULL; + gint _tmp70_ = 0; + gint _tmp71_ = 0; + gint depth = 0; + gchar* color_space = NULL; + gchar* _tmp72_ = NULL; + gchar* filter = NULL; + gchar* width_buffer = NULL; + gchar* _tmp73_ = NULL; + gint width_buffer_length1 = 0; + gint _width_buffer_size_ = 0; + gchar* height_buffer = NULL; + gchar* _tmp74_ = NULL; + gint height_buffer_length1 = 0; + gint _height_buffer_size_ = 0; guint8* data = NULL; gint data_length1 = 0; gint _data_size_ = 0; - Page* _tmp70_; - gboolean _tmp71_ = FALSE; - guint8* _tmp227_; - gint _tmp227__length1; - gint _tmp228_ = 0; - guint8* _tmp229_ = NULL; - guint8* compressed_data; - gint compressed_data_length1; - gint _compressed_data_size_; - guint8* _tmp230_; - gint _tmp230__length1; - PDFWriter* _tmp247_; - PDFWriter* _tmp248_; - guint _tmp249_ = 0U; - guint number; - PDFWriter* _tmp250_; - guint _tmp251_; - gchar* _tmp252_ = NULL; - gchar* _tmp253_; - PDFWriter* _tmp254_; - PDFWriter* _tmp255_; - PDFWriter* _tmp256_; - guint _tmp257_; - gchar* _tmp258_ = NULL; - gchar* _tmp259_; - PDFWriter* _tmp260_; - gint _tmp261_; - guint _tmp262_; - gchar* _tmp263_ = NULL; - gchar* _tmp264_; - PDFWriter* _tmp265_; - gdouble _tmp266_; - gchar* _tmp267_; - gint _tmp267__length1; - const gchar* _tmp268_ = NULL; - gdouble _tmp269_; - gchar* _tmp270_; - gint _tmp270__length1; - const gchar* _tmp271_ = NULL; + Page* _tmp75_ = NULL; + gboolean _tmp76_ = FALSE; + gboolean _tmp77_ = FALSE; + guint8* compressed_data = NULL; + guint8* _tmp235_ = NULL; + gint _tmp235__length1 = 0; + gint _tmp236_ = 0; + guint8* _tmp237_ = NULL; + gint compressed_data_length1 = 0; + gint _compressed_data_size_ = 0; + guint8* _tmp238_ = NULL; + gint _tmp238__length1 = 0; + PDFWriter* _tmp256_ = NULL; + guint number = 0U; + PDFWriter* _tmp257_ = NULL; + guint _tmp258_ = 0U; + PDFWriter* _tmp259_ = NULL; + guint _tmp260_ = 0U; + gchar* _tmp261_ = NULL; + gchar* _tmp262_ = NULL; + PDFWriter* _tmp263_ = NULL; + PDFWriter* _tmp264_ = NULL; + PDFWriter* _tmp265_ = NULL; + guint _tmp266_ = 0U; + gchar* _tmp267_ = NULL; + gchar* _tmp268_ = NULL; + PDFWriter* _tmp269_ = NULL; + gint _tmp270_ = 0; + guint _tmp271_ = 0U; gchar* _tmp272_ = NULL; - gchar* _tmp273_; - PDFWriter* _tmp274_; - guint _tmp275_; + gchar* _tmp273_ = NULL; + PDFWriter* _tmp274_ = NULL; + gdouble _tmp275_ = 0.0; gchar* _tmp276_ = NULL; - gchar* _tmp277_; - PDFWriter* _tmp278_; - PDFWriter* _tmp279_; - PDFWriter* _tmp280_; - PDFWriter* _tmp281_; - guint _tmp282_ = 0U; - PDFWriter* _tmp283_; - guint _tmp284_; + gint _tmp276__length1 = 0; + const gchar* _tmp277_ = NULL; + gdouble _tmp278_ = 0.0; + gchar* _tmp279_ = NULL; + gint _tmp279__length1 = 0; + const gchar* _tmp280_ = NULL; + gchar* _tmp281_ = NULL; + gchar* _tmp282_ = NULL; + PDFWriter* _tmp283_ = NULL; + guint _tmp284_ = 0U; gchar* _tmp285_ = NULL; - gchar* _tmp286_; - PDFWriter* _tmp287_; - PDFWriter* _tmp288_; - PDFWriter* _tmp289_; - PDFWriter* _tmp290_; - gint _tmp291_; - gchar* _tmp292_ = NULL; - gchar* _tmp293_; - PDFWriter* _tmp294_; - gint _tmp295_; - gchar* _tmp296_ = NULL; - gchar* _tmp297_; - PDFWriter* _tmp298_; - const gchar* _tmp299_; - gchar* _tmp300_ = NULL; - gchar* _tmp301_; - PDFWriter* _tmp302_; - gint _tmp303_; - gchar* _tmp304_ = NULL; - gchar* _tmp305_; - PDFWriter* _tmp306_; - guint8* _tmp307_; - gint _tmp307__length1; - gchar* _tmp308_ = NULL; - gchar* _tmp309_; - const gchar* _tmp310_; - PDFWriter* _tmp315_; - PDFWriter* _tmp316_; - PDFWriter* _tmp317_; - guint8* _tmp318_; - gint _tmp318__length1; - PDFWriter* _tmp319_; - PDFWriter* _tmp320_; - PDFWriter* _tmp321_; - gdouble _tmp322_; - gchar* _tmp323_; - gint _tmp323__length1; - const gchar* _tmp324_ = NULL; - gdouble _tmp325_; - gchar* _tmp326_; - gint _tmp326__length1; - const gchar* _tmp327_ = NULL; - gint _tmp328_; - gchar* _tmp329_ = NULL; - gchar* command; - PDFWriter* _tmp330_; - PDFWriter* _tmp331_; - guint _tmp332_ = 0U; - PDFWriter* _tmp333_; - guint _tmp334_; + gchar* _tmp286_ = NULL; + PDFWriter* _tmp287_ = NULL; + PDFWriter* _tmp288_ = NULL; + PDFWriter* _tmp289_ = NULL; + PDFWriter* _tmp290_ = NULL; + guint _tmp291_ = 0U; + PDFWriter* _tmp292_ = NULL; + guint _tmp293_ = 0U; + gchar* _tmp294_ = NULL; + gchar* _tmp295_ = NULL; + PDFWriter* _tmp296_ = NULL; + PDFWriter* _tmp297_ = NULL; + PDFWriter* _tmp298_ = NULL; + PDFWriter* _tmp299_ = NULL; + gint _tmp300_ = 0; + gchar* _tmp301_ = NULL; + gchar* _tmp302_ = NULL; + PDFWriter* _tmp303_ = NULL; + gint _tmp304_ = 0; + gchar* _tmp305_ = NULL; + gchar* _tmp306_ = NULL; + PDFWriter* _tmp307_ = NULL; + const gchar* _tmp308_ = NULL; + gchar* _tmp309_ = NULL; + gchar* _tmp310_ = NULL; + PDFWriter* _tmp311_ = NULL; + gint _tmp312_ = 0; + gchar* _tmp313_ = NULL; + gchar* _tmp314_ = NULL; + PDFWriter* _tmp315_ = NULL; + guint8* _tmp316_ = NULL; + gint _tmp316__length1 = 0; + gchar* _tmp317_ = NULL; + gchar* _tmp318_ = NULL; + const gchar* _tmp319_ = NULL; + PDFWriter* _tmp324_ = NULL; + PDFWriter* _tmp325_ = NULL; + PDFWriter* _tmp326_ = NULL; + guint8* _tmp327_ = NULL; + gint _tmp327__length1 = 0; + PDFWriter* _tmp328_ = NULL; + PDFWriter* _tmp329_ = NULL; + PDFWriter* _tmp330_ = NULL; + gchar* command = NULL; + gdouble _tmp331_ = 0.0; + gchar* _tmp332_ = NULL; + gint _tmp332__length1 = 0; + const gchar* _tmp333_ = NULL; + gdouble _tmp334_ = 0.0; gchar* _tmp335_ = NULL; - gchar* _tmp336_; - PDFWriter* _tmp337_; - PDFWriter* _tmp338_; - const gchar* _tmp339_; - gint _tmp340_; - gint _tmp341_; - gchar* _tmp342_ = NULL; - gchar* _tmp343_; - PDFWriter* _tmp344_; - PDFWriter* _tmp345_; - PDFWriter* _tmp346_; - const gchar* _tmp347_; - PDFWriter* _tmp348_; - PDFWriter* _tmp349_; - PDFWriter* _tmp350_; - gint _tmp351_; -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp47_ = _tmp46_; -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!_tmp47_) { -#line 2141 "book.c" - gint _tmp48_; -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp48_ = i; -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - i = _tmp48_ + 1; -#line 2147 "book.c" - } -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp46_ = FALSE; -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp49_ = i; -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp50_ = book_get_n_pages (self); -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!(((guint) _tmp49_) < _tmp50_)) { -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - break; -#line 2159 "book.c" + gint _tmp335__length1 = 0; + const gchar* _tmp336_ = NULL; + gint _tmp337_ = 0; + gchar* _tmp338_ = NULL; + PDFWriter* _tmp339_ = NULL; + PDFWriter* _tmp340_ = NULL; + guint _tmp341_ = 0U; + PDFWriter* _tmp342_ = NULL; + guint _tmp343_ = 0U; + gchar* _tmp344_ = NULL; + gchar* _tmp345_ = NULL; + PDFWriter* _tmp346_ = NULL; + PDFWriter* _tmp347_ = NULL; + const gchar* _tmp348_ = NULL; + gint _tmp349_ = 0; + gint _tmp350_ = 0; + gchar* _tmp351_ = NULL; + gchar* _tmp352_ = NULL; + PDFWriter* _tmp353_ = NULL; + PDFWriter* _tmp354_ = NULL; + PDFWriter* _tmp355_ = NULL; + const gchar* _tmp356_ = NULL; + PDFWriter* _tmp357_ = NULL; + PDFWriter* _tmp358_ = NULL; + PDFWriter* _tmp359_ = NULL; + gint _tmp360_ = 0; +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp49_ = _tmp48_; +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!_tmp49_) { +#line 2133 "book.c" + gint _tmp50_ = 0; +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp50_ = i; +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + i = _tmp50_ + 1; +#line 2139 "book.c" } -#line 260 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp48_ = FALSE; +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp51_ = i; -#line 260 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp52_ = book_get_page (self, _tmp51_); -#line 260 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - page = _tmp52_; -#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp53_ = page; -#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp54_ = page_get_image (_tmp53_, TRUE); -#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - image = _tmp54_; -#line 262 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp55_ = image; -#line 262 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp56_ = gdk_pixbuf_get_width (_tmp55_); -#line 262 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - width = _tmp56_; #line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp57_ = image; + _tmp52_ = book_get_n_pages (self); #line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp58_ = gdk_pixbuf_get_height (_tmp57_); + _tmp53_ = _tmp52_; #line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - height = _tmp58_; -#line 264 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp59_ = image; -#line 264 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp60_ = gdk_pixbuf_get_pixels (_tmp59_); -#line 264 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pixels = _tmp60_; -#line 264 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pixels_length1 = -1; -#line 264 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _pixels_size_ = pixels_length1; -#line 265 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp61_ = width; + if (!(((guint) _tmp51_) < _tmp53_)) { +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + break; +#line 2153 "book.c" + } #line 265 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp62_ = page; + _tmp54_ = i; #line 265 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp63_ = page_get_dpi (_tmp62_); + _tmp55_ = book_get_page (self, _tmp54_); #line 265 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - page_width = (_tmp61_ * 72.0) / _tmp63_; -#line 266 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp64_ = height; + page = _tmp55_; #line 266 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp65_ = page; + _tmp56_ = page; #line 266 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp66_ = page_get_dpi (_tmp65_); + _tmp57_ = page_get_image (_tmp56_, TRUE); #line 266 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - page_height = (_tmp64_ * 72.0) / _tmp66_; + image = _tmp57_; +#line 267 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp58_ = image; +#line 267 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp59_ = gdk_pixbuf_get_width (_tmp58_); +#line 267 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + width = _tmp59_; #line 268 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - depth = 8; + _tmp60_ = image; +#line 268 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp61_ = gdk_pixbuf_get_height (_tmp60_); +#line 268 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + height = _tmp61_; +#line 269 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp62_ = image; #line 269 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp67_ = g_strdup ("DeviceRGB"); + _tmp63_ = gdk_pixbuf_get_pixels (_tmp62_); #line 269 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - color_space = _tmp67_; + pixels = _tmp63_; +#line 269 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pixels_length1 = -1; +#line 269 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _pixels_size_ = pixels_length1; #line 270 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - filter = NULL; + _tmp64_ = width; +#line 270 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp65_ = page; +#line 270 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp66_ = page_get_dpi (_tmp65_); +#line 270 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp67_ = _tmp66_; +#line 270 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + page_width = (_tmp64_ * 72.0) / _tmp67_; #line 271 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp68_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE); + _tmp68_ = height; #line 271 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - width_buffer = _tmp68_; + _tmp69_ = page; #line 271 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - width_buffer_length1 = G_ASCII_DTOSTR_BUF_SIZE; + _tmp70_ = page_get_dpi (_tmp69_); #line 271 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _width_buffer_size_ = width_buffer_length1; -#line 272 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp69_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE); -#line 272 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - height_buffer = _tmp69_; -#line 272 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - height_buffer_length1 = G_ASCII_DTOSTR_BUF_SIZE; -#line 272 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _height_buffer_size_ = height_buffer_length1; -#line 274 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp70_ = page; + _tmp71_ = _tmp70_; +#line 271 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + page_height = (_tmp68_ * 72.0) / _tmp71_; +#line 273 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + depth = 8; #line 274 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp71_ = page_is_color (_tmp70_); + _tmp72_ = g_strdup ("DeviceRGB"); #line 274 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp71_) { -#line 2241 "book.c" - gchar* _tmp72_; - gint _tmp73_; - gint _tmp74_; - gint data_length; - gint _tmp75_; - guint8* _tmp76_ = NULL; + color_space = _tmp72_; +#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + filter = NULL; #line 276 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - depth = 8; + _tmp73_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE); +#line 276 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + width_buffer = _tmp73_; +#line 276 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + width_buffer_length1 = G_ASCII_DTOSTR_BUF_SIZE; +#line 276 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _width_buffer_size_ = width_buffer_length1; #line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp72_ = g_strdup ("DeviceRGB"); + _tmp74_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE); #line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (color_space); + height_buffer = _tmp74_; #line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - color_space = _tmp72_; -#line 278 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp73_ = height; -#line 278 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp74_ = width; -#line 278 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data_length = (_tmp73_ * _tmp74_) * 3; -#line 279 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp75_ = data_length; -#line 279 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp76_ = g_new0 (guint8, _tmp75_); + height_buffer_length1 = G_ASCII_DTOSTR_BUF_SIZE; +#line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _height_buffer_size_ = height_buffer_length1; #line 279 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data = (g_free (data), NULL); + _tmp75_ = page; #line 279 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data = _tmp76_; + _tmp76_ = page_get_is_color (_tmp75_); #line 279 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data_length1 = _tmp75_; + _tmp77_ = _tmp76_; #line 279 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (_tmp77_) { +#line 2241 "book.c" + gchar* _tmp78_ = NULL; + gint data_length = 0; + gint _tmp79_ = 0; + gint _tmp80_ = 0; + gint _tmp81_ = 0; + guint8* _tmp82_ = NULL; +#line 281 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + depth = 8; +#line 282 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp78_ = g_strdup ("DeviceRGB"); +#line 282 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (color_space); +#line 282 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + color_space = _tmp78_; +#line 283 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp79_ = height; +#line 283 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp80_ = width; +#line 283 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + data_length = (_tmp79_ * _tmp80_) * 3; +#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp81_ = data_length; +#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp82_ = g_new0 (guint8, _tmp81_); +#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + data = (g_free (data), NULL); +#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + data = _tmp82_; +#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + data_length1 = _tmp81_; +#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _data_size_ = data_length1; #line 2274 "book.c" { - gint row; -#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gint row = 0; +#line 285 "/home/bob/bzr/simple-scan/trunk/src/book.vala" row = 0; #line 2279 "book.c" { - gboolean _tmp77_; -#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp77_ = TRUE; -#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gboolean _tmp83_ = FALSE; +#line 285 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp83_ = TRUE; +#line 285 "/home/bob/bzr/simple-scan/trunk/src/book.vala" while (TRUE) { #line 2286 "book.c" - gboolean _tmp78_; - gint _tmp80_; - gint _tmp81_; - gint _tmp82_; - GdkPixbuf* _tmp83_; - gint _tmp84_ = 0; - gint in_offset; - gint _tmp85_; - gint _tmp86_; - gint out_offset; -#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp78_ = _tmp77_; -#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!_tmp78_) { + gboolean _tmp84_ = FALSE; + gint _tmp86_ = 0; + gint _tmp87_ = 0; + gint in_offset = 0; + gint _tmp88_ = 0; + GdkPixbuf* _tmp89_ = NULL; + gint _tmp90_ = 0; + gint out_offset = 0; + gint _tmp91_ = 0; + gint _tmp92_ = 0; +#line 285 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp84_ = _tmp83_; +#line 285 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!_tmp84_) { #line 2301 "book.c" - gint _tmp79_; -#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp79_ = row; -#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - row = _tmp79_ + 1; + gint _tmp85_ = 0; +#line 285 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp85_ = row; +#line 285 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + row = _tmp85_ + 1; #line 2307 "book.c" } -#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp77_ = FALSE; -#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp80_ = row; -#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp81_ = height; -#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!(_tmp80_ < _tmp81_)) { -#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 285 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp83_ = FALSE; +#line 285 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp86_ = row; +#line 285 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp87_ = height; +#line 285 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!(_tmp86_ < _tmp87_)) { +#line 285 "/home/bob/bzr/simple-scan/trunk/src/book.vala" break; #line 2319 "book.c" } -#line 282 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp82_ = row; -#line 282 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp83_ = image; -#line 282 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp84_ = gdk_pixbuf_get_rowstride (_tmp83_); -#line 282 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - in_offset = _tmp82_ * _tmp84_; -#line 283 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp85_ = row; -#line 283 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp86_ = width; -#line 283 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - out_offset = (_tmp85_ * _tmp86_) * 3; +#line 287 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp88_ = row; +#line 287 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp89_ = image; +#line 287 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp90_ = gdk_pixbuf_get_rowstride (_tmp89_); +#line 287 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + in_offset = _tmp88_ * _tmp90_; +#line 288 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp91_ = row; +#line 288 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp92_ = width; +#line 288 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + out_offset = (_tmp91_ * _tmp92_) * 3; #line 2335 "book.c" { - gint x; -#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gint x = 0; +#line 289 "/home/bob/bzr/simple-scan/trunk/src/book.vala" x = 0; #line 2340 "book.c" { - gboolean _tmp87_; -#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp87_ = TRUE; -#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gboolean _tmp93_ = FALSE; +#line 289 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp93_ = TRUE; +#line 289 "/home/bob/bzr/simple-scan/trunk/src/book.vala" while (TRUE) { #line 2347 "book.c" - gboolean _tmp88_; - gint _tmp90_; - gint _tmp91_; - gint _tmp92_; - gint _tmp93_; - gint in_o; - gint _tmp94_; - gint _tmp95_; - gint out_o; - guint8* _tmp96_; - gint _tmp96__length1; - gint _tmp97_; - guint8* _tmp98_; - gint _tmp98__length1; - gint _tmp99_; - guint8 _tmp100_; - guint8 _tmp101_; - guint8* _tmp102_; - gint _tmp102__length1; - gint _tmp103_; - guint8* _tmp104_; - gint _tmp104__length1; - gint _tmp105_; - guint8 _tmp106_; - guint8 _tmp107_; - guint8* _tmp108_; - gint _tmp108__length1; - gint _tmp109_; - guint8* _tmp110_; - gint _tmp110__length1; - gint _tmp111_; - guint8 _tmp112_; - guint8 _tmp113_; -#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp88_ = _tmp87_; -#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!_tmp88_) { -#line 2385 "book.c" - gint _tmp89_; -#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp89_ = x; -#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - x = _tmp89_ + 1; -#line 2391 "book.c" - } -#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp87_ = FALSE; -#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp90_ = x; -#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp91_ = width; -#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!(_tmp90_ < _tmp91_)) { -#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - break; -#line 2403 "book.c" - } -#line 286 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp92_ = in_offset; -#line 286 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp93_ = x; -#line 286 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - in_o = _tmp92_ + (_tmp93_ * 3); -#line 287 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp94_ = out_offset; -#line 287 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp95_ = x; -#line 287 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - out_o = _tmp94_ + (_tmp95_ * 3); + gboolean _tmp94_ = FALSE; + gint _tmp96_ = 0; + gint _tmp97_ = 0; + gint in_o = 0; + gint _tmp98_ = 0; + gint _tmp99_ = 0; + gint out_o = 0; + gint _tmp100_ = 0; + gint _tmp101_ = 0; + guint8* _tmp102_ = NULL; + gint _tmp102__length1 = 0; + gint _tmp103_ = 0; + guint8* _tmp104_ = NULL; + gint _tmp104__length1 = 0; + gint _tmp105_ = 0; + guint8 _tmp106_ = 0U; + guint8 _tmp107_ = 0U; + guint8* _tmp108_ = NULL; + gint _tmp108__length1 = 0; + gint _tmp109_ = 0; + guint8* _tmp110_ = NULL; + gint _tmp110__length1 = 0; + gint _tmp111_ = 0; + guint8 _tmp112_ = 0U; + guint8 _tmp113_ = 0U; + guint8* _tmp114_ = NULL; + gint _tmp114__length1 = 0; + gint _tmp115_ = 0; + guint8* _tmp116_ = NULL; + gint _tmp116__length1 = 0; + gint _tmp117_ = 0; + guint8 _tmp118_ = 0U; + guint8 _tmp119_ = 0U; #line 289 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp96_ = data; + _tmp94_ = _tmp93_; #line 289 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp96__length1 = data_length1; + if (!_tmp94_) { +#line 2385 "book.c" + gint _tmp95_ = 0; #line 289 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp97_ = out_o; + _tmp95_ = x; #line 289 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp98_ = pixels; + x = _tmp95_ + 1; +#line 2391 "book.c" + } #line 289 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp98__length1 = pixels_length1; + _tmp93_ = FALSE; #line 289 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp99_ = in_o; + _tmp96_ = x; #line 289 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp100_ = _tmp98_[_tmp99_]; + _tmp97_ = width; #line 289 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp96_[_tmp97_] = _tmp100_; + if (!(_tmp96_ < _tmp97_)) { #line 289 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp101_ = _tmp96_[_tmp97_]; -#line 290 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + break; +#line 2403 "book.c" + } +#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp98_ = in_offset; +#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp99_ = x; +#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + in_o = _tmp98_ + (_tmp99_ * 3); +#line 292 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp100_ = out_offset; +#line 292 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp101_ = x; +#line 292 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + out_o = _tmp100_ + (_tmp101_ * 3); +#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp102_ = data; -#line 290 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp102__length1 = data_length1; -#line 290 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp103_ = out_o; -#line 290 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp104_ = pixels; -#line 290 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp104__length1 = pixels_length1; -#line 290 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp105_ = in_o; -#line 290 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp106_ = _tmp104_[_tmp105_ + 1]; -#line 290 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp102_[_tmp103_ + 1] = _tmp106_; -#line 290 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp107_ = _tmp102_[_tmp103_ + 1]; -#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp106_ = _tmp104_[_tmp105_]; +#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp102_[_tmp103_] = _tmp106_; +#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp107_ = _tmp102_[_tmp103_]; +#line 295 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp108_ = data; -#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 295 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp108__length1 = data_length1; -#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 295 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp109_ = out_o; -#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 295 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp110_ = pixels; -#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 295 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp110__length1 = pixels_length1; -#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 295 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp111_ = in_o; -#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp112_ = _tmp110_[_tmp111_ + 2]; -#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp108_[_tmp109_ + 2] = _tmp112_; -#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp113_ = _tmp108_[_tmp109_ + 2]; +#line 295 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp112_ = _tmp110_[_tmp111_ + 1]; +#line 295 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp108_[_tmp109_ + 1] = _tmp112_; +#line 295 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp113_ = _tmp108_[_tmp109_ + 1]; +#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp114_ = data; +#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp114__length1 = data_length1; +#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp115_ = out_o; +#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp116_ = pixels; +#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp116__length1 = pixels_length1; +#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp117_ = in_o; +#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp118_ = _tmp116_[_tmp117_ + 2]; +#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp114_[_tmp115_ + 2] = _tmp118_; +#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp119_ = _tmp114_[_tmp115_ + 2]; #line 2471 "book.c" } } @@ -2475,298 +2475,301 @@ static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error } } } else { - Page* _tmp114_; - gint _tmp115_ = 0; -#line 295 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp114_ = page; -#line 295 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp115_ = page_get_depth (_tmp114_); -#line 295 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp115_ == 2) { -#line 2487 "book.c" - gint shift_count; - gchar* _tmp116_; - gint _tmp117_; - gint _tmp118_; - gint data_length; - gint _tmp119_; - guint8* _tmp120_ = NULL; - gint offset; -#line 297 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - shift_count = 6; -#line 298 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - depth = 2; -#line 299 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp116_ = g_strdup ("DeviceGray"); -#line 299 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (color_space); -#line 299 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - color_space = _tmp116_; + Page* _tmp120_ = NULL; + gint _tmp121_ = 0; + gint _tmp122_ = 0; +#line 300 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp120_ = page; #line 300 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp117_ = height; + _tmp121_ = page_get_depth (_tmp120_); #line 300 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp118_ = width; + _tmp122_ = _tmp121_; #line 300 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data_length = _tmp117_ * (((_tmp118_ * 2) + 7) / 8); -#line 301 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp119_ = data_length; -#line 301 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp120_ = g_new0 (guint8, _tmp119_); -#line 301 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (_tmp122_ == 2) { +#line 2490 "book.c" + gint shift_count = 0; + gchar* _tmp123_ = NULL; + gint data_length = 0; + gint _tmp124_ = 0; + gint _tmp125_ = 0; + gint _tmp126_ = 0; + guint8* _tmp127_ = NULL; + gint offset = 0; +#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + shift_count = 6; +#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + depth = 2; +#line 304 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp123_ = g_strdup ("DeviceGray"); +#line 304 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (color_space); +#line 304 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + color_space = _tmp123_; +#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp124_ = height; +#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp125_ = width; +#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + data_length = _tmp124_ * (((_tmp125_ * 2) + 7) / 8); +#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp126_ = data_length; +#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp127_ = g_new0 (guint8, _tmp126_); +#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala" data = (g_free (data), NULL); -#line 301 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data = _tmp120_; -#line 301 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data_length1 = _tmp119_; -#line 301 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + data = _tmp127_; +#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + data_length1 = _tmp126_; +#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _data_size_ = data_length1; -#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala" offset = 0; -#line 2526 "book.c" +#line 2529 "book.c" { - gint row; -#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gint row = 0; +#line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala" row = 0; -#line 2531 "book.c" +#line 2534 "book.c" { - gboolean _tmp121_; -#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp121_ = TRUE; -#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gboolean _tmp128_ = FALSE; +#line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp128_ = TRUE; +#line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala" while (TRUE) { -#line 2538 "book.c" - gboolean _tmp122_; - gint _tmp124_; - gint _tmp125_; - gint _tmp126_; - gint _tmp128_; - GdkPixbuf* _tmp129_; - gint _tmp130_ = 0; - gint in_offset; -#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp122_ = _tmp121_; -#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!_tmp122_) { -#line 2551 "book.c" - gint _tmp123_; -#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp123_ = row; -#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - row = _tmp123_ + 1; -#line 2557 "book.c" - } -#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp121_ = FALSE; -#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp124_ = row; -#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp125_ = height; -#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!(_tmp124_ < _tmp125_)) { -#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - break; -#line 2569 "book.c" +#line 2541 "book.c" + gboolean _tmp129_ = FALSE; + gint _tmp131_ = 0; + gint _tmp132_ = 0; + gint _tmp133_ = 0; + gint in_offset = 0; + gint _tmp135_ = 0; + GdkPixbuf* _tmp136_ = NULL; + gint _tmp137_ = 0; +#line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp129_ = _tmp128_; +#line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!_tmp129_) { +#line 2554 "book.c" + gint _tmp130_ = 0; +#line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp130_ = row; +#line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + row = _tmp130_ + 1; +#line 2560 "book.c" } -#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp126_ = shift_count; -#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp126_ != 6) { -#line 2575 "book.c" - gint _tmp127_; #line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp127_ = offset; + _tmp128_ = FALSE; +#line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp131_ = row; #line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - offset = _tmp127_ + 1; -#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp132_ = height; +#line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!(_tmp131_ < _tmp132_)) { +#line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + break; +#line 2572 "book.c" + } +#line 311 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp133_ = shift_count; +#line 311 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (_tmp133_ != 6) { +#line 2578 "book.c" + gint _tmp134_ = 0; +#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp134_ = offset; +#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + offset = _tmp134_ + 1; +#line 314 "/home/bob/bzr/simple-scan/trunk/src/book.vala" shift_count = 6; -#line 2583 "book.c" +#line 2586 "book.c" } -#line 312 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp128_ = row; -#line 312 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp129_ = image; -#line 312 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp130_ = gdk_pixbuf_get_rowstride (_tmp129_); -#line 312 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - in_offset = _tmp128_ * _tmp130_; -#line 2593 "book.c" +#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp135_ = row; +#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp136_ = image; +#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp137_ = gdk_pixbuf_get_rowstride (_tmp136_); +#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + in_offset = _tmp135_ * _tmp137_; +#line 2596 "book.c" { - gint x; -#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gint x = 0; +#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala" x = 0; -#line 2598 "book.c" +#line 2601 "book.c" { - gboolean _tmp131_; -#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp131_ = TRUE; -#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gboolean _tmp138_ = FALSE; +#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp138_ = TRUE; +#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala" while (TRUE) { -#line 2605 "book.c" - gboolean _tmp132_; - gint _tmp134_; - gint _tmp135_; - gint _tmp136_; - guint8* _tmp140_; - gint _tmp140__length1; - gint _tmp141_; - gint _tmp142_; - guint8 _tmp143_; - guint8 p; - guint8 _tmp144_; - gint _tmp159_; -#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp132_ = _tmp131_; -#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!_tmp132_) { -#line 2622 "book.c" - gint _tmp133_; -#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp133_ = x; -#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - x = _tmp133_ + 1; -#line 2628 "book.c" +#line 2608 "book.c" + gboolean _tmp139_ = FALSE; + gint _tmp141_ = 0; + gint _tmp142_ = 0; + gint _tmp143_ = 0; + guint8 p = 0U; + guint8* _tmp147_ = NULL; + gint _tmp147__length1 = 0; + gint _tmp148_ = 0; + gint _tmp149_ = 0; + guint8 _tmp150_ = 0U; + guint8 _tmp151_ = 0U; + gint _tmp166_ = 0; +#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp139_ = _tmp138_; +#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!_tmp139_) { +#line 2625 "book.c" + gint _tmp140_ = 0; +#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp140_ = x; +#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + x = _tmp140_ + 1; +#line 2631 "book.c" } -#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp131_ = FALSE; -#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp134_ = x; -#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp135_ = width; -#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!(_tmp134_ < _tmp135_)) { -#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp138_ = FALSE; +#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp141_ = x; +#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp142_ = width; +#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!(_tmp141_ < _tmp142_)) { +#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala" break; -#line 2640 "book.c" - } -#line 316 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp136_ = shift_count; -#line 316 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp136_ == 6) { -#line 2646 "book.c" - guint8* _tmp137_; - gint _tmp137__length1; - gint _tmp138_; - guint8 _tmp139_; -#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp137_ = data; -#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp137__length1 = data_length1; -#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp138_ = offset; -#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp137_[_tmp138_] = (guint8) 0; -#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp139_ = _tmp137_[_tmp138_]; -#line 2661 "book.c" +#line 2643 "book.c" } -#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp140_ = pixels; -#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp140__length1 = pixels_length1; -#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp141_ = in_offset; -#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp142_ = x; -#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp143_ = _tmp140_[_tmp141_ + (_tmp142_ * 3)]; -#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - p = _tmp143_; #line 321 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp144_ = p; + _tmp143_ = shift_count; #line 321 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (((gint) _tmp144_) >= 192) { -#line 2679 "book.c" - guint8* _tmp145_; - gint _tmp145__length1; - gint _tmp146_; - gint _tmp147_; - guint8 _tmp148_; -#line 322 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp145_ = data; + if (_tmp143_ == 6) { +#line 2649 "book.c" + guint8* _tmp144_ = NULL; + gint _tmp144__length1 = 0; + gint _tmp145_ = 0; + guint8 _tmp146_ = 0U; #line 322 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp145__length1 = data_length1; + _tmp144_ = data; #line 322 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp146_ = offset; + _tmp144__length1 = data_length1; #line 322 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp147_ = shift_count; + _tmp145_ = offset; #line 322 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp145_[_tmp146_] |= (guint8) (3 << _tmp147_); + _tmp144_[_tmp145_] = (guint8) 0; #line 322 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp148_ = _tmp145_[_tmp146_]; -#line 2697 "book.c" - } else { - guint8 _tmp149_; -#line 323 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp149_ = p; -#line 323 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (((gint) _tmp149_) >= 128) { -#line 2704 "book.c" - guint8* _tmp150_; - gint _tmp150__length1; - gint _tmp151_; - gint _tmp152_; - guint8 _tmp153_; -#line 324 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp150_ = data; -#line 324 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp150__length1 = data_length1; -#line 324 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp151_ = offset; -#line 324 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp152_ = shift_count; -#line 324 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp150_[_tmp151_] |= (guint8) (2 << _tmp152_); -#line 324 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp153_ = _tmp150_[_tmp151_]; -#line 2722 "book.c" - } else { - guint8 _tmp154_; + _tmp146_ = _tmp144_[_tmp145_]; +#line 2664 "book.c" + } #line 325 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp154_ = p; + _tmp147_ = pixels; #line 325 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (((gint) _tmp154_) >= 64) { -#line 2729 "book.c" - guint8* _tmp155_; - gint _tmp155__length1; - gint _tmp156_; - gint _tmp157_; - guint8 _tmp158_; -#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp155_ = data; -#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp155__length1 = data_length1; -#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp156_ = offset; -#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp157_ = shift_count; + _tmp147__length1 = pixels_length1; +#line 325 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp148_ = in_offset; +#line 325 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp149_ = x; +#line 325 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp150_ = _tmp147_[_tmp148_ + (_tmp149_ * 3)]; +#line 325 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + p = _tmp150_; #line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp155_[_tmp156_] |= (guint8) (1 << _tmp157_); + _tmp151_ = p; #line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp158_ = _tmp155_[_tmp156_]; -#line 2747 "book.c" - } - } - } + if (((gint) _tmp151_) >= 192) { +#line 2682 "book.c" + guint8* _tmp152_ = NULL; + gint _tmp152__length1 = 0; + gint _tmp153_ = 0; + gint _tmp154_ = 0; + guint8 _tmp155_ = 0U; +#line 327 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp152_ = data; +#line 327 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp152__length1 = data_length1; +#line 327 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp153_ = offset; +#line 327 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp154_ = shift_count; +#line 327 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp152_[_tmp153_] |= (guint8) (3 << _tmp154_); +#line 327 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp155_ = _tmp152_[_tmp153_]; +#line 2700 "book.c" + } else { + guint8 _tmp156_ = 0U; +#line 328 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp156_ = p; +#line 328 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (((gint) _tmp156_) >= 128) { +#line 2707 "book.c" + guint8* _tmp157_ = NULL; + gint _tmp157__length1 = 0; + gint _tmp158_ = 0; + gint _tmp159_ = 0; + guint8 _tmp160_ = 0U; +#line 329 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp157_ = data; +#line 329 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp157__length1 = data_length1; #line 329 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp159_ = shift_count; + _tmp158_ = offset; #line 329 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp159_ == 0) { -#line 2755 "book.c" - gint _tmp160_; + _tmp159_ = shift_count; +#line 329 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp157_[_tmp158_] |= (guint8) (2 << _tmp159_); +#line 329 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp160_ = _tmp157_[_tmp158_]; +#line 2725 "book.c" + } else { + guint8 _tmp161_ = 0U; +#line 330 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp161_ = p; +#line 330 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (((gint) _tmp161_) >= 64) { +#line 2732 "book.c" + guint8* _tmp162_ = NULL; + gint _tmp162__length1 = 0; + gint _tmp163_ = 0; + gint _tmp164_ = 0; + guint8 _tmp165_ = 0U; +#line 331 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp162_ = data; +#line 331 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp162__length1 = data_length1; +#line 331 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp163_ = offset; #line 331 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp160_ = offset; + _tmp164_ = shift_count; #line 331 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - offset = _tmp160_ + 1; -#line 332 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp162_[_tmp163_] |= (guint8) (1 << _tmp164_); +#line 331 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp165_ = _tmp162_[_tmp163_]; +#line 2750 "book.c" + } + } + } +#line 334 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp166_ = shift_count; +#line 334 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (_tmp166_ == 0) { +#line 2758 "book.c" + gint _tmp167_ = 0; +#line 336 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp167_ = offset; +#line 336 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + offset = _tmp167_ + 1; +#line 337 "/home/bob/bzr/simple-scan/trunk/src/book.vala" shift_count = 6; -#line 2763 "book.c" +#line 2766 "book.c" } else { - gint _tmp161_; -#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp161_ = shift_count; -#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - shift_count = _tmp161_ - 2; -#line 2770 "book.c" + gint _tmp168_ = 0; +#line 340 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp168_ = shift_count; +#line 340 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + shift_count = _tmp168_ - 2; +#line 2773 "book.c" } } } @@ -2775,238 +2778,241 @@ static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error } } } else { - Page* _tmp162_; - gint _tmp163_ = 0; -#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp162_ = page; -#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp163_ = page_get_depth (_tmp162_); -#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp163_ == 1) { -#line 2787 "book.c" - gint mask; - gchar* _tmp164_; - gint _tmp165_; - gint _tmp166_; - gint data_length; - gint _tmp167_; - guint8* _tmp168_ = NULL; - gint offset; -#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - mask = 0x80; -#line 343 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - depth = 1; + Page* _tmp169_ = NULL; + gint _tmp170_ = 0; + gint _tmp171_ = 0; #line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp164_ = g_strdup ("DeviceGray"); + _tmp169_ = page; #line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (color_space); + _tmp170_ = page_get_depth (_tmp169_); #line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - color_space = _tmp164_; -#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp165_ = height; -#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp166_ = width; -#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data_length = _tmp165_ * ((_tmp166_ + 7) / 8); -#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp167_ = data_length; -#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp168_ = g_new0 (guint8, _tmp167_); + _tmp171_ = _tmp170_; +#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (_tmp171_ == 1) { +#line 2793 "book.c" + gint mask = 0; + gchar* _tmp172_ = NULL; + gint data_length = 0; + gint _tmp173_ = 0; + gint _tmp174_ = 0; + gint _tmp175_ = 0; + guint8* _tmp176_ = NULL; + gint offset = 0; #line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + mask = 0x80; +#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + depth = 1; +#line 349 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp172_ = g_strdup ("DeviceGray"); +#line 349 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (color_space); +#line 349 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + color_space = _tmp172_; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp173_ = height; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp174_ = width; +#line 350 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + data_length = _tmp173_ * ((_tmp174_ + 7) / 8); +#line 351 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp175_ = data_length; +#line 351 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp176_ = g_new0 (guint8, _tmp175_); +#line 351 "/home/bob/bzr/simple-scan/trunk/src/book.vala" data = (g_free (data), NULL); -#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data = _tmp168_; -#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data_length1 = _tmp167_; -#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 351 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + data = _tmp176_; +#line 351 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + data_length1 = _tmp175_; +#line 351 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _data_size_ = data_length1; -#line 347 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 352 "/home/bob/bzr/simple-scan/trunk/src/book.vala" offset = 0; -#line 2826 "book.c" +#line 2832 "book.c" { - gint row; -#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gint row = 0; +#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala" row = 0; -#line 2831 "book.c" +#line 2837 "book.c" { - gboolean _tmp169_; -#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp169_ = TRUE; -#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gboolean _tmp177_ = FALSE; +#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp177_ = TRUE; +#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala" while (TRUE) { -#line 2838 "book.c" - gboolean _tmp170_; - gint _tmp172_; - gint _tmp173_; - gint _tmp174_; - gint _tmp176_; - GdkPixbuf* _tmp177_; - gint _tmp178_ = 0; - gint in_offset; -#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp170_ = _tmp169_; -#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!_tmp170_) { -#line 2851 "book.c" - gint _tmp171_; -#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp171_ = row; -#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - row = _tmp171_ + 1; +#line 2844 "book.c" + gboolean _tmp178_ = FALSE; + gint _tmp180_ = 0; + gint _tmp181_ = 0; + gint _tmp182_ = 0; + gint in_offset = 0; + gint _tmp184_ = 0; + GdkPixbuf* _tmp185_ = NULL; + gint _tmp186_ = 0; +#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp178_ = _tmp177_; +#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!_tmp178_) { #line 2857 "book.c" + gint _tmp179_ = 0; +#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp179_ = row; +#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + row = _tmp179_ + 1; +#line 2863 "book.c" } -#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp169_ = FALSE; -#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp172_ = row; -#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp173_ = height; -#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!(_tmp172_ < _tmp173_)) { -#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - break; -#line 2869 "book.c" - } -#line 351 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp174_ = mask; -#line 351 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp174_ != 0x80) { -#line 2875 "book.c" - gint _tmp175_; #line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp175_ = offset; + _tmp177_ = FALSE; +#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp180_ = row; +#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp181_ = height; #line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - offset = _tmp175_ + 1; -#line 354 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!(_tmp180_ < _tmp181_)) { +#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + break; +#line 2875 "book.c" + } +#line 356 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp182_ = mask; +#line 356 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (_tmp182_ != 0x80) { +#line 2881 "book.c" + gint _tmp183_ = 0; +#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp183_ = offset; +#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + offset = _tmp183_ + 1; +#line 359 "/home/bob/bzr/simple-scan/trunk/src/book.vala" mask = 0x80; -#line 2883 "book.c" +#line 2889 "book.c" } -#line 357 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp176_ = row; -#line 357 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp177_ = image; -#line 357 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp178_ = gdk_pixbuf_get_rowstride (_tmp177_); -#line 357 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - in_offset = _tmp176_ * _tmp178_; -#line 2893 "book.c" +#line 362 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp184_ = row; +#line 362 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp185_ = image; +#line 362 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp186_ = gdk_pixbuf_get_rowstride (_tmp185_); +#line 362 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + in_offset = _tmp184_ * _tmp186_; +#line 2899 "book.c" { - gint x; -#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gint x = 0; +#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala" x = 0; -#line 2898 "book.c" +#line 2904 "book.c" { - gboolean _tmp179_; -#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp179_ = TRUE; -#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gboolean _tmp187_ = FALSE; +#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp187_ = TRUE; +#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala" while (TRUE) { -#line 2905 "book.c" - gboolean _tmp180_; - gint _tmp182_; - gint _tmp183_; - gint _tmp184_; - guint8* _tmp188_; - gint _tmp188__length1; - gint _tmp189_; - gint _tmp190_; - guint8 _tmp191_; - gint _tmp196_; - gint _tmp197_; -#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp180_ = _tmp179_; -#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!_tmp180_) { -#line 2921 "book.c" - gint _tmp181_; -#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp181_ = x; -#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - x = _tmp181_ + 1; +#line 2911 "book.c" + gboolean _tmp188_ = FALSE; + gint _tmp190_ = 0; + gint _tmp191_ = 0; + gint _tmp192_ = 0; + guint8* _tmp196_ = NULL; + gint _tmp196__length1 = 0; + gint _tmp197_ = 0; + gint _tmp198_ = 0; + guint8 _tmp199_ = 0U; + gint _tmp204_ = 0; + gint _tmp205_ = 0; +#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp188_ = _tmp187_; +#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!_tmp188_) { #line 2927 "book.c" + gint _tmp189_ = 0; +#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp189_ = x; +#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + x = _tmp189_ + 1; +#line 2933 "book.c" } -#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp179_ = FALSE; -#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp182_ = x; -#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp183_ = width; -#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!(_tmp182_ < _tmp183_)) { -#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp187_ = FALSE; +#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp190_ = x; +#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp191_ = width; +#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!(_tmp190_ < _tmp191_)) { +#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala" break; -#line 2939 "book.c" - } -#line 361 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp184_ = mask; -#line 361 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp184_ == 0x80) { #line 2945 "book.c" - guint8* _tmp185_; - gint _tmp185__length1; - gint _tmp186_; - guint8 _tmp187_; -#line 362 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp185_ = data; -#line 362 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp185__length1 = data_length1; -#line 362 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp186_ = offset; -#line 362 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp185_[_tmp186_] = (guint8) 0; -#line 362 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp187_ = _tmp185_[_tmp186_]; -#line 2960 "book.c" } -#line 365 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp188_ = pixels; -#line 365 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp188__length1 = pixels_length1; -#line 365 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp189_ = in_offset; -#line 365 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp190_ = x; -#line 365 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp191_ = _tmp188_[_tmp189_ + (_tmp190_ * 3)]; -#line 365 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (((gint) _tmp191_) != 0) { -#line 2974 "book.c" - guint8* _tmp192_; - gint _tmp192__length1; - gint _tmp193_; - gint _tmp194_; - guint8 _tmp195_; -#line 366 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp192_ = data; -#line 366 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp192__length1 = data_length1; #line 366 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp193_ = offset; + _tmp192_ = mask; #line 366 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp194_ = mask; -#line 366 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp192_[_tmp193_] |= (guint8) _tmp194_; -#line 366 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp195_ = _tmp192_[_tmp193_]; -#line 2992 "book.c" + if (_tmp192_ == 0x80) { +#line 2951 "book.c" + guint8* _tmp193_ = NULL; + gint _tmp193__length1 = 0; + gint _tmp194_ = 0; + guint8 _tmp195_ = 0U; +#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp193_ = data; +#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp193__length1 = data_length1; +#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp194_ = offset; +#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp193_[_tmp194_] = (guint8) 0; +#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp195_ = _tmp193_[_tmp194_]; +#line 2966 "book.c" } -#line 369 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp196_ = mask; -#line 369 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - mask = _tmp196_ >> 1; #line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp197_ = mask; + _tmp196_ = pixels; +#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp196__length1 = pixels_length1; +#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp197_ = in_offset; +#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp198_ = x; #line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp197_ == 0) { -#line 3002 "book.c" - gint _tmp198_; -#line 372 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp198_ = offset; -#line 372 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - offset = _tmp198_ + 1; -#line 373 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp199_ = _tmp196_[_tmp197_ + (_tmp198_ * 3)]; +#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (((gint) _tmp199_) != 0) { +#line 2980 "book.c" + guint8* _tmp200_ = NULL; + gint _tmp200__length1 = 0; + gint _tmp201_ = 0; + gint _tmp202_ = 0; + guint8 _tmp203_ = 0U; +#line 371 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp200_ = data; +#line 371 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp200__length1 = data_length1; +#line 371 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp201_ = offset; +#line 371 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp202_ = mask; +#line 371 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp200_[_tmp201_] |= (guint8) _tmp202_; +#line 371 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp203_ = _tmp200_[_tmp201_]; +#line 2998 "book.c" + } +#line 374 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp204_ = mask; +#line 374 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + mask = _tmp204_ >> 1; +#line 375 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp205_ = mask; +#line 375 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (_tmp205_ == 0) { +#line 3008 "book.c" + gint _tmp206_ = 0; +#line 377 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp206_ = offset; +#line 377 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + offset = _tmp206_ + 1; +#line 378 "/home/bob/bzr/simple-scan/trunk/src/book.vala" mask = 0x80; -#line 3010 "book.c" +#line 3016 "book.c" } } } @@ -3015,172 +3021,172 @@ static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error } } } else { - gchar* _tmp199_; - gint _tmp200_; - gint _tmp201_; - gint data_length; - gint _tmp202_; - guint8* _tmp203_ = NULL; -#line 380 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gchar* _tmp207_ = NULL; + gint data_length = 0; + gint _tmp208_ = 0; + gint _tmp209_ = 0; + gint _tmp210_ = 0; + guint8* _tmp211_ = NULL; +#line 385 "/home/bob/bzr/simple-scan/trunk/src/book.vala" depth = 8; -#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp199_ = g_strdup ("DeviceGray"); -#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (color_space); -#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - color_space = _tmp199_; -#line 382 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp200_ = height; -#line 382 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp201_ = width; -#line 382 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data_length = _tmp200_ * _tmp201_; -#line 383 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp202_ = data_length; -#line 383 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp203_ = g_new0 (guint8, _tmp202_); -#line 383 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data = (g_free (data), NULL); -#line 383 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data = _tmp203_; -#line 383 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data_length1 = _tmp202_; -#line 383 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _data_size_ = data_length1; -#line 3051 "book.c" - { - gint row; -#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - row = 0; -#line 3056 "book.c" - { - gboolean _tmp204_; -#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp204_ = TRUE; -#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - while (TRUE) { -#line 3063 "book.c" - gboolean _tmp205_; - gint _tmp207_; - gint _tmp208_; - gint _tmp209_; - GdkPixbuf* _tmp210_; - gint _tmp211_ = 0; - gint in_offset; - gint _tmp212_; - gint _tmp213_; - gint out_offset; -#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp205_ = _tmp204_; -#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!_tmp205_) { -#line 3078 "book.c" - gint _tmp206_; -#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp206_ = row; -#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - row = _tmp206_ + 1; -#line 3084 "book.c" - } -#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp204_ = FALSE; -#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp207_ = row; -#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp208_ = height; -#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!(_tmp207_ < _tmp208_)) { -#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - break; -#line 3096 "book.c" - } -#line 386 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp209_ = row; #line 386 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp210_ = image; + _tmp207_ = g_strdup ("DeviceGray"); #line 386 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp211_ = gdk_pixbuf_get_rowstride (_tmp210_); + _g_free0 (color_space); #line 386 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - in_offset = _tmp209_ * _tmp211_; + color_space = _tmp207_; #line 387 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp212_ = row; + _tmp208_ = height; #line 387 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp213_ = width; + _tmp209_ = width; #line 387 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - out_offset = _tmp212_ * _tmp213_; -#line 3112 "book.c" - { - gint x; -#line 388 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - x = 0; -#line 3117 "book.c" - { - gboolean _tmp214_; -#line 388 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp214_ = TRUE; -#line 388 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - while (TRUE) { -#line 3124 "book.c" - gboolean _tmp215_; - gint _tmp217_; - gint _tmp218_; - guint8* _tmp219_; - gint _tmp219__length1; - gint _tmp220_; - gint _tmp221_; - guint8* _tmp222_; - gint _tmp222__length1; - gint _tmp223_; - gint _tmp224_; - guint8 _tmp225_; - guint8 _tmp226_; -#line 388 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp215_ = _tmp214_; + data_length = _tmp208_ * _tmp209_; #line 388 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!_tmp215_) { -#line 3142 "book.c" - gint _tmp216_; + _tmp210_ = data_length; #line 388 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp216_ = x; + _tmp211_ = g_new0 (guint8, _tmp210_); #line 388 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - x = _tmp216_ + 1; -#line 3148 "book.c" - } -#line 388 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp214_ = FALSE; -#line 388 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp217_ = x; + data = (g_free (data), NULL); #line 388 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp218_ = width; + data = _tmp211_; #line 388 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (!(_tmp217_ < _tmp218_)) { + data_length1 = _tmp210_; #line 388 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - break; -#line 3160 "book.c" - } + _data_size_ = data_length1; +#line 3057 "book.c" + { + gint row = 0; #line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp219_ = data; + row = 0; +#line 3062 "book.c" + { + gboolean _tmp212_ = FALSE; #line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp219__length1 = data_length1; + _tmp212_ = TRUE; #line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp220_ = out_offset; + while (TRUE) { +#line 3069 "book.c" + gboolean _tmp213_ = FALSE; + gint _tmp215_ = 0; + gint _tmp216_ = 0; + gint in_offset = 0; + gint _tmp217_ = 0; + GdkPixbuf* _tmp218_ = NULL; + gint _tmp219_ = 0; + gint out_offset = 0; + gint _tmp220_ = 0; + gint _tmp221_ = 0; #line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp221_ = x; + _tmp213_ = _tmp212_; #line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp222_ = pixels; + if (!_tmp213_) { +#line 3084 "book.c" + gint _tmp214_ = 0; +#line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp214_ = row; #line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp222__length1 = pixels_length1; + row = _tmp214_ + 1; +#line 3090 "book.c" + } #line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp223_ = in_offset; + _tmp212_ = FALSE; #line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp224_ = x; + _tmp215_ = row; #line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp225_ = _tmp222_[_tmp223_ + (_tmp224_ * 3)]; + _tmp216_ = height; #line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp219_[_tmp220_ + _tmp221_] = _tmp225_; + if (!(_tmp215_ < _tmp216_)) { #line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp226_ = _tmp219_[_tmp220_ + _tmp221_]; -#line 3184 "book.c" + break; +#line 3102 "book.c" + } +#line 391 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp217_ = row; +#line 391 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp218_ = image; +#line 391 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp219_ = gdk_pixbuf_get_rowstride (_tmp218_); +#line 391 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + in_offset = _tmp217_ * _tmp219_; +#line 392 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp220_ = row; +#line 392 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp221_ = width; +#line 392 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + out_offset = _tmp220_ * _tmp221_; +#line 3118 "book.c" + { + gint x = 0; +#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + x = 0; +#line 3123 "book.c" + { + gboolean _tmp222_ = FALSE; +#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp222_ = TRUE; +#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + while (TRUE) { +#line 3130 "book.c" + gboolean _tmp223_ = FALSE; + gint _tmp225_ = 0; + gint _tmp226_ = 0; + guint8* _tmp227_ = NULL; + gint _tmp227__length1 = 0; + gint _tmp228_ = 0; + gint _tmp229_ = 0; + guint8* _tmp230_ = NULL; + gint _tmp230__length1 = 0; + gint _tmp231_ = 0; + gint _tmp232_ = 0; + guint8 _tmp233_ = 0U; + guint8 _tmp234_ = 0U; +#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp223_ = _tmp222_; +#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!_tmp223_) { +#line 3148 "book.c" + gint _tmp224_ = 0; +#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp224_ = x; +#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + x = _tmp224_ + 1; +#line 3154 "book.c" + } +#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp222_ = FALSE; +#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp225_ = x; +#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp226_ = width; +#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (!(_tmp225_ < _tmp226_)) { +#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + break; +#line 3166 "book.c" + } +#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp227_ = data; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp227__length1 = data_length1; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp228_ = out_offset; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp229_ = x; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp230_ = pixels; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp230__length1 = pixels_length1; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp231_ = in_offset; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp232_ = x; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp233_ = _tmp230_[_tmp231_ + (_tmp232_ * 3)]; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp227_[_tmp228_ + _tmp229_] = _tmp233_; +#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp234_ = _tmp227_[_tmp228_ + _tmp229_]; +#line 3190 "book.c" } } } @@ -3190,848 +3196,866 @@ static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error } } } -#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp227_ = data; -#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp227__length1 = data_length1; -#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp229_ = book_compress_zlib (self, _tmp227_, _tmp227__length1, &_tmp228_); -#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - compressed_data = _tmp229_; -#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - compressed_data_length1 = _tmp228_; -#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 399 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp235_ = data; +#line 399 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp235__length1 = data_length1; +#line 399 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp237_ = book_compress_zlib (self, _tmp235_, _tmp235__length1, &_tmp236_); +#line 399 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + compressed_data = _tmp237_; +#line 399 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + compressed_data_length1 = _tmp236_; +#line 399 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _compressed_data_size_ = compressed_data_length1; -#line 395 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp230_ = compressed_data; -#line 395 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp230__length1 = compressed_data_length1; -#line 395 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp230_ != NULL) { -#line 3212 "book.c" - gint _tmp231_; - const gchar* _tmp243_; -#line 398 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp231_ = depth; -#line 398 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp231_ > 1) { -#line 3219 "book.c" - GdkPixbuf* _tmp232_; - gint _tmp233_; - Page* _tmp234_; - gint _tmp235_ = 0; - gint _tmp236_ = 0; - guint8* _tmp237_ = NULL; - guint8* jpeg_data; - gint jpeg_data_length1; - gint _jpeg_data_size_; - guint8* _tmp238_; - gint _tmp238__length1; - guint8* _tmp239_; - gint _tmp239__length1; -#line 400 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp232_ = image; -#line 400 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp233_ = quality; -#line 400 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp234_ = page; -#line 400 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp235_ = page_get_dpi (_tmp234_); #line 400 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp237_ = book_compress_jpeg (self, _tmp232_, _tmp233_, _tmp235_, &_tmp236_); + _tmp238_ = compressed_data; #line 400 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - jpeg_data = _tmp237_; + _tmp238__length1 = compressed_data_length1; #line 400 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - jpeg_data_length1 = _tmp236_; -#line 400 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _jpeg_data_size_ = jpeg_data_length1; -#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp238_ = jpeg_data; -#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp238__length1 = jpeg_data_length1; -#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp239_ = compressed_data; -#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp239__length1 = compressed_data_length1; -#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp238__length1 < _tmp239__length1) { -#line 3259 "book.c" - gchar* _tmp240_; - guint8* _tmp241_; - gint _tmp241__length1; - guint8* _tmp242_; - gint _tmp242__length1; + if (_tmp238_ != NULL) { +#line 3218 "book.c" + gint _tmp239_ = 0; + const gchar* _tmp252_ = NULL; #line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp240_ = g_strdup ("DCTDecode"); + _tmp239_ = depth; #line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (_tmp239_ > 1) { +#line 3225 "book.c" + guint8* jpeg_data = NULL; + GdkPixbuf* _tmp240_ = NULL; + gint _tmp241_ = 0; + Page* _tmp242_ = NULL; + gint _tmp243_ = 0; + gint _tmp244_ = 0; + gint _tmp245_ = 0; + guint8* _tmp246_ = NULL; + gint jpeg_data_length1 = 0; + gint _jpeg_data_size_ = 0; + guint8* _tmp247_ = NULL; + gint _tmp247__length1 = 0; + guint8* _tmp248_ = NULL; + gint _tmp248__length1 = 0; +#line 405 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp240_ = image; +#line 405 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp241_ = quality; +#line 405 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp242_ = page; +#line 405 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp243_ = page_get_dpi (_tmp242_); +#line 405 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp244_ = _tmp243_; +#line 405 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp246_ = book_compress_jpeg (self, _tmp240_, _tmp241_, _tmp244_, &_tmp245_); +#line 405 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + jpeg_data = _tmp246_; +#line 405 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + jpeg_data_length1 = _tmp245_; +#line 405 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _jpeg_data_size_ = jpeg_data_length1; +#line 406 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp247_ = jpeg_data; +#line 406 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp247__length1 = jpeg_data_length1; +#line 406 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp248_ = compressed_data; +#line 406 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp248__length1 = compressed_data_length1; +#line 406 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (_tmp247__length1 < _tmp248__length1) { +#line 3268 "book.c" + gchar* _tmp249_ = NULL; + guint8* _tmp250_ = NULL; + gint _tmp250__length1 = 0; + guint8* _tmp251_ = NULL; + gint _tmp251__length1 = 0; +#line 408 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp249_ = g_strdup ("DCTDecode"); +#line 408 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_free0 (filter); -#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - filter = _tmp240_; -#line 404 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp241_ = jpeg_data; -#line 404 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp241__length1 = jpeg_data_length1; -#line 404 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp242_ = (_tmp241_ != NULL) ? _vala_array_dup1 (_tmp241_, _tmp241__length1) : ((gpointer) _tmp241_); -#line 404 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp242__length1 = _tmp241__length1; -#line 404 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 408 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + filter = _tmp249_; +#line 409 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp250_ = jpeg_data; +#line 409 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp250__length1 = jpeg_data_length1; +#line 409 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp251_ = (_tmp250_ != NULL) ? _vala_array_dup1 (_tmp250_, _tmp250__length1) : ((gpointer) _tmp250_); +#line 409 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp251__length1 = _tmp250__length1; +#line 409 "/home/bob/bzr/simple-scan/trunk/src/book.vala" data = (g_free (data), NULL); -#line 404 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data = _tmp242_; -#line 404 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data_length1 = _tmp242__length1; -#line 404 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 409 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + data = _tmp251_; +#line 409 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + data_length1 = _tmp251__length1; +#line 409 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _data_size_ = data_length1; -#line 3287 "book.c" +#line 3296 "book.c" } -#line 398 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala" jpeg_data = (g_free (jpeg_data), NULL); -#line 3291 "book.c" +#line 3300 "book.c" } -#line 408 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp243_ = filter; -#line 408 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp243_ == NULL) { -#line 3297 "book.c" - gchar* _tmp244_; - guint8* _tmp245_; - gint _tmp245__length1; - guint8* _tmp246_; - gint _tmp246__length1; -#line 410 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp244_ = g_strdup ("FlateDecode"); -#line 410 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp252_ = filter; +#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (_tmp252_ == NULL) { +#line 3306 "book.c" + gchar* _tmp253_ = NULL; + guint8* _tmp254_ = NULL; + gint _tmp254__length1 = 0; + guint8* _tmp255_ = NULL; + gint _tmp255__length1 = 0; +#line 415 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp253_ = g_strdup ("FlateDecode"); +#line 415 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_free0 (filter); -#line 410 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - filter = _tmp244_; -#line 411 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp245_ = compressed_data; -#line 411 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp245__length1 = compressed_data_length1; -#line 411 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp246_ = (_tmp245_ != NULL) ? _vala_array_dup2 (_tmp245_, _tmp245__length1) : ((gpointer) _tmp245_); -#line 411 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp246__length1 = _tmp245__length1; -#line 411 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 415 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + filter = _tmp253_; +#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp254_ = compressed_data; +#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp254__length1 = compressed_data_length1; +#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp255_ = (_tmp254_ != NULL) ? _vala_array_dup2 (_tmp254_, _tmp254__length1) : ((gpointer) _tmp254_); +#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp255__length1 = _tmp254__length1; +#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala" data = (g_free (data), NULL); -#line 411 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data = _tmp246_; -#line 411 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - data_length1 = _tmp246__length1; -#line 411 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + data = _tmp255_; +#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + data_length1 = _tmp255__length1; +#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _data_size_ = data_length1; -#line 3325 "book.c" +#line 3334 "book.c" } } -#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp247_ = writer; -#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp247_, "\n"); -#line 417 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp248_ = writer; -#line 417 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp249_ = pdf_writer_start_object (_tmp248_); -#line 417 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - number = _tmp249_; -#line 418 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp250_ = writer; -#line 418 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp251_ = number; -#line 418 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp252_ = g_strdup_printf ("%u 0 obj\n", _tmp251_); -#line 418 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp253_ = _tmp252_; -#line 418 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp250_, _tmp253_); -#line 418 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp253_); -#line 419 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp254_ = writer; -#line 419 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp254_, "<<\n"); -#line 420 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp255_ = writer; -#line 420 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp255_, "/Type /Page\n"); #line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp256_ = writer; #line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp257_ = pages_number; -#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp258_ = g_strdup_printf ("/Parent %u 0 R\n", _tmp257_); -#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp259_ = _tmp258_; -#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp256_, _tmp259_); -#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp259_); -#line 422 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp260_ = writer; -#line 422 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp261_ = i; + pdf_writer_write_string (_tmp256_, "\n"); #line 422 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp262_ = number; + _tmp257_ = writer; #line 422 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp263_ = g_strdup_printf ("/Resources << /XObject << /Im%d %u 0 R >> >>\n", _tmp261_, _tmp262_ + 1); + _tmp258_ = pdf_writer_start_object (_tmp257_); #line 422 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp264_ = _tmp263_; -#line 422 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp260_, _tmp264_); -#line 422 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp264_); -#line 423 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp265_ = writer; -#line 423 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp266_ = page_width; -#line 423 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp267_ = width_buffer; + number = _tmp258_; #line 423 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp267__length1 = width_buffer_length1; + _tmp259_ = writer; #line 423 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp268_ = g_ascii_formatd (_tmp267_, _tmp267__length1, "%.2f", _tmp266_); + _tmp260_ = number; #line 423 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp269_ = page_height; + _tmp261_ = g_strdup_printf ("%u 0 obj\n", _tmp260_); #line 423 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp270_ = height_buffer; + _tmp262_ = _tmp261_; #line 423 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp270__length1 = height_buffer_length1; + pdf_writer_write_string (_tmp259_, _tmp262_); #line 423 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp271_ = g_ascii_formatd (_tmp270_, _tmp270__length1, "%.2f", _tmp269_); -#line 423 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp272_ = g_strdup_printf ("/MediaBox [ 0 0 %s %s ]\n", _tmp268_, _tmp271_); -#line 423 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp273_ = _tmp272_; -#line 423 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp265_, _tmp273_); -#line 423 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp273_); -#line 424 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp274_ = writer; -#line 424 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp275_ = number; + _g_free0 (_tmp262_); #line 424 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp276_ = g_strdup_printf ("/Contents %u 0 R\n", _tmp275_ + 2); + _tmp263_ = writer; #line 424 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp277_ = _tmp276_; -#line 424 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp274_, _tmp277_); -#line 424 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp277_); + pdf_writer_write_string (_tmp263_, "<<\n"); #line 425 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp278_ = writer; + _tmp264_ = writer; #line 425 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp278_, ">>\n"); + pdf_writer_write_string (_tmp264_, "/Type /Page\n"); #line 426 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp279_ = writer; + _tmp265_ = writer; #line 426 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp279_, "endobj\n"); -#line 429 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp280_ = writer; + _tmp266_ = pages_number; +#line 426 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp267_ = g_strdup_printf ("/Parent %u 0 R\n", _tmp266_); +#line 426 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp268_ = _tmp267_; +#line 426 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp265_, _tmp268_); +#line 426 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp268_); +#line 427 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp269_ = writer; +#line 427 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp270_ = i; +#line 427 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp271_ = number; +#line 427 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp272_ = g_strdup_printf ("/Resources << /XObject << /Im%d %u 0 R >> >>\n", _tmp270_, _tmp271_ + 1); +#line 427 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp273_ = _tmp272_; +#line 427 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp269_, _tmp273_); +#line 427 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp273_); +#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp274_ = writer; +#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp275_ = page_width; +#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp276_ = width_buffer; +#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp276__length1 = width_buffer_length1; +#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp277_ = g_ascii_formatd (_tmp276_, _tmp276__length1, "%.2f", _tmp275_); +#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp278_ = page_height; +#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp279_ = height_buffer; +#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp279__length1 = height_buffer_length1; +#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp280_ = g_ascii_formatd (_tmp279_, _tmp279__length1, "%.2f", _tmp278_); +#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp281_ = g_strdup_printf ("/MediaBox [ 0 0 %s %s ]\n", _tmp277_, _tmp280_); +#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp282_ = _tmp281_; +#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp274_, _tmp282_); +#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp282_); #line 429 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp280_, "\n"); -#line 430 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp281_ = writer; -#line 430 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp282_ = pdf_writer_start_object (_tmp281_); -#line 430 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - number = _tmp282_; -#line 431 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp283_ = writer; -#line 431 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 429 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp284_ = number; -#line 431 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp285_ = g_strdup_printf ("%u 0 obj\n", _tmp284_); -#line 431 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 429 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp285_ = g_strdup_printf ("/Contents %u 0 R\n", _tmp284_ + 2); +#line 429 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp286_ = _tmp285_; -#line 431 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 429 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write_string (_tmp283_, _tmp286_); -#line 431 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 429 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_free0 (_tmp286_); -#line 432 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 430 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp287_ = writer; -#line 432 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp287_, "<<\n"); -#line 433 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 430 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp287_, ">>\n"); +#line 431 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp288_ = writer; -#line 433 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp288_, "/Type /XObject\n"); +#line 431 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp288_, "endobj\n"); #line 434 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp289_ = writer; #line 434 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp289_, "/Subtype /Image\n"); + pdf_writer_write_string (_tmp289_, "\n"); #line 435 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp290_ = writer; #line 435 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp291_ = width; -#line 435 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp292_ = g_strdup_printf ("/Width %d\n", _tmp291_); -#line 435 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp293_ = _tmp292_; + _tmp291_ = pdf_writer_start_object (_tmp290_); #line 435 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp290_, _tmp293_); -#line 435 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp293_); + number = _tmp291_; #line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp294_ = writer; + _tmp292_ = writer; #line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp295_ = height; + _tmp293_ = number; #line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp296_ = g_strdup_printf ("/Height %d\n", _tmp295_); + _tmp294_ = g_strdup_printf ("%u 0 obj\n", _tmp293_); #line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp297_ = _tmp296_; + _tmp295_ = _tmp294_; #line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp294_, _tmp297_); + pdf_writer_write_string (_tmp292_, _tmp295_); #line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp297_); -#line 437 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp298_ = writer; + _g_free0 (_tmp295_); #line 437 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp299_ = color_space; + _tmp296_ = writer; #line 437 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp300_ = g_strdup_printf ("/ColorSpace /%s\n", _tmp299_); -#line 437 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp301_ = _tmp300_; -#line 437 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp298_, _tmp301_); -#line 437 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp301_); -#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp302_ = writer; -#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp303_ = depth; -#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp304_ = g_strdup_printf ("/BitsPerComponent %d\n", _tmp303_); + pdf_writer_write_string (_tmp296_, "<<\n"); #line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp305_ = _tmp304_; + _tmp297_ = writer; #line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp302_, _tmp305_); -#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp305_); -#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp306_ = writer; -#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp307_ = data; -#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp307__length1 = data_length1; -#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp308_ = g_strdup_printf ("/Length %d\n", _tmp307__length1); -#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp309_ = _tmp308_; + pdf_writer_write_string (_tmp297_, "/Type /XObject\n"); #line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp306_, _tmp309_); + _tmp298_ = writer; #line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp309_); + pdf_writer_write_string (_tmp298_, "/Subtype /Image\n"); +#line 440 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp299_ = writer; +#line 440 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp300_ = width; +#line 440 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp301_ = g_strdup_printf ("/Width %d\n", _tmp300_); +#line 440 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp302_ = _tmp301_; #line 440 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp310_ = filter; + pdf_writer_write_string (_tmp299_, _tmp302_); #line 440 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp310_ != NULL) { -#line 3530 "book.c" - PDFWriter* _tmp311_; - const gchar* _tmp312_; - gchar* _tmp313_ = NULL; - gchar* _tmp314_; + _g_free0 (_tmp302_); #line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp311_ = writer; + _tmp303_ = writer; #line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp312_ = filter; + _tmp304_ = height; #line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp313_ = g_strdup_printf ("/Filter /%s\n", _tmp312_); + _tmp305_ = g_strdup_printf ("/Height %d\n", _tmp304_); #line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp314_ = _tmp313_; + _tmp306_ = _tmp305_; #line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp311_, _tmp314_); + pdf_writer_write_string (_tmp303_, _tmp306_); #line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp314_); -#line 3547 "book.c" - } + _g_free0 (_tmp306_); #line 442 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp315_ = writer; + _tmp307_ = writer; +#line 442 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp308_ = color_space; +#line 442 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp309_ = g_strdup_printf ("/ColorSpace /%s\n", _tmp308_); +#line 442 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp310_ = _tmp309_; +#line 442 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp307_, _tmp310_); #line 442 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp315_, ">>\n"); + _g_free0 (_tmp310_); #line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp316_ = writer; + _tmp311_ = writer; #line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp316_, "stream\n"); + _tmp312_ = depth; +#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp313_ = g_strdup_printf ("/BitsPerComponent %d\n", _tmp312_); +#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp314_ = _tmp313_; +#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp311_, _tmp314_); +#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp314_); +#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp315_ = writer; #line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp317_ = writer; + _tmp316_ = data; #line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp318_ = data; + _tmp316__length1 = data_length1; #line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp318__length1 = data_length1; + _tmp317_ = g_strdup_printf ("/Length %d\n", _tmp316__length1); #line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write (_tmp317_, _tmp318_, _tmp318__length1); + _tmp318_ = _tmp317_; +#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp315_, _tmp318_); +#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp318_); #line 445 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp319_ = writer; + _tmp319_ = filter; #line 445 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp319_, "\n"); + if (_tmp319_ != NULL) { +#line 3539 "book.c" + PDFWriter* _tmp320_ = NULL; + const gchar* _tmp321_ = NULL; + gchar* _tmp322_ = NULL; + gchar* _tmp323_ = NULL; +#line 446 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp320_ = writer; +#line 446 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp321_ = filter; +#line 446 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp322_ = g_strdup_printf ("/Filter /%s\n", _tmp321_); +#line 446 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp323_ = _tmp322_; #line 446 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp320_ = writer; + pdf_writer_write_string (_tmp320_, _tmp323_); #line 446 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp320_, "endstream\n"); + _g_free0 (_tmp323_); +#line 3556 "book.c" + } #line 447 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp321_ = writer; + _tmp324_ = writer; #line 447 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp321_, "endobj\n"); -#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp322_ = page_width; -#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp323_ = width_buffer; -#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp323__length1 = width_buffer_length1; -#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp324_ = g_ascii_formatd (_tmp323_, _tmp323__length1, "%f", _tmp322_); + pdf_writer_write_string (_tmp324_, ">>\n"); +#line 448 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp325_ = writer; +#line 448 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp325_, "stream\n"); +#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp326_ = writer; +#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp327_ = data; +#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp327__length1 = data_length1; +#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write (_tmp326_, _tmp327_, _tmp327__length1); #line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp325_ = page_height; + _tmp328_ = writer; #line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp326_ = height_buffer; -#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp326__length1 = height_buffer_length1; -#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp327_ = g_ascii_formatd (_tmp326_, _tmp326__length1, "%f", _tmp325_); -#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp328_ = i; -#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp329_ = g_strdup_printf ("q\n%s 0 0 %s 0 0 cm\n/Im%d Do\nQ", _tmp324_, _tmp327_, _tmp328_); -#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - command = _tmp329_; + pdf_writer_write_string (_tmp328_, "\n"); #line 451 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp330_ = writer; + _tmp329_ = writer; #line 451 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp330_, "\n"); + pdf_writer_write_string (_tmp329_, "endstream\n"); #line 452 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp331_ = writer; -#line 452 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp332_ = pdf_writer_start_object (_tmp331_); + _tmp330_ = writer; #line 452 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - number = _tmp332_; -#line 453 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp333_ = writer; -#line 453 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp334_ = number; -#line 453 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp335_ = g_strdup_printf ("%u 0 obj\n", _tmp334_); -#line 453 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp336_ = _tmp335_; -#line 453 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp333_, _tmp336_); -#line 453 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp336_); -#line 454 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp337_ = writer; -#line 454 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp337_, "<<\n"); + pdf_writer_write_string (_tmp330_, "endobj\n"); +#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp331_ = page_width; +#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp332_ = width_buffer; +#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp332__length1 = width_buffer_length1; #line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp338_ = writer; + _tmp333_ = g_ascii_formatd (_tmp332_, _tmp332__length1, "%f", _tmp331_); #line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp339_ = command; + _tmp334_ = page_height; #line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp340_ = strlen (_tmp339_); + _tmp335_ = height_buffer; #line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp341_ = _tmp340_; + _tmp335__length1 = height_buffer_length1; #line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp342_ = g_strdup_printf ("/Length %d\n", _tmp341_ + 1); + _tmp336_ = g_ascii_formatd (_tmp335_, _tmp335__length1, "%f", _tmp334_); #line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp343_ = _tmp342_; + _tmp337_ = i; #line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp338_, _tmp343_); + _tmp338_ = g_strdup_printf ("q\n%s 0 0 %s 0 0 cm\n/Im%d Do\nQ", _tmp333_, _tmp336_, _tmp337_); #line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp343_); + command = _tmp338_; #line 456 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp344_ = writer; + _tmp339_ = writer; #line 456 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp344_, ">>\n"); + pdf_writer_write_string (_tmp339_, "\n"); #line 457 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp345_ = writer; + _tmp340_ = writer; #line 457 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp345_, "stream\n"); + _tmp341_ = pdf_writer_start_object (_tmp340_); +#line 457 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + number = _tmp341_; #line 458 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp346_ = writer; + _tmp342_ = writer; +#line 458 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp343_ = number; #line 458 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp347_ = command; + _tmp344_ = g_strdup_printf ("%u 0 obj\n", _tmp343_); #line 458 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp346_, _tmp347_); + _tmp345_ = _tmp344_; +#line 458 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp342_, _tmp345_); +#line 458 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp345_); #line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp348_ = writer; + _tmp346_ = writer; #line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp348_, "\n"); + pdf_writer_write_string (_tmp346_, "<<\n"); +#line 460 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp347_ = writer; +#line 460 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp348_ = command; +#line 460 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp349_ = strlen (_tmp348_); +#line 460 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp350_ = _tmp349_; +#line 460 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp351_ = g_strdup_printf ("/Length %d\n", _tmp350_ + 1); #line 460 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp349_ = writer; + _tmp352_ = _tmp351_; #line 460 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp349_, "endstream\n"); + pdf_writer_write_string (_tmp347_, _tmp352_); +#line 460 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp352_); #line 461 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp350_ = writer; + _tmp353_ = writer; #line 461 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp350_, "endobj\n"); + pdf_writer_write_string (_tmp353_, ">>\n"); +#line 462 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp354_ = writer; +#line 462 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp354_, "stream\n"); #line 463 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp351_ = i; + _tmp355_ = writer; #line 463 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - g_signal_emit_by_name (self, "saving", _tmp351_); -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp356_ = command; +#line 463 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp355_, _tmp356_); +#line 464 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp357_ = writer; +#line 464 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp357_, "\n"); +#line 465 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp358_ = writer; +#line 465 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp358_, "endstream\n"); +#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp359_ = writer; +#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp359_, "endobj\n"); +#line 468 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp360_ = i; +#line 468 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + g_signal_emit_by_name (self, "saving", _tmp360_); +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_free0 (command); -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" compressed_data = (g_free (compressed_data), NULL); -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" data = (g_free (data), NULL); -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" height_buffer = (g_free (height_buffer), NULL); -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" width_buffer = (g_free (width_buffer), NULL); -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_free0 (filter); -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_free0 (color_space); -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_object_unref0 (image); -#line 258 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 263 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _page_unref0 (page); -#line 3689 "book.c" +#line 3698 "book.c" } } } -#line 467 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp352_ = writer; -#line 467 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp352_, "\n"); -#line 468 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp353_ = writer; -#line 468 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp354_ = pdf_writer_start_object (_tmp353_); -#line 468 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - info_number = _tmp354_; -#line 469 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp355_ = writer; -#line 469 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp356_ = info_number; -#line 469 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp357_ = g_strdup_printf ("%u 0 obj\n", _tmp356_); -#line 469 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp358_ = _tmp357_; -#line 469 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp355_, _tmp358_); -#line 469 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp358_); -#line 470 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp359_ = writer; -#line 470 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp359_, "<<\n"); -#line 471 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp360_ = writer; -#line 471 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp361_ = g_strdup_printf ("/Creator (Simple Scan %s)\n", VERSION); -#line 471 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp362_ = _tmp361_; -#line 471 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp360_, _tmp362_); -#line 471 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp362_); #line 472 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp363_ = writer; + _tmp361_ = writer; #line 472 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp363_, ">>\n"); + pdf_writer_write_string (_tmp361_, "\n"); #line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp364_ = writer; + _tmp362_ = writer; #line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp364_, "endobj\n"); + _tmp363_ = pdf_writer_start_object (_tmp362_); +#line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + info_number = _tmp363_; +#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp364_ = writer; +#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp365_ = info_number; +#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp366_ = g_strdup_printf ("%u 0 obj\n", _tmp365_); +#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp367_ = _tmp366_; +#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp364_, _tmp367_); +#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp367_); +#line 475 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp368_ = writer; +#line 475 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp368_, "<<\n"); #line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp365_ = writer; + _tmp369_ = writer; +#line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp370_ = g_strdup_printf ("/Creator (Simple Scan %s)\n", VERSION); +#line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp371_ = _tmp370_; #line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp366_ = _tmp365_->offset; + pdf_writer_write_string (_tmp369_, _tmp371_); #line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - xref_offset = _tmp366_; + _g_free0 (_tmp371_); #line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp367_ = writer; + _tmp372_ = writer; #line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp367_, "xref\n"); + pdf_writer_write_string (_tmp372_, ">>\n"); #line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp368_ = writer; -#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp369_ = writer; + _tmp373_ = writer; #line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp370_ = _tmp369_->object_offsets; -#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp371_ = g_list_length (_tmp370_); -#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp372_ = g_strdup_printf ("1 %zu\n", (gsize) _tmp371_); -#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp373_ = _tmp372_; -#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp368_, _tmp373_); -#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp373_); -#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp373_, "endobj\n"); +#line 481 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp374_ = writer; -#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp375_ = _tmp374_->object_offsets; -#line 3767 "book.c" +#line 481 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp375_ = _tmp374_->offset; +#line 481 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + xref_offset = _tmp375_; +#line 482 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp376_ = writer; +#line 482 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp376_, "xref\n"); +#line 483 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp377_ = writer; +#line 483 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp378_ = writer; +#line 483 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp379_ = _tmp378_->object_offsets; +#line 483 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp380_ = g_list_length (_tmp379_); +#line 483 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp381_ = g_strdup_printf ("1 %zu\n", (gsize) _tmp380_); +#line 483 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp382_ = _tmp381_; +#line 483 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp377_, _tmp382_); +#line 483 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp382_); +#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp383_ = writer; +#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp384_ = _tmp383_->object_offsets; +#line 3776 "book.c" { GList* offset_collection = NULL; GList* offset_it = NULL; -#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - offset_collection = _tmp375_; -#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + offset_collection = _tmp384_; +#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala" for (offset_it = offset_collection; offset_it != NULL; offset_it = offset_it->next) { -#line 3775 "book.c" +#line 3784 "book.c" guint offset = 0U; -#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala" offset = (guint) ((guintptr) offset_it->data); -#line 3779 "book.c" +#line 3788 "book.c" { - PDFWriter* _tmp376_; - guint _tmp377_; - gchar* _tmp378_ = NULL; - gchar* _tmp379_; -#line 480 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp376_ = writer; -#line 480 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp377_ = offset; -#line 480 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp378_ = g_strdup_printf ("%010zu 00000 n \n", (gsize) _tmp377_); -#line 480 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp379_ = _tmp378_; -#line 480 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp376_, _tmp379_); -#line 480 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp379_); -#line 3797 "book.c" - } - } - } -#line 483 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp380_ = writer; -#line 483 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp380_, "trailer\n"); -#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp381_ = writer; -#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp381_, "<<\n"); + PDFWriter* _tmp385_ = NULL; + guint _tmp386_ = 0U; + gchar* _tmp387_ = NULL; + gchar* _tmp388_ = NULL; #line 485 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp382_ = writer; + _tmp385_ = writer; #line 485 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp383_ = writer; + _tmp386_ = offset; #line 485 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp384_ = _tmp383_->object_offsets; + _tmp387_ = g_strdup_printf ("%010zu 00000 n \n", (gsize) _tmp386_); #line 485 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp385_ = g_list_length (_tmp384_); + _tmp388_ = _tmp387_; #line 485 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp386_ = g_strdup_printf ("/Size %zu\n", (gsize) _tmp385_); + pdf_writer_write_string (_tmp385_, _tmp388_); #line 485 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp387_ = _tmp386_; -#line 485 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp382_, _tmp387_); -#line 485 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp387_); -#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp388_ = writer; -#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp389_ = info_number; -#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp390_ = g_strdup_printf ("/Info %u 0 R\n", _tmp389_); -#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp391_ = _tmp390_; -#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp388_, _tmp391_); -#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp391_); -#line 487 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp392_ = writer; -#line 487 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp393_ = catalog_number; -#line 487 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp394_ = g_strdup_printf ("/Root %u 0 R\n", _tmp393_); -#line 487 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp395_ = _tmp394_; -#line 487 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp392_, _tmp395_); -#line 487 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp395_); + _g_free0 (_tmp388_); +#line 3806 "book.c" + } + } + } +#line 488 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp389_ = writer; +#line 488 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp389_, "trailer\n"); #line 489 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp396_ = writer; + _tmp390_ = writer; #line 489 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp396_, ">>\n"); + pdf_writer_write_string (_tmp390_, "<<\n"); #line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp397_ = writer; + _tmp391_ = writer; +#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp392_ = writer; +#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp393_ = _tmp392_->object_offsets; +#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp394_ = g_list_length (_tmp393_); #line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp397_, "startxref\n"); + _tmp395_ = g_strdup_printf ("/Size %zu\n", (gsize) _tmp394_); +#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp396_ = _tmp395_; +#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp391_, _tmp396_); +#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp396_); #line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp398_ = writer; + _tmp397_ = writer; #line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp399_ = xref_offset; + _tmp398_ = info_number; #line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp400_ = g_strdup_printf ("%zu\n", _tmp399_); + _tmp399_ = g_strdup_printf ("/Info %u 0 R\n", _tmp398_); #line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp401_ = _tmp400_; + _tmp400_ = _tmp399_; #line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp398_, _tmp401_); + pdf_writer_write_string (_tmp397_, _tmp400_); #line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _g_free0 (_tmp401_); + _g_free0 (_tmp400_); +#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp401_ = writer; +#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp402_ = catalog_number; #line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp402_ = writer; + _tmp403_ = g_strdup_printf ("/Root %u 0 R\n", _tmp402_); #line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - pdf_writer_write_string (_tmp402_, "%%EOF\n"); -#line 208 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp404_ = _tmp403_; +#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp401_, _tmp404_); +#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp404_); +#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp405_ = writer; +#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp405_, ">>\n"); +#line 495 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp406_ = writer; +#line 495 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp406_, "startxref\n"); +#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp407_ = writer; +#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp408_ = xref_offset; +#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp409_ = g_strdup_printf ("%zu\n", _tmp408_); +#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp410_ = _tmp409_; +#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp407_, _tmp410_); +#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _g_free0 (_tmp410_); +#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp411_ = writer; +#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + pdf_writer_write_string (_tmp411_, "%%EOF\n"); +#line 213 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _pdf_writer_unref0 (writer); -#line 208 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 213 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_object_unref0 (stream); -#line 3877 "book.c" +#line 3886 "book.c" } void book_save (Book* self, const gchar* type, gint quality, GFile* file, GError** error) { - const gchar* _tmp0_; - const gchar* _tmp1_; + const gchar* _tmp0_ = NULL; + const gchar* _tmp1_ = NULL; GQuark _tmp3_ = 0U; -#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" static GQuark _tmp2_label0 = 0; -#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" static GQuark _tmp2_label1 = 0; -#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" static GQuark _tmp2_label2 = 0; -#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" static GQuark _tmp2_label3 = 0; -#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" static GQuark _tmp2_label4 = 0; -#line 3895 "book.c" +#line 3904 "book.c" GError * _inner_error_ = NULL; -#line 495 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 500 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (self != NULL); -#line 495 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 500 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (type != NULL); -#line 495 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 500 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (file != NULL); -#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = type; -#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = _tmp0_; -#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_); -#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (((_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("jpeg")))) || (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("png"))))) || (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("tiff"))))) { -#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" switch (0) { -#line 3913 "book.c" +#line 3922 "book.c" default: { - const gchar* _tmp4_; - gint _tmp5_; - GFile* _tmp6_; -#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + const gchar* _tmp4_ = NULL; + gint _tmp5_ = 0; + GFile* _tmp6_ = NULL; +#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp4_ = type; -#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5_ = quality; -#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp6_ = file; -#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala" book_save_multi_file (self, _tmp4_, _tmp5_, _tmp6_, &_inner_error_); -#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_inner_error_ != NULL) { -#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_propagate_error (error, _inner_error_); -#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return; -#line 3933 "book.c" +#line 3942 "book.c" } -#line 503 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala" break; -#line 3937 "book.c" +#line 3946 "book.c" } } } else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("ps")))) { -#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" switch (0) { -#line 3943 "book.c" +#line 3952 "book.c" default: { - GFile* _tmp7_; -#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + GFile* _tmp7_ = NULL; +#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp7_ = file; -#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala" book_save_ps (self, _tmp7_, &_inner_error_); -#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_inner_error_ != NULL) { -#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_propagate_error (error, _inner_error_); -#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return; -#line 3957 "book.c" +#line 3966 "book.c" } -#line 506 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 511 "/home/bob/bzr/simple-scan/trunk/src/book.vala" break; -#line 3961 "book.c" +#line 3970 "book.c" } } } else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("pdf")))) { -#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala" switch (0) { -#line 3967 "book.c" +#line 3976 "book.c" default: { - GFile* _tmp8_; - gint _tmp9_; -#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + GFile* _tmp8_ = NULL; + gint _tmp9_ = 0; +#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp8_ = file; -#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp9_ = quality; -#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala" book_save_pdf (self, _tmp8_, _tmp9_, &_inner_error_); -#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_inner_error_ != NULL) { -#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_propagate_error (error, _inner_error_); -#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return; -#line 3984 "book.c" +#line 3993 "book.c" } -#line 509 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 514 "/home/bob/bzr/simple-scan/trunk/src/book.vala" break; -#line 3988 "book.c" +#line 3997 "book.c" } } } } -void book_set_needs_saving (Book* self, gboolean needs_saving) { - gboolean _tmp0_; - gboolean needed_saving; - gboolean _tmp1_; - gboolean _tmp2_; - gboolean _tmp3_; -#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - g_return_if_fail (self != NULL); -#line 515 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp0_ = self->priv->needs_saving; -#line 515 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - needed_saving = _tmp0_; -#line 516 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp1_ = needs_saving; -#line 516 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - self->priv->needs_saving = _tmp1_; -#line 517 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp2_ = needed_saving; -#line 517 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp3_ = needs_saving; -#line 517 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - if (_tmp2_ != _tmp3_) { -#line 518 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - g_signal_emit_by_name (self, "needs-saving-changed"); -#line 4019 "book.c" - } +guint book_get_n_pages (Book* self) { + guint result; + GList* _tmp0_ = NULL; + guint _tmp1_ = 0U; +#line 16 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + g_return_val_if_fail (self != NULL, 0U); +#line 16 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp0_ = self->priv->pages; +#line 16 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp1_ = g_list_length (_tmp0_); +#line 16 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + result = _tmp1_; +#line 16 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + return result; +#line 4018 "book.c" } gboolean book_get_needs_saving (Book* self) { - gboolean result = FALSE; - gboolean _tmp0_; -#line 521 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + gboolean result; + gboolean _tmp0_ = FALSE; +#line 21 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (self != NULL, FALSE); -#line 523 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - _tmp0_ = self->priv->needs_saving; -#line 523 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 21 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp0_ = self->priv->needs_saving_; +#line 21 "/home/bob/bzr/simple-scan/trunk/src/book.vala" result = _tmp0_; -#line 523 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 21 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return result; -#line 4035 "book.c" +#line 4033 "book.c" +} + + +void book_set_needs_saving (Book* self, gboolean value) { + gboolean _tmp0_ = FALSE; + gboolean _tmp1_ = FALSE; + gboolean _tmp2_ = FALSE; +#line 22 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + g_return_if_fail (self != NULL); +#line 24 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp0_ = self->priv->needs_saving_; +#line 24 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp1_ = value; +#line 24 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + if (_tmp0_ == _tmp1_) { +#line 25 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + return; +#line 4051 "book.c" + } +#line 26 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + _tmp2_ = value; +#line 26 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + self->priv->needs_saving_ = _tmp2_; +#line 27 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + g_signal_emit_by_name (self, "needs-saving-changed"); +#line 4059 "book.c" } @@ -4050,26 +4074,26 @@ static void g_cclosure_user_marshal_VOID__PAGE (GClosure * closure, GValue * ret data1 = closure->data; #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" data2 = param_values->data[0].v_pointer; -#line 4054 "book.c" +#line 4078 "book.c" } else { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" data1 = param_values->data[0].v_pointer; #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" data2 = closure->data; -#line 4060 "book.c" +#line 4084 "book.c" } #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" callback = (GMarshalFunc_VOID__PAGE) (marshal_data ? marshal_data : cc->callback); #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" callback (data1, value_get_page (param_values + 1), data2); -#line 4066 "book.c" +#line 4090 "book.c" } static void value_book_init (GValue* value) { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = NULL; -#line 4073 "book.c" +#line 4097 "book.c" } @@ -4078,7 +4102,7 @@ static void value_book_free_value (GValue* value) { if (value->data[0].v_pointer) { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" book_unref (value->data[0].v_pointer); -#line 4082 "book.c" +#line 4106 "book.c" } } @@ -4088,11 +4112,11 @@ static void value_book_copy_value (const GValue* src_value, GValue* dest_value) if (src_value->data[0].v_pointer) { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" dest_value->data[0].v_pointer = book_ref (src_value->data[0].v_pointer); -#line 4092 "book.c" +#line 4116 "book.c" } else { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" dest_value->data[0].v_pointer = NULL; -#line 4096 "book.c" +#line 4120 "book.c" } } @@ -4100,37 +4124,37 @@ static void value_book_copy_value (const GValue* src_value, GValue* dest_value) static gpointer value_book_peek_pointer (const GValue* value) { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return value->data[0].v_pointer; -#line 4104 "book.c" +#line 4128 "book.c" } static gchar* value_book_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (collect_values[0].v_pointer) { -#line 4111 "book.c" +#line 4135 "book.c" Book* object; object = collect_values[0].v_pointer; #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (object->parent_instance.g_class == NULL) { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 4118 "book.c" +#line 4142 "book.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 4122 "book.c" +#line 4146 "book.c" } #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = book_ref (object); -#line 4126 "book.c" +#line 4150 "book.c" } else { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = NULL; -#line 4130 "book.c" +#line 4154 "book.c" } #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return NULL; -#line 4134 "book.c" +#line 4158 "book.c" } @@ -4141,25 +4165,25 @@ static gchar* value_book_lcopy_value (const GValue* value, guint n_collect_value if (!object_p) { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 4145 "book.c" +#line 4169 "book.c" } #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (!value->data[0].v_pointer) { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" *object_p = NULL; -#line 4151 "book.c" +#line 4175 "book.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" *object_p = value->data[0].v_pointer; -#line 4155 "book.c" +#line 4179 "book.c" } else { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" *object_p = book_ref (value->data[0].v_pointer); -#line 4159 "book.c" +#line 4183 "book.c" } #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return NULL; -#line 4163 "book.c" +#line 4187 "book.c" } @@ -4173,7 +4197,7 @@ GParamSpec* param_spec_book (const gchar* name, const gchar* nick, const gchar* G_PARAM_SPEC (spec)->value_type = object_type; #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return G_PARAM_SPEC (spec); -#line 4177 "book.c" +#line 4201 "book.c" } @@ -4182,7 +4206,7 @@ gpointer value_get_book (const GValue* value) { g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_BOOK), NULL); #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return value->data[0].v_pointer; -#line 4186 "book.c" +#line 4210 "book.c" } @@ -4202,17 +4226,17 @@ void value_set_book (GValue* value, gpointer v_object) { value->data[0].v_pointer = v_object; #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" book_ref (value->data[0].v_pointer); -#line 4206 "book.c" +#line 4230 "book.c" } else { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = NULL; -#line 4210 "book.c" +#line 4234 "book.c" } #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (old) { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" book_unref (old); -#line 4216 "book.c" +#line 4240 "book.c" } } @@ -4231,17 +4255,17 @@ void value_take_book (GValue* value, gpointer v_object) { g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = v_object; -#line 4235 "book.c" +#line 4259 "book.c" } else { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = NULL; -#line 4239 "book.c" +#line 4263 "book.c" } #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (old) { #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" book_unref (old); -#line 4245 "book.c" +#line 4269 "book.c" } } @@ -4265,7 +4289,7 @@ static void book_class_init (BookClass * klass) { g_signal_new ("needs_saving_changed", TYPE_BOOK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_new ("saving", TYPE_BOOK, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); -#line 4269 "book.c" +#line 4293 "book.c" } @@ -4274,61 +4298,61 @@ static void book_instance_init (Book * self) { self->priv = BOOK_GET_PRIVATE (self); #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->ref_count = 1; -#line 4278 "book.c" +#line 4302 "book.c" } static void book_finalize (Book* obj) { Book * self; - GList* _tmp0_; + GList* _tmp0_ = NULL; #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BOOK, Book); -#line 32 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = self->priv->pages; -#line 4289 "book.c" +#line 4313 "book.c" { GList* page_collection = NULL; GList* page_it = NULL; -#line 32 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala" page_collection = _tmp0_; -#line 32 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala" for (page_it = page_collection; page_it != NULL; page_it = page_it->next) { -#line 4297 "book.c" - Page* _tmp1_; +#line 4321 "book.c" + Page* _tmp1_ = NULL; Page* page = NULL; -#line 32 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = _page_ref0 ((Page*) page_it->data); -#line 32 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala" page = _tmp1_; -#line 4304 "book.c" +#line 4328 "book.c" { - Page* _tmp2_; + Page* _tmp2_ = NULL; guint _tmp3_ = 0U; - Page* _tmp4_; + Page* _tmp4_ = NULL; guint _tmp5_ = 0U; -#line 34 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 47 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = page; -#line 34 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 47 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_parse_name ("pixels-changed", TYPE_PAGE, &_tmp3_, NULL, FALSE); -#line 34 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 47 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _book_page_changed_cb_page_pixels_changed, self); -#line 35 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 48 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp4_ = page; -#line 35 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 48 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_parse_name ("crop-changed", TYPE_PAGE, &_tmp5_, NULL, FALSE); -#line 35 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 48 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _book_page_changed_cb_page_crop_changed, self); -#line 32 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _page_unref0 (page); -#line 4324 "book.c" +#line 4348 "book.c" } } } #line 14 "/home/bob/bzr/simple-scan/trunk/src/book.vala" __g_list_free__page_unref0_0 (self->priv->pages); -#line 182 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 187 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_byte_array_unref0 (self->priv->jpeg_data); -#line 4332 "book.c" +#line 4356 "book.c" } @@ -4353,7 +4377,7 @@ gpointer book_ref (gpointer instance) { g_atomic_int_inc (&self->ref_count); #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return instance; -#line 4357 "book.c" +#line 4381 "book.c" } @@ -4366,70 +4390,70 @@ void book_unref (gpointer instance) { BOOK_GET_CLASS (self)->finalize (self); #line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_type_free_instance ((GTypeInstance *) self); -#line 4370 "book.c" +#line 4394 "book.c" } } static gpointer _g_object_ref0 (gpointer self) { -#line 535 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return self ? g_object_ref (self) : NULL; -#line 4378 "book.c" +#line 4402 "book.c" } PDFWriter* pdf_writer_construct (GType object_type, GFileOutputStream* stream) { PDFWriter* self = NULL; - GFileOutputStream* _tmp0_; - GFileOutputStream* _tmp1_; -#line 533 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + GFileOutputStream* _tmp0_ = NULL; + GFileOutputStream* _tmp1_ = NULL; +#line 525 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (stream != NULL, NULL); -#line 533 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 525 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self = (PDFWriter*) g_type_create_instance (object_type); -#line 535 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = stream; -#line 535 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = _g_object_ref0 (_tmp0_); -#line 535 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_object_unref0 (self->priv->stream); -#line 535 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->priv->stream = _tmp1_; -#line 533 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 525 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return self; -#line 4400 "book.c" +#line 4424 "book.c" } PDFWriter* pdf_writer_new (GFileOutputStream* stream) { -#line 533 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 525 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return pdf_writer_construct (TYPE_PDF_WRITER, stream); -#line 4407 "book.c" +#line 4431 "book.c" } void pdf_writer_write (PDFWriter* self, guint8* data, int data_length1) { - gsize _tmp4_; - guint8* _tmp5_; - gint _tmp5__length1; + gsize _tmp4_ = 0UL; + guint8* _tmp5_ = NULL; + gint _tmp5__length1 = 0; GError * _inner_error_ = NULL; -#line 538 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 530 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (self != NULL); -#line 4418 "book.c" +#line 4442 "book.c" { - GFileOutputStream* _tmp0_; - guint8* _tmp1_; - gint _tmp1__length1; -#line 542 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + GFileOutputStream* _tmp0_ = NULL; + guint8* _tmp1_ = NULL; + gint _tmp1__length1 = 0; +#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = self->priv->stream; -#line 542 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = data; -#line 542 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1__length1 = data_length1; -#line 542 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_output_stream_write_all ((GOutputStream*) _tmp0_, _tmp1_, (gsize) _tmp1__length1, NULL, NULL, &_inner_error_); -#line 542 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_inner_error_ != NULL) { -#line 4433 "book.c" +#line 4457 "book.c" goto __catch1_g_error; } } @@ -4437,366 +4461,366 @@ void pdf_writer_write (PDFWriter* self, guint8* data, int data_length1) { __catch1_g_error: { GError* e = NULL; - GError* _tmp2_; - const gchar* _tmp3_; -#line 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + GError* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; +#line 532 "/home/bob/bzr/simple-scan/trunk/src/book.vala" e = _inner_error_; -#line 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 532 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _inner_error_ = NULL; -#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 538 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = e; -#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 538 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3_ = _tmp2_->message; -#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - g_warning ("book.vala:546: Error writing PDF: %s", _tmp3_); -#line 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 538 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + g_warning ("book.vala:538: Error writing PDF: %s", _tmp3_); +#line 532 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_error_free0 (e); -#line 4455 "book.c" +#line 4479 "book.c" } __finally1: -#line 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 532 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_inner_error_ != NULL) { -#line 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 532 "/home/bob/bzr/simple-scan/trunk/src/book.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 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 532 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_clear_error (&_inner_error_); -#line 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 532 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return; -#line 4466 "book.c" +#line 4490 "book.c" } -#line 548 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp4_ = self->offset; -#line 548 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5_ = data; -#line 548 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp5__length1 = data_length1; -#line 548 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->offset = _tmp4_ + _tmp5__length1; -#line 4476 "book.c" +#line 4500 "book.c" } static gchar* string_to_utf8 (const gchar* self, int* result_length1) { gchar* result = NULL; - gint _tmp0_; - gint _tmp1_; + gchar* _result_ = NULL; + gint _tmp0_ = 0; + gint _tmp1_ = 0; gchar* _tmp2_ = NULL; - gchar* _result_; - gint _result__length1; - gint __result__size_; - gint _tmp3_; - gchar* _tmp4_; - gint _tmp4__length1; - gint _tmp5_; - gint _tmp6_; - gchar* _tmp7_; - gint _tmp7__length1; -#line 1267 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" + gint _result__length1 = 0; + gint __result__size_ = 0; + gint _tmp3_ = 0; + gchar* _tmp4_ = NULL; + gint _tmp4__length1 = 0; + gint _tmp5_ = 0; + gint _tmp6_ = 0; + gchar* _tmp7_ = NULL; + gint _tmp7__length1 = 0; +#line 1266 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, NULL); -#line 1268 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1267 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp0_ = strlen (self); -#line 1268 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1267 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp1_ = _tmp0_; -#line 1268 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1267 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp2_ = g_new0 (gchar, _tmp1_ + 1); -#line 1268 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1267 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _result_ = _tmp2_; -#line 1268 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1267 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _result__length1 = _tmp1_ + 1; -#line 1268 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1267 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" __result__size_ = _result__length1; -#line 1269 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1268 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp3_ = _result__length1; -#line 1269 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1268 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _result__length1 = _tmp3_ - 1; -#line 1270 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1269 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp4_ = _result_; -#line 1270 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1269 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp4__length1 = _result__length1; -#line 1270 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1269 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp5_ = strlen (self); -#line 1270 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1269 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp6_ = _tmp5_; -#line 1270 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1269 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" memcpy (_tmp4_, self, (gsize) _tmp6_); -#line 1271 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1270 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp7_ = _result_; -#line 1271 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1270 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" _tmp7__length1 = _result__length1; -#line 1271 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1270 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" if (result_length1) { -#line 1271 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1270 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" *result_length1 = _tmp7__length1; -#line 4531 "book.c" +#line 4555 "book.c" } -#line 1271 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1270 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" result = _tmp7_; -#line 1271 "/usr/share/vala-0.20/vapi/glib-2.0.vapi" +#line 1270 "/usr/share/vala-0.22/vapi/glib-2.0.vapi" return result; -#line 4537 "book.c" +#line 4561 "book.c" } void pdf_writer_write_string (PDFWriter* self, const gchar* text) { - const gchar* _tmp0_; + const gchar* _tmp0_ = NULL; gint _tmp1_ = 0; gchar* _tmp2_ = NULL; - guint8* _tmp3_; - gint _tmp3__length1; -#line 551 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + guint8* _tmp3_ = NULL; + gint _tmp3__length1 = 0; +#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (self != NULL); -#line 551 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (text != NULL); -#line 553 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = text; -#line 553 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = string_to_utf8 (_tmp0_, &_tmp1_); -#line 553 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3_ = (guint8*) _tmp2_; -#line 553 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3__length1 = (_tmp1_ * sizeof (gchar)) / sizeof (guint8); -#line 553 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_write (self, _tmp3_, (_tmp1_ * sizeof (gchar)) / sizeof (guint8)); -#line 553 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3_ = (g_free (_tmp3_), NULL); -#line 4563 "book.c" +#line 4587 "book.c" } guint pdf_writer_start_object (PDFWriter* self) { guint result = 0U; - gsize _tmp0_; - GList* _tmp1_; + gsize _tmp0_ = 0UL; + GList* _tmp1_ = NULL; guint _tmp2_ = 0U; -#line 556 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 548 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (self != NULL, 0U); -#line 558 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 550 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = self->offset; -#line 558 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 550 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->object_offsets = g_list_append (self->object_offsets, (gpointer) ((guintptr) ((guint) _tmp0_))); -#line 559 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 551 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = self->object_offsets; -#line 559 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 551 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = g_list_length (_tmp1_); -#line 559 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 551 "/home/bob/bzr/simple-scan/trunk/src/book.vala" result = _tmp2_; -#line 559 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 551 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return result; -#line 4586 "book.c" +#line 4610 "book.c" } static void value_pdf_writer_init (GValue* value) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = NULL; -#line 4593 "book.c" +#line 4617 "book.c" } static void value_pdf_writer_free_value (GValue* value) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (value->data[0].v_pointer) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_unref (value->data[0].v_pointer); -#line 4602 "book.c" +#line 4626 "book.c" } } static void value_pdf_writer_copy_value (const GValue* src_value, GValue* dest_value) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (src_value->data[0].v_pointer) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" dest_value->data[0].v_pointer = pdf_writer_ref (src_value->data[0].v_pointer); -#line 4612 "book.c" +#line 4636 "book.c" } else { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" dest_value->data[0].v_pointer = NULL; -#line 4616 "book.c" +#line 4640 "book.c" } } static gpointer value_pdf_writer_peek_pointer (const GValue* value) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return value->data[0].v_pointer; -#line 4624 "book.c" +#line 4648 "book.c" } static gchar* value_pdf_writer_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (collect_values[0].v_pointer) { -#line 4631 "book.c" +#line 4655 "book.c" PDFWriter* object; object = collect_values[0].v_pointer; -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (object->parent_instance.g_class == NULL) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 4638 "book.c" +#line 4662 "book.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 4642 "book.c" +#line 4666 "book.c" } -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = pdf_writer_ref (object); -#line 4646 "book.c" +#line 4670 "book.c" } else { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = NULL; -#line 4650 "book.c" +#line 4674 "book.c" } -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return NULL; -#line 4654 "book.c" +#line 4678 "book.c" } static gchar* value_pdf_writer_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { PDFWriter** object_p; object_p = collect_values[0].v_pointer; -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (!object_p) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 4665 "book.c" +#line 4689 "book.c" } -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (!value->data[0].v_pointer) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" *object_p = NULL; -#line 4671 "book.c" +#line 4695 "book.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" *object_p = value->data[0].v_pointer; -#line 4675 "book.c" +#line 4699 "book.c" } else { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" *object_p = pdf_writer_ref (value->data[0].v_pointer); -#line 4679 "book.c" +#line 4703 "book.c" } -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return NULL; -#line 4683 "book.c" +#line 4707 "book.c" } GParamSpec* param_spec_pdf_writer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecPDFWriter* spec; -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_PDF_WRITER), NULL); -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" G_PARAM_SPEC (spec)->value_type = object_type; -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return G_PARAM_SPEC (spec); -#line 4697 "book.c" +#line 4721 "book.c" } gpointer value_get_pdf_writer (const GValue* value) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PDF_WRITER), NULL); -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return value->data[0].v_pointer; -#line 4706 "book.c" +#line 4730 "book.c" } void value_set_pdf_writer (GValue* value, gpointer v_object) { PDFWriter* old; -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PDF_WRITER)); -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" old = value->data[0].v_pointer; -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (v_object) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PDF_WRITER)); -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = v_object; -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_ref (value->data[0].v_pointer); -#line 4726 "book.c" +#line 4750 "book.c" } else { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = NULL; -#line 4730 "book.c" +#line 4754 "book.c" } -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (old) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_unref (old); -#line 4736 "book.c" +#line 4760 "book.c" } } void value_take_pdf_writer (GValue* value, gpointer v_object) { PDFWriter* old; -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PDF_WRITER)); -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" old = value->data[0].v_pointer; -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (v_object) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PDF_WRITER)); -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = v_object; -#line 4755 "book.c" +#line 4779 "book.c" } else { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = NULL; -#line 4759 "book.c" +#line 4783 "book.c" } -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (old) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_unref (old); -#line 4765 "book.c" +#line 4789 "book.c" } } static void pdf_writer_class_init (PDFWriterClass * klass) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" pdf_writer_parent_class = g_type_class_peek_parent (klass); -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" PDF_WRITER_CLASS (klass)->finalize = pdf_writer_finalize; -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_type_class_add_private (klass, sizeof (PDFWriterPrivate)); -#line 4777 "book.c" +#line 4801 "book.c" } static void pdf_writer_instance_init (PDFWriter * self) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->priv = PDF_WRITER_GET_PRIVATE (self); -#line 529 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 521 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->offset = (gsize) 0; -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->ref_count = 1; -#line 4788 "book.c" +#line 4812 "book.c" } static void pdf_writer_finalize (PDFWriter* obj) { PDFWriter * self; -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PDF_WRITER, PDFWriter); -#line 530 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 522 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_list_free0 (self->object_offsets); -#line 531 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 523 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_object_unref0 (self->priv->stream); -#line 4800 "book.c" +#line 4824 "book.c" } @@ -4817,24 +4841,24 @@ GType pdf_writer_get_type (void) { gpointer pdf_writer_ref (gpointer instance) { PDFWriter* self; self = instance; -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_atomic_int_inc (&self->ref_count); -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return instance; -#line 4825 "book.c" +#line 4849 "book.c" } void pdf_writer_unref (gpointer instance) { PDFWriter* self; self = instance; -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" PDF_WRITER_GET_CLASS (self)->finalize (self); -#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_type_free_instance ((GTypeInstance *) self); -#line 4838 "book.c" +#line 4862 "book.c" } } @@ -4842,69 +4866,69 @@ void pdf_writer_unref (gpointer instance) { static cairo_status_t _ps_writer_write_cairo_data_cairo_write_func_t (gpointer self, guchar* data, int data_length1) { cairo_status_t result; result = ps_writer_write_cairo_data (self, data, data_length1); -#line 571 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return result; -#line 4848 "book.c" +#line 4872 "book.c" } PsWriter* ps_writer_construct (GType object_type, GFileOutputStream* stream) { PsWriter* self = NULL; - GFileOutputStream* _tmp0_; - GFileOutputStream* _tmp1_; - cairo_surface_t* _tmp2_; -#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + GFileOutputStream* _tmp0_ = NULL; + GFileOutputStream* _tmp1_ = NULL; + cairo_surface_t* _tmp2_ = NULL; +#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (stream != NULL, NULL); -#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self = (PsWriter*) g_type_create_instance (object_type); -#line 570 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 562 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = stream; -#line 570 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 562 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = _g_object_ref0 (_tmp0_); -#line 570 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 562 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_object_unref0 (self->stream); -#line 570 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 562 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->stream = _tmp1_; -#line 571 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = cairo_ps_surface_create_for_stream (_ps_writer_write_cairo_data_cairo_write_func_t, self, (gdouble) 0, (gdouble) 0); -#line 571 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _cairo_surface_destroy0 (self->surface); -#line 571 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->surface = _tmp2_; -#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return self; -#line 4877 "book.c" +#line 4901 "book.c" } PsWriter* ps_writer_new (GFileOutputStream* stream) { -#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return ps_writer_construct (TYPE_PS_WRITER, stream); -#line 4884 "book.c" +#line 4908 "book.c" } static cairo_status_t ps_writer_write_cairo_data (PsWriter* self, guint8* data, int data_length1) { cairo_status_t result = 0; GError * _inner_error_ = NULL; -#line 574 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (self != NULL, 0); -#line 4893 "book.c" +#line 4917 "book.c" { - GFileOutputStream* _tmp0_; - guint8* _tmp1_; - gint _tmp1__length1; -#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + GFileOutputStream* _tmp0_ = NULL; + guint8* _tmp1_ = NULL; + gint _tmp1__length1 = 0; +#line 570 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp0_ = self->stream; -#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 570 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1_ = data; -#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 570 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp1__length1 = data_length1; -#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 570 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_output_stream_write_all ((GOutputStream*) _tmp0_, _tmp1_, (gsize) _tmp1__length1, NULL, NULL, &_inner_error_); -#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 570 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_inner_error_ != NULL) { -#line 4908 "book.c" +#line 4932 "book.c" goto __catch2_g_error; } } @@ -4912,250 +4936,250 @@ static cairo_status_t ps_writer_write_cairo_data (PsWriter* self, guint8* data, __catch2_g_error: { GError* e = NULL; - GError* _tmp2_; - const gchar* _tmp3_; -#line 576 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + GError* _tmp2_ = NULL; + const gchar* _tmp3_ = NULL; +#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala" e = _inner_error_; -#line 576 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _inner_error_ = NULL; -#line 582 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 574 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp2_ = e; -#line 582 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 574 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _tmp3_ = _tmp2_->message; -#line 582 "/home/bob/bzr/simple-scan/trunk/src/book.vala" - g_warning ("book.vala:582: Error writing data: %s", _tmp3_); -#line 583 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 574 "/home/bob/bzr/simple-scan/trunk/src/book.vala" + g_warning ("book.vala:574: Error writing data: %s", _tmp3_); +#line 575 "/home/bob/bzr/simple-scan/trunk/src/book.vala" result = CAIRO_STATUS_WRITE_ERROR; -#line 583 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 575 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_error_free0 (e); -#line 583 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 575 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return result; -#line 4934 "book.c" +#line 4958 "book.c" } __finally2: -#line 576 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (_inner_error_ != NULL) { -#line 576 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.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 576 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_clear_error (&_inner_error_); -#line 576 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return 0; -#line 4945 "book.c" +#line 4969 "book.c" } -#line 586 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala" result = CAIRO_STATUS_SUCCESS; -#line 586 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return result; -#line 4951 "book.c" +#line 4975 "book.c" } static void value_ps_writer_init (GValue* value) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = NULL; -#line 4958 "book.c" +#line 4982 "book.c" } static void value_ps_writer_free_value (GValue* value) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (value->data[0].v_pointer) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" ps_writer_unref (value->data[0].v_pointer); -#line 4967 "book.c" +#line 4991 "book.c" } } static void value_ps_writer_copy_value (const GValue* src_value, GValue* dest_value) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (src_value->data[0].v_pointer) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" dest_value->data[0].v_pointer = ps_writer_ref (src_value->data[0].v_pointer); -#line 4977 "book.c" +#line 5001 "book.c" } else { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" dest_value->data[0].v_pointer = NULL; -#line 4981 "book.c" +#line 5005 "book.c" } } static gpointer value_ps_writer_peek_pointer (const GValue* value) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return value->data[0].v_pointer; -#line 4989 "book.c" +#line 5013 "book.c" } static gchar* value_ps_writer_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (collect_values[0].v_pointer) { -#line 4996 "book.c" +#line 5020 "book.c" PsWriter* object; object = collect_values[0].v_pointer; -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (object->parent_instance.g_class == NULL) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 5003 "book.c" +#line 5027 "book.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 5007 "book.c" +#line 5031 "book.c" } -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = ps_writer_ref (object); -#line 5011 "book.c" +#line 5035 "book.c" } else { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = NULL; -#line 5015 "book.c" +#line 5039 "book.c" } -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return NULL; -#line 5019 "book.c" +#line 5043 "book.c" } static gchar* value_ps_writer_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { PsWriter** object_p; object_p = collect_values[0].v_pointer; -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (!object_p) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 5030 "book.c" +#line 5054 "book.c" } -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (!value->data[0].v_pointer) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" *object_p = NULL; -#line 5036 "book.c" +#line 5060 "book.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" *object_p = value->data[0].v_pointer; -#line 5040 "book.c" +#line 5064 "book.c" } else { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" *object_p = ps_writer_ref (value->data[0].v_pointer); -#line 5044 "book.c" +#line 5068 "book.c" } -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return NULL; -#line 5048 "book.c" +#line 5072 "book.c" } GParamSpec* param_spec_ps_writer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { ParamSpecPsWriter* spec; -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_PS_WRITER), NULL); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" G_PARAM_SPEC (spec)->value_type = object_type; -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return G_PARAM_SPEC (spec); -#line 5062 "book.c" +#line 5086 "book.c" } gpointer value_get_ps_writer (const GValue* value) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PS_WRITER), NULL); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return value->data[0].v_pointer; -#line 5071 "book.c" +#line 5095 "book.c" } void value_set_ps_writer (GValue* value, gpointer v_object) { PsWriter* old; -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PS_WRITER)); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" old = value->data[0].v_pointer; -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (v_object) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PS_WRITER)); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = v_object; -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" ps_writer_ref (value->data[0].v_pointer); -#line 5091 "book.c" +#line 5115 "book.c" } else { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = NULL; -#line 5095 "book.c" +#line 5119 "book.c" } -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (old) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" ps_writer_unref (old); -#line 5101 "book.c" +#line 5125 "book.c" } } void value_take_ps_writer (GValue* value, gpointer v_object) { PsWriter* old; -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PS_WRITER)); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" old = value->data[0].v_pointer; -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (v_object) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PS_WRITER)); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = v_object; -#line 5120 "book.c" +#line 5144 "book.c" } else { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" value->data[0].v_pointer = NULL; -#line 5124 "book.c" +#line 5148 "book.c" } -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (old) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" ps_writer_unref (old); -#line 5130 "book.c" +#line 5154 "book.c" } } static void ps_writer_class_init (PsWriterClass * klass) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" ps_writer_parent_class = g_type_class_peek_parent (klass); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" PS_WRITER_CLASS (klass)->finalize = ps_writer_finalize; -#line 5140 "book.c" +#line 5164 "book.c" } static void ps_writer_instance_init (PsWriter * self) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self->ref_count = 1; -#line 5147 "book.c" +#line 5171 "book.c" } static void ps_writer_finalize (PsWriter* obj) { PsWriter * self; -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PS_WRITER, PsWriter); -#line 565 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 557 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _cairo_surface_destroy0 (self->surface); -#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 558 "/home/bob/bzr/simple-scan/trunk/src/book.vala" _g_object_unref0 (self->stream); -#line 5159 "book.c" +#line 5183 "book.c" } @@ -5176,24 +5200,24 @@ GType ps_writer_get_type (void) { gpointer ps_writer_ref (gpointer instance) { PsWriter* self; self = instance; -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_atomic_int_inc (&self->ref_count); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" return instance; -#line 5184 "book.c" +#line 5208 "book.c" } void ps_writer_unref (gpointer instance) { PsWriter* self; self = instance; -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" if (g_atomic_int_dec_and_test (&self->ref_count)) { -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" PS_WRITER_GET_CLASS (self)->finalize (self); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala" +#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala" g_type_free_instance ((GTypeInstance *) self); -#line 5197 "book.c" +#line 5221 "book.c" } } |