1 /* $Id: cqlstring.c,v 1.2 2004-10-03 22:34:07 adam Exp $
2 Copyright (C) 2002-2004
5 This file is part of the YAZ toolkit.
7 See the file LICENSE for details.
12 * \brief Implements query stream reader that reads from a C string.
25 struct cql_buf_info *bi = (struct cql_buf_info *) vp;
26 if (bi->str[bi->off] == 0)
28 return bi->str[bi->off++];
31 void ungetbuf(int b, void *vp)
33 struct cql_buf_info *bi = (struct cql_buf_info *) vp;
38 int cql_parser_string(CQL_parser cp, const char *str)
40 struct cql_buf_info b;
45 return cql_parser_stream(cp, getbuf, ungetbuf, &b);