From 7b73a94afc3ff604fab6daab58d2b3eabddf70ca Mon Sep 17 00:00:00 2001 From: Charles Blake Date: Thu, 1 Sep 2016 07:54:17 -0400 Subject: [PATCH] Oops - L_ctermid must be a global var to compile. --- lib/pure/terminal.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pure/terminal.nim b/lib/pure/terminal.nim index 329c50f3ee..90be431301 100644 --- a/lib/pure/terminal.nim +++ b/lib/pure/terminal.nim @@ -162,11 +162,11 @@ else: return int(win.ws_col) return 0 + var L_ctermid{.importc, header: "".}: cint proc terminalWidth*(): int = - ## Returns **some** reasonable terminal width from either standard file + ## Returns some reasonable terminal width from either standard file ## descriptors, controlling terminal, environment variables or tradition. - var L_ctermid{.importc, header: "".}: cint var w = terminalWidthIoctl([0, 1, 2]) #Try standard file descriptors if w > 0: return w var cterm = newString(L_ctermid) #Try controlling tty