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