From 8971afee489a6a2570e3a7f7e84449426f116ec3 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 19 May 2008 16:25:20 -0700 Subject: [PATCH] add the '$ ' to the beginning of the line. --- bti.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bti.c b/bti.c index 11ba091..a1eb454 100644 --- a/bti.c +++ b/bti.c @@ -299,6 +299,7 @@ int main(int argc, char *argv[], char *envp[]) { } }; struct session *session; + char *tweet; int retval; int option; @@ -354,7 +355,12 @@ int main(int argc, char *argv[], char *envp[]) session->password = get_string_from_stdin(); } - session->tweet = get_string_from_stdin(); + /* Add the "$ " to the start of the tweet to show it's coming from + * a shell */ + tweet = get_string_from_stdin(); + session->tweet = zalloc(strlen(tweet) + 10); + sprintf(session->tweet, "$ %s", tweet); + free(tweet); if (strlen(session->tweet) == 0) { dbg("no tweet?\n"); @@ -370,6 +376,7 @@ int main(int argc, char *argv[], char *envp[]) fprintf(stderr, "tweet failed\n"); return -1; } + //printf("tweet = %s\n", session->tweet); session_free(session); exit: -- 2.39.5