X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fgetl.c;h=200e07e36972ea5712f947d64836b306b7fe8bb1;hb=8381768f3394a907c621cb9acbb77b83f5cd4875;hp=1c18733dce23e778b5a73548f8608efd82459352;hpb=1e0aeb69e9f246a1448a114919c90b6c86dfcc8d;p=pspp-builds.git diff --git a/src/libpspp/getl.c b/src/libpspp/getl.c index 1c18733d..200e07e3 100644 --- a/src/libpspp/getl.c +++ b/src/libpspp/getl.c @@ -201,26 +201,21 @@ getl_uninitialize (void) /* Reads a single line into LINE. Returns true when a line has been read, false at end of input. - If INTERACTIVE is non-null, then when true is returned - *INTERACTIVE will be set to true if the line was obtained - interactively, false otherwise. */ + On success, sets *SYNTAX to the style of the syntax read. */ bool -do_read_line (struct string *line, bool *interactive) +do_read_line (struct string *line, enum getl_syntax *syntax) { while (!ll_is_empty (&sources)) { struct getl_source *s = current_source (&sources); ds_clear (line); - if (s->interface->read (s->interface, line)) + if (s->interface->read (s->interface, line, syntax)) { - if (interactive != NULL) - *interactive = s->interface->interactive (s->interface); - while (s) { if (s->interface->filter) - s->interface->filter (s->interface, line); + s->interface->filter (s->interface, line, *syntax); s = s->included_from; }