home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.vms:19726 vmsnet.tpu:549
- Newsgroups: comp.os.vms,vmsnet.tpu
- 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
- From: reinig@augie.enet.dec.com (August Reinig)
- Subject: Re: Help on "simple" EVE/TPU procedure
- Message-ID: <1992Dec22.145106.18049@nntpd.lkg.dec.com>
- Sender: reinig@augie (August Reinig)
- Reply-To: reinig@augie.enet.dec.com (August Reinig)
- Organization: Digital Equipment Corporation
- References: <BzKtA4.D67@news.cso.uiuc.edu> <1992Dec21.184230.14735@miavx1.acs.muohio.edu>
- Date: Tue, 22 Dec 1992 14:51:06 GMT
- Lines: 30
-
- Untested, but the following should truncate each line in the file
- to 72 characters and then remove any trailing blanks. With a small
- modification, the truncate count could be a parameter to the routine
- but I can't remember the EVE syntax for this off the top of my head.
- Perhaps Bill will oblige.
-
- This routine won't work if there are tabs in the sources. There
- are EVE routines to change tabs to spaces which you should use
- first if tabs are present.
-
- August G. Reinig
-
-
- procedure eve_truncate
-
- local
- pat1,
- r1;
-
- pat1 := LINE_BEGIN + arb(72) + (remain @ r1);
- position (buffer_begin);
- loop
- exitif search_quietly(pat1, forward, exact) = 0;
- position(r1);
- erase(r1);
- endloop;
-
- edit(current_buffer, trim_trailing);
-
- endprocedure;
-