Fix "ifhp" to preserve spaces in the first line properly.

Submitted by:	"IWAMOTO, Kouichi" <sue@cds.ne.jp>
Reviewed by:	Shigetomo Kimura <kimura@netlab.is.tsukuba.ac.jp>
Approved by:	silence on -doc
This commit is contained in:
Hiroki Sato 2002-11-17 20:20:43 +00:00
parent f43bee229b
commit 5ef8a695d0
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=14930

View file

@ -1831,7 +1831,7 @@ $%&amp;'()*+,-./01234567
# Installed in /usr/local/libexec/psif
#
read first_line
IFS="" read -r first_line
first_two_chars=`expr "$first_line" : '\(..\)'`
if [ "$first_two_chars" = "%!" ]; then
@ -1905,7 +1905,7 @@ printf "\033&amp;k2G" || exit 2
#
# Read first two characters of the file
#
read first_line
IFS="" read -r first_line
first_two_chars=`expr "$first_line" : '\(..\)'`
if [ "$first_two_chars" = "%!" ]; then
@ -1932,7 +1932,7 @@ else
# Plain text or HP/PCL, so just print it directly; print a form feed
# at the end to eject the last page.
#
echo $first_line &amp;&amp; cat &amp;&amp; printf "\033&amp;l0H" &amp;&amp;
echo "$first_line" &amp;&amp; cat &amp;&amp; printf "\033&amp;l0H" &amp;&amp;
exit 0
fi