[commit: ghc] master: rts: delint/detab/dewhitespace TTY.c (875f4c8)

git at git.haskell.org git at git.haskell.org
Mon Jul 28 14:34:36 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/875f4c8519345f83cdf179fa6c4c972440647192/ghc

>---------------------------------------------------------------

commit 875f4c8519345f83cdf179fa6c4c972440647192
Author: Austin Seipp <austin at well-typed.com>
Date:   Mon Jul 21 10:38:21 2014 -0500

    rts: delint/detab/dewhitespace TTY.c
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


>---------------------------------------------------------------

875f4c8519345f83cdf179fa6c4c972440647192
 rts/posix/TTY.c | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/rts/posix/TTY.c b/rts/posix/TTY.c
index d39ef37..2ce822a 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
@@ -48,18 +49,19 @@ resetTerminalSettings (void)
     // 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
 }



More information about the ghc-commits mailing list