gettext: po_file_t API

 
 9.13.2 po_file_t API
 --------------------
 
  -- Data Type: po_file_t
      This is a pointer type that refers to the contents of a PO file,
      after it has been read into memory.
 
  -- Function: po_file_t po_file_create ()
      The ‘po_file_create’ function creates an empty PO file
      representation in memory.
 
  -- Function: po_file_t po_file_read (const char *FILENAME,
           struct po_xerror_handler *HANDLER)
      The ‘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 ‘po_file_free’ is called on it.  In
      case of error, the functions from HANDLER are called to signal it.
 
      This function is exported as ‘po_file_read_v3’ at ABI level, but is
      defined as ‘po_file_read’ in C code after the inclusion of
      ‘<gettext-po.h>’.
 
  -- Function: po_file_t po_file_write (po_file_t FILE,
           const char *FILENAME, struct po_xerror_handler *HANDLER)
      The ‘po_file_write’ function writes the contents of the memory
      structure FILE the FILENAME given.  The return value is FILE after
      a successful operation.  In case of error, the functions from
      HANDLER are called to signal it.
 
      This function is exported as ‘po_file_write_v2’ at ABI level, but
      is defined as ‘po_file_write’ in C code after the inclusion of
      ‘<gettext-po.h>’.
 
  -- Function: void po_file_free (po_file_t FILE)
      The ‘po_file_free’ function frees a PO file’s contents from memory,
      including all messages that are only implicitly accessible through
      iterators.
 
  -- Function: const char * const * po_file_domains (po_file_t FILE)
      The ‘po_file_domains’ function returns the domains for which the
      given PO file has messages.  The return value is a ‘NULL’
      terminated array which is valid as long as the FILE handle is
      valid.  For PO files which contain no ‘domain’ directive, the
      return value contains only one domain, namely the default domain
      ‘"messages"’.