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
Fix: Setting env YAZ_LOG makes YAZ hang YAZ-745
[yaz-moved-to-github.git]
/
src
/
ucs4.c
diff --git
a/src/ucs4.c
b/src/ucs4.c
index
fb2b8c3
..
8b677c4
100644
(file)
--- a/
src/ucs4.c
+++ b/
src/ucs4.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
/**
* See the file LICENSE for details.
*/
/**
@@
-14,7
+14,6
@@
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
#include <string.h>
-#include <ctype.h>
#include "iconv-p.h"
#include "iconv-p.h"
@@
-23,7
+22,7
@@
static unsigned long read_UCS4(yaz_iconv_t cd, yaz_iconv_decoder_t d,
size_t inbytesleft, size_t *no_read)
{
unsigned long x = 0;
size_t inbytesleft, size_t *no_read)
{
unsigned long x = 0;
-
+
if (inbytesleft < 4)
{
yaz_iconv_set_errno(cd, YAZ_ICONV_EINVAL); /* incomplete input */
if (inbytesleft < 4)
{
yaz_iconv_set_errno(cd, YAZ_ICONV_EINVAL); /* incomplete input */
@@
-42,7
+41,7
@@
static unsigned long read_UCS4LE(yaz_iconv_t cd, yaz_iconv_decoder_t d,
size_t inbytesleft, size_t *no_read)
{
unsigned long x = 0;
size_t inbytesleft, size_t *no_read)
{
unsigned long x = 0;
-
+
if (inbytesleft < 4)
{
yaz_iconv_set_errno(cd, YAZ_ICONV_EINVAL); /* incomplete input */
if (inbytesleft < 4)
{
yaz_iconv_set_errno(cd, YAZ_ICONV_EINVAL); /* incomplete input */
@@
-103,7
+102,7
@@
static size_t write_UCS4LE(yaz_iconv_t cd, yaz_iconv_encoder_t en,
yaz_iconv_encoder_t yaz_ucs4_encoder(const char *tocode,
yaz_iconv_encoder_t e)
yaz_iconv_encoder_t yaz_ucs4_encoder(const char *tocode,
yaz_iconv_encoder_t e)
-
+
{
if (!yaz_matchstr(tocode, "UCS4"))
e->write_handle = write_UCS4;
{
if (!yaz_matchstr(tocode, "UCS4"))
e->write_handle = write_UCS4;
@@
-116,7
+115,7
@@
yaz_iconv_encoder_t yaz_ucs4_encoder(const char *tocode,
yaz_iconv_decoder_t yaz_ucs4_decoder(const char *tocode,
yaz_iconv_decoder_t d)
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;
{
if (!yaz_matchstr(tocode, "UCS4"))
d->read_handle = read_UCS4;
@@
-132,7
+131,9
@@
yaz_iconv_decoder_t yaz_ucs4_decoder(const char *tocode,
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
*/
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
*/
+