From ba1f112c74932545871791eaf2c2e4cfe4014ee5 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 24 Feb 2012 11:23:46 +0100 Subject: [PATCH] CCL: add two new diagnostics for unsupported masking The new diagnostics are: "Embedded truncation not supported" and "Single charcacter mask not supported". --- include/yaz/ccl.h | 2 ++ src/cclerrms.c | 4 +++- src/cclfind.c | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/yaz/ccl.h b/include/yaz/ccl.h index f9b6b85..70194e5 100644 --- a/include/yaz/ccl.h +++ b/include/yaz/ccl.h @@ -91,6 +91,8 @@ YAZ_BEGIN_CDECL #define CCL_ERR_TRUNC_NOT_LEFT 10 #define CCL_ERR_TRUNC_NOT_BOTH 11 #define CCL_ERR_TRUNC_NOT_RIGHT 12 +#define CCL_ERR_TRUNC_NOT_EMBED 13 +#define CCL_ERR_TRUNC_NOT_SINGLE 14 /** \brief attribute node (type, value) pair as used in RPN */ struct ccl_rpn_attr { diff --git a/src/cclerrms.c b/src/cclerrms.c index cff96cc..e9b6a87 100644 --- a/src/cclerrms.c +++ b/src/cclerrms.c @@ -28,7 +28,9 @@ static char *err_msg_array[] = { "Bad relation", "Left truncation not supported", "Both left - and right truncation not supported", - "Right truncation not supported" + "Right truncation not supported", + "Embedded truncation not supported", + "Single charcacter mask not supported" }; const char *ccl_err_msg(int ccl_errno) diff --git a/src/cclfind.c b/src/cclfind.c index 072fdab..caceeea 100644 --- a/src/cclfind.c +++ b/src/cclfind.c @@ -442,7 +442,7 @@ static struct ccl_rpn_node *search_term_x(CCL_parser cclp, right_trunc = 1; else { - cclp->error_code = CCL_ERR_TRUNC_NOT_BOTH; + cclp->error_code = CCL_ERR_TRUNC_NOT_EMBED; ccl_rpn_delete(p); return NULL; } @@ -461,7 +461,7 @@ static struct ccl_rpn_node *search_term_x(CCL_parser cclp, } else { - cclp->error_code = CCL_ERR_TRUNC_NOT_BOTH; + cclp->error_code = CCL_ERR_TRUNC_NOT_SINGLE; ccl_rpn_delete(p); return NULL; } -- 1.7.10.4