Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Apr 1995 12:37:44 -0400 (EDT)
From:      Richard Toren <rpt@miles.sso.loral.com>
To:        hackers@FreeBSD.org
Subject:   aspfilter & stdin
Message-ID:  <Pine.SUN.3.91.950416123406.11024A-100000@miles>

next in thread | raw e-mail | index | archive | help
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                           |
                         ====================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.950416123406.11024A-100000>