C89 comments
Project: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/commit/4c77f01a Tree: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/tree/4c77f01a Diff: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/diff/4c77f01a Branch: refs/heads/master Commit: 4c77f01ada8af54b60a3f39989b42ea12ec4edd6 Parents: caf6539 Author: Nick Wellnhofer <[email protected]> Authored: Wed Nov 5 17:36:49 2014 +0100 Committer: Nick Wellnhofer <[email protected]> Committed: Wed Nov 5 17:36:49 2014 +0100 ---------------------------------------------------------------------- src/Charmonizer/Core/CLI.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/4c77f01a/src/Charmonizer/Core/CLI.c ---------------------------------------------------------------------- diff --git a/src/Charmonizer/Core/CLI.c b/src/Charmonizer/Core/CLI.c index 3038329..fd7e4e2 100644 --- a/src/Charmonizer/Core/CLI.c +++ b/src/Charmonizer/Core/CLI.c @@ -53,9 +53,9 @@ S_chaz_CLI_error(chaz_CLI *self, const char *pattern, ...) { static void S_chaz_CLI_rebuild_help(chaz_CLI *self) { int i; - size_t amount = 200; // Length of section headers. + size_t amount = 200; /* Length of section headers. */ - // Allocate space. + /* Allocate space. */ if (self->usage) { amount += strlen(self->usage); } @@ -79,7 +79,7 @@ S_chaz_CLI_rebuild_help(chaz_CLI *self) { self->help = (char*)malloc(amount); self->help[0] = '\0'; - // Accumulate "help" string. + /* Accumulate "help" string. */ if (self->usage) { strcat(self->help, self->usage); } @@ -180,14 +180,14 @@ chaz_CLI_register(chaz_CLI *self, const char *name, const char *help, int arg_required = !!(flags & CHAZ_CLI_ARG_REQUIRED); int arg_optional = !!(flags & CHAZ_CLI_ARG_OPTIONAL); - // Validate flags + /* Validate flags */ if (arg_required && arg_optional) { S_chaz_CLI_error(self, "Conflicting flags: value both optional " "and required"); return 0; } - // Insert new option. Keep options sorted by name. + /* Insert new option. Keep options sorted by name. */ for (rank = self->num_opts; rank > 0; rank--) { int comparison = strcmp(name, self->opts[rank - 1].name); if (comparison == 0) { @@ -209,7 +209,7 @@ chaz_CLI_register(chaz_CLI *self, const char *name, const char *help, self->opts[rank].defined = 0; self->opts[rank].value = NULL; - // Update `help` with new option. + /* Update `help` with new option. */ S_chaz_CLI_rebuild_help(self); return 1;
