1. Bug Report ed.ex and ed_macro.ex (James Cook)

This little bug was inserted into the ed.ex source code beginning with OpenEuphoria 4.0 and is also found in James Cook's ed.ex macro mod source code. I have reported this several times before.

In Linux the error causes the clean function to fail to convert DOS CR-LF to Linux LF on DOS blank lines - lines that are composed of CR-LF (length(line) = 2. Under Linux ed.ex will show a graphics character for these blank lines and your file will be corrupted if you save it.

-- ed.ex function clean(sequence line 
ifdef UNIX  then 
--      if length(line) > 2 and line[$-1] = '\r' then --<<--- change to: 
	if length(line) > 1 and line[$-1] = '\r' then --< correct line 
        -- DOS file: remove CR 
	    line = line[1..$-2] & '\n' 
	    cr_removed = TRUE 
	end if 
end ifdef 

Regards, Kenneth Rhodes

new topic     » topic index » view message » categorize


Quick Links

User menu

Not signed in.

Misc Menu