summaryrefslogtreecommitdiff
path: root/src/book.c
diff options
context:
space:
mode:
authorAlessio Treglia <alessio@debian.org>2011-12-03 17:58:55 +0100
committerAlessio Treglia <alessio@debian.org>2011-12-03 17:58:55 +0100
commit7249c8ed3cb0da5185af4ecd2031c483bfc0258a (patch)
treeb53217820b8aadd3b52d6b0d63ee5689103b125c /src/book.c
parentafe4573b20aa385377102902ce658fa088bb44d2 (diff)
Imported Upstream version 3.2.1upstream/3.2.1
Diffstat (limited to 'src/book.c')
-rw-r--r--src/book.c24
1 files changed, 15 insertions, 9 deletions
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;