From 5ae1a05c678f836d95aad581913cde3fed4cdcc7 Mon Sep 17 00:00:00 2001 From: Victor Manuel Alvarez Date: Thu, 18 Sep 2014 20:34:00 +0200 Subject: [PATCH] Update documentation --- docs/capi.rst | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/capi.rst b/docs/capi.rst index 9bc0279da4..55496091d8 100644 --- a/docs/capi.rst +++ b/docs/capi.rst @@ -437,7 +437,9 @@ Functions .. c:function:: yr_string_matches_foreach(string, match) - Example: + Iterate over the :c:type:`YR_MATCH` structures associated to a given string + running the block of code that follows each time with a different value for + *match*. Example: .. code-block:: c @@ -450,6 +452,23 @@ Functions ..do something with match } +.. c:function:: yr_rules_foreach(rules, rule) + + Iterate over each :c:type:`YR_RULE` in a :c:type:`YR_RULES` object running + the block of code that follows each time with a different value for + *rule*. Example: + + .. code-block:: c + + YR_RULE* rule; + + /* rules is a YR_RULES object */ + + yr_rules_foreach(rules, rule) + { + ..do something with rule + } + Error codes -----------