diff options
author | Paul Selkirk <paul@psgd.org> | 2016-06-16 16:05:32 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2016-06-16 20:53:05 -0400 |
commit | 7733c95be8a9e93ae4398c13c721b334239780fe (patch) | |
tree | 23167248232e093961cc1ef152a0b65e476ed688 /unixio.c | |
parent | 04d48e513f2094345eb697c0a34345daff63a87b (diff) |
Initial cleanup
Diffstat (limited to 'unixio.c')
-rw-r--r-- | unixio.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -39,6 +39,8 @@ and strip it from inbound characters. */ #include <stdio.h> +#include <stdlib.h> +#include <unistd.h> #include <sys/stat.h> #include <time.h> #include <errno.h> @@ -143,8 +145,8 @@ int pktmode(short on) { if (ttyfd < 0) /* Device must be open */ return(0); - system(on ? "stty raw -echo" : "stty sane"); /* Crude but effective */ - return(1); + return (system(on ? "stty raw -echo" : "stty sane") /* Crude but effective */ + ? 0 : 1); } |