home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 19726 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  1.4 KB

  1. Xref: sparky comp.os.vms:19726 vmsnet.tpu:549
  2. Newsgroups: comp.os.vms,vmsnet.tpu
  3. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!haven.umd.edu!decuac!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!augie!reinig
  4. From: reinig@augie.enet.dec.com (August Reinig)
  5. Subject: Re: Help on "simple" EVE/TPU procedure
  6. Message-ID: <1992Dec22.145106.18049@nntpd.lkg.dec.com>
  7. Sender: reinig@augie (August Reinig)
  8. Reply-To: reinig@augie.enet.dec.com (August Reinig)
  9. Organization: Digital Equipment Corporation
  10. References: <BzKtA4.D67@news.cso.uiuc.edu> <1992Dec21.184230.14735@miavx1.acs.muohio.edu>
  11. Date: Tue, 22 Dec 1992 14:51:06 GMT
  12. Lines: 30
  13.  
  14. Untested, but the following should truncate each line in the file 
  15. to 72 characters and then remove any trailing blanks.  With a small
  16. modification, the truncate count could be a parameter to the routine
  17. but I can't remember the EVE syntax for this off the top of my head.
  18. Perhaps Bill will oblige.
  19.  
  20. This routine won't work if there are tabs in the sources.  There
  21. are EVE routines to change tabs to spaces which you should use 
  22. first if tabs are present.
  23.  
  24.                 August G. Reinig
  25.                 
  26.  
  27. procedure eve_truncate
  28.  
  29. local
  30.     pat1,
  31.     r1;
  32.  
  33. pat1 := LINE_BEGIN + arb(72) + (remain @ r1);
  34. position (buffer_begin);
  35. loop
  36.     exitif search_quietly(pat1, forward, exact) = 0;
  37.     position(r1);
  38.     erase(r1);
  39. endloop;
  40.  
  41. edit(current_buffer, trim_trailing);
  42.  
  43. endprocedure;
  44.