[comp.lang.icon] DOS->UNIX conversion, patch

goer@quads.uchicago.edu (Richard L. Goerwitz) (01/21/91)

Eeek!  A bug!

Please apply the following patch to nocr.icn.  If anyone is unable
to apply patches, send me a note, and I'll mail you the whole thing
in toto.

-Richard


*** nocr.icn	Sun Jan 20 23:00:00 1991
--- nocr.icn.old	Sun Jan 20 22:59:52 1991
***************
*** 6,12 ****
  #
  #	Author:	 Richard L. Goerwitz
  #
! #	Version: 1.4
  #
  ############################################################################
  #  
--- 6,12 ----
  #
  #	Author:	 Richard L. Goerwitz
  #
! #	Version: 1.2
  #
  ############################################################################
  #  
***************
*** 82,92 ****
  	else {
  	    # If not running under DOS, then we're under UNIX (unless
  	    # we've been hacked).  Trim CR manually, then write.
! 	    while line := read(infile) do {
!                 if line[-1] == "\x0D" then
! 		    line[-1] := ""
! 	        write(outfile, line)
!             }
  	}
  
  	# Close opened input and output files.
--- 82,88 ----
  	else {
  	    # If not running under DOS, then we're under UNIX (unless
  	    # we've been hacked).  Trim CR manually, then write.
! 	    while write(outfile, read(infile) ? tab(-1|0))
  	}
  
  	# Close opened input and output files.