]> git.donarmstrong.com Git - lilypond.git/commitdiff
rename source.{hh,cc} -> sources.{hh,cc}
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 18 Jan 2007 14:55:15 +0000 (15:55 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 18 Jan 2007 14:55:15 +0000 (15:55 +0100)
lily/includable-lexer.cc
lily/include/source.hh
lily/include/sources.hh [new file with mode: 0644]
lily/input.cc
lily/lily-parser-scheme.cc
lily/lily-parser.cc
lily/source.cc
lily/sources.cc [new file with mode: 0644]

index ee971d7cad75f523ffd901f3fc24c4a38b5b91dc..617b1ace32ad706392b45bf797048eafd57ef7a8 100644 (file)
@@ -17,7 +17,7 @@ using namespace std;
 #include "international.hh"
 #include "main.hh"
 #include "source-file.hh"
-#include "source.hh"
+#include "sources.hh"
 #include "warn.hh"
 
 #ifndef YY_BUF_SIZE
index 9cc52192c6b79a5e1dcb14e22b77c4e1786adffa..09c7cfafd0cb2ee13152e399db7d99198272b2fd 100644 (file)
@@ -1,31 +1 @@
-/*
-  source.hh -- part of LilyPond
-
-  (c) 1997--2007 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#ifndef SOURCE_HH
-#define SOURCE_HH
-
-#include "flower-proto.hh"
-#include "std-vector.hh"
-
-/*   A set of sourcefiles.  */
-class Sources
-{
-  Sources (Sources const &);
-  vector<Source_file*> sourcefiles_;
-
-public:
-  Sources ();
-  ~Sources ();
-
-  Source_file *get_file (string *file_name);
-  Source_file *get_sourcefile (char const *);
-  void add (Source_file *sourcefile);
-  void set_path (File_path *);
-
-  const File_path *path_;
-};
-
-#endif /* SOURCE_HH */
+#error
diff --git a/lily/include/sources.hh b/lily/include/sources.hh
new file mode 100644 (file)
index 0000000..13776f3
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+  sources.hh -- part of LilyPond
+
+  (c) 1997--2007 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#ifndef SOURCES_HH
+#define SOURCES_HH
+
+#include "flower-proto.hh"
+#include "std-vector.hh"
+
+class Sources
+{
+  Sources (Sources const &);
+  vector<Source_file*> sourcefiles_;
+
+public:
+  Sources ();
+  ~Sources ();
+
+  Source_file *get_file (string *file_name);
+  Source_file *get_sourcefile (char const *);
+  void add (Source_file *sourcefile);
+  void set_path (File_path *);
+
+  const File_path *path_;
+};
+
+#endif /* SOURCE_HH */
index 3d998b384e6d806761ce122ede378e69cf200c8e..09028d0858ea4a00fbaf39c24055c370c1e74dad 100644 (file)
@@ -13,7 +13,7 @@ using namespace std;
 
 #include "international.hh"
 #include "source-file.hh"
-#include "source.hh"
+#include "sources.hh"
 #include "warn.hh"
 
 Input::Input (Input const &i)
index c3ac4afa3c9a98e53a1ca1441e7fb6b2777567c5..ca1d224bd6ac7703f7d8f54b64434fe4102965ee 100644 (file)
@@ -18,7 +18,7 @@
 #include "ly-module.hh"
 #include "main.hh"
 #include "program-option.hh"
-#include "source.hh"
+#include "sources.hh"
 #include "warn.hh"
 
 /* Do not append `!' suffix, since 1st argument is not modified. */
index 356615adc3cbf3d2ea93a42ed9d40964eabf3987..456acd1a9e023109c88139e1a66b270a4f3f3323 100644 (file)
@@ -20,7 +20,7 @@
 #include "paper-book.hh"
 #include "parser.hh"
 #include "score.hh"
-#include "source.hh"
+#include "sources.hh"
 #include "text-metrics.hh"
 #include "warn.hh"
 
index 068baed379405c532d1b144eac81dd228322d365..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,66 +0,0 @@
-/*
-  source.cc -- implement Sources
-
-  source file of the LilyPond music typesetter
-
-  (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
-*/
-
-#include "source.hh"
-
-#include "source-file.hh"
-#include "file-path.hh"
-
-Sources::Sources ()
-{
-  path_ = 0;
-}
-
-
-Sources::Sources (Sources const &)
-{
-  assert (false);
-}
-
-
-void
-Sources::set_path (File_path *f)
-{
-  path_ = f;
-}
-
-/**
-   open a file
-
-   File_string the file to be opened, name might be changed if it is
-   found in a search path.
-*/
-Source_file *
-Sources::get_file (string *file_string) //UGH
-{
-  if (*file_string != "-" && path_)
-    {
-      string file_string_o = path_->find (*file_string);
-      if ((file_string_o == "") && (*file_string != ""))
-       return 0;
-      *file_string = file_string_o;
-    }
-  Source_file *f = new Source_file (*file_string);
-  add (f);
-  return f;
-}
-
-void
-Sources::add (Source_file *sourcefile)
-{
-  sourcefiles_.push_back (sourcefile);
-}
-
-Sources::~Sources ()
-{
-  for (vsize i = 0; i < sourcefiles_.size (); i++)
-    {
-      sourcefiles_[i]->unprotect ();
-    }
-}
-
diff --git a/lily/sources.cc b/lily/sources.cc
new file mode 100644 (file)
index 0000000..bfd3e0d
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+  source.cc -- implement Sources
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+*/
+
+#include "sources.hh"
+
+#include "source-file.hh"
+#include "file-path.hh"
+
+Sources::Sources ()
+{
+  path_ = 0;
+}
+
+
+Sources::Sources (Sources const &)
+{
+  assert (false);
+}
+
+
+void
+Sources::set_path (File_path *f)
+{
+  path_ = f;
+}
+
+/**
+   open a file
+
+   File_string the file to be opened, name might be changed if it is
+   found in a search path.
+*/
+Source_file *
+Sources::get_file (string *file_string) //UGH
+{
+  if (*file_string != "-" && path_)
+    {
+      string file_string_o = path_->find (*file_string);
+      if ((file_string_o == "") && (*file_string != ""))
+       return 0;
+      *file_string = file_string_o;
+    }
+  Source_file *f = new Source_file (*file_string);
+  add (f);
+  return f;
+}
+
+void
+Sources::add (Source_file *sourcefile)
+{
+  sourcefiles_.push_back (sourcefile);
+}
+
+Sources::~Sources ()
+{
+  for (vsize i = 0; i < sourcefiles_.size (); i++)
+    {
+      sourcefiles_[i]->unprotect ();
+    }
+}
+