Mercurial > ~mikael > mcabber > hg
diff mcabber/src/main.c @ 28:0cd8025eebee
[/trunk] Changeset 44 by mikael
* Some more fixes.
* We can now build with GNU99 gcc extensions.
author | mikael |
---|---|
date | Mon, 28 Mar 2005 10:36:47 +0000 |
parents | 77e6bd2ccde6 |
children | 86837ff0554c |
line wrap: on
line diff
--- a/mcabber/src/main.c Mon Mar 28 09:18:01 2005 +0000 +++ b/mcabber/src/main.c Mon Mar 28 10:36:47 2005 +0000 @@ -4,6 +4,7 @@ #include <string.h> #include <signal.h> #include <termios.h> +#include <getopt.h> #include "utils.h" #include "screen.h" @@ -42,18 +43,18 @@ int nread; /* Turn echoing off and fail if we can't. */ - if (tcgetattr(fileno (stdin), &orig) != 0) + if (tcgetattr(fileno(stdin), &orig) != 0) return -1; new = orig; new.c_lflag &= ~ECHO; - if (tcsetattr(fileno (stdin), TCSAFLUSH, &new) != 0) + if (tcsetattr(fileno(stdin), TCSAFLUSH, &new) != 0) return -1; /* Read the password. */ nread = getline(passstr, n, stdin); /* Restore terminal. */ - (void) tcsetattr(fileno (stdin), TCSAFLUSH, &orig); + (void) tcsetattr(fileno(stdin), TCSAFLUSH, &orig); return (ssize_t)nread; }