rpms/xournal/devel xournal-0.4.5-xoprint-len.patch, NONE, 1.1 xournal.spec, 1.11, 1.12
Rick L. Vinyard, Jr.
rvinyard at fedoraproject.org
Wed Jan 6 16:13:16 UTC 2010
- Previous message (by thread): rpms/dbus-cxx/F-10 .cvsignore, 1.14, 1.15 dbus-cxx.spec, 1.13, 1.14 sources, 1.14, 1.15
- Next message (by thread): rpms/selinux-policy/F-12 policy-20100106.patch, NONE, 1.1 selinux-policy.spec, 1.990, 1.991
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: rvinyard
Update of /cvs/pkgs/rpms/xournal/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14817
Modified Files:
xournal.spec
Added Files:
xournal-0.4.5-xoprint-len.patch
Log Message:
xournal-0.4.5-xoprint-len.patch:
xo-print.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
--- NEW FILE xournal-0.4.5-xoprint-len.patch ---
--- a/src/xo-print.c
+++ b/src/xo-print.c
@@ -761,7 +761,7 @@ int pdf_draw_bitmap_background(struct Page *pg, GString *str,
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 @@ void embed_pdffont(GString *pdfbuf, struct XrefTable *xref, struct PdfFont *font
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 @@ void embed_pdffont(GString *pdfbuf, struct XrefTable *xref, struct PdfFont *font
}
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 @@ void embed_pdffont(GString *pdfbuf, struct XrefTable *xref, struct PdfFont *font
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 @@ void embed_pdffont(GString *pdfbuf, struct XrefTable *xref, struct PdfFont *font
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 @@ void embed_pdffont(GString *pdfbuf, struct XrefTable *xref, struct PdfFont *font
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 @@ gboolean print_to_pdf(char *filename)
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 @@ gboolean print_to_pdf(char *filename)
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);
Index: xournal.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xournal/devel/xournal.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- xournal.spec 5 Oct 2009 16:31:29 -0000 1.11
+++ xournal.spec 6 Jan 2010 16:13:16 -0000 1.12
@@ -8,6 +8,7 @@ License: GPLv2
URL: http://xournal.sourceforge.net/
Source0: http://downloads.sourceforge.net/xournal/%{name}-%{version}.tar.gz
Patch0: xournal-configure.in-freetype.patch
+Patch1: xournal-0.4.5-xoprint-len.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gtk2-devel >= 2.10.0
@@ -30,6 +31,7 @@ resolution) and overall functionality.
%prep
%setup -q
%patch0
+%patch1 -p1
%build
NOCONFIGURE=1 ./autogen.sh
- Previous message (by thread): rpms/dbus-cxx/F-10 .cvsignore, 1.14, 1.15 dbus-cxx.spec, 1.13, 1.14 sources, 1.14, 1.15
- Next message (by thread): rpms/selinux-policy/F-12 policy-20100106.patch, NONE, 1.1 selinux-policy.spec, 1.990, 1.991
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list