summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlessio Treglia <alessio@debian.org>2011-12-03 17:58:58 +0100
committerAlessio Treglia <alessio@debian.org>2011-12-03 17:58:58 +0100
commitab579f8a3757953b0ac9d26d24059c541d175d10 (patch)
tree2e885605c8e5ffd66b7b626a9a259646a759baae /src
parentb5749b0e483238a8eb4770639dd8959b8daa8061 (diff)
parent7249c8ed3cb0da5185af4ecd2031c483bfc0258a (diff)
Merge commit 'upstream/3.2.1'
Diffstat (limited to 'src')
-rw-r--r--src/book-view.c2
-rw-r--r--src/book.c24
-rw-r--r--src/book.vala1
-rw-r--r--src/page-view.c2
-rw-r--r--src/page.c2
-rw-r--r--src/scanner.c2
-rw-r--r--src/simple-scan.c2
-rw-r--r--src/ui.c2
8 files changed, 22 insertions, 15 deletions
diff --git a/src/book-view.c b/src/book-view.c
index f989d83..d7d52e1 100644
--- a/src/book-view.c
+++ b/src/book-view.c
@@ -1,4 +1,4 @@
-/* book-view.c generated by valac 0.13.4, the Vala compiler
+/* book-view.c generated by valac 0.14.0, the Vala compiler
* generated from book-view.vala, do not modify */
/*
diff --git a/src/book.c b/src/book.c
index e7b4b52..32f35e2 100644
--- a/src/book.c
+++ b/src/book.c
@@ -1,4 +1,4 @@
-/* book.c generated by valac 0.13.4, the Vala compiler
+/* book.c generated by valac 0.14.0, the Vala compiler
* generated from book.vala, do not modify */
/*
@@ -959,8 +959,9 @@ static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gsize* n_writte
gint _tmp28_;
struct jpeg_destination_mgr _tmp29_;
gint _tmp30_;
- guint8* _tmp31_;
- gint _tmp31__length1;
+ gint _tmp31_ = 0;
+ guint8* _tmp32_;
+ gint _tmp32__length1;
g_return_val_if_fail (self != NULL, NULL);
g_return_val_if_fail (image != NULL, NULL);
memset (&info, 0, sizeof (struct jpeg_compress_struct));
@@ -1052,12 +1053,17 @@ static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gsize* n_writte
_tmp29_ = dest_mgr;
_tmp30_ = _tmp29_.free_in_buffer;
_vala_n_written = (gsize) (_tmp28_ - _tmp30_);
- _tmp31_ = data;
- _tmp31__length1 = data_length1;
+ _tmp31_ = (gint) _vala_n_written;
+ data = g_renew (guint8, data, (gint) _vala_n_written);
+ (_tmp31_ > data_length1) ? memset (data + data_length1, 0, sizeof (guint8) * (_tmp31_ - data_length1)) : NULL;
+ data_length1 = _tmp31_;
+ _data_size_ = _tmp31_;
+ _tmp32_ = data;
+ _tmp32__length1 = data_length1;
if (result_length1) {
- *result_length1 = _tmp31__length1;
+ *result_length1 = _tmp32__length1;
}
- result = _tmp31_;
+ result = _tmp32_;
jpeg_destroy_compress (&info);
if (n_written) {
*n_written = _vala_n_written;
@@ -2805,7 +2811,7 @@ void pdf_writer_write (PDFWriter* self, guint8* data, int data_length1) {
_inner_error_ = NULL;
_tmp2_ = e;
_tmp3_ = _tmp2_->message;
- g_warning ("book.vala:529: Error writing PDF: %s", _tmp3_);
+ g_warning ("book.vala:530: Error writing PDF: %s", _tmp3_);
_g_error_free0 (e);
}
__finally0:
@@ -3112,7 +3118,7 @@ static cairo_status_t ps_writer_write_cairo_data (PsWriter* self, guint8* data,
_inner_error_ = NULL;
_tmp2_ = e;
_tmp3_ = _tmp2_->message;
- g_warning ("book.vala:565: Error writing data: %s", _tmp3_);
+ g_warning ("book.vala:566: Error writing data: %s", _tmp3_);
result = CAIRO_STATUS_WRITE_ERROR;
_g_error_free0 (e);
return result;
diff --git a/src/book.vala b/src/book.vala
index 64f7c60..a410264 100644
--- a/src/book.vala
+++ b/src/book.vala
@@ -197,6 +197,7 @@ public class Book
}
info.finish_compress ();
n_written = max_length - dest_mgr.free_in_buffer;
+ data.resize ((int) n_written);
return data;
}
diff --git a/src/page-view.c b/src/page-view.c
index 24bc20d..6ee1096 100644
--- a/src/page-view.c
+++ b/src/page-view.c
@@ -1,4 +1,4 @@
-/* page-view.c generated by valac 0.13.4, the Vala compiler
+/* page-view.c generated by valac 0.14.0, the Vala compiler
* generated from page-view.vala, do not modify */
/*
diff --git a/src/page.c b/src/page.c
index eec34df..96bbc17 100644
--- a/src/page.c
+++ b/src/page.c
@@ -1,4 +1,4 @@
-/* page.c generated by valac 0.13.4, the Vala compiler
+/* page.c generated by valac 0.14.0, the Vala compiler
* generated from page.vala, do not modify */
/*
diff --git a/src/scanner.c b/src/scanner.c
index fc0fb07..ff756ec 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -1,4 +1,4 @@
-/* scanner.c generated by valac 0.13.4, the Vala compiler
+/* scanner.c generated by valac 0.14.0, the Vala compiler
* generated from scanner.vala, do not modify */
/*
diff --git a/src/simple-scan.c b/src/simple-scan.c
index 21dc633..9ca5f9c 100644
--- a/src/simple-scan.c
+++ b/src/simple-scan.c
@@ -1,4 +1,4 @@
-/* simple-scan.c generated by valac 0.13.4, the Vala compiler
+/* simple-scan.c generated by valac 0.14.0, the Vala compiler
* generated from simple-scan.vala, do not modify */
/*
diff --git a/src/ui.c b/src/ui.c
index 8f9003c..122b1d4 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -1,4 +1,4 @@
-/* ui.c generated by valac 0.13.4, the Vala compiler
+/* ui.c generated by valac 0.14.0, the Vala compiler
* generated from ui.vala, do not modify */
/*