attributeControl: document which constructors map to which terminal mode flags

This commit is contained in:
Jonathan Daugherty 2020-07-09 14:07:14 -07:00
parent 95cabe0b87
commit 620a5ca544

View File

@ -201,10 +201,13 @@ attributeControl fd = do
original <- getTerminalAttributes fd
let vtyMode = foldl withMode clearedFlags flagsToSet
clearedFlags = foldl withoutMode original flagsToUnset
flagsToSet = [ MapCRtoLF
flagsToSet = [ MapCRtoLF -- ICRNL
]
flagsToUnset = [ StartStopOutput, KeyboardInterrupts
, EnableEcho, ProcessInput, ExtendedFunctions
flagsToUnset = [ StartStopOutput -- IXON
, KeyboardInterrupts -- ISIG
, EnableEcho -- ECHO
, ProcessInput -- ICANON
, ExtendedFunctions -- IEXTEN
]
let setAttrs = setTerminalAttributes fd vtyMode Immediately
unsetAttrs = setTerminalAttributes fd original Immediately