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:
parent
f43bee229b
commit
5ef8a695d0
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=14930
1 changed files with 3 additions and 3 deletions
|
|
@ -1831,7 +1831,7 @@ $%&'()*+,-./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&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 && cat && printf "\033&l0H" &&
|
||||
echo "$first_line" && cat && printf "\033&l0H" &&
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue