From 25245a12d202d02a6c4b067f24a1ba54e00b4c3f Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Sun, 12 Jul 2020 10:59:12 +0200 Subject: [PATCH] code documentation --- README.md | 2 +- lib/clixon/clixon_xml.h | 1 - lib/src/clixon_xml_bind.c | 6 ++++-- lib/src/clixon_xml_map.c | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 04080900..e5a90179 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Clixon is a YANG-based configuration manager, with interactive CLI, NETCONF and RESTCONF interfaces, an embedded database and transaction mechanism. -See [main documentation](https://clixon-docs.readthedocs.io), [project page](https://www.clicon.org) and [examples](https://github.com/clicon/clixon-examples). +See [documentation](https://clixon-docs.readthedocs.io), [project page](https://www.clicon.org) and [examples](https://github.com/clicon/clixon-examples). Clixon is open-source and dual licensed. Either Apache License, Version 2.0 or GNU General Public License Version 2; you choose. diff --git a/lib/clixon/clixon_xml.h b/lib/clixon/clixon_xml.h index 685b0eb9..5358e842 100644 --- a/lib/clixon/clixon_xml.h +++ b/lib/clixon/clixon_xml.h @@ -114,7 +114,6 @@ enum cxobj_type {CX_ERROR=-1, * x - - - - y * / \ / \ * x1 x2 - - y1 y2 - * XXX: lacks support for incoming restconf rpc, see api_operations_post_input) */ enum yang_bind{ YB_NONE=0, /* Dont do Yang binding */ diff --git a/lib/src/clixon_xml_bind.c b/lib/src/clixon_xml_bind.c index be691797..c40f0ed4 100644 --- a/lib/src/clixon_xml_bind.c +++ b/lib/src/clixon_xml_bind.c @@ -85,7 +85,7 @@ static int _yang_unknown_anydata = 0; /*! Kludge to equate unknown XML with anydata - * The problem with this is that its global and shuld be bound to a handle + * The problem with this is that its global and should be bound to a handle */ int xml_bind_yang_unknown_anydata(int val) @@ -305,6 +305,7 @@ populate_self_top(cxobj *xt, * Populate xt:s children as top-level symbols * This may be unnecessary if yspec is set on manual creation: x=xml_new(); xml_spec_set(x,y) * @param[in] xt XML tree node + * @param[in] yb How to bind yang to XML top-level when parsing * @param[in] yspec Yang spec * @param[out] xerr Reason for failure, or NULL * @retval 1 OK yang assignment made @@ -348,7 +349,7 @@ xml_bind_yang(cxobj *xt, goto done; } -int +static int xml_bind_yang0_opt(cxobj *xt, yang_bind yb, cxobj *xsibling, @@ -428,6 +429,7 @@ xml_bind_yang0_opt(cxobj *xt, * @retval 0 Partial or no yang assigment made (at least one failed) and xerr set * @retval -1 Error * Populate xt as top-level node + * @see xml_bind_yang If only children of xt should be populated, not xt itself */ int xml_bind_yang0(cxobj *xt, diff --git a/lib/src/clixon_xml_map.c b/lib/src/clixon_xml_map.c index 3826b0d1..13801e22 100644 --- a/lib/src/clixon_xml_map.c +++ b/lib/src/clixon_xml_map.c @@ -1195,6 +1195,7 @@ xml2xpath1(cxobj *x, * @param[out] xpath Malloced xpath string. Need to free() after use * @retval 0 OK * @retval -1 Error. (eg XML malformed) + * @note x needs to be bound to YANG, see eg xml_bind_yang() */ int xml2xpath(cxobj *x,