X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fsyntax-file.c;h=bee12f3d168c2d91ee502fec474ff7cea75d6192;hb=f5c108becd49d78f4898cab11352291f5689d24e;hp=e41466cedd55d180986749cc4a27abc98e7cb9a4;hpb=b8b67a1e1f709640ccdb3422a591b938edb0ceea;p=pspp-builds.git diff --git a/src/language/syntax-file.c b/src/language/syntax-file.c index e41466ce..bee12f3d 100644 --- a/src/language/syntax-file.c +++ b/src/language/syntax-file.c @@ -1,6 +1,5 @@ /* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. - Written by Ben Pfaff . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -49,7 +48,7 @@ #include -struct syntax_file_source +struct syntax_file_source { struct getl_interface parent ; @@ -78,7 +77,8 @@ line_number (const struct getl_interface *s) /* Reads a line from syntax file source S into LINE. Returns true if successful, false at end of file. */ bool -read_syntax_file (struct getl_interface *s, struct string *line) +read_syntax_file (struct getl_interface *s, + struct string *line, enum getl_syntax *syntax) { struct syntax_file_source *sfs = (struct syntax_file_source *) s; @@ -97,7 +97,7 @@ read_syntax_file (struct getl_interface *s, struct string *line) /* Read line from file and remove new-line. Skip initial "#! /usr/bin/pspp" line. */ - do + do { sfs->ln++; if (!ds_read_line (line, sfs->syntax_file)) @@ -114,6 +114,7 @@ read_syntax_file (struct getl_interface *s, struct string *line) if (get_echo ()) tab_output_text (TAB_LEFT | TAB_FIX, ds_cstr (line)); + *syntax = GETL_BATCH; return true; } @@ -137,7 +138,7 @@ always_false (const struct getl_interface *s UNUSED) /* Creates a syntax file source with file name FN. */ struct getl_interface * -create_syntax_file_source (const char *fn) +create_syntax_file_source (const char *fn) { struct syntax_file_source *ss = xzalloc (sizeof (*ss));