Re: Compiling issue

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hallo again

The code below attached to c_decl.e seems to fix the issue, at least here on my system.

function unique_c_name(sequence name) 
	integer i 
	sequence compare_name,fname    -- added fname as sequence 
	integer next_fc 
 
	compare_name = name & ".c" 
	if not TUNIX then 
		compare_name = lower(compare_name) 
	end if 
 
	next_fc = 1 
	i = 1 
 
	while i <= length(generated_files) do 
		-- extract the base name 
		if not TUNIX then 
			fname=lower(generated_files[i])   -- converting to lower if not on UNIX 
		else  
			fname=generated_files[i] 
		end if 
		if equal(fname, compare_name) then 
			-- name conflict 
			if next_fc > length(file_chars) then 
				CompileErr(140) 
			end if 
 
			name[1] = file_chars[next_fc] 
			compare_name = name & ".c" 
			if not TUNIX then 
				compare_name = lower(compare_name) 
			end if 
 
			next_fc += 1 
			i = 1 -- start over and compare again 
 
		else 
			i += 1 
		end if 
	end while 
 
	return name 
end function 
 

Andreas

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu