X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fsyntax-file.c;h=0771ade3a9e92dccc0c3063a7c14d13014c010e3;hb=ff59ee87992b440aab8083ee041f9aecd2ce68ca;hp=dde807c37c9c4409cc54b2d6049bc859679ee137;hpb=68f08c4bb53fcde16035b622bdb6e9529f9cf3ae;p=pspp-builds.git diff --git a/src/language/syntax-file.c b/src/language/syntax-file.c index dde807c3..0771ade3 100644 --- a/src/language/syntax-file.c +++ b/src/language/syntax-file.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -27,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -40,6 +40,8 @@ #include "prompt.h" +#include "xalloc.h" + #include "gettext.h" #define _(msgid) gettext (msgid) @@ -98,7 +100,8 @@ read_syntax_file (struct getl_interface *s, do { sfs->ln++; - if (!ds_read_line (line, sfs->syntax_file)) + ds_clear (line); + if (!ds_read_line (line, sfs->syntax_file, SIZE_MAX)) { if (ferror (sfs->syntax_file)) msg (ME, _("Reading `%s': %s."), sfs->fn, strerror (errno)); @@ -109,7 +112,7 @@ read_syntax_file (struct getl_interface *s, while (sfs->ln == 1 && !memcmp (ds_cstr (line), "#!", 2)); /* Echo to listing file, if configured to do so. */ - if (get_echo ()) + if (settings_get_echo ()) tab_output_text (TAB_LEFT | TAB_FIX, ds_cstr (line)); return true;