diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-09-01 14:59:10 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-09-01 14:59:10 +0000 |
commit | a045bd2fd0eec255d59e94ac735e3096da56bfc7 (patch) | |
tree | 5d2398a23f5bfa85d6ea967969f36b1e419a9568 /usr.bin/mg/spawn.c | |
parent | 58c021b47d6326c960010c7261da73856d613f4b (diff) |
More -Wall anmd KNF, from op2@tomahawk.SQUiSH.org
Diffstat (limited to 'usr.bin/mg/spawn.c')
-rw-r--r-- | usr.bin/mg/spawn.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/usr.bin/mg/spawn.c b/usr.bin/mg/spawn.c index e8708064522..c8e2c99020c 100644 --- a/usr.bin/mg/spawn.c +++ b/usr.bin/mg/spawn.c @@ -2,22 +2,24 @@ * Spawn. Actually just suspends Mg. * Assumes POSIX job control. */ -#include "def.h" -#include <signal.h> -#include <termios.h> -#include <term.h> +#include "def.h" + +#include <signal.h> +#include <termios.h> +#include <term.h> /* - * This causes mg to send itself a stop signal. - * Assumes the parent shell supports POSIX job control. - * If the terminal supports an alternate screen, we will sitch to it. + * This causes mg to send itself a stop signal. It assumes the parent + * shell supports POSIX job control. If the terminal supports an alternate + * screen, we will switch to it. */ /* ARGSUSED */ +int spawncli(f, n) + int f, n; { - sigset_t oset; - int ttputc __P((int)); /* XXX */ + sigset_t oset; /* Very similar to what vttidy() does. */ ttcolor(CTEXT); @@ -28,13 +30,17 @@ spawncli(f, n) epresf = FALSE; } if (ttcooked() == FALSE) - return (FALSE); - tttidy(); /* Exit application mode and tidy. */ + return(FALSE); + + /* Exit application mode and tidy. */ + tttidy(); ttflush(); - (void) sigprocmask(SIG_SETMASK, NULL, &oset); - (void) kill(0, SIGTSTP); - (void) sigprocmask(SIG_SETMASK, &oset, NULL); + (void)sigprocmask(SIG_SETMASK, NULL, &oset); + (void)kill(0, SIGTSTP); + (void)sigprocmask(SIG_SETMASK, &oset, NULL); ttreinit(); - sgarbf = TRUE; /* Force repaint. */ + + /* Force repaint. */ + sgarbf = TRUE; return ttraw(); } |