*** empty log message ***
[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.5  1996-01-02 13:57:30  adam
8  * Added error messages.
9  *
10  * Revision 1.4  1995/09/29  17:11:52  quinn
11  * Smallish
12  *
13  * Revision 1.3  1995/09/27  15:02:39  quinn
14  * Modified function heads & prototypes.
15  *
16  * Revision 1.2  1995/05/16  08:50:21  quinn
17  * License, documentation, and memory fixes
18  *
19  * Revision 1.1  1995/03/15  13:46:09  adam
20  * New function diagbib1_str.
21  *
22  */
23
24 #include <stdio.h>
25
26 #include "diagbib1.h"
27
28 struct {
29     int code;
30     char *msg;
31 } msg_tab[] = {
32 { 1, "Permanent system error" },
33 { 2, "Temporary system error" },
34 { 3, "Unsupported search" },
35 { 4, "Terms only exclusion (stop) words" },
36 { 5, "Too many argument words" },
37 { 6, "Too many boolean operators" },
38 { 7, "Too many truncated words" },
39 { 8, "Too many incomplete subfields" },
40 { 9, "Truncated words too short" },
41 { 10, "Invalid format for record number (search term)" },
42 { 11, "Too many characters in search statement" },
43 { 12, "Too many records retrieved" },
44 { 13, "Present request out of range" },
45 { 14, "System error in presenting records" },
46 { 15, "Record no authorized to be sent intersystem" },
47 { 16, "Record exceeds Preferred-message-size" },
48 { 17, "Record exceeds Maximum-record-size" },
49 { 18, "Result set not supported as a search term" },
50 { 19, "Only single result set as search term supported" },
51 { 20, "Only ANDing of a single result set as search term supported" },
52 { 21, "Result set exists and replace indicator off" },
53 { 22, "Result set naming not supported" },
54 { 23, "Combination of specified databases not supported" },
55 { 24, "Element set names not supported" },
56 { 25, "Specified element set name not valid for specified database" },
57 { 26, "Only a single element set name supported" },
58 { 27, "Result set no longer exists - unilaterally deleted by target" },
59 { 28, "Result set is in use" },
60 { 29, "One of the specified databases is locked" },
61 { 30, "Specified result set does not exist" },
62 { 31, "Resources exhausted - no results available" },
63 { 32, "Resources exhausted - unpredictable partial results available" },
64 { 33, "Resources exhausted - valid subset of results available" },
65 { 100, "Unspecified error" },
66 { 101, "Access-control failure" },
67 { 102, "Security challenge required but could not be issued -"
68 " request terminated" },
69 { 103, "Security challenge required but could not be issued -"
70 " record not included" },
71 { 104, "Security challenge failed - record not included" },
72 { 105, "Terminated by negative continue response" },
73 { 106, "No abstract syntaxes agreed to for this record" },
74 { 107, "Query type not supported" },
75 { 108, "Malformed query" },
76 { 109, "Database unavailable" },
77 { 110, "Operator unsupported" },
78 { 111, "Too many databases specified" },
79 { 112, "Too many result sets created" },
80 { 113, "Unsupported attribute type" },
81 { 114, "Unsupported Use attribute" },
82 { 115, "Unsupported value for Use attribute" },
83 { 116, "Use attribute required but not supplied" },
84 { 117, "Unsupported Relation attribute" },
85 { 118, "Unsupported Structure attribute" },
86 { 119, "Unsupported Position attribute" },
87 { 120, "Unsupported Truncation attribute" },
88 { 121, "Unsupported Attribute Set" },
89 { 122, "Unsupported Completeness attribute" },
90 { 123, "Unsupported attribute combination" },
91 { 124, "Unsupported coded value for term" },
92 { 125, "Malformed search term" },
93 { 126, "Illegal term value for attribute" },
94 { 127, "Unparsable format for un-normalized value" },
95 { 128, "Illegal result set name" },
96 { 129, "Proximity search of sets not supported" },
97 { 130, "Illegal result set in proximity search" },
98 { 131, "Unsupported proximity relation" },
99 { 132, "Unsupported proximity unit code" },
100 { 201, "Proximity not supported with this attribute combination" },
101 { 202, "Unsupported distance for proximity" },
102 { 203, "Ordered flag not supported for proximity" },
103 { 205, "Only zero step size supported for Scan" },
104 { 206, "Specified step size not supported for Scan" },
105 { 207, "Cannot sort according to sequence" },
106 { 208, "No result set name supplied on Sort" },
107 { 209, "Generic sort not supported (database-specific sort only supported)" },
108 { 210, "Database specific sort not supported" },
109 { 211, "Too many sort keys" },
110 { 212, "Duplicate sort keys" },
111 { 213, "Unsupported missing data action" },
112 { 214, "Illegal sort relation" },
113 { 215, "Illegal case value" },
114 { 216, "Illegal missing data action" },
115 { 217, "Segmentation: Cannot guarantee records will fit in specified segments"
116 },
117 { 218, "ES: Package name already in use" },
118 { 219, "ES: no such package, on modify/delete" },
119 { 220, "ES: quota exceeded" },
120 { 221, "ES: extended service type not supported" },
121 { 222, "ES: permission denied on ES - id not authorized" },
122 { 223, "ES: permission denied on ES - cannot modify or delete" },
123 { 224, "ES: immediate execution failed" },
124 { 225, "ES: immediate execution not supported for this service" },
125 { 226, "ES: immediate execution not supported for these parameters" },
126 { 227, "No data available in requested record syntax" },
127 { 228, "Scan: malformed scan" },
128 { 229, "Term type not supported" },
129 { 230, "Sort: too many input results" },
130 { 231, "Sort: incompatible record formats" },
131 { 232, "Scan: term list not supported" },
132 { 233, "Scan: unsupported value of position-in-response" },
133 { 234, "Too many index terms processed" },
134 { 235, "Database does not exist" },
135 { 236, "Access to specified database denied" },
136 { 237, "Sort: illegal sort" },
137 { 238, "Record not available in requested syntax" },
138 { 239, "Record syntax not supported" },
139 { 240, "Scan: Resources exhausted looking for satisfying terms" },
140 { 241, "Scan: Beginning or end of term list" },
141 { 242, "Segmentation: max-segment-size too small to segment record" },
142 { 243, "Present:  additional-ranges parameter not supported" },
143 { 244, "Present:  comp-spec parameter not supported" },
144 { 245, "Type-1 query: restriction ('resultAttr') operand not supported" },
145 { 246, "Type-1 query: 'complex' attributeValue not supported" },
146 { 247, "Type-1 query: 'attributeSet' as part of AttributeElement not supported"
147 },
148 { 0, NULL} 
149 };
150
151 const char *diagbib1_str (int code)
152 {
153     int i;
154     for (i=0; msg_tab[i].msg; i++)
155         if (msg_tab[i].code == code)
156             return msg_tab[i].msg;
157     return "Unknown error";
158 }