projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use moments.c to compute moments
[pspp]
/
src
/
language
/
syntax-string-source.c
diff --git
a/src/language/syntax-string-source.c
b/src/language/syntax-string-source.c
index 85478bf7c0ef033264194f7457783adf45166d67..c3e8d4ffd1713718ea3a0a3e7a27d9258c9a5e94 100644
(file)
--- a/
src/language/syntax-string-source.c
+++ b/
src/language/syntax-string-source.c
@@
-18,6
+18,8
@@
02110-1301, USA. */
02110-1301, USA. */
+#include <config.h>
+
#include <libpspp/getl.h>
#include <libpspp/alloc.h>
#include <libpspp/compiler.h>
#include <libpspp/getl.h>
#include <libpspp/alloc.h>
#include <libpspp/compiler.h>
@@
-58,7
+60,7
@@
location (const struct getl_interface *i UNUSED)
static void
static void
-close (struct getl_interface *i )
+
do_
close (struct getl_interface *i )
{
struct syntax_string_source *sss = (struct syntax_string_source *) i;
{
struct syntax_string_source *sss = (struct syntax_string_source *) i;
@@
-114,7
+116,7
@@
create_syntax_string_source (const char *format, ...)
va_end (args);
sss->parent.interactive = always_false;
va_end (args);
sss->parent.interactive = always_false;
- sss->parent.close = close;
+ sss->parent.close =
do_
close;
sss->parent.read = read_single_line;
sss->parent.name = name;
sss->parent.read = read_single_line;
sss->parent.name = name;
@@
-123,3
+125,11
@@
create_syntax_string_source (const char *format, ...)
return (struct getl_interface *) sss;
}
return (struct getl_interface *) sss;
}
+
+/* Return the syntax currently contained in S.
+ Primarily usefull for debugging */
+const char *
+syntax_string_source_get_syntax (const struct syntax_string_source *s)
+{
+ return ds_cstr (&s->buffer);
+}