]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
doc: Update po_file_read documentation
authorMiguel Ángel Arruga Vivas <rosen644835@gmail.com>
Sun, 5 May 2019 17:54:44 +0000 (19:54 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 26 Jul 2020 16:36:24 +0000 (18:36 +0200)
* 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
gettext-tools/libgettextpo/gettext-po.in.h

index bb18a3463ee8ffcc927964d0d8198dfb8673368e..ccf21d88ef8e0a3af93707464428b232fbbcb426 100644 (file)
@@ -5402,11 +5402,16 @@ The @code{po_file_create} creates an empty PO file representation in
 memory.
 @end deftypefun
 
-@deftypefun po_file_t po_file_read (const char *@var{filename})
+@deftypefun po_file_t po_file_read (const char *@var{filename},@
+            struct po_xerror_handler *@var{handler})
 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
+@samp{<gettext-po.h>}.
 @end deftypefun
 
 @deftypefun void po_file_free (po_file_t @var{file})
index f6c1a8bf6bafbb921234f792da78ac8bf6affcb9..4f394eeeff356f3809fa2d9d2a8c35bf382b426f 100644 (file)
@@ -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);