Repository: lucy-charmonizer
Updated Branches:
  refs/heads/master 9ad0470af -> 3c4bdd891


Fix help message


Project: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/commit/2ef470a6
Tree: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/tree/2ef470a6
Diff: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/diff/2ef470a6

Branch: refs/heads/master
Commit: 2ef470a6ef3063e239e0cce51fe50e4a36112b8b
Parents: 9ad0470
Author: Nick Wellnhofer <[email protected]>
Authored: Sat Dec 27 15:34:42 2014 +0100
Committer: Nick Wellnhofer <[email protected]>
Committed: Sat Dec 27 15:34:42 2014 +0100

----------------------------------------------------------------------
 src/Charmonizer/Core/CLI.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/2ef470a6/src/Charmonizer/Core/CLI.c
----------------------------------------------------------------------
diff --git a/src/Charmonizer/Core/CLI.c b/src/Charmonizer/Core/CLI.c
index 4901e34..4346ac3 100644
--- a/src/Charmonizer/Core/CLI.c
+++ b/src/Charmonizer/Core/CLI.c
@@ -96,7 +96,7 @@ S_chaz_CLI_rebuild_help(chaz_CLI *self) {
     }
     strcat(self->help, "\n");
     if (self->num_opts) {
-        strcat(self->help, "\nOptional arguments:\n");
+        strcat(self->help, "\nArguments:\n");
         for (i = 0; i < self->num_opts; i++) {
             chaz_CLIOption *opt = &self->opts[i];
             size_t line_start = strlen(self->help);
@@ -115,7 +115,7 @@ S_chaz_CLI_rebuild_help(chaz_CLI *self) {
                     self->help[current_len++] = toupper(opt->name[j]);
                 }
                 if (opt->flags & CHAZ_CLI_ARG_OPTIONAL) {
-                    strcat(self->help, "]");
+                    self->help[current_len++] = ']';
                 }
                 self->help[current_len] = '\0';
             }

Reply via email to