Skip to content

Fixed documentation: updated tutorial to match the CLIgen 7.9 API - #150

Open
precla wants to merge 1 commit into
clicon:masterfrom
precla:doc_fix
Open

precla wants to merge 1 commit into
clicon:masterfrom
precla:doc_fix

Conversation

@precla

@precla precla commented Oct 20, 2026 •

Copy link
Copy Markdown

Corrected the tutorial against the current headers and parser behaviour:

  • Bumped manual version to 7.9 and date to October 2026
  • Fixed API examples: clispec_parse_file(), cliread_eval() with result/reason out-parameters and CG_MULTIPLE, expand_cb, str2fn, mapper and history_cb signatures, cv_void_get(), cligen_regex_xsd_set()
  • Fixed cv accessor table: pointer types for ipv4/ipv6 addresses, char for bool, uint8_t for masklen, char* for mac, unsigned char* for uuid
  • Labels are read via cligen_co_match(h)->co_cvec, replacing the non-existent cligen_labels_get()
  • Updated preference table to the COV_PREF_* values: integers with ranges have the same preference as integers without ranges
  • CLIGEN_TABMODE_SHOW is off by default
  • hide is the only local variable; added pipetree as a global variable
  • Fixed spec examples: missing ';' after prompt, unbalanced quote and '>', regexp escaping, and the commands accepted by "aa [[bb] cc]"
  • Fixed typos
  • Regenerated cligen_tutorial.pdf

Also updated the stale preference comments in cov_pref() in cligen_object.c to match the COV_PREF_* values.

Assisted with AI

Corrected the tutorial against the current headers and parser behaviour:

* Bumped manual version to 7.9 and date to October 2026
* Fixed API examples: clispec_parse_file(), cliread_eval() with
  result/reason out-parameters and CG_MULTIPLE, expand_cb, str2fn,
  mapper and history_cb signatures, cv_void_get(), cligen_regex_xsd_set()
* Fixed cv accessor table: pointer types for ipv4/ipv6 addresses,
  char for bool, uint8_t for masklen, char* for mac, unsigned char* for uuid
* Labels are read via cligen_co_match(h)->co_cvec, replacing the
  non-existent cligen_labels_get()
* Updated preference table to the COV_PREF_* values: integers with
  ranges have the same preference as integers without ranges
* CLIGEN_TABMODE_SHOW is off by default
* hide is the only local variable; added pipetree as a global variable
* Fixed spec examples: missing ';' after prompt, unbalanced quote
  and '>', regexp escaping, and the commands accepted by "aa [[bb] cc]"
* Fixed typos
* Regenerated cligen_tutorial.pdf

Also updated the stale preference comments in cov_pref() in
cligen_object.c to match the COV_PREF_* values.

Signed-off-by: Antonio Prcela <antonio.prcela@gmail.com>
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.

1 participant