X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Ficonv_encode_iso_8859_1.c;h=e68f49aaa66064d4aec40ac752aa2a22e42b1796;hp=f0a6a5e6f5b4ccd98b43487649a7cee5ba077224;hb=88d3bedf772316f87e1996f655ccf8d1e2589755;hpb=96c6e58f286787106e4a7b3bb3900a36051968d6 diff --git a/src/iconv_encode_iso_8859_1.c b/src/iconv_encode_iso_8859_1.c index f0a6a5e..e68f49a 100644 --- a/src/iconv_encode_iso_8859_1.c +++ b/src/iconv_encode_iso_8859_1.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2008 Index Data + * Copyright (C) 1995-2010 Index Data * See the file LICENSE for details. */ /** @@ -135,7 +135,7 @@ static size_t write_iso_8859_1(yaz_iconv_t cd, yaz_iconv_encoder_t e, unsigned long x, char **outbuf, size_t *outbytesleft) { - struct encoder_data *w = e->data; + struct encoder_data *w = (struct encoder_data *) e->data; /* list of two char unicode sequence that, when combined, are equivalent to single unicode chars that can be represented in ISO-8859-1/Latin-1. @@ -193,7 +193,7 @@ static size_t write_iso_8859_1(yaz_iconv_t cd, 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) { - struct encoder_data *w = e->data; + struct encoder_data *w = (struct encoder_data *) e->data; if (w->compose_char) { unsigned char *outp = (unsigned char *) *outbuf; @@ -213,7 +213,7 @@ static size_t flush_iso_8859_1(yaz_iconv_t cd, yaz_iconv_encoder_t e, void init_iso_8859_1(yaz_iconv_encoder_t e) { - struct encoder_data *w = e->data; + struct encoder_data *w = (struct encoder_data *) e->data; w->compose_char = 0; } @@ -228,7 +228,8 @@ yaz_iconv_encoder_t yaz_iso_8859_1_encoder(const char *tocode, { if (!yaz_matchstr(tocode, "iso88591")) { - struct encoder_data *data = xmalloc(sizeof(*data)); + struct encoder_data *data = (struct encoder_data *) + xmalloc(sizeof(*data)); e->data = data; e->write_handle = write_iso_8859_1; e->flush_handle = flush_iso_8859_1; @@ -265,7 +266,9 @@ yaz_iconv_decoder_t yaz_iso_8859_1_decoder(const char *fromcode, /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ +