packages feed

terminal-size 0.3.2.1 → 0.3.3

raw patch · 4 files changed

+18/−6 lines, 4 files

Files

CHANGELOG.markdown view
@@ -1,3 +1,13 @@+0.3.3+=====++  * Fixed ioctl foreign import. (https://github.com/biegunka/terminal-size/pull/16)++  * `#alignment` is a hsc2hs built-in since some unspecified GHC 7.x. (https://github.com/biegunka/terminal-size/pull/12)++  * Captured possible `stty` stderr output with a pipe. (https://github.com/biegunka/terminal-size/pull/13)++ 0.3.2.1 ======= 
src/System/Console/Terminal/Posix.hsc view
@@ -1,3 +1,4 @@+{-# LANGUAGE CApiFFI #-}  module System.Console.Terminal.Posix   ( size, fdSize, hSize@@ -20,9 +21,9 @@ #include <sys/ioctl.h> #include <unistd.h> -+#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ < 800) #let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)-+#endif  -- Interesting part of @struct winsize@ data CWin = CWin CUShort CUShort@@ -51,8 +52,8 @@   handler :: IOError -> IO (Maybe (Window h))   handler _ = return Nothing -foreign import ccall "sys/ioctl.h ioctl"-  ioctl :: CInt -> CInt -> Ptr CWin -> IO CInt+foreign import capi "sys/ioctl.h ioctl"+  ioctl :: CInt -> CULong -> Ptr CWin -> IO CInt  size :: Integral n => IO (Maybe (Window n)) size = fdSize (Fd (#const STDOUT_FILENO))
src/System/Console/Terminal/Windows.hs view
@@ -42,6 +42,7 @@                 let stty = (shell "stty size") {                       std_in  = UseHandle stdin                     , std_out = CreatePipe+                    , std_err = CreatePipe                     }                 (_, mbStdout, _, rStty) <- createProcess stty                 exStty <- waitForProcess rStty
terminal-size.cabal view
@@ -1,5 +1,5 @@ name:                terminal-size-version:             0.3.2.1+version:             0.3.3 synopsis:            Get terminal window height and width description:   Get terminal window height and width without ncurses dependency.@@ -21,7 +21,7 @@ source-repository this   type:     git   location: https://github.com/biegunka/terminal-size-  tag:      0.3.2.1+  tag:      0.3.3  library   default-language: