Modify usage help text shown when Tinyproxy is run with -h

This commit is contained in:
Mukund Sivaraman 2009-09-26 12:30:54 +05:30
parent 1cdec54029
commit 2fd7417f56

View File

@ -118,32 +118,51 @@ display_license (void)
static void static void
display_usage (void) display_usage (void)
{ {
int features = 0;
printf ("Usage: %s [options]\n", PACKAGE); printf ("Usage: %s [options]\n", PACKAGE);
printf ("\ printf ("\n"
Options:\n\ "Options are:\n"
-d Operate in DEBUG mode.\n\ " -d Do not daemonize (run in foreground).\n"
-c FILE Use an alternate configuration file.\n\ " -c FILE Use an alternate configuration file.\n"
-h Display this usage information.\n\ " -h Display this usage information.\n"
-l Display the license.\n\ " -l Display the license.\n"
-v Display the version number.\n"); " -v Display version information.\n");
/* Display the modes compiled into tinyproxy */ /* Display the modes compiled into tinyproxy */
printf ("\nFeatures compiled in:\n"); printf ("\nFeatures compiled in:\n");
#ifdef XTINYPROXY_ENABLE #ifdef XTINYPROXY_ENABLE
printf (" XTinyproxy header\n"); printf (" XTinyproxy header\n");
features++;
#endif /* XTINYPROXY */ #endif /* XTINYPROXY */
#ifdef FILTER_ENABLE #ifdef FILTER_ENABLE
printf (" Filtering\n"); printf (" Filtering\n");
features++;
#endif /* FILTER_ENABLE */ #endif /* FILTER_ENABLE */
#ifndef NDEBUG #ifndef NDEBUG
printf (" Debugging code\n"); printf (" Debugging code\n");
features++;
#endif /* NDEBUG */ #endif /* NDEBUG */
#ifdef TRANSPARENT_PROXY #ifdef TRANSPARENT_PROXY
printf (" Transparent proxy support\n"); printf (" Transparent proxy support\n");
features++;
#endif /* TRANSPARENT_PROXY */ #endif /* TRANSPARENT_PROXY */
#ifdef REVERSE_SUPPORT #ifdef REVERSE_SUPPORT
printf (" Reverse proxy support\n"); printf (" Reverse proxy support\n");
features++;
#endif /* REVERSE_SUPPORT */ #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 static int