summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjeffschroed <jeffschroed@c587cffe-e639-0410-9787-d7902ae8ed56>2008-01-23 05:07:11 +0000
committerjeffschroed <jeffschroed@c587cffe-e639-0410-9787-d7902ae8ed56>2008-01-23 05:07:11 +0000
commite30f5e079efda7729ab68bba27e93b9b44af6393 (patch)
treeabb4cd0a3fbfdeb07272f9878f8da985de73b216
parent49b3ea296565f0f5982b255a12e6ffc13b013766 (diff)
downloadlibproxy-jeff-dev.tar.gz
Version of proxy.c that compiles with gcc -std=c89jeff-dev
git-svn-id: http://libproxy.googlecode.com/svn/branches/jeff-dev@217 c587cffe-e639-0410-9787-d7902ae8ed56
-rw-r--r--src/bin/proxy.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bin/proxy.c b/src/bin/proxy.c
index 225948f..7dc9652 100644
--- a/src/bin/proxy.c
+++ b/src/bin/proxy.c
@@ -41,7 +41,8 @@ readline(int fd)
/* For each character received add it to the buffer unless it is a newline */
char *buffer = NULL;
- for (int i=1; i > 0 ; i++)
+ int i;
+ for (i = 1; i > 0 ; i++)
{
char c;
@@ -76,7 +77,8 @@ main(int argc, char **argv)
}
/* For each URL we read on STDIN, get the proxies to use */
- for (char *url = NULL ; url = readline(STDIN) ; free(url))
+ char *url;
+ for (*url = NULL ; url = readline(STDIN) ; free(url))
{
/*
* Get an array of proxies to use. These should be used
@@ -84,7 +86,8 @@ main(int argc, char **argv)
* if the first one fails (etc).
*/
char **proxies = px_proxy_factory_get_proxies(pf, url);
- for (int i = 0 ; proxies[i] ; i++)
+ int i;
+ for (i = 0 ; proxies[i] ; i++)
{
printf(proxies[i]);
if (proxies[i+1])