home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / mail / elm / 1967 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  2.9 KB

  1. Path: sparky!uunet!mcsun!fuug!demos!kiae!glas!demos!princeton!lotka.Princeton.EDU!bvaughan
  2. From: bvaughan@lotka.Princeton.EDU
  3. Newsgroups: comp.mail.elm
  4. Date: 18 Jul 92 02:13 MDT
  5. Subject: Summary: printing locally
  6. Sender: Notesfile to Usenet Gateway <notes@glas.apc.org>
  7. Message-ID: <1992Jul17.221326.27791@princeton>
  8. Nf-ID: #N:1992Jul17.221326.27791@princeton:-238046479:001:2557
  9. Nf-From: lotka.Princeton.EDU!bvaughan    Jul 18 02:13:00 1992
  10. Lines: 63
  11.  
  12.  
  13. Last week I asked this newsgroup for help with printing from elm when
  14. logged in from an IBM PC.  Others had earlier requested help with this
  15. sort of thing.  Nigel Metheringham provided a wonderfully succint summary
  16. of the problem as well as one solution:
  17.  
  18. > [Nigel's summary:-
  19. >   Wants function to print locally on a PC connected via TCP/IP telnet.
  20. >   Finds that stuff sent to stdout by print command vanishes!
  21. >   Telnet implementation does not allow printer control
  22. > Elm redirects stdout & stderr to /dev/null (effectively) while
  23. > executing the print command.  The work round to get the text sent to
  24. > your terminal (and hopefully your local printer) is to send the
  25. > output to /dev/tty (this should work on all Unix systems but I'm not
  26. > guarenteeing it!).
  27. > # Nigel Metheringham   # (NeXT) EMail:
  28. nigelm@ohm.york.ac.uk #
  29. > # System Administrator #######  Phone: +44 904 432374        #
  30. > # Department of Electronics  #  Fax:   +44 904 432335        #
  31. > #     University of York, Heslington, York, UK, YO1 5DD      #
  32. Nigel also volunteered a print utility that he wrote for printing to local
  33. printers; I haven't tried it because our own local print utility works
  34. as a substitute print command if I redirect its output to /dev/tty as
  35. Nigel suggested.  If anyone would like to have the print utility, I will
  36. forward it, with no guarantees.
  37.  
  38. One of the problems with a print utility that must send output to the screen
  39. is that even if you get it there, elm doesn't redraw the screen afterward.
  40. David A. Wagner offered a suggestion similar to Nigel's, but also
  41. suggested adding a line to the elm.c program as follows to redraw the
  42. screen after printing.  Here is David's addition:
  43.  
  44. > >     In elm.c, change the "case 'p'" block to be this:
  45. > > 
  46. > > --------------------------------------------
  47. > >         case 'p'    :  PutLine0(LINES-3, strlen("Command: "), "Print mail");
  48. > >                fflush(stdout);
  49. > >                if (message_count < 1) {
  50. > >                  error("No mail to print!");
  51. > >                  fflush(stdin);
  52. > >                }
  53. > >                else {
  54. > >                  print_msg();            
  55. > >                  redraw++;        /* CHANGE */
  56. > >                }
  57. > >                break;
  58. > > --------------------------------------------
  59.  
  60. > David A. Wagner
  61. > dawagner@phoenix.princeton.EDU
  62.  
  63. If all of this seems too complicated, there is always my original workaround.
  64. You can use the pipe function in the elm menu to pipe the current message
  65. to print utilities that require printing to the screen.  This is only a
  66. little more tedious than using the print function.
  67.  
  68. Barbara Vaughan
  69. bvaughan@lotka.princeton.EDU
  70.  
  71.