X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Ficonv_decode_iso5426.c;h=49a27eae5fa4476423b8531a2cee69354da54565;hp=f37ff98718d5d95b4af1749d9a050eb7d3c08710;hb=053c92d650501a953d68b228ad74d96b4606eaf6;hpb=2788a4851b551e1a3efb320a2878b809f2d8a9d7 diff --git a/src/iconv_decode_iso5426.c b/src/iconv_decode_iso5426.c index f37ff98..49a27ea 100644 --- a/src/iconv_decode_iso5426.c +++ b/src/iconv_decode_iso5426.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ /** @@ -21,7 +21,6 @@ #include #include #include -#include #include #include "iconv-p.h" @@ -67,7 +66,7 @@ static unsigned long read_iso5426(yaz_iconv_t cd, yaz_iconv_decoder_t d, *no_read = data->comb_no_read[data->comb_offset]; x = data->comb_x[data->comb_offset]; - /* special case for double-diacritic combining characters, + /* special case for double-diacritic combining characters, INVERTED BREVE and DOUBLE TILDE. We'll increment the no_read counter by 1, since we want to skip over the processing of the closing ligature character @@ -110,26 +109,6 @@ static unsigned long read_iso5426(yaz_iconv_t cd, yaz_iconv_decoder_t d, return x; } -#if 0 -/* not used */ -static unsigned long read_iso5426s(yaz_iconv_t cd, yaz_iconv_decoder_t d, - unsigned char *inp, - size_t inbytesleft, size_t *no_read) -{ - struct decoder_data *data = (struct decoder_data *) d->data; - unsigned long x = read_iso5426(cd, d, inp, inbytesleft, no_read); - if (x && data->comb_size == 1) - { - if (yaz_iso_8859_1_lookup_x12(x, data->comb_x[0], &x)) - { - *no_read += data->comb_no_read[0]; - data->comb_size = 0; - } - } - return x; -} -#endif - static unsigned long yaz_read_iso5426_comb(yaz_iconv_t cd, struct decoder_data *data, unsigned char *inp, @@ -196,44 +175,13 @@ static unsigned long yaz_read_iso5426_comb(yaz_iconv_t cd, { case 'B': /* Basic ASCII */ case 's': /* ASCII */ - x = yaz_iso5426_42_conv(inp, inbytesleft, &no_read_sub, comb, 127, 0); + x = yaz_iso5426_42_conv(inp, inbytesleft, &no_read_sub, comb, + 127, 0); break; case 'E': /* ANSEL */ - x = yaz_iso5426_45_conv(inp, inbytesleft, &no_read_sub, comb, 127, 128); + x = yaz_iso5426_45_conv(inp, inbytesleft, &no_read_sub, comb, + 127, 128); break; - -#if 0 - case 'g': /* Greek */ - x = yaz_iso5426_67_conv(inp, inbytesleft, &no_read_sub, comb, 127, 0); - break; - case 'b': /* Subscripts */ - x = yaz_iso5426_62_conv(inp, inbytesleft, &no_read_sub, comb, 127, 0); - break; - case 'p': /* Superscripts */ - x = yaz_iso5426_70_conv(inp, inbytesleft, &no_read_sub, comb, 127, 0); - break; - case '2': /* Basic Hebrew */ - x = yaz_iso5426_32_conv(inp, inbytesleft, &no_read_sub, comb, 127, 0); - break; - case 'N': /* Basic Cyrillic */ - x = yaz_iso5426_4E_conv(inp, inbytesleft, &no_read_sub, comb, 127, 0); - break; - case 'Q': /* Extended Cyrillic */ - x = yaz_iso5426_51_conv(inp, inbytesleft, &no_read_sub, comb, 127, 0); - break; - case '3': /* Basic Arabic */ - x = yaz_iso5426_33_conv(inp, inbytesleft, &no_read_sub, comb, 127, 0); - break; - case '4': /* Extended Arabic */ - x = yaz_iso5426_34_conv(inp, inbytesleft, &no_read_sub, comb, 127, 0); - break; - case 'S': /* Greek */ - x = yaz_iso5426_53_conv(inp, inbytesleft, &no_read_sub, comb, 127, 0); - break; - case '1': /* Chinese, Japanese, Korean (EACC) */ - x = yaz_iso5426_31_conv(inp, inbytesleft, &no_read_sub, comb, 127, 0); - break; -#endif default: *no_read = 0; yaz_iconv_set_errno(cd, YAZ_ICONV_EILSEQ); @@ -287,7 +235,9 @@ yaz_iconv_decoder_t yaz_iso5426_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 */ +