summaryrefslogtreecommitdiff
path: root/src/book.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-12-01 22:31:35 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-12-01 22:31:35 +0100
commit3b43607cf603bd89df7e8c2946c18f30f3a9e027 (patch)
tree2f8d73cc63b6a47638adbdfc71d1357321eb71b9 /src/book.c
parenta41f8de32b97f575a37525a52531369c8ec52e7a (diff)
parent4cd367d92ab485c92a00042abc28188d1a751ca0 (diff)
Merge tag 'upstream/3.23.2'
Upstream version 3.23.2
Diffstat (limited to 'src/book.c')
-rw-r--r--src/book.c5605
1 files changed, 3200 insertions, 2405 deletions
diff --git a/src/book.c b/src/book.c
index 0a7e2e9..1e7f4eb 100644
--- a/src/book.c
+++ b/src/book.c
@@ -1,4 +1,4 @@
-/* book.c generated by valac 0.32.1, the Vala compiler
+/* book.c generated by valac 0.34.2, the Vala compiler
* generated from book.vala, do not modify */
/*
@@ -78,9 +78,9 @@ typedef struct _PsWriterPrivate PsWriterPrivate;
typedef struct _PDFWriter PDFWriter;
typedef struct _PDFWriterClass PDFWriterClass;
typedef struct _PDFWriterPrivate PDFWriterPrivate;
+#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _pdf_writer_unref0(var) ((var == NULL) ? NULL : (var = (pdf_writer_unref (var), NULL)))
typedef struct _ParamSpecBook ParamSpecBook;
-#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
typedef struct _ParamSpecPDFWriter ParamSpecPDFWriter;
typedef struct _ParamSpecPsWriter ParamSpecPsWriter;
@@ -119,7 +119,9 @@ struct _PDFWriter {
volatile int ref_count;
PDFWriterPrivate * priv;
gsize offset;
- GList* object_offsets;
+ guint* object_offsets;
+ gint object_offsets_length1;
+ gint _object_offsets_size_;
};
struct _PDFWriterClass {
@@ -214,13 +216,15 @@ 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);
+guint pdf_writer_add_object (PDFWriter* self);
void pdf_writer_write_string (PDFWriter* self, const gchar* text);
-guint pdf_writer_start_object (PDFWriter* self);
+void pdf_writer_start_object (PDFWriter* self, guint index);
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);
void pdf_writer_write (PDFWriter* self, guint8* data, int data_length1);
+static gint book_next_empty_object (PDFWriter* writer, gint start);
void book_save (Book* self, const gchar* type, gint quality, GFile* file, GError** error);
gboolean book_get_needs_saving (Book* self);
static void g_cclosure_user_marshal_VOID__PAGE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
@@ -243,28 +247,28 @@ static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify
static gpointer _page_ref0 (gpointer self) {
#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return self ? page_ref (self) : NULL;
-#line 247 "book.c"
+#line 251 "book.c"
}
static void _book_page_changed_cb_page_pixels_changed (Page* _sender, gpointer self) {
#line 47 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
book_page_changed_cb ((Book*) self, _sender);
-#line 254 "book.c"
+#line 258 "book.c"
}
static void _book_page_changed_cb_page_crop_changed (Page* _sender, gpointer self) {
#line 48 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
book_page_changed_cb ((Book*) self, _sender);
-#line 261 "book.c"
+#line 265 "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 268 "book.c"
+#line 272 "book.c"
}
@@ -273,7 +277,7 @@ 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 277 "book.c"
+#line 281 "book.c"
}
@@ -287,14 +291,14 @@ Book* book_construct (GType object_type) {
self->priv->pages = NULL;
#line 38 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return self;
-#line 291 "book.c"
+#line 295 "book.c"
}
Book* book_new (void) {
#line 38 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return book_construct (TYPE_BOOK);
-#line 298 "book.c"
+#line 302 "book.c"
}
@@ -304,7 +308,7 @@ void book_clear (Book* self) {
g_return_if_fail (self != NULL);
#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp0_ = self->priv->pages;
-#line 308 "book.c"
+#line 312 "book.c"
{
GList* page_collection = NULL;
GList* page_it = NULL;
@@ -312,14 +316,14 @@ void book_clear (Book* self) {
page_collection = _tmp0_;
#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 316 "book.c"
+#line 320 "book.c"
Page* _tmp1_ = NULL;
Page* page = NULL;
#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp1_ = _page_ref0 ((Page*) page_it->data);
#line 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
page = _tmp1_;
-#line 323 "book.c"
+#line 327 "book.c"
{
Page* _tmp2_ = NULL;
guint _tmp3_ = 0U;
@@ -339,7 +343,7 @@ void book_clear (Book* self) {
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 54 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_page_unref0 (page);
-#line 343 "book.c"
+#line 347 "book.c"
}
}
}
@@ -349,7 +353,7 @@ void book_clear (Book* self) {
self->priv->pages = NULL;
#line 60 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_signal_emit_by_name (self, "cleared");
-#line 353 "book.c"
+#line 357 "book.c"
}
@@ -360,7 +364,7 @@ static void book_page_changed_cb (Book* self, Page* page) {
g_return_if_fail (page != NULL);
#line 65 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
book_set_needs_saving (self, TRUE);
-#line 364 "book.c"
+#line 368 "book.c"
}
@@ -394,7 +398,7 @@ void book_append_page (Book* self, Page* page) {
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 398 "book.c"
+#line 402 "book.c"
}
@@ -423,7 +427,7 @@ void book_move_page (Book* self, Page* page, guint location) {
g_signal_emit_by_name (self, "reordered");
#line 83 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
book_set_needs_saving (self, TRUE);
-#line 427 "book.c"
+#line 431 "book.c"
}
@@ -437,7 +441,7 @@ void book_reverse (Book* self) {
new_pages = NULL;
#line 89 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp0_ = self->priv->pages;
-#line 441 "book.c"
+#line 445 "book.c"
{
GList* page_collection = NULL;
GList* page_it = NULL;
@@ -445,14 +449,14 @@ void book_reverse (Book* self) {
page_collection = _tmp0_;
#line 89 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
for (page_it = page_collection; page_it != NULL; page_it = page_it->next) {
-#line 449 "book.c"
+#line 453 "book.c"
Page* _tmp1_ = NULL;
Page* page = NULL;
#line 89 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp1_ = _page_ref0 ((Page*) page_it->data);
#line 89 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
page = _tmp1_;
-#line 456 "book.c"
+#line 460 "book.c"
{
Page* _tmp2_ = NULL;
Page* _tmp3_ = NULL;
@@ -464,7 +468,7 @@ void book_reverse (Book* self) {
new_pages = g_list_prepend (new_pages, _tmp3_);
#line 89 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_page_unref0 (page);
-#line 468 "book.c"
+#line 472 "book.c"
}
}
}
@@ -482,7 +486,7 @@ void book_reverse (Book* self) {
book_set_needs_saving (self, TRUE);
#line 86 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
__g_list_free__page_unref0_0 (new_pages);
-#line 486 "book.c"
+#line 490 "book.c"
}
@@ -508,32 +512,32 @@ void book_combine_sides (Book* self) {
n_front = _tmp1_ - (_tmp3_ / 2);
#line 100 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
new_pages = NULL;
-#line 512 "book.c"
+#line 516 "book.c"
{
gint i = 0;
#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
i = 0;
-#line 517 "book.c"
+#line 521 "book.c"
{
gboolean _tmp4_ = FALSE;
#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp4_ = TRUE;
#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
while (TRUE) {
-#line 524 "book.c"
+#line 528 "book.c"
gint _tmp6_ = 0;
guint _tmp7_ = 0U;
guint _tmp8_ = 0U;
gint _tmp9_ = 0;
#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (!_tmp4_) {
-#line 531 "book.c"
+#line 535 "book.c"
gint _tmp5_ = 0;
#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp5_ = i;
#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
i = _tmp5_ + 1;
-#line 537 "book.c"
+#line 541 "book.c"
}
#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp4_ = FALSE;
@@ -547,13 +551,13 @@ void book_combine_sides (Book* self) {
if (!(((guint) _tmp6_) < _tmp8_)) {
#line 101 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
break;
-#line 551 "book.c"
+#line 555 "book.c"
}
#line 103 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp9_ = i;
#line 103 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if ((_tmp9_ % 2) == 0) {
-#line 557 "book.c"
+#line 561 "book.c"
GList* _tmp10_ = NULL;
gint _tmp11_ = 0;
gconstpointer _tmp12_ = NULL;
@@ -568,7 +572,7 @@ void book_combine_sides (Book* self) {
_tmp13_ = _page_ref0 ((Page*) _tmp12_);
#line 104 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
new_pages = g_list_append (new_pages, _tmp13_);
-#line 572 "book.c"
+#line 576 "book.c"
} else {
GList* _tmp14_ = NULL;
guint _tmp15_ = 0U;
@@ -587,7 +591,7 @@ void book_combine_sides (Book* self) {
_tmp18_ = _page_ref0 ((Page*) _tmp17_);
#line 106 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
new_pages = g_list_append (new_pages, _tmp18_);
-#line 591 "book.c"
+#line 595 "book.c"
}
}
}
@@ -606,7 +610,7 @@ void book_combine_sides (Book* self) {
book_set_needs_saving (self, TRUE);
#line 97 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
__g_list_free__page_unref0_0 (new_pages);
-#line 610 "book.c"
+#line 614 "book.c"
}
@@ -617,32 +621,32 @@ void book_combine_sides_reverse (Book* self) {
g_return_if_fail (self != NULL);
#line 116 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
new_pages = NULL;
-#line 621 "book.c"
+#line 625 "book.c"
{
gint i = 0;
#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
i = 0;
-#line 626 "book.c"
+#line 630 "book.c"
{
gboolean _tmp0_ = FALSE;
#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp0_ = TRUE;
#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
while (TRUE) {
-#line 633 "book.c"
+#line 637 "book.c"
gint _tmp2_ = 0;
guint _tmp3_ = 0U;
guint _tmp4_ = 0U;
gint _tmp5_ = 0;
#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (!_tmp0_) {
-#line 640 "book.c"
+#line 644 "book.c"
gint _tmp1_ = 0;
#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp1_ = i;
#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
i = _tmp1_ + 1;
-#line 646 "book.c"
+#line 650 "book.c"
}
#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp0_ = FALSE;
@@ -656,13 +660,13 @@ void book_combine_sides_reverse (Book* self) {
if (!(((guint) _tmp2_) < _tmp4_)) {
#line 117 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
break;
-#line 660 "book.c"
+#line 664 "book.c"
}
#line 119 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp5_ = i;
#line 119 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if ((_tmp5_ % 2) == 0) {
-#line 666 "book.c"
+#line 670 "book.c"
GList* _tmp6_ = NULL;
gint _tmp7_ = 0;
gconstpointer _tmp8_ = NULL;
@@ -677,7 +681,7 @@ void book_combine_sides_reverse (Book* self) {
_tmp9_ = _page_ref0 ((Page*) _tmp8_);
#line 120 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
new_pages = g_list_append (new_pages, _tmp9_);
-#line 681 "book.c"
+#line 685 "book.c"
} else {
GList* _tmp10_ = NULL;
guint _tmp11_ = 0U;
@@ -699,7 +703,7 @@ void book_combine_sides_reverse (Book* self) {
_tmp15_ = _page_ref0 ((Page*) _tmp14_);
#line 122 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
new_pages = g_list_append (new_pages, _tmp15_);
-#line 703 "book.c"
+#line 707 "book.c"
}
}
}
@@ -718,7 +722,7 @@ void book_combine_sides_reverse (Book* self) {
book_set_needs_saving (self, TRUE);
#line 114 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
__g_list_free__page_unref0_0 (new_pages);
-#line 722 "book.c"
+#line 726 "book.c"
}
@@ -755,7 +759,7 @@ void book_delete_page (Book* self, Page* page) {
g_signal_emit_by_name (self, "page-removed", _tmp5_);
#line 136 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
book_set_needs_saving (self, TRUE);
-#line 759 "book.c"
+#line 763 "book.c"
}
@@ -772,7 +776,7 @@ Page* book_get_page (Book* self, gint page_number) {
_tmp0_ = page_number;
#line 141 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (_tmp0_ < 0) {
-#line 776 "book.c"
+#line 780 "book.c"
GList* _tmp1_ = NULL;
guint _tmp2_ = 0U;
gint _tmp3_ = 0;
@@ -784,7 +788,7 @@ Page* book_get_page (Book* self, gint page_number) {
_tmp3_ = page_number;
#line 142 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
page_number = ((gint) _tmp2_) + _tmp3_;
-#line 788 "book.c"
+#line 792 "book.c"
}
#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp4_ = self->priv->pages;
@@ -798,7 +802,7 @@ Page* book_get_page (Book* self, gint page_number) {
result = _tmp7_;
#line 143 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 802 "book.c"
+#line 806 "book.c"
}
@@ -821,7 +825,7 @@ guint book_get_page_index (Book* self, Page* page) {
result = (guint) _tmp2_;
#line 148 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 825 "book.c"
+#line 829 "book.c"
}
@@ -832,35 +836,35 @@ static gint string_last_index_of_char (const gchar* self, gunichar c, gint start
gunichar _tmp1_ = 0U;
gchar* _tmp2_ = NULL;
gchar* _tmp3_ = NULL;
-#line 1017 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1017 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, 0);
-#line 1018 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1018 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp0_ = start_index;
-#line 1018 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1018 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp1_ = c;
-#line 1018 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1018 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp2_ = g_utf8_strrchr (((gchar*) self) + _tmp0_, (gssize) -1, _tmp1_);
-#line 1018 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1018 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_result_ = _tmp2_;
-#line 1020 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1020 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp3_ = _result_;
-#line 1020 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1020 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
if (_tmp3_ != NULL) {
-#line 850 "book.c"
+#line 854 "book.c"
gchar* _tmp4_ = NULL;
-#line 1021 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1021 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp4_ = _result_;
-#line 1021 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1021 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
result = (gint) (_tmp4_ - ((gchar*) self));
-#line 1021 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1021 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
return result;
-#line 858 "book.c"
+#line 862 "book.c"
} else {
-#line 1023 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1023 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
result = -1;
-#line 1023 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1023 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
return result;
-#line 864 "book.c"
+#line 868 "book.c"
}
}
@@ -882,105 +886,105 @@ static gchar* string_slice (const gchar* self, glong start, glong end) {
glong _tmp19_ = 0L;
glong _tmp20_ = 0L;
gchar* _tmp21_ = NULL;
-#line 1328 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1328 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, NULL);
-#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1329 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp0_ = strlen (self);
-#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1329 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp1_ = _tmp0_;
-#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1329 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
string_length = (glong) _tmp1_;
-#line 1330 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1330 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp2_ = start;
-#line 1330 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1330 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
if (_tmp2_ < ((glong) 0)) {
-#line 898 "book.c"
+#line 902 "book.c"
glong _tmp3_ = 0L;
glong _tmp4_ = 0L;
-#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1331 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp3_ = string_length;
-#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1331 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp4_ = start;
-#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1331 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
start = _tmp3_ + _tmp4_;
-#line 907 "book.c"
+#line 911 "book.c"
}
-#line 1333 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1333 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp5_ = end;
-#line 1333 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1333 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
if (_tmp5_ < ((glong) 0)) {
-#line 913 "book.c"
+#line 917 "book.c"
glong _tmp6_ = 0L;
glong _tmp7_ = 0L;
-#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1334 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp6_ = string_length;
-#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1334 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp7_ = end;
-#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1334 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
end = _tmp6_ + _tmp7_;
-#line 922 "book.c"
+#line 926 "book.c"
}
-#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1336 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp9_ = start;
-#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1336 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
if (_tmp9_ >= ((glong) 0)) {
-#line 928 "book.c"
+#line 932 "book.c"
glong _tmp10_ = 0L;
glong _tmp11_ = 0L;
-#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1336 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp10_ = start;
-#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1336 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp11_ = string_length;
-#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1336 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp8_ = _tmp10_ <= _tmp11_;
-#line 937 "book.c"
+#line 941 "book.c"
} else {
-#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1336 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp8_ = FALSE;
-#line 941 "book.c"
+#line 945 "book.c"
}
-#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1336 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
g_return_val_if_fail (_tmp8_, NULL);
-#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1337 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp13_ = end;
-#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1337 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
if (_tmp13_ >= ((glong) 0)) {
-#line 949 "book.c"
+#line 953 "book.c"
glong _tmp14_ = 0L;
glong _tmp15_ = 0L;
-#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1337 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp14_ = end;
-#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1337 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp15_ = string_length;
-#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1337 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp12_ = _tmp14_ <= _tmp15_;
-#line 958 "book.c"
+#line 962 "book.c"
} else {
-#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1337 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp12_ = FALSE;
-#line 962 "book.c"
+#line 966 "book.c"
}
-#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1337 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
g_return_val_if_fail (_tmp12_, NULL);
-#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1338 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp16_ = start;
-#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1338 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp17_ = end;
-#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1338 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL);
-#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1339 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp18_ = start;
-#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1339 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp19_ = end;
-#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1339 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp20_ = start;
-#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1339 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_));
-#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1339 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
result = _tmp21_;
-#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1339 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
return result;
-#line 984 "book.c"
+#line 988 "book.c"
}
@@ -1036,7 +1040,7 @@ static GFile* book_make_indexed_file (Book* self, const gchar* uri, gint i) {
_tmp1_ = _tmp0_;
#line 153 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (_tmp1_ == ((guint) 1)) {
-#line 1040 "book.c"
+#line 1044 "book.c"
const gchar* _tmp2_ = NULL;
GFile* _tmp3_ = NULL;
#line 154 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
@@ -1047,7 +1051,7 @@ static GFile* book_make_indexed_file (Book* self, const gchar* uri, gint i) {
result = _tmp3_;
#line 154 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 1051 "book.c"
+#line 1055 "book.c"
}
#line 157 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp4_ = uri;
@@ -1075,7 +1079,7 @@ static GFile* book_make_indexed_file (Book* self, const gchar* uri, gint i) {
_tmp11_ = extension_index;
#line 160 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (_tmp11_ >= 0) {
-#line 1079 "book.c"
+#line 1083 "book.c"
const gchar* _tmp12_ = NULL;
gint _tmp13_ = 0;
const gchar* _tmp14_ = NULL;
@@ -1126,7 +1130,7 @@ static GFile* book_make_indexed_file (Book* self, const gchar* uri, gint i) {
_g_free0 (prefix);
#line 163 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
prefix = _tmp25_;
-#line 1130 "book.c"
+#line 1134 "book.c"
}
#line 165 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp26_ = book_get_n_pages (self);
@@ -1202,7 +1206,7 @@ static GFile* book_make_indexed_file (Book* self, const gchar* uri, gint i) {
_g_free0 (basename);
#line 168 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 1206 "book.c"
+#line 1210 "book.c"
}
@@ -1214,19 +1218,19 @@ static void book_save_multi_file (Book* self, const gchar* type, gint quality, G
g_return_if_fail (type != NULL);
#line 171 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (file != NULL);
-#line 1218 "book.c"
+#line 1222 "book.c"
{
gint i = 0;
#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
i = 0;
-#line 1223 "book.c"
+#line 1227 "book.c"
{
gboolean _tmp0_ = FALSE;
#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp0_ = TRUE;
#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
while (TRUE) {
-#line 1230 "book.c"
+#line 1234 "book.c"
gint _tmp2_ = 0;
guint _tmp3_ = 0U;
guint _tmp4_ = 0U;
@@ -1245,13 +1249,13 @@ static void book_save_multi_file (Book* self, const gchar* type, gint quality, G
gint _tmp16_ = 0;
#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (!_tmp0_) {
-#line 1249 "book.c"
+#line 1253 "book.c"
gint _tmp1_ = 0;
#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp1_ = i;
#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
i = _tmp1_ + 1;
-#line 1255 "book.c"
+#line 1259 "book.c"
}
#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp0_ = FALSE;
@@ -1265,7 +1269,7 @@ static void book_save_multi_file (Book* self, const gchar* type, gint quality, G
if (!(((guint) _tmp2_) < _tmp4_)) {
#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
break;
-#line 1269 "book.c"
+#line 1273 "book.c"
}
#line 175 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp5_ = i;
@@ -1305,7 +1309,7 @@ static void book_save_multi_file (Book* self, const gchar* type, gint quality, G
_page_unref0 (page);
#line 176 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return;
-#line 1309 "book.c"
+#line 1313 "book.c"
}
#line 177 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp16_ = i;
@@ -1313,7 +1317,7 @@ static void book_save_multi_file (Book* self, const gchar* type, gint quality, G
g_signal_emit_by_name (self, "saving", _tmp16_);
#line 173 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_page_unref0 (page);
-#line 1317 "book.c"
+#line 1321 "book.c"
}
}
}
@@ -1358,14 +1362,14 @@ static void book_save_ps_pdf_surface (Book* self, cairo_surface_t* surface, GdkP
cairo_paint (context);
#line 181 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_cairo_destroy0 (context);
-#line 1362 "book.c"
+#line 1366 "book.c"
}
static gpointer _cairo_surface_reference0 (gpointer self) {
#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return self ? cairo_surface_reference (self) : NULL;
-#line 1369 "book.c"
+#line 1373 "book.c"
}
@@ -1396,7 +1400,7 @@ static void book_save_ps (Book* self, GFile* file, GError** error) {
g_propagate_error (error, _inner_error_);
#line 192 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return;
-#line 1400 "book.c"
+#line 1404 "book.c"
}
#line 193 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp2_ = ps_writer_new (stream);
@@ -1410,19 +1414,19 @@ static void book_save_ps (Book* self, GFile* file, GError** error) {
_tmp5_ = _cairo_surface_reference0 (_tmp4_);
#line 194 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
surface = _tmp5_;
-#line 1414 "book.c"
+#line 1418 "book.c"
{
gint i = 0;
#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
i = 0;
-#line 1419 "book.c"
+#line 1423 "book.c"
{
gboolean _tmp6_ = FALSE;
#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp6_ = TRUE;
#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
while (TRUE) {
-#line 1426 "book.c"
+#line 1430 "book.c"
gint _tmp8_ = 0;
guint _tmp9_ = 0U;
guint _tmp10_ = 0U;
@@ -1458,13 +1462,13 @@ static void book_save_ps (Book* self, GFile* file, GError** error) {
gint _tmp36_ = 0;
#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (!_tmp6_) {
-#line 1462 "book.c"
+#line 1466 "book.c"
gint _tmp7_ = 0;
#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp7_ = i;
#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
i = _tmp7_ + 1;
-#line 1468 "book.c"
+#line 1472 "book.c"
}
#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp6_ = FALSE;
@@ -1478,7 +1482,7 @@ static void book_save_ps (Book* self, GFile* file, GError** error) {
if (!(((guint) _tmp8_) < _tmp10_)) {
#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
break;
-#line 1482 "book.c"
+#line 1486 "book.c"
}
#line 198 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp11_ = i;
@@ -1552,7 +1556,7 @@ static void book_save_ps (Book* self, GFile* file, GError** error) {
_g_object_unref0 (image);
#line 196 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_page_unref0 (page);
-#line 1556 "book.c"
+#line 1560 "book.c"
}
}
}
@@ -1562,7 +1566,7 @@ static void book_save_ps (Book* self, GFile* file, GError** error) {
_ps_writer_unref0 (writer);
#line 190 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_g_object_unref0 (stream);
-#line 1566 "book.c"
+#line 1570 "book.c"
}
@@ -1624,7 +1628,7 @@ static guint8* book_compress_zlib (Book* self, guint8* data, int data_length1, i
stream.avail_out = _tmp3__length1;
#line 216 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
while (TRUE) {
-#line 1628 "book.c"
+#line 1632 "book.c"
z_stream _tmp4_ = {0};
guint _tmp5_ = 0U;
gint _tmp6_ = 0;
@@ -1636,7 +1640,7 @@ static guint8* book_compress_zlib (Book* self, guint8* data, int data_length1, i
if (!(_tmp5_ > ((guint) 0))) {
#line 216 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
break;
-#line 1640 "book.c"
+#line 1644 "book.c"
}
#line 218 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp6_ = deflate (&stream, (gint) Z_FINISH);
@@ -1644,7 +1648,7 @@ static guint8* book_compress_zlib (Book* self, guint8* data, int data_length1, i
if (_tmp6_ == ((gint) Z_STREAM_ERROR)) {
#line 219 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
break;
-#line 1648 "book.c"
+#line 1652 "book.c"
}
}
#line 222 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
@@ -1653,7 +1657,7 @@ static guint8* book_compress_zlib (Book* self, guint8* data, int data_length1, i
_tmp8_ = _tmp7_.avail_in;
#line 222 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (_tmp8_ > ((guint) 0)) {
-#line 1657 "book.c"
+#line 1661 "book.c"
guint8* _tmp9_ = NULL;
gint _tmp9__length1 = 0;
#line 223 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
@@ -1664,7 +1668,7 @@ static guint8* book_compress_zlib (Book* self, guint8* data, int data_length1, i
if (result_length1) {
#line 223 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
*result_length1 = _tmp9__length1;
-#line 1668 "book.c"
+#line 1672 "book.c"
}
#line 223 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
result = _tmp9_;
@@ -1674,7 +1678,7 @@ static guint8* book_compress_zlib (Book* self, guint8* data, int data_length1, i
deflateEnd (&stream);
#line 223 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 1678 "book.c"
+#line 1682 "book.c"
}
#line 225 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp10_ = data;
@@ -1706,7 +1710,7 @@ static guint8* book_compress_zlib (Book* self, guint8* data, int data_length1, i
if (result_length1) {
#line 228 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
*result_length1 = _tmp15__length1;
-#line 1710 "book.c"
+#line 1714 "book.c"
}
#line 228 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
result = _tmp15_;
@@ -1714,7 +1718,7 @@ static guint8* book_compress_zlib (Book* self, guint8* data, int data_length1, i
deflateEnd (&stream);
#line 228 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 1718 "book.c"
+#line 1722 "book.c"
}
@@ -1723,7 +1727,7 @@ static gboolean _book_write_pixbuf_data_gdk_pixbuf_save_func (guint8* buf, gsize
result = book_write_pixbuf_data ((Book*) self, buf, buf_length1, error);
#line 240 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 1727 "book.c"
+#line 1731 "book.c"
}
@@ -1826,7 +1830,7 @@ static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gint quality, g
values_length1 = 5;
#line 237 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_values_size_ = values_length1;
-#line 1830 "book.c"
+#line 1834 "book.c"
{
GdkPixbuf* _tmp14_ = NULL;
#line 240 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
@@ -1835,7 +1839,7 @@ static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gint quality, g
gdk_pixbuf_save_to_callbackv (_tmp14_, _book_write_pixbuf_data_gdk_pixbuf_save_func, self, "jpeg", keys, values, &_inner_error_);
#line 240 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 1839 "book.c"
+#line 1843 "book.c"
goto __catch0_g_error;
}
}
@@ -1849,7 +1853,7 @@ static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gint quality, g
_inner_error_ = NULL;
#line 238 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_g_error_free0 (e);
-#line 1853 "book.c"
+#line 1857 "book.c"
}
__finally0:
#line 238 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
@@ -1864,7 +1868,7 @@ static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gint quality, g
g_clear_error (&_inner_error_);
#line 238 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return NULL;
-#line 1868 "book.c"
+#line 1872 "book.c"
}
#line 245 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp15_ = self->priv->jpeg_data;
@@ -1894,7 +1898,7 @@ static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gint quality, g
if (result_length1) {
#line 248 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
*result_length1 = _tmp17__length1;
-#line 1898 "book.c"
+#line 1902 "book.c"
}
#line 248 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
result = _tmp17_;
@@ -1904,7 +1908,7 @@ static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gint quality, g
keys = (_vala_array_free (keys, keys_length1, (GDestroyNotify) g_free), NULL);
#line 248 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 1908 "book.c"
+#line 1912 "book.c"
}
@@ -1927,21 +1931,42 @@ static gboolean book_write_pixbuf_data (Book* self, guint8* buf, int buf_length1
result = TRUE;
#line 254 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 1931 "book.c"
+#line 1935 "book.c"
+}
+
+
+static gchar* g_unichar_to_string (gunichar self) {
+ gchar* result = NULL;
+ gchar* str = NULL;
+ gchar* _tmp0_ = NULL;
+ const gchar* _tmp1_ = NULL;
+#line 941 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
+ _tmp0_ = g_new0 (gchar, 7);
+#line 941 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
+ str = (gchar*) _tmp0_;
+#line 942 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
+ _tmp1_ = str;
+#line 942 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
+ g_unichar_to_utf8 (self, _tmp1_);
+#line 943 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
+ result = str;
+#line 943 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
+ return result;
+#line 1956 "book.c"
}
static guint8* _vala_array_dup1 (guint8* self, int length) {
-#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return g_memdup (self, length * sizeof (guint8));
-#line 1938 "book.c"
+#line 1963 "book.c"
}
static guint8* _vala_array_dup2 (guint8* self, int length) {
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return g_memdup (self, length * sizeof (guint8));
-#line 1945 "book.c"
+#line 1970 "book.c"
}
@@ -1953,99 +1978,176 @@ static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error
GFileOutputStream* _tmp10_ = NULL;
PDFWriter* writer = NULL;
PDFWriter* _tmp11_ = NULL;
- PDFWriter* _tmp12_ = NULL;
- PDFWriter* _tmp13_ = NULL;
guint catalog_number = 0U;
+ PDFWriter* _tmp12_ = NULL;
+ guint _tmp13_ = 0U;
+ guint metadata_number = 0U;
PDFWriter* _tmp14_ = NULL;
guint _tmp15_ = 0U;
+ guint pages_number = 0U;
PDFWriter* _tmp16_ = NULL;
guint _tmp17_ = 0U;
- gchar* _tmp18_ = NULL;
- gchar* _tmp19_ = NULL;
- PDFWriter* _tmp20_ = NULL;
- PDFWriter* _tmp21_ = NULL;
- PDFWriter* _tmp22_ = NULL;
+ guint info_number = 0U;
+ PDFWriter* _tmp18_ = NULL;
+ guint _tmp19_ = 0U;
+ guint* page_numbers = NULL;
+ guint _tmp20_ = 0U;
+ guint _tmp21_ = 0U;
+ guint* _tmp22_ = NULL;
+ gint page_numbers_length1 = 0;
+ gint _page_numbers_size_ = 0;
+ guint* page_image_numbers = NULL;
guint _tmp23_ = 0U;
- gchar* _tmp24_ = NULL;
- gchar* _tmp25_ = NULL;
- PDFWriter* _tmp26_ = NULL;
- PDFWriter* _tmp27_ = NULL;
- PDFWriter* _tmp28_ = NULL;
- guint pages_number = 0U;
- PDFWriter* _tmp29_ = NULL;
- guint _tmp30_ = 0U;
- PDFWriter* _tmp31_ = NULL;
- guint _tmp32_ = 0U;
- gchar* _tmp33_ = NULL;
- gchar* _tmp34_ = NULL;
- PDFWriter* _tmp35_ = NULL;
- PDFWriter* _tmp36_ = NULL;
- PDFWriter* _tmp37_ = NULL;
- PDFWriter* _tmp48_ = NULL;
+ guint _tmp24_ = 0U;
+ guint* _tmp25_ = NULL;
+ gint page_image_numbers_length1 = 0;
+ gint _page_image_numbers_size_ = 0;
+ guint* page_content_numbers = NULL;
+ guint _tmp26_ = 0U;
+ guint _tmp27_ = 0U;
+ guint* _tmp28_ = NULL;
+ gint page_content_numbers_length1 = 0;
+ gint _page_content_numbers_size_ = 0;
+ guint struct_tree_root_number = 0U;
PDFWriter* _tmp49_ = NULL;
guint _tmp50_ = 0U;
- guint _tmp51_ = 0U;
- gchar* _tmp52_ = NULL;
- gchar* _tmp53_ = NULL;
- PDFWriter* _tmp54_ = NULL;
+ PDFWriter* _tmp51_ = NULL;
+ PDFWriter* _tmp52_ = NULL;
+ PDFWriter* _tmp53_ = NULL;
+ guint _tmp54_ = 0U;
PDFWriter* _tmp55_ = NULL;
- PDFWriter* _tmp366_ = NULL;
- guint info_number = 0U;
- PDFWriter* _tmp367_ = NULL;
- guint _tmp368_ = 0U;
- PDFWriter* _tmp369_ = NULL;
- guint _tmp370_ = 0U;
- gchar* _tmp371_ = NULL;
- gchar* _tmp372_ = NULL;
- PDFWriter* _tmp373_ = NULL;
- PDFWriter* _tmp374_ = NULL;
- gchar* _tmp375_ = NULL;
- gchar* _tmp376_ = NULL;
- PDFWriter* _tmp377_ = NULL;
- PDFWriter* _tmp378_ = NULL;
- PDFWriter* _tmp379_ = NULL;
+ guint _tmp56_ = 0U;
+ gchar* _tmp57_ = NULL;
+ gchar* _tmp58_ = NULL;
+ PDFWriter* _tmp59_ = NULL;
+ PDFWriter* _tmp60_ = NULL;
+ PDFWriter* _tmp61_ = NULL;
+ guint _tmp62_ = 0U;
+ gchar* _tmp63_ = NULL;
+ gchar* _tmp64_ = NULL;
+ PDFWriter* _tmp65_ = NULL;
+ PDFWriter* _tmp66_ = NULL;
+ guint _tmp67_ = 0U;
+ gchar* _tmp68_ = NULL;
+ gchar* _tmp69_ = NULL;
+ PDFWriter* _tmp70_ = NULL;
+ guint _tmp71_ = 0U;
+ gchar* _tmp72_ = NULL;
+ gchar* _tmp73_ = NULL;
+ PDFWriter* _tmp74_ = NULL;
+ PDFWriter* _tmp75_ = NULL;
+ GDateTime* now = NULL;
+ GDateTime* _tmp76_ = NULL;
+ gchar* date_string = NULL;
+ GDateTime* _tmp77_ = NULL;
+ gchar* _tmp78_ = NULL;
+ gchar* metadata = NULL;
+ gchar* _tmp79_ = NULL;
+ gchar* _tmp80_ = NULL;
+ const gchar* _tmp81_ = NULL;
+ const gchar* _tmp82_ = NULL;
+ const gchar* _tmp83_ = NULL;
+ gchar* _tmp84_ = NULL;
+ gchar* _tmp85_ = NULL;
+ PDFWriter* _tmp86_ = NULL;
+ PDFWriter* _tmp87_ = NULL;
+ guint _tmp88_ = 0U;
+ PDFWriter* _tmp89_ = NULL;
+ guint _tmp90_ = 0U;
+ gchar* _tmp91_ = NULL;
+ gchar* _tmp92_ = NULL;
+ PDFWriter* _tmp93_ = NULL;
+ PDFWriter* _tmp94_ = NULL;
+ PDFWriter* _tmp95_ = NULL;
+ PDFWriter* _tmp96_ = NULL;
+ const gchar* _tmp97_ = NULL;
+ gint _tmp98_ = 0;
+ gint _tmp99_ = 0;
+ gchar* _tmp100_ = NULL;
+ gchar* _tmp101_ = NULL;
+ PDFWriter* _tmp102_ = NULL;
+ PDFWriter* _tmp103_ = NULL;
+ PDFWriter* _tmp104_ = NULL;
+ const gchar* _tmp105_ = NULL;
+ PDFWriter* _tmp106_ = NULL;
+ PDFWriter* _tmp107_ = NULL;
+ PDFWriter* _tmp108_ = NULL;
+ PDFWriter* _tmp109_ = NULL;
+ PDFWriter* _tmp110_ = NULL;
+ guint _tmp111_ = 0U;
+ PDFWriter* _tmp112_ = NULL;
+ guint _tmp113_ = 0U;
+ gchar* _tmp114_ = NULL;
+ gchar* _tmp115_ = NULL;
+ PDFWriter* _tmp116_ = NULL;
+ PDFWriter* _tmp117_ = NULL;
+ PDFWriter* _tmp118_ = NULL;
+ PDFWriter* _tmp130_ = NULL;
+ PDFWriter* _tmp131_ = NULL;
+ guint _tmp132_ = 0U;
+ guint _tmp133_ = 0U;
+ gchar* _tmp134_ = NULL;
+ gchar* _tmp135_ = NULL;
+ PDFWriter* _tmp136_ = NULL;
+ PDFWriter* _tmp137_ = NULL;
+ PDFWriter* _tmp475_ = NULL;
+ PDFWriter* _tmp476_ = NULL;
+ guint _tmp477_ = 0U;
+ PDFWriter* _tmp478_ = NULL;
+ guint _tmp479_ = 0U;
+ gchar* _tmp480_ = NULL;
+ gchar* _tmp481_ = NULL;
+ PDFWriter* _tmp482_ = NULL;
+ PDFWriter* _tmp483_ = NULL;
+ gchar* _tmp484_ = NULL;
+ gchar* _tmp485_ = NULL;
+ PDFWriter* _tmp486_ = NULL;
+ PDFWriter* _tmp487_ = NULL;
+ PDFWriter* _tmp488_ = NULL;
gsize xref_offset = 0UL;
- PDFWriter* _tmp380_ = NULL;
- gsize _tmp381_ = 0UL;
- PDFWriter* _tmp382_ = NULL;
- PDFWriter* _tmp383_ = NULL;
- PDFWriter* _tmp384_ = NULL;
- GList* _tmp385_ = NULL;
- guint _tmp386_ = 0U;
- gchar* _tmp387_ = NULL;
- gchar* _tmp388_ = NULL;
- PDFWriter* _tmp389_ = NULL;
- PDFWriter* _tmp390_ = NULL;
- GList* _tmp391_ = NULL;
- PDFWriter* _tmp396_ = NULL;
- PDFWriter* _tmp397_ = NULL;
- PDFWriter* _tmp398_ = NULL;
- PDFWriter* _tmp399_ = NULL;
- PDFWriter* _tmp400_ = NULL;
- GList* _tmp401_ = NULL;
- guint _tmp402_ = 0U;
- gchar* _tmp403_ = NULL;
- gchar* _tmp404_ = NULL;
- PDFWriter* _tmp405_ = NULL;
- guint _tmp406_ = 0U;
- gchar* _tmp407_ = NULL;
- gchar* _tmp408_ = NULL;
- PDFWriter* _tmp409_ = NULL;
- guint _tmp410_ = 0U;
- gchar* _tmp411_ = NULL;
- gchar* _tmp412_ = NULL;
- PDFWriter* _tmp413_ = NULL;
- const gchar* _tmp414_ = NULL;
- const gchar* _tmp415_ = NULL;
- gchar* _tmp416_ = NULL;
- gchar* _tmp417_ = NULL;
- PDFWriter* _tmp418_ = NULL;
- PDFWriter* _tmp419_ = NULL;
- PDFWriter* _tmp420_ = NULL;
- gsize _tmp421_ = 0UL;
- gchar* _tmp422_ = NULL;
- gchar* _tmp423_ = NULL;
- PDFWriter* _tmp424_ = NULL;
+ PDFWriter* _tmp489_ = NULL;
+ gsize _tmp490_ = 0UL;
+ PDFWriter* _tmp491_ = NULL;
+ PDFWriter* _tmp492_ = NULL;
+ PDFWriter* _tmp493_ = NULL;
+ guint* _tmp494_ = NULL;
+ gint _tmp494__length1 = 0;
+ gchar* _tmp495_ = NULL;
+ gchar* _tmp496_ = NULL;
+ PDFWriter* _tmp497_ = NULL;
+ PDFWriter* _tmp498_ = NULL;
+ gint _tmp499_ = 0;
+ gchar* _tmp500_ = NULL;
+ gchar* _tmp501_ = NULL;
+ PDFWriter* _tmp524_ = NULL;
+ PDFWriter* _tmp525_ = NULL;
+ PDFWriter* _tmp526_ = NULL;
+ PDFWriter* _tmp527_ = NULL;
+ PDFWriter* _tmp528_ = NULL;
+ guint* _tmp529_ = NULL;
+ gint _tmp529__length1 = 0;
+ gchar* _tmp530_ = NULL;
+ gchar* _tmp531_ = NULL;
+ PDFWriter* _tmp532_ = NULL;
+ guint _tmp533_ = 0U;
+ gchar* _tmp534_ = NULL;
+ gchar* _tmp535_ = NULL;
+ PDFWriter* _tmp536_ = NULL;
+ guint _tmp537_ = 0U;
+ gchar* _tmp538_ = NULL;
+ gchar* _tmp539_ = NULL;
+ PDFWriter* _tmp540_ = NULL;
+ const gchar* _tmp541_ = NULL;
+ const gchar* _tmp542_ = NULL;
+ gchar* _tmp543_ = NULL;
+ gchar* _tmp544_ = NULL;
+ PDFWriter* _tmp545_ = NULL;
+ PDFWriter* _tmp546_ = NULL;
+ PDFWriter* _tmp547_ = NULL;
+ gsize _tmp548_ = 0UL;
+ gchar* _tmp549_ = NULL;
+ gchar* _tmp550_ = NULL;
+ PDFWriter* _tmp551_ = NULL;
GError * _inner_error_ = NULL;
#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (self != NULL);
@@ -2055,19 +2157,19 @@ static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error
_tmp0_ = g_strdup ("");
#line 260 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
id = _tmp0_;
-#line 2059 "book.c"
+#line 2161 "book.c"
{
gint i = 0;
#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
i = 0;
-#line 2064 "book.c"
+#line 2166 "book.c"
{
gboolean _tmp1_ = FALSE;
#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp1_ = TRUE;
#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
while (TRUE) {
-#line 2071 "book.c"
+#line 2173 "book.c"
gint _tmp3_ = 0;
const gchar* _tmp4_ = NULL;
guint32 _tmp5_ = 0U;
@@ -2076,13 +2178,13 @@ static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error
gchar* _tmp8_ = NULL;
#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (!_tmp1_) {
-#line 2080 "book.c"
+#line 2182 "book.c"
gint _tmp2_ = 0;
#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp2_ = i;
#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
i = _tmp2_ + 1;
-#line 2086 "book.c"
+#line 2188 "book.c"
}
#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp1_ = FALSE;
@@ -2092,7 +2194,7 @@ static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error
if (!(_tmp3_ < 4)) {
#line 261 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
break;
-#line 2096 "book.c"
+#line 2198 "book.c"
}
#line 262 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp4_ = id;
@@ -2110,7 +2212,7 @@ static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error
id = _tmp8_;
#line 262 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_g_free0 (_tmp7_);
-#line 2114 "book.c"
+#line 2216 "book.c"
}
}
}
@@ -2128,7 +2230,7 @@ static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error
_g_free0 (id);
#line 264 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return;
-#line 2132 "book.c"
+#line 2234 "book.c"
}
#line 265 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp11_ = pdf_writer_new (stream);
@@ -2137,2137 +2239,2769 @@ static void book_save_pdf (Book* self, GFile* file, gint quality, GError** error
#line 268 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp12_ = writer;
#line 268 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp12_, "%PDF-1.3\n");
+ _tmp13_ = pdf_writer_add_object (_tmp12_);
+#line 268 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ catalog_number = _tmp13_;
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp14_ = writer;
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp15_ = pdf_writer_add_object (_tmp14_);
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ metadata_number = _tmp15_;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp16_ = writer;
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp17_ = pdf_writer_add_object (_tmp16_);
+#line 270 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pages_number = _tmp17_;
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp18_ = writer;
#line 271 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp13_ = writer;
+ _tmp19_ = pdf_writer_add_object (_tmp18_);
#line 271 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp13_, "%\xe2\xe3\xcf\xd3\n");
+ info_number = _tmp19_;
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp20_ = book_get_n_pages (self);
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp21_ = _tmp20_;
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp22_ = g_new0 (guint, _tmp21_);
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_numbers = _tmp22_;
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_numbers_length1 = _tmp21_;
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _page_numbers_size_ = page_numbers_length1;
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp23_ = book_get_n_pages (self);
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp24_ = _tmp23_;
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp25_ = g_new0 (guint, _tmp24_);
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_image_numbers = _tmp25_;
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_image_numbers_length1 = _tmp24_;
+#line 273 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _page_image_numbers_size_ = page_image_numbers_length1;
#line 274 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp14_ = writer;
+ _tmp26_ = book_get_n_pages (self);
#line 274 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp15_ = pdf_writer_start_object (_tmp14_);
+ _tmp27_ = _tmp26_;
#line 274 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- catalog_number = _tmp15_;
-#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp16_ = writer;
-#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp17_ = catalog_number;
-#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp18_ = g_strdup_printf ("%u 0 obj\n", _tmp17_);
-#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp19_ = _tmp18_;
-#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp16_, _tmp19_);
-#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp19_);
-#line 276 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp20_ = writer;
-#line 276 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp20_, "<<\n");
-#line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp21_ = writer;
-#line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp21_, "/Type /Catalog\n");
-#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp22_ = writer;
-#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp23_ = catalog_number;
-#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp24_ = g_strdup_printf ("/Pages %u 0 R\n", _tmp23_ + 1);
-#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp25_ = _tmp24_;
-#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp22_, _tmp25_);
-#line 280 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp25_);
-#line 281 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp26_ = writer;
-#line 281 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp26_, ">>\n");
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp27_ = writer;
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp27_, "endobj\n");
-#line 300 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp28_ = writer;
-#line 300 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp28_, "\n");
-#line 301 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp29_ = writer;
-#line 301 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp30_ = pdf_writer_start_object (_tmp29_);
-#line 301 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pages_number = _tmp30_;
-#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp31_ = writer;
-#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp32_ = pages_number;
-#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp33_ = g_strdup_printf ("%u 0 obj\n", _tmp32_);
-#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp34_ = _tmp33_;
-#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp31_, _tmp34_);
-#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp34_);
-#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp35_ = writer;
-#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp35_, "<<\n");
-#line 304 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp36_ = writer;
-#line 304 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp36_, "/Type /Pages\n");
-#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp37_ = writer;
-#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp37_, "/Kids [");
-#line 2226 "book.c"
+ _tmp28_ = g_new0 (guint, _tmp27_);
+#line 274 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_content_numbers = _tmp28_;
+#line 274 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_content_numbers_length1 = _tmp27_;
+#line 274 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _page_content_numbers_size_ = page_content_numbers_length1;
+#line 2300 "book.c"
{
gint i = 0;
-#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
i = 0;
-#line 2231 "book.c"
+#line 2305 "book.c"
{
- gboolean _tmp38_ = FALSE;
-#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp38_ = TRUE;
-#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ gboolean _tmp29_ = FALSE;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp29_ = TRUE;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
while (TRUE) {
-#line 2238 "book.c"
+#line 2312 "book.c"
+ gint _tmp31_ = 0;
+ guint _tmp32_ = 0U;
+ guint _tmp33_ = 0U;
+ guint* _tmp34_ = NULL;
+ gint _tmp34__length1 = 0;
+ gint _tmp35_ = 0;
+ PDFWriter* _tmp36_ = NULL;
+ guint _tmp37_ = 0U;
+ guint _tmp38_ = 0U;
+ guint* _tmp39_ = NULL;
+ gint _tmp39__length1 = 0;
gint _tmp40_ = 0;
- guint _tmp41_ = 0U;
+ PDFWriter* _tmp41_ = NULL;
guint _tmp42_ = 0U;
- PDFWriter* _tmp43_ = NULL;
- guint _tmp44_ = 0U;
+ guint _tmp43_ = 0U;
+ guint* _tmp44_ = NULL;
+ gint _tmp44__length1 = 0;
gint _tmp45_ = 0;
- gchar* _tmp46_ = NULL;
- gchar* _tmp47_ = NULL;
-#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!_tmp38_) {
-#line 2249 "book.c"
- gint _tmp39_ = 0;
-#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp39_ = i;
-#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- i = _tmp39_ + 1;
-#line 2255 "book.c"
+ PDFWriter* _tmp46_ = NULL;
+ guint _tmp47_ = 0U;
+ guint _tmp48_ = 0U;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp29_) {
+#line 2336 "book.c"
+ gint _tmp30_ = 0;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp30_ = i;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = _tmp30_ + 1;
+#line 2342 "book.c"
}
-#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp38_ = FALSE;
-#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp40_ = i;
-#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp41_ = book_get_n_pages (self);
-#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp42_ = _tmp41_;
-#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!(((guint) _tmp40_) < _tmp42_)) {
-#line 306 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp29_ = FALSE;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp31_ = i;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp32_ = book_get_n_pages (self);
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp33_ = _tmp32_;
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(((guint) _tmp31_) < _tmp33_)) {
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
break;
-#line 2269 "book.c"
+#line 2356 "book.c"
}
-#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp43_ = writer;
-#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp44_ = pages_number;
-#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp34_ = page_numbers;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp34__length1 = page_numbers_length1;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp35_ = i;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp36_ = writer;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp37_ = pdf_writer_add_object (_tmp36_);
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp34_[_tmp35_] = _tmp37_;
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp38_ = _tmp34_[_tmp35_];
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp39_ = page_image_numbers;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp39__length1 = page_image_numbers_length1;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp40_ = i;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp41_ = writer;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp42_ = pdf_writer_add_object (_tmp41_);
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp39_[_tmp40_] = _tmp42_;
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp43_ = _tmp39_[_tmp40_];
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp44_ = page_content_numbers;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp44__length1 = page_content_numbers_length1;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp45_ = i;
-#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp46_ = g_strdup_printf (" %u 0 R", (_tmp44_ + 1) + (_tmp45_ * 3));
-#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp47_ = _tmp46_;
-#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp43_, _tmp47_);
-#line 307 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp47_);
-#line 2285 "book.c"
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp46_ = writer;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp47_ = pdf_writer_add_object (_tmp46_);
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp44_[_tmp45_] = _tmp47_;
+#line 279 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp48_ = _tmp44_[_tmp45_];
+#line 2400 "book.c"
}
}
}
-#line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp48_ = writer;
-#line 308 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp48_, " ]\n");
-#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp49_ = writer;
-#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp50_ = book_get_n_pages (self);
-#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp51_ = _tmp50_;
-#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp52_ = g_strdup_printf ("/Count %u\n", _tmp51_);
-#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp53_ = _tmp52_;
-#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp49_, _tmp53_);
-#line 309 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp53_);
-#line 310 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp54_ = writer;
-#line 310 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp54_, ">>\n");
-#line 311 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp50_ = pdf_writer_add_object (_tmp49_);
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ struct_tree_root_number = _tmp50_;
+#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp51_ = writer;
+#line 284 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp51_, "%PDF-1.3\n");
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp52_ = writer;
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp52_, "%\xe2\xe3\xcf\xd3\n");
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp53_ = writer;
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp54_ = catalog_number;
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_start_object (_tmp53_, _tmp54_);
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp55_ = writer;
-#line 311 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp55_, "endobj\n");
-#line 2315 "book.c"
- {
- gint i = 0;
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- i = 0;
-#line 2320 "book.c"
- {
- gboolean _tmp56_ = FALSE;
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp56_ = TRUE;
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- while (TRUE) {
-#line 2327 "book.c"
- gint _tmp58_ = 0;
- guint _tmp59_ = 0U;
- guint _tmp60_ = 0U;
- Page* page = NULL;
- gint _tmp61_ = 0;
- Page* _tmp62_ = NULL;
- GdkPixbuf* image = NULL;
- Page* _tmp63_ = NULL;
- GdkPixbuf* _tmp64_ = NULL;
- gint width = 0;
- GdkPixbuf* _tmp65_ = NULL;
- gint _tmp66_ = 0;
- gint _tmp67_ = 0;
- gint height = 0;
- GdkPixbuf* _tmp68_ = NULL;
- gint _tmp69_ = 0;
- gint _tmp70_ = 0;
- guint8* pixels = NULL;
- GdkPixbuf* _tmp71_ = NULL;
- guint8* _tmp72_ = NULL;
- gint pixels_length1 = 0;
- gint _pixels_size_ = 0;
- gdouble page_width = 0.0;
- gint _tmp73_ = 0;
- Page* _tmp74_ = NULL;
- gint _tmp75_ = 0;
- gint _tmp76_ = 0;
- gdouble page_height = 0.0;
- gint _tmp77_ = 0;
- Page* _tmp78_ = NULL;
- gint _tmp79_ = 0;
- gint _tmp80_ = 0;
- gint depth = 0;
- gchar* color_space = NULL;
- gchar* _tmp81_ = NULL;
- gchar* filter = NULL;
- gchar* width_buffer = NULL;
- gchar* _tmp82_ = NULL;
- gint width_buffer_length1 = 0;
- gint _width_buffer_size_ = 0;
- gchar* height_buffer = NULL;
- gchar* _tmp83_ = NULL;
- gint height_buffer_length1 = 0;
- gint _height_buffer_size_ = 0;
- guint8* data = NULL;
- gint data_length1 = 0;
- gint _data_size_ = 0;
- Page* _tmp84_ = NULL;
- gboolean _tmp85_ = FALSE;
- gboolean _tmp86_ = FALSE;
- guint8* compressed_data = NULL;
- guint8* _tmp240_ = NULL;
- gint _tmp240__length1 = 0;
- gint _tmp241_ = 0;
- guint8* _tmp242_ = NULL;
- gint compressed_data_length1 = 0;
- gint _compressed_data_size_ = 0;
- guint8* _tmp243_ = NULL;
- gint _tmp243__length1 = 0;
- PDFWriter* _tmp261_ = NULL;
- guint number = 0U;
- PDFWriter* _tmp262_ = NULL;
- guint _tmp263_ = 0U;
- PDFWriter* _tmp264_ = NULL;
- guint _tmp265_ = 0U;
- gchar* _tmp266_ = NULL;
- gchar* _tmp267_ = NULL;
- PDFWriter* _tmp268_ = NULL;
- PDFWriter* _tmp269_ = NULL;
- PDFWriter* _tmp270_ = NULL;
- guint _tmp271_ = 0U;
- gchar* _tmp272_ = NULL;
- gchar* _tmp273_ = NULL;
- PDFWriter* _tmp274_ = NULL;
- gint _tmp275_ = 0;
- guint _tmp276_ = 0U;
- gchar* _tmp277_ = NULL;
- gchar* _tmp278_ = NULL;
- PDFWriter* _tmp279_ = NULL;
- gdouble _tmp280_ = 0.0;
- gchar* _tmp281_ = NULL;
- gint _tmp281__length1 = 0;
- const gchar* _tmp282_ = NULL;
- gdouble _tmp283_ = 0.0;
- gchar* _tmp284_ = NULL;
- gint _tmp284__length1 = 0;
- const gchar* _tmp285_ = NULL;
- gchar* _tmp286_ = NULL;
- gchar* _tmp287_ = NULL;
- PDFWriter* _tmp288_ = NULL;
- guint _tmp289_ = 0U;
- gchar* _tmp290_ = NULL;
- gchar* _tmp291_ = NULL;
- PDFWriter* _tmp292_ = NULL;
- PDFWriter* _tmp293_ = NULL;
- PDFWriter* _tmp294_ = NULL;
- PDFWriter* _tmp295_ = NULL;
- guint _tmp296_ = 0U;
- PDFWriter* _tmp297_ = NULL;
- guint _tmp298_ = 0U;
- gchar* _tmp299_ = NULL;
- gchar* _tmp300_ = NULL;
- PDFWriter* _tmp301_ = NULL;
- PDFWriter* _tmp302_ = NULL;
- PDFWriter* _tmp303_ = NULL;
- PDFWriter* _tmp304_ = NULL;
- gint _tmp305_ = 0;
- gchar* _tmp306_ = NULL;
- gchar* _tmp307_ = NULL;
- PDFWriter* _tmp308_ = NULL;
- gint _tmp309_ = 0;
- gchar* _tmp310_ = NULL;
- gchar* _tmp311_ = NULL;
- PDFWriter* _tmp312_ = NULL;
- const gchar* _tmp313_ = NULL;
- gchar* _tmp314_ = NULL;
- gchar* _tmp315_ = NULL;
- PDFWriter* _tmp316_ = NULL;
- gint _tmp317_ = 0;
- gchar* _tmp318_ = NULL;
- gchar* _tmp319_ = NULL;
- PDFWriter* _tmp320_ = NULL;
- guint8* _tmp321_ = NULL;
- gint _tmp321__length1 = 0;
- gchar* _tmp322_ = NULL;
- gchar* _tmp323_ = NULL;
- const gchar* _tmp324_ = NULL;
- PDFWriter* _tmp329_ = NULL;
- PDFWriter* _tmp330_ = NULL;
- PDFWriter* _tmp331_ = NULL;
- guint8* _tmp332_ = NULL;
- gint _tmp332__length1 = 0;
- PDFWriter* _tmp333_ = NULL;
- PDFWriter* _tmp334_ = NULL;
- PDFWriter* _tmp335_ = NULL;
- gchar* command = NULL;
- gdouble _tmp336_ = 0.0;
- gchar* _tmp337_ = NULL;
- gint _tmp337__length1 = 0;
- const gchar* _tmp338_ = NULL;
- gdouble _tmp339_ = 0.0;
- gchar* _tmp340_ = NULL;
- gint _tmp340__length1 = 0;
- const gchar* _tmp341_ = NULL;
- gint _tmp342_ = 0;
- gchar* _tmp343_ = NULL;
- PDFWriter* _tmp344_ = NULL;
- PDFWriter* _tmp345_ = NULL;
- guint _tmp346_ = 0U;
- PDFWriter* _tmp347_ = NULL;
- guint _tmp348_ = 0U;
- gchar* _tmp349_ = NULL;
- gchar* _tmp350_ = NULL;
- PDFWriter* _tmp351_ = NULL;
- PDFWriter* _tmp352_ = NULL;
- const gchar* _tmp353_ = NULL;
- gint _tmp354_ = 0;
- gint _tmp355_ = 0;
- gchar* _tmp356_ = NULL;
- gchar* _tmp357_ = NULL;
- PDFWriter* _tmp358_ = NULL;
- PDFWriter* _tmp359_ = NULL;
- PDFWriter* _tmp360_ = NULL;
- const gchar* _tmp361_ = NULL;
- PDFWriter* _tmp362_ = NULL;
- PDFWriter* _tmp363_ = NULL;
- PDFWriter* _tmp364_ = NULL;
- gint _tmp365_ = 0;
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!_tmp56_) {
-#line 2498 "book.c"
- gint _tmp57_ = 0;
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp57_ = i;
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- i = _tmp57_ + 1;
-#line 2504 "book.c"
- }
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp56_ = FALSE;
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp58_ = i;
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp59_ = book_get_n_pages (self);
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp60_ = _tmp59_;
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!(((guint) _tmp58_) < _tmp60_)) {
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- break;
-#line 2518 "book.c"
- }
-#line 315 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp61_ = i;
-#line 315 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp62_ = book_get_page (self, _tmp61_);
-#line 315 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- page = _tmp62_;
-#line 316 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp63_ = page;
-#line 316 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp64_ = page_get_image (_tmp63_, TRUE);
-#line 316 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- image = _tmp64_;
-#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp65_ = image;
-#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp66_ = gdk_pixbuf_get_width (_tmp65_);
-#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp67_ = _tmp66_;
-#line 317 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- width = _tmp67_;
-#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp68_ = image;
-#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp69_ = gdk_pixbuf_get_height (_tmp68_);
-#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp70_ = _tmp69_;
-#line 318 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- height = _tmp70_;
-#line 319 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp71_ = image;
-#line 319 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp72_ = gdk_pixbuf_get_pixels (_tmp71_);
-#line 319 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pixels = _tmp72_;
-#line 319 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pixels_length1 = -1;
-#line 319 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _pixels_size_ = pixels_length1;
-#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp73_ = width;
-#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp74_ = page;
-#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp75_ = page_get_dpi (_tmp74_);
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp56_ = catalog_number;
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp57_ = g_strdup_printf ("%u 0 obj\n", _tmp56_);
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp58_ = _tmp57_;
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp55_, _tmp58_);
+#line 291 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp58_);
+#line 292 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp59_ = writer;
+#line 292 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp59_, "<<\n");
+#line 293 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp60_ = writer;
+#line 293 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp60_, "/Type /Catalog\n");
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp61_ = writer;
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp62_ = metadata_number;
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp63_ = g_strdup_printf ("/Metadata %u 0 R\n", _tmp62_);
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp64_ = _tmp63_;
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp61_, _tmp64_);
+#line 294 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp64_);
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp65_ = writer;
+#line 295 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp65_, "/MarkInfo << /Marked true >>\n");
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp66_ = writer;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp67_ = struct_tree_root_number;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp68_ = g_strdup_printf ("/StructTreeRoot %u 0 R\n", _tmp67_);
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp69_ = _tmp68_;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp66_, _tmp69_);
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp69_);
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp70_ = writer;
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp71_ = pages_number;
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp72_ = g_strdup_printf ("/Pages %u 0 R\n", _tmp71_);
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp73_ = _tmp72_;
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp70_, _tmp73_);
+#line 297 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp73_);
+#line 298 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp74_ = writer;
+#line 298 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp74_, ">>\n");
+#line 299 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp75_ = writer;
+#line 299 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp75_, "endobj\n");
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp76_ = g_date_time_new_now_local ();
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ now = _tmp76_;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp77_ = now;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp78_ = g_date_time_format (_tmp77_, "%FT%H:%M:%S%:z");
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ date_string = _tmp78_;
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp79_ = g_unichar_to_string ((gunichar) 0xFEFF);
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp80_ = _tmp79_;
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp81_ = date_string;
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp82_ = date_string;
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp83_ = date_string;
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp84_ = g_strdup_printf ("<?xpacket begin=\"%s\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>\n" \
+"<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n" \
+" xmlns:xmp=\"http://ns.adobe.com/xap/1.0/\">\n" \
+" <rdf:Description rdf:about=\"\"\n" \
+" xmlns:pdfaid=\"http://www.aiim.org/pdfa/ns/id/\"\n" \
+" xmlns:xmp=\"http://ns.adobe.com/xap/1.0/\">\n" \
+" <pdfaid:part>1</pdfaid:part>\n" \
+" <pdfaid:conformance>A</pdfaid:conformance>\n" \
+" <xmp:CreatorTool>Simple Scan %s</xmp:CreatorTool>\n" \
+" <xmp:CreateDate>%s</xmp:CreateDate>\n" \
+" <xmp:ModifyDate>%s</xmp:ModifyDate>\n" \
+" <xmp:MetadataDate>%s</xmp:MetadataDate>\n" \
+" </rdf:Description>\n" \
+"</rdf:RDF>\n" \
+"<?xpacket end=\"w\"?>", _tmp80_, VERSION, _tmp81_, _tmp82_, _tmp83_);
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp85_ = _tmp84_;
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp80_);
+#line 305 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ metadata = _tmp85_;
#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp76_ = _tmp75_;
+ _tmp86_ = writer;
#line 320 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- page_width = (_tmp73_ * 72.0) / _tmp76_;
+ pdf_writer_write_string (_tmp86_, "\n");
#line 321 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp77_ = height;
+ _tmp87_ = writer;
#line 321 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp78_ = page;
+ _tmp88_ = metadata_number;
#line 321 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp79_ = page_get_dpi (_tmp78_);
-#line 321 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp80_ = _tmp79_;
-#line 321 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- page_height = (_tmp77_ * 72.0) / _tmp80_;
+ pdf_writer_start_object (_tmp87_, _tmp88_);
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp89_ = writer;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp90_ = metadata_number;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp91_ = g_strdup_printf ("%u 0 obj\n", _tmp90_);
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp92_ = _tmp91_;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp89_, _tmp92_);
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp92_);
#line 323 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- depth = 8;
+ _tmp93_ = writer;
+#line 323 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp93_, "<<\n");
#line 324 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp81_ = g_strdup ("DeviceRGB");
+ _tmp94_ = writer;
#line 324 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- color_space = _tmp81_;
+ pdf_writer_write_string (_tmp94_, "/Type /Metadata\n");
#line 325 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- filter = NULL;
+ _tmp95_ = writer;
+#line 325 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp95_, "/Subtype /XML\n");
#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp82_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
+ _tmp96_ = writer;
#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- width_buffer = _tmp82_;
+ _tmp97_ = metadata;
#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- width_buffer_length1 = G_ASCII_DTOSTR_BUF_SIZE;
+ _tmp98_ = strlen (_tmp97_);
#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _width_buffer_size_ = width_buffer_length1;
-#line 327 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp83_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
-#line 327 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- height_buffer = _tmp83_;
+ _tmp99_ = _tmp98_;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp100_ = g_strdup_printf ("/Length %u\n", (guint) _tmp99_);
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp101_ = _tmp100_;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp96_, _tmp101_);
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp101_);
#line 327 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- height_buffer_length1 = G_ASCII_DTOSTR_BUF_SIZE;
+ _tmp102_ = writer;
#line 327 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _height_buffer_size_ = height_buffer_length1;
-#line 329 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp84_ = page;
+ pdf_writer_write_string (_tmp102_, ">>\n");
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp103_ = writer;
+#line 328 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp103_, "stream\n");
#line 329 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp85_ = page_get_is_color (_tmp84_);
+ _tmp104_ = writer;
#line 329 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp86_ = _tmp85_;
+ _tmp105_ = metadata;
#line 329 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (_tmp86_) {
-#line 2610 "book.c"
- gchar* _tmp87_ = NULL;
- gint data_length = 0;
- gint _tmp88_ = 0;
- gint _tmp89_ = 0;
- gint _tmp90_ = 0;
- guint8* _tmp91_ = NULL;
+ pdf_writer_write_string (_tmp104_, _tmp105_);
+#line 330 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp106_ = writer;
+#line 330 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp106_, "\n");
#line 331 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- depth = 8;
-#line 332 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp87_ = g_strdup ("DeviceRGB");
+ _tmp107_ = writer;
+#line 331 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp107_, "endstream\n");
#line 332 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (color_space);
+ _tmp108_ = writer;
#line 332 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- color_space = _tmp87_;
-#line 333 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp88_ = height;
-#line 333 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp89_ = width;
-#line 333 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data_length = (_tmp88_ * _tmp89_) * 3;
-#line 334 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp90_ = data_length;
-#line 334 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp91_ = g_new0 (guint8, _tmp90_);
-#line 334 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data = (g_free (data), NULL);
-#line 334 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data = _tmp91_;
-#line 334 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data_length1 = _tmp90_;
-#line 334 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _data_size_ = data_length1;
-#line 2643 "book.c"
- {
- gint row = 0;
+ pdf_writer_write_string (_tmp108_, "endobj\n");
#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- row = 0;
-#line 2648 "book.c"
- {
- gboolean _tmp92_ = FALSE;
+ _tmp109_ = writer;
#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp92_ = TRUE;
-#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- while (TRUE) {
-#line 2655 "book.c"
- gint _tmp94_ = 0;
- gint _tmp95_ = 0;
- gint in_offset = 0;
- gint _tmp96_ = 0;
- GdkPixbuf* _tmp97_ = NULL;
- gint _tmp98_ = 0;
- gint _tmp99_ = 0;
- gint out_offset = 0;
- gint _tmp100_ = 0;
- gint _tmp101_ = 0;
-#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!_tmp92_) {
-#line 2668 "book.c"
- gint _tmp93_ = 0;
-#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp93_ = row;
-#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- row = _tmp93_ + 1;
-#line 2674 "book.c"
- }
-#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp92_ = FALSE;
-#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp94_ = row;
-#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp95_ = height;
-#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!(_tmp94_ < _tmp95_)) {
-#line 335 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- break;
-#line 2686 "book.c"
- }
+ pdf_writer_write_string (_tmp109_, "\n");
+#line 336 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp110_ = writer;
+#line 336 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp111_ = pages_number;
+#line 336 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_start_object (_tmp110_, _tmp111_);
#line 337 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp96_ = row;
+ _tmp112_ = writer;
#line 337 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp97_ = image;
+ _tmp113_ = pages_number;
#line 337 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp98_ = gdk_pixbuf_get_rowstride (_tmp97_);
+ _tmp114_ = g_strdup_printf ("%u 0 obj\n", _tmp113_);
#line 337 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp99_ = _tmp98_;
+ _tmp115_ = _tmp114_;
#line 337 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- in_offset = _tmp96_ * _tmp99_;
-#line 338 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp100_ = row;
+ pdf_writer_write_string (_tmp112_, _tmp115_);
+#line 337 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp115_);
#line 338 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp101_ = width;
+ _tmp116_ = writer;
#line 338 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- out_offset = (_tmp100_ * _tmp101_) * 3;
-#line 2704 "book.c"
- {
- gint x = 0;
-#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- x = 0;
-#line 2709 "book.c"
- {
- gboolean _tmp102_ = FALSE;
+ pdf_writer_write_string (_tmp116_, "<<\n");
#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp102_ = TRUE;
+ _tmp117_ = writer;
#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- while (TRUE) {
-#line 2716 "book.c"
- gint _tmp104_ = 0;
- gint _tmp105_ = 0;
- gint in_o = 0;
- gint _tmp106_ = 0;
- gint _tmp107_ = 0;
- gint out_o = 0;
- gint _tmp108_ = 0;
- gint _tmp109_ = 0;
- guint8* _tmp110_ = NULL;
- gint _tmp110__length1 = 0;
- gint _tmp111_ = 0;
- guint8* _tmp112_ = NULL;
- gint _tmp112__length1 = 0;
- gint _tmp113_ = 0;
- guint8 _tmp114_ = 0U;
- guint8 _tmp115_ = 0U;
- guint8* _tmp116_ = NULL;
- gint _tmp116__length1 = 0;
- gint _tmp117_ = 0;
- guint8* _tmp118_ = NULL;
- gint _tmp118__length1 = 0;
- gint _tmp119_ = 0;
- guint8 _tmp120_ = 0U;
- guint8 _tmp121_ = 0U;
- guint8* _tmp122_ = NULL;
- gint _tmp122__length1 = 0;
- gint _tmp123_ = 0;
- guint8* _tmp124_ = NULL;
- gint _tmp124__length1 = 0;
- gint _tmp125_ = 0;
- guint8 _tmp126_ = 0U;
- guint8 _tmp127_ = 0U;
-#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!_tmp102_) {
-#line 2751 "book.c"
- gint _tmp103_ = 0;
-#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp103_ = x;
-#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- x = _tmp103_ + 1;
-#line 2757 "book.c"
- }
-#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp102_ = FALSE;
-#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp104_ = x;
-#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp105_ = width;
-#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!(_tmp104_ < _tmp105_)) {
-#line 339 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- break;
-#line 2769 "book.c"
- }
+ pdf_writer_write_string (_tmp117_, "/Type /Pages\n");
+#line 340 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp118_ = writer;
+#line 340 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp118_, "/Kids [");
+#line 2630 "book.c"
+ {
+ gint i = 0;
#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp106_ = in_offset;
+ i = 0;
+#line 2635 "book.c"
+ {
+ gboolean _tmp119_ = FALSE;
#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp107_ = x;
+ _tmp119_ = TRUE;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 2642 "book.c"
+ gint _tmp121_ = 0;
+ guint _tmp122_ = 0U;
+ guint _tmp123_ = 0U;
+ PDFWriter* _tmp124_ = NULL;
+ guint* _tmp125_ = NULL;
+ gint _tmp125__length1 = 0;
+ gint _tmp126_ = 0;
+ guint _tmp127_ = 0U;
+ gchar* _tmp128_ = NULL;
+ gchar* _tmp129_ = NULL;
#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- in_o = _tmp106_ + (_tmp107_ * 3);
+ if (!_tmp119_) {
+#line 2655 "book.c"
+ gint _tmp120_ = 0;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp120_ = i;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = _tmp120_ + 1;
+#line 2661 "book.c"
+ }
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp119_ = FALSE;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp121_ = i;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp122_ = book_get_n_pages (self);
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp123_ = _tmp122_;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(((guint) _tmp121_) < _tmp123_)) {
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 2675 "book.c"
+ }
#line 342 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp108_ = out_offset;
+ _tmp124_ = writer;
#line 342 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp109_ = x;
+ _tmp125_ = page_numbers;
#line 342 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- out_o = _tmp108_ + (_tmp109_ * 3);
-#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp110_ = data;
-#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp110__length1 = data_length1;
+ _tmp125__length1 = page_numbers_length1;
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp126_ = i;
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp127_ = _tmp125_[_tmp126_];
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp128_ = g_strdup_printf (" %u 0 R", _tmp127_);
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp129_ = _tmp128_;
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp124_, _tmp129_);
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp129_);
+#line 2695 "book.c"
+ }
+ }
+ }
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp130_ = writer;
+#line 343 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp130_, " ]\n");
#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp111_ = out_o;
+ _tmp131_ = writer;
#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp112_ = pixels;
+ _tmp132_ = book_get_n_pages (self);
#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp112__length1 = pixels_length1;
+ _tmp133_ = _tmp132_;
#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp113_ = in_o;
+ _tmp134_ = g_strdup_printf ("/Count %u\n", _tmp133_);
#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp114_ = _tmp112_[_tmp113_];
+ _tmp135_ = _tmp134_;
#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp110_[_tmp111_] = _tmp114_;
+ pdf_writer_write_string (_tmp131_, _tmp135_);
#line 344 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp115_ = _tmp110_[_tmp111_];
-#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp116_ = data;
-#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp116__length1 = data_length1;
-#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp117_ = out_o;
-#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp118_ = pixels;
-#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp118__length1 = pixels_length1;
-#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp119_ = in_o;
-#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp120_ = _tmp118_[_tmp119_ + 1];
+ _g_free0 (_tmp135_);
#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp116_[_tmp117_ + 1] = _tmp120_;
+ _tmp136_ = writer;
#line 345 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp121_ = _tmp116_[_tmp117_ + 1];
+ pdf_writer_write_string (_tmp136_, ">>\n");
#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp122_ = data;
+ _tmp137_ = writer;
#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp122__length1 = data_length1;
-#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp123_ = out_o;
-#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp124_ = pixels;
-#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp124__length1 = pixels_length1;
-#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp125_ = in_o;
-#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp126_ = _tmp124_[_tmp125_ + 2];
-#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp122_[_tmp123_ + 2] = _tmp126_;
-#line 346 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp127_ = _tmp122_[_tmp123_ + 2];
-#line 2837 "book.c"
- }
- }
- }
- }
- }
- }
- } else {
- Page* _tmp128_ = NULL;
- gint _tmp129_ = 0;
- gint _tmp130_ = 0;
-#line 350 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp128_ = page;
+ pdf_writer_write_string (_tmp137_, "endobj\n");
+#line 2725 "book.c"
+ {
+ gint i = 0;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = 0;
+#line 2730 "book.c"
+ {
+ gboolean _tmp138_ = FALSE;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp138_ = TRUE;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 2737 "book.c"
+ gint _tmp140_ = 0;
+ guint _tmp141_ = 0U;
+ guint _tmp142_ = 0U;
+ Page* page = NULL;
+ gint _tmp143_ = 0;
+ Page* _tmp144_ = NULL;
+ GdkPixbuf* image = NULL;
+ Page* _tmp145_ = NULL;
+ GdkPixbuf* _tmp146_ = NULL;
+ gint width = 0;
+ GdkPixbuf* _tmp147_ = NULL;
+ gint _tmp148_ = 0;
+ gint _tmp149_ = 0;
+ gint height = 0;
+ GdkPixbuf* _tmp150_ = NULL;
+ gint _tmp151_ = 0;
+ gint _tmp152_ = 0;
+ guint8* pixels = NULL;
+ GdkPixbuf* _tmp153_ = NULL;
+ guint8* _tmp154_ = NULL;
+ gint pixels_length1 = 0;
+ gint _pixels_size_ = 0;
+ gdouble page_width = 0.0;
+ gint _tmp155_ = 0;
+ Page* _tmp156_ = NULL;
+ gint _tmp157_ = 0;
+ gint _tmp158_ = 0;
+ gdouble page_height = 0.0;
+ gint _tmp159_ = 0;
+ Page* _tmp160_ = NULL;
+ gint _tmp161_ = 0;
+ gint _tmp162_ = 0;
+ gint depth = 0;
+ gchar* color_space = NULL;
+ gchar* _tmp163_ = NULL;
+ gchar* filter = NULL;
+ gchar* width_buffer = NULL;
+ gchar* _tmp164_ = NULL;
+ gint width_buffer_length1 = 0;
+ gint _width_buffer_size_ = 0;
+ gchar* height_buffer = NULL;
+ gchar* _tmp165_ = NULL;
+ gint height_buffer_length1 = 0;
+ gint _height_buffer_size_ = 0;
+ guint8* data = NULL;
+ gint data_length1 = 0;
+ gint _data_size_ = 0;
+ Page* _tmp166_ = NULL;
+ gboolean _tmp167_ = FALSE;
+ gboolean _tmp168_ = FALSE;
+ guint8* compressed_data = NULL;
+ guint8* _tmp322_ = NULL;
+ gint _tmp322__length1 = 0;
+ gint _tmp323_ = 0;
+ guint8* _tmp324_ = NULL;
+ gint compressed_data_length1 = 0;
+ gint _compressed_data_size_ = 0;
+ guint8* _tmp325_ = NULL;
+ gint _tmp325__length1 = 0;
+ PDFWriter* _tmp343_ = NULL;
+ PDFWriter* _tmp344_ = NULL;
+ guint* _tmp345_ = NULL;
+ gint _tmp345__length1 = 0;
+ gint _tmp346_ = 0;
+ guint _tmp347_ = 0U;
+ PDFWriter* _tmp348_ = NULL;
+ guint* _tmp349_ = NULL;
+ gint _tmp349__length1 = 0;
+ gint _tmp350_ = 0;
+ guint _tmp351_ = 0U;
+ gchar* _tmp352_ = NULL;
+ gchar* _tmp353_ = NULL;
+ PDFWriter* _tmp354_ = NULL;
+ PDFWriter* _tmp355_ = NULL;
+ PDFWriter* _tmp356_ = NULL;
+ guint _tmp357_ = 0U;
+ gchar* _tmp358_ = NULL;
+ gchar* _tmp359_ = NULL;
+ PDFWriter* _tmp360_ = NULL;
+ gint _tmp361_ = 0;
+ guint* _tmp362_ = NULL;
+ gint _tmp362__length1 = 0;
+ gint _tmp363_ = 0;
+ guint _tmp364_ = 0U;
+ gchar* _tmp365_ = NULL;
+ gchar* _tmp366_ = NULL;
+ PDFWriter* _tmp367_ = NULL;
+ gdouble _tmp368_ = 0.0;
+ gchar* _tmp369_ = NULL;
+ gint _tmp369__length1 = 0;
+ const gchar* _tmp370_ = NULL;
+ gdouble _tmp371_ = 0.0;
+ gchar* _tmp372_ = NULL;
+ gint _tmp372__length1 = 0;
+ const gchar* _tmp373_ = NULL;
+ gchar* _tmp374_ = NULL;
+ gchar* _tmp375_ = NULL;
+ PDFWriter* _tmp376_ = NULL;
+ guint* _tmp377_ = NULL;
+ gint _tmp377__length1 = 0;
+ gint _tmp378_ = 0;
+ guint _tmp379_ = 0U;
+ gchar* _tmp380_ = NULL;
+ gchar* _tmp381_ = NULL;
+ PDFWriter* _tmp382_ = NULL;
+ PDFWriter* _tmp383_ = NULL;
+ PDFWriter* _tmp384_ = NULL;
+ PDFWriter* _tmp385_ = NULL;
+ guint* _tmp386_ = NULL;
+ gint _tmp386__length1 = 0;
+ gint _tmp387_ = 0;
+ guint _tmp388_ = 0U;
+ PDFWriter* _tmp389_ = NULL;
+ guint* _tmp390_ = NULL;
+ gint _tmp390__length1 = 0;
+ gint _tmp391_ = 0;
+ guint _tmp392_ = 0U;
+ gchar* _tmp393_ = NULL;
+ gchar* _tmp394_ = NULL;
+ PDFWriter* _tmp395_ = NULL;
+ PDFWriter* _tmp396_ = NULL;
+ PDFWriter* _tmp397_ = NULL;
+ PDFWriter* _tmp398_ = NULL;
+ gint _tmp399_ = 0;
+ gchar* _tmp400_ = NULL;
+ gchar* _tmp401_ = NULL;
+ PDFWriter* _tmp402_ = NULL;
+ gint _tmp403_ = 0;
+ gchar* _tmp404_ = NULL;
+ gchar* _tmp405_ = NULL;
+ PDFWriter* _tmp406_ = NULL;
+ const gchar* _tmp407_ = NULL;
+ gchar* _tmp408_ = NULL;
+ gchar* _tmp409_ = NULL;
+ PDFWriter* _tmp410_ = NULL;
+ gint _tmp411_ = 0;
+ gchar* _tmp412_ = NULL;
+ gchar* _tmp413_ = NULL;
+ PDFWriter* _tmp414_ = NULL;
+ guint8* _tmp415_ = NULL;
+ gint _tmp415__length1 = 0;
+ gchar* _tmp416_ = NULL;
+ gchar* _tmp417_ = NULL;
+ const gchar* _tmp418_ = NULL;
+ PDFWriter* _tmp423_ = NULL;
+ PDFWriter* _tmp424_ = NULL;
+ PDFWriter* _tmp425_ = NULL;
+ guint8* _tmp426_ = NULL;
+ gint _tmp426__length1 = 0;
+ PDFWriter* _tmp427_ = NULL;
+ PDFWriter* _tmp428_ = NULL;
+ PDFWriter* _tmp429_ = NULL;
+ PDFWriter* _tmp430_ = NULL;
+ PDFWriter* _tmp431_ = NULL;
+ guint _tmp432_ = 0U;
+ PDFWriter* _tmp433_ = NULL;
+ guint _tmp434_ = 0U;
+ gchar* _tmp435_ = NULL;
+ gchar* _tmp436_ = NULL;
+ PDFWriter* _tmp437_ = NULL;
+ PDFWriter* _tmp438_ = NULL;
+ PDFWriter* _tmp439_ = NULL;
+ PDFWriter* _tmp440_ = NULL;
+ gchar* command = NULL;
+ gdouble _tmp441_ = 0.0;
+ gchar* _tmp442_ = NULL;
+ gint _tmp442__length1 = 0;
+ const gchar* _tmp443_ = NULL;
+ gdouble _tmp444_ = 0.0;
+ gchar* _tmp445_ = NULL;
+ gint _tmp445__length1 = 0;
+ const gchar* _tmp446_ = NULL;
+ gint _tmp447_ = 0;
+ gchar* _tmp448_ = NULL;
+ PDFWriter* _tmp449_ = NULL;
+ PDFWriter* _tmp450_ = NULL;
+ guint* _tmp451_ = NULL;
+ gint _tmp451__length1 = 0;
+ gint _tmp452_ = 0;
+ guint _tmp453_ = 0U;
+ PDFWriter* _tmp454_ = NULL;
+ guint* _tmp455_ = NULL;
+ gint _tmp455__length1 = 0;
+ gint _tmp456_ = 0;
+ guint _tmp457_ = 0U;
+ gchar* _tmp458_ = NULL;
+ gchar* _tmp459_ = NULL;
+ PDFWriter* _tmp460_ = NULL;
+ PDFWriter* _tmp461_ = NULL;
+ const gchar* _tmp462_ = NULL;
+ gint _tmp463_ = 0;
+ gint _tmp464_ = 0;
+ gchar* _tmp465_ = NULL;
+ gchar* _tmp466_ = NULL;
+ PDFWriter* _tmp467_ = NULL;
+ PDFWriter* _tmp468_ = NULL;
+ PDFWriter* _tmp469_ = NULL;
+ const gchar* _tmp470_ = NULL;
+ PDFWriter* _tmp471_ = NULL;
+ PDFWriter* _tmp472_ = NULL;
+ PDFWriter* _tmp473_ = NULL;
+ gint _tmp474_ = 0;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp138_) {
+#line 2942 "book.c"
+ gint _tmp139_ = 0;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp139_ = i;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = _tmp139_ + 1;
+#line 2948 "book.c"
+ }
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp138_ = FALSE;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp140_ = i;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp141_ = book_get_n_pages (self);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp142_ = _tmp141_;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(((guint) _tmp140_) < _tmp142_)) {
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 2962 "book.c"
+ }
#line 350 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp129_ = page_get_depth (_tmp128_);
+ _tmp143_ = i;
#line 350 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp130_ = _tmp129_;
+ _tmp144_ = book_get_page (self, _tmp143_);
#line 350 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (_tmp130_ == 2) {
-#line 2856 "book.c"
- gint shift_count = 0;
- gchar* _tmp131_ = NULL;
- gint data_length = 0;
- gint _tmp132_ = 0;
- gint _tmp133_ = 0;
- gint _tmp134_ = 0;
- guint8* _tmp135_ = NULL;
- gint offset = 0;
+ page = _tmp144_;
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp145_ = page;
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp146_ = page_get_image (_tmp145_, TRUE);
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ image = _tmp146_;
#line 352 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- shift_count = 6;
+ _tmp147_ = image;
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp148_ = gdk_pixbuf_get_width (_tmp147_);
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp149_ = _tmp148_;
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ width = _tmp149_;
#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- depth = 2;
+ _tmp150_ = image;
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp151_ = gdk_pixbuf_get_height (_tmp150_);
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp152_ = _tmp151_;
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ height = _tmp152_;
#line 354 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp131_ = g_strdup ("DeviceGray");
+ _tmp153_ = image;
#line 354 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (color_space);
+ _tmp154_ = gdk_pixbuf_get_pixels (_tmp153_);
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pixels = _tmp154_;
#line 354 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- color_space = _tmp131_;
+ pixels_length1 = -1;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _pixels_size_ = pixels_length1;
#line 355 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp132_ = height;
+ _tmp155_ = width;
#line 355 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp133_ = width;
+ _tmp156_ = page;
#line 355 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data_length = _tmp132_ * (((_tmp133_ * 2) + 7) / 8);
-#line 356 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp134_ = data_length;
+ _tmp157_ = page_get_dpi (_tmp156_);
+#line 355 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp158_ = _tmp157_;
+#line 355 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_width = (_tmp155_ * 72.0) / _tmp158_;
#line 356 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp135_ = g_new0 (guint8, _tmp134_);
+ _tmp159_ = height;
#line 356 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data = (g_free (data), NULL);
+ _tmp160_ = page;
#line 356 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data = _tmp135_;
+ _tmp161_ = page_get_dpi (_tmp160_);
#line 356 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data_length1 = _tmp134_;
+ _tmp162_ = _tmp161_;
#line 356 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _data_size_ = data_length1;
-#line 357 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- offset = 0;
-#line 2895 "book.c"
- {
- gint row = 0;
-#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- row = 0;
-#line 2900 "book.c"
- {
- gboolean _tmp136_ = FALSE;
-#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp136_ = TRUE;
-#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- while (TRUE) {
-#line 2907 "book.c"
- gint _tmp138_ = 0;
- gint _tmp139_ = 0;
- gint _tmp140_ = 0;
- gint in_offset = 0;
- gint _tmp142_ = 0;
- GdkPixbuf* _tmp143_ = NULL;
- gint _tmp144_ = 0;
- gint _tmp145_ = 0;
-#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!_tmp136_) {
-#line 2918 "book.c"
- gint _tmp137_ = 0;
-#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp137_ = row;
-#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- row = _tmp137_ + 1;
-#line 2924 "book.c"
- }
-#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp136_ = FALSE;
-#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp138_ = row;
-#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp139_ = height;
+ page_height = (_tmp159_ * 72.0) / _tmp162_;
#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!(_tmp138_ < _tmp139_)) {
-#line 358 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- break;
-#line 2936 "book.c"
- }
+ depth = 8;
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp163_ = g_strdup ("DeviceRGB");
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ color_space = _tmp163_;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ filter = NULL;
#line 361 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp140_ = shift_count;
+ _tmp164_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
#line 361 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (_tmp140_ != 6) {
-#line 2942 "book.c"
- gint _tmp141_ = 0;
-#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp141_ = offset;
-#line 363 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- offset = _tmp141_ + 1;
+ width_buffer = _tmp164_;
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ width_buffer_length1 = G_ASCII_DTOSTR_BUF_SIZE;
+#line 361 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _width_buffer_size_ = width_buffer_length1;
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp165_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ height_buffer = _tmp165_;
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ height_buffer_length1 = G_ASCII_DTOSTR_BUF_SIZE;
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _height_buffer_size_ = height_buffer_length1;
#line 364 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- shift_count = 6;
-#line 2950 "book.c"
- }
-#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp142_ = row;
-#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp143_ = image;
+ _tmp166_ = page;
+#line 364 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp167_ = page_get_is_color (_tmp166_);
+#line 364 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp168_ = _tmp167_;
+#line 364 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp168_) {
+#line 3054 "book.c"
+ gchar* _tmp169_ = NULL;
+ gint data_length = 0;
+ gint _tmp170_ = 0;
+ gint _tmp171_ = 0;
+ gint _tmp172_ = 0;
+ guint8* _tmp173_ = NULL;
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ depth = 8;
#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp144_ = gdk_pixbuf_get_rowstride (_tmp143_);
+ _tmp169_ = g_strdup ("DeviceRGB");
#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp145_ = _tmp144_;
+ _g_free0 (color_space);
#line 367 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- in_offset = _tmp142_ * _tmp145_;
-#line 2962 "book.c"
- {
- gint x = 0;
-#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- x = 0;
-#line 2967 "book.c"
- {
- gboolean _tmp146_ = FALSE;
-#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp146_ = TRUE;
-#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- while (TRUE) {
-#line 2974 "book.c"
- gint _tmp148_ = 0;
- gint _tmp149_ = 0;
- gint _tmp150_ = 0;
- guint8 p = 0U;
- guint8* _tmp154_ = NULL;
- gint _tmp154__length1 = 0;
- gint _tmp155_ = 0;
- gint _tmp156_ = 0;
- guint8 _tmp157_ = 0U;
- guint8 _tmp158_ = 0U;
- gint _tmp173_ = 0;
-#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!_tmp146_) {
-#line 2988 "book.c"
- gint _tmp147_ = 0;
-#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp147_ = x;
-#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- x = _tmp147_ + 1;
-#line 2994 "book.c"
- }
+ color_space = _tmp169_;
#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp146_ = FALSE;
+ _tmp170_ = height;
#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp148_ = x;
+ _tmp171_ = width;
#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp149_ = width;
-#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!(_tmp148_ < _tmp149_)) {
-#line 368 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- break;
-#line 3006 "book.c"
- }
-#line 371 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp150_ = shift_count;
-#line 371 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (_tmp150_ == 6) {
-#line 3012 "book.c"
- guint8* _tmp151_ = NULL;
- gint _tmp151__length1 = 0;
- gint _tmp152_ = 0;
- guint8 _tmp153_ = 0U;
+ data_length = (_tmp170_ * _tmp171_) * 3;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp172_ = data_length;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp173_ = g_new0 (guint8, _tmp172_);
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = (g_free (data), NULL);
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = _tmp173_;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length1 = _tmp172_;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _data_size_ = data_length1;
+#line 3087 "book.c"
+ {
+ gint row = 0;
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = 0;
+#line 3092 "book.c"
+ {
+ gboolean _tmp174_ = FALSE;
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp174_ = TRUE;
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 3099 "book.c"
+ gint _tmp176_ = 0;
+ gint _tmp177_ = 0;
+ gint in_offset = 0;
+ gint _tmp178_ = 0;
+ GdkPixbuf* _tmp179_ = NULL;
+ gint _tmp180_ = 0;
+ gint _tmp181_ = 0;
+ gint out_offset = 0;
+ gint _tmp182_ = 0;
+ gint _tmp183_ = 0;
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp174_) {
+#line 3112 "book.c"
+ gint _tmp175_ = 0;
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp175_ = row;
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = _tmp175_ + 1;
+#line 3118 "book.c"
+ }
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp174_ = FALSE;
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp176_ = row;
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp177_ = height;
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp176_ < _tmp177_)) {
+#line 370 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 3130 "book.c"
+ }
#line 372 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp151_ = data;
+ _tmp178_ = row;
#line 372 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp151__length1 = data_length1;
+ _tmp179_ = image;
#line 372 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp152_ = offset;
+ _tmp180_ = gdk_pixbuf_get_rowstride (_tmp179_);
#line 372 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp151_[_tmp152_] = (guint8) 0;
+ _tmp181_ = _tmp180_;
#line 372 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp153_ = _tmp151_[_tmp152_];
-#line 3027 "book.c"
- }
-#line 375 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp154_ = pixels;
-#line 375 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp154__length1 = pixels_length1;
-#line 375 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp155_ = in_offset;
-#line 375 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp156_ = x;
-#line 375 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp157_ = _tmp154_[_tmp155_ + (_tmp156_ * 3)];
-#line 375 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- p = _tmp157_;
+ in_offset = _tmp178_ * _tmp181_;
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp182_ = row;
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp183_ = width;
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ out_offset = (_tmp182_ * _tmp183_) * 3;
+#line 3148 "book.c"
+ {
+ gint x = 0;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ x = 0;
+#line 3153 "book.c"
+ {
+ gboolean _tmp184_ = FALSE;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp184_ = TRUE;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 3160 "book.c"
+ gint _tmp186_ = 0;
+ gint _tmp187_ = 0;
+ gint in_o = 0;
+ gint _tmp188_ = 0;
+ gint _tmp189_ = 0;
+ gint out_o = 0;
+ gint _tmp190_ = 0;
+ gint _tmp191_ = 0;
+ guint8* _tmp192_ = NULL;
+ gint _tmp192__length1 = 0;
+ gint _tmp193_ = 0;
+ guint8* _tmp194_ = NULL;
+ gint _tmp194__length1 = 0;
+ gint _tmp195_ = 0;
+ guint8 _tmp196_ = 0U;
+ guint8 _tmp197_ = 0U;
+ guint8* _tmp198_ = NULL;
+ gint _tmp198__length1 = 0;
+ gint _tmp199_ = 0;
+ guint8* _tmp200_ = NULL;
+ gint _tmp200__length1 = 0;
+ gint _tmp201_ = 0;
+ guint8 _tmp202_ = 0U;
+ guint8 _tmp203_ = 0U;
+ guint8* _tmp204_ = NULL;
+ gint _tmp204__length1 = 0;
+ gint _tmp205_ = 0;
+ guint8* _tmp206_ = NULL;
+ gint _tmp206__length1 = 0;
+ gint _tmp207_ = 0;
+ guint8 _tmp208_ = 0U;
+ guint8 _tmp209_ = 0U;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp184_) {
+#line 3195 "book.c"
+ gint _tmp185_ = 0;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp185_ = x;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ x = _tmp185_ + 1;
+#line 3201 "book.c"
+ }
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp184_ = FALSE;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp186_ = x;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp187_ = width;
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp186_ < _tmp187_)) {
+#line 374 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 3213 "book.c"
+ }
#line 376 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp158_ = p;
+ _tmp188_ = in_offset;
#line 376 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (((gint) _tmp158_) >= 192) {
-#line 3045 "book.c"
- guint8* _tmp159_ = NULL;
- gint _tmp159__length1 = 0;
- gint _tmp160_ = 0;
- gint _tmp161_ = 0;
- guint8 _tmp162_ = 0U;
-#line 377 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp159_ = data;
-#line 377 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp159__length1 = data_length1;
-#line 377 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp160_ = offset;
+ _tmp189_ = x;
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ in_o = _tmp188_ + (_tmp189_ * 3);
#line 377 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp161_ = shift_count;
+ _tmp190_ = out_offset;
#line 377 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp159_[_tmp160_] |= (guint8) (3 << _tmp161_);
+ _tmp191_ = x;
#line 377 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp162_ = _tmp159_[_tmp160_];
-#line 3063 "book.c"
- } else {
- guint8 _tmp163_ = 0U;
-#line 378 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp163_ = p;
-#line 378 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (((gint) _tmp163_) >= 128) {
-#line 3070 "book.c"
- guint8* _tmp164_ = NULL;
- gint _tmp164__length1 = 0;
- gint _tmp165_ = 0;
- gint _tmp166_ = 0;
- guint8 _tmp167_ = 0U;
+ out_o = _tmp190_ + (_tmp191_ * 3);
#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp164_ = data;
+ _tmp192_ = data;
#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp164__length1 = data_length1;
+ _tmp192__length1 = data_length1;
#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp165_ = offset;
+ _tmp193_ = out_o;
#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp166_ = shift_count;
+ _tmp194_ = pixels;
#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp164_[_tmp165_] |= (guint8) (2 << _tmp166_);
+ _tmp194__length1 = pixels_length1;
#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp167_ = _tmp164_[_tmp165_];
-#line 3088 "book.c"
- } else {
- guint8 _tmp168_ = 0U;
+ _tmp195_ = in_o;
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp196_ = _tmp194_[_tmp195_];
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp192_[_tmp193_] = _tmp196_;
+#line 379 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp197_ = _tmp192_[_tmp193_];
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp198_ = data;
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp198__length1 = data_length1;
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp199_ = out_o;
#line 380 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp168_ = p;
+ _tmp200_ = pixels;
#line 380 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (((gint) _tmp168_) >= 64) {
-#line 3095 "book.c"
- guint8* _tmp169_ = NULL;
- gint _tmp169__length1 = 0;
- gint _tmp170_ = 0;
- gint _tmp171_ = 0;
- guint8 _tmp172_ = 0U;
+ _tmp200__length1 = pixels_length1;
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp201_ = in_o;
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp202_ = _tmp200_[_tmp201_ + 1];
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp198_[_tmp199_ + 1] = _tmp202_;
+#line 380 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp203_ = _tmp198_[_tmp199_ + 1];
#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp169_ = data;
+ _tmp204_ = data;
#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp169__length1 = data_length1;
+ _tmp204__length1 = data_length1;
#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp170_ = offset;
+ _tmp205_ = out_o;
#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp171_ = shift_count;
+ _tmp206_ = pixels;
#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp169_[_tmp170_] |= (guint8) (1 << _tmp171_);
+ _tmp206__length1 = pixels_length1;
#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp172_ = _tmp169_[_tmp170_];
-#line 3113 "book.c"
- }
- }
- }
-#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp173_ = shift_count;
-#line 384 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (_tmp173_ == 0) {
-#line 3121 "book.c"
- gint _tmp174_ = 0;
-#line 386 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp174_ = offset;
-#line 386 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- offset = _tmp174_ + 1;
-#line 387 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- shift_count = 6;
-#line 3129 "book.c"
- } else {
- gint _tmp175_ = 0;
-#line 390 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp175_ = shift_count;
-#line 390 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- shift_count = _tmp175_ - 2;
-#line 3136 "book.c"
- }
- }
+ _tmp207_ = in_o;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp208_ = _tmp206_[_tmp207_ + 2];
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp204_[_tmp205_ + 2] = _tmp208_;
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp209_ = _tmp204_[_tmp205_ + 2];
+#line 3281 "book.c"
}
}
}
}
}
- } else {
- Page* _tmp176_ = NULL;
- gint _tmp177_ = 0;
- gint _tmp178_ = 0;
-#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp176_ = page;
-#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp177_ = page_get_depth (_tmp176_);
-#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp178_ = _tmp177_;
-#line 394 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (_tmp178_ == 1) {
-#line 3156 "book.c"
- gint mask = 0;
- gchar* _tmp179_ = NULL;
- gint data_length = 0;
- gint _tmp180_ = 0;
- gint _tmp181_ = 0;
- gint _tmp182_ = 0;
- guint8* _tmp183_ = NULL;
- gint offset = 0;
+ }
+ } else {
+ Page* _tmp210_ = NULL;
+ gint _tmp211_ = 0;
+ gint _tmp212_ = 0;
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp210_ = page;
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp211_ = page_get_depth (_tmp210_);
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp212_ = _tmp211_;
+#line 385 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp212_ == 2) {
+#line 3300 "book.c"
+ gint shift_count = 0;
+ gchar* _tmp213_ = NULL;
+ gint data_length = 0;
+ gint _tmp214_ = 0;
+ gint _tmp215_ = 0;
+ gint _tmp216_ = 0;
+ guint8* _tmp217_ = NULL;
+ gint offset = 0;
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ shift_count = 6;
+#line 388 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ depth = 2;
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp213_ = g_strdup ("DeviceGray");
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (color_space);
+#line 389 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ color_space = _tmp213_;
+#line 390 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp214_ = height;
+#line 390 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp215_ = width;
+#line 390 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length = _tmp214_ * (((_tmp215_ * 2) + 7) / 8);
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp216_ = data_length;
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp217_ = g_new0 (guint8, _tmp216_);
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = (g_free (data), NULL);
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = _tmp217_;
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length1 = _tmp216_;
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _data_size_ = data_length1;
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ offset = 0;
+#line 3339 "book.c"
+ {
+ gint row = 0;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = 0;
+#line 3344 "book.c"
+ {
+ gboolean _tmp218_ = FALSE;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp218_ = TRUE;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 3351 "book.c"
+ gint _tmp220_ = 0;
+ gint _tmp221_ = 0;
+ gint _tmp222_ = 0;
+ gint in_offset = 0;
+ gint _tmp224_ = 0;
+ GdkPixbuf* _tmp225_ = NULL;
+ gint _tmp226_ = 0;
+ gint _tmp227_ = 0;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp218_) {
+#line 3362 "book.c"
+ gint _tmp219_ = 0;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp219_ = row;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = _tmp219_ + 1;
+#line 3368 "book.c"
+ }
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp218_ = FALSE;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp220_ = row;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp221_ = height;
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp220_ < _tmp221_)) {
+#line 393 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 3380 "book.c"
+ }
#line 396 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- mask = 0x80;
+ _tmp222_ = shift_count;
+#line 396 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp222_ != 6) {
+#line 3386 "book.c"
+ gint _tmp223_ = 0;
#line 398 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- depth = 1;
-#line 399 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp179_ = g_strdup ("DeviceGray");
-#line 399 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (color_space);
+ _tmp223_ = offset;
+#line 398 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ offset = _tmp223_ + 1;
#line 399 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- color_space = _tmp179_;
-#line 400 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp180_ = height;
-#line 400 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp181_ = width;
-#line 400 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data_length = _tmp180_ * ((_tmp181_ + 7) / 8);
-#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp182_ = data_length;
-#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp183_ = g_new0 (guint8, _tmp182_);
-#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data = (g_free (data), NULL);
-#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data = _tmp183_;
-#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data_length1 = _tmp182_;
-#line 401 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _data_size_ = data_length1;
+ shift_count = 6;
+#line 3394 "book.c"
+ }
#line 402 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- offset = 0;
-#line 3195 "book.c"
- {
- gint row = 0;
+ _tmp224_ = row;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp225_ = image;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp226_ = gdk_pixbuf_get_rowstride (_tmp225_);
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp227_ = _tmp226_;
+#line 402 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ in_offset = _tmp224_ * _tmp227_;
+#line 3406 "book.c"
+ {
+ gint x = 0;
#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- row = 0;
-#line 3200 "book.c"
- {
- gboolean _tmp184_ = FALSE;
+ x = 0;
+#line 3411 "book.c"
+ {
+ gboolean _tmp228_ = FALSE;
#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp184_ = TRUE;
+ _tmp228_ = TRUE;
#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- while (TRUE) {
-#line 3207 "book.c"
- gint _tmp186_ = 0;
- gint _tmp187_ = 0;
- gint _tmp188_ = 0;
- gint in_offset = 0;
- gint _tmp190_ = 0;
- GdkPixbuf* _tmp191_ = NULL;
- gint _tmp192_ = 0;
- gint _tmp193_ = 0;
+ while (TRUE) {
+#line 3418 "book.c"
+ gint _tmp230_ = 0;
+ gint _tmp231_ = 0;
+ gint _tmp232_ = 0;
+ guint8 p = 0U;
+ guint8* _tmp236_ = NULL;
+ gint _tmp236__length1 = 0;
+ gint _tmp237_ = 0;
+ gint _tmp238_ = 0;
+ guint8 _tmp239_ = 0U;
+ guint8 _tmp240_ = 0U;
+ gint _tmp255_ = 0;
#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!_tmp184_) {
-#line 3218 "book.c"
- gint _tmp185_ = 0;
+ if (!_tmp228_) {
+#line 3432 "book.c"
+ gint _tmp229_ = 0;
#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp185_ = row;
+ _tmp229_ = x;
#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- row = _tmp185_ + 1;
-#line 3224 "book.c"
- }
+ x = _tmp229_ + 1;
+#line 3438 "book.c"
+ }
#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp184_ = FALSE;
+ _tmp228_ = FALSE;
#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp186_ = row;
+ _tmp230_ = x;
#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp187_ = height;
+ _tmp231_ = width;
#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!(_tmp186_ < _tmp187_)) {
+ if (!(_tmp230_ < _tmp231_)) {
#line 403 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- break;
-#line 3236 "book.c"
- }
+ break;
+#line 3450 "book.c"
+ }
#line 406 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp188_ = mask;
+ _tmp232_ = shift_count;
#line 406 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (_tmp188_ != 0x80) {
-#line 3242 "book.c"
- gint _tmp189_ = 0;
-#line 408 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp189_ = offset;
-#line 408 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- offset = _tmp189_ + 1;
-#line 409 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- mask = 0x80;
-#line 3250 "book.c"
- }
+ if (_tmp232_ == 6) {
+#line 3456 "book.c"
+ guint8* _tmp233_ = NULL;
+ gint _tmp233__length1 = 0;
+ gint _tmp234_ = 0;
+ guint8 _tmp235_ = 0U;
+#line 407 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp233_ = data;
+#line 407 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp233__length1 = data_length1;
+#line 407 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp234_ = offset;
+#line 407 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp233_[_tmp234_] = (guint8) 0;
+#line 407 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp235_ = _tmp233_[_tmp234_];
+#line 3471 "book.c"
+ }
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp236_ = pixels;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp236__length1 = pixels_length1;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp237_ = in_offset;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp238_ = x;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp239_ = _tmp236_[_tmp237_ + (_tmp238_ * 3)];
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ p = _tmp239_;
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp240_ = p;
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (((gint) _tmp240_) >= 192) {
+#line 3489 "book.c"
+ guint8* _tmp241_ = NULL;
+ gint _tmp241__length1 = 0;
+ gint _tmp242_ = 0;
+ gint _tmp243_ = 0;
+ guint8 _tmp244_ = 0U;
#line 412 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp190_ = row;
+ _tmp241_ = data;
#line 412 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp191_ = image;
+ _tmp241__length1 = data_length1;
#line 412 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp192_ = gdk_pixbuf_get_rowstride (_tmp191_);
+ _tmp242_ = offset;
#line 412 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp193_ = _tmp192_;
+ _tmp243_ = shift_count;
#line 412 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- in_offset = _tmp190_ * _tmp193_;
-#line 3262 "book.c"
- {
- gint x = 0;
-#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- x = 0;
-#line 3267 "book.c"
- {
- gboolean _tmp194_ = FALSE;
-#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp194_ = TRUE;
-#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- while (TRUE) {
-#line 3274 "book.c"
- gint _tmp196_ = 0;
- gint _tmp197_ = 0;
- gint _tmp198_ = 0;
- guint8* _tmp202_ = NULL;
- gint _tmp202__length1 = 0;
- gint _tmp203_ = 0;
- gint _tmp204_ = 0;
- guint8 _tmp205_ = 0U;
- gint _tmp210_ = 0;
- gint _tmp211_ = 0;
-#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!_tmp194_) {
-#line 3287 "book.c"
- gint _tmp195_ = 0;
-#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp195_ = x;
-#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- x = _tmp195_ + 1;
-#line 3293 "book.c"
- }
-#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp194_ = FALSE;
-#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp196_ = x;
-#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp197_ = width;
+ _tmp241_[_tmp242_] |= (guint8) (3 << _tmp243_);
+#line 412 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp244_ = _tmp241_[_tmp242_];
+#line 3507 "book.c"
+ } else {
+ guint8 _tmp245_ = 0U;
#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!(_tmp196_ < _tmp197_)) {
+ _tmp245_ = p;
#line 413 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- break;
-#line 3305 "book.c"
- }
+ if (((gint) _tmp245_) >= 128) {
+#line 3514 "book.c"
+ guint8* _tmp246_ = NULL;
+ gint _tmp246__length1 = 0;
+ gint _tmp247_ = 0;
+ gint _tmp248_ = 0;
+ guint8 _tmp249_ = 0U;
+#line 414 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp246_ = data;
+#line 414 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp246__length1 = data_length1;
+#line 414 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp247_ = offset;
+#line 414 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp248_ = shift_count;
+#line 414 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp246_[_tmp247_] |= (guint8) (2 << _tmp248_);
+#line 414 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp249_ = _tmp246_[_tmp247_];
+#line 3532 "book.c"
+ } else {
+ guint8 _tmp250_ = 0U;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp250_ = p;
+#line 415 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (((gint) _tmp250_) >= 64) {
+#line 3539 "book.c"
+ guint8* _tmp251_ = NULL;
+ gint _tmp251__length1 = 0;
+ gint _tmp252_ = 0;
+ gint _tmp253_ = 0;
+ guint8 _tmp254_ = 0U;
+#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp251_ = data;
#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp198_ = mask;
+ _tmp251__length1 = data_length1;
#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (_tmp198_ == 0x80) {
-#line 3311 "book.c"
- guint8* _tmp199_ = NULL;
- gint _tmp199__length1 = 0;
- gint _tmp200_ = 0;
- guint8 _tmp201_ = 0U;
-#line 417 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp199_ = data;
-#line 417 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp199__length1 = data_length1;
-#line 417 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp200_ = offset;
-#line 417 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp199_[_tmp200_] = (guint8) 0;
-#line 417 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp201_ = _tmp199_[_tmp200_];
-#line 3326 "book.c"
+ _tmp252_ = offset;
+#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp253_ = shift_count;
+#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp251_[_tmp252_] |= (guint8) (1 << _tmp253_);
+#line 416 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp254_ = _tmp251_[_tmp252_];
+#line 3557 "book.c"
+ }
}
-#line 420 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp202_ = pixels;
-#line 420 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp202__length1 = pixels_length1;
-#line 420 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp203_ = in_offset;
-#line 420 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp204_ = x;
-#line 420 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp205_ = _tmp202_[_tmp203_ + (_tmp204_ * 3)];
-#line 420 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (((gint) _tmp205_) != 0) {
-#line 3340 "book.c"
- guint8* _tmp206_ = NULL;
- gint _tmp206__length1 = 0;
- gint _tmp207_ = 0;
- gint _tmp208_ = 0;
- guint8 _tmp209_ = 0U;
-#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp206_ = data;
-#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp206__length1 = data_length1;
-#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp207_ = offset;
-#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp208_ = mask;
+ }
+#line 419 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp255_ = shift_count;
+#line 419 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp255_ == 0) {
+#line 3565 "book.c"
+ gint _tmp256_ = 0;
#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp206_[_tmp207_] |= (guint8) _tmp208_;
+ _tmp256_ = offset;
#line 421 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp209_ = _tmp206_[_tmp207_];
-#line 3358 "book.c"
- }
-#line 424 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp210_ = mask;
-#line 424 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- mask = _tmp210_ >> 1;
+ offset = _tmp256_ + 1;
+#line 422 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ shift_count = 6;
+#line 3573 "book.c"
+ } else {
+ gint _tmp257_ = 0;
#line 425 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp211_ = mask;
+ _tmp257_ = shift_count;
#line 425 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (_tmp211_ == 0) {
-#line 3368 "book.c"
- gint _tmp212_ = 0;
-#line 427 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp212_ = offset;
-#line 427 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- offset = _tmp212_ + 1;
-#line 428 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- mask = 0x80;
-#line 3376 "book.c"
- }
+ shift_count = _tmp257_ - 2;
+#line 3580 "book.c"
}
}
}
}
}
}
- } else {
- gchar* _tmp213_ = NULL;
+ }
+ } else {
+ Page* _tmp258_ = NULL;
+ gint _tmp259_ = 0;
+ gint _tmp260_ = 0;
+#line 429 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp258_ = page;
+#line 429 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp259_ = page_get_depth (_tmp258_);
+#line 429 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp260_ = _tmp259_;
+#line 429 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp260_ == 1) {
+#line 3600 "book.c"
+ gint mask = 0;
+ gchar* _tmp261_ = NULL;
gint data_length = 0;
- gint _tmp214_ = 0;
- gint _tmp215_ = 0;
- gint _tmp216_ = 0;
- guint8* _tmp217_ = NULL;
+ gint _tmp262_ = 0;
+ gint _tmp263_ = 0;
+ gint _tmp264_ = 0;
+ guint8* _tmp265_ = NULL;
+ gint offset = 0;
+#line 431 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ mask = 0x80;
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ depth = 1;
+#line 434 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp261_ = g_strdup ("DeviceGray");
+#line 434 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (color_space);
+#line 434 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ color_space = _tmp261_;
#line 435 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- depth = 8;
+ _tmp262_ = height;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp263_ = width;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length = _tmp262_ * ((_tmp263_ + 7) / 8);
#line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp213_ = g_strdup ("DeviceGray");
+ _tmp264_ = data_length;
#line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (color_space);
+ _tmp265_ = g_new0 (guint8, _tmp264_);
#line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- color_space = _tmp213_;
-#line 437 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp214_ = height;
-#line 437 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp215_ = width;
-#line 437 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data_length = _tmp214_ * _tmp215_;
-#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp216_ = data_length;
-#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp217_ = g_new0 (guint8, _tmp216_);
-#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
data = (g_free (data), NULL);
-#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data = _tmp217_;
-#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data_length1 = _tmp216_;
-#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = _tmp265_;
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length1 = _tmp264_;
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_data_size_ = data_length1;
-#line 3417 "book.c"
+#line 437 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ offset = 0;
+#line 3639 "book.c"
{
gint row = 0;
-#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
row = 0;
-#line 3422 "book.c"
+#line 3644 "book.c"
{
- gboolean _tmp218_ = FALSE;
-#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp218_ = TRUE;
-#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ gboolean _tmp266_ = FALSE;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp266_ = TRUE;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
while (TRUE) {
-#line 3429 "book.c"
- gint _tmp220_ = 0;
- gint _tmp221_ = 0;
+#line 3651 "book.c"
+ gint _tmp268_ = 0;
+ gint _tmp269_ = 0;
+ gint _tmp270_ = 0;
gint in_offset = 0;
- gint _tmp222_ = 0;
- GdkPixbuf* _tmp223_ = NULL;
- gint _tmp224_ = 0;
- gint _tmp225_ = 0;
- gint out_offset = 0;
- gint _tmp226_ = 0;
- gint _tmp227_ = 0;
-#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!_tmp218_) {
-#line 3442 "book.c"
- gint _tmp219_ = 0;
-#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp219_ = row;
-#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- row = _tmp219_ + 1;
-#line 3448 "book.c"
+ gint _tmp272_ = 0;
+ GdkPixbuf* _tmp273_ = NULL;
+ gint _tmp274_ = 0;
+ gint _tmp275_ = 0;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp266_) {
+#line 3662 "book.c"
+ gint _tmp267_ = 0;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp267_ = row;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = _tmp267_ + 1;
+#line 3668 "book.c"
}
-#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp218_ = FALSE;
-#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp220_ = row;
-#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp221_ = height;
-#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!(_tmp220_ < _tmp221_)) {
-#line 439 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp266_ = FALSE;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp268_ = row;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp269_ = height;
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp268_ < _tmp269_)) {
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
break;
-#line 3460 "book.c"
+#line 3680 "book.c"
}
#line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp222_ = row;
-#line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp223_ = image;
-#line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp224_ = gdk_pixbuf_get_rowstride (_tmp223_);
+ _tmp270_ = mask;
#line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp225_ = _tmp224_;
-#line 441 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- in_offset = _tmp222_ * _tmp225_;
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp226_ = row;
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp227_ = width;
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- out_offset = _tmp226_ * _tmp227_;
-#line 3478 "book.c"
+ if (_tmp270_ != 0x80) {
+#line 3686 "book.c"
+ gint _tmp271_ = 0;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp271_ = offset;
+#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ offset = _tmp271_ + 1;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ mask = 0x80;
+#line 3694 "book.c"
+ }
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp272_ = row;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp273_ = image;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp274_ = gdk_pixbuf_get_rowstride (_tmp273_);
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp275_ = _tmp274_;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ in_offset = _tmp272_ * _tmp275_;
+#line 3706 "book.c"
{
gint x = 0;
-#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
x = 0;
-#line 3483 "book.c"
+#line 3711 "book.c"
{
- gboolean _tmp228_ = FALSE;
-#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp228_ = TRUE;
-#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ gboolean _tmp276_ = FALSE;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp276_ = TRUE;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
while (TRUE) {
-#line 3490 "book.c"
- gint _tmp230_ = 0;
- gint _tmp231_ = 0;
- guint8* _tmp232_ = NULL;
- gint _tmp232__length1 = 0;
- gint _tmp233_ = 0;
- gint _tmp234_ = 0;
- guint8* _tmp235_ = NULL;
- gint _tmp235__length1 = 0;
- gint _tmp236_ = 0;
- gint _tmp237_ = 0;
- guint8 _tmp238_ = 0U;
- guint8 _tmp239_ = 0U;
-#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!_tmp228_) {
-#line 3505 "book.c"
- gint _tmp229_ = 0;
-#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp229_ = x;
-#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- x = _tmp229_ + 1;
-#line 3511 "book.c"
+#line 3718 "book.c"
+ gint _tmp278_ = 0;
+ gint _tmp279_ = 0;
+ gint _tmp280_ = 0;
+ guint8* _tmp284_ = NULL;
+ gint _tmp284__length1 = 0;
+ gint _tmp285_ = 0;
+ gint _tmp286_ = 0;
+ guint8 _tmp287_ = 0U;
+ gint _tmp292_ = 0;
+ gint _tmp293_ = 0;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp276_) {
+#line 3731 "book.c"
+ gint _tmp277_ = 0;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp277_ = x;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ x = _tmp277_ + 1;
+#line 3737 "book.c"
}
-#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp228_ = FALSE;
-#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp230_ = x;
-#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp231_ = width;
-#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (!(_tmp230_ < _tmp231_)) {
-#line 443 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp276_ = FALSE;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp278_ = x;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp279_ = width;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp278_ < _tmp279_)) {
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
break;
-#line 3523 "book.c"
+#line 3749 "book.c"
+ }
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp280_ = mask;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp280_ == 0x80) {
+#line 3755 "book.c"
+ guint8* _tmp281_ = NULL;
+ gint _tmp281__length1 = 0;
+ gint _tmp282_ = 0;
+ guint8 _tmp283_ = 0U;
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp281_ = data;
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp281__length1 = data_length1;
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp282_ = offset;
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp281_[_tmp282_] = (guint8) 0;
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp283_ = _tmp281_[_tmp282_];
+#line 3770 "book.c"
}
-#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp232_ = data;
-#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp232__length1 = data_length1;
-#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp233_ = out_offset;
-#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp234_ = x;
-#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp235_ = pixels;
-#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp235__length1 = pixels_length1;
-#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp236_ = in_offset;
-#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp237_ = x;
-#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp238_ = _tmp235_[_tmp236_ + (_tmp237_ * 3)];
-#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp232_[_tmp233_ + _tmp234_] = _tmp238_;
-#line 444 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp239_ = _tmp232_[_tmp233_ + _tmp234_];
-#line 3547 "book.c"
- }
- }
- }
- }
- }
- }
- }
- }
- }
-#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp240_ = data;
-#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp240__length1 = data_length1;
-#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp242_ = book_compress_zlib (self, _tmp240_, _tmp240__length1, &_tmp241_);
-#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- compressed_data = _tmp242_;
-#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- compressed_data_length1 = _tmp241_;
-#line 449 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _compressed_data_size_ = compressed_data_length1;
-#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp243_ = compressed_data;
-#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp243__length1 = compressed_data_length1;
-#line 450 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (_tmp243_ != NULL) {
-#line 3575 "book.c"
- gint _tmp244_ = 0;
- const gchar* _tmp257_ = NULL;
-#line 453 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp244_ = depth;
-#line 453 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (_tmp244_ > 1) {
-#line 3582 "book.c"
- guint8* jpeg_data = NULL;
- GdkPixbuf* _tmp245_ = NULL;
- gint _tmp246_ = 0;
- Page* _tmp247_ = NULL;
- gint _tmp248_ = 0;
- gint _tmp249_ = 0;
- gint _tmp250_ = 0;
- guint8* _tmp251_ = NULL;
- gint jpeg_data_length1 = 0;
- gint _jpeg_data_size_ = 0;
- guint8* _tmp252_ = NULL;
- gint _tmp252__length1 = 0;
- guint8* _tmp253_ = NULL;
- gint _tmp253__length1 = 0;
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp245_ = image;
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp246_ = quality;
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp247_ = page;
#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp248_ = page_get_dpi (_tmp247_);
+ _tmp284_ = pixels;
#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp249_ = _tmp248_;
+ _tmp284__length1 = pixels_length1;
#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp251_ = book_compress_jpeg (self, _tmp245_, _tmp246_, _tmp249_, &_tmp250_);
+ _tmp285_ = in_offset;
#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- jpeg_data = _tmp251_;
+ _tmp286_ = x;
#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- jpeg_data_length1 = _tmp250_;
+ _tmp287_ = _tmp284_[_tmp285_ + (_tmp286_ * 3)];
#line 455 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _jpeg_data_size_ = jpeg_data_length1;
+ if (((gint) _tmp287_) != 0) {
+#line 3784 "book.c"
+ guint8* _tmp288_ = NULL;
+ gint _tmp288__length1 = 0;
+ gint _tmp289_ = 0;
+ gint _tmp290_ = 0;
+ guint8 _tmp291_ = 0U;
#line 456 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp252_ = jpeg_data;
+ _tmp288_ = data;
#line 456 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp252__length1 = jpeg_data_length1;
+ _tmp288__length1 = data_length1;
#line 456 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp253_ = compressed_data;
+ _tmp289_ = offset;
#line 456 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp253__length1 = compressed_data_length1;
+ _tmp290_ = mask;
#line 456 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (_tmp252__length1 < _tmp253__length1) {
-#line 3625 "book.c"
- gchar* _tmp254_ = NULL;
- guint8* _tmp255_ = NULL;
- gint _tmp255__length1 = 0;
- guint8* _tmp256_ = NULL;
- gint _tmp256__length1 = 0;
-#line 458 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp254_ = g_strdup ("DCTDecode");
-#line 458 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (filter);
-#line 458 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- filter = _tmp254_;
-#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp255_ = jpeg_data;
-#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp255__length1 = jpeg_data_length1;
-#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp256_ = (_tmp255_ != NULL) ? _vala_array_dup1 (_tmp255_, _tmp255__length1) : ((gpointer) _tmp255_);
-#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp256__length1 = _tmp255__length1;
-#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data = (g_free (data), NULL);
-#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data = _tmp256_;
+ _tmp288_[_tmp289_] |= (guint8) _tmp290_;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp291_ = _tmp288_[_tmp289_];
+#line 3802 "book.c"
+ }
#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data_length1 = _tmp256__length1;
+ _tmp292_ = mask;
#line 459 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _data_size_ = data_length1;
-#line 3653 "book.c"
- }
-#line 453 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- jpeg_data = (g_free (jpeg_data), NULL);
-#line 3657 "book.c"
- }
+ mask = _tmp292_ >> 1;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp293_ = mask;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp293_ == 0) {
+#line 3812 "book.c"
+ gint _tmp294_ = 0;
+#line 462 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp294_ = offset;
+#line 462 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ offset = _tmp294_ + 1;
#line 463 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp257_ = filter;
-#line 463 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (_tmp257_ == NULL) {
-#line 3663 "book.c"
- gchar* _tmp258_ = NULL;
- guint8* _tmp259_ = NULL;
- gint _tmp259__length1 = 0;
- guint8* _tmp260_ = NULL;
- gint _tmp260__length1 = 0;
-#line 465 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp258_ = g_strdup ("FlateDecode");
-#line 465 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (filter);
-#line 465 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- filter = _tmp258_;
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp259_ = compressed_data;
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp259__length1 = compressed_data_length1;
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp260_ = (_tmp259_ != NULL) ? _vala_array_dup2 (_tmp259_, _tmp259__length1) : ((gpointer) _tmp259_);
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp260__length1 = _tmp259__length1;
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data = (g_free (data), NULL);
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data = _tmp260_;
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data_length1 = _tmp260__length1;
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _data_size_ = data_length1;
-#line 3691 "book.c"
- }
- }
+ mask = 0x80;
+#line 3820 "book.c"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ } else {
+ gchar* _tmp295_ = NULL;
+ gint data_length = 0;
+ gint _tmp296_ = 0;
+ gint _tmp297_ = 0;
+ gint _tmp298_ = 0;
+ guint8* _tmp299_ = NULL;
+#line 470 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ depth = 8;
#line 471 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp261_ = writer;
+ _tmp295_ = g_strdup ("DeviceGray");
#line 471 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp261_, "\n");
+ _g_free0 (color_space);
+#line 471 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ color_space = _tmp295_;
#line 472 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp262_ = writer;
+ _tmp296_ = height;
#line 472 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp263_ = pdf_writer_start_object (_tmp262_);
+ _tmp297_ = width;
#line 472 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- number = _tmp263_;
+ data_length = _tmp296_ * _tmp297_;
#line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp264_ = writer;
+ _tmp298_ = data_length;
#line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp265_ = number;
+ _tmp299_ = g_new0 (guint8, _tmp298_);
#line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp266_ = g_strdup_printf ("%u 0 obj\n", _tmp265_);
+ data = (g_free (data), NULL);
#line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp267_ = _tmp266_;
+ data = _tmp299_;
#line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp264_, _tmp267_);
+ data_length1 = _tmp298_;
#line 473 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp267_);
+ _data_size_ = data_length1;
+#line 3861 "book.c"
+ {
+ gint row = 0;
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = 0;
+#line 3866 "book.c"
+ {
+ gboolean _tmp300_ = FALSE;
#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp268_ = writer;
+ _tmp300_ = TRUE;
#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp268_, "<<\n");
-#line 475 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp269_ = writer;
-#line 475 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp269_, "/Type /Page\n");
-#line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp270_ = writer;
+ while (TRUE) {
+#line 3873 "book.c"
+ gint _tmp302_ = 0;
+ gint _tmp303_ = 0;
+ gint in_offset = 0;
+ gint _tmp304_ = 0;
+ GdkPixbuf* _tmp305_ = NULL;
+ gint _tmp306_ = 0;
+ gint _tmp307_ = 0;
+ gint out_offset = 0;
+ gint _tmp308_ = 0;
+ gint _tmp309_ = 0;
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp300_) {
+#line 3886 "book.c"
+ gint _tmp301_ = 0;
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp301_ = row;
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ row = _tmp301_ + 1;
+#line 3892 "book.c"
+ }
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp300_ = FALSE;
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp302_ = row;
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp303_ = height;
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp302_ < _tmp303_)) {
+#line 474 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 3904 "book.c"
+ }
#line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp271_ = pages_number;
+ _tmp304_ = row;
#line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp272_ = g_strdup_printf ("/Parent %u 0 R\n", _tmp271_);
+ _tmp305_ = image;
#line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp273_ = _tmp272_;
+ _tmp306_ = gdk_pixbuf_get_rowstride (_tmp305_);
#line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp270_, _tmp273_);
+ _tmp307_ = _tmp306_;
#line 476 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp273_);
+ in_offset = _tmp304_ * _tmp307_;
#line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp274_ = writer;
+ _tmp308_ = row;
#line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp275_ = i;
+ _tmp309_ = width;
#line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp276_ = number;
-#line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp277_ = g_strdup_printf ("/Resources << /XObject << /Im%d %u 0 R >> >>\n", _tmp275_, _tmp276_ + 1);
-#line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp278_ = _tmp277_;
-#line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp274_, _tmp278_);
-#line 477 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp278_);
-#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp279_ = writer;
-#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp280_ = page_width;
+ out_offset = _tmp308_ * _tmp309_;
+#line 3922 "book.c"
+ {
+ gint x = 0;
#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp281_ = width_buffer;
+ x = 0;
+#line 3927 "book.c"
+ {
+ gboolean _tmp310_ = FALSE;
#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp281__length1 = width_buffer_length1;
+ _tmp310_ = TRUE;
#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp282_ = g_ascii_formatd (_tmp281_, _tmp281__length1, "%.2f", _tmp280_);
+ while (TRUE) {
+#line 3934 "book.c"
+ gint _tmp312_ = 0;
+ gint _tmp313_ = 0;
+ guint8* _tmp314_ = NULL;
+ gint _tmp314__length1 = 0;
+ gint _tmp315_ = 0;
+ gint _tmp316_ = 0;
+ guint8* _tmp317_ = NULL;
+ gint _tmp317__length1 = 0;
+ gint _tmp318_ = 0;
+ gint _tmp319_ = 0;
+ guint8 _tmp320_ = 0U;
+ guint8 _tmp321_ = 0U;
#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp283_ = page_height;
+ if (!_tmp310_) {
+#line 3949 "book.c"
+ gint _tmp311_ = 0;
#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp284_ = height_buffer;
+ _tmp311_ = x;
#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp284__length1 = height_buffer_length1;
+ x = _tmp311_ + 1;
+#line 3955 "book.c"
+ }
#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp285_ = g_ascii_formatd (_tmp284_, _tmp284__length1, "%.2f", _tmp283_);
+ _tmp310_ = FALSE;
#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp286_ = g_strdup_printf ("/MediaBox [ 0 0 %s %s ]\n", _tmp282_, _tmp285_);
+ _tmp312_ = x;
#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp287_ = _tmp286_;
+ _tmp313_ = width;
#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp279_, _tmp287_);
+ if (!(_tmp312_ < _tmp313_)) {
#line 478 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp287_);
+ break;
+#line 3967 "book.c"
+ }
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp314_ = data;
#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp288_ = writer;
+ _tmp314__length1 = data_length1;
#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp289_ = number;
+ _tmp315_ = out_offset;
#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp290_ = g_strdup_printf ("/Contents %u 0 R\n", _tmp289_ + 2);
+ _tmp316_ = x;
#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp291_ = _tmp290_;
+ _tmp317_ = pixels;
#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp288_, _tmp291_);
+ _tmp317__length1 = pixels_length1;
#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp291_);
-#line 480 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp292_ = writer;
-#line 480 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp292_, ">>\n");
-#line 481 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp293_ = writer;
-#line 481 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp293_, "endobj\n");
+ _tmp318_ = in_offset;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp319_ = x;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp320_ = _tmp317_[_tmp318_ + (_tmp319_ * 3)];
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp314_[_tmp315_ + _tmp316_] = _tmp320_;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp321_ = _tmp314_[_tmp315_ + _tmp316_];
+#line 3991 "book.c"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp322_ = data;
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp322__length1 = data_length1;
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp324_ = book_compress_zlib (self, _tmp322_, _tmp322__length1, &_tmp323_);
#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp294_ = writer;
+ compressed_data = _tmp324_;
#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp294_, "\n");
+ compressed_data_length1 = _tmp323_;
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _compressed_data_size_ = compressed_data_length1;
#line 485 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp295_ = writer;
+ _tmp325_ = compressed_data;
#line 485 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp296_ = pdf_writer_start_object (_tmp295_);
+ _tmp325__length1 = compressed_data_length1;
#line 485 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- number = _tmp296_;
-#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp297_ = writer;
-#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp298_ = number;
-#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp299_ = g_strdup_printf ("%u 0 obj\n", _tmp298_);
-#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp300_ = _tmp299_;
-#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp297_, _tmp300_);
-#line 486 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp300_);
-#line 487 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp301_ = writer;
-#line 487 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp301_, "<<\n");
+ if (_tmp325_ != NULL) {
+#line 4019 "book.c"
+ gint _tmp326_ = 0;
+ const gchar* _tmp339_ = NULL;
#line 488 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp302_ = writer;
+ _tmp326_ = depth;
#line 488 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp302_, "/Type /XObject\n");
-#line 489 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp303_ = writer;
-#line 489 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp303_, "/Subtype /Image\n");
+ if (_tmp326_ > 1) {
+#line 4026 "book.c"
+ guint8* jpeg_data = NULL;
+ GdkPixbuf* _tmp327_ = NULL;
+ gint _tmp328_ = 0;
+ Page* _tmp329_ = NULL;
+ gint _tmp330_ = 0;
+ gint _tmp331_ = 0;
+ gint _tmp332_ = 0;
+ guint8* _tmp333_ = NULL;
+ gint jpeg_data_length1 = 0;
+ gint _jpeg_data_size_ = 0;
+ guint8* _tmp334_ = NULL;
+ gint _tmp334__length1 = 0;
+ guint8* _tmp335_ = NULL;
+ gint _tmp335__length1 = 0;
#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp304_ = writer;
+ _tmp327_ = image;
#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp305_ = width;
+ _tmp328_ = quality;
#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp306_ = g_strdup_printf ("/Width %d\n", _tmp305_);
+ _tmp329_ = page;
#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp307_ = _tmp306_;
+ _tmp330_ = page_get_dpi (_tmp329_);
#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp304_, _tmp307_);
+ _tmp331_ = _tmp330_;
#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp307_);
-#line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp308_ = writer;
+ _tmp333_ = book_compress_jpeg (self, _tmp327_, _tmp328_, _tmp331_, &_tmp332_);
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ jpeg_data = _tmp333_;
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ jpeg_data_length1 = _tmp332_;
+#line 490 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _jpeg_data_size_ = jpeg_data_length1;
#line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp309_ = height;
+ _tmp334_ = jpeg_data;
#line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp310_ = g_strdup_printf ("/Height %d\n", _tmp309_);
+ _tmp334__length1 = jpeg_data_length1;
#line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp311_ = _tmp310_;
+ _tmp335_ = compressed_data;
#line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp308_, _tmp311_);
+ _tmp335__length1 = compressed_data_length1;
#line 491 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp311_);
-#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp312_ = writer;
-#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp313_ = color_space;
-#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp314_ = g_strdup_printf ("/ColorSpace /%s\n", _tmp313_);
-#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp315_ = _tmp314_;
-#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp312_, _tmp315_);
-#line 492 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp315_);
+ if (_tmp334__length1 < _tmp335__length1) {
+#line 4069 "book.c"
+ gchar* _tmp336_ = NULL;
+ guint8* _tmp337_ = NULL;
+ gint _tmp337__length1 = 0;
+ guint8* _tmp338_ = NULL;
+ gint _tmp338__length1 = 0;
#line 493 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp316_ = writer;
+ _tmp336_ = g_strdup ("DCTDecode");
#line 493 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp317_ = depth;
-#line 493 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp318_ = g_strdup_printf ("/BitsPerComponent %d\n", _tmp317_);
-#line 493 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp319_ = _tmp318_;
-#line 493 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp316_, _tmp319_);
+ _g_free0 (filter);
#line 493 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp319_);
+ filter = _tmp336_;
#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp320_ = writer;
+ _tmp337_ = jpeg_data;
#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp321_ = data;
+ _tmp337__length1 = jpeg_data_length1;
#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp321__length1 = data_length1;
+ _tmp338_ = (_tmp337_ != NULL) ? _vala_array_dup1 (_tmp337_, _tmp337__length1) : ((gpointer) _tmp337_);
#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp322_ = g_strdup_printf ("/Length %d\n", _tmp321__length1);
+ _tmp338__length1 = _tmp337__length1;
#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp323_ = _tmp322_;
+ data = (g_free (data), NULL);
#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp320_, _tmp323_);
+ data = _tmp338_;
#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp323_);
-#line 495 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp324_ = filter;
-#line 495 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- if (_tmp324_ != NULL) {
-#line 3896 "book.c"
- PDFWriter* _tmp325_ = NULL;
- const gchar* _tmp326_ = NULL;
- gchar* _tmp327_ = NULL;
- gchar* _tmp328_ = NULL;
-#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp325_ = writer;
-#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp326_ = filter;
-#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp327_ = g_strdup_printf ("/Filter /%s\n", _tmp326_);
-#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp328_ = _tmp327_;
-#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp325_, _tmp328_);
-#line 496 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp328_);
-#line 3913 "book.c"
- }
-#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp329_ = writer;
-#line 497 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp329_, ">>\n");
+ data_length1 = _tmp338__length1;
+#line 494 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _data_size_ = data_length1;
+#line 4097 "book.c"
+ }
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ jpeg_data = (g_free (jpeg_data), NULL);
+#line 4101 "book.c"
+ }
#line 498 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp330_ = writer;
+ _tmp339_ = filter;
#line 498 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp330_, "stream\n");
-#line 499 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp331_ = writer;
-#line 499 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp332_ = data;
-#line 499 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp332__length1 = data_length1;
-#line 499 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write (_tmp331_, _tmp332_, _tmp332__length1);
+ if (_tmp339_ == NULL) {
+#line 4107 "book.c"
+ gchar* _tmp340_ = NULL;
+ guint8* _tmp341_ = NULL;
+ gint _tmp341__length1 = 0;
+ guint8* _tmp342_ = NULL;
+ gint _tmp342__length1 = 0;
#line 500 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp333_ = writer;
+ _tmp340_ = g_strdup ("FlateDecode");
#line 500 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp333_, "\n");
+ _g_free0 (filter);
+#line 500 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ filter = _tmp340_;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp341_ = compressed_data;
#line 501 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp334_ = writer;
+ _tmp341__length1 = compressed_data_length1;
#line 501 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp334_, "endstream\n");
-#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp335_ = writer;
-#line 502 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp335_, "endobj\n");
-#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp336_ = page_width;
-#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp337_ = width_buffer;
-#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp337__length1 = width_buffer_length1;
-#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp338_ = g_ascii_formatd (_tmp337_, _tmp337__length1, "%f", _tmp336_);
-#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp339_ = page_height;
-#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp340_ = height_buffer;
-#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp340__length1 = height_buffer_length1;
-#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp341_ = g_ascii_formatd (_tmp340_, _tmp340__length1, "%f", _tmp339_);
-#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp342_ = i;
-#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp343_ = g_strdup_printf ("q\n%s 0 0 %s 0 0 cm\n/Im%d Do\nQ", _tmp338_, _tmp341_, _tmp342_);
-#line 505 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- command = _tmp343_;
+ _tmp342_ = (_tmp341_ != NULL) ? _vala_array_dup2 (_tmp341_, _tmp341__length1) : ((gpointer) _tmp341_);
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp342__length1 = _tmp341__length1;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = (g_free (data), NULL);
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = _tmp342_;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data_length1 = _tmp342__length1;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _data_size_ = data_length1;
+#line 4135 "book.c"
+ }
+ }
#line 506 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp344_ = writer;
+ _tmp343_ = writer;
#line 506 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp344_, "\n");
+ pdf_writer_write_string (_tmp343_, "\n");
#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp345_ = writer;
+ _tmp344_ = writer;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp345_ = page_numbers;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp345__length1 = page_numbers_length1;
#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp346_ = pdf_writer_start_object (_tmp345_);
+ _tmp346_ = i;
#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- number = _tmp346_;
+ _tmp347_ = _tmp345_[_tmp346_];
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_start_object (_tmp344_, _tmp347_);
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp348_ = writer;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp349_ = page_numbers;
#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp347_ = writer;
+ _tmp349__length1 = page_numbers_length1;
#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp348_ = number;
+ _tmp350_ = i;
#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp349_ = g_strdup_printf ("%u 0 obj\n", _tmp348_);
+ _tmp351_ = _tmp349_[_tmp350_];
#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp350_ = _tmp349_;
+ _tmp352_ = g_strdup_printf ("%u 0 obj\n", _tmp351_);
#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp347_, _tmp350_);
+ _tmp353_ = _tmp352_;
#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp350_);
+ pdf_writer_write_string (_tmp348_, _tmp353_);
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp353_);
#line 509 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp351_ = writer;
+ _tmp354_ = writer;
#line 509 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp351_, "<<\n");
-#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp352_ = writer;
-#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp353_ = command;
-#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp354_ = strlen (_tmp353_);
-#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp355_ = _tmp354_;
+ pdf_writer_write_string (_tmp354_, "<<\n");
#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp356_ = g_strdup_printf ("/Length %d\n", _tmp355_);
+ _tmp355_ = writer;
#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp357_ = _tmp356_;
-#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp352_, _tmp357_);
-#line 510 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp357_);
+ pdf_writer_write_string (_tmp355_, "/Type /Page\n");
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp356_ = writer;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp357_ = pages_number;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp358_ = g_strdup_printf ("/Parent %u 0 R\n", _tmp357_);
#line 511 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp358_ = writer;
+ _tmp359_ = _tmp358_;
#line 511 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp358_, ">>\n");
+ pdf_writer_write_string (_tmp356_, _tmp359_);
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp359_);
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp360_ = writer;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp361_ = i;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp362_ = page_image_numbers;
#line 512 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp359_ = writer;
+ _tmp362__length1 = page_image_numbers_length1;
#line 512 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp359_, "stream\n");
+ _tmp363_ = i;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp364_ = _tmp362_[_tmp363_];
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp365_ = g_strdup_printf ("/Resources << /XObject << /Im%d %u 0 R >> >>\n", _tmp361_, _tmp364_);
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp366_ = _tmp365_;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp360_, _tmp366_);
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp366_);
#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp360_ = writer;
+ _tmp367_ = writer;
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp368_ = page_width;
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp369_ = width_buffer;
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp369__length1 = width_buffer_length1;
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp370_ = g_ascii_formatd (_tmp369_, _tmp369__length1, "%.2f", _tmp368_);
#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp361_ = command;
+ _tmp371_ = page_height;
#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp360_, _tmp361_);
+ _tmp372_ = height_buffer;
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp372__length1 = height_buffer_length1;
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp373_ = g_ascii_formatd (_tmp372_, _tmp372__length1, "%.2f", _tmp371_);
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp374_ = g_strdup_printf ("/MediaBox [ 0 0 %s %s ]\n", _tmp370_, _tmp373_);
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp375_ = _tmp374_;
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp367_, _tmp375_);
+#line 513 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp375_);
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp376_ = writer;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp377_ = page_content_numbers;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp377__length1 = page_content_numbers_length1;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp378_ = i;
#line 514 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp362_ = writer;
+ _tmp379_ = _tmp377_[_tmp378_];
#line 514 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp362_, "\n");
+ _tmp380_ = g_strdup_printf ("/Contents %u 0 R\n", _tmp379_);
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp381_ = _tmp380_;
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp376_, _tmp381_);
+#line 514 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp381_);
#line 515 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp363_ = writer;
+ _tmp382_ = writer;
#line 515 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp363_, "endstream\n");
+ pdf_writer_write_string (_tmp382_, ">>\n");
#line 516 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp364_ = writer;
+ _tmp383_ = writer;
#line 516 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp364_, "endobj\n");
-#line 518 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp365_ = i;
-#line 518 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- g_signal_emit_by_name (self, "saving", _tmp365_);
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (command);
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- compressed_data = (g_free (compressed_data), NULL);
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- data = (g_free (data), NULL);
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- height_buffer = (g_free (height_buffer), NULL);
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- width_buffer = (g_free (width_buffer), NULL);
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (filter);
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (color_space);
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_object_unref0 (image);
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _page_unref0 (page);
-#line 4055 "book.c"
- }
- }
- }
+ pdf_writer_write_string (_tmp383_, "endobj\n");
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp384_ = writer;
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp384_, "\n");
+#line 520 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp385_ = writer;
+#line 520 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp386_ = page_image_numbers;
+#line 520 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp386__length1 = page_image_numbers_length1;
+#line 520 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp387_ = i;
+#line 520 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp388_ = _tmp386_[_tmp387_];
+#line 520 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_start_object (_tmp385_, _tmp388_);
+#line 521 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp389_ = writer;
+#line 521 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp390_ = page_image_numbers;
+#line 521 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp390__length1 = page_image_numbers_length1;
+#line 521 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp391_ = i;
+#line 521 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp392_ = _tmp390_[_tmp391_];
+#line 521 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp393_ = g_strdup_printf ("%u 0 obj\n", _tmp392_);
+#line 521 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp394_ = _tmp393_;
+#line 521 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp389_, _tmp394_);
+#line 521 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp394_);
#line 522 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp366_ = writer;
+ _tmp395_ = writer;
#line 522 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp366_, "\n");
+ pdf_writer_write_string (_tmp395_, "<<\n");
#line 523 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp367_ = writer;
+ _tmp396_ = writer;
#line 523 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp368_ = pdf_writer_start_object (_tmp367_);
-#line 523 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- info_number = _tmp368_;
-#line 524 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp369_ = writer;
-#line 524 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp370_ = info_number;
-#line 524 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp371_ = g_strdup_printf ("%u 0 obj\n", _tmp370_);
-#line 524 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp372_ = _tmp371_;
+ pdf_writer_write_string (_tmp396_, "/Type /XObject\n");
#line 524 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp369_, _tmp372_);
+ _tmp397_ = writer;
#line 524 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp372_);
+ pdf_writer_write_string (_tmp397_, "/Subtype /Image\n");
#line 525 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp373_ = writer;
+ _tmp398_ = writer;
#line 525 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp373_, "<<\n");
+ _tmp399_ = width;
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp400_ = g_strdup_printf ("/Width %d\n", _tmp399_);
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp401_ = _tmp400_;
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp398_, _tmp401_);
+#line 525 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp401_);
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp402_ = writer;
#line 526 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp374_ = writer;
+ _tmp403_ = height;
#line 526 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp375_ = g_strdup_printf ("/Creator (Simple Scan %s)\n", VERSION);
+ _tmp404_ = g_strdup_printf ("/Height %d\n", _tmp403_);
#line 526 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp376_ = _tmp375_;
+ _tmp405_ = _tmp404_;
#line 526 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp374_, _tmp376_);
+ pdf_writer_write_string (_tmp402_, _tmp405_);
#line 526 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp376_);
+ _g_free0 (_tmp405_);
#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp377_ = writer;
+ _tmp406_ = writer;
#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp377_, ">>\n");
+ _tmp407_ = color_space;
+#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp408_ = g_strdup_printf ("/ColorSpace /%s\n", _tmp407_);
+#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp409_ = _tmp408_;
+#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp406_, _tmp409_);
+#line 527 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp409_);
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp410_ = writer;
#line 528 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp378_ = writer;
+ _tmp411_ = depth;
#line 528 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp378_, "endobj\n");
+ _tmp412_ = g_strdup_printf ("/BitsPerComponent %d\n", _tmp411_);
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp413_ = _tmp412_;
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp410_, _tmp413_);
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp413_);
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp414_ = writer;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp415_ = data;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp415__length1 = data_length1;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp416_ = g_strdup_printf ("/Length %d\n", _tmp415__length1);
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp417_ = _tmp416_;
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp414_, _tmp417_);
+#line 529 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp417_);
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp418_ = filter;
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp418_ != NULL) {
+#line 4376 "book.c"
+ PDFWriter* _tmp419_ = NULL;
+ const gchar* _tmp420_ = NULL;
+ gchar* _tmp421_ = NULL;
+ gchar* _tmp422_ = NULL;
#line 531 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp379_ = writer;
+ _tmp419_ = writer;
#line 531 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp379_, "\n");
-#line 532 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp380_ = writer;
+ _tmp420_ = filter;
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp421_ = g_strdup_printf ("/Filter /%s\n", _tmp420_);
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp422_ = _tmp421_;
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp419_, _tmp422_);
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp422_);
+#line 4393 "book.c"
+ }
#line 532 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp381_ = _tmp380_->offset;
+ _tmp423_ = writer;
#line 532 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- xref_offset = _tmp381_;
+ pdf_writer_write_string (_tmp423_, ">>\n");
#line 533 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp382_ = writer;
+ _tmp424_ = writer;
#line 533 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp382_, "xref\n");
-#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp383_ = writer;
+ pdf_writer_write_string (_tmp424_, "stream\n");
#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp384_ = writer;
+ _tmp425_ = writer;
#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp385_ = _tmp384_->object_offsets;
+ _tmp426_ = data;
#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp386_ = g_list_length (_tmp385_);
+ _tmp426__length1 = data_length1;
#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp387_ = g_strdup_printf ("0 %zu\n", (gsize) (_tmp386_ + 1));
-#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp388_ = _tmp387_;
-#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp383_, _tmp388_);
-#line 534 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp388_);
+ pdf_writer_write (_tmp425_, _tmp426_, _tmp426__length1);
#line 535 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp389_ = writer;
+ _tmp427_ = writer;
#line 535 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp389_, "0000000000 65535 f \n");
-#line 536 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp390_ = writer;
-#line 536 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp391_ = _tmp390_->object_offsets;
-#line 4141 "book.c"
- {
- GList* offset_collection = NULL;
- GList* offset_it = NULL;
+ pdf_writer_write_string (_tmp427_, "\n");
#line 536 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- offset_collection = _tmp391_;
+ _tmp428_ = writer;
#line 536 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- for (offset_it = offset_collection; offset_it != NULL; offset_it = offset_it->next) {
-#line 4149 "book.c"
- guint offset = 0U;
-#line 536 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- offset = (guint) ((guintptr) offset_it->data);
-#line 4153 "book.c"
- {
- PDFWriter* _tmp392_ = NULL;
- guint _tmp393_ = 0U;
- gchar* _tmp394_ = NULL;
- gchar* _tmp395_ = NULL;
-#line 537 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp392_ = writer;
-#line 537 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp393_ = offset;
+ pdf_writer_write_string (_tmp428_, "endstream\n");
#line 537 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp394_ = g_strdup_printf ("%010zu 00000 n \n", (gsize) _tmp393_);
+ _tmp429_ = writer;
#line 537 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp395_ = _tmp394_;
-#line 537 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp392_, _tmp395_);
-#line 537 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp395_);
-#line 4171 "book.c"
- }
- }
- }
+ pdf_writer_write_string (_tmp429_, "endobj\n");
#line 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp396_ = writer;
+ _tmp430_ = writer;
#line 540 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp396_, "\n");
+ pdf_writer_write_string (_tmp430_, "\n");
#line 541 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp397_ = writer;
+ _tmp431_ = writer;
#line 541 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp397_, "trailer\n");
+ _tmp432_ = struct_tree_root_number;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_start_object (_tmp431_, _tmp432_);
#line 542 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp398_ = writer;
+ _tmp433_ = writer;
#line 542 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp398_, "<<\n");
-#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp399_ = writer;
-#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp400_ = writer;
-#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp401_ = _tmp400_->object_offsets;
-#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp402_ = g_list_length (_tmp401_);
-#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp403_ = g_strdup_printf ("/Size %zu\n", (gsize) (_tmp402_ + 1));
-#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp404_ = _tmp403_;
+ _tmp434_ = struct_tree_root_number;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp435_ = g_strdup_printf ("%u 0 obj\n", _tmp434_);
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp436_ = _tmp435_;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp433_, _tmp436_);
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp436_);
#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp399_, _tmp404_);
+ _tmp437_ = writer;
#line 543 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp404_);
-#line 544 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp405_ = writer;
-#line 544 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp406_ = info_number;
-#line 544 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp407_ = g_strdup_printf ("/Info %u 0 R\n", _tmp406_);
-#line 544 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp408_ = _tmp407_;
+ pdf_writer_write_string (_tmp437_, "<<\n");
#line 544 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp405_, _tmp408_);
+ _tmp438_ = writer;
#line 544 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp408_);
+ pdf_writer_write_string (_tmp438_, "/Type /StructTreeRoot\n");
#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp409_ = writer;
+ _tmp439_ = writer;
#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp410_ = catalog_number;
-#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp411_ = g_strdup_printf ("/Root %u 0 R\n", _tmp410_);
-#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp412_ = _tmp411_;
-#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp409_, _tmp412_);
-#line 545 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp412_);
-#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp413_ = writer;
+ pdf_writer_write_string (_tmp439_, ">>\n");
#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp414_ = id;
+ _tmp440_ = writer;
#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp415_ = id;
-#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp416_ = g_strdup_printf ("/ID [<%s> <%s>]\n", _tmp414_, _tmp415_);
-#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp417_ = _tmp416_;
-#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp413_, _tmp417_);
-#line 546 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp417_);
-#line 547 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp418_ = writer;
-#line 547 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp418_, ">>\n");
-#line 548 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp419_ = writer;
-#line 548 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp419_, "startxref\n");
+ pdf_writer_write_string (_tmp440_, "endobj\n");
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp441_ = page_width;
#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp420_ = writer;
+ _tmp442_ = width_buffer;
#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp421_ = xref_offset;
+ _tmp442__length1 = width_buffer_length1;
#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp422_ = g_strdup_printf ("%zu\n", _tmp421_);
+ _tmp443_ = g_ascii_formatd (_tmp442_, _tmp442__length1, "%f", _tmp441_);
#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp423_ = _tmp422_;
+ _tmp444_ = page_height;
#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp420_, _tmp423_);
+ _tmp445_ = height_buffer;
#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_free0 (_tmp423_);
+ _tmp445__length1 = height_buffer_length1;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp446_ = g_ascii_formatd (_tmp445_, _tmp445__length1, "%f", _tmp444_);
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp447_ = i;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp448_ = g_strdup_printf ("q\n%s 0 0 %s 0 0 cm\n/Im%d Do\nQ", _tmp443_, _tmp446_, _tmp447_);
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ command = _tmp448_;
#line 550 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp424_ = writer;
+ _tmp449_ = writer;
#line 550 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- pdf_writer_write_string (_tmp424_, "%%EOF\n");
+ pdf_writer_write_string (_tmp449_, "\n");
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp450_ = writer;
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp451_ = page_content_numbers;
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp451__length1 = page_content_numbers_length1;
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp452_ = i;
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp453_ = _tmp451_[_tmp452_];
+#line 551 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_start_object (_tmp450_, _tmp453_);
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp454_ = writer;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp455_ = page_content_numbers;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp455__length1 = page_content_numbers_length1;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp456_ = i;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp457_ = _tmp455_[_tmp456_];
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp458_ = g_strdup_printf ("%u 0 obj\n", _tmp457_);
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp459_ = _tmp458_;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp454_, _tmp459_);
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp459_);
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp460_ = writer;
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp460_, "<<\n");
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp461_ = writer;
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp462_ = command;
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp463_ = strlen (_tmp462_);
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp464_ = _tmp463_;
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp465_ = g_strdup_printf ("/Length %d\n", _tmp464_);
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp466_ = _tmp465_;
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp461_, _tmp466_);
+#line 554 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp466_);
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp467_ = writer;
+#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp467_, ">>\n");
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp468_ = writer;
+#line 556 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp468_, "stream\n");
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp469_ = writer;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp470_ = command;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp469_, _tmp470_);
+#line 558 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp471_ = writer;
+#line 558 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp471_, "\n");
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp472_ = writer;
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp472_, "endstream\n");
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp473_ = writer;
+#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp473_, "endobj\n");
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp474_ = i;
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_signal_emit_by_name (self, "saving", _tmp474_);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (command);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ compressed_data = (g_free (compressed_data), NULL);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ data = (g_free (data), NULL);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ height_buffer = (g_free (height_buffer), NULL);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ width_buffer = (g_free (width_buffer), NULL);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (filter);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (color_space);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_object_unref0 (image);
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _page_unref0 (page);
+#line 4585 "book.c"
+ }
+ }
+ }
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp475_ = writer;
+#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp475_, "\n");
+#line 567 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp476_ = writer;
+#line 567 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp477_ = info_number;
+#line 567 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_start_object (_tmp476_, _tmp477_);
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp478_ = writer;
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp479_ = info_number;
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp480_ = g_strdup_printf ("%u 0 obj\n", _tmp479_);
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp481_ = _tmp480_;
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp478_, _tmp481_);
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp481_);
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp482_ = writer;
+#line 569 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp482_, "<<\n");
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp483_ = writer;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp484_ = g_strdup_printf ("/Creator (Simple Scan %s)\n", VERSION);
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp485_ = _tmp484_;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp483_, _tmp485_);
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp485_);
+#line 571 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp486_ = writer;
+#line 571 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp486_, ">>\n");
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp487_ = writer;
+#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp487_, "endobj\n");
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp488_ = writer;
+#line 575 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp488_, "\n");
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp489_ = writer;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp490_ = _tmp489_->offset;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ xref_offset = _tmp490_;
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp491_ = writer;
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp491_, "xref\n");
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp492_ = writer;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp493_ = writer;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp494_ = _tmp493_->object_offsets;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp494__length1 = _tmp493_->object_offsets_length1;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp495_ = g_strdup_printf ("0 %zu\n", (gsize) (_tmp494__length1 + 1));
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp496_ = _tmp495_;
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp492_, _tmp496_);
+#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp496_);
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp497_ = writer;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp498_ = writer;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp499_ = book_next_empty_object (_tmp498_, 0);
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp500_ = g_strdup_printf ("%010zu 65535 f \n", (gsize) _tmp499_);
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp501_ = _tmp500_;
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp497_, _tmp501_);
+#line 579 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp501_);
+#line 4677 "book.c"
+ {
+ gint i = 0;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = 0;
+#line 4682 "book.c"
+ {
+ gboolean _tmp502_ = FALSE;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp502_ = TRUE;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 4689 "book.c"
+ gint _tmp504_ = 0;
+ PDFWriter* _tmp505_ = NULL;
+ guint* _tmp506_ = NULL;
+ gint _tmp506__length1 = 0;
+ PDFWriter* _tmp507_ = NULL;
+ guint* _tmp508_ = NULL;
+ gint _tmp508__length1 = 0;
+ gint _tmp509_ = 0;
+ guint _tmp510_ = 0U;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp502_) {
+#line 4701 "book.c"
+ gint _tmp503_ = 0;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp503_ = i;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = _tmp503_ + 1;
+#line 4707 "book.c"
+ }
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp502_ = FALSE;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp504_ = i;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp505_ = writer;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp506_ = _tmp505_->object_offsets;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp506__length1 = _tmp505_->object_offsets_length1;
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp504_ < _tmp506__length1)) {
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 4723 "book.c"
+ }
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp507_ = writer;
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp508_ = _tmp507_->object_offsets;
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp508__length1 = _tmp507_->object_offsets_length1;
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp509_ = i;
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp510_ = _tmp508_[_tmp509_];
+#line 581 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp510_ == ((guint) 0)) {
+#line 4737 "book.c"
+ PDFWriter* _tmp511_ = NULL;
+ PDFWriter* _tmp512_ = NULL;
+ gint _tmp513_ = 0;
+ gint _tmp514_ = 0;
+ gchar* _tmp515_ = NULL;
+ gchar* _tmp516_ = NULL;
+#line 582 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp511_ = writer;
+#line 582 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp512_ = writer;
+#line 582 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp513_ = i;
+#line 582 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp514_ = book_next_empty_object (_tmp512_, _tmp513_ + 1);
+#line 582 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp515_ = g_strdup_printf ("%010zu 65535 f \n", (gsize) _tmp514_);
+#line 582 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp516_ = _tmp515_;
+#line 582 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp511_, _tmp516_);
+#line 582 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp516_);
+#line 4760 "book.c"
+ } else {
+ PDFWriter* _tmp517_ = NULL;
+ PDFWriter* _tmp518_ = NULL;
+ guint* _tmp519_ = NULL;
+ gint _tmp519__length1 = 0;
+ gint _tmp520_ = 0;
+ guint _tmp521_ = 0U;
+ gchar* _tmp522_ = NULL;
+ gchar* _tmp523_ = NULL;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp517_ = writer;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp518_ = writer;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp519_ = _tmp518_->object_offsets;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp519__length1 = _tmp518_->object_offsets_length1;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp520_ = i;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp521_ = _tmp519_[_tmp520_];
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp522_ = g_strdup_printf ("%010zu 00000 n \n", (gsize) _tmp521_);
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp523_ = _tmp522_;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp517_, _tmp523_);
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp523_);
+#line 4790 "book.c"
+ }
+ }
+ }
+ }
+#line 587 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp524_ = writer;
+#line 587 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp524_, "\n");
+#line 588 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp525_ = writer;
+#line 588 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp525_, "trailer\n");
+#line 589 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp526_ = writer;
+#line 589 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp526_, "<<\n");
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp527_ = writer;
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp528_ = writer;
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp529_ = _tmp528_->object_offsets;
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp529__length1 = _tmp528_->object_offsets_length1;
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp530_ = g_strdup_printf ("/Size %zu\n", (gsize) (_tmp529__length1 + 1));
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp531_ = _tmp530_;
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp527_, _tmp531_);
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp531_);
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp532_ = writer;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp533_ = info_number;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp534_ = g_strdup_printf ("/Info %u 0 R\n", _tmp533_);
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp535_ = _tmp534_;
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp532_, _tmp535_);
+#line 591 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp535_);
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp536_ = writer;
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp537_ = catalog_number;
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp538_ = g_strdup_printf ("/Root %u 0 R\n", _tmp537_);
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp539_ = _tmp538_;
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp536_, _tmp539_);
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp539_);
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp540_ = writer;
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp541_ = id;
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp542_ = id;
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp543_ = g_strdup_printf ("/ID [<%s> <%s>]\n", _tmp541_, _tmp542_);
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp544_ = _tmp543_;
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp540_, _tmp544_);
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp544_);
+#line 594 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp545_ = writer;
+#line 594 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp545_, ">>\n");
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp546_ = writer;
+#line 595 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp546_, "startxref\n");
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp547_ = writer;
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp548_ = xref_offset;
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp549_ = g_strdup_printf ("%zu\n", _tmp548_);
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp550_ = _tmp549_;
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp547_, _tmp550_);
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (_tmp550_);
+#line 597 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp551_ = writer;
+#line 597 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ pdf_writer_write_string (_tmp551_, "%%EOF\n");
+#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (metadata);
+#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_free0 (date_string);
+#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _g_date_time_unref0 (now);
+#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_content_numbers = (g_free (page_content_numbers), NULL);
+#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_image_numbers = (g_free (page_image_numbers), NULL);
+#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ page_numbers = (g_free (page_numbers), NULL);
#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_pdf_writer_unref0 (writer);
#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_g_object_unref0 (stream);
#line 257 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_g_free0 (id);
-#line 4271 "book.c"
+#line 4903 "book.c"
+}
+
+
+static gint book_next_empty_object (PDFWriter* writer, gint start) {
+ gint result = 0;
+#line 600 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_val_if_fail (writer != NULL, 0);
+#line 4911 "book.c"
+ {
+ gint i = 0;
+ gint _tmp0_ = 0;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = start;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = _tmp0_;
+#line 4919 "book.c"
+ {
+ gboolean _tmp1_ = FALSE;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = TRUE;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ while (TRUE) {
+#line 4926 "book.c"
+ gint _tmp3_ = 0;
+ PDFWriter* _tmp4_ = NULL;
+ guint* _tmp5_ = NULL;
+ gint _tmp5__length1 = 0;
+ PDFWriter* _tmp6_ = NULL;
+ guint* _tmp7_ = NULL;
+ gint _tmp7__length1 = 0;
+ gint _tmp8_ = 0;
+ guint _tmp9_ = 0U;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!_tmp1_) {
+#line 4938 "book.c"
+ gint _tmp2_ = 0;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = i;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ i = _tmp2_ + 1;
+#line 4944 "book.c"
+ }
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = FALSE;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = i;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = writer;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5_ = _tmp4_->object_offsets;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp5__length1 = _tmp4_->object_offsets_length1;
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (!(_tmp3_ < _tmp5__length1)) {
+#line 602 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ break;
+#line 4960 "book.c"
+ }
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp6_ = writer;
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp7_ = _tmp6_->object_offsets;
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp7__length1 = _tmp6_->object_offsets_length1;
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp8_ = i;
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp9_ = _tmp7_[_tmp8_];
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ if (_tmp9_ == ((guint) 0)) {
+#line 4974 "book.c"
+ gint _tmp10_ = 0;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp10_ = i;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = _tmp10_ + 1;
+#line 604 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 4982 "book.c"
+ }
+ }
+ }
+ }
+#line 605 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = 0;
+#line 605 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ return result;
+#line 4991 "book.c"
}
@@ -4275,110 +5009,110 @@ void book_save (Book* self, const gchar* type, gint quality, GFile* file, GError
const gchar* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
GQuark _tmp3_ = 0U;
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
static GQuark _tmp2_label0 = 0;
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
static GQuark _tmp2_label1 = 0;
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
static GQuark _tmp2_label2 = 0;
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
static GQuark _tmp2_label3 = 0;
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
static GQuark _tmp2_label4 = 0;
-#line 4289 "book.c"
+#line 5009 "book.c"
GError * _inner_error_ = NULL;
-#line 553 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (self != NULL);
-#line 553 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (type != NULL);
-#line 553 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (file != NULL);
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp0_ = type;
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp1_ = _tmp0_;
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 610 "/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 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
switch (0) {
-#line 4307 "book.c"
+#line 5027 "book.c"
default:
{
const gchar* _tmp4_ = NULL;
gint _tmp5_ = 0;
GFile* _tmp6_ = NULL;
-#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp4_ = type;
-#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp5_ = quality;
-#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp6_ = file;
-#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
book_save_multi_file (self, _tmp4_, _tmp5_, _tmp6_, &_inner_error_);
-#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_propagate_error (error, _inner_error_);
-#line 560 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return;
-#line 4327 "book.c"
+#line 5047 "book.c"
}
-#line 561 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 616 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
break;
-#line 4331 "book.c"
+#line 5051 "book.c"
}
}
} else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("ps")))) {
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
switch (0) {
-#line 4337 "book.c"
+#line 5057 "book.c"
default:
{
GFile* _tmp7_ = NULL;
-#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp7_ = file;
-#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
book_save_ps (self, _tmp7_, &_inner_error_);
-#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_propagate_error (error, _inner_error_);
-#line 563 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 618 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return;
-#line 4351 "book.c"
+#line 5071 "book.c"
}
-#line 564 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 619 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
break;
-#line 4355 "book.c"
+#line 5075 "book.c"
}
}
} else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("pdf")))) {
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 610 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
switch (0) {
-#line 4361 "book.c"
+#line 5081 "book.c"
default:
{
GFile* _tmp8_ = NULL;
gint _tmp9_ = 0;
-#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp8_ = file;
-#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp9_ = quality;
-#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
book_save_pdf (self, _tmp8_, _tmp9_, &_inner_error_);
-#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_propagate_error (error, _inner_error_);
-#line 566 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return;
-#line 4378 "book.c"
+#line 5098 "book.c"
}
-#line 567 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 622 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
break;
-#line 4382 "book.c"
+#line 5102 "book.c"
}
}
}
@@ -4399,7 +5133,7 @@ guint book_get_n_pages (Book* self) {
result = _tmp1_;
#line 16 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 4403 "book.c"
+#line 5123 "book.c"
}
@@ -4414,7 +5148,7 @@ gboolean book_get_needs_saving (Book* self) {
result = _tmp0_;
#line 21 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 4418 "book.c"
+#line 5138 "book.c"
}
@@ -4432,7 +5166,7 @@ void book_set_needs_saving (Book* self, gboolean value) {
if (_tmp0_ == _tmp1_) {
#line 25 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return;
-#line 4436 "book.c"
+#line 5156 "book.c"
}
#line 26 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp2_ = value;
@@ -4440,7 +5174,7 @@ void book_set_needs_saving (Book* self, gboolean value) {
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 4444 "book.c"
+#line 5164 "book.c"
}
@@ -4459,26 +5193,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 4463 "book.c"
+#line 5183 "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 4469 "book.c"
+#line 5189 "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 4475 "book.c"
+#line 5195 "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 4482 "book.c"
+#line 5202 "book.c"
}
@@ -4487,7 +5221,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 4491 "book.c"
+#line 5211 "book.c"
}
}
@@ -4497,11 +5231,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 4501 "book.c"
+#line 5221 "book.c"
} else {
#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
dest_value->data[0].v_pointer = NULL;
-#line 4505 "book.c"
+#line 5225 "book.c"
}
}
@@ -4509,37 +5243,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 4513 "book.c"
+#line 5233 "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 4520 "book.c"
+#line 5240 "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 4527 "book.c"
+#line 5247 "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 4531 "book.c"
+#line 5251 "book.c"
}
#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = book_ref (object);
-#line 4535 "book.c"
+#line 5255 "book.c"
} else {
#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = NULL;
-#line 4539 "book.c"
+#line 5259 "book.c"
}
#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return NULL;
-#line 4543 "book.c"
+#line 5263 "book.c"
}
@@ -4550,25 +5284,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 4554 "book.c"
+#line 5274 "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 4560 "book.c"
+#line 5280 "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 4564 "book.c"
+#line 5284 "book.c"
} else {
#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
*object_p = book_ref (value->data[0].v_pointer);
-#line 4568 "book.c"
+#line 5288 "book.c"
}
#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return NULL;
-#line 4572 "book.c"
+#line 5292 "book.c"
}
@@ -4582,7 +5316,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 4586 "book.c"
+#line 5306 "book.c"
}
@@ -4591,7 +5325,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 4595 "book.c"
+#line 5315 "book.c"
}
@@ -4611,17 +5345,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 4615 "book.c"
+#line 5335 "book.c"
} else {
#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = NULL;
-#line 4619 "book.c"
+#line 5339 "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 4625 "book.c"
+#line 5345 "book.c"
}
}
@@ -4640,17 +5374,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 4644 "book.c"
+#line 5364 "book.c"
} else {
#line 12 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = NULL;
-#line 4648 "book.c"
+#line 5368 "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 4654 "book.c"
+#line 5374 "book.c"
}
}
@@ -4674,7 +5408,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 4678 "book.c"
+#line 5398 "book.c"
}
@@ -4683,7 +5417,7 @@ 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 4687 "book.c"
+#line 5407 "book.c"
}
@@ -4696,7 +5430,7 @@ static void book_finalize (Book* obj) {
g_signal_handlers_destroy (self);
#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp0_ = self->priv->pages;
-#line 4700 "book.c"
+#line 5420 "book.c"
{
GList* page_collection = NULL;
GList* page_it = NULL;
@@ -4704,14 +5438,14 @@ static void book_finalize (Book* obj) {
page_collection = _tmp0_;
#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 4708 "book.c"
+#line 5428 "book.c"
Page* _tmp1_ = NULL;
Page* page = NULL;
#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp1_ = _page_ref0 ((Page*) page_it->data);
#line 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
page = _tmp1_;
-#line 4715 "book.c"
+#line 5435 "book.c"
{
Page* _tmp2_ = NULL;
guint _tmp3_ = 0U;
@@ -4731,7 +5465,7 @@ static void book_finalize (Book* obj) {
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 45 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_page_unref0 (page);
-#line 4735 "book.c"
+#line 5455 "book.c"
}
}
}
@@ -4739,7 +5473,7 @@ static void book_finalize (Book* obj) {
__g_list_free__page_unref0_0 (self->priv->pages);
#line 231 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_g_byte_array_unref0 (self->priv->jpeg_data);
-#line 4743 "book.c"
+#line 5463 "book.c"
}
@@ -4764,7 +5498,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 4768 "book.c"
+#line 5488 "book.c"
}
@@ -4777,15 +5511,15 @@ 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 4781 "book.c"
+#line 5501 "book.c"
}
}
static gpointer _g_object_ref0 (gpointer self) {
-#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 635 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return self ? g_object_ref (self) : NULL;
-#line 4789 "book.c"
+#line 5509 "book.c"
}
@@ -4793,28 +5527,39 @@ PDFWriter* pdf_writer_construct (GType object_type, GFileOutputStream* stream) {
PDFWriter* self = NULL;
GFileOutputStream* _tmp0_ = NULL;
GFileOutputStream* _tmp1_ = NULL;
-#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ guint* _tmp2_ = NULL;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_val_if_fail (stream != NULL, NULL);
-#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
self = (PDFWriter*) g_type_create_instance (object_type);
-#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 635 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp0_ = stream;
-#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 635 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp1_ = _g_object_ref0 (_tmp0_);
-#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 635 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_g_object_unref0 (self->priv->stream);
-#line 580 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 635 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
self->priv->stream = _tmp1_;
-#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 636 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = g_new0 (guint, 0);
+#line 636 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->object_offsets = (g_free (self->object_offsets), NULL);
+#line 636 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->object_offsets = _tmp2_;
+#line 636 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->object_offsets_length1 = 0;
+#line 636 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->_object_offsets_size_ = self->object_offsets_length1;
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return self;
-#line 4811 "book.c"
+#line 5542 "book.c"
}
PDFWriter* pdf_writer_new (GFileOutputStream* stream) {
-#line 578 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 633 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return pdf_writer_construct (TYPE_PDF_WRITER, stream);
-#line 4818 "book.c"
+#line 5549 "book.c"
}
@@ -4823,24 +5568,24 @@ void pdf_writer_write (PDFWriter* self, guint8* data, int data_length1) {
guint8* _tmp5_ = NULL;
gint _tmp5__length1 = 0;
GError * _inner_error_ = NULL;
-#line 583 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 639 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (self != NULL);
-#line 4829 "book.c"
+#line 5560 "book.c"
{
GFileOutputStream* _tmp0_ = NULL;
guint8* _tmp1_ = NULL;
gint _tmp1__length1 = 0;
-#line 587 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp0_ = self->priv->stream;
-#line 587 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp1_ = data;
-#line 587 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp1__length1 = data_length1;
-#line 587 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 643 "/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 587 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 643 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 4844 "book.c"
+#line 5575 "book.c"
goto __catch1_g_error;
}
}
@@ -4850,40 +5595,40 @@ void pdf_writer_write (PDFWriter* self, guint8* data, int data_length1) {
GError* e = NULL;
GError* _tmp2_ = NULL;
const gchar* _tmp3_ = NULL;
-#line 585 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
e = _inner_error_;
-#line 585 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_inner_error_ = NULL;
-#line 591 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp2_ = e;
-#line 591 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp3_ = _tmp2_->message;
-#line 591 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- g_warning ("book.vala:591: Error writing PDF: %s", _tmp3_);
-#line 585 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 647 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_warning ("book.vala:647: Error writing PDF: %s", _tmp3_);
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_g_error_free0 (e);
-#line 4866 "book.c"
+#line 5597 "book.c"
}
__finally1:
-#line 585 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 585 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 641 "/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 585 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_clear_error (&_inner_error_);
-#line 585 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 641 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return;
-#line 4877 "book.c"
+#line 5608 "book.c"
}
-#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 649 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp4_ = self->offset;
-#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 649 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp5_ = data;
-#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 649 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp5__length1 = data_length1;
-#line 593 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 649 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
self->offset = _tmp4_ + _tmp5__length1;
-#line 4887 "book.c"
+#line 5618 "book.c"
}
@@ -4902,49 +5647,49 @@ static gchar* string_to_utf8 (const gchar* self, int* result_length1) {
gint _tmp6_ = 0;
gchar* _tmp7_ = NULL;
gint _tmp7__length1 = 0;
-#line 1405 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1405 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
g_return_val_if_fail (self != NULL, NULL);
-#line 1406 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1406 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp0_ = strlen (self);
-#line 1406 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1406 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp1_ = _tmp0_;
-#line 1406 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1406 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp2_ = g_new0 (gchar, _tmp1_ + 1);
-#line 1406 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1406 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_result_ = _tmp2_;
-#line 1406 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1406 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_result__length1 = _tmp1_ + 1;
-#line 1406 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1406 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
__result__size_ = _result__length1;
-#line 1407 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1407 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp3_ = _result__length1;
-#line 1407 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1407 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_result__length1 = _tmp3_ - 1;
-#line 1408 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1408 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp4_ = _result_;
-#line 1408 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1408 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp4__length1 = _result__length1;
-#line 1408 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1408 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp5_ = strlen (self);
-#line 1408 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1408 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp6_ = _tmp5_;
-#line 1408 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1408 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
memcpy (_tmp4_, self, (gsize) _tmp6_);
-#line 1409 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1409 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp7_ = _result_;
-#line 1409 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1409 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp7__length1 = _result__length1;
-#line 1409 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1409 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
if (result_length1) {
-#line 1409 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1409 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
*result_length1 = _tmp7__length1;
-#line 4942 "book.c"
+#line 5673 "book.c"
}
-#line 1409 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1409 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
result = _tmp7_;
-#line 1409 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+#line 1409 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
return result;
-#line 4948 "book.c"
+#line 5679 "book.c"
}
@@ -4954,262 +5699,312 @@ void pdf_writer_write_string (PDFWriter* self, const gchar* text) {
gchar* _tmp2_ = NULL;
guint8* _tmp3_ = NULL;
gint _tmp3__length1 = 0;
-#line 596 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 652 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (self != NULL);
-#line 596 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 652 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (text != NULL);
-#line 598 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp0_ = text;
-#line 598 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp2_ = string_to_utf8 (_tmp0_, &_tmp1_);
-#line 598 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp3_ = (guint8*) _tmp2_;
-#line 598 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp3__length1 = (_tmp1_ * sizeof (gchar)) / sizeof (guint8);
-#line 598 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
pdf_writer_write (self, _tmp3_, (_tmp1_ * sizeof (gchar)) / sizeof (guint8));
-#line 598 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 654 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp3_ = (g_free (_tmp3_), NULL);
-#line 4974 "book.c"
+#line 5705 "book.c"
}
-guint pdf_writer_start_object (PDFWriter* self) {
+guint pdf_writer_add_object (PDFWriter* self) {
guint result = 0U;
- gsize _tmp0_ = 0UL;
- GList* _tmp1_ = NULL;
- guint _tmp2_ = 0U;
-#line 601 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ guint* _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ gint _tmp1_ = 0;
+ gint index = 0;
+ guint* _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+ guint* _tmp3_ = NULL;
+ gint _tmp3__length1 = 0;
+ guint _tmp4_ = 0U;
+#line 657 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_val_if_fail (self != NULL, 0U);
-#line 603 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp0_ = self->offset;
-#line 603 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- self->object_offsets = g_list_append (self->object_offsets, (gpointer) ((guintptr) ((guint) _tmp0_)));
-#line 604 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp1_ = self->object_offsets;
-#line 604 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _tmp2_ = g_list_length (_tmp1_);
-#line 604 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- result = _tmp2_;
-#line 604 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 659 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = self->object_offsets;
+#line 659 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0__length1 = self->object_offsets_length1;
+#line 659 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = _tmp0__length1 + 1;
+#line 659 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->object_offsets = g_renew (guint, self->object_offsets, _tmp0__length1 + 1);
+#line 659 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ (_tmp1_ > self->object_offsets_length1) ? memset (self->object_offsets + self->object_offsets_length1, 0, sizeof (guint) * (_tmp1_ - self->object_offsets_length1)) : NULL;
+#line 659 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->object_offsets_length1 = _tmp1_;
+#line 659 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->_object_offsets_size_ = _tmp1_;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = self->object_offsets;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2__length1 = self->object_offsets_length1;
+#line 660 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ index = _tmp2__length1 - 1;
+#line 661 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = self->object_offsets;
+#line 661 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3__length1 = self->object_offsets_length1;
+#line 661 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_[index] = (guint) 0;
+#line 661 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp4_ = _tmp3_[index];
+#line 662 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ result = (guint) (index + 1);
+#line 662 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 4997 "book.c"
+#line 5754 "book.c"
+}
+
+
+void pdf_writer_start_object (PDFWriter* self, guint index) {
+ guint* _tmp0_ = NULL;
+ gint _tmp0__length1 = 0;
+ guint _tmp1_ = 0U;
+ gsize _tmp2_ = 0UL;
+ guint _tmp3_ = 0U;
+#line 665 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_return_if_fail (self != NULL);
+#line 667 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_ = self->object_offsets;
+#line 667 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0__length1 = self->object_offsets_length1;
+#line 667 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp1_ = index;
+#line 667 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp2_ = self->offset;
+#line 667 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp0_[_tmp1_ - 1] = (guint) _tmp2_;
+#line 667 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ _tmp3_ = _tmp0_[_tmp1_ - 1];
+#line 5778 "book.c"
}
static void value_pdf_writer_init (GValue* value) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = NULL;
-#line 5004 "book.c"
+#line 5785 "book.c"
}
static void value_pdf_writer_free_value (GValue* value) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (value->data[0].v_pointer) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
pdf_writer_unref (value->data[0].v_pointer);
-#line 5013 "book.c"
+#line 5794 "book.c"
}
}
static void value_pdf_writer_copy_value (const GValue* src_value, GValue* dest_value) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (src_value->data[0].v_pointer) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/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 5023 "book.c"
+#line 5804 "book.c"
} else {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
dest_value->data[0].v_pointer = NULL;
-#line 5027 "book.c"
+#line 5808 "book.c"
}
}
static gpointer value_pdf_writer_peek_pointer (const GValue* value) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return value->data[0].v_pointer;
-#line 5035 "book.c"
+#line 5816 "book.c"
}
static gchar* value_pdf_writer_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (collect_values[0].v_pointer) {
-#line 5042 "book.c"
+#line 5823 "book.c"
PDFWriter* object;
object = collect_values[0].v_pointer;
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (object->parent_instance.g_class == NULL) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/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 5049 "book.c"
+#line 5830 "book.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/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 5053 "book.c"
+#line 5834 "book.c"
}
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = pdf_writer_ref (object);
-#line 5057 "book.c"
+#line 5838 "book.c"
} else {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = NULL;
-#line 5061 "book.c"
+#line 5842 "book.c"
}
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return NULL;
-#line 5065 "book.c"
+#line 5846 "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 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (!object_p) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/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 5076 "book.c"
+#line 5857 "book.c"
}
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (!value->data[0].v_pointer) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
*object_p = NULL;
-#line 5082 "book.c"
+#line 5863 "book.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
*object_p = value->data[0].v_pointer;
-#line 5086 "book.c"
+#line 5867 "book.c"
} else {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
*object_p = pdf_writer_ref (value->data[0].v_pointer);
-#line 5090 "book.c"
+#line 5871 "book.c"
}
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return NULL;
-#line 5094 "book.c"
+#line 5875 "book.c"
}
GParamSpec* param_spec_pdf_writer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
ParamSpecPDFWriter* spec;
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/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 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
G_PARAM_SPEC (spec)->value_type = object_type;
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return G_PARAM_SPEC (spec);
-#line 5108 "book.c"
+#line 5889 "book.c"
}
gpointer value_get_pdf_writer (const GValue* value) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/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 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return value->data[0].v_pointer;
-#line 5117 "book.c"
+#line 5898 "book.c"
}
void value_set_pdf_writer (GValue* value, gpointer v_object) {
PDFWriter* old;
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PDF_WRITER));
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
old = value->data[0].v_pointer;
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (v_object) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PDF_WRITER));
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/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 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = v_object;
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
pdf_writer_ref (value->data[0].v_pointer);
-#line 5137 "book.c"
+#line 5918 "book.c"
} else {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = NULL;
-#line 5141 "book.c"
+#line 5922 "book.c"
}
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (old) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
pdf_writer_unref (old);
-#line 5147 "book.c"
+#line 5928 "book.c"
}
}
void value_take_pdf_writer (GValue* value, gpointer v_object) {
PDFWriter* old;
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PDF_WRITER));
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
old = value->data[0].v_pointer;
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (v_object) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PDF_WRITER));
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/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 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = v_object;
-#line 5166 "book.c"
+#line 5947 "book.c"
} else {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = NULL;
-#line 5170 "book.c"
+#line 5951 "book.c"
}
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (old) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
pdf_writer_unref (old);
-#line 5176 "book.c"
+#line 5957 "book.c"
}
}
static void pdf_writer_class_init (PDFWriterClass * klass) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
pdf_writer_parent_class = g_type_class_peek_parent (klass);
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
((PDFWriterClass *) klass)->finalize = pdf_writer_finalize;
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_type_class_add_private (klass, sizeof (PDFWriterPrivate));
-#line 5188 "book.c"
+#line 5969 "book.c"
}
static void pdf_writer_instance_init (PDFWriter * self) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
self->priv = PDF_WRITER_GET_PRIVATE (self);
-#line 574 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 629 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
self->offset = (gsize) 0;
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
self->ref_count = 1;
-#line 5199 "book.c"
+#line 5980 "book.c"
}
static void pdf_writer_finalize (PDFWriter* obj) {
PDFWriter * self;
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PDF_WRITER, PDFWriter);
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_signal_handlers_destroy (self);
-#line 575 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- _g_list_free0 (self->object_offsets);
-#line 576 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 630 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ self->object_offsets = (g_free (self->object_offsets), NULL);
+#line 631 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_g_object_unref0 (self->priv->stream);
-#line 5213 "book.c"
+#line 5994 "book.c"
}
@@ -5230,24 +6025,24 @@ GType pdf_writer_get_type (void) {
gpointer pdf_writer_ref (gpointer instance) {
PDFWriter* self;
self = instance;
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_atomic_int_inc (&self->ref_count);
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return instance;
-#line 5238 "book.c"
+#line 6019 "book.c"
}
void pdf_writer_unref (gpointer instance) {
PDFWriter* self;
self = instance;
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (g_atomic_int_dec_and_test (&self->ref_count)) {
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
PDF_WRITER_GET_CLASS (self)->finalize (self);
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 5251 "book.c"
+#line 6032 "book.c"
}
}
@@ -5255,9 +6050,9 @@ 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 ((PsWriter*) self, data, data_length1);
-#line 616 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 679 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 5261 "book.c"
+#line 6042 "book.c"
}
@@ -5266,58 +6061,58 @@ PsWriter* ps_writer_construct (GType object_type, GFileOutputStream* stream) {
GFileOutputStream* _tmp0_ = NULL;
GFileOutputStream* _tmp1_ = NULL;
cairo_surface_t* _tmp2_ = NULL;
-#line 613 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 676 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_val_if_fail (stream != NULL, NULL);
-#line 613 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 676 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
self = (PsWriter*) g_type_create_instance (object_type);
-#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 678 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp0_ = stream;
-#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 678 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp1_ = _g_object_ref0 (_tmp0_);
-#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 678 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_g_object_unref0 (self->stream);
-#line 615 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 678 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
self->stream = _tmp1_;
-#line 616 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 679 "/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 616 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 679 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_cairo_surface_destroy0 (self->surface);
-#line 616 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 679 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
self->surface = _tmp2_;
-#line 613 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 676 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return self;
-#line 5290 "book.c"
+#line 6071 "book.c"
}
PsWriter* ps_writer_new (GFileOutputStream* stream) {
-#line 613 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 676 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return ps_writer_construct (TYPE_PS_WRITER, stream);
-#line 5297 "book.c"
+#line 6078 "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 619 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 682 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_val_if_fail (self != NULL, 0);
-#line 5306 "book.c"
+#line 6087 "book.c"
{
GFileOutputStream* _tmp0_ = NULL;
guint8* _tmp1_ = NULL;
gint _tmp1__length1 = 0;
-#line 623 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp0_ = self->stream;
-#line 623 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp1_ = data;
-#line 623 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp1__length1 = data_length1;
-#line 623 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 686 "/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 623 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 686 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 5321 "book.c"
+#line 6102 "book.c"
goto __catch2_g_error;
}
}
@@ -5327,250 +6122,250 @@ static cairo_status_t ps_writer_write_cairo_data (PsWriter* self, guint8* data,
GError* e = NULL;
GError* _tmp2_ = NULL;
const gchar* _tmp3_ = NULL;
-#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 684 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
e = _inner_error_;
-#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 684 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_inner_error_ = NULL;
-#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 690 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp2_ = e;
-#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 690 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_tmp3_ = _tmp2_->message;
-#line 627 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
- g_warning ("book.vala:627: Error writing data: %s", _tmp3_);
-#line 628 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 690 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+ g_warning ("book.vala:690: Error writing data: %s", _tmp3_);
+#line 691 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
result = CAIRO_STATUS_WRITE_ERROR;
-#line 628 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 691 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_g_error_free0 (e);
-#line 628 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 691 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 5347 "book.c"
+#line 6128 "book.c"
}
__finally2:
-#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 684 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
-#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 684 "/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 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 684 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_clear_error (&_inner_error_);
-#line 621 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 684 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return 0;
-#line 5358 "book.c"
+#line 6139 "book.c"
}
-#line 631 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 694 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
result = CAIRO_STATUS_SUCCESS;
-#line 631 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 694 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return result;
-#line 5364 "book.c"
+#line 6145 "book.c"
}
static void value_ps_writer_init (GValue* value) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = NULL;
-#line 5371 "book.c"
+#line 6152 "book.c"
}
static void value_ps_writer_free_value (GValue* value) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (value->data[0].v_pointer) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
ps_writer_unref (value->data[0].v_pointer);
-#line 5380 "book.c"
+#line 6161 "book.c"
}
}
static void value_ps_writer_copy_value (const GValue* src_value, GValue* dest_value) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (src_value->data[0].v_pointer) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/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 5390 "book.c"
+#line 6171 "book.c"
} else {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
dest_value->data[0].v_pointer = NULL;
-#line 5394 "book.c"
+#line 6175 "book.c"
}
}
static gpointer value_ps_writer_peek_pointer (const GValue* value) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return value->data[0].v_pointer;
-#line 5402 "book.c"
+#line 6183 "book.c"
}
static gchar* value_ps_writer_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (collect_values[0].v_pointer) {
-#line 5409 "book.c"
+#line 6190 "book.c"
PsWriter* object;
object = collect_values[0].v_pointer;
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (object->parent_instance.g_class == NULL) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/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 5416 "book.c"
+#line 6197 "book.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/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 5420 "book.c"
+#line 6201 "book.c"
}
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = ps_writer_ref (object);
-#line 5424 "book.c"
+#line 6205 "book.c"
} else {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = NULL;
-#line 5428 "book.c"
+#line 6209 "book.c"
}
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return NULL;
-#line 5432 "book.c"
+#line 6213 "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 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (!object_p) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/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 5443 "book.c"
+#line 6224 "book.c"
}
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (!value->data[0].v_pointer) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
*object_p = NULL;
-#line 5449 "book.c"
+#line 6230 "book.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
*object_p = value->data[0].v_pointer;
-#line 5453 "book.c"
+#line 6234 "book.c"
} else {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
*object_p = ps_writer_ref (value->data[0].v_pointer);
-#line 5457 "book.c"
+#line 6238 "book.c"
}
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return NULL;
-#line 5461 "book.c"
+#line 6242 "book.c"
}
GParamSpec* param_spec_ps_writer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
ParamSpecPsWriter* spec;
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/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 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
G_PARAM_SPEC (spec)->value_type = object_type;
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return G_PARAM_SPEC (spec);
-#line 5475 "book.c"
+#line 6256 "book.c"
}
gpointer value_get_ps_writer (const GValue* value) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/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 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return value->data[0].v_pointer;
-#line 5484 "book.c"
+#line 6265 "book.c"
}
void value_set_ps_writer (GValue* value, gpointer v_object) {
PsWriter* old;
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PS_WRITER));
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
old = value->data[0].v_pointer;
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (v_object) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PS_WRITER));
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/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 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = v_object;
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
ps_writer_ref (value->data[0].v_pointer);
-#line 5504 "book.c"
+#line 6285 "book.c"
} else {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = NULL;
-#line 5508 "book.c"
+#line 6289 "book.c"
}
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (old) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
ps_writer_unref (old);
-#line 5514 "book.c"
+#line 6295 "book.c"
}
}
void value_take_ps_writer (GValue* value, gpointer v_object) {
PsWriter* old;
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PS_WRITER));
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
old = value->data[0].v_pointer;
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (v_object) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_PS_WRITER));
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/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 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = v_object;
-#line 5533 "book.c"
+#line 6314 "book.c"
} else {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
value->data[0].v_pointer = NULL;
-#line 5537 "book.c"
+#line 6318 "book.c"
}
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (old) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
ps_writer_unref (old);
-#line 5543 "book.c"
+#line 6324 "book.c"
}
}
static void ps_writer_class_init (PsWriterClass * klass) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
ps_writer_parent_class = g_type_class_peek_parent (klass);
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
((PsWriterClass *) klass)->finalize = ps_writer_finalize;
-#line 5553 "book.c"
+#line 6334 "book.c"
}
static void ps_writer_instance_init (PsWriter * self) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
self->ref_count = 1;
-#line 5560 "book.c"
+#line 6341 "book.c"
}
static void ps_writer_finalize (PsWriter* obj) {
PsWriter * self;
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PS_WRITER, PsWriter);
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_signal_handlers_destroy (self);
-#line 610 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 673 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_cairo_surface_destroy0 (self->surface);
-#line 611 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 674 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
_g_object_unref0 (self->stream);
-#line 5574 "book.c"
+#line 6355 "book.c"
}
@@ -5591,24 +6386,24 @@ GType ps_writer_get_type (void) {
gpointer ps_writer_ref (gpointer instance) {
PsWriter* self;
self = instance;
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_atomic_int_inc (&self->ref_count);
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
return instance;
-#line 5599 "book.c"
+#line 6380 "book.c"
}
void ps_writer_unref (gpointer instance) {
PsWriter* self;
self = instance;
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
if (g_atomic_int_dec_and_test (&self->ref_count)) {
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
PS_WRITER_GET_CLASS (self)->finalize (self);
-#line 608 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
+#line 671 "/home/bob/bzr/simple-scan/trunk/src/book.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 5612 "book.c"
+#line 6393 "book.c"
}
}