/* 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.
*/
/**
#include "iconv-p.h"
-unsigned long yaz_read_UCS4(yaz_iconv_t cd, unsigned char *inp,
- size_t inbytesleft, size_t *no_read)
+static unsigned long read_UCS4(yaz_iconv_t cd, yaz_iconv_decoder_t d,
+ unsigned char *inp,
+ size_t inbytesleft, size_t *no_read)
{
unsigned long x = 0;
return x;
}
-unsigned long yaz_read_UCS4LE(yaz_iconv_t cd, unsigned char *inp,
- size_t inbytesleft, size_t *no_read)
+static unsigned long read_UCS4LE(yaz_iconv_t cd, yaz_iconv_decoder_t d,
+ unsigned char *inp,
+ size_t inbytesleft, size_t *no_read)
{
unsigned long x = 0;
return e;
}
+yaz_iconv_decoder_t yaz_ucs4_decoder(const char *tocode,
+ yaz_iconv_decoder_t d)
+
+{
+ if (!yaz_matchstr(tocode, "UCS4"))
+ d->read_handle = read_UCS4;
+ else if (!yaz_matchstr(tocode, "UCS4LE"))
+ d->read_handle = read_UCS4LE;
+ else
+ return 0;
+ return d;
+}
+
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
*/
+