Libcli provides a shared library for including a Cisco-like command-line interface into other software. It's a telnet interface which supports command-line editing, history, authentication and callbacks for a user-definable function tree.
Added new 'CLI_CMD_SPOT_CHECK' optarg to allow for sanity checking of required optargs before proceeding with command line evaluation. The developer would insert a spot check before any place in the evaluation of arguments where evaluation should not continue if the required optarg state is incorrect.
The clitest.c program show this. Before entering the 'shape' optarg we need to have at least one of 'transparent' and 'color' set, but we can not have 'transparent' if 'color' is set to 'black'.
Added show/unset to the restricted commands when trying to enter buildmode, and made some comment changes.
Added new 'CLI_CMD_SPOT_CHECK' optarg to allow for sanity checking of required optargs before proceeding with command line evaluation. The developer would insert a spot check before any place in the evaluation of arguments where evaluation should not continue if the required optarg state is incorrect.
The clitest.c program show this. Before entering the 'shape' optarg we need to have at least one of 'transparent' and 'color' set, but we can not have 'transparent' if 'color' is set to 'black'. Added show/unset to the restricted commands when trying to enter buildmode, and made some comment changes.