From: Adam Dickmeiss Date: Fri, 24 Feb 2012 10:23:46 +0000 (+0100) Subject: CCL: add two new diagnostics for unsupported masking X-Git-Tag: v4.2.27~7 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=ba1f112c74932545871791eaf2c2e4cfe4014ee5 CCL: add two new diagnostics for unsupported masking The new diagnostics are: "Embedded truncation not supported" and "Single charcacter mask not supported". --- 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; }