summaryrefslogtreecommitdiff
path: root/staging/xournal/pdf-export-64.patch
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-07 17:33:04 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-07 17:33:04 -0300
commit2302f1d28510fadb2dcfa119f28ed28f164845bf (patch)
treee7040e1c743f46bc60a7844275516e4404f6ac30 /staging/xournal/pdf-export-64.patch
parent2a9d1292ab60e8a2356fb3eeb36b8c3cfc22759b (diff)
parent5442e9b8f357932ed5d6cb46e90fcbf6f453469f (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/fotoxx/PKGBUILD community/gtkdialog/PKGBUILD community/hubbub/PKGBUILD community/libgdamm/PKGBUILD community/libparserutils/PKGBUILD community/mingw32-binutils/PKGBUILD community/mingw32-gcc-base/PKGBUILD community/mingw32-gcc/PKGBUILD community/mtpaint/PKGBUILD community/netsurf/PKGBUILD community/patchage/PKGBUILD community/qgo/PKGBUILD community/tomoyo-tools/PKGBUILD community/tre/PKGBUILD community/virtualbox/PKGBUILD core/net-tools/PKGBUILD core/openldap/PKGBUILD extra/epiphany/PKGBUILD extra/evince/PKGBUILD extra/evolution-data-server/PKGBUILD extra/evolution/PKGBUILD extra/exiv2/PKGBUILD extra/folks/PKGBUILD extra/gimp-ufraw/PKGBUILD extra/gnome-control-center/PKGBUILD extra/gnome-power-manager/PKGBUILD extra/gnome-python-desktop/PKGBUILD extra/gnome-python-extras/PKGBUILD extra/gvfs/PKGBUILD extra/jack/PKGBUILD extra/kdelibs/PKGBUILD extra/kdepim/PKGBUILD extra/koffice/PKGBUILD extra/libreoffice/PKGBUILD extra/libwebkit/PKGBUILD extra/mutter/PKGBUILD extra/nautilus/PKGBUILD extra/openmpi/PKGBUILD extra/pavucontrol/PKGBUILD extra/php/PKGBUILD extra/pidgin/PKGBUILD extra/postgresql/PKGBUILD extra/pulseaudio/PKGBUILD extra/pygobject2/PKGBUILD extra/swt/PKGBUILD extra/tomcat/PKGBUILD extra/totem/PKGBUILD extra/vigra/PKGBUILD extra/vte/PKGBUILD extra/xulrunner/PKGBUILD kde-unstable/calligra/PKGBUILD kde-unstable/kdebase-workspace/PKGBUILD multilib/lib32-atk/PKGBUILD multilib/lib32-gdk-pixbuf2/PKGBUILD multilib/lib32-glew/PKGBUILD multilib/lib32-glib2/PKGBUILD multilib/lib32-jack/PKGBUILD multilib/lib32-libpulse/PKGBUILD multilib/lib32-pango/PKGBUILD multilib/wine/PKGBUILD social/miniupnpc/PKGBUILD testing/icedtea-web-java7/PKGBUILD testing/sqlite3/PKGBUILD ~xihh/abiword/PKGBUILD
Diffstat (limited to 'staging/xournal/pdf-export-64.patch')
-rw-r--r--staging/xournal/pdf-export-64.patch89
1 files changed, 89 insertions, 0 deletions
diff --git a/staging/xournal/pdf-export-64.patch b/staging/xournal/pdf-export-64.patch
new file mode 100644
index 000000000..9f7075c54
--- /dev/null
+++ b/staging/xournal/pdf-export-64.patch
@@ -0,0 +1,89 @@
+diff -aur old/src/xo-print.c new/src/xo-print.c
+--- old/src/xo-print.c 2009-09-28 23:36:54.000000000 +0200
++++ new/src/xo-print.c 2009-11-15 06:06:00.000000000 +0100
+@@ -761,7 +761,7 @@
+
+ make_xref(xref, xref->last+1, pdfbuf->len);
+ g_string_append_printf(pdfbuf,
+- "%d 0 obj\n<< /Length %d /Filter /FlateDecode /Type /Xobject "
++ "%d 0 obj\n<< /Length %zu /Filter /FlateDecode /Type /Xobject "
+ "/Subtype /Image /Width %d /Height %d /ColorSpace /DeviceRGB "
+ "/BitsPerComponent 8 >> stream\n",
+ xref->last, zpix->len, width, height);
+@@ -840,8 +840,10 @@
+ gboolean fallback, is_binary;
+ guchar encoding[256];
+ gushort glyphs[256];
+- int i, j, num, len1, len2;
+- gsize len;
++ int i, j, num;
++ guint32 len1, len2;
++ guint32 tt_len;
++ gsize t1_len;
+ TrueTypeFont *ttfnt;
+ char *seg1, *seg2;
+ char *fontdata, *p;
+@@ -862,14 +864,14 @@
+ }
+ font->num_glyphs_used = num-1;
+ if (OpenTTFont(font->filename, 0, &ttfnt) == SF_OK) {
+- if (CreateTTFromTTGlyphs_tomemory(ttfnt, (guint8**)&fontdata, &len, glyphs, encoding, num,
++ if (CreateTTFromTTGlyphs_tomemory(ttfnt, (guint8**)&fontdata, &tt_len, glyphs, encoding, num,
+ 0, NULL, TTCF_AutoName | TTCF_IncludeOS2) == SF_OK) {
+ make_xref(xref, xref->last+1, pdfbuf->len);
+ nobj_fontprog = xref->last;
+ g_string_append_printf(pdfbuf,
+- "%d 0 obj\n<< /Length %d /Length1 %d >> stream\n",
+- nobj_fontprog, (int)len, (int)len);
+- g_string_append_len(pdfbuf, fontdata, len);
++ "%d 0 obj\n<< /Length %u /Length1 %u >> stream\n",
++ nobj_fontprog, tt_len, tt_len);
++ g_string_append_len(pdfbuf, fontdata, tt_len);
+ g_string_append(pdfbuf, "endstream\nendobj\n");
+ g_free(fontdata);
+ }
+@@ -879,7 +881,7 @@
+ else fallback = TRUE;
+ } else {
+ // embed the font file: Type1 case
+- if (g_file_get_contents(font->filename, &fontdata, &len, NULL) && len>=8) {
++ if (g_file_get_contents(font->filename, &fontdata, &t1_len, NULL) && t1_len>=8) {
+ if (fontdata[0]==(char)0x80 && fontdata[1]==(char)0x01) {
+ is_binary = TRUE;
+ len1 = pfb_get_length((unsigned char *)fontdata+2);
+@@ -898,7 +900,7 @@
+ if (*p=='\n' || *p=='\r') p++;
+ if (*p=='\n' || *p=='\r') p++;
+ len1 = p-fontdata;
+- p = g_strrstr_len(fontdata, len, T1_SEGMENT_3_END);
++ p = g_strrstr_len(fontdata, t1_len, T1_SEGMENT_3_END);
+ if (p==NULL) fallback = TRUE;
+ else {
+ // rewind 512 zeros
+@@ -936,7 +938,7 @@
+ make_xref(xref, xref->last+1, pdfbuf->len);
+ nobj_fontprog = xref->last;
+ g_string_append_printf(pdfbuf,
+- "%d 0 obj\n<< /Length %d /Length1 %d /Length2 %d /Length3 0 >> stream\n",
++ "%d 0 obj\n<< /Length %u /Length1 %u /Length2 %u /Length3 0 >> stream\n",
+ nobj_fontprog, len1+len2, len1, len2);
+ g_string_append_len(pdfbuf, seg1, len1);
+ g_string_append_len(pdfbuf, seg2, len2);
+@@ -1258,7 +1260,7 @@
+ tmpstr = make_pdfprefix(pdfinfo.pages+(pg->bg->file_page_seq-1),
+ pg->width, pg->height);
+ g_string_append_printf(pdfbuf,
+- "%d 0 obj\n<< /Length %d >> stream\n%s\nendstream\nendobj\n",
++ "%d 0 obj\n<< /Length %zu >> stream\n%s\nendstream\nendobj\n",
+ n_obj_prefix, tmpstr->len, tmpstr->str);
+ g_string_free(tmpstr, TRUE);
+ g_string_prepend(pgstrm, "Q Q Q ");
+@@ -1276,7 +1278,7 @@
+
+ make_xref(&xref, xref.last+1, pdfbuf->len);
+ g_string_append_printf(pdfbuf,
+- "%d 0 obj\n<< /Length %d /Filter /FlateDecode>> stream\n",
++ "%d 0 obj\n<< /Length %zu /Filter /FlateDecode>> stream\n",
+ xref.last, zpgstrm->len);
+ g_string_append_len(pdfbuf, zpgstrm->str, zpgstrm->len);
+ g_string_free(zpgstrm, TRUE);