From e4dacb2f6f7863b11e2db1cb4ef4ef61864e388d Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 22 Mar 2014 21:24:21 +0900 Subject: [PATCH] nghttpd: Use raw-string literal to output help --- src/nghttpd.cc | 86 ++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/src/nghttpd.cc b/src/nghttpd.cc index d7098872..714ceb63 100644 --- a/src/nghttpd.cc +++ b/src/nghttpd.cc @@ -93,50 +93,48 @@ namespace { void print_help(std::ostream& out) { print_usage(out); - out << "\n" - << " Specify listening port number.\n" - << " Set path to server's private key. Required\n" - << " unless --no-tls is specified.\n" - << " Set path to server's certificate. Required\n" - << " unless --no-tls is specified.\n" - << "\n" - << "Options:\n" - << " -D, --daemon Run in a background. If -D is used, the\n" - << " current working directory is changed to '/'.\n" - << " Therefore if this option is used, -d option\n" - << " must be specified.\n" - << " -V, --verify-client\n" - << " The server sends a client certificate\n" - << " request. If the client did not return a\n" - << " certificate, the handshake is terminated.\n" - << " Currently, this option just requests a\n" - << " client certificate and does not verify it.\n" - << " -d, --htdocs=\n" - << " Specify document root. If this option is\n" - << " not specified, the document root is the\n" - << " current working directory.\n" - << " -v, --verbose Print debug information such as reception/\n" - << " transmission of frames and name/value pairs.\n" - << " --no-tls Disable SSL/TLS.\n" - << " -c, --header-table-size=\n" - << " Specify decoder header table size.\n" - << " --color Force colored log output.\n" - << " -p, --push==\n" - << " Push resources PUSH_PATHs when PATH is\n" - << " requested. This option can be used\n" - << " repeatedly to specify multiple push\n" - << " configurations. For example,\n" - << " -p/=/foo.png -p/doc=/bar.css\n" - << " PATH and PUSH_PATHs are relative to document\n" - << " root. See --htdocs option.\n" - << " -b, --padding= Add at most bytes to a frame payload as\n" - << " padding. Specify 0 to disable padding.\n" - << " -n, --workers=\n" - << " Set the number of worker threads.\n" - << " Default: 1\n" - << " -e, --error-gzip Make error response gzipped.\n" - << " --version Display version information and exit.\n" - << " -h, --help Display this help and exit.\n" + out << R"( + Specify listening port number. + Set path to server's private key. Required + unless --no-tls is specified. + Set path to server's certificate. Required + unless --no-tls is specified. +Options: + -D, --daemon Run in a background. If -D is used, the current + working directory is changed to '/'. Therefore + if this option is used, -d option must be + specified. + -V, --verify-client + The server sends a client certificate request. + If the client did not return a certificate, the + handshake is terminated. Currently, this option + just requests a client certificate and does not + verify it. + -d, --htdocs= + Specify document root. If this option is not + specified, the document root is the current + working directory. + -v, --verbose Print debug information such as reception/ + transmission of frames and name/value pairs. + --no-tls Disable SSL/TLS. + -c, --header-table-size= + Specify decoder header table size. + --color Force colored log output. + -p, --push== + Push resources s when is + requested. This option can be used repeatedly to + specify multiple push configurations. and + s are relative to document root. See + --htdocs option. Example: -p/=/foo.png + -p/doc=/bar.css + -b, --padding= Add at most bytes to a frame payload as + padding. Specify 0 to disable padding. + -n, --workers= + Set the number of worker threads. + Default: 1 + -e, --error-gzip Make error response gzipped. + --version Display version information and exit. + -h, --help Display this help and exit.)" << std::endl; } } // namespace