node/lib/metasm/metasm/parse_c.rb
def dump_definitions(list, exclude=[])
			# recurse all dependencies
			todo_rndr = {}
			todo_deps = {}
			list.each { |t|
				todo_rndr[t], todo_deps[t] = t.dump_def(@toplevel)
			}
			# c.toplevel.anonymous_enums.to_a.each { |t| todo_rndr[t], todo_deps[t] = t.dump_def(c.toplevel) }
			while !(ar = (todo_deps.values.flatten - todo_deps.keys)).empty?
				ar.each { |t|
					todo_rndr[t], todo_deps[t] = t.dump_def(@toplevel)
				}
			end
			exclude.each { |t| todo_deps.delete t ; todo_rndr.delete t }
			todo_deps.each_key { |t| todo_deps[t] -= exclude }

			all = @toplevel.struct.values + @toplevel.symbol.values
			all -= all.grep(::Integer)	# Enum values

			@toplevel.dump_reorder(all, todo_rndr, todo_deps)[0].join("\n")
		end
# returns a big string representing the definitions of all terms appearing in +list+, excluding +exclude+
# includes dependencies
returns a big string representing the definitions of all terms appearing in +list+, excluding +exclude+
includes dependencies
returns a big string representing the definitions of all terms appearing in + list + excluding + exclude + includes dependencies
def dump_definitions(list, exclude=[])
			todo_rndr = {}
			todo_deps = {}
			list.each { |t|
				todo_rndr[t], todo_deps[t] = t.dump_def(@toplevel)
			}
			while !(ar = (todo_deps.values.flatten - todo_deps.keys)).empty?
				ar.each { |t|
					todo_rndr[t], todo_deps[t] = t.dump_def(@toplevel)
				}
			end
			exclude.each { |t| todo_deps.delete t ; todo_rndr.delete t }
			todo_deps.each_key { |t| todo_deps[t] -= exclude }
			all = @toplevel.struct.values + @toplevel.symbol.values
			all -= all.grep(::Integer)	
			@toplevel.dump_reorder(all, todo_rndr, todo_deps)[0].join("\n")
		end
def dump_definitions ( list , exclude = [ ] ) todo_rndr = { } todo_deps = { } list . each { | t | todo_rndr [ t ] , todo_deps [ t ] = t . dump_def ( @toplevel ) } while ! ( ar = ( todo_deps . values . flatten - todo_deps . keys ) ) . empty? ar . each { | t | todo_rndr [ t ] , todo_deps [ t ] = t . dump_def ( @toplevel ) } end exclude . each { | t | todo_deps . delete t ; todo_rndr . delete t } todo_deps . each_key { | t | todo_deps [ t ] -= exclude } all = @toplevel . struct . values + @toplevel . symbol . values all -= all . grep ( :: Integer ) @toplevel . dump_reorder ( all , todo_rndr , todo_deps ) [ 0 ] . join ( "\n" ) end
returns a big string representing the definitions of all terms appearing in +list+, excluding +exclude+
includes dependencies
returns a big string representing the definitions of all terms appearing in + list + excluding + exclude + includes dependencies
# recurse all dependencies # c.toplevel.anonymous_enums.to_a.each { |t| todo_rndr[t], todo_deps[t] = t.dump_def(c.toplevel) } # Enum values
list
exclude