>From ed3f98719558bbac2f33bc55dffbfc80b98cde09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Mon, 6 May 2019 16:27:09 +0200 Subject: [PATCH 11/15] doc: Add Header Entry API * gettext-tools/doc/gettext.texi (PO Header Entry API): New subsection. Add po_file_domain_header, po_header_field and po_header_set_field documentation. (libgettextpo): Add subsection to the menu. --- gettext-tools/doc/gettext.texi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi index 28d050613..51195b299 100644 --- a/gettext-tools/doc/gettext.texi +++ b/gettext-tools/doc/gettext.texi @@ -5278,6 +5278,7 @@ defined in a library called @samp{libgettextpo}. * po_file_t API:: File management * po_message_iterator_t API:: Message iteration * po_message_t API:: The basic units of the file +* PO Header Entry API:: Meta information of the file @end menu The following example shows code how these functions can be used. Error @@ -5576,6 +5577,35 @@ comments of a message to the value @var{extracted_comments}, a multiline string, ending in a newline, or a address@hidden empty string. @end deftypefun address@hidden PO Header Entry API address@hidden PO Header Entry API + +The following functions provide an interface to extract and manipulate +the header entry (@pxref{Header Entry}) from a file loaded in memory. +The meta information must be written back into the domain message with +the empty string as msgid. + address@hidden {const char *} po_file_domain_header (po_file_t @var{file},@ + const char address@hidden) +Return the header entry of a domain from @var{file}, a PO file loaded in +memory. The value @code{NULL} provided as @var{domain} denotes the +default domain. Return @code{NULL} if there is no header entry. address@hidden deftypefun + address@hidden {char *} po_header_field (const char address@hidden,@ + const char address@hidden) +Return the value of @var{field} in the @var{header} entry. The return +value is either a freshly allocated string, to be freed by the caller, +or @code{NULL}. address@hidden deftypefun + address@hidden {char *} po_header_set_field (const char address@hidden,@ + const char address@hidden, const char address@hidden) +Return a freshly allocated string which contains the entry from address@hidden with @var{field} set to @var{value}. The field is added if +necessary. address@hidden deftypefun + @node Binaries @chapter Producing Binary MO Files -- 2.21.0