X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fiso5428.c;h=90cc7829752ea76a534cfe271575ace8ca86fd4d;hp=752f9c824f8011d0bf308afa74da46096a1726d9;hb=96c6e58f286787106e4a7b3bb3900a36051968d6;hpb=ee6ab2ee3a9ee1a8c65d7272ec7fba1d886f5af0 diff --git a/src/iso5428.c b/src/iso5428.c index 752f9c8..90cc782 100644 --- a/src/iso5428.c +++ b/src/iso5428.c @@ -18,8 +18,9 @@ #include "iconv-p.h" -unsigned long yaz_read_iso5428_1984(yaz_iconv_t cd, unsigned char *inp, - size_t inbytesleft, size_t *no_read) +static unsigned long read_iso_5428_1984(yaz_iconv_t cd, yaz_iconv_decoder_t d, + unsigned char *inp, + size_t inbytesleft, size_t *no_read) { unsigned long x = 0; int tonos = 0; @@ -376,6 +377,19 @@ yaz_iconv_encoder_t yaz_iso_5428_encoder(const char *name, return 0; } +yaz_iconv_decoder_t yaz_iso_5428_decoder(const char *name, + yaz_iconv_decoder_t d) +{ + if (!yaz_matchstr(name, "iso54281984") + || !yaz_matchstr(name, "iso5428:1984")) + { + d->read_handle = read_iso_5428_1984; + return d; + } + return 0; +} + + /* * Local variables: