22 size_t inbytesleft,
size_t *no_read)
33 x = (inp[0]<<24) | (inp[1]<<16) | (inp[2]<<8) | inp[3];
41 size_t inbytesleft,
size_t *no_read)
52 x = (inp[3]<<24) | (inp[2]<<16) | (inp[1]<<8) | inp[0];
60 char **outbuf,
size_t *outbytesleft)
62 unsigned char *outp = (
unsigned char *) *outbuf;
63 if (*outbytesleft >= 4)
65 *outp++ = (
unsigned char) (x>>24);
66 *outp++ = (
unsigned char) (x>>16);
67 *outp++ = (
unsigned char) (x>>8);
68 *outp++ = (
unsigned char) x;
76 *outbuf = (
char *) outp;
82 char **outbuf,
size_t *outbytesleft)
84 unsigned char *outp = (
unsigned char *) *outbuf;
85 if (*outbytesleft >= 4)
87 *outp++ = (
unsigned char) x;
88 *outp++ = (
unsigned char) (x>>8);
89 *outp++ = (
unsigned char) (x>>16);
90 *outp++ = (
unsigned char) (x>>24);
98 *outbuf = (
char *) outp;
Header for errno utilities.
Internal header for iconv.
void yaz_iconv_set_errno(yaz_iconv_t cd, int no)
int yaz_matchstr(const char *s1, const char *s2)
match strings - independent of case and '-'
unsigned long(* read_handle)(yaz_iconv_t cd, yaz_iconv_decoder_t d, unsigned char *inbuf, size_t inbytesleft, size_t *no_read)
size_t(* write_handle)(yaz_iconv_t cd, yaz_iconv_encoder_t e, unsigned long x, char **outbuf, size_t *outbytesleft)
yaz_iconv_decoder_t yaz_ucs4_decoder(const char *tocode, yaz_iconv_decoder_t d)
static unsigned long read_UCS4(yaz_iconv_t cd, yaz_iconv_decoder_t d, unsigned char *inp, size_t inbytesleft, size_t *no_read)
static size_t write_UCS4(yaz_iconv_t cd, yaz_iconv_encoder_t en, unsigned long x, char **outbuf, size_t *outbytesleft)
yaz_iconv_encoder_t yaz_ucs4_encoder(const char *tocode, yaz_iconv_encoder_t e)
static unsigned long read_UCS4LE(yaz_iconv_t cd, yaz_iconv_decoder_t d, unsigned char *inp, size_t inbytesleft, size_t *no_read)
static size_t write_UCS4LE(yaz_iconv_t cd, yaz_iconv_encoder_t en, unsigned long x, char **outbuf, size_t *outbytesleft)
#define YAZ_ICONV_E2BIG
error code: Not sufficient room for output buffer
#define YAZ_ICONV_EINVAL
error code: An incomplete multibyte sequence is in input buffer