2002-06-10 21:27:48 -04:00
|
|
|
#!./miniruby -s
|
|
|
|
|
|
|
|
SYM = {}
|
2002-10-03 07:20:31 -04:00
|
|
|
STDIN.reopen(open("nul"))
|
|
|
|
ARGV.each do |obj|
|
|
|
|
IO.foreach("|tdump -q -oiPUBDEF -oiPUBD32 #{obj.tr('/', '\\')}") do |l|
|
|
|
|
next unless /(?:PUBDEF|PUBD32)/ =~ l
|
|
|
|
SYM[$1] = true if /'(.*?)'/ =~ l
|
|
|
|
end
|
|
|
|
end
|
2002-06-10 21:27:48 -04:00
|
|
|
|
|
|
|
exports = []
|
|
|
|
if $name
|
|
|
|
exports << "Name " + $name
|
|
|
|
elsif $library
|
|
|
|
exports << "Library " + $library
|
|
|
|
end
|
|
|
|
exports << "Description " + $description.dump if $description
|
|
|
|
exports << "EXPORTS" << SYM.keys.sort
|
|
|
|
|
|
|
|
if $output
|
|
|
|
open($output, 'w') {|f| f.puts exports.join("\n")}
|
|
|
|
else
|
|
|
|
puts exports.join("\n")
|
|
|
|
end
|