From owner-freebsd-doc Fri Nov 15 11: 9: 0 2002 Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4DAFF37B401 for ; Fri, 15 Nov 2002 11:08:58 -0800 (PST) Received: from smtp.eos.ocn.ne.jp (eos.ocn.ne.jp [211.6.83.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3C8243E75 for ; Fri, 15 Nov 2002 11:08:57 -0800 (PST) (envelope-from hrs@eos.ocn.ne.jp) Received: from mail.allbsd.org (p33186-adsao12honb4-acca.tokyo.ocn.ne.jp [219.161.176.186]) by smtp.eos.ocn.ne.jp (Postfix) with ESMTP id 51937372A for ; Sat, 16 Nov 2002 04:08:56 +0900 (JST) Received: from localhost (alph.allbsd.org [192.168.0.10]) by mail.allbsd.org (8.12.3/3.7W/DomainMaster) with ESMTP id gAFJ8PB2001067 for ; Sat, 16 Nov 2002 04:08:25 +0900 (JST) (envelope-from hrs@eos.ocn.ne.jp) Date: Sat, 16 Nov 2002 04:07:55 +0900 (JST) Message-Id: <20021116.040755.55801713.hrs@eos.ocn.ne.jp> To: freebsd-doc@FreeBSD.ORG Subject: ifhp script in handbook/printing/chapter.sgml From: Hiroki Sato X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Sat_Nov_16_04:07:55_2002_720)--" Content-Transfer-Encoding: 7bit Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org ----Next_Part(Sat_Nov_16_04:07:55_2002_720)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, handbook/printing/chapter.sgml suggests a filter script `ifhp' to examine if the printing data is in PostScript or not, but when the data is a plain text, spaces in the first line are chopped by the script. `read' chops spaces at the head of the line, and `echo' converts continuous spaces into a single one. I think this is an undesirable behavior. Could anyone review the attached patch contributed by Kimura-san(one of doc-jp translators) to fix the problem? I will commit this if no one complains in a couple of days. -- | Hiroki SATO ----Next_Part(Sat_Nov_16_04:07:55_2002_720)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="chapter.sgml.diff" Index: en_US.ISO8859-1/books/handbook/printing/chapter.sgml =================================================================== RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/handbook/printing/chapter.sgml,v retrieving revision 1.60 diff -d -u -I\$FreeBSD:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.60 chapter.sgml --- en_US.ISO8859-1/books/handbook/printing/chapter.sgml 30 Sep 2002 15:39:34 -0000 1.60 +++ en_US.ISO8859-1/books/handbook/printing/chapter.sgml 15 Nov 2002 18:01:14 -0000 @@ -1831,7 +1831,7 @@ # 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 @@ # # 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 @@ # 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 ----Next_Part(Sat_Nov_16_04:07:55_2002_720)---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message