Rustam's patch
[yaz-moved-to-github.git] / util / oid.c
index 284533b..3b71395 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 1995-2002, Index Data
  * See the file LICENSE for details.
  *
- * $Id: oid.c,v 1.51 2002-01-26 20:50:59 adam Exp $
+ * $Id: oid.c,v 1.53 2002-02-11 23:25:26 adam Exp $
  */
 
 /*
@@ -283,6 +283,16 @@ static oident standard_oids[] =
      "thesaurus-tagset"},
     {PROTO_Z3950,   CLASS_TAGSET,  VAL_EXPLAIN,      {14,1000,81,2,-1},
      "Explain-tagset"},
+    {PROTO_Z3950,   CLASS_NEGOT,   VAL_CHARNEG3,     {15,3,-1},
+     "CharSetandLanguageNegotiation-3"},
+    {PROTO_GENERAL, CLASS_GENERAL, VAL_UCS2,    {1,0,10646,1,0,2,-1},
+     "UCS-2"},
+    {PROTO_GENERAL, CLASS_GENERAL, VAL_UCS4,    {1,0,10646,1,0,4,-1},
+     "UCS-4"},
+    {PROTO_GENERAL, CLASS_GENERAL, VAL_UTF16,   {1,0,10646,1,0,5,-1},
+     "UTF-16"},
+    {PROTO_GENERAL, CLASS_GENERAL, VAL_UTF8,    {1,0,10646,1,0,8,-1},
+     "UTF-8"},
     {PROTO_NOP,     CLASS_NOP,     VAL_NOP,       {-1},        0          }
 };
 
@@ -538,3 +548,12 @@ void oid_setprivateoids(oident *list)
 {
     oid_transfer (list);
 }
+
+void oid_trav (void (*func)(struct oident *oidinfo, void *vp), void *vp)
+{
+    struct oident_list *ol;
+
+    oid_init ();
+    for (ol = oident_table; ol; ol = ol->next)
+        (*func)(&ol->oident, vp);
+}