[augeas-devel] [PATCH 2/2] Add span API function documentation

Francis Giraldeau francis.giraldeau at gmail.com
Tue Feb 22 04:08:45 UTC 2011


---
 pages/docs/api.txt |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/pages/docs/api.txt b/pages/docs/api.txt
index 5b0deaf..0fdfbf5 100644
--- a/pages/docs/api.txt
+++ b/pages/docs/api.txt
@@ -170,4 +170,21 @@ files. Return ``0`` on success and ``-1`` on failure. Yes, error reporting
 needs to be improved. Some info can be found in the ``error`` nodes
 underneath ``/augeas/files`` in the tree.
 
+Getting the span of a node related to a file
+============================================
+::
+
+  int aug_span(augeas *aug, const char *path, char **filename,
+        unsigned int *label_start, unsigned int *label_end,
+        unsigned int *value_start, unsigned int *value_end,
+        unsigned int *span_start, unsigned int *span_end)
+
+Get the span according to input file of the node associated with ``PATH``. If
+the node is associated with a file, the filename, label and value start and
+end positions are set, and return value is ``0``. The caller is responsible for
+freeing returned filename. If an argument for return value is NULL, then the
+corresponding value is not set. If the node associated with ``PATH`` doesn't
+belong to a file or is doesn't exists, filename and span are not set and
+return value is ``-1``.
+
 .. _path expression: tree.html
-- 
1.7.1




More information about the augeas-devel mailing list