summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMukund Sivaraman <muks@banu.com>2009-09-26 12:30:54 +0530
committerMukund Sivaraman <muks@banu.com>2009-09-27 08:09:24 +0530
commit2fd7417f56871f1e195bdd7c1a564e03e9009f42 (patch)
tree7c6a2a9d99de10f9794dc5b756cfe568682f8083
parent1cdec540290a9b739812982e96a37e8366fa49c4 (diff)
downloadtinyproxy-2fd7417f56871f1e195bdd7c1a564e03e9009f42.tar.gz
tinyproxy-2fd7417f56871f1e195bdd7c1a564e03e9009f42.zip
Modify usage help text shown when Tinyproxy is run with -h
-rw-r--r--src/main.c33
1 files changed, 26 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c
index 4b0c2c2..89c143a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -118,32 +118,51 @@ display_license (void)
static void
display_usage (void)
{
+ int features = 0;
+
printf ("Usage: %s [options]\n", PACKAGE);
- printf ("\
-Options:\n\
- -d Operate in DEBUG mode.\n\
- -c FILE Use an alternate configuration file.\n\
- -h Display this usage information.\n\
- -l Display the license.\n\
- -v Display the version number.\n");
+ printf ("\n"
+ "Options are:\n"
+ " -d Do not daemonize (run in foreground).\n"
+ " -c FILE Use an alternate configuration file.\n"
+ " -h Display this usage information.\n"
+ " -l Display the license.\n"
+ " -v Display version information.\n");
/* Display the modes compiled into tinyproxy */
printf ("\nFeatures compiled in:\n");
+
#ifdef XTINYPROXY_ENABLE
printf (" XTinyproxy header\n");
+ features++;
#endif /* XTINYPROXY */
+
#ifdef FILTER_ENABLE
printf (" Filtering\n");
+ features++;
#endif /* FILTER_ENABLE */
+
#ifndef NDEBUG
printf (" Debugging code\n");
+ features++;
#endif /* NDEBUG */
+
#ifdef TRANSPARENT_PROXY
printf (" Transparent proxy support\n");
+ features++;
#endif /* TRANSPARENT_PROXY */
+
#ifdef REVERSE_SUPPORT
printf (" Reverse proxy support\n");
+ features++;
#endif /* REVERSE_SUPPORT */
+
+ if (0 == features)
+ printf (" None\n");
+
+ printf ("\n"
+ "For bug reporting instructions, please see:\n"
+ "<https://www.banu.com/tinyproxy/support/>.\n");
}
static int