From owner-freebsd-hackers Sun Apr 16 14:01:41 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id OAA14329 for hackers-outgoing; Sun, 16 Apr 1995 14:01:41 -0700 Received: from wn1.sci.kun.nl (wn1.sci.kun.nl [131.174.8.1]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id OAA14320 for ; Sun, 16 Apr 1995 14:01:38 -0700 Received: from studs.sci.kun.nl by wn1.sci.kun.nl via studs.sci.kun.nl [131.174.124.5] with ESMTP id XAA24090 (8.6.10/2.9); Sun, 16 Apr 1995 23:01:35 +0200 From: William Wanders Received: by studs.sci.kun.nl id XAA15103 (8.6.10/2.1); Sun, 16 Apr 1995 23:01:34 +0200 Message-Id: <199504162101.XAA15103@studs.sci.kun.nl> Subject: Re: aspfilter & stdin To: rpt@miles.sso.loral.com (Richard Toren) Date: Sun, 16 Apr 1995 23:01:33 +0200 (MET DST) Cc: freebsd-hackers@FreeBSD.org In-Reply-To: from "Richard Toren" at Apr 16, 95 12:37:44 pm X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2017 Sender: hackers-owner@FreeBSD.org Precedence: bulk Hello Richard, > > Gentlemen, > For the last three days I have been trying to make 'apsfilter' work > on my 2.0R system. I have learned a lot, but have hit a final sticking > point. > > 'apsfilter' is started by the lpd. It tries to determine the type of > file that is being printed. Unfortunately, it uses `file -` to determine > the type of file. A companion program is supplied called 'rewindstdin'. > > main() > { > return lseek(0,0L,0) < 0; > } Try : #include main() { rewind(stdin); return(0); } > > This program is supposed to allow the reading of stdin a second time > by 'a2ps' after the parameters and filters have been determined. > This program does not work in FreeBSD as designed. > > I then thought to read the spooled datafile in place of the stdin to > determine file type. Unfortunatly the apsfilter runs as daemon.wheel, > which does not have the correct permissions to read the spooled data. > I then made apsflter 02755 owned by root.daemon. Unfortunately it still > ran as daemon.wheel. > > Is my final option to cat stdin off to another temp file, work with it > there, and pass that as the file to a2ps to print. With a 10MB > Postscript file, that would mean three copies (orig. , spool, temp). > > Is there any way to make rewindstdin function? Or at least provide > the equivelant functionality? > > There were other problems I have had with this package that I will comment > on later if I ever get it running. > I've got apsfilter up and running for several months now. Since version 2.x or something. Every release had the same problem with rewindstdin.c. Although i informed the author he didn't incorporate any of my changes. Eg. have the standard accounting scheme running with apsfilter 4.8 and it seems quite stable. That is if you think 3000 correctly counted pages are enough proof. If you are interrested i can supply my modified filter with accounting :) William Wanders (wwanders@sci.kun.nl)