ReactOS 0.4.16-dev-106-g10b08aa
iconv.h File Reference
#include <stddef.h>
Include dependency graph for iconv.h:

Go to the source code of this file.

Typedefs

typedef voidiconv_t
 

Functions

iconv_t iconv_open (const char *tocode, const char *fromcode)
 
int iconv_close (iconv_t cd)
 
size_t iconv (iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
 

Typedef Documentation

◆ iconv_t

typedef void* iconv_t

Definition at line 7 of file iconv.h.

Function Documentation

◆ iconv()

size_t iconv ( iconv_t  cd,
const char **  inbuf,
size_t inbytesleft,
char **  outbuf,
size_t outbytesleft 
)

Definition at line 771 of file win_iconv.c.

772{
773 rec_iconv_t *cd = (rec_iconv_t *)_cd;
774 size_t r = cd->iconv(cd->cd, inbuf, inbytesleft, outbuf, outbytesleft);
775 errno = *(cd->_errno());
776 return r;
777}
InitDirComponents & cd
static int inbuf
Definition: adnsresfilter.c:73
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define errno
Definition: errno.h:18

Referenced by conv_charset(), convert_to_unicode(), joliet_strlen(), rdp_in_unistr(), rdp_out_unistr(), test(), ui_clip_handle_data(), and xclip_send_data_with_convert().

◆ iconv_close()

int iconv_close ( iconv_t  cd)

Definition at line 756 of file win_iconv.c.

757{
758 rec_iconv_t *cd = (rec_iconv_t *)_cd;
759 int r = cd->iconv_close(cd->cd);
760 int e = *(cd->_errno());
761#if defined(USE_LIBICONV_DLL)
762 if (cd->hlibiconv != NULL)
763 FreeLibrary(cd->hlibiconv);
764#endif
765 free(cd);
766 errno = e;
767 return r;
768}
#define free
Definition: debug_ros.c:5
#define NULL
Definition: types.h:112
#define FreeLibrary(x)
Definition: compat.h:748
#define e
Definition: ke_i.h:82

Referenced by check_enc(), rdp_in_unistr(), rdp_out_unistr(), sic_close(), ui_clip_handle_data(), xclip_send_data_with_convert(), xmlCharEncCloseFunc(), and xmlFindCharEncodingHandler().

◆ iconv_open()

iconv_t iconv_open ( const char tocode,
const char fromcode 
)

Definition at line 730 of file win_iconv.c.

731{
733
734 cd = (rec_iconv_t *)calloc(1, sizeof(rec_iconv_t));
735 if (cd == NULL)
736 return (iconv_t)(-1);
737
738#if defined(USE_LIBICONV_DLL)
739 errno = 0;
740 if (libiconv_iconv_open(cd, tocode, fromcode))
741 return (iconv_t)cd;
742#endif
743
744 /* reset the errno to prevent reporting wrong error code.
745 * 0 for unsorted error. */
746 errno = 0;
747 if (win_iconv_open(cd, tocode, fromcode))
748 return (iconv_t)cd;
749
750 free(cd);
751
752 return (iconv_t)(-1);
753}
#define calloc
Definition: rosglue.h:14
static int win_iconv_open(rec_iconv_t *cd, const char *tocode, const char *fromcode)
Definition: win_iconv.c:780

Referenced by check_enc(), rdp_in_unistr(), rdp_out_unistr(), test(), ui_clip_handle_data(), xclip_send_data_with_convert(), and xmlFindCharEncodingHandler().