X-Git-Url: https://git.saurik.com/apple/system_cmds.git/blobdiff_plain/8459d7254751dbe55e98bb49dd51e1796df2bb0d..c40d5e067506b677a9941a31cf3fadf56025c9a7:/getty.tproj/chat.c diff --git a/getty.tproj/chat.c b/getty.tproj/chat.c index 9094722..d79aae7 100644 --- a/getty.tproj/chat.c +++ b/getty.tproj/chat.c @@ -23,8 +23,10 @@ * For semi-intelligent modem handling. */ +#include + #ifndef lint -static const char rcsid[] = +__unused static const char rcsid[] = "$FreeBSD: src/libexec/getty/chat.c,v 1.11 2005/04/06 17:42:24 stefanf Exp $"; #endif /* not lint */ @@ -367,9 +369,9 @@ chat_expect(const char *str) } } alarm(0); - chat_unalarm(); - alarmed = 0; - free(got); + chat_unalarm(); + alarmed = 0; + free(got); } } @@ -401,13 +403,13 @@ chat_send(char const *str) unsigned char ch = (unsigned char)*str++; if (alarmed) - r = 3; + r = 3; else if (ch == PAUSE_CH) usleep(500000); /* 1/2 second */ else { usleep(10000); /* be kind to modem */ if (write(STDOUT_FILENO, &ch, 1) != 1) - r = alarmed ? 3 : 2; + r = alarmed ? 3 : 2; } } alarm(0);