projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bad memory reference in CQL to PQF conversion which occurred when
[yaz-moved-to-github.git]
/
src
/
cqlstring.c
diff --git
a/src/cqlstring.c
b/src/cqlstring.c
index
bf18b07
..
d9923e5
100644
(file)
--- a/
src/cqlstring.c
+++ b/
src/cqlstring.c
@@
-1,11
+1,17
@@
-/* $Id: cqlstring.c,v 1.1 2003-10-27 12:21:30 adam Exp $
- Copyright (C) 2002-2003
+/* $Id: cqlstring.c,v 1.6 2007-01-03 08:42:15 adam Exp $
+ Copyright (C) 1995-2007, Index Data ApS
Index Data Aps
This file is part of the YAZ toolkit.
See the file LICENSE for details.
*/
Index Data Aps
This file is part of the YAZ toolkit.
See the file LICENSE for details.
*/
+
+/**
+ * \file cqlstring.c
+ * \brief Implements query stream reader that reads from a C string.
+ */
+
#include <yaz/cql.h>
struct cql_buf_info {
#include <yaz/cql.h>
struct cql_buf_info {
@@
-13,7
+19,7
@@
struct cql_buf_info {
int off;
};
int off;
};
-int getbuf(void *vp)
+static int getbuf(void *vp)
{
struct cql_buf_info *bi = (struct cql_buf_info *) vp;
if (bi->str[bi->off] == 0)
{
struct cql_buf_info *bi = (struct cql_buf_info *) vp;
if (bi->str[bi->off] == 0)
@@
-21,7
+27,7
@@
int getbuf(void *vp)
return bi->str[bi->off++];
}
return bi->str[bi->off++];
}
-void ungetbuf(int b, void *vp)
+static void ungetbuf(int b, void *vp)
{
struct cql_buf_info *bi = (struct cql_buf_info *) vp;
if (b)
{
struct cql_buf_info *bi = (struct cql_buf_info *) vp;
if (b)
@@
-38,3
+44,11
@@
int cql_parser_string(CQL_parser cp, const char *str)
return cql_parser_stream(cp, getbuf, ungetbuf, &b);
}
return cql_parser_stream(cp, getbuf, ungetbuf, &b);
}
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+