Sha256: 41ea8f9deed1ff66285b383d9b9813bd1091c94c5ac4b7e667f901a687329a73

Contents?: true

Size: 752 Bytes

Versions: 26

Compression:

Stored size: 752 Bytes

Contents

except_targets = ["Init_atk()"]

def print_data(array, type, defs, extern = false)
  if array[type]
    extern_def = "extern void" if extern
    print "##{defs} #{type}\n" if defs
    array[type].each do |val|
	   print "#{extern_def}   #{val};\n"
    end
    print "#endif\n" if defs
  end
end

inits = Hash.new

while gets
  if ~ /^(Init_.*\(.*\))(.*)/
	init = $1
	unless except_targets.include?(init)
	  flag = $2
	  if flag.size > 0
		if flag =~ /\/\*\s*(\w*)\s*\*\//
		  inits[$1] = Array.new unless inits[$1]
		  inits[$1] << init
		end
	  else
		inits[""] = Array.new unless inits[""]
		inits[""] << init
	  end
	end
  end
end

print_data(inits, "", nil, true)

print "void Init_atk_inits()\n"
print "{\n"
print_data(inits, "", nil)
print "}\n"

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
atk-0.90.3 ext/atk/makeinits.rb
atk-0.90.3-x86-mingw32 ext/atk/makeinits.rb
atk-0.90.2 ext/atk/makeinits.rb
atk-0.90.2-x86-mingw32 ext/atk/makeinits.rb
atk-0.20.1 src/makeinits.rb
atk-0.20.0 src/makeinits.rb