From 87e07c58b956f50cc92e7614b17a685c57bf75d2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 11 Jan 2009 14:52:19 -0800 Subject: [PATCH] add --proxy support to command line I documented it before I added it... --- bti.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bti.c b/bti.c index f3fc64c..9d37103 100644 --- a/bti.c +++ b/bti.c @@ -351,6 +351,7 @@ int main(int argc, char *argv[], char *envp[]) { "account", 1, NULL, 'a' }, { "password", 1, NULL, 'p' }, { "host", 1, NULL, 'H' }, + { "proxy", 1, NULL, 'P' }, { "help", 0, NULL, 'h' }, { "bash", 0, NULL, 'b' }, { "version", 0, NULL, 'v' }, @@ -376,7 +377,7 @@ int main(int argc, char *argv[], char *envp[]) parse_configfile(session); while (1) { - option = getopt_long_only(argc, argv, "dqe:p:H:a:h", + option = getopt_long_only(argc, argv, "dqe:p:P:H:a:h", options, NULL); if (option == -1) break; @@ -396,6 +397,12 @@ int main(int argc, char *argv[], char *envp[]) session->password = strdup(optarg); dbg("password = %s\n", session->password); break; + case 'P': + if (session->proxy) + free(session->proxy); + session->proxy = strdup(optarg); + dbg("proxy = %s\n", session->proxy); + break; case 'H': if (strcasecmp(optarg, "twitter") == 0) session->host = HOST_TWITTER; -- 2.39.5