>From 2cd4ec4f1807eed8b81138972160019e9e13f630 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
Date: Sun, 5 May 2019 20:51:49 +0200
Subject: [PATCH 05/15] doc: Split libgettextpo documentation into subsections
* gettext-tools/doc/gettext.texi (libgettextpo): Add a menu and split
the functions an types into separate subsections.
(Error Handling): New subsection.
(po_file_t API): New subsection
(po_message_iterator_t API). New subsection.
(po_message_t API): New subsection.
---
gettext-tools/doc/gettext.texi | 46 +++++++++++++++++++++++++---------
1 file changed, 34 insertions(+), 12 deletions(-)
diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi
index b53d2397d..5ac499357 100644
--- a/gettext-tools/doc/gettext.texi
+++ b/gettext-tools/doc/gettext.texi
@@ -5273,9 +5273,22 @@ provided too.
The functions are declared in the header file @samp{}, and are
defined in a library called @samp{libgettextpo}.
address@hidden
+* Error Handling:: Error handling functions
+* po_file_t API:: File management
+* po_message_iterator_t API:: Message iteration
+* po_message_t API:: The basic units of the file
address@hidden menu
+
address@hidden Error Handling
address@hidden Error Handling
+
+Error management is performed through callbacks provided by the user of
+the library. They are provided through a parameter with the following
+type:
+
@deftp {Data Type} struct po_xerror_handler
-This structure contains the functions that will be called in case of
-error. Its pointer is defined as @code{po_xerror_handler_t}. Contains
+Its pointer is defined as @code{po_xerror_handler_t}. Contains
two fields, xerror and xerror2, with the following function ignatures.
@end deftp
@@ -5325,21 +5338,14 @@ It is similar to two calls to xerror. If possible, an ellipsis can be
appended to @var{message_text1} and prepended to @var{message_text2}.
@end deftypefun
address@hidden po_file_t API
address@hidden po_file_t API
+
@deftp {Data Type} po_file_t
This is a pointer type that refers to the contents of a PO file, after it has
been read into memory.
@end deftp
address@hidden {Data Type} po_message_iterator_t
-This is a pointer type that refers to an iterator that produces a sequence of
-messages.
address@hidden deftp
-
address@hidden {Data Type} po_message_t
-This is a pointer type that refers to a message of a PO file, including its
-translation.
address@hidden deftp
-
@deftypefun po_file_t po_file_create ()
The @code{po_file_create} creates an empty PO file representation in
memory.
@@ -5382,6 +5388,14 @@ contain no @samp{domain} directive, the return value contains only one domain,
namely the default domain @code{"messages"}.
@end deftypefun
address@hidden po_message_iterator_t API
address@hidden po_message_iterator_t API
+
address@hidden {Data Type} po_message_iterator_t
+This is a pointer type that refers to an iterator that produces a sequence of
+messages.
address@hidden deftp
+
@deftypefun po_message_iterator_t po_message_iterator (po_file_t @var{file}, const char address@hidden)
The @code{po_message_iterator} returns an iterator that will produce the
messages of @var{file} that belong to the given @var{domain}. If @var{domain}
@@ -5400,6 +5414,14 @@ The @code{po_next_message} function returns the next message from
iterator has reached the end of its message list.
@end deftypefun
address@hidden po_message_t API
address@hidden po_message_t API
+
address@hidden {Data Type} po_message_t
+This is a pointer type that refers to a message of a PO file, including its
+translation.
address@hidden deftp
+
The following functions returns details of a @code{po_message_t}. Recall
that the results are valid as long as the @var{file} handle is valid.
--
2.21.0