Minor fix.
[yaz-moved-to-github.git] / asn / diagbib1.c
1 /*
2  * Copyright (c) 1995-1997, Index Data
3  * See the file LICENSE for details.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: diagbib1.c,v $
7  * Revision 1.7  1997-09-29 07:22:26  adam
8  * Added static modifier to msg_tab.
9  *
10  * Revision 1.6  1997/07/01 14:15:10  adam
11  * Added new BIB-1 diagnostic messages.
12  *
13  * Revision 1.5  1996/01/02 13:57:30  adam
14  * Added error messages.
15  *
16  * Revision 1.4  1995/09/29  17:11:52  quinn
17  * Smallish
18  *
19  * Revision 1.3  1995/09/27  15:02:39  quinn
20  * Modified function heads & prototypes.
21  *
22  * Revision 1.2  1995/05/16  08:50:21  quinn
23  * License, documentation, and memory fixes
24  *
25  * Revision 1.1  1995/03/15  13:46:09  adam
26  * New function diagbib1_str.
27  *
28  */
29
30 #include <stdio.h>
31
32 #include "diagbib1.h"
33
34 static struct {
35     int code;
36     char *msg;
37 } msg_tab[] = {
38 { 1, "Permanent system error" },
39 { 2, "Temporary system error" },
40 { 3, "Unsupported search" },
41 { 4, "Terms only exclusion (stop) words" },
42 { 5, "Too many argument words" },
43 { 6, "Too many boolean operators" },
44 { 7, "Too many truncated words" },
45 { 8, "Too many incomplete subfields" },
46 { 9, "Truncated words too short" },
47 { 10, "Invalid format for record number (search term)" },
48 { 11, "Too many characters in search statement" },
49 { 12, "Too many records retrieved" },
50 { 13, "Present request out of range" },
51 { 14, "System error in presenting records" },
52 { 15, "Record no authorized to be sent intersystem" },
53 { 16, "Record exceeds Preferred-message-size" },
54 { 17, "Record exceeds Maximum-record-size" },
55 { 18, "Result set not supported as a search term" },
56 { 19, "Only single result set as search term supported" },
57 { 20, "Only ANDing of a single result set as search term supported" },
58 { 21, "Result set exists and replace indicator off" },
59 { 22, "Result set naming not supported" },
60 { 23, "Combination of specified databases not supported" },
61 { 24, "Element set names not supported" },
62 { 25, "Specified element set name not valid for specified database" },
63 { 26, "Only a single element set name supported" },
64 { 27, "Result set no longer exists - unilaterally deleted by target" },
65 { 28, "Result set is in use" },
66 { 29, "One of the specified databases is locked" },
67 { 30, "Specified result set does not exist" },
68 { 31, "Resources exhausted - no results available" },
69 { 32, "Resources exhausted - unpredictable partial results available" },
70 { 33, "Resources exhausted - valid subset of results available" },
71 { 100, "Unspecified error" },
72 { 101, "Access-control failure" },
73 { 102, "Security challenge required but could not be issued -"
74 " request terminated" },
75 { 103, "Security challenge required but could not be issued -"
76 " record not included" },
77 { 104, "Security challenge failed - record not included" },
78 { 105, "Terminated by negative continue response" },
79 { 106, "No abstract syntaxes agreed to for this record" },
80 { 107, "Query type not supported" },
81 { 108, "Malformed query" },
82 { 109, "Database unavailable" },
83 { 110, "Operator unsupported" },
84 { 111, "Too many databases specified" },
85 { 112, "Too many result sets created" },
86 { 113, "Unsupported attribute type" },
87 { 114, "Unsupported Use attribute" },
88 { 115, "Unsupported value for Use attribute" },
89 { 116, "Use attribute required but not supplied" },
90 { 117, "Unsupported Relation attribute" },
91 { 118, "Unsupported Structure attribute" },
92 { 119, "Unsupported Position attribute" },
93 { 120, "Unsupported Truncation attribute" },
94 { 121, "Unsupported Attribute Set" },
95 { 122, "Unsupported Completeness attribute" },
96 { 123, "Unsupported attribute combination" },
97 { 124, "Unsupported coded value for term" },
98 { 125, "Malformed search term" },
99 { 126, "Illegal term value for attribute" },
100 { 127, "Unparsable format for un-normalized value" },
101 { 128, "Illegal result set name" },
102 { 129, "Proximity search of sets not supported" },
103 { 130, "Illegal result set in proximity search" },
104 { 131, "Unsupported proximity relation" },
105 { 132, "Unsupported proximity unit code" },
106 { 201, "Proximity not supported with this attribute combination" },
107 { 202, "Unsupported distance for proximity" },
108 { 203, "Ordered flag not supported for proximity" },
109 { 205, "Only zero step size supported for Scan" },
110 { 206, "Specified step size not supported for Scan" },
111 { 207, "Cannot sort according to sequence" },
112 { 208, "No result set name supplied on Sort" },
113 { 209, "Generic sort not supported (database-specific sort only supported)" },
114 { 210, "Database specific sort not supported" },
115 { 211, "Too many sort keys" },
116 { 212, "Duplicate sort keys" },
117 { 213, "Unsupported missing data action" },
118 { 214, "Illegal sort relation" },
119 { 215, "Illegal case value" },
120 { 216, "Illegal missing data action" },
121 { 217, "Segmentation: Cannot guarantee records will fit in specified segments"
122 },
123 { 218, "ES: Package name already in use" },
124 { 219, "ES: no such package, on modify/delete" },
125 { 220, "ES: quota exceeded" },
126 { 221, "ES: extended service type not supported" },
127 { 222, "ES: permission denied on ES - id not authorized" },
128 { 223, "ES: permission denied on ES - cannot modify or delete" },
129 { 224, "ES: immediate execution failed" },
130 { 225, "ES: immediate execution not supported for this service" },
131 { 226, "ES: immediate execution not supported for these parameters" },
132 { 227, "No data available in requested record syntax" },
133 { 228, "Scan: malformed scan" },
134 { 229, "Term type not supported" },
135 { 230, "Sort: too many input results" },
136 { 231, "Sort: incompatible record formats" },
137 { 232, "Scan: term list not supported" },
138 { 233, "Scan: unsupported value of position-in-response" },
139 { 234, "Too many index terms processed" },
140 { 235, "Database does not exist" },
141 { 236, "Access to specified database denied" },
142 { 237, "Sort: illegal sort" },
143 { 238, "Record not available in requested syntax" },
144 { 239, "Record syntax not supported" },
145 { 240, "Scan: Resources exhausted looking for satisfying terms" },
146 { 241, "Scan: Beginning or end of term list" },
147 { 242, "Segmentation: max-segment-size too small to segment record" },
148 { 243, "Present:  additional-ranges parameter not supported" },
149 { 244, "Present:  comp-spec parameter not supported" },
150 { 245, "Type-1 query: restriction ('resultAttr') operand not supported" },
151 { 246, "Type-1 query: 'complex' attributeValue not supported" },
152 { 247, "Type-1 query: 'attributeSet' as part of AttributeElement not supported" },
153 { 1001, "Malformed APDU"}, 
154 { 1002, "ES: EXTERNAL form of Item Order request not supported" },
155 { 1003, "ES: Result set item form of Item Order request not supported" },
156 { 1004, "ES: Extended services not supported unless access control is in effect" },
157 { 1005, "Response records in Search response not supported" },
158 { 1006, "Response records in Search response not possible for specified database (or database combination)" },
159 { 1007, "No Explain server. Addinfo: pointers to servers that have a surrogate Explain database for this server" },
160 { 1008, "ES: missing mandatory parameter for specified function. Addinfo: parameter" },
161 { 1009, "ES: Item Order, unsupported OID in itemRequest. Addinfo: OID" },
162 { 1010, "Init/AC: Bad Userid" },
163 { 1011, "Init/AC: Bad Userid and/or Password" },
164 { 1012, "Init/AC: No searches remaining (pre-purchased searches exhausted)" },
165 { 1013, "Init/AC: Incorrect interface type (specified id valid only when used with a particular access method or client)" },
166 { 1014, "Init/AC: Authentication System error" },
167 { 1015, "Init/AC: Maximum number of simultaneous sessions for Userid" },
168 { 1016, "Init/AC: Blocked network address"},
169 { 1017, "Init/AC: No databases available for specified userId"},
170 { 1018, "Init/AC: System temporarily out of resources"},
171 { 1019, "Init/AC: System not available due to maintenance (Addinfo: when it's expected back up)" },
172 { 1020, "Init/AC: System temporarily unavailable (Addinfo: when it's expected back up)"},
173 { 1021, "Init/AC: Account has expired"},
174 { 1022, "Init/AC: Password has expired so a new one must be supplied"},
175 { 1023, "Init/AC: Password has been changed by an administrator so a new one must be supplied"},
176 { 0, NULL} 
177 };
178
179 const char *diagbib1_str (int code)
180 {
181     int i;
182     for (i=0; msg_tab[i].msg; i++)
183         if (msg_tab[i].code == code)
184             return msg_tab[i].msg;
185     return "Unknown error";
186 }