Last change
on this file since 446 was 439, checked in by coas-nagasima, 4 years ago |
mrubyを2.1.1に更新
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-ruby;charset=UTF-8
|
File size:
328 bytes
|
Rev | Line | |
---|
[439] | 1 | #!/usr/bin/env ruby
|
---|
| 2 |
|
---|
| 3 | Dir.chdir(File.dirname($0))
|
---|
| 4 |
|
---|
| 5 | f = File.open("const.cstub", "w")
|
---|
| 6 |
|
---|
| 7 | IO.readlines("const.def").each { |name|
|
---|
| 8 | name.sub(/^#.*/, "")
|
---|
| 9 | name.strip!
|
---|
| 10 | next if name.empty?
|
---|
| 11 |
|
---|
| 12 | f.write <<CODE
|
---|
| 13 | #if defined(#{name})#{name.start_with?('IPPROTO_') ? ' || defined(_WINSOCKAPI_)' : ''}
|
---|
| 14 | define_const(#{name});
|
---|
| 15 | #endif
|
---|
| 16 | CODE
|
---|
| 17 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.