X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zutil%2Fz3950oid.c;h=90f6b66cfd64cd4102249b337e0c0f4b58acc1d9;hb=e74dfc354e4695e5238bc77f39c879e1d9fc6f20;hp=b0b6a591283c88bbb67db53ff09c7062e2c639a9;hpb=524904b45367ae17d287704bdbbe0744866fdd23;p=yaz-moved-to-github.git diff --git a/zutil/z3950oid.c b/zutil/z3950oid.c index b0b6a59..90f6b66 100644 --- a/zutil/z3950oid.c +++ b/zutil/z3950oid.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2002, Index Data * See the file LICENSE for details. * - * $Id: z3950oid.c,v 1.2 2002-01-28 09:27:17 adam Exp $ + * $Id: z3950oid.c,v 1.4 2002-09-20 22:30:01 adam Exp $ */ #if HAVE_CONFIG_H @@ -50,3 +50,33 @@ const char *yaz_z3950oid_to_str (Odr_oid *oid, int *oid_class) *oid_class = ident->oclass; return ident->desc; } + + +const char* yaz_z3950_oid_value_to_str(oid_value ov, oid_class oc) +{ + struct oident tmpentry; + int tmp_oid[OID_SIZE]; + + tmpentry.proto = PROTO_Z3950; + tmpentry.oclass = oc; + tmpentry.value = ov; + + if( oid_ent_to_oid(&tmpentry,tmp_oid) ) + { + return tmpentry.desc; + } + else + { + return ""; + } +} + + +/* + * Local variables: + * tab-width: 8 + * c-basic-offset: 4 + * End: + * vim600: sw=4 ts=8 fdm=marker + * vim<600: sw=4 ts=8 + */