return string;
}
-void read_password(char *buf, size_t len)
+static void read_password(char *buf, size_t len)
{
char pwd[80];
+ int retval;
struct termios old;
struct termios tp;
fprintf(stdout, "Enter twitter password: ");
fflush(stdout);
tcflow(0, TCOOFF);
- scanf("%79s", pwd);
+ retval = scanf("%79s", pwd);
tcflow(0, TCOON);
fprintf(stdout, "\n");
goto exit;
}
+ if (!session->host) {
+ fprintf(stderr, "You need to provide a host either in ~/.bti or with --host.\n");
+ goto exit;
+ }
+
if (session->host == HOST_TWITTER && session->action == ACTION_GROUP) {
fprintf(stderr, "Groups only work in Identi.ca.\n");
goto exit;