File: OpenFlags.rb

package info (click to toggle)
libconstantine-java 0.7-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 860 kB
  • ctags: 4,468
  • sloc: java: 5,562; ruby: 976; xml: 683; makefile: 41
file content (32 lines) | stat: -rw-r--r-- 598 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
require 'gen/ConstGenerator'
def gen_openflags_java(options)
  ConstGenerator.new 'platform.openflags', options do |cg|
    cg.include "fcntl.h"
    cg.include "string.h"
    cg.type = :bitmask
    cg.unknown_range=[20000, 20999]
    consts = %w[
      O_RDONLY
      O_WRONLY
      O_RDWR
      O_ACCMODE
      O_NONBLOCK
      O_APPEND
      O_SYNC
      O_SHLOCK
      O_EXLOCK
      O_ASYNC
      O_FSYNC
      O_NOFOLLOW
      O_CREAT
      O_TRUNC
      O_EXCL
      O_EVTONLY
      O_DIRECTORY
      O_SYMLINK
      O_BINARY
      O_NOCTTY
    ]
    consts.each { |c| cg.const c }
  end
end