Fix leak for odr_print of ZOOM connection.
[yaz-moved-to-github.git] / src / cclerrms.c
1 /* This file is part of the YAZ toolkit.
2  * Copyright (C) 1995-2009 Index Data
3  * See the file LICENSE for details.
4  */
5 /** 
6  * \file cclerrms.c
7  * \brief Implements CCL error code to error string map.
8  *
9  * This source file implements mapping between CCL error code and
10  * their string equivalents.
11  */
12
13 #include <yaz/ccl.h>
14
15 static char *err_msg_array[] = {
16     "Ok",
17     "Search word expected",
18     "')' expected",
19     "Set name expected",
20     "Operator expected",
21     "Unbalanced ')'",
22     "Unknown qualifier",
23     "Qualifiers applied twice",
24     "'=' expected",
25     "Bad relation",
26     "Left truncation not supported",
27     "Both left - and right truncation not supported",
28     "Right truncation not supported"
29 };
30
31 /*
32  * ccl_err_msg: return name of CCL error
33  * ccl_errno:   Error no.
34  * return:      Name of error.
35  */
36 const char *ccl_err_msg (int ccl_errno)
37 {
38     return err_msg_array[ccl_errno];
39 }
40 /*
41  * Local variables:
42  * c-basic-offset: 4
43  * c-file-style: "Stroustrup"
44  * indent-tabs-mode: nil
45  * End:
46  * vim: shiftwidth=4 tabstop=8 expandtab
47  */
48