* Experimental text syntax parser/loader

* Added new text syntax parsing and loading from CLI
  * Unified text output functions to `xml2txt` and moved to clixon_text_syntax.[ch]
    * The following are removed: `cli_xml2txt` and `xml2txt_cb`
  * Text output format changed:
    * Namespace/modulename added to top-level
  * See [Support performant load_config_file(...) for TEXT format](https://github.com/clicon/clixon/issues/324)
This commit is contained in:
Olof hagsand 2022-05-19 12:56:44 +02:00
parent 43a57dad79
commit 2ece0b8f51
29 changed files with 1140 additions and 238 deletions

View file

@ -203,13 +203,16 @@ clixon_xvec_i(clixon_xvec *xv,
* Used in glue code between clixon_xvec code and cxobj **, size_t code, may go AWAY?
* @param[in] xv XML tree vector
* @param[out] xvec XML object vector
* @param[out] xlen Number of elements
* @param[out] xmax Length of allocated vector
* @retval 0 OK
* @retval -1 Error
*/
int
clixon_xvec_extract(clixon_xvec *xv,
cxobj ***xvec,
int *xlen)
int *xlen,
int *xmax)
{
int retval = -1;
@ -219,6 +222,8 @@ clixon_xvec_extract(clixon_xvec *xv,
}
*xvec = xv->xv_vec;
*xlen = xv->xv_len;
if (xmax)
*xmax = xv->xv_max;
if (xv->xv_vec != NULL){
xv->xv_len = 0;
xv->xv_max = 0;