libyang DOC spelling correction in headers
diff --git a/src/common.h b/src/common.h
index ce7248d..ce1c7db 100644
--- a/src/common.h
+++ b/src/common.h
@@ -370,7 +370,7 @@
* @param[in] s String to search in.
* @param[in] c Character to search for.
* @param[in] len Limit the search to this number of characters in @p s.
- * @return Pointer to first @p c occurence in @p s, NULL if not found in first @p len characters.
+ * @return Pointer to first @p c occurrence in @p s, NULL if not found in first @p len characters.
*/
char *ly_strnchr(const char *s, int c, size_t len);
diff --git a/src/context.h b/src/context.h
index e9334c9..9a89ede 100644
--- a/src/context.h
+++ b/src/context.h
@@ -184,7 +184,7 @@
#define LY_CTX_PREFER_SEARCHDIRS 0x20 /**< When searching for schema, prefer searchdirs instead of user callback. */
#define LY_CTX_SET_PRIV_PARSED 0x40 /**< For all compiled nodes, their private objects (::lysc_node.priv) are used
by libyang as a reference to the corresponding parsed node (::lysp_node).
- The exception are \"case\" statements, which are ommitted (shorthand),
+ The exception are \"case\" statements, which are omitted (shorthand),
in that case the private objects are set to NULL.
So if this option is set, the user must not change private objects.
Setting this option by ::ly_ctx_set_options() may result in context recompilation.
diff --git a/src/in.h b/src/in.h
index f176c7a..109b34f 100644
--- a/src/in.h
+++ b/src/in.h
@@ -31,7 +31,7 @@
* input type and then used throughout the parser functions processing the input data. Using a generic input handler avoids
* need to have a set of functions for each parser functionality and results in simpler API.
*
- * The API allows to alter the source of the data behind the handler by another source. Also reseting a seekable source
+ * The API allows to alter the source of the data behind the handler by another source. Also resetting a seekable source
* input is possible with ::ly_in_reset() to re-read the input.
*
* @note
diff --git a/src/log.h b/src/log.h
index 06d4357..fd547aa 100644
--- a/src/log.h
+++ b/src/log.h
@@ -94,7 +94,7 @@
/**
* @brief Set logger verbosity level.
*
- * To get the current value, the function must be called twice resetting the level by the reived value.
+ * To get the current value, the function must be called twice resetting the level by the received value.
*
* @param[in] level Verbosity level.
* @return Previous verbosity level.
@@ -125,7 +125,7 @@
/**
* @brief Set logger options. Default is #LY_LOLOG | #LY_LOSTORE_LAST.
*
- * To get the current value, the function must be called twice resetting the level by the reived value.
+ * To get the current value, the function must be called twice resetting the level by the received value.
*
* @param[in] opts Bitfield of @ref logopts.
* @return Previous logger options.
@@ -155,7 +155,7 @@
/**
* @brief Enable specific debugging messages (independent of log level).
*
- * To get the current value, the function must be called twice resetting the level by the reived value.
+ * To get the current value, the function must be called twice resetting the level by the received value.
*
* @param[in] dbg_groups Bitfield of enabled debug message groups (see @ref dbggroup).
* @return Previous options bitfield.
diff --git a/src/out.h b/src/out.h
index c52fcb8..7ecf347 100644
--- a/src/out.h
+++ b/src/out.h
@@ -34,7 +34,7 @@
*
* Using a generic output handler avoids need to have a set of functions for each printer functionality and results in simpler API.
*
- * The API allows to alter the target of the data behind the handler by another target (of the same type). Also reseting
+ * The API allows to alter the target of the data behind the handler by another target (of the same type). Also resetting
* a seekable output is possible with ::ly_out_reset() to re-write the output.
*
* @note
@@ -154,7 +154,7 @@
ly_write_clb ly_out_clb(struct ly_out *out, ly_write_clb writeclb);
/**
- * @brief Get or reset callback function's argument aasociated with a callback printer handler.
+ * @brief Get or reset callback function's argument associated with a callback printer handler.
*
* @param[in] out Printer handler.
* @param[in] arg caller-specific argument to be passed to the callback function associated with the printer handler.
@@ -247,7 +247,7 @@
* @param[in] out Printer handler.
* @param[in] filepath Optional new filepath for the handler. If and only if NULL, the current filepath string is returned.
* @return Previous filepath string in case the @p filepath argument is NULL.
- * @return NULL if changing filepath succeedes and ((void *)-1) otherwise.
+ * @return NULL if changing filepath succeeds and ((void *)-1) otherwise.
*/
const char *ly_out_filepath(struct ly_out *out, const char *filepath);
diff --git a/src/parser_internal.h b/src/parser_internal.h
index 3cd278f..d8114fc 100644
--- a/src/parser_internal.h
+++ b/src/parser_internal.h
@@ -127,7 +127,7 @@
* @brief Parse XML string as a YANG data tree.
*
* @param[in] ctx libyang context.
- * @param[in] ext Optional extenion instance to parse data following the schema tree specified in the extension instance
+ * @param[in] ext Optional extension instance to parse data following the schema tree specified in the extension instance
* @param[in] parent Parent to connect the parsed nodes to, if any.
* @param[in,out] first_p Pointer to the first top-level parsed node, used only if @p parent is NULL.
* @param[in] in Input structure.
@@ -148,7 +148,7 @@
* @brief Parse JSON string as a YANG data tree.
*
* @param[in] ctx libyang context.
- * @param[in] ext Optional extenion instance to parse data following the schema tree specified in the extension instance
+ * @param[in] ext Optional extension instance to parse data following the schema tree specified in the extension instance
* @param[in] parent Parent to connect the parsed nodes to, if any.
* @param[in,out] first_p Pointer to the first top-level parsed node, used only if @p parent is NULL.
* @param[in] in Input structure.
@@ -167,7 +167,7 @@
* @brief Parse binary LYB data as a YANG data tree.
*
* @param[in] ctx libyang context.
- * @param[in] ext Optional extenion instance to parse data following the schema tree specified in the extension instance
+ * @param[in] ext Optional extension instance to parse data following the schema tree specified in the extension instance
* @param[in] parent Parent to connect the parsed nodes to, if any.
* @param[in,out] first_p Pointer to the first top-level parsed node, used only if @p parent is NULL.
* @param[in] in Input structure.
diff --git a/src/parser_schema.h b/src/parser_schema.h
index 70d7121..ecb3851 100644
--- a/src/parser_schema.h
+++ b/src/parser_schema.h
@@ -63,8 +63,8 @@
* are resolved, groupings are instantiated, types are resolved (and compiled by joining all the relevant restrictions
* when derived from another types) and many other syntactical checks are done.
*
- * There is the main parsing function ::lys_parse() wirking with the libyang [input handler](@ref howtoInput). However,
- * to simplify some of the usecases, it is also possible to use other functions accepting input data from various sources.
+ * There is the main parsing function ::lys_parse() working with the libyang [input handler](@ref howtoInput). However,
+ * to simplify some of the use-cases, it is also possible to use other functions accepting input data from various sources.
*
* Functions List
* --------------
@@ -108,7 +108,7 @@
/**
* @brief Load a schema into the specified context.
*
- * This function is comsidered for a simple use, if you have a complex usecase,
+ * This function is considered for a simple use, if you have a complex use-case,
* consider use of ::lys_parse() with a standalone input handler.
*
* @param[in] ctx libyang context where to process the data model.
@@ -124,7 +124,7 @@
*
* \note Current implementation supports only reading data from standard (disk) file, not from sockets, pipes, etc.
*
- * This function is comsidered for a simple use, if you have a complex usecase,
+ * This function is considered for a simple use, if you have a complex use-case,
* consider use of ::lys_parse() with a standalone input handler.
*
* @param[in] ctx libyang context where to process the data model.
@@ -139,7 +139,7 @@
/**
* @brief Load a schema into the specified context from a file.
*
- * This function is comsidered for a simple use, if you have a complex usecase,
+ * This function is considered for a simple use, if you have a complex use-case,
* consider use of ::lys_parse() with a standalone input handler.
*
* @param[in] ctx libyang context where to process the data model.
diff --git a/src/path.h b/src/path.h
index a32a5a2..b0eb890 100644
--- a/src/path.h
+++ b/src/path.h
@@ -68,7 +68,7 @@
* @{
*/
#define LY_PATH_BEGIN_ABSOLUTE 0x01 /**< path must be absolute */
-#define LY_PATH_BEGIN_EITHER 0x02 /**< path be be iether absolute or relative */
+#define LY_PATH_BEGIN_EITHER 0x02 /**< path be be either absolute or relative */
/** @} */
/**
diff --git a/src/plugins_exts.h b/src/plugins_exts.h
index 2da8b4d..3a53e9f 100644
--- a/src/plugins_exts.h
+++ b/src/plugins_exts.h
@@ -44,7 +44,7 @@
*
* YANG extensions are very complex. Usually only its description specifies how it is supposed to behave, what are the
* allowed substatements, their cardinality or if the standard YANG statements placed inside the extension differs somehow
- * in their meaning or behavior. libyang provids the Extension plugins API to implement such extensions and add its support
+ * in their meaning or behavior. libyang provides the Extension plugins API to implement such extensions and add its support
* into libyang itself. However we tried our best, the API is not (and it cannot be) so universal and complete to cover all
* possibilities. There are definitely use cases which cannot be simply implemented only with this API.
*
diff --git a/src/schema_compile_amend.h b/src/schema_compile_amend.h
index 4d368dd..5915268 100644
--- a/src/schema_compile_amend.h
+++ b/src/schema_compile_amend.h
@@ -69,7 +69,7 @@
*
* @param[in] ctx Compile context.
* @param[in] uses_p Parsed uses structure with augments and refines.
- * @param[in] ctx_node Context node of @p uses_p meaning its first data definiition parent.
+ * @param[in] ctx_node Context node of @p uses_p meaning its first data definition parent.
* @return LY_ERR value.
*/
LY_ERR lys_precompile_uses_augments_refines(struct lysc_ctx *ctx, struct lysp_node_uses *uses_p,
@@ -118,7 +118,7 @@
void lysp_dev_node_free(const struct ly_ctx *ctx, struct lysp_node *dev_pnode);
/**
- * @brief Compile and apply any precompiled deviations and refines targetting a node.
+ * @brief Compile and apply any precompiled deviations and refines targeting a node.
*
* @param[in] ctx Compile context.
* @param[in] pnode Parsed node to consider.
@@ -131,7 +131,7 @@
const struct lysc_node *parent, struct lysp_node **dev_pnode, ly_bool *not_supported);
/**
- * @brief Compile and apply any precompiled top-level or uses augments targetting a node.
+ * @brief Compile and apply any precompiled top-level or uses augments targeting a node.
*
* @param[in] ctx Compile context.
* @param[in] node Compiled node to consider.
diff --git a/src/tree.h b/src/tree.h
index 66e9146..3b2736c 100644
--- a/src/tree.h
+++ b/src/tree.h
@@ -225,7 +225,7 @@
#define LY_DATA_TYPE_COUNT 20 /**< Number of different types */
/**
- * @brief Stringified YANG built-in data types
+ * @brief Stringfield YANG built-in data types
*/
extern const char *ly_data_type2str[LY_DATA_TYPE_COUNT];
diff --git a/src/tree_data.h b/src/tree_data.h
index 1db9f8b..de4f2d0 100644
--- a/src/tree_data.h
+++ b/src/tree_data.h
@@ -1396,7 +1396,7 @@
/**
* @brief Create a new JSON opaque node in the data tree. To create an XML opaque node, use ::lyd_new_opaq2().
*
- * @param[in] parent Parent node for the node beaing created. NULL in case of creating a top level element.
+ * @param[in] parent Parent node for the node being created. NULL in case of creating a top level element.
* @param[in] ctx libyang context. If NULL, @p parent context will be used.
* @param[in] name Node name.
* @param[in] value Optional node value.
@@ -1411,7 +1411,7 @@
/**
* @brief Create a new XML opaque node in the data tree. To create a JSON opaque node, use ::lyd_new_opaq().
*
- * @param[in] parent Parent node for the node beaing created. NULL in case of creating a top level element.
+ * @param[in] parent Parent node for the node being created. NULL in case of creating a top level element.
* @param[in] ctx libyang context. If NULL, @p parent context will be used.
* @param[in] name Node name.
* @param[in] value Optional node value.
@@ -1619,7 +1619,7 @@
* @param[in] val_str New value to set, any prefixes are expected in JSON format.
* @return LY_SUCCESS if value was changed,
* @return LY_EEXIST if value was the same and only the default flag was cleared,
- * @return LY_ENOT if the values were equal and no change occured,
+ * @return LY_ENOT if the values were equal and no change occurred,
* @return LY_ERR value on other errors.
*/
LY_ERR lyd_change_term(struct lyd_node *term, const char *val_str);
@@ -1635,7 +1635,7 @@
* @param[in] value_len Length of @p value.
* @return LY_SUCCESS if value was changed,
* @return LY_EEXIST if value was the same and only the default flag was cleared,
- * @return LY_ENOT if the values were equal and no change occured,
+ * @return LY_ENOT if the values were equal and no change occurred,
* @return LY_ERR value on other errors.
*/
LY_ERR lyd_change_term_bin(struct lyd_node *term, const void *value, size_t value_len);
@@ -1651,7 +1651,7 @@
* canonical, it may lead to unexpected behavior.
* @return LY_SUCCESS if value was changed,
* @return LY_EEXIST if value was the same and only the default flag was cleared,
- * @return LY_ENOT if the values were equal and no change occured,
+ * @return LY_ENOT if the values were equal and no change occurred,
* @return LY_ERR value on other errors.
*/
LY_ERR lyd_change_term_canon(struct lyd_node *term, const char *val_str);
@@ -1662,7 +1662,7 @@
* @param[in] meta Metadata to change.
* @param[in] val_str New value to set, any prefixes are expected in JSON format.
* @return LY_SUCCESS if value was changed,
- * @return LY_ENOT if the values were equal and no change occured,
+ * @return LY_ENOT if the values were equal and no change occurred,
* @return LY_ERR value on other errors.
*/
LY_ERR lyd_change_meta(struct lyd_meta *meta, const char *val_str);
diff --git a/src/tree_edit.h b/src/tree_edit.h
index ac5e4b0..7284b4f 100644
--- a/src/tree_edit.h
+++ b/src/tree_edit.h
@@ -239,7 +239,7 @@
*
* @param[in,out] LIST Linked list to add to.
* @param[in] NEW_ITEM New item, that will be appended to the list, must be already allocated.
- * @param[in] LINKER name of structuin member that is used to connect items together.
+ * @param[in] LINKER name of structuring member that is used to connect items together.
*/
#define LY_LIST_INSERT(LIST, NEW_ITEM, LINKER)\
if (!(*LIST)) { \
diff --git a/src/tree_schema_internal.h b/src/tree_schema_internal.h
index 5bf1739..279fcbf 100644
--- a/src/tree_schema_internal.h
+++ b/src/tree_schema_internal.h
@@ -722,7 +722,7 @@
/**
* @brief Free the compiled extension definition and NULL the provided pointer.
* @param[in] ctx libyang context where the string data resides in a dictionary.
- * @param[in,out] ext Compiled extendion definition to be freed.
+ * @param[in,out] ext Compiled extension definition to be freed.
*/
void lysc_extension_free(struct ly_ctx *ctx, struct lysc_ext **ext);
diff --git a/src/validation.h b/src/validation.h
index aad751e..4135447 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -58,7 +58,7 @@
* @param[in] node_when Set with nodes with "when" conditions, can be NULL.
* @param[in] node_exts Set with nodes with extension instances with validation plugin callback, can be NULL.
* @param[in] node_types Set with nodes with unresolved types, can be NULL
- * @param[in] meta_types Set with metdata with unresolved types, can be NULL.
+ * @param[in] meta_types Set with metadata with unresolved types, can be NULL.
* @param[in,out] diff Validation diff.
* @return LY_ERR value.
*/
diff --git a/src/xml.h b/src/xml.h
index 1261e31..4f27119 100644
--- a/src/xml.h
+++ b/src/xml.h
@@ -174,7 +174,7 @@
* @brief Restore previous backup of XML context.
*
* @param[in,out] xmlctx XML context to restore.
- * @param[in] backup Backup XML context to restore, is unasble afterwards.
+ * @param[in] backup Backup XML context to restore, is unusable afterwards.
*/
void lyxml_ctx_restore(struct lyxml_ctx *xmlctx, struct lyxml_ctx *backup);
diff --git a/src/xpath.h b/src/xpath.h
index 5835a06..1ef3dfc 100644
--- a/src/xpath.h
+++ b/src/xpath.h
@@ -287,7 +287,7 @@
* @param[in] ctx libyang context to use.
* @param[in] exp Parsed XPath expression to be evaluated.
* @param[in] cur_mod Current module for the expression (where it was "instantiated").
- * @param[in] format Format of the XPath expression (more specifcally, of any used prefixes).
+ * @param[in] format Format of the XPath expression (more specifically, of any used prefixes).
* @param[in] prefix_data Format-specific prefix data (see ::ly_resolve_prefix).
* @param[in] ctx_node Current (context) data node, NULL in case of the root node.
* @param[in] tree Data tree on which to perform the evaluation, it must include all the available data (including
@@ -308,7 +308,7 @@
* @param[in] ctx libyang context to use.
* @param[in] exp Parsed XPath expression to be evaluated.
* @param[in] cur_mod Current module for the expression (where it was "instantiated").
- * @param[in] format Format of the XPath expression (more specifcally, of any used prefixes).
+ * @param[in] format Format of the XPath expression (more specifically, of any used prefixes).
* @param[in] prefix_data Format-specific prefix data (see ::ly_resolve_prefix).
* @param[in] ctx_scnode Current (context) schema node, NULL in case of the root node.
* @param[out] set Result set.