>From 85a3287e6288a1d96fadcf1f84a693410a21e1d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Sun, 5 May 2019 19:54:44 +0200 Subject: [PATCH 03/15] doc: Update po_file_read documentation * gettext-tools/doc/gettext.texi (libgettextpo): Update documentation from po_file_read to the version 3 of the implementation. * gettext-tools/libgettextpo/gettext-po.in.h (po_file_read): Update comment. --- gettext-tools/doc/gettext.texi | 11 ++++++++--- gettext-tools/libgettextpo/gettext-po.in.h | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi index 6442375a3..e7d58488f 100644 --- a/gettext-tools/doc/gettext.texi +++ b/gettext-tools/doc/gettext.texi @@ -5344,11 +5344,16 @@ The @code{po_file_create} creates an empty PO file representation in memory. @end deftypefun address@hidden po_file_t po_file_read (const char address@hidden) address@hidden po_file_t po_file_read (const char address@hidden,@ + struct po_xerror_handler address@hidden) The @code{po_file_read} function reads a PO file into memory. The file name is given as argument. The return value is a handle to the PO file's contents, -valid until @code{po_file_free} is called on it. In case of error, the return -value is @code{NULL}, and @code{errno} is set. +valid until @code{po_file_free} is called on it. In case of error, the +functions from @var{handler} are called to signal it. + +This function is exported as @samp{po_file_read_v3} at ABI level, but it +defined as @code{po_file_read} in C code after the inclusion of address@hidden}. @end deftypefun @deftypefun void po_file_free (po_file_t @var{file}) diff --git a/gettext-tools/libgettextpo/gettext-po.in.h b/gettext-tools/libgettextpo/gettext-po.in.h index 4e9fbfe87..ec619fbbe 100644 --- a/gettext-tools/libgettextpo/gettext-po.in.h +++ b/gettext-tools/libgettextpo/gettext-po.in.h @@ -131,7 +131,7 @@ typedef const struct po_xerror_handler *po_xerror_handler_t; extern po_file_t po_file_create (void); /* Read a PO file into memory. - Return its contents. Upon failure, return NULL and set errno. */ + Return its contents. Upon failure, call function from handler. */ #define po_file_read po_file_read_v3 extern po_file_t po_file_read (const char *filename, po_xerror_handler_t handler); -- 2.21.0