~ubuntu-branches/ubuntu/precise/a2ps/precise-security

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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#! /bin/sh -e
## 15_psset_sed_fix.dpatch by Masayuki Hatta <mhatta@debian.org>
##
## All lines beginning with \`## DP:' are a description of the patch.
## DP: Fixes psset problem with newer sed.

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
        -patch) patch -f --no-backup-if-mismatch --dry-run -p1 < $0 && patch -f --no-backup-if-mismatch -p1 < $0
;;
        -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
        *)
                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
                exit 1;;
esac

exit 0

diff -urN a2ps-4.13b.orig/ChangeLog a2ps-4.13b/ChangeLog
--- a2ps-4.13b.orig/ChangeLog	2004-08-17 03:33:15.000000000 +0900
+++ a2ps-4.13b/ChangeLog	2004-08-17 03:33:25.000000000 +0900
@@ -1,3 +1,8 @@
+2004-07-11  Nix  <nix@esperi.org.uk>
+
+	* contrib/psset.m4: Only escape leading spaces, not all leading
+	characters.
+
 2000-02-24  Akim Demaille  <akim@epita.fr>
 
 	Release 4.13.
diff -urN a2ps-4.13b.orig/contrib/psset.in a2ps-4.13b/contrib/psset.in
--- a2ps-4.13b.orig/contrib/psset.in	2004-08-17 03:33:15.000000000 +0900
+++ a2ps-4.13b/contrib/psset.in	2004-08-17 03:33:36.000000000 +0900
@@ -221,7 +221,7 @@
 done
 
 pspagedevice="% Pagedevice definitions:
-countdictstack
+  countdictstack
 % Push our own mark, since there can be several PS marks pushed depending
 % where the failure really occured.
 /psset_mark
@@ -229,7 +229,7 @@
 } stopped
 % My cleartomark
 { /psset_mark eq { exit } if } loop
-countdictstack exch sub dup 0 gt
+  countdictstack exch sub dup 0 gt
 {
   { end } repeat
 }{
diff -urN a2ps-4.13b.orig/contrib/psset.m4 a2ps-4.13b/contrib/psset.m4
--- a2ps-4.13b.orig/contrib/psset.m4	2004-08-17 03:33:15.000000000 +0900
+++ a2ps-4.13b/contrib/psset.m4	2004-08-17 03:33:25.000000000 +0900
@@ -161,7 +161,7 @@
 # spaces with a `\' too...
 pspagedevicelen=`echo "$pspagedevice" | wc -l`
 pspagedevice=`echo "$pspagedevice" | \
- sed -e "$pspagedevicelen!s/\$/\\\\\\/;s/^/\\\\\\/"`
+ sed -e "$pspagedevicelen!s/\$/\\\\\\/;s/^ /\\\\\\ /"`
 
 case $at in
   0) # Insert last in the Setup, so that we win over other requests.