[svn-upgrade] Integrating new upstream version, bti (014) upstream/014
authorgregor herrmann <gregoa@debian.org>
Sat, 14 Feb 2009 17:35:18 +0000 (17:35 -0000)
committergregor herrmann <gregoa@debian.org>
Sat, 14 Feb 2009 17:35:18 +0000 (17:35 -0000)
ChangeLog
Makefile
RELEASE-NOTES
bti.c

index bcff25de3f8152ab23863cfe5b80f2ff0caa017e..28226687d6bebca9c8d44d628d9a29a1f1189e42 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Summary of changes from v013 to v014
+============================================
+
+Greg Kroah-Hartman (1):
+      Fix readline bug(s)
+
+
 Summary of changes from v012 to v013
 ============================================
 
index 4e3b6f1d2b715015dc615a52229e61ec5e6470e6..d2c90313626836fe47396d23eabf0a7996e4b690 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@
 #
 #
 
-VERSION = 013
+VERSION = 014
 
 PROGRAM = bti
 
index 4861e0ac82e5b2c2a0ff4004b6d74c2c65d069a8..b5c8fa611273ca5ca2feb60165577b953cd7f988 100644 (file)
@@ -1,3 +1,7 @@
+bti 014
+=============
+Fix reported readline bugs
+
 bti 013
 =============
 Fix some readline prompt issues
diff --git a/bti.c b/bti.c
index b4af7f0a349db889ff868771961f7cfa701d727c..2f3b35a2d31c533f49d0b1dda7bbfe6d1ec48c7e 100644 (file)
--- a/bti.c
+++ b/bti.c
@@ -87,19 +87,6 @@ static void display_version(void)
        fprintf(stdout, "bti - version %s\n", BTI_VERSION);
 }
 
-static char *get_string_from_stdin(char *prompt)
-{
-       static char *string = (char *)NULL;
-       if (string) {
-               free(string);
-               string = (char *)NULL;
-       }
-
-       string = readline(prompt);
-
-       return string;
-}
-
 static struct session *session_alloc(void)
 {
        struct session *session;
@@ -513,18 +500,18 @@ int main(int argc, char *argv[], char *envp[])
 
        if (!session->account) {
                fprintf(stdout, "Enter twitter account: ");
-               session->account = get_string_from_stdin("");
+               session->account = readline(NULL);
        }
 
        if (!session->password) {
                fprintf(stdout, "Enter twitter password: ");
-               session->password = get_string_from_stdin("");
+               session->password = readline(NULL);
        }
 
        if (session->bash)
-               tweet = get_string_from_stdin("");
+               tweet = readline(NULL);
        else
-               tweet = get_string_from_stdin("tweet: ");
+               tweet = readline("tweet: ");
        if (!tweet || strlen(tweet) == 0) {
                dbg("no tweet?\n");
                return -1;