File: 826_pnmtops-dpi-no-float.patch

package info (click to toggle)
hylafax 3%3A6.0.7-13
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 10,848 kB
  • sloc: sh: 15,305; ansic: 14,429; makefile: 1,562; cpp: 781; awk: 529
file content (28 lines) | stat: -rw-r--r-- 1,290 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Package:     hylafax
Subject:     pnmtops dpi no float
Author:      Joachim Wiedorn <joodebian at joonet.de>
Bug-Debian:  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727608
Forwarded:   no
Last-Update: 2016-11-10

pnmtops.c expects either INT or INTxINT for -dpi (it calls
strtol(dpiOpt, &dpistr2, 10) to parse the numbers), so sending
it a float is a bug.
---

Index: hylafax-6.0.6/libhylafax/TypeRules.c++
===================================================================
--- hylafax-6.0.6.orig/libhylafax/TypeRules.c++	2013-10-16 20:05:03.000000000 +0200
+++ hylafax-6.0.6/libhylafax/TypeRules.c++	2013-10-16 20:34:32.187667461 +0200
@@ -237,9 +237,9 @@
 	    switch (c = cmd[i]) {
 	    case 'i':	fmtd.append(quoted(input));		  continue;
 	    case 'o':	fmtd.append(quoted(output));		  continue;
-	    case 'R':	fmtd.append(fxStr(hr, "%.2f"));		  continue;
+	    case 'R':	fmtd.append(fxStr(hr, "%.0f"));		  continue;
 	    case 'r':	fmtd.append(fxStr(hr/25.4, "%.2g"));	  continue;
-	    case 'V':	fmtd.append(fxStr(vr, "%.2f"));		  continue;
+	    case 'V':	fmtd.append(fxStr(vr, "%.0f"));		  continue;
 	    case 'v':	fmtd.append(fxStr(vr/25.4, "%.2g"));	  continue;
 	    case 'f':	fmtd.append(df);			  continue;
 	    case 'W':	fmtd.append(fxStr(pw, "%.4g"));		  continue;