[comp.unix.questions] 'C' access to the lp spooling stuff, any ideas

wdh@holos0.uucp (Weaver Hickerson) (12/13/90)

I'd like to be able to queue files by writing into the lp fifos, tables,
and whatever other magic is involved.  Does anybody know of the format,
rules, caveats, etc for this type of thing.

Any help is appreciated.

Weaver
-- 
-Weaver Hickerson   Voice (404) 496-1358   :  ..!edu!gatech!holos0!wdh

jeenglis@alcor.usc.edu (Joe English Muffin) (12/13/90)

wdh@holos0.uucp (Weaver Hickerson) writes:

>I'd like to be able to queue files by writing into the lp fifos, tables,
>and whatever other magic is involved.  Does anybody know of the format,
>rules, caveats, etc for this type of thing.

    popen("lpr","w");

is by far your best bet.


--Joe English

  jeenglis@alcor.usc.edu

jonb@specialix.co.uk (Jon Brawn) (12/14/90)

jeenglis@alcor.usc.edu (Joe English Muffin) writes:
>wdh@holos0.uucp (Weaver Hickerson) writes:
>>I'd like to be able to queue files by writing into the lp fifos, tables,
>>and whatever other magic is involved.  Does anybody know of the format,
>>rules, caveats, etc for this type of thing.
>    popen("lpr","w");
>is by far your best bet.

Tart it up a bit by setting absolute pathnames and IFS though!
-- 
 "These opinions where made up on the spur of the moment, to a formula kept
 secret from prying eyes for hundreds of years, and bear no relationship to
       my actual beliefs, let alone those of Specialix International"
Jon Brawn, jonb@specialix.co.uk "I didn't do it. I wan't there."

prc@erbe.se (Robert Claeson) (12/14/90)

In article <13632@chaph.usc.edu>, jeenglis@alcor.usc.edu (Joe English Muffin) writes:

|> wdh@holos0.uucp (Weaver Hickerson) writes:

|> >I'd like to be able to queue files by writing into the lp fifos, tables,
|> >and whatever other magic is involved.  Does anybody know of the format,
|> >rules, caveats, etc for this type of thing.

|>     popen("lpr","w");
|> 
|> is by far your best bet.

Ahem, the question was regarding the System V "lp" spooler. For it, the
following should be done instead:

	popen("lp -s", "w");

In other words, not much of a difference.
-- 
Robert Claeson                  |Reasonable mailers: rclaeson@erbe.se
ERBE DATA AB                    |      Dumb mailers: rclaeson%erbe.se@sunet.se
Jakobsberg, Sweden              |  Perverse mailers: rclaeson%erbe.se@encore.com
Any opinions expressed herein definitely belongs to me and not to my employer.