node/lib/metasm/metasm/parse_c.rb
# find a Struct/Union object from a struct name/typedef name
# raises if it cant find it
find a Struct/Union object from a struct name/typedef name
raises if it cant find it
find a Struct / Union object from a struct name / typedef name raises if it cant find it
def find_c_struct(structname)
			structname = structname.to_s if structname.kind_of?(::Symbol)
			if structname.kind_of?(::String) and not struct = @toplevel.struct[structname]
				struct = @toplevel.symbol[structname]
				raise "unknown struct #{structname.inspect}" if not struct
				struct = struct.type.untypedef
				struct = struct.pointed while struct.pointer?
				raise "unknown struct #{structname.inspect}" if not struct.kind_of? C::Union
			end
			struct = structname if structname.kind_of? C::Union
			raise "unknown struct #{structname.inspect}" if not struct.kind_of? C::Union
			struct
		end
def find_c_struct ( structname ) structname = structname . to_s if structname . kind_of? ( :: Symbol ) if structname . kind_of? ( :: String ) and not struct = @toplevel . struct [ structname ] struct = @toplevel . symbol [ structname ] raise "unknown struct #{structname.inspect}" if not struct struct = struct . type . untypedef struct = struct . pointed while struct . pointer? raise "unknown struct #{structname.inspect}" if not struct . kind_of? C :: Union end struct = structname if structname . kind_of? C :: Union raise "unknown struct #{structname.inspect}" if not struct . kind_of? C :: Union struct end
find a Struct/Union object from a struct name/typedef name
raises if it cant find it
find a Struct / Union object from a struct name / typedef name raises if it cant find it
structname