X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Foid.c;h=ac33b0e58348d03446e5260d942aee05d91b7cc5;hb=60a702f390f7e2addfdab79f2328db3ba2897c8b;hp=ed33f0246a9bafdecfb56f28cd3569aec6060c40;hpb=81c23570ac55dbb3faa04a6625a45d9c617c5c02;p=yaz-moved-to-github.git diff --git a/src/oid.c b/src/oid.c index ed33f02..ac33b0e 100644 --- a/src/oid.c +++ b/src/oid.c @@ -1,11 +1,14 @@ /* - * Copyright (c) 1995-2003, Index Data + * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: oid.c,v 1.3 2003-11-19 22:24:57 adam Exp $ + * $Id: oid.c,v 1.7 2005-01-15 19:47:14 adam Exp $ */ -/* +/** + * \file oid.c + * \brief Implements OID database + * * More or less protocol-transparent OID database. * We could (and should?) extend this so that the user app can add new * entries to the list at initialization. @@ -308,6 +311,8 @@ static oident standard_oids[] = "Zthes-tagset"}, {PROTO_Z3950, CLASS_NEGOT, VAL_CHARNEG3, {15,3,-1}, "CharSetandLanguageNegotiation-3"}, + {PROTO_Z3950, CLASS_NEGOT, VAL_CHARNEG4, {15,4,-1}, + "CharSetandLanguageNegotiation-4"}, {PROTO_Z3950, CLASS_NEGOT, VAL_ID_CHARSET, {15,1000,81,1,-1}, "ID-Charset" }, {PROTO_Z3950, CLASS_USERINFO,VAL_CQL, {16, 2, -1}, @@ -537,7 +542,7 @@ static oid_value oid_getval_raw(const char *name) int val = 0, i = 0, oid[OID_SIZE]; struct oident *oident; - while (isdigit (*name)) + while (isdigit (*(const unsigned char *) name)) { val = val*10 + (*name - '0'); name++; @@ -563,7 +568,7 @@ oid_value oid_getvalbyname(const char *name) struct oident_list *ol; oid_init (); - if (isdigit (*name)) + if (isdigit (*(const unsigned char *) name)) return oid_getval_raw (name); for (ol = oident_table; ol; ol = ol->next) if (!yaz_matchstr(ol->oident.desc, name))