packages feed

ztail 1.2.0.3 → 1.2.0.4

raw patch · 3 files changed

+19/−6 lines, 3 filesdep ~timedep ~unix

Dependency ranges changed: time, unix

Files

Main.hs view
@@ -154,6 +154,9 @@   , Opt.Option "c" ["color"]       (Opt.ReqArg (add_action . ActionColor . parseColor) "COLOR")       (" display (matching) lines in COLOR (valid colors are: normal, bo,ul,bl,rev, nobo,noul..., black,red,green,yellow,blue,magenta,cyan,white, /black,/red,...)")+  , Opt.Option "B" ["bell"]+      (Opt.NoArg (add_action $ ActionSubst "\a\\_"))+      (" send a beep for every (matching) line (same as -h '\\a')")   , Opt.Option "d" ["hide"]       (Opt.NoArg (add_action ActionHide))       (" hide (matching) lines")
TailHandle.hs view
@@ -27,6 +27,9 @@ import System.Posix.Directory (DirStream, readDirStream, rewindDirStream) import System.Posix.Files (getFileStatus, getFdStatus, isRegularFile, isNamedPipe, isSocket, isCharacterDevice, isDirectory, fileID, fileSize) import System.Posix.IO (openFd, OpenMode(ReadOnly), OpenFileFlags(..), fdReadBuf, fdSeek, setFdOption, FdOption(NonBlockingRead), closeFd)+#if MIN_VERSION_unix(2,8,0)+import System.Posix.IO (defaultFileFlags)+#endif import System.Posix.Types (Fd(..), FileOffset, FileID) import Unsafe.Coerce (unsafeCoerce) @@ -165,9 +168,16 @@   get (TailFd fd) = got (Just fd)   get (TailPath path) = got =<<     catchDoesNotExist (-      openFd path ReadOnly Nothing OpenFileFlags{-	append = False, exclusive = False, noctty = False, nonBlock = True, trunc = False-      })+      openFd path ReadOnly+#if MIN_VERSION_unix(2,8,0)+        defaultFileFlags+#else+        Nothing+        OpenFileFlags+#endif+        {+          append = False, exclusive = False, noctty = False, nonBlock = True, trunc = False+        })   got Nothing = thErrMsg th "No such file or directory" $> th{ thPos = 0 }    got (Just fd) = do     setFdOption fd NonBlockingRead True -- is this really necessary?
ztail.cabal view
@@ -1,5 +1,5 @@ Name:		ztail-Version:	1.2.0.3+Version:	1.2.0.4 Author:		Dylan Simon Maintainer:     dylan@dylex.net License:        BSD3@@ -27,8 +27,8 @@     GHC-Options:        -Wall -fno-warn-tabs     Build-Depends:         base >= 4.9 && < 5,-        unix == 2.7.*,-        time >= 1.5 && < 1.12,+        unix >= 2.7 && < 2.9,+        time >= 1.5 && < 1.13,         process >= 1.2 && < 1.7,         array == 0.5.*,         filepath == 1.4.*,