From: Adam Dickmeiss Date: Thu, 29 Jan 1998 13:18:29 +0000 (+0000) Subject: Removed Unicode file. X-Git-Tag: YAZ.1.8~535 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=68f97633042d0d38061ff47aad35b46b3c4ab9a8;p=yaz-moved-to-github.git Removed Unicode file. --- diff --git a/odr/Makefile b/odr/Makefile index 54071a9..0512fb8 100644 --- a/odr/Makefile +++ b/odr/Makefile @@ -1,7 +1,7 @@ -# Copyright (C) 1994, Index Data I/S +# Copyright (C) 1995-1998, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile,v 1.26 1997-09-17 12:10:33 adam Exp $ +# $Id: Makefile,v 1.27 1998-01-29 13:18:29 adam Exp $ SHELL=/bin/sh INCLUDE=-I../include -I. @@ -13,8 +13,7 @@ LIBS=-lodr PO = odr_bool.o ber_bool.o ber_len.o ber_tag.o odr_util.o odr_null.o \ ber_null.o odr_int.o ber_int.o odr_tag.o odr_cons.o odr_seq.o\ odr_oct.o ber_oct.o odr_bit.o ber_bit.o odr_oid.o ber_oid.o odr_use.o \ - odr_choice.o odr_any.o ber_any.o odr.o odr_mem.o dumpber.o \ - odr_unicode.o + odr_choice.o odr_any.o ber_any.o odr.o odr_mem.o dumpber.o CPP=$(CC) -E RANLIB=ranlib diff --git a/odr/odr_unicode.c b/odr/odr_unicode.c deleted file mode 100644 index 0588cba..0000000 --- a/odr/odr_unicode.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 1997, Index Data - * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss - * - * $Log: odr_unicode.c,v $ - * Revision 1.1 1997-09-17 12:25:49 adam - * First Unicode attempt. - * - */ - -#include - -#if YAZ_UNICODE -int odr_unicode(ODR o, wchar_t **p, int opt) -{ - int cons = 0, res; - Odr_oct *t; - - if (o->error) - return 0; - if (o->t_class < 0) - { - o->t_class = ODR_UNIVERSAL; - o->t_tag = ODR_OCTETSTRING; - } - if ((res = ber_tag(o, p, o->t_class, o->t_tag, &cons, opt)) < 0) - return 0; - if (!res) - return opt; - if (o->direction == ODR_PRINT) - { - size_t i, wlen = wcslen(*p); - fprintf(o->print, "%sL'", odr_indent(o)); - for (i = 0; i < wlen; i++) - { - if ((*p)[i] > 126 || (*p)[i] == '\\') - fprintf (o->print, "\\%04lX", (*p)[i]); - else - { - int ch = (*p)[i]; - fprintf (o->print, "%c", ch); - } - } - fprintf(o->print, "'\n"); - return 1; - } - t = odr_malloc(o, sizeof(Odr_oct)); - if (o->direction == ODR_ENCODE) - { - size_t i, wlen = 1+wcslen(*p); - t->size = t->len = wlen*2; - t->buf = odr_malloc (o, t->size); - for (i = 0; i < wlen; i++) - { - t->buf[i*2] = (*p)[i] & 255; - t->buf[i*2+1] = ((*p)[i] >> 8) & 255; - } - } - else - { - t->size= 0; - t->len = 0; - t->buf = 0; - } - if (!ber_octetstring(o, t, cons)) - return 0; - if (o->direction == ODR_DECODE) - { - size_t i, wlen = t->len/2; - *p = odr_malloc (o, wlen*sizeof(**p)); - for (i = 0; ibuf[i*2] + (t->buf[i*2+1]<<8); - } - return 1; -} - -#endif