From: CSBVAX::MRGATE!@KL.SRI.Com:TOLLIVER%ORN.MFENET@NMFECC.ARPA@SMTP 28-JUL-1987 01:44 To: EVERHART Subj: RE: Trimming away trailing spaces Received: from NMFECC.ARPA ([128.115.3.7].#Internet) by KL.SRI.COM with TCP; Mon 27 Jul 87 14:06:11-PDT Received: from orn.mfenet by ccx.mfenet with Tell via MfeNet ; Mon, 27 Jul 87 14:03:28 PDT Date: Mon, 27 Jul 87 14:03:28 PDT From: TOLLIVER%ORN.MFENET@NMFECC.ARPA Message-Id: <870727140328.000@NMFECC.ARPA> Subject: RE: Trimming away trailing spaces To: INFO-VAX@SRI-KL.ARPA Comment: From TOLLIVER@ORN.MFENET on 27-JUL-1987 17:02:04.82 EDT Eve has a little-known line trimming function built right in. Use it as follows. 1. Press the DO key 2. At the prompt type: tpu eve$trim_buffer(current_buffer) 3. Press the RETURN key 4. Press ^Z to exit Eve The new file will have been trimmed of trailing spaces. You can also set up Eve so that it will automatically trim trailing spaces from all modified files as it exits. 1. Press the DO key 2. At the prompt type: tpu eve$x_trimming := 1 3. Make any small change so that Eve will know that the file has been modified--for example, insert and delete some character. 4. Make any other editing changes you please 5. Press ^Z to exit The file will be trimmed of trailing spaces as Eve exits. The command "eve$x_trimming := 1;" can be easily placed in a TPUINI.TPU file that will automatically be executed each time Eve is started. Then all you have to do is make some change in the file and exit. Trimming will happen automatically as Eve exits. Alternatively, you can put the command "eve$trim_buffer(current_buffer)" in a TPUINI.TPU file so that all files will always be trimmed of any trailing spaces each time Eve starts up. With only slightly more effort, one can define a new Eve command, call it TRIM BUFFER, for example, as follows: procedure eve_trim_buffer eve$trim_buffer(current_buffer); endprocedure This can be put in a TPUINI.TPU file or built right in to the EVE section file (see commands EXTEND TPU and SAVE EXTENDED TPU) so that all you have to do is press DO, type TRIM BUFFER (or a unique abbreviation), and exit. I once had a painfully slow DCL procedure to do this. Then I had a long and complicated Fortran program, using STR$TRIM. But this is the easiest method I know of to trim trailing spaces--and it's fast too. John Tolliver (Tolliver%orn.mfenet@nmfecc.arpa)