X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fodr_oct.c;h=f359c4c5a1969670f0560755556263d335ad781d;hp=5dd02bb893d21eb19f7db85d5912d4a0fc8957ed;hb=1f1e067ae72eff85b653b72f9450ee6b50dcc272;hpb=9e7bca777f3d5a7108fc06b203fbf890848be8b3 diff --git a/src/odr_oct.c b/src/odr_oct.c index 5dd02bb..f359c4c 100644 --- a/src/odr_oct.c +++ b/src/odr_oct.c @@ -1,8 +1,6 @@ -/* - * Copyright (C) 1995-2007, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2013 Index Data * See the file LICENSE for details. - * - * $Id: odr_oct.c,v 1.13 2007-05-21 11:51:01 adam Exp $ */ /** * \file odr_oct.c @@ -143,9 +141,9 @@ int odr_iconv_string(ODR o, char **p, int opt, const char *name) size_t outleft = 4 * inleft + 2; char *outbuf = (char *) odr_malloc (o, outleft); size_t ret; - + t->buf = (unsigned char *) outbuf; - + ret = yaz_iconv(o->op->iconv_handle, &inbuf, &inleft, &outbuf, &outleft); if (ret == (size_t)(-1)) @@ -190,7 +188,7 @@ int odr_iconv_string(ODR o, char **p, int opt, const char *name) size_t ret; *p = outbuf; - + ret = yaz_iconv (o->op->iconv_handle, &inbuf, &inleft, &outbuf, &outleft); if (ret == (size_t)(-1)) @@ -206,7 +204,7 @@ int odr_iconv_string(ODR o, char **p, int opt, const char *name) return 0; } inleft = outbuf - (char*) *p; - + (*p)[inleft] = '\0'; /* null terminate it */ } if (!*p) @@ -220,6 +218,7 @@ int odr_iconv_string(ODR o, char **p, int opt, const char *name) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab