home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!fuug!demos!kiae!glas!demos!princeton!lotka.Princeton.EDU!bvaughan
- From: bvaughan@lotka.Princeton.EDU
- Newsgroups: comp.mail.elm
- Date: 18 Jul 92 02:13 MDT
- Subject: Summary: printing locally
- Sender: Notesfile to Usenet Gateway <notes@glas.apc.org>
- Message-ID: <1992Jul17.221326.27791@princeton>
- Nf-ID: #N:1992Jul17.221326.27791@princeton:-238046479:001:2557
- Nf-From: lotka.Princeton.EDU!bvaughan Jul 18 02:13:00 1992
- Lines: 63
-
-
- Last week I asked this newsgroup for help with printing from elm when
- logged in from an IBM PC. Others had earlier requested help with this
- sort of thing. Nigel Metheringham provided a wonderfully succint summary
- of the problem as well as one solution:
-
- > [Nigel's summary:-
- > Wants function to print locally on a PC connected via TCP/IP telnet.
- > Finds that stuff sent to stdout by print command vanishes!
- > Telnet implementation does not allow printer control
- >
- > Elm redirects stdout & stderr to /dev/null (effectively) while
- > executing the print command. The work round to get the text sent to
- > your terminal (and hopefully your local printer) is to send the
- > output to /dev/tty (this should work on all Unix systems but I'm not
- > guarenteeing it!).
- >
- > # Nigel Metheringham # (NeXT) EMail:
- nigelm@ohm.york.ac.uk #
- > # System Administrator ####### Phone: +44 904 432374 #
- > # Department of Electronics # Fax: +44 904 432335 #
- > # University of York, Heslington, York, UK, YO1 5DD #
- >
- Nigel also volunteered a print utility that he wrote for printing to local
- printers; I haven't tried it because our own local print utility works
- as a substitute print command if I redirect its output to /dev/tty as
- Nigel suggested. If anyone would like to have the print utility, I will
- forward it, with no guarantees.
-
- One of the problems with a print utility that must send output to the screen
- is that even if you get it there, elm doesn't redraw the screen afterward.
- David A. Wagner offered a suggestion similar to Nigel's, but also
- suggested adding a line to the elm.c program as follows to redraw the
- screen after printing. Here is David's addition:
-
- > > In elm.c, change the "case 'p'" block to be this:
- > >
- > > --------------------------------------------
- > > case 'p' : PutLine0(LINES-3, strlen("Command: "), "Print mail");
- > > fflush(stdout);
- > > if (message_count < 1) {
- > > error("No mail to print!");
- > > fflush(stdin);
- > > }
- > > else {
- > > print_msg();
- > > redraw++; /* CHANGE */
- > > }
- > > break;
- > > --------------------------------------------
- >
-
- > David A. Wagner
- > dawagner@phoenix.princeton.EDU
-
- If all of this seems too complicated, there is always my original workaround.
- You can use the pipe function in the elm menu to pipe the current message
- to print utilities that require printing to the screen. This is only a
- little more tedious than using the print function.
-
- Barbara Vaughan
- bvaughan@lotka.princeton.EDU
-
-