possible to process PO files in your own programs. When you use this library,
you don't need to write routines to parse the PO file; instead, you retrieve
a pointer in memory to each of messages contained in the PO file. Functions
-for writing PO files are not provided at this time.
+for writing those memory structures to a file after working with them are
+provided too.
The functions are declared in the header file @samp{<gettext-po.h>}, and are
defined in a library called @samp{libgettextpo}.
@samp{<gettext-po.h>}.
@end deftypefun
+@deftypefun po_file_t po_file_write (po_file_t @var{file},@
+ const char *@var{filename}, struct po_xerror_handler *@var{handler})
+The @code{po_file_write} function writes the contents of the memory
+structure @var{file} the @var{filename} given. The return value is
+@var{file} after a successful operation. In case of error, the
+functions from @var{handler} are called to signal it.
+
+This function is exported as @samp{po_file_write_v2} at ABI level, but
+it defined as @code{po_file_write} in C code after the inclusion of
+@samp{<gettext-po.h>}.
+@end deftypefun
+
@deftypefun void po_file_free (po_file_t @var{file})
The @code{po_file_free} function frees a PO file's contents from memory,
including all messages that are only implicitly accessible through iterators.
po_xerror_handler_t handler);
/* Write an in-memory PO file to a file.
- Upon failure, return NULL and set errno. */
+ Upon failure, call function from handler. */
#define po_file_write po_file_write_v2
extern po_file_t po_file_write (po_file_t file, const char *filename,
po_xerror_handler_t handler);