101 unsigned long *
x1,
unsigned long *
x2)
103 if (v >= 0xc0 && v <= 0xff)
135 char **outbuf,
size_t *outbytesleft)
145 unsigned char *outp = (
unsigned char *) *outbuf;
156 if (*outbytesleft < 1)
165 *outbuf = (
char *) outp;
176 else if (x > 255 || x < 1)
181 else if (*outbytesleft < 1)
186 *outp++ = (
unsigned char) x;
188 *outbuf = (
char *) outp;
193 char **outbuf,
size_t *outbytesleft)
198 unsigned char *outp = (
unsigned char *) *outbuf;
199 if (*outbytesleft < 1)
206 *outbuf = (
char *) outp;
245 size_t inbytesleft,
size_t *no_read)
247 unsigned long x = inp[0];
Header for errno utilities.
Internal header for iconv.
void yaz_iconv_set_errno(yaz_iconv_t cd, int no)
void destroy_iso_8859_1(yaz_iconv_encoder_t e)
yaz_iconv_encoder_t yaz_iso_8859_1_encoder(const char *tocode, yaz_iconv_encoder_t e)
static size_t flush_iso_8859_1(yaz_iconv_t cd, yaz_iconv_encoder_t e, char **outbuf, size_t *outbytesleft)
yaz_iconv_decoder_t yaz_iso_8859_1_decoder(const char *fromcode, yaz_iconv_decoder_t d)
int yaz_iso_8859_1_lookup_x12(unsigned long x1, unsigned long x2, unsigned long *y)
static struct @1 latin1_comb[]
static size_t write_iso_8859_1(yaz_iconv_t cd, yaz_iconv_encoder_t e, unsigned long x, char **outbuf, size_t *outbytesleft)
static unsigned long read_ISO8859_1(yaz_iconv_t cd, yaz_iconv_decoder_t d, unsigned char *inp, size_t inbytesleft, size_t *no_read)
int yaz_iso_8859_1_lookup_y(unsigned long v, unsigned long *x1, unsigned long *x2)
void init_iso_8859_1(yaz_iconv_encoder_t e)
int yaz_matchstr(const char *s1, const char *s2)
match strings - independent of case and '-'
unsigned long compose_char
unsigned long(* read_handle)(yaz_iconv_t cd, yaz_iconv_decoder_t d, unsigned char *inbuf, size_t inbytesleft, size_t *no_read)
void(* init_handle)(yaz_iconv_encoder_t e)
size_t(* write_handle)(yaz_iconv_t cd, yaz_iconv_encoder_t e, unsigned long x, char **outbuf, size_t *outbytesleft)
void(* destroy_handle)(yaz_iconv_encoder_t e)
size_t(* flush_handle)(yaz_iconv_t cd, yaz_iconv_encoder_t e, char **outbuf, size_t *outbytesleft)
Header for memory handling functions.
#define xfree(x)
utility macro which calls xfree_f
#define xmalloc(x)
utility macro which calls malloc_f
#define YAZ_ICONV_EILSEQ
error code: Invalid sequence
#define YAZ_ICONV_E2BIG
error code: Not sufficient room for output buffer