projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Call chdir before bend_{start,stop}.
[yaz-moved-to-github.git]
/
src
/
oid.c
diff --git
a/src/oid.c
b/src/oid.c
index
2b7fb2d
..
ac33b0e
100644
(file)
--- 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.
*
* See the file LICENSE for details.
*
- * $Id: oid.c,v 1.1 2003-10-27 12:21:34 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.
* 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.
@@
-98,6
+101,8
@@
static oident standard_oids[] =
"Thesaurus-attset"},
{PROTO_Z3950, CLASS_ATTSET, VAL_IDXPATH, {3,1000,81,2,-1},
"IDXPATH"},
"Thesaurus-attset"},
{PROTO_Z3950, CLASS_ATTSET, VAL_IDXPATH, {3,1000,81,2,-1},
"IDXPATH"},
+ {PROTO_Z3950, CLASS_ATTSET, VAL_EXTLITE, {3,1000,81,3,-1},
+ "EXTLITE"},
{PROTO_Z3950, CLASS_DIAGSET, VAL_BIB1, {4,1,-1},
"Bib-1"},
{PROTO_Z3950, CLASS_DIAGSET, VAL_DIAG1, {4,2,-1},
{PROTO_Z3950, CLASS_DIAGSET, VAL_BIB1, {4,1,-1},
"Bib-1"},
{PROTO_Z3950, CLASS_DIAGSET, VAL_DIAG1, {4,2,-1},
@@
-112,6
+117,9
@@
static oident standard_oids[] =
"Intermarc"},
{PROTO_Z3950, CLASS_RECSYN, VAL_CCF, {5,3,-1},
"CCF"},
"Intermarc"},
{PROTO_Z3950, CLASS_RECSYN, VAL_CCF, {5,3,-1},
"CCF"},
+ /* MARC21 is just an alias for the original USmarc */
+ {PROTO_Z3950, CLASS_RECSYN, VAL_USMARC, {5,10,-1},
+ "MARC21"},
{PROTO_Z3950, CLASS_RECSYN, VAL_USMARC, {5,10,-1},
"USmarc"},
{PROTO_Z3950, CLASS_RECSYN, VAL_UKMARC, {5,11,-1},
{PROTO_Z3950, CLASS_RECSYN, VAL_USMARC, {5,10,-1},
"USmarc"},
{PROTO_Z3950, CLASS_RECSYN, VAL_UKMARC, {5,11,-1},
@@
-152,6
+160,12
@@
static oident standard_oids[] =
"RUSmarc"},
{PROTO_Z3950, CLASS_RECSYN, VAL_HUNMARC, {5,29,-1},
"Hunmarc"},
"RUSmarc"},
{PROTO_Z3950, CLASS_RECSYN, VAL_HUNMARC, {5,29,-1},
"Hunmarc"},
+ {PROTO_Z3950, CLASS_RECSYN, VAL_NACSISCATP, {5,30,-1},
+ "NACSIS-CATP"},
+ {PROTO_Z3950, CLASS_RECSYN, VAL_FINMARC2000, {5,31,-1},
+ "FINMARC2000"},
+ {PROTO_Z3950, CLASS_RECSYN, VAL_MARC21FIN, {5,32,-1},
+ "MARC21-fin"},
{PROTO_Z3950, CLASS_RECSYN, VAL_EXPLAIN, {5,100,-1},
"Explain"},
{PROTO_Z3950, CLASS_RECSYN, VAL_SUTRS, {5,101,-1},
{PROTO_Z3950, CLASS_RECSYN, VAL_EXPLAIN, {5,100,-1},
"Explain"},
{PROTO_Z3950, CLASS_RECSYN, VAL_SUTRS, {5,101,-1},
@@
-297,6
+311,8
@@
static oident standard_oids[] =
"Zthes-tagset"},
{PROTO_Z3950, CLASS_NEGOT, VAL_CHARNEG3, {15,3,-1},
"CharSetandLanguageNegotiation-3"},
"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},
{PROTO_Z3950, CLASS_NEGOT, VAL_ID_CHARSET, {15,1000,81,1,-1},
"ID-Charset" },
{PROTO_Z3950, CLASS_USERINFO,VAL_CQL, {16, 2, -1},
@@
-526,7
+542,7
@@
static oid_value oid_getval_raw(const char *name)
int val = 0, i = 0, oid[OID_SIZE];
struct oident *oident;
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++;
{
val = val*10 + (*name - '0');
name++;
@@
-552,7
+568,7
@@
oid_value oid_getvalbyname(const char *name)
struct oident_list *ol;
oid_init ();
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))
return oid_getval_raw (name);
for (ol = oident_table; ol; ol = ol->next)
if (!yaz_matchstr(ol->oident.desc, name))