X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Foid.c;h=6ba7250cdeac7288815fc657f893460243ded70b;hb=97e0cd0e1341f4b75216dec7c95f7a4627f4e63d;hp=55ba75223941477856a832e67fe43fe1c3f00c9e;hpb=9006495b0949ec4c474866cb69376653540b1aab;p=yaz-moved-to-github.git diff --git a/util/oid.c b/util/oid.c index 55ba752..6ba7250 100644 --- a/util/oid.c +++ b/util/oid.c @@ -1,10 +1,17 @@ /* - * Copyright (c) 1995, Index Data + * Copyright (c) 1995-1997, Index Data * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * * $Log: oid.c,v $ - * Revision 1.23 1997-09-09 10:10:19 adam + * Revision 1.25 1998-02-10 15:32:03 adam + * Added new Object Identifiers. + * + * Revision 1.24 1997/09/29 13:19:00 adam + * Added function, oid_ent_to_oid, to replace the function + * oid_getoidbyent, which is not thread safe. + * + * Revision 1.23 1997/09/09 10:10:19 adam * Another MSV5.0 port. Changed projects to include proper * library/include paths. * Server starts server in test-mode when no options are given. @@ -161,6 +168,21 @@ static oident oids[] = {PROTO_Z3950, CLASS_RECSYN, VAL_GRS1, {5,105,-1}, "GRS-1" }, {PROTO_Z3950, CLASS_RECSYN, VAL_EXTENDED, {5,106,-1}, "Extended" }, {PROTO_Z3950, CLASS_RECSYN, VAL_FRAGMENT, {5,107,-1}, "Fragment" }, + + {PROTO_Z3950, CLASS_RECSYN, VAL_PDF, {5,109,1,-1},"pdf" }, + {PROTO_Z3950, CLASS_RECSYN, VAL_POSTSCRIPT,{5,109,2,-1},"postscript" }, + {PROTO_Z3950, CLASS_RECSYN, VAL_HTML, {5,109,3,-1},"html" }, + {PROTO_Z3950, CLASS_RECSYN, VAL_TIFF, {5,109,4,-1},"tiff" }, + {PROTO_Z3950, CLASS_RECSYN, VAL_GIF, {5,109,5,-1},"gif" }, + {PROTO_Z3950, CLASS_RECSYN, VAL_JPEG, {5,109,6,-1},"jpeg" }, + {PROTO_Z3950, CLASS_RECSYN, VAL_PNG, {5,109,7,-1},"png" }, + {PROTO_Z3950, CLASS_RECSYN, VAL_MPEG, {5,109,8,-1},"mpeg" }, + {PROTO_Z3950, CLASS_RECSYN, VAL_SGML, {5,109,9,-1},"sgml" }, + + {PROTO_Z3950, CLASS_RECSYN, VAL_TIFFB, {5,110,1,-1},"tiff-b" }, + {PROTO_Z3950, CLASS_RECSYN, VAL_WAV, {5,110,2,-1},"wav" }, + + {PROTO_Z3950, CLASS_RECSYN, VAL_SQLRS, {5,111,-1}, "SQL-RS" }, #if 0 {PROTO_Z3950, CLASS_RECSYN, VAL_ID_SGML, {5,1000,81,1,-1},"ID-SGML" }, #endif @@ -182,6 +204,11 @@ static oident oids[] = {PROTO_Z3950, CLASS_EXTSERV, VAL_EXPORTINV, {9,7,-1}, "exp. inv." }, {PROTO_Z3950, CLASS_USERINFO,VAL_SEARCHRES1,{10,1,-1}, "searchResult-1"}, + {PROTO_Z3950, CLASS_USERINFO,VAL_CHARLANG, {10,2,-1}, "CharSetandLanguageNegotiation"}, + {PROTO_Z3950, CLASS_USERINFO,VAL_USERINFO1, {10,3,-1}, "UserInfo-1"}, + {PROTO_Z3950, CLASS_USERINFO,VAL_MULTISRCH1,{10,4,-1}, "MultipleSearchTerms-1"}, + {PROTO_Z3950, CLASS_USERINFO,VAL_MULTISRCH2,{10,5,-1}, "MultipleSearchTerms-2"}, + {PROTO_Z3950, CLASS_USERINFO,VAL_DATETIME, {10,6,-1}, "DateTime"}, {PROTO_Z3950, CLASS_ELEMSPEC,VAL_ESPEC1, {11,1,-1}, "Espec-1" }, @@ -192,6 +219,7 @@ static oident oids[] = {PROTO_Z3950, CLASS_SCHEMA, VAL_COLLECT1, {13,3,-1}, "Collections-schema" }, {PROTO_Z3950, CLASS_SCHEMA, VAL_GEO, {13,4,-1}, "Geo-schema" }, {PROTO_Z3950, CLASS_SCHEMA, VAL_CIMI1, {13,5,-1}, "CIMI-schema" }, + {PROTO_Z3950, CLASS_SCHEMA, VAL_UPDATEES, {13,6,-1}, "Update ES" }, {PROTO_Z3950, CLASS_TAGSET, VAL_SETM, {14,1,-1}, "TagsetM" }, {PROTO_Z3950, CLASS_TAGSET, VAL_SETG, {14,2,-1}, "TagsetG" }, @@ -359,13 +387,13 @@ struct oident *oid_getentbyoid(int *o) return 0; } + /* * To query, fill out proto, class, and value of the ent parameter. */ -int *oid_getoidbyent(struct oident *ent) +int *oid_ent_to_oid(struct oident *ent, int *ret) { struct oident *p; - static int ret[OID_SIZE]; for (p = oids; *p->oidsuffix >= 0; p++) if (ent->proto == p->proto && @@ -398,6 +426,15 @@ int *oid_getoidbyent(struct oident *ent) } return 0; } +/* + * To query, fill out proto, class, and value of the ent parameter. + */ +int *oid_getoidbyent(struct oident *ent) +{ + static int ret[OID_SIZE]; + + return oid_ent_to_oid (ent, ret); +} oid_value oid_getvalbyname(const char *name) {