CSConv Interfaces                                                open(4)


NAME

     open - gain access to a code set converter


SYNOPSIS

     typedef struct _csc_state {
             /* private data for the converter */
     } csc_state_t;

     csc_state_t * prefix_open(const char * locale,
                               const char * tocode,
                               const char * fromcode);


PARAMETERS

     locale     A pointer to the locale name.

     tocode     A pointer to the name of source encoding.

     fromcode   A pointer to the name of destination encoding.


DESCRIPTION

     The open() routine is called from csconv_open_locale() and
     csconv_open().  The routine should verify parameters and its
     availability, if necessary.

     If the converter requires persistent data, the converter can
     allocate csc_state_t structure area to save those data and return.
     The csc_state_t structure will be passed to conv() routine and
     close() routine.


RETURN VALUES

     Upon successful completion, open() routine should return non-NULL
     pointer.  Otherwise, open() should return NULL and sets errno to
     indicate the error.


ERRORS

     See iconv_open(3).


SEE ALSO

     csconv_open(3), conv(4), close(4), iconv_open(3)
