X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zutil%2Fcharneg.c;h=726d4f1e4a193a068b6b5a7b43a80b457adec5b1;hb=c39a893dfdae5f792139177132e7e7a70e010aa7;hp=f8a5fd0fd8c5057e99a5c09507929c4e2be0011b;hpb=c903bb04318c52d60fd18b12aba1fe16ade8fc65;p=yaz-moved-to-github.git diff --git a/zutil/charneg.c b/zutil/charneg.c index f8a5fd0..726d4f1 100644 --- a/zutil/charneg.c +++ b/zutil/charneg.c @@ -1,5 +1,5 @@ /* - $ $Id: charneg.c,v 1.4 2002-07-25 12:50:17 adam Exp $ + $ $Id: charneg.c,v 1.7 2002-10-04 19:06:25 adam Exp $ * Helper functions for Character Set and Language Negotiation - 3 */ @@ -7,6 +7,7 @@ #include #include #include +#include static Z_External* z_ext_record2(ODR o, int oid_class, int oid_value, const char *buf, int len) @@ -20,8 +21,8 @@ static Z_External* z_ext_record2(ODR o, int oid_class, int oid_value, p->indirect_reference = 0; oid.proto = PROTO_Z3950; - oid.oclass = oid_class; - oid.value = oid_value; + oid.oclass = (enum oid_class) oid_class; + oid.value = (enum oid_value) oid_value; p->direct_reference = odr_oiddup(o, oid_getoidbyent(&oid)); p->which = Z_External_octet; @@ -42,13 +43,13 @@ static int get_form(const char *charset) int form = -1; - if (!strcmp (charset, "UCS-2")) + if (!yaz_matchstr(charset, "UCS-2")) form = 2; - if (!strcmp (charset, "UCS-4")) + if (!yaz_matchstr(charset, "UCS-4")) form = 4; - if (!strcmp (charset, "UTF-16")) + if (!yaz_matchstr(charset, "UTF-16")) form = 5; - if (!strcmp (charset, "UTF-8")) + if (!yaz_matchstr(charset, "UTF-8")) form = 8; return form;