[gv] Fix bounding box recognition with CR line terminators

Orion Poplawski orion at fedoraproject.org
Thu Jan 23 16:39:36 UTC 2014


commit aae046400657a34d0e6a0c9c257baf279f6c742a
Author: Orion Poplawski <orion at nwra.com>
Date:   Thu Jan 23 09:39:56 2014 -0700

    Fix bounding box recognition with CR line terminators

 gv-bounding-box.patch |   13 +++++++++++++
 gv.spec               |    8 +++++++-
 2 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/gv-bounding-box.patch b/gv-bounding-box.patch
new file mode 100644
index 0000000..4cfcb74
--- /dev/null
+++ b/gv-bounding-box.patch
@@ -0,0 +1,13 @@
+diff --git a/gv/src/ps.c b/gv/src/ps.c
+index 2428bcc..822b65a 100644
+--- a/gv/src/ps.c
++++ b/gv/src/ps.c
+@@ -357,7 +357,7 @@ static int parse_boundingbox(const char *l, int *boundingbox) {
+ 	while (*p == ' ' || *p == '\t')
+ 		p++;
+ 	fury = strtod(p, &pe);
+-	if (*pe != '\n' && *pe != '\0' && *pe != ' ' && *pe != '\t') {
++	if (*pe != '\n'  && *pe != '\r'&& *pe != '\0' && *pe != ' ' && *pe != '\t') {
+ 		return 0;
+ 	}
+ 
diff --git a/gv.spec b/gv.spec
index f5ab137..6836fef 100644
--- a/gv.spec
+++ b/gv.spec
@@ -1,7 +1,7 @@
 Summary: A X front-end for the Ghostscript PostScript(TM) interpreter
 Name: gv
 Version: 3.7.4
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: GPLv3+
 Group: Applications/Publishing
 Requires: ghostscript
@@ -17,6 +17,8 @@ Patch0:  gv-resource.patch
 Patch1:  gv-dat.patch
 # Support aarch64
 Patch2:  gv-aarch64.patch
+# Fix bounding box recognition
+Patch3:  gv-bounding-box.patch
 BuildRequires: /usr/bin/makeinfo
 BuildRequires: Xaw3d-devel
 %if 0%{?rhel} != 04
@@ -42,6 +44,7 @@ Gv can display PostScript and PDF documents on an X Window System.
 %patch0 -p1 -b .resource
 %patch1 -p1 -b .resdat
 %patch2 -p1 -b .aarch64
+%patch3 -p2 -b .bounding-box
 
 
 %build
@@ -122,6 +125,9 @@ fi
 
 
 %changelog
+* Thu Jan 23 2014 Orion Poplawski <orion at cora.nwra.com> - 3.7.4-5
+- Fix bounding box recognition with CR line terminators
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.7.4-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list