source: EcnlProtoTool/trunk/mrbgems/mruby-socket/src/gen.rb@ 321

Last change on this file since 321 was 321, checked in by coas-nagasima, 7 years ago

文字コードを設定

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-ruby;charset=UTF-8
File size: 256 bytes
Line 
1#!/usr/bin/env ruby
2
3Dir.chdir(File.dirname($0))
4
5f = File.open("const.cstub", "w")
6
7IO.readlines("const.def").each { |name|
8 name.sub(/^#.*/, "")
9 name.strip!
10 next if name.empty?
11
12 f.write <<CODE
13#ifdef #{name}
14 define_const(#{name});
15#endif
16CODE
17}
Note: See TracBrowser for help on using the repository browser.