From 0e56fe29a9afeee00e02e722496678df89d37d50 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 17 Nov 2009 13:59:39 +0200 Subject: Complete the implementation of the option documentation Add the man page generator. Port CLI usage, HTML documentation and the man page to the auto-generated version. Update examples and documentation. --- cli/source.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cli/source.cxx') diff --git a/cli/source.cxx b/cli/source.cxx index 4cfd425..f473665 100644 --- a/cli/source.cxx +++ b/cli/source.cxx @@ -188,7 +188,7 @@ namespace // If we have both the long and the short descriptions, use // the short one. Otherwise, use the first sentence from the - // long one. + // long one ubless --long-usage was specified. // string d; @@ -197,14 +197,14 @@ namespace if (doc.size () > 1) d = doc[0]; else if (doc.size () > 0) - d = frist_sentence (doc[0]); + d = options.long_usage () ? doc[0] : first_sentence (doc[0]); } else { if (doc.size () > 2) d = doc[1]; else if (doc.size () > 1) - d = frist_sentence (doc[1]); + d = options.long_usage () ? doc[1] : first_sentence (doc[1]); } // Format the documentation string. @@ -281,7 +281,7 @@ namespace } string - frist_sentence (string const& s) + first_sentence (string const& s) { size_t p (s.find ('.')); -- cgit v1.1