lib/posix - Dropped 'T' from types
This commit is contained in:
parent
7616790515
commit
1c426c613c
4 changed files with 487 additions and 459 deletions
|
|
@ -12,14 +12,15 @@
|
||||||
# Get the platform-dependent flags.
|
# Get the platform-dependent flags.
|
||||||
# Structure describing an inotify event.
|
# Structure describing an inotify event.
|
||||||
type
|
type
|
||||||
Tinotify_event*{.pure, final, importc: "struct inotify_event",
|
InotifyEvent*{.pure, final, importc: "struct inotify_event",
|
||||||
header: "<sys/inotify.h>".} = object
|
header: "<sys/inotify.h>".} = object
|
||||||
wd*{.importc: "wd".}: cint # Watch descriptor.
|
wd*{.importc: "wd".}: cint # Watch descriptor.
|
||||||
mask*{.importc: "mask".}: uint32 # Watch mask.
|
mask*{.importc: "mask".}: uint32 # Watch mask.
|
||||||
cookie*{.importc: "cookie".}: uint32 # Cookie to synchronize two events.
|
cookie*{.importc: "cookie".}: uint32 # Cookie to synchronize two events.
|
||||||
len*{.importc: "len".}: uint32 # Length (including NULs) of name.
|
len*{.importc: "len".}: uint32 # Length (including NULs) of name.
|
||||||
name*{.importc: "name".}: char # Name.
|
name*{.importc: "name".}: char # Name.
|
||||||
|
{.deprecated: [Tinotify_event: InotifyEvent].}
|
||||||
|
|
||||||
# Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH.
|
# Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH.
|
||||||
const
|
const
|
||||||
IN_ACCESS* = 0x00000001 # File was accessed.
|
IN_ACCESS* = 0x00000001 # File was accessed.
|
||||||
|
|
@ -69,4 +70,4 @@ proc inotify_add_watch*(fd: cint; name: cstring; mask: uint32): cint{.
|
||||||
cdecl, importc: "inotify_add_watch", header: "<sys/inotify.h>".}
|
cdecl, importc: "inotify_add_watch", header: "<sys/inotify.h>".}
|
||||||
# Remove the watch specified by WD from the inotify instance FD.
|
# Remove the watch specified by WD from the inotify instance FD.
|
||||||
proc inotify_rm_watch*(fd: cint; wd: cint): cint{.cdecl,
|
proc inotify_rm_watch*(fd: cint; wd: cint): cint{.cdecl,
|
||||||
importc: "inotify_rm_watch", header: "<sys/inotify.h>".}
|
importc: "inotify_rm_watch", header: "<sys/inotify.h>".}
|
||||||
|
|
|
||||||
|
|
@ -24,5 +24,5 @@ const
|
||||||
|
|
||||||
# fn should be of type proc (a2: pointer): void {.cdecl.}
|
# fn should be of type proc (a2: pointer): void {.cdecl.}
|
||||||
proc clone*(fn: pointer; child_stack: pointer; flags: cint;
|
proc clone*(fn: pointer; child_stack: pointer; flags: cint;
|
||||||
arg: pointer; ptid: ptr TPid; tls: pointer;
|
arg: pointer; ptid: ptr Pid; tls: pointer;
|
||||||
ctid: ptr TPid): cint {.importc, header: "<sched.h>".}
|
ctid: ptr Pid): cint {.importc, header: "<sched.h>".}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -12,17 +12,18 @@ import posix
|
||||||
|
|
||||||
type
|
type
|
||||||
Speed* = cuint
|
Speed* = cuint
|
||||||
Tcflag* = cuint
|
Cflag* = cuint
|
||||||
|
{.deprecated: [Tcflag: Cflag].}
|
||||||
|
|
||||||
const
|
const
|
||||||
NCCS* = 32
|
NCCS* = 32
|
||||||
|
|
||||||
type
|
type
|
||||||
Termios* {.importc: "struct termios", header: "<termios.h>".} = object
|
Termios* {.importc: "struct termios", header: "<termios.h>".} = object
|
||||||
c_iflag*: Tcflag # input mode flags
|
c_iflag*: Cflag # input mode flags
|
||||||
c_oflag*: Tcflag # output mode flags
|
c_oflag*: Cflag # output mode flags
|
||||||
c_cflag*: Tcflag # control mode flags
|
c_cflag*: Cflag # control mode flags
|
||||||
c_lflag*: Tcflag # local mode flags
|
c_lflag*: Cflag # local mode flags
|
||||||
c_line*: cuchar # line discipline
|
c_line*: cuchar # line discipline
|
||||||
c_cc*: array[NCCS, cuchar] # control characters
|
c_cc*: array[NCCS, cuchar] # control characters
|
||||||
|
|
||||||
|
|
@ -258,4 +259,4 @@ proc tcFlow*(fd: cint; action: cint): cint {.importc: "tcflow",
|
||||||
header: "<termios.h>".}
|
header: "<termios.h>".}
|
||||||
# Get process group ID for session leader for controlling terminal FD.
|
# Get process group ID for session leader for controlling terminal FD.
|
||||||
|
|
||||||
proc tcGetSid*(fd: cint): TPid {.importc: "tcgetsid", header: "<termios.h>".}
|
proc tcGetSid*(fd: cint): Pid {.importc: "tcgetsid", header: "<termios.h>".}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue