diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-11-17 13:59:39 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-11-17 13:59:39 +0200 |
commit | 0e56fe29a9afeee00e02e722496678df89d37d50 (patch) | |
tree | ada5f6ea6978344f2e75e6194d65a1191cc6e649 /cli/source.cxx | |
parent | 577a38358b295379511ea8bb130ef1dcb7157c0f (diff) |
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.
Diffstat (limited to 'cli/source.cxx')
-rw-r--r-- | cli/source.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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 ('.')); |