# HG changeset patch # User jwe # Date 979756890 0 # Node ID e10451597802993b9dae1a943d126464c4efa6ff # Parent 0ac9388e7e1f98d83fb1b13254293f803d1b25a6 [project @ 2001-01-17 18:41:29 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2001-01-17 John W. Eaton + + * parse.y (safe_fclose): Discard comments at the end of a file. + 2001-01-16 John W. Eaton * error.cc (pr_where): Call pr_where_1 with two args, not one, to diff --git a/src/parse.y b/src/parse.y --- a/src/parse.y +++ b/src/parse.y @@ -2786,6 +2786,13 @@ static void safe_fclose (void *f) { + // XXX FIXME XXX -- comments at the end of an input file are + // discarded (otherwise, they would be appended to the next + // statement, possibly from the command line or another file, which + // can be quite confusing). + + octave_comment_buffer::get_comment (); + if (f) fclose (static_cast (f)); }