diff options
author | Austin Seipp <austin@well-typed.com> | 2014-07-21 10:38:21 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-07-28 09:29:12 -0500 |
commit | 875f4c8519345f83cdf179fa6c4c972440647192 (patch) | |
tree | b124b276d43952943a3d384ee740beb57727ae0f /rts/posix/TTY.c | |
parent | 3e0e489eec632a3a464eb2da166057f59fb9a274 (diff) | |
download | haskell-875f4c8519345f83cdf179fa6c4c972440647192.tar.gz |
rts: delint/detab/dewhitespace TTY.c
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'rts/posix/TTY.c')
-rw-r--r-- | rts/posix/TTY.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/rts/posix/TTY.c b/rts/posix/TTY.c index d39ef37b86..2ce822a99a 100644 --- a/rts/posix/TTY.c +++ b/rts/posix/TTY.c @@ -27,8 +27,9 @@ static void *saved_termios[3] = {NULL,NULL,NULL}; void* __hscore_get_saved_termios(int fd) { - return (0 <= fd && fd < (int)(sizeof(saved_termios) / sizeof(*saved_termios))) ? - saved_termios[fd] : NULL; + return (0 <= fd && + fd < (int)(sizeof(saved_termios) / sizeof(*saved_termios))) ? + saved_termios[fd] : NULL; } void @@ -47,19 +48,20 @@ resetTerminalSettings (void) // if we changed them. See System.Posix.Internals.tcSetAttr for // more details, including the reason we termporarily disable // SIGTTOU here. - { - int fd; - sigset_t sigset, old_sigset; - sigemptyset(&sigset); - sigaddset(&sigset, SIGTTOU); - sigprocmask(SIG_BLOCK, &sigset, &old_sigset); - for (fd = 0; fd <= 2; fd++) { - struct termios* ts = (struct termios*)__hscore_get_saved_termios(fd); - if (ts != NULL) { - tcsetattr(fd,TCSANOW,ts); - } - } - sigprocmask(SIG_SETMASK, &old_sigset, NULL); + { + int fd; + sigset_t sigset, old_sigset; + sigemptyset(&sigset); + sigaddset(&sigset, SIGTTOU); + sigprocmask(SIG_BLOCK, &sigset, &old_sigset); + for (fd = 0; fd <= 2; fd++) { + struct termios* ts = + (struct termios*)__hscore_get_saved_termios(fd); + if (ts != NULL) { + tcsetattr(fd,TCSANOW,ts); + } + } + sigprocmask(SIG_SETMASK, &old_sigset, NULL); } #endif } |