mirror of
https://github.com/ilyakooo0/vty.git
synced 2024-11-25 19:22:08 +03:00
extra improvements
This commit is contained in:
parent
d3a1a5576a
commit
f2c58a1870
@ -14,4 +14,4 @@ utf8FromIso :: [Int] -> [Word8]
|
||||
utf8FromIso = encode . map toEnum
|
||||
|
||||
ppUtf8 :: [Int] -> IO ()
|
||||
ppUtf8 = print . map (($ "") . showHex) . utf8FromIso
|
||||
ppUtf8 = print . map (`showHex` "") . utf8FromIso
|
||||
|
@ -137,7 +137,7 @@ readFromDevice = do
|
||||
threadWaitRead fd
|
||||
bytesRead <- fdReadBuf fd bufferPtr (fromIntegral maxBytes)
|
||||
if bytesRead > 0
|
||||
then (map $ chr . fromIntegral) <$> peekArray (fromIntegral bytesRead) bufferPtr
|
||||
then map (chr . fromIntegral) <$> peekArray (fromIntegral bytesRead) bufferPtr
|
||||
else return []
|
||||
when (not $ null stringRep) $ logMsg $ "input bytes: " ++ show stringRep
|
||||
return stringRep
|
||||
|
Loading…
Reference in New Issue
Block a user