node/lib/metasm/metasm/gui/cstruct.rb
# display the struct or pop a list of matching struct names if ambiguous
display the struct or pop a list of matching struct names if ambiguous
display the struct or pop a list of matching struct names if ambiguous
def focus_struct_byname(n, addr=@curaddr)
		lst = @dasm.c_parser.toplevel.struct.keys.grep(String)
		if fn = lst.find { |ln| ln == n } || lst.find { |ln| ln.downcase == n.downcase }
			focus_addr(addr, @dasm.c_parser.toplevel.struct[fn])
		else
			lst = @dasm.c_parser.toplevel.symbol.keys.grep(String).find_all { |ln|
				s = @dasm.c_parser.toplevel.symbol[ln]
				s.kind_of?(C::TypeDef) and s.untypedef.kind_of?(C::Union)
			}
			if fn = lst.find { |ln| ln == n } || lst.find { |ln| ln.downcase == n.downcase }
				focus_addr(addr, @dasm.c_parser.toplevel.symbol[fn].untypedef)
			else
				liststructs(n, addr)
			end
		end
	end
def focus_struct_byname ( n , addr = @curaddr ) lst = @dasm . c_parser . toplevel . struct . keys . grep ( String ) if fn = lst . find { | ln | ln == n } || lst . find { | ln | ln . downcase == n . downcase } focus_addr ( addr , @dasm . c_parser . toplevel . struct [ fn ] ) else lst = @dasm . c_parser . toplevel . symbol . keys . grep ( String ) . find_all { | ln | s = @dasm . c_parser . toplevel . symbol [ ln ] s . kind_of? ( C :: TypeDef ) and s . untypedef . kind_of? ( C :: Union ) } if fn = lst . find { | ln | ln == n } || lst . find { | ln | ln . downcase == n . downcase } focus_addr ( addr , @dasm . c_parser . toplevel . symbol [ fn ] . untypedef ) else liststructs ( n , addr ) end end end
display the struct or pop a list of matching struct names if ambiguous
display the struct or pop a list of matching struct names if ambiguous
n
addr