Skip to content

Merge 1.10.2 patch to stable#52

Merged
RobSanders merged 25 commits intostablefrom
patch_against_libcli_1_10_0_rel2
Sep 24, 2019
Merged

Merge 1.10.2 patch to stable#52
RobSanders merged 25 commits intostablefrom
patch_against_libcli_1_10_0_rel2

Conversation

@RobSanders
Copy link
Copy Markdown
Collaborator

Merge patch_against_libcli_1_10_0_rel2 into stable.
Branch was misnamed originally, but will be the 1.10.2 (release 1) branch when tagged.

RobSanders and others added 25 commits July 31, 2019 13:21
All help lines consist of the name and helpstr.  This treats allows each
line to be 'wrapped' and collimated so each partial piece of helpstr will
be left aligned with each other.  Wrapping is done assuming an 80 col width,
and if a line is wrapped it will attempt to split it at the last white
space in that segment.  If none found, then it prints what it can.  Then it
also breaks at the first '\n' or '\r'.

Additionally, for optarg help, we can have 'specific' help messages in
addition to the general help for the optarg.  Look at the clitest program
for an example (both 'triangle' and 'rectangle' have specific help msgs
for the 'shape' optarg.  These specific help messages are tab ('\t')
separated and occur after the general help message.  A specific message
will only be shown if 'could' be a match.
Rework slightly extended help - new comand for cleaner use
…r/validator, fix help messages for buildmode, and add dynamic help for buildmode unset
…uires API change to cli_register_optarg() and cli_optarg_addhelp()

Problem is that an optarg can be added multiple times but with different modes, but the addhelp only search for the first occurrance
of this optarg and added all help features there.  Fix is to change the apis for cli_register_optarg() and cli_option_addhelp()

- cli_register_optarg() now returns a 'cli_optarg *' instead of an int
- cli_optarg_addhelp() now called with (struct cli_optarg *, const char *helpname, const char *helptext)
- In order to have cli_optarg_addhelp() add the extra help text to the right
  optarg, the return value of cli_register_optarg() was changed from an int
  to a 'struct optarg *'
@RobSanders RobSanders merged commit 359ddb6 into stable Sep 24, 2019
@delete-merged-branch delete-merged-branch Bot deleted the patch_against_libcli_1_10_0_rel2 branch September 24, 2019 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants