/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2008 Index Data
+ * Copyright (C) 1995-2012 Index Data
* See the file LICENSE for details.
*/
/**
#include <assert.h>
#include <errno.h>
#include <string.h>
-#include <ctype.h>
#include <yaz/xmalloc.h>
#include "iconv-p.h"
unsigned char *inp,
size_t inbytesleft, size_t *no_read)
{
- struct decoder_data *data = d->data;
+ struct decoder_data *data = (struct decoder_data *) d->data;
unsigned long x;
if (data->comb_offset < data->comb_size)
{
unsigned char *inp,
size_t inbytesleft, size_t *no_read)
{
- struct decoder_data *data = d->data;
+ struct decoder_data *data = (struct decoder_data *) d->data;
unsigned long x = read_marc8(cd, d, inp, inbytesleft, no_read);
if (x && data->comb_size == 1)
{
unsigned char *inp,
size_t inbytesleft, size_t *no_read)
{
- struct decoder_data *data = d->data;
+ struct decoder_data *data = (struct decoder_data *) d->data;
data->g0_mode = 'B';
data->g1_mode = 'E';
data->comb_offset = data->comb_size = 0;
void destroy_marc8(yaz_iconv_decoder_t d)
{
- struct decoder_data *data = d->data;
+ struct decoder_data *data = (struct decoder_data *) d->data;
xfree(data);
}
yaz_iconv_decoder_t yaz_marc8_decoder(const char *fromcode,
yaz_iconv_decoder_t d)
{
- if (!yaz_matchstr(fromcode, "MARC8"))
+ if (!yaz_matchstr(fromcode, "MARC8") || !yaz_matchstr(fromcode, "ANSEL"))
d->read_handle = read_marc8;
else if (!yaz_matchstr(fromcode, "MARC8s"))
d->read_handle = read_marc8s;
else
return 0;
{
- struct decoder_data *data = xmalloc(sizeof(*data));
+ struct decoder_data *data = (struct decoder_data *)
+ xmalloc(sizeof(*data));
d->data = data;
d->init_handle = init_marc8;
d->destroy_handle = destroy_marc8;
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
*/
+