>From 2e915c1052c5b19e8da469e02a006802d3020cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Mon, 6 May 2019 16:44:26 +0200 Subject: [PATCH 12/15] doc: Add po_filepos_t API * gettext-tools/doc/gettext.texi (po_filepos_t API): New subsection. Add po_message_filepos, po_message_remove_filepos, and po_message_add_filepos documentation. (libgettextpo): Add new subsection to the menu. --- gettext-tools/doc/gettext.texi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi index 51195b299..012a880a7 100644 --- a/gettext-tools/doc/gettext.texi +++ b/gettext-tools/doc/gettext.texi @@ -5279,6 +5279,7 @@ defined in a library called @samp{libgettextpo}. * 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 +* po_filepos_t API:: References to the sources @end menu The following example shows code how these functions can be used. Error @@ -5606,6 +5607,37 @@ Return a freshly allocated string which contains the entry from necessary. @end deftypefun address@hidden po_filepos_t API address@hidden po_filepos_t API + address@hidden {Data Type} po_filepos_t +This is a pointer type that refers to a string's position within a +source file. address@hidden deftp + +The following functions provide an interface to extract and manipulate +these references. + address@hidden {po_filepos_t} po_message_filepos (po_message_t @var{message},@ + int @var{index}) +Return the file reference in position @var{index} from the message. If address@hidden is out of range, return @code{NULL}. address@hidden deftypefun + address@hidden {void} po_message_remove_filepos (po_message_t @var{message},@ + int @var{index}) +Remove the file reference in position @var{index} from the message. It +moves all references following @var{index} one position backwards. address@hidden deftypefun + address@hidden {void} po_message_add_filepos (po_message_t @var{message},@ + const char address@hidden, size_t @var{start_line}) +Add a reference to the string from @var{file} starting at address@hidden, if it is not already present for the message. The +value @code{(size_t)(-1)} for @var{start_line} denotes that the line +number is not available. address@hidden deftypefun + @node Binaries @chapter Producing Binary MO Files -- 2.21.0