projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed unused variable
[yaz-moved-to-github.git]
/
src
/
iconv_encode_marc8.c
diff --git
a/src/iconv_encode_marc8.c
b/src/iconv_encode_marc8.c
index
a07bd2a
..
0fa3b56
100644
(file)
--- a/
src/iconv_encode_marc8.c
+++ b/
src/iconv_encode_marc8.c
@@
-20,7
+20,6
@@
#include <ctype.h>
#include <yaz/xmalloc.h>
#include <ctype.h>
#include <yaz/xmalloc.h>
-#include <yaz/nmem.h>
#include <yaz/snprintf.h>
#include "iconv-p.h"
#include <yaz/snprintf.h>
#include "iconv-p.h"
@@
-51,7
+50,7
@@
struct encoder_data
static void init_marc8(yaz_iconv_encoder_t w)
{
static void init_marc8(yaz_iconv_encoder_t w)
{
- struct encoder_data *data = w->data;
+ struct encoder_data *data = (struct encoder_data *) w->data;
data->write_marc8_second_half_char = 0;
data->write_marc8_last = 0;
data->write_marc8_ncr = 0;
data->write_marc8_second_half_char = 0;
data->write_marc8_last = 0;
data->write_marc8_ncr = 0;
@@
-335,7
+334,7
@@
static size_t yaz_write_marc8_2(yaz_iconv_t cd, struct encoder_data *w,
static size_t flush_marc8(yaz_iconv_t cd, yaz_iconv_encoder_t en,
char **outbuf, size_t *outbytesleft)
{
static size_t flush_marc8(yaz_iconv_t cd, yaz_iconv_encoder_t en,
char **outbuf, size_t *outbytesleft)
{
- struct encoder_data *w = en->data;
+ struct encoder_data *w = (struct encoder_data *) en->data;
size_t r = flush_combos(cd, w, outbuf, outbytesleft);
if (r)
return r;
size_t r = flush_combos(cd, w, outbuf, outbytesleft);
if (r)
return r;
@@
-383,21
+382,24
@@
static size_t write_marc8_normal(yaz_iconv_t cd, yaz_iconv_encoder_t e,
unsigned long x,
char **outbuf, size_t *outbytesleft)
{
unsigned long x,
char **outbuf, size_t *outbytesleft)
{
- return yaz_write_marc8_generic(cd, e->data, x, outbuf, outbytesleft, 0);
+ return yaz_write_marc8_generic(cd, (struct encoder_data *) e->data,
+ x, outbuf, outbytesleft, 0);
}
static size_t write_marc8_lossy(yaz_iconv_t cd, yaz_iconv_encoder_t e,
unsigned long x,
char **outbuf, size_t *outbytesleft)
{
}
static size_t write_marc8_lossy(yaz_iconv_t cd, yaz_iconv_encoder_t e,
unsigned long x,
char **outbuf, size_t *outbytesleft)
{
- return yaz_write_marc8_generic(cd, e->data, x, outbuf, outbytesleft, 1);
+ return yaz_write_marc8_generic(cd, (struct encoder_data *) e->data,
+ x, outbuf, outbytesleft, 1);
}
static size_t write_marc8_lossless(yaz_iconv_t cd, yaz_iconv_encoder_t e,
unsigned long x,
char **outbuf, size_t *outbytesleft)
{
}
static size_t write_marc8_lossless(yaz_iconv_t cd, yaz_iconv_encoder_t e,
unsigned long x,
char **outbuf, size_t *outbytesleft)
{
- return yaz_write_marc8_generic(cd, e->data, x, outbuf, outbytesleft, 2);
+ return yaz_write_marc8_generic(cd, (struct encoder_data *) e->data,
+ x, outbuf, outbytesleft, 2);
}
static void destroy_marc8(yaz_iconv_encoder_t e)
}
static void destroy_marc8(yaz_iconv_encoder_t e)
@@
-421,7
+423,8
@@
yaz_iconv_encoder_t yaz_marc8_encoder(const char *tocode,
return 0;
{
return 0;
{
- struct encoder_data *data = xmalloc(sizeof(*data));
+ struct encoder_data *data = (struct encoder_data *)
+ xmalloc(sizeof(*data));
e->data = data;
e->destroy_handle = destroy_marc8;
e->flush_handle = flush_marc8;
e->data = data;
e->destroy_handle = destroy_marc8;
e->flush_handle = flush_marc8;