From owner-freebsd-hackers Sun Apr 16 09:37:23 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id JAA06207 for hackers-outgoing; Sun, 16 Apr 1995 09:37:23 -0700 Received: from wdl1.wdl.loral.com (wdl1.wdl.loral.com [137.249.32.1]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id JAA06201 for ; Sun, 16 Apr 1995 09:37:21 -0700 Received: from miles.sso.loral.com by wdl1.wdl.loral.com (4.1/WDL-4.2) id AA25270; Sun, 16 Apr 95 09:36:48 PDT Received: by miles.sso.loral.com (4.1/SSO-SUN-2.04) id AA11044; Sun, 16 Apr 95 12:37:46 EDT Date: Sun, 16 Apr 1995 12:37:44 -0400 (EDT) From: Richard Toren X-Sender: rpt@miles To: hackers@FreeBSD.org Subject: aspfilter & stdin Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: hackers-owner@FreeBSD.org Precedence: bulk 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; } 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. ==================================================== Rip Toren | The bad news is that C++ is not an object-oriented | rpt@miles.sso.loral.com | programming language. .... The good news is that | | C++ supports object-oriented programming. | | C++ Programming & Fundamental Concepts | | by Anderson & Heinze | ====================================================