From andreas@marvin.RoBIN.de  Mon Jul 15 19:19:31 1996
Received: from hydra.RoBIN.de (root@hydra.RoBIN.de [193.174.7.1])
          by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id TAA16691
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 15 Jul 1996 19:19:27 -0700 (PDT)
Received: from marvin.RoBIN.de (uucp@localhost) by hydra.RoBIN.de (8.6.13/8.6.12) with UUCP id DAA30888 for FreeBSD-gnats-submit@freebsd.org; Tue, 16 Jul 1996 03:57:43 +0200
Received: from marvin.RoBIN.de (uucp@localhost) by layla.RoBIN.de (8.6.12/8.6.12) with UUCP id WAA03224 for FreeBSD-gnats-submit@freebsd.org; Mon, 15 Jul 1996 22:02:03 +0200
Received: (from andreas@localhost) by marvin.RoBIN.de (8.6.12/8.6.12) id RAA00388; Sat, 13 Jul 1996 17:26:00 +0200
Message-Id: <199607131526.RAA00388@marvin.RoBIN.de>
Date: Sat, 13 Jul 1996 17:26:00 +0200
From: andreas@marvin.RoBIN.de
Reply-To: andreas@marvin.RoBIN.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: lpf Text Filter does not work with iso 8859-1 Characters
X-Send-Pr-Version: 3.2

>Number:         1386
>Category:       bin
>Synopsis:       lpf Text Filter does not work with iso 8859-1 Characters
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 15 19:20:01 PDT 1996
>Closed-Date:    Wed Jul 17 22:14:53 MET DST 1996
>Last-Modified:  Wed Jul 17 22:17:08 MET DST 1996
>Originator:     Andreas Lohr
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
At home
>Environment:

	I want to use the lpf to print iso 8859-1 chars on my HP Deskjet.

>Description:

	The Text Filter /usr/libexec/lpr/lpf does not handle
	ISO 8859-1 Characters correctly. Better, it does not
	handle any chars with an ascii value greater than 127.

>How-To-Repeat:

	Print some text with chars > 127.

>Fix:

	The fix is very easy. The variable 'ch' in the source file
	/usr/src/usr.sbin/lpr/filters/lpf.c has to declared as an
	int instead of a char. 

*** lpf.c.dist  Sat Jul 13 15:29:26 1996
--- lpf.c       Sat Jul 13 15:29:49 1996
***************
*** 79,85 ****
        register int i, col;
        register char *cp;
        int done, linedone, maxrep;
!       char ch, *limit;
  
        while (--argc) {
                if (*(cp = *++argv) == '-') {
--- 79,86 ----
        register int i, col;
        register char *cp;
        int done, linedone, maxrep;
!       char *limit;
!       int ch;
  
        while (--argc) {
                if (*(cp = *++argv) == '-') {


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: joerg 
State-Changed-When: Wed Jul 17 22:14:53 MET DST 1996 
State-Changed-Why:  
Suggested fix applied in rev 1.3 of lpf.c. 
(Btw, the patch was broken.  Please, don't cut&paste from xterm, 
it botches the tabs.) 

>Unformatted:
 
