X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fcharneg.c;h=2531346e56db8f53824fc447b33311f06c0efb21;hp=4125d26dc3cc24853930ad72b01d9f5cdb6d31df;hb=b675ebc81ebe1f2cb7d28b4ce43a51ad5cb39598;hpb=cabcc223cd47503763e7c42969e3be30c58276af diff --git a/src/charneg.c b/src/charneg.c index 4125d26..2531346 100644 --- a/src/charneg.c +++ b/src/charneg.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ /** @@ -28,20 +28,10 @@ static Z_External* z_ext_record2(ODR o, const char *buf) return 0; p->descriptor = 0; p->indirect_reference = 0; - p->direct_reference = odr_oiddup(o, yaz_oid_negot_charset_id); - p->which = Z_External_octet; - if (!(p->u.octet_aligned = (Odr_oct *)odr_malloc(o, sizeof(Odr_oct)))) - return 0; - if (!(p->u.octet_aligned->buf = (unsigned char *)odr_malloc(o, len))) - return 0; - p->u.octet_aligned->len = len; -#if OCT_SIZE - p->u.octet_aligned->size = len; -#endif - memcpy(p->u.octet_aligned->buf, buf, len); - + p->u.octet_aligned = + odr_create_Odr_oct(o, buf, len); return p; }