Path: news1.icaen!news.uiowa.edu!news1.chicago.iagnet.net!qual.net!iagnet.net!ais.net!chippy.visi.com!news-out.visi.com!ptah.visi.com!not-for-mail Newsgroups: comp.sys.apple2.gno From: Dragon King Subject: Re: lpr 3.3 In-Reply-To: <350D37AA.5F29@unisys.com> Message-ID: References: <350D37AA.5F29@unisys.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Lines: 30 Date: Thu, 26 Mar 1998 09:13:56 GMT NNTP-Posting-Host: thumper.visi.com NNTP-Posting-Date: Thu, 26 Mar 1998 03:13:56 CST Xref: news1.icaen comp.sys.apple2.gno:6615 On Mon, 16 Mar 1998, MA wrote: > I took lpr 3.3. I believe that is the latest version of the program > and recompiled the source with the December 1997 libraries. When I > ran this program, it prints the last line of the file being printed > twice. I am not sure where the problem lies. Perhaps not detecting > the end of file soon enough. Just for your information. In a sense, you are correct.. But truthfully it had to do with the way fgets was used and the differing ways it functioned in the 2.0.4 libs and the 2.0.6 beta libs.. I've attached a small patch that "should" fix it, but I won't be able to afford to upgrade to Orca/C 2.1 for another couple weeks. Try the patch and tell me if it works.. If it works I may release an updated lpd and lpr package before I upgrade Orca. If not I'll fix it when I get the upgrade. -- \ | _ _|_ _| | Jeff Markham (Dragon King) _ \ _ \ _ \ | -_) | | _` |(_-< | markhj01@visi.com _/ _\ .__/ .__/_|\___| ___|___|\__, |___/ | http://www.visi.com/~markhj01 _| _| ____/ _| ftp.visi.com:/users/markhj01 Path: news1.icaen!news.uiowa.edu!news1.chicago.iagnet.net!qual.net!iagnet.net!ais.net!darla.visi.com!news-out.visi.com!ptah.visi.com!not-for-mail Newsgroups: comp.sys.apple2.gno From: Dragon King Subject: lpr patch.. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Lines: 8 Date: Thu, 26 Mar 1998 09:15:10 GMT NNTP-Posting-Host: thumper.visi.com NNTP-Posting-Date: Thu, 26 Mar 1998 03:15:10 CST Xref: news1.icaen comp.sys.apple2.gno:6616 Duh! I forgot to attach the patch.. Ok.. Here it is... 315,316c312 < fgets(linebuf, 254, in); /* read in one line (up to 254) */ < if (linebuf[0]) { /* if not EOL */ --- > if (fgets(linebuf, 254, in) != NULL) { /* read in one line (up to 254) */