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