home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!att!mcdchg!chinet!les
- From: les@chinet.chi.il.us (Leslie Mikesell)
- Subject: Re: /dev
- Message-ID: <BzMAFp.6rA@chinet.chi.il.us>
- Organization: Chinet - Public Access UNIX
- References: <1h3m36INNd4l@usenet.INS.CWRU.Edu>
- Date: Mon, 21 Dec 1992 16:14:13 GMT
- Lines: 23
-
- In article <1h3m36INNd4l@usenet.INS.CWRU.Edu> cq377@cleveland.Freenet.Edu (David C. Williss) writes:
-
- >I have a question, and maybe somebody here can point me in the right
- >direction. I'm working on a software package wich we are porting to
- >Unix and one of my parts is the hardcopy output. On the old system
- >I could just open "lpt1:" and start dumping. On unix, things become
- >harder.
-
- Not hard at all. Let the user or administrator enter an arbitrary string
- for the process to accept the printout. Use popen() to start it up.
- Don't try to second guess the contents of the string - it's likely
- to be things like "uux - othermachine!lp -d someprinter" or
- "mp | uux - othermachine!lp -d postscriptprinter" or whatever
- pipeline it takes to get the job where they want it.
- Since there are likely to be many printers available on a unix machine
- it's nice to give the user a choice at run time as well as having
- a configured default for each user. Sometimes it's convenient to
- bundle this with the option to save the print image to a file - if
- the user types something starting with "|", feed it to popen() instead
- of fopen().
-
- Les Mikesell
- les@chinet.chi.il.us
-