char *tweet;
int retval;
int option;
+#if 0
char *home = getenv("HOME");
char *pwd = getenv("PWD");
char *dir;
-
+#endif
session = session_alloc();
if (!session) {
fprintf(stderr, "no more memory...\n");
fprintf(stdout, "Enter twitter password: ");
session->password = get_string_from_stdin();
}
-
+#if 0
/* get the current working directory basename */
if (strcmp(pwd, home) == 0)
dir = "~";
else
dir = "?";
}
-
+#endif
tweet = get_string_from_stdin();
if (strlen(tweet) == 0) {
dbg("no tweet?\n");
return -1;
}
- session->tweet = zalloc(strlen(tweet) + strlen(dir) + 10);
+// session->tweet = zalloc(strlen(tweet) + strlen(dir) + 10);
+ session->tweet = zalloc(strlen(tweet) + 10);
/* if --bash is specified, add the "PWD $ " to
* the start of the tweet. */
if (session->bash)
- sprintf(session->tweet, "%s $ %s", dir, tweet);
+// sprintf(session->tweet, "%s $ %s", dir, tweet);
+ sprintf(session->tweet, "$ %s", tweet);
else
sprintf(session->tweet, "%s", tweet);
free(tweet);