Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!rutgers!ucla-cs!zen!ucbvax!UOFT02.BITNET!ERIC
From: ERIC@UOFT02.BITNET
Newsgroups: comp.os.vms
Subject: trailing spaces
Message-ID: <8707280951.AA00589@ucbvax.Berkeley.EDU>
Date: Mon, 27-Jul-87 13:55:00 EDT
Article-I.D.: ucbvax.8707280951.AA00589
Posted: Mon Jul 27 13:55:00 1987
Date-Received: Wed, 29-Jul-87 05:15:29 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Distribution: world
Organization: The ARPA Internet
Lines: 31


  Here is one way to trim trailing spaces from a file...

1) get the file in eve (edit/tpu name.ext)
2) press the DO key
3) type: TPU EVE$X_TRIMMING := 1
4) type: WRITE FILE
5) press the DO key
6) type: EXIT

Note that you must use the WRITE FILE command and not EXIT, as exit will not
write the file out again, since the buffer has not been flagged as modified,
were as WRITE FILE always writes the file out.

If you look at the TPU source file for EVE, you will find a variable (called
eve$x_trimming) that is set to false.   It is tested in EXIT and WRITE FILE,
but is always false, so it does nothing.   By setting it to true,  it causes
EVE to call an otherwise unused routine EVE$TRIM_BUFFER which trims trailing
spaces (not tabs or other whitespaces).  These routines have all been in TPU
since version 3.?? of VMS, but have never been used...    There is no reason
to believe that they will remain in TPU in future versions but then there is
no reason to believe that they will not...    For those interested, there is
also a routine called EVE$TRIM_LINE...

If anyone has the SED/TED editors from Brian Nelson at the U of Toledo, Ohio
there is a TRIM command in TED that will also trim the spaces.

Hope that helps...

Ciao,
Eric  ( ERIC @ UOFT02.BITNET )