home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / palmos / pippy-0.6beta-src.tar.gz / pippy-0.6beta-src.tar / pippy-0.6beta-src / src / Lib / plat-freebsd2 / FCNTL.py next >
Text File  |  2000-12-21  |  2KB  |  111 lines

  1. # Generated by h2py from /usr/include/fcntl.h
  2.  
  3. # Included from sys/types.h
  4.  
  5. # Included from sys/cdefs.h
  6. def __P(protos): return protos         
  7.  
  8. def __STRING(x): return #x         
  9.  
  10. def __XSTRING(x): return __STRING(x)     
  11.  
  12. def __P(protos): return ()         
  13.  
  14. def __STRING(x): return "x"
  15.  
  16. def __RCSID(s): return __IDSTRING(rcsid,s)
  17.  
  18. def __RCSID_SOURCE(s): return __IDSTRING(rcsid_source,s)
  19.  
  20. def __COPYRIGHT(s): return __IDSTRING(copyright,s)
  21.  
  22.  
  23. # Included from machine/ansi.h
  24. _BSD_PTRDIFF_T_ = int
  25. _BSD_SSIZE_T_ = int
  26. _BSD_TIME_T_ = long
  27. _BSD_CT_RUNE_T_ = int
  28. _BSD_PID_T_ = int
  29. _BSD_CLK_TCK_ = 128
  30. _BSD_CLOCKS_PER_SEC_ = 128
  31.  
  32. # Included from machine/types.h
  33. def major(x): return ((int)(((u_int)(x) >> 8)&0xff))     
  34.  
  35. def minor(x): return ((int)((x)&0xffff00ff))         
  36.  
  37.  
  38. # Included from machine/endian.h
  39. _QUAD_HIGHWORD = 1
  40. _QUAD_LOWWORD = 0
  41. LITTLE_ENDIAN = 1234
  42. BIG_ENDIAN = 4321
  43. PDP_ENDIAN = 3412
  44. BYTE_ORDER = LITTLE_ENDIAN
  45. def __word_swap_long(x): return \
  46.  
  47. def __byte_swap_long(x): return \
  48.  
  49. def __byte_swap_word(x): return \
  50.  
  51. def __byte_swap_long(x): return \
  52.  
  53. def __byte_swap_word(x): return \
  54.  
  55. ntohl = __byte_swap_long
  56. ntohs = __byte_swap_word
  57. htonl = __byte_swap_long
  58. htons = __byte_swap_word
  59. NBBY = 8
  60. FD_SETSIZE = 256
  61. O_RDONLY = 0x0000
  62. O_WRONLY = 0x0001
  63. O_RDWR = 0x0002
  64. O_ACCMODE = 0x0003
  65. FREAD = 0x0001
  66. FWRITE = 0x0002
  67. O_NONBLOCK = 0x0004
  68. O_APPEND = 0x0008
  69. O_SHLOCK = 0x0010
  70. O_EXLOCK = 0x0020
  71. O_ASYNC = 0x0040
  72. O_FSYNC = 0x0080
  73. O_CREAT = 0x0200
  74. O_TRUNC = 0x0400
  75. O_EXCL = 0x0800
  76. FMARK = 0x1000
  77. FDEFER = 0x2000
  78. FHASLOCK = 0x4000
  79. O_NOCTTY = 0x8000
  80. def FFLAGS(oflags): return ((oflags) + 1)
  81.  
  82. def OFLAGS(fflags): return ((fflags) - 1)
  83.  
  84. FAPPEND = O_APPEND
  85. FASYNC = O_ASYNC
  86. FFSYNC = O_FSYNC
  87. FNONBLOCK = O_NONBLOCK
  88. FNDELAY = O_NONBLOCK
  89. O_NDELAY = O_NONBLOCK
  90. F_DUPFD = 0
  91. F_GETFD = 1
  92. F_SETFD = 2
  93. F_GETFL = 3
  94. F_SETFL = 4
  95. F_GETOWN = 5
  96. F_SETOWN = 6
  97. F_GETLK = 7
  98. F_SETLK = 8
  99. F_SETLKW = 9
  100. FD_CLOEXEC = 1
  101. F_RDLCK = 1
  102. F_UNLCK = 2
  103. F_WRLCK = 3
  104. F_WAIT = 0x010
  105. F_FLOCK = 0x020
  106. F_POSIX = 0x040
  107. LOCK_SH = 0x01
  108. LOCK_EX = 0x02
  109. LOCK_NB = 0x04
  110. LOCK_UN = 0x08
  111.