home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / AUTOPO.ZIP / NO73.CMD < prev    next >
OS/2 REXX Batch file  |  1991-08-26  |  923b  |  17 lines

  1. /* This program makes sure that there are no lines with exactly 73 characters in the line by adding a continuation (->) to all such lines. I tried spaces but this didn't work reliably. This is necessary to prevent the ASCII upload to the EEP BBS from aborting. This would happen because if a line of exactly 73 characters and one or more spaces  was sent, the BBS would "wordwrap" to the next line. The CR following the 73 characters would then be interpreted as a "blank" line causing the BBS editor to go into command mode prematurely.*/
  2. arg filename
  3. tempfile = "no73.tmp"
  4. say "Scanning "filename" for 73 character lines...."
  5. copy filename tempfile
  6. del filename
  7. do until lines(tempfile)=0
  8.    indata=strip(linein(tempfile))
  9.    if length(indata) = 73 then
  10.       outdata=indata '->'
  11.    else
  12.       outdata=indata
  13.    call lineout filename, outdata 
  14. end
  15. call lineout filename
  16. call lineout tempfile
  17. del tempfile