summaryrefslogtreecommitdiff
path: root/mgetty/mgetty-1.1.30/13-fax_faxspool.in
blob: ba7a994258a59bd5ded173989684ddbeddb3a43a (plain)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
--- mgetty-1.1.30.orig/fax/faxspool.in	2002-11-23 10:14:57.000000000 -0500
+++ mgetty-1.1.30/fax/faxspool.in	2003-04-27 23:48:56.000000000 -0400
@@ -70,7 +70,7 @@
 FAX_SPOOL=@FAX_SPOOL@
 FAX_SPOOL_OUT=@FAX_SPOOL_OUT@
 FAX_SEQ=$FAX_SPOOL_OUT/.Sequence
-FAX_SEQ_LOCKDIR=$FAX_SPOOL_OUT/locks
+FAX_SEQ_LOCKDIR=/var/lock/fax
 FAX_SEQ_LOCK=$FAX_SEQ_LOCKDIR/LCK..seq
 LAST_RUN=@FAX_SPOOL_OUT@/faxqueue_done
 
@@ -145,7 +145,7 @@
 #
 fs_cvt_pbm()
 {
-    pbm2g3 $1 >$2.001
+    pbm2g3 "$1" >"$2".001
 }
 
 #
@@ -153,7 +153,7 @@
 #
 fs_cvt_pgm()
 {
-    pgmtopbm $1 | pbm2g3 >$2.001
+    pgmtopbm "$1" | pbm2g3 >"$2".001
 }
 
 #
@@ -161,7 +161,7 @@
 #
 fs_cvt_ppm()
 {
-    ppmtopgm $1 | pgmtopbm | pbm2g3 >$2.001
+    ppmtopgm "$1" | pgmtopbm | pbm2g3 >"$2".001
 }
 
 #
@@ -171,7 +171,7 @@
 #
 fs_cvt_g3()
 {
-    g3cat $1 >$2.001
+    g3cat "$1" >"$2".001
 }
 
 #
@@ -183,14 +183,14 @@
 fs_cvt_xwd()
 {
     REDUCE="cat"
-    test X$3 = X-n && REDUCE="pnmscale -yscale 0.5"
+    test X"$3" = X-n && REDUCE="pnmscale -yscale 0.5"
 
-    xwdtopnm $1 |\
+    xwdtopnm "$1" |\
 	pnmscale -xysize 1728 2000 |\
 	$REDUCE |\
 	ppmtopgm |\
 	pgmtopbm |\
-	pbm2g3 >$2.001
+	pbm2g3 >"$2".001
 }
 
 #
@@ -201,14 +201,14 @@
 fs_cvt_gif()
 {
     REDUCE="cat"
-    test X$3 = X-n && REDUCE="pnmscale -yscale 0.5"
+    test X"$3" = X-n && REDUCE="pnmscale -yscale 0.5"
 
-    giftoppm $1 |\
+    giftopnm "$1" |\
 	pnmscale -xysize 1728 2000 |\
 	$REDUCE |\
 	ppmtopgm |\
 	pgmtopbm |\
-	pbm2g3 >$2.001
+	pbm2g3 >"$2".001
 }
 
 #
@@ -219,14 +219,14 @@
 fs_cvt_tif()
 {
     REDUCE="cat"
-    test X$3 = X-n && REDUCE="pnmscale -yscale 0.5"
+    test X"$3" = X-n && REDUCE="pnmscale -yscale 0.5"
 
-    tifftopnm $1 |\
+    tifftopnm "$1" |\
 	pnmscale -xysize 1728 2000 |\
 	$REDUCE |\
 	ppmtopgm |\
 	pgmtopbm |\
-	pbm2g3 >$2.001
+	pbm2g3 >"$2".001
 }
 
 #
@@ -235,11 +235,11 @@
 #
 fs_cvt_lj()
 {
-    if [ X$3 = X-n ]
+    if [ X"$3" = X-n ]
     then
-        hp2log3 -r$2 <$1
+        hp2log3 -r"$2" <"$1"
     else
-        hp2hig3 -r$2 <$1
+        hp2hig3 -r"$2" <"$1"
     fi
 }
 
@@ -251,10 +251,10 @@
 fs_cvt_ps()
 {
     driver="$GS_DRIVER_HI"
-    test X$3 = X-n && driver="$GS_DRIVER_LO"
+    test X"$3" = X-n && driver="$GS_DRIVER_LO"
 
-    cat $1 |
-	gs $driver -sOutputFile=$2%03d -dNOPAUSE -q -dSAFER -
+    cat "$1" |
+	gs $driver -sOutputFile="$2"%03d -dNOPAUSE -q -dSAFER -
 }
        
 #
@@ -268,19 +268,19 @@
 # via Ghostscript:
 
     driver="$GS_DRIVER_HI"
-    test X$3 = X-n && driver="$GS_DRIVER_LO"
+    test X"$3" = X-n && driver="$GS_DRIVER_LO"
 
-    gs $driver -sOutputFile=$2%03d -dNOPAUSE \
-			-- gslp.ps -fCourier-Bold10 -B $1
+    gs $driver -sOutputFile="$2"%03d -dNOPAUSE \
+			-- gslp.ps -fCourier-Bold10 -B "$1"
 
 #####
 # via hp2pbm:
 # (convert "LF" to "CR+LF" via awk)
 
 #    pgm=hp2hig3
-#    test X$3 = X-n && pgm=hp2log3
+#    test X"$3" = X-n && pgm=hp2log3
 #
-#    $AWK '{ printf "%s\r\n", $0 }' $1 | $pgm -r$2
+#    $AWK '{ printf "%s\r\n", $0 }' "$1" | $pgm -r"$2"
 
 #####
 # via pbmtext (not really recommended):
@@ -288,13 +288,13 @@
 
 ## Select appropriate font
 #    font=$PBMFONT_BODY_F
-#    test X$3 = X-n && font=$PBMFONT_BODY_N
+#    test X"$3" = X-n && font=$PBMFONT_BODY_N
 # Determine how many pages text will be split in to.  Uses default pagelen.
-#    nr=`pgx < $1`
+#    nr=`pgx < "$1"`
 # Convert each page into a separate G3 file.  Uses default pagelen (60).
 #    page=1
 #    while [ $page -le $nr ]; do
-#	pgx $page < $1 | pbmtext -font $font | pbm2g3 >$2.$page
+#	pgx $page < "$1" | pbmtext -font $font | pbm2g3 >"$2".$page
 #	page=`expr $page + 1`
 #    done
 }
@@ -306,7 +306,7 @@
 #
 fs_cvt_dvi()
 {
-    if [ X$3 = X-n ]
+    if [ X"$3" = X-n ]
     then 
 	driver="$GS_DRIVER_LO" ; dvipscfg="-P dfaxlo"
     else
@@ -316,18 +316,18 @@
 # if you do not have the dfaxlo(w)/dfaxhigh dvips modes configured, 
 # remove "$dvipscfg" from the dvips command line below [or configure them!]
 
-    dvips $dvipscfg $1 -o \
-        !"gs $driver -sOutputFile=$2%03d -dNOPAUSE -dSAFER -q -"
+    dvips $dvipscfg "$1" -o \
+        !"gs $driver -sOutputFile="$2"%03d -dNOPAUSE -dSAFER -q -"
 
 # for those that only have the old "dvialw":
 #
 #	dvialw <$file |
-#	    gs $driver -sOutputFile=$2%03d -dNOPAUSE -dSAFER -q -
+#	    gs $driver -sOutputFile="$2"%03d -dNOPAUSE -dSAFER -q -
 
 # for those that have dvi2ps and not dvips:
 #
 #	dvi2ps -r -q $q |
-#	    gs $driver -sOutputFile=$2%03d -dNOPAUSE -dSAFER -q -
+#	    gs $driver -sOutputFile="$2"%03d -dNOPAUSE -dSAFER -q -
 
 }
 
@@ -341,11 +341,11 @@
 fs_cvt_pdf()
 {
     driver="$GS_DRIVER_HI"
-    test X$3 = X-n && driver="$GS_DRIVER_LO"
+    test X"$3" = X-n && driver="$GS_DRIVER_LO"
 
-    cat $1 |
+    cat "$1" |
 	acroread -toPostScript |
-	gs $driver -sOutputFile=$2%03d -dNOPAUSE -q -dSAFER -
+	gs $driver -sOutputFile="$2"%03d -dNOPAUSE -q -dSAFER -
 }
 
 
@@ -487,7 +487,7 @@
 	    then
 		user="$2"
 	    else
-		$echo "not authorized to use \`\`-u $2'' switch." >&2
+		$echo "not authorized to use \`\`-u "$2"'' switch." >&2
 		exit 3
 	    fi
 	    shift ; shift
@@ -547,7 +547,7 @@
     exit 3
 fi
 
-phone=$1 ; shift
+phone="$1" ; shift
 if expr "$phone" : "[-0-9TtPpWw,;]*$" >/dev/null ; then :
 else
     alias="$phone"