x/xcbproto2go.rb
# outputs a type definition with a struct  
outputs a type definition with a struct
outputs a type definition with a struct
def struct(out, name, fields) 
  out.puts "\ntype #{name.ljust(PAD-2)} struct {"
  for field in fields do
    out.puts field 
  end
  out.puts "}\n\n"
end
def struct ( out , name , fields ) out . puts "\ntype #{name.ljust(PAD-2)} struct {" for field in fields do out . puts field end out . puts "}\n\n" end
outputs a type definition with a struct
outputs a type definition with a struct
out
<not_specific>
name
<not_specific>
fields
<not_specific>