node/lib/metasm/metasm/gui/dasm_graph.rb
# returns a hash with true for every node reachable from src (included)
returns a hash with true for every node reachable from src (included)
returns a hash with true for every node reachable from src ( included )
def list_reachable(src, done={})
		todo = [src]
		while g = todo.pop
			next if done[g]
			done[g] = true
			todo.concat g.to
		end
		done
	end
def list_reachable ( src , done = { } ) todo = [ src ] while g = todo . pop next if done [ g ] done [ g ] = true todo . concat g . to end done end
returns a hash with true for every node reachable from src (included)
returns a hash with true for every node reachable from src ( included )
src
done