[comp.os.vms] trailing spaces

ERIC@UOFT02.BITNET (07/27/87)

  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 )