]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/source-file.cc
* input/regression/{many}.ly: refresh, trying to guess how
[lilypond.git] / lily / source-file.cc
index a4b30bf16e8c7b4722bf5a28eaaa1ea4438c2cea..0ef67667b5bb44c2b2a73d63c18fee7754516862 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2002 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1997--2004 Jan Nieuwenhuizen <janneke@gnu.org>
   Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
@@ -34,6 +34,7 @@ Source_file::load_stdin ()
   while ((c = fgetc (stdin)) != EOF)
     chs.push (c);
 
+  chs.push (0);
   length_ = chs.size ();
   contents_str0_ = chs.remove_array ();
 }
@@ -77,7 +78,7 @@ gulp_file (String fn, int* len)
  */
 Source_file::Source_file (String filename, String data)
 {
-  name_string_ = filename;
+  name_ = filename;
   istream_ = 0;
   contents_str0_ = data.get_copy_str0();
   length_ = data.length();
@@ -87,7 +88,7 @@ Source_file::Source_file (String filename, String data)
 
 Source_file::Source_file (String filename_string)
 {
-  name_string_ = filename_string;
+  name_ = filename_string;
   istream_ = 0;
   contents_str0_ = 0;
 
@@ -113,7 +114,7 @@ Source_file::init_port ()
   str_port_ = scm_mkstrport (SCM_INUM0, str, SCM_OPN | SCM_RDNG,
                             __FUNCTION__);
   scm_set_port_filename_x (str_port_,
-                          scm_makfrom0str (name_string_.get_str0()));
+                          scm_makfrom0str (name_.get_str0()));
 }
 
 int
@@ -152,7 +153,7 @@ Source_file::file_line_column_string (char const *context_str0) const
 String
 Source_file::name_string () const
 {
-  return name_string_;
+  return name_;
 }
 
 Source_file::~Source_file ()