New function diagbib1_str.
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 15 Mar 1995 13:46:09 +0000 (13:46 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 15 Mar 1995 13:46:09 +0000 (13:46 +0000)
asn/Makefile
asn/diagbib1.c [new file with mode: 0644]

index c662664..3b59313 100644 (file)
@@ -1,7 +1,7 @@
 # Copyright (C) 1994, Index Data I/S 
 # All rights reserved.
 # Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile,v 1.4 1995-03-14 10:27:12 quinn Exp $
+# $Id: Makefile,v 1.5 1995-03-15 13:46:09 adam Exp $
 
 SHELL=/bin/sh
 INCLUDE=-I../include -I. -I../odr
@@ -11,7 +11,7 @@ LIBINCLUDE=-L$(LIBDIR)
 DEFS=$(INCLUDE)
 LIB=$(LIBDIR)/libasn.a
 LIBS=-lodr -lasn
-PO = proto.o
+PO = proto.o diagbib1.o
 CPP=cc -E
 
 all: $(LIBDIR) $(LIB)
diff --git a/asn/diagbib1.c b/asn/diagbib1.c
new file mode 100644 (file)
index 0000000..66d22fb
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 1994, Index Data I/S 
+ * All rights reserved.
+ * Sebastian Hammer, Adam Dickmeiss
+ *
+ * $Log: diagbib1.c,v $
+ * Revision 1.1  1995-03-15 13:46:09  adam
+ * New function diagbib1_str.
+ *
+ */
+
+#include <stdio.h>
+
+#include "diagbib1.h"
+
+struct {
+    int code;
+    char *msg;
+} msg_tab[] = {
+{ 1, "Permanent system error" },
+{ 2, "Temporary system error" },
+{ 3, "Unsupported search" },
+{ 4, "Terms only exclusion (stop) words" },
+{ 5, "Too many argument words" },
+{ 6, "Too many boolean operators" },
+{ 7, "Too many truncated words" },
+{ 8, "Too many incomplete subfields" },
+{ 9, "Truncated words too short" },
+{ 10, "Invalid format for record number (search term)" },
+{ 11, "Too many characters in search statement" },
+{ 12, "Too many records retrieved" },
+{ 13, "Present request out of range" },
+{ 14, "System error in presenting records" },
+{ 15, "Record no authorized to be sent intersystem" },
+{ 16, "Record exceeds Preferred-message-size" },
+{ 17, "Record exceeds Maximum-record-size" },
+{ 18, "Result set not supported as a search term" },
+{ 19, "Only single result set as search term supported" },
+{ 20, "Only ANDing of a single result set as search term supported" },
+{ 21, "Result set exists and replace indicator off" },
+{ 22, "Result set naming not supported" },
+{ 23, "Combination of specified databases not supported" },
+{ 24, "Element set names not supported" },
+{ 25, "Specified element set name not valid for specified database" },
+{ 26, "Only a single element set name supported" },
+{ 27, "Result set no longer exists - unilaterally deleted by target" },
+{ 28, "Result set is in use" },
+{ 29, "One of the specified databases is locked" },
+{ 30, "Specified result set does not exist" },
+{ 31, "Resources exhausted - no results available" },
+{ 32, "Resources exhausted - unpredictable partial results available" },
+{ 33, "Resources exhausted - valid subset of results available" },
+{ 100, "Unspecified error" },
+{ 101, "Access-control failure" },
+{ 102, "Security challenge required but could not be issued -"
+" request terminated" },
+{ 103, "Security challenge required but could not be issued -"
+" record not included" },
+{ 104, "Security challenge failed - record not included" },
+{ 105, "Terminated by negative continue response" },
+{ 106, "No abstract syntaxes agreed to for this record" },
+{ 107, "Query type not supported" },
+{ 108, "Malformed query" },
+{ 109, "Database unavailable" },
+{ 110, "Operator unsupported" },
+{ 111, "Too many databases specified" },
+{ 112, "Too many result sets created" },
+{ 113, "Unsupported attribute type" },
+{ 114, "Unsupported Use attribute" },
+{ 115, "Unsupported value for Use attribute" },
+{ 116, "Use attribute required but not supplied" },
+{ 117, "Unsupported Relation attribute" },
+{ 118, "Unsupported Structure attribute" },
+{ 119, "Unsupported Position attribute" },
+{ 120, "Unsupported Truncation attribute" },
+{ 121, "Unsupported Attribute Set" },
+{ 122, "Unsupported Completeness attribute" },
+{ 123, "Unsupported attribute combination" },
+{ 124, "Unsupported coded value for term" },
+{ 125, "Malformed search term" },
+{ 126, "Illegal term value for attribute" },
+{ 127, "Unparsable format for un-normalized value" },
+{ 128, "Illegal result set name" },
+{ 129, "Proximity search of sets not supported" },
+{ 130, "Illegal result set in proximity search" },
+{ 131, "Unsupported proximity relation" },
+{ 132, "Unsupported proximity unit code" },
+{ 0, NULL} 
+};
+
+const char *diagbib1_str (int code)
+{
+    int i;
+    for (i=0; msg_tab[i].msg; i++)
+        if (msg_tab[i].code == code)
+            return msg_tab[i].msg;
+    return "Unknown error";
+}