-/*
-10 Illegal query
-11 Unsupported query type (XCQL vs CQL)
-12 Too many characters in query
-13 Unbalanced or illegal use of parentheses
-14 Unbalanced or illegal use of quotes
-15 Illegal or unsupported index set
-16 Illegal or unsupported index
-17 Illegal or unsupported combination of index and index set
-18 Illegal or unsupported combination of indexes
-19 Illegal or unsupported relation
-20 Illegal or unsupported relation modifier
-21 Illegal or unsupported combination of relation modifers
-22 Illegal or unsupported combination of relation and index
-23 Too many characters in term
-24 Illegal combination of relation and term
-25 Special characters not quoted in term
-26 Non special character escaped in term
-27 Empty term unsupported
-28 Masking character not supported
-29 Masked words too short
-30 Too many masking characters in term
-31 Anchoring character not supported
-32 Anchoring character in illegal or unsupported position
-33 Combination of proximity/adjacency and masking characters not supported
-34 Combination of proximity/adjacency and anchoring characters not supported
-35 Terms only exclusion (stop) words
-36 Term in invalid format for index or relation
-37 Illegal or unsupported boolean operator
-38 Too many boolean operators in query
-39 Proximity not supported
-40 Illegal or unsupported proximity relation
-41 Illegal or unsupported proximity distance
-42 Illegal or unsupported proximity unit
-43 Illegal or unsupported proximity ordering
-44 Illegal or unsupported combination of proximity modifiers
-45 Index set name (prefix) assigned to multiple identifiers
+/** \brief sets error and addinfo for transform
+ \param ct CQL transform handle
+ \param error error code
+ \param addinfo additional info
+ */
+YAZ_EXPORT
+void cql_transform_set_error(cql_transform_t ct, int error, const char *addinfo);
+
+/** \brief returns the CQL message corresponding to a given error code.
+ \param code error code
+ \returns text message
+*/
+YAZ_EXPORT
+const char *cql_strerror(int code);
+
+/** \brief returns the standard CQL context set URI.
+ \returns CQL URI string
+*/
+YAZ_EXPORT
+const char *cql_uri(void);
+
+/** \brief compares two CQL strings (ala strcmp)
+ \param s1 string 1
+ \param s2 string 2
+ \returns comparison value
+ Compares two CQL strings (for relations, operators, etc)
+ (unfortunately defined as case-insensitive unlike XML etc)
+*/
+YAZ_EXPORT
+int cql_strcmp(const char *s1, const char *s2);
+
+/** \brief compares two CQL strings (ala strncmp)
+ \param s1 string 1
+ \param s2 string 2
+ \param n size
+ \returns comparison value
+ Compares two CQL strings at most n bytes
+ (unfortunately defined as case-insensitive unlike XML etc)
+ */
+YAZ_EXPORT
+int cql_strncmp(const char *s1, const char *s2, size_t n);
+
+/** \brief converts CQL sortby to sortkeys (ala versions 1.1)
+ \param cn CQL tree
+ \param pr print function
+ \param client_data data to be passed to pr function
+
+ This will take CQL_NODE_SORT entries and conver them to
+
+ path,schema,ascending,caseSensitive,missingValue
+ items..
+
+ One for each sort keys. Where
+
+ path is string index for sorting
+
+ schema is schema for sort index
+
+ ascending is a boolean (0=false, 1=true). Default is true.
+
+ caseSensitive is a boolean. Default is false.
+
+ missingValue is a string and one of 'abort', 'highValue', 'lowValue',
+ or 'omit'. Default is 'highValue'.
+
+ See also
+ http://www.loc.gov/standards/sru/sru1-1archive/search-retrieve-operation.html#sort