a2c71293ce6fa33167ba7aa5a90ea4d4ba78e8c5
[yaz-moved-to-github.git] / asn / diagbib1.c
1 /*
2  * Copyright (c) 1995, Index Data
3  * See the file LICENSE for details.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: diagbib1.c,v $
7  * Revision 1.2  1995-05-16 08:50:21  quinn
8  * License, documentation, and memory fixes
9  *
10  * Revision 1.1  1995/03/15  13:46:09  adam
11  * New function diagbib1_str.
12  *
13  */
14
15 #include <stdio.h>
16
17 #include "diagbib1.h"
18
19 struct {
20     int code;
21     char *msg;
22 } msg_tab[] = {
23 { 1, "Permanent system error" },
24 { 2, "Temporary system error" },
25 { 3, "Unsupported search" },
26 { 4, "Terms only exclusion (stop) words" },
27 { 5, "Too many argument words" },
28 { 6, "Too many boolean operators" },
29 { 7, "Too many truncated words" },
30 { 8, "Too many incomplete subfields" },
31 { 9, "Truncated words too short" },
32 { 10, "Invalid format for record number (search term)" },
33 { 11, "Too many characters in search statement" },
34 { 12, "Too many records retrieved" },
35 { 13, "Present request out of range" },
36 { 14, "System error in presenting records" },
37 { 15, "Record no authorized to be sent intersystem" },
38 { 16, "Record exceeds Preferred-message-size" },
39 { 17, "Record exceeds Maximum-record-size" },
40 { 18, "Result set not supported as a search term" },
41 { 19, "Only single result set as search term supported" },
42 { 20, "Only ANDing of a single result set as search term supported" },
43 { 21, "Result set exists and replace indicator off" },
44 { 22, "Result set naming not supported" },
45 { 23, "Combination of specified databases not supported" },
46 { 24, "Element set names not supported" },
47 { 25, "Specified element set name not valid for specified database" },
48 { 26, "Only a single element set name supported" },
49 { 27, "Result set no longer exists - unilaterally deleted by target" },
50 { 28, "Result set is in use" },
51 { 29, "One of the specified databases is locked" },
52 { 30, "Specified result set does not exist" },
53 { 31, "Resources exhausted - no results available" },
54 { 32, "Resources exhausted - unpredictable partial results available" },
55 { 33, "Resources exhausted - valid subset of results available" },
56 { 100, "Unspecified error" },
57 { 101, "Access-control failure" },
58 { 102, "Security challenge required but could not be issued -"
59 " request terminated" },
60 { 103, "Security challenge required but could not be issued -"
61 " record not included" },
62 { 104, "Security challenge failed - record not included" },
63 { 105, "Terminated by negative continue response" },
64 { 106, "No abstract syntaxes agreed to for this record" },
65 { 107, "Query type not supported" },
66 { 108, "Malformed query" },
67 { 109, "Database unavailable" },
68 { 110, "Operator unsupported" },
69 { 111, "Too many databases specified" },
70 { 112, "Too many result sets created" },
71 { 113, "Unsupported attribute type" },
72 { 114, "Unsupported Use attribute" },
73 { 115, "Unsupported value for Use attribute" },
74 { 116, "Use attribute required but not supplied" },
75 { 117, "Unsupported Relation attribute" },
76 { 118, "Unsupported Structure attribute" },
77 { 119, "Unsupported Position attribute" },
78 { 120, "Unsupported Truncation attribute" },
79 { 121, "Unsupported Attribute Set" },
80 { 122, "Unsupported Completeness attribute" },
81 { 123, "Unsupported attribute combination" },
82 { 124, "Unsupported coded value for term" },
83 { 125, "Malformed search term" },
84 { 126, "Illegal term value for attribute" },
85 { 127, "Unparsable format for un-normalized value" },
86 { 128, "Illegal result set name" },
87 { 129, "Proximity search of sets not supported" },
88 { 130, "Illegal result set in proximity search" },
89 { 131, "Unsupported proximity relation" },
90 { 132, "Unsupported proximity unit code" },
91 { 0, NULL} 
92 };
93
94 const char *diagbib1_str (int code)
95 {
96     int i;
97     for (i=0; msg_tab[i].msg; i++)
98         if (msg_tab[i].code == code)
99             return msg_tab[i].msg;
100     return "Unknown error";
101 }