From 8df2078f08ad0abf3f50632ae783a997eb64b3be Mon Sep 17 00:00:00 2001 From: Charles Blake Date: Thu, 1 Sep 2016 08:33:39 -0400 Subject: [PATCH] Change type name to be more NEP-1-ish as per Araq request. --- lib/posix/termios.nim | 4 ++-- lib/pure/terminal.nim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/posix/termios.nim b/lib/posix/termios.nim index 88c3edf01d..f8de740d76 100644 --- a/lib/posix/termios.nim +++ b/lib/posix/termios.nim @@ -263,9 +263,9 @@ proc tcGetSid*(fd: cint): Pid {.importc: "tcgetsid", header: "".} # Window size ioctl. Should work on on any Unix that xterm has been ported to. var TIOCGWINSZ*{.importc, header: "".}: culong -type ioctl_winsize* {.importc: "struct winsize", header: "", +type IOctl_WinSize* {.importc: "struct winsize", header: "", final, pure.} = object ws_row*, ws_col*, ws_xpixel*, ws_ypixel*: cushort -proc ioctl*(fd: cint, request: culong, reply: ptr ioctl_winsize): int {. +proc ioctl*(fd: cint, request: culong, reply: ptr IOctl_WinSize): int {. importc: "ioctl", header: "", varargs.} diff --git a/lib/pure/terminal.nim b/lib/pure/terminal.nim index 63419114a4..4fdb04e4fd 100644 --- a/lib/pure/terminal.nim +++ b/lib/pure/terminal.nim @@ -156,7 +156,7 @@ else: proc terminalWidthIoctl*(fds: openArray[int]): int = ## Returns terminal width from first fd that supports the ioctl. - var win: ioctl_winsize + var win: IOctl_WinSize for fd in fds: if ioctl(cint(fd), TIOCGWINSZ, addr win) != -1: return int(win.ws_col)