Implements CQL to XCQL conversion. More...
#include <stdlib.h>#include <string.h>#include <stdio.h>#include <yaz/cql.h>Go to the source code of this file.
Functions | |
| static void | pr_n (const char *buf, void(*pr)(const char *buf, void *client_data), void *client_data, int n) |
| static void | pr_cdata (const char *buf, void(*pr)(const char *buf, void *client_data), void *client_data) |
| static void | prefixes (struct cql_node *cn, void(*pr)(const char *buf, void *client_data), void *client_data, int level) |
| static void | cql_to_xml_mod (struct cql_node *m, void(*pr)(const char *buf, void *client_data), void *client_data, int level) |
| static void | cql_to_xml_r (struct cql_node *cn, void(*pr)(const char *buf, void *client_data), void *client_data, int level) |
| void | cql_to_xml (struct cql_node *cn, void(*pr)(const char *buf, void *client_data), void *client_data) |
| converts CQL tree to XCQL and writes to user-defined stream | |
| void | cql_to_xml_stdio (struct cql_node *cn, FILE *f) |
| converts CQL tree to XCQL and writes to file | |
| void | cql_buf_write_handler (const char *b, void *client_data) |
| Handler for cql_buf_write_info. | |
| int | cql_to_xml_buf (struct cql_node *cn, char *out, int max) |
| converts CQL tree to XCQL and writes result to buffer | |
Implements CQL to XCQL conversion.
Definition in file xcqlutil.c.
| void cql_buf_write_handler | ( | const char * | b, | |
| void * | client_data | |||
| ) |
Handler for cql_buf_write_info.
Definition at line 217 of file xcqlutil.c.
References cql_buf_write_info::buf, cql_buf_write_info::max, and cql_buf_write_info::off.
Referenced by cql_to_xml_buf(), and cql_transform_buf().
| void cql_to_xml | ( | struct cql_node * | cn, | |
| void(*)(const char *buf, void *client_data) | pr, | |||
| void * | client_data | |||
| ) |
converts CQL tree to XCQL and writes to user-defined stream
| cn | CQL node (tree) | |
| pr | print function | |
| client_data | data to be passed to pr function |
Definition at line 205 of file xcqlutil.c.
References cql_to_xml_r().
Referenced by cql_to_xml_buf(), and cql_to_xml_stdio().
| int cql_to_xml_buf | ( | struct cql_node * | cn, | |
| char * | out, | |||
| int | max | |||
| ) |
converts CQL tree to XCQL and writes result to buffer
| cn | CQL node (tree) | |
| out | buffer | |
| max | size of buffer (max chars to write) |
Definition at line 230 of file xcqlutil.c.
References cql_buf_write_info::buf, cql_buf_write_handler(), cql_to_xml(), cql_buf_write_info::max, and cql_buf_write_info::off.
| static void cql_to_xml_mod | ( | struct cql_node * | m, | |
| void(*)(const char *buf, void *client_data) | pr, | |||
| void * | client_data, | |||
| int | level | |||
| ) | [static] |
Definition at line 88 of file xcqlutil.c.
References pr_cdata(), pr_n(), cql_node::st, and cql_node::u.
Referenced by cql_to_xml_r().
| static void cql_to_xml_r | ( | struct cql_node * | cn, | |
| void(*)(const char *buf, void *client_data) | pr, | |||
| void * | client_data, | |||
| int | level | |||
| ) | [static] |
Definition at line 119 of file xcqlutil.c.
References cql_node::boolean, CQL_NODE_BOOL, CQL_NODE_ST, cql_to_xml_mod(), pr_cdata(), pr_n(), prefixes(), cql_node::st, cql_node::u, and cql_node::which.
Referenced by cql_to_xml().
| void cql_to_xml_stdio | ( | struct cql_node * | cn, | |
| FILE * | f | |||
| ) |
converts CQL tree to XCQL and writes to file
| cn | CQL node (tree) | |
| f | file handle |
Definition at line 212 of file xcqlutil.c.
References cql_fputs(), and cql_to_xml().
| static void pr_cdata | ( | const char * | buf, | |
| void(*)(const char *buf, void *client_data) | pr, | |||
| void * | client_data | |||
| ) | [static] |
Definition at line 27 of file xcqlutil.c.
Referenced by cql_to_xml_mod(), cql_to_xml_r(), and prefixes().
| static void pr_n | ( | const char * | buf, | |
| void(*)(const char *buf, void *client_data) | pr, | |||
| void * | client_data, | |||
| int | n | |||
| ) | [static] |
Definition at line 17 of file xcqlutil.c.
Referenced by cql_to_xml_mod(), cql_to_xml_r(), and prefixes().
| static void prefixes | ( | struct cql_node * | cn, | |
| void(*)(const char *buf, void *client_data) | pr, | |||
| void * | client_data, | |||
| int | level | |||
| ) | [static] |
Definition at line 55 of file xcqlutil.c.
References pr_cdata(), pr_n(), cql_node::st, and cql_node::u.
Referenced by cql_to_xml_r().
1.6.3