Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Apr 1995 23:01:33 +0200 (MET DST)
From:      William Wanders <wwanders@sci.kun.nl>
To:        rpt@miles.sso.loral.com (Richard Toren)
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: aspfilter & stdin
Message-ID:  <199504162101.XAA15103@studs.sci.kun.nl>
In-Reply-To: <Pine.SUN.3.91.950416123406.11024A-100000@miles> from "Richard Toren" at Apr 16, 95 12:37:44 pm

next in thread | previous in thread | raw e-mail | index | archive | help
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 <stdio.h>

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)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504162101.XAA15103>