Original date:2015-04-23 09:59:55 Edited by: euphoric Subject: Re: ./EuGTK/GtkEngine.e to Irv

This is not a problem with this code but when I paste the code in I get the following error:

/home/shawn/development/pkg/wee/EuGTK/GtkEngine.e:8675 in function inet_address()  
variable AF_INET has not been assigned a value  
... called from /home/shawn/development/pkg/wee/EuGTK/GtkEngine.e:137  
--> See ex.err  

This fails both OpenEuphoria 4.1development and EuphoriaAL 4.1. It is time to make a fix and release EuphoriaAL 4.2.


The code snippet works on 4.0.5. Thank goodness.

Maybe it is better to use ifconfig while this bug is being worked on:

object ip 
object ifconfig_process = pipeio:exec("/sbin/ifconfig", pipeio:create()) 
	if atom(ifconfig_process) then 
		return -1 
	end if 
	sequence ifconfig_data = "" 
	while 1 do 
		sequence chunk = read(ifconfig_process[pipeio:STDOUT],256) 
		if equal(chunk,"") then 
		end if 
		ifconfig_data &= chunk 
	end while 
	integer loc = 0 
	sequence address 
	while loc with entry do 
		if begins("inet addr:", ifconfig_data[loc..$]) then 
			loc += length("inet addr:") 
		elsif begins("inet ", ifconfig_data[loc..$]) then 
			loc += length("inet ") 
		end if 
		if not begins("", ifconfig_data[loc..$]) then 
			address = ifconfig_data[loc..$] 
			integer space_loc = find(' ', address) 
			if space_loc then 
				address = address[1..space_loc-1] 
			end if 
			return address 
		end if 
		loc = or_bits(match("inet addr:", ifconfig_data, loc+1), match("inet ", ifconfig_data, loc+1)) 
	end while 
	return -1 


Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu