]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/my-lily-parser.cc: remove paper_description function
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 11 Apr 2004 12:49:30 +0000 (12:49 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 11 Apr 2004 12:49:30 +0000 (12:49 +0000)
* lily/music-output-def.cc (LY_DEFINE): ly:output-description
new function.

* lily/main.cc: remove global_score_count.

* lily/book.cc (process): don't take header from global_input_file.

* buildscripts/lilypond-profile.sh (Error): set GS_FONTPATH

* lily/parser.yy (My_lily_lexer): remove current_parser global var.

* lily/music-output-def.cc (LY_DEFINE): new function
ly_output_description. This function does the bulk for  setting,
parsing and breaking down of an input file.

* lily/ly-module.cc (ly_make_anonymous_module): don't protect
anonymous modules globally. Let's hope they get GCd

25 files changed:
ChangeLog
buildscripts/lilypond-profile.sh
lily/all-font-metrics.cc
lily/book.cc
lily/include/input-file-results.hh
lily/include/lily-guile.hh
lily/include/main.hh
lily/include/music-output-def.hh
lily/include/my-lily-lexer.hh
lily/include/my-lily-parser.hh
lily/input-file-results.cc
lily/lexer.ll
lily/lily-guile.cc
lily/ly-module.cc
lily/main.cc
lily/music-output-def.cc
lily/my-lily-lexer.cc
lily/my-lily-parser.cc
lily/paper-book.cc
lily/paper-def.cc
lily/parser.yy
lily/performance.cc
lily/score.cc
scm/document-translation.scm
scm/font.scm

index 0deca1d110cde4a5db599033874809af4ad55a33..135cf3ea3005decf2940f6496d3b95534e348541 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2004-04-11  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/music-output-def.cc (LY_DEFINE): ly:output-description
+       new function.
+
+       * lily/main.cc: remove global_score_count.
+
+       * lily/book.cc (process): don't take header from global_input_file.
+
+       * buildscripts/lilypond-profile.sh (Error): set GS_FONTPATH
+
+       * lily/parser.yy (My_lily_lexer): remove current_parser global var.
+
+       * lily/music-output-def.cc (LY_DEFINE): new function
+       ly_output_description. This function does the bulk for  setting,
+       parsing and breaking down of an input file.
+
+       * lily/ly-module.cc (ly_make_anonymous_module): don't protect
+       anonymous modules globally. Let's hope they get GCd
+
        * scripts/lilypond.py (run_dvips): add sauter-mftrace.map 
 
 2004-04-11  Jan Nieuwenhuizen  <janneke@gnu.org>
index d8ea2d3e6766d1b23a07de49c12397d6ee311f7f..43c535882be78888fc8f727b301cc711703f9ff6 100644 (file)
@@ -84,8 +84,9 @@ else
        ## export GS_LIB
 
        # For direct ps output fonts. Add all available TeX Type1 fonts
-       ## GS_FONTPATH=`kpsewhich -expand-path=\\$T1FONTS`:${GS_FONTPATH:=""}
-       ## export GS_FONTPATH
+       tmppfadir=`kpsewhich ecrm10.pfa`
+       GS_FONTPATH=$datadir/pfa:`dirname $tmppfadir`:${GS_FONTPATH:=""}
+       export GS_FONTPATH
 
 fi # remove for zsh
        
index 6b4b63803f7b777838f6393ea4cd8c78ca2b61ff..304139cd95deeeb4cea707478697a0eae0bb5fd8 100644 (file)
@@ -11,7 +11,6 @@
 #include "config.h"
 #include "main.hh"
 #include "all-font-metrics.hh"
-
 #include "warn.hh"
 #include "afm.hh"
 #include "tfm.hh"
index c6a4ddd5241a2b78e775a315e3cb8a1c1bb9b4c3..e35f9d237d5e7d9d835c517c1ac9545a2ce99524 100644 (file)
@@ -88,7 +88,9 @@ Book::process (String outname, Music_output_def *default_def, SCM header)
          if (paper)
            paper_book->papers_.push (paper);
          paper_book->scores_.push (systems);
-         paper_book->global_headers_.push (global_input_file->header_);
+
+         // fixme.
+         //paper_book->global_headers_.push (global_input_file->header_);
          //paper_book->headers_.push (scores_[i]->header_);
          paper_book->headers_.push (header);
        }
index 610ff422a6300dc9e029e2a38dc60f12dd055320..cff21cbf0b251267e600383e991a274e2e251019 100644 (file)
 #ifndef FILE_RESULTS_HH
 #define FILE_RESULTS_HH
 
-#include "lily-proto.hh"
-#include "source.hh"
-#include "parray.hh"
-#include "protected-scm.hh"
+#include "lily-guile.hh"
 
-class Input_file_results
-{
-public:
-  Sources sources_;
-  Array<String> inclusion_names_;
-  Array<String> target_strings_;
-  Protected_scm header_;
 
-  int book_count_;
-  int score_count_;
-  
-  void do_deps (String);
-
-  Input_file_results (String init, String in, String out);
-  ~Input_file_results ();
-  
-private:
-  /* Make sure we never get an implicit constructor.*/
-  Input_file_results ();
-};
-
-extern Input_file_results* global_input_file;
-
-void do_one_file (char const* file);
+SCM ly_parse_file (SCM);
 
 #endif /* FILE_RESULTS_HH */
 
index bad4d43e2ed80e3c4b79499c62b3425ffcbd687b..35690a1da8cf3451983fbd18b322434c9068e78a 100644 (file)
@@ -235,7 +235,7 @@ void ly_display_scm (SCM s);
 #include "array.hh"
 
 void read_lily_scm_file (String);
-void ly_init_guile ();
+void ly_c_init_guile ();
 
 bool is_direction (SCM s);
 bool is_number_pair (SCM);
index 5465c3cfd972320d5446f3d357674f9ebbdb1d44..5470fc583254c8c6151d86e75a299c3ad8a16405 100644 (file)
@@ -19,8 +19,11 @@ void add_score (Score* s);
 void set_default_output (String s);
 String find_file (String);
 void call_constructors ();
-extern Array<String> get_inclusion_names ();
-extern void set_inclusion_names (Array<String>);
+
+Array<String> get_inclusion_names ();
+void set_inclusion_names (Array<String>);
+
+
 extern String init_name_global;
 
 /* FIXME: in warn.cc */
@@ -43,6 +46,5 @@ extern bool internal_type_checking_global_b;
 extern Array<String> failed_files;
 extern int exit_status_global;
 extern File_path global_path;
-extern int score_count_global;
 
 #endif /* MAIN_HH */
index 4bde0d6e8d32ee1aaa56067b4b275d3744e07063..e1b13accc1c73497769d0716733747bfc23f3304 100644 (file)
@@ -24,7 +24,7 @@ class Music_output_def
 public:
   Scheme_hash_table * translator_tab_;
   Input input_origin_;
-  
+  Array<String> targets_;
   SCM scope_;
 
   virtual void derived_mark ();
@@ -39,6 +39,8 @@ public:
   SCM get_scmvar (String id) const;
   SCM lookup_variable (SCM sym) const;
   void set_variable (SCM, SCM sym);
+  // fixme: dependencies
+  //  virtual void add_target_file (String);
   
   DECLARE_SMOBS (Music_output_def,);
 };
index 600e3dec3fcaf961a0c26ccd2aa329a4060d499d..008f26ae91ee58bd4b5064a64f6e431b22f1ff7d 100644 (file)
@@ -24,7 +24,6 @@ bool busy_parsing ();
 void kill_lexer ();
 void set_lexer ();
 
-/// lexer for LilyPond
 class My_lily_lexer : public Includable_lexer 
 {
   Protected_scm scopes_;
@@ -33,16 +32,19 @@ public:
   String main_input_name_;
   void *lexval;
   bool main_input_b_;
+  
+  Sources * sources_; 
 
   /*
-    Scheme hash tables with (oct name acc)  values, and symbol keys
+   Scheme hash tables with (oct name acc)  values, and symbol keys
    */
   Protected_scm chordmodifier_tab_;
   Protected_scm pitchname_tab_stack_;
+
   Keyword_table * keytable_;
   int errorlevel_;
 
-  My_lily_lexer ();
+  My_lily_lexer (Sources*);
   ~My_lily_lexer ();
   int yylex ();
 
index b98bc843ba01ed824e567a584e79a7656ba7ba89..05393324d58f80e75d778231a6b01eaf13cfb09c 100644 (file)
 #ifndef MY_LILY_PARSER_HH
 #define MY_LILY_PARSER_HH
 
+#include "protected-scm.hh"
 #include "lily-proto.hh"
 #include "string.hh"
 #include "parray.hh"
 #include "lily-proto.hh"
-#include "lily-proto.hh"
 #include "duration.hh"
 #include "pitch.hh"
 #include "string.hh"
@@ -30,7 +30,7 @@
 class My_lily_parser 
 {
 public:
-  My_lily_parser (Input_file_results * sources);
+  My_lily_parser (Sources * sources);
   ~My_lily_parser ();
 
   void do_init_file ();
@@ -40,10 +40,13 @@ public:
   Duration default_duration_;
   String output_basename_;
   
-  Scheme_hash_table *default_header_;
+  Protected_scm header_;
 
+  int score_count_;
+  int book_count_;
+  Sources *sources_;
+  
   int fatal_error_;
-  Input_file_results * input_file_;
   int error_level_;
 
   My_lily_lexer * lexer_;
index d29420140fe53edfe8a4c1afd8b274c472b7c367..5c900200c76a076e8c557bb1218fee7a4cb3534a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  scores.cc -- implement some globals
+  input-file-results.cc -- implement some globals
 
   source file of the GNU LilyPond music typesetter
 
@@ -57,8 +57,7 @@ LY_DEFINE (ly_set_point_and_click, "ly:set-point-and-click", 1, 0, 0,
     val = scm_c_eval_string ("line-location");
 
   scm_module_define (global_lily_module, ly_symbol2scm ("point-and-click"), val);
-
-  store_locations_global_b =is_procedure (val);
+  store_locations_global_b = is_procedure (val);
   return SCM_UNSPECIFIED;
 }
 
@@ -100,57 +99,6 @@ write_dependency_file (String fn,
   fprintf (f, "%s\n",  out.to_str0 ());
 }
 
-
-void
-Input_file_results::do_deps (String output)
-{
-  if (dependency_global_b)
-    {
-      Path p = split_path (output);
-      p.ext = "dep";
-      write_dependency_file (p.to_string (),
-                            target_strings_,
-                            inclusion_names_);
-    }
-}
-
-Input_file_results::~Input_file_results ()
-{
-  inclusion_names_.clear ();
-  if (header_)
-    header_ = SCM_EOL;
-
-  global_input_file = 0;
-
-  ly_clear_anonymous_modules ();
-}
-
-Input_file_results* global_input_file;
-
-Input_file_results::Input_file_results (String init,
-                                       String in_file, String out_file)
-{
-  header_ = ly_make_anonymous_module ();
-  global_input_file = this;
-  book_count_ = 0;
-  score_count_ = 0;
-  sources_.set_path (&global_path);
-  
-  progress_indication (_f ("Now processing `%s'", in_file.to_str0 ()));
-  progress_indication ("\n");
-
-  My_lily_parser parser (this);
-  parser.parse_file (init, in_file, out_file);
-  
-  if (parser.error_level_)
-    {
-      exit_status_global  = 1;
-      failed_files.push (in_file);
-    }
-  
-  do_deps (out_file);
-}
-
 /* Distill full input file name from command argument.  PATH describes
    file name with added default extension, ".ly" if none.  "-" is
    STDIN.  */
@@ -179,10 +127,15 @@ distill_inname (String str)
   return p;
 }
 
-/* ugr. */
-void
-do_one_file (char const *file)
+LY_DEFINE(ly_parse_file, "ly:parse-file",
+         1,0,0,
+         (SCM name),
+         "Parse a single @code{.ly} file."
+         )
 {
+  SCM_ASSERT_TYPE (is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
+  char const *file = SCM_STRING_CHARS(name);
+  
   String infile (file);
   Path inpath = distill_inname (infile);
   
@@ -212,14 +165,41 @@ do_one_file (char const *file)
     {
       warning (_f ("can't find file: `%s'", init));
       warning (_f ("(search path: `%s')", global_path.to_string ().to_str0 ()));
-      return;
+      return SCM_UNSPECIFIED;
     }
 
   if ((in_file != "-") && global_path.find (in_file).is_empty ())
     {
       warning (_f ("can't find file: `%s'", in_file));
-      return;
+      return SCM_UNSPECIFIED;
     }
+  
+  Sources sources;
+  sources.set_path (&global_path);
+  
+  progress_indication (_f ("Now processing `%s'", in_file.to_str0 ()));
+  progress_indication ("\n");
 
-  Input_file_results inp_file (init, in_file, out_file);
+  My_lily_parser parser (&sources);
+  parser.parse_file (init, in_file, out_file);
+  
+  if (parser.error_level_)
+    {
+      exit_status_global = 1;
+      failed_files.push (in_file);
+    }
+
+#if 0
+  // fixme dependencies
+  if (dependency_global_b)
+    {
+      Path p = split_path (output);
+      p.ext = "dep";
+      write_dependency_file (p.to_string (),
+                            target_strings_,
+                            inclusion_names_);
+    }
+#endif
+
+  return SCM_UNSPECIFIED;
 }
index a5cc4354fc30ec2e9e22317f74a2501e0119a6cf..010f5c5284910cb89003f2a8be9858e4d2c3d706 100644 (file)
@@ -241,7 +241,7 @@ HYPHEN              --
        String s (YYText ()+1);
        s = s.left_string (s.index_last ('"'));
 
-       new_input (s, &global_input_file->sources_);
+       new_input (s, sources_);
        yy_pop_state ();
 }
 <incl>\\{BLACK}*;?{WHITE} { /* got the include identifier */
@@ -252,7 +252,7 @@ HYPHEN              --
 
        SCM sid = lookup_identifier (s);
        if (is_string (sid)) {
-               new_input (ly_scm2string (sid), &global_input_file->sources_);
+               new_input (ly_scm2string (sid), sources_);
                yy_pop_state ();
        } else { 
            String msg (_f ("wrong or undefined identifier: `%s'", s ));
index 3df914a86f1ead7d674b257299b76804c34e1389..24cbc9e069a6c4b83a85283d5956bd645b1b5196 100644 (file)
@@ -225,11 +225,10 @@ ly_init_ly_module (void *)
   scm_primitive_load_path (scm_makfrom0str ("lily.scm"));
 }
 
-
 SCM global_lily_module;
 
 void
-ly_init_guile ()
+ly_c_init_guile ()
 {
   global_lily_module = scm_c_define_module ("lily", ly_init_ly_module, 0);
   scm_c_use_module ("lily");
index a3a5be680f8f63178f04ee7d898f29b080990c81..d7d72fce5be2dfca1a4cfa8d67e109c5c7cc7b5f 100644 (file)
@@ -23,32 +23,14 @@ ly_init_anonymous_module (void * data)
   scm_c_use_module ("lily");
 }
 
-Protected_scm anon_modules;
-
 SCM
 ly_make_anonymous_module ()
 {
   String s = "*anonymous-ly-" + to_string (module_count++) +  "*";
   SCM mod = scm_c_define_module (s.to_str0(), ly_init_anonymous_module, 0);
-  anon_modules = scm_cons (mod, anon_modules);
   return mod;
 }
 
-void
-ly_clear_anonymous_modules ()
-{
-  SCM s = anon_modules;
-  anon_modules = SCM_EOL;
-  
-  for (; is_pair (s) ; s = ly_cdr (s))
-    {
-      SCM tab= scm_c_make_hash_table (2);
-      /* UGH. */
-      SCM_STRUCT_DATA (ly_car (s))[scm_module_index_obarray]
-       = (long unsigned int) tab;
-    }
-}
-
 #define FUNC_NAME __FUNCTION__
 
 static SCM
index 6748d944db110f0411cfd18e2a015a2f35f0c2c0..c9a60ca970218c7da02314f358c68bc09757fbc6 100644 (file)
@@ -68,10 +68,13 @@ bool safe_global_b = false;
 /* Verbose progress indication? */
 bool verbose_global_b = false;
 
-/* Scheme code to execute before parsing, after .scm init */
+/* Scheme code to execute before parsing, after .scm init
+   This is where -e arguments are appended to.
+*/
 String init_scheme_code_string = "(begin #t ";
 
 
+
 /*
  * Miscellaneous global stuff.
  */
@@ -79,10 +82,6 @@ String init_scheme_code_string = "(begin #t ";
 int exit_status_global;
 File_path global_path;
 
-/* Number of current score output block.  If there's more than one
-   score block, this counter will be added to the output filename. */
-int score_count_global;
-
 
 /*
  * File globals.
@@ -266,10 +265,11 @@ main_with_guile (void *, int, char **)
       prepend_load_path (String (prefix_directory[i]) + "/scm");
     }
 
+
   if (verbose_global_b)
     dir_info (stderr);
 
-  ly_init_guile ();
+  ly_c_init_guile ();
   call_constructors ();
   progress_indication ("\n");
 
@@ -290,7 +290,7 @@ main_with_guile (void *, int, char **)
       scm_gc ();
       scm_call_0 (ly_scheme_function ("dump-gc-protects"));
 #endif
-      do_one_file (arg);
+      ly_parse_file (scm_makfrom0str (arg));
       first = false;
     }
   delete option_parser;
index 73c2326e73c22a52996eda9038d2c1bc52222ad3..71b8b3f63f3b9ef3b461a60c4a789e153853d88f 100644 (file)
@@ -7,15 +7,15 @@
 */
 
 #include "scm-hash.hh"
-
-#include "warn.hh"
-#include "music-output-def.hh"
-#include "global-context.hh"
 #include "context-def.hh"
-#include "main.hh"
 #include "file-path.hh"
+#include "global-context.hh"
 #include "lily-guile.hh"
 #include "ly-module.hh"
+#include "main.hh"
+#include "music-output-def.hh"
+#include "paper-def.hh"
+#include "warn.hh"
 
 #include "ly-smobs.icc"
 
@@ -162,3 +162,20 @@ LY_DEFINE (ly_output_def_clone, "ly:output-def-clone",
   return s;
 }
 
+LY_DEFINE(ly_output_description, "ly:output-description",
+         1,0,0,
+         (SCM output_def),
+         "Return the description of translators in @var{output-def}.")
+{
+  Music_output_def *id = unsmob_music_output_def (output_def);
+  SCM al = id->translator_tab_->to_alist ();
+  SCM l = SCM_EOL;
+  for (SCM s = al ; is_pair (s); s = ly_cdr (s))
+    {
+      Context_def * td = unsmob_context_def (ly_cdar (s));
+      l = scm_cons (scm_cons (ly_caar (s), td->to_alist ()),  l);
+    }
+  return l;  
+}
+  
+
index cafa1f6a78436a70c8e6a4d973a9c237ae9b1a7d..dc91e7d96fd4662aabcfedaebb744e81fb1379ec 100644 (file)
@@ -93,13 +93,13 @@ static Keyword_ent the_key_tab[] = {
 };
 
 
-My_lily_lexer::My_lily_lexer ()
+My_lily_lexer::My_lily_lexer (Sources *srcs)
 {
   keytable_ = new Keyword_table (the_key_tab);
   encoding_ = SCM_EOL;
   chordmodifier_tab_ = scm_make_vector (scm_int2num (1), SCM_EOL);
   pitchname_tab_stack_ = SCM_EOL; 
-  
+  sources_ = srcs;
   scopes_ = SCM_EOL;
   
   add_scope (ly_make_anonymous_module ());
@@ -167,8 +167,7 @@ void
 My_lily_lexer::start_main_input ()
 {
   // yy_flex_debug = 1;
-
-  new_input (main_input_name_, &global_input_file->sources_);
+  new_input (main_input_name_, sources_);
   /* Do not allow \include in --safe-mode */
   allow_includes_b_ = allow_includes_b_ && ! safe_global_b;
 
index 47728ded09ab28a171e33fa23663175dbb62142a..7c5e9b16078fcc2ae68c3d2aba174dff0f79d17b 100644 (file)
 #include "main.hh"
 #include "parser.hh"
 #include "input-file-results.hh"
+#include "ly-module.hh"
 #include "scm-hash.hh"
 
-My_lily_parser::My_lily_parser (Input_file_results * source)
+My_lily_parser::My_lily_parser (Sources * sources)
 {
-  input_file_ = source;
+  book_count_ = 0;
+  score_count_ = 0;
   lexer_ = 0;
+  sources_ = sources;
   default_duration_ = Duration (2,0);
   error_level_ = 0;
   last_beam_start_ = SCM_EOL;
 
-  default_header_ =0;
+  header_ = ly_make_anonymous_module ();
 }
 
 My_lily_parser::~My_lily_parser ()
 {
   delete lexer_;
-  if (default_header_)
-    scm_gc_unprotect_object (default_header_->self_scm ());
 }
 
 /* Process one .ly file, or book.  */
 void
 My_lily_parser::parse_file (String init, String in_file, String out_file)
 {
-  lexer_ = new My_lily_lexer;
+  lexer_ = new My_lily_lexer (sources_);
   output_basename_ = out_file;
   
   lexer_->main_input_name_ = in_file;
@@ -46,7 +47,7 @@ My_lily_parser::parse_file (String init, String in_file, String out_file)
   progress_indication ("\n");
 
   set_yydebug (0);
-  lexer_->new_input (init, &input_file_->sources_);
+  lexer_->new_input (init, sources_);
 
   /* Read .ly IN_FILE, lex, parse, write \score blocks from IN_FILE to
      OUT_FILE (unless IN_FILE redefines output file name).  */
@@ -58,7 +59,8 @@ My_lily_parser::parse_file (String init, String in_file, String out_file)
       error_level_ = 1;
     }
 
-  input_file_->inclusion_names_ = lexer_->filename_strings_;
+  // fixme: dependencies
+  //input_file_->inclusion_names_ = lexer_->filename_strings_;
 
   error_level_ = error_level_ | lexer_->errorlevel_; // ugh naming.
 }
@@ -97,14 +99,14 @@ My_lily_parser::here_input () const
   /*
     Parsing looks ahead , so we really want the previous location of the
     lexer, not lexer_->here_input ().
-   */
+  */
   /*
     Actually, that gets very icky when there are white space, because
     the line-numbers are all wrong.  Let's try the character before
     the current token. That gets the right result for
     note/duration stuff, but doesn't mess up for errors in the 1st token of the line. 
     
-   */
+  */
   Input hi (lexer_->here_input ());
 
   char const * bla = hi.defined_str0_;
@@ -114,30 +116,3 @@ My_lily_parser::here_input () const
   
   return Input (hi.source_file_, bla);
 }
-
-#include "paper-def.hh"
-#include "context-def.hh"
-
-My_lily_parser * current_parser;
-
-MAKE_SCHEME_CALLBACK (My_lily_parser,paper_description, 0);
-
-SCM
-My_lily_parser::paper_description ()
-{
-  My_lily_parser * me = current_parser;
-
-  Music_output_def *id = unsmob_music_output_def (me->lexer_->lookup_identifier ("$defaultpaper"));
-  Paper_def *p = dynamic_cast<Paper_def*> (id->clone ());
-
-  SCM al = p->translator_tab_->to_alist ();
-  SCM l = SCM_EOL;
-  for (SCM s = al ; is_pair (s); s = ly_cdr (s))
-    {
-      Context_def * td = unsmob_context_def (ly_cdar (s));
-      l = scm_cons (scm_cons (ly_caar (s), td->to_alist ()),  l);
-    }
-  return l;  
-}
-  
-
index fb4b9a76fc873565a84394c8e631b03de6be38ed..8620970ab161ab3436df0fb05196ffcca7a8bca5 100644 (file)
@@ -273,7 +273,8 @@ Paper_book::scopes (int i)
   SCM scopes = SCM_EOL;
   if (headers_[i])
     scopes = scm_cons (headers_[i], scopes);
-  if (global_headers_[i] && global_headers_[i] != headers_[i])
+  if (global_headers_.size ()
+      && global_headers_[i] && global_headers_[i] != headers_[i])
     scopes = scm_cons (global_headers_[i], scopes);
   return scopes;
 }
index 98b46180def98feacdcae2d6423a8a365a6b575c..9d95e0ed18baf0e049d72c367256ec3b86e4d0f5 100644 (file)
@@ -79,7 +79,10 @@ Paper_def::get_paper_outputter (String outname) const
 {
   progress_indication (_f ("paper output to `%s'...",
                           outname == "-" ? String ("<stdout>") : outname));
-  global_input_file->target_strings_.push (outname);
+
+  // fixme: dependencies
+  //  add_target_file (outname);
+  
   Paper_outputter * po = new Paper_outputter (outname);
   Path p = split_path (outname);
   p.ext = "";
index aaad718b357a43e6e74898bc5e0a8034197dada1..20be2022c368fbee3207548ed273bc91097876b5 100644 (file)
@@ -422,15 +422,15 @@ lilypond: /* empty */
 
 toplevel_expression:
        lilypond_header {
-               THIS->input_file_->header_ = $1;
+               THIS->header_ = $1;
        }
        | add_quote {
        }
        | book_block {
                Book *book = $1;
-               SCM header = THIS->input_file_->header_.to_SCM ();
+               SCM header = THIS->header_;
                Path outname = split_path (THIS->output_basename_);
-               int *c = &THIS->input_file_->book_count_;
+               int *c = &THIS->book_count_;
                if (*c)
                        outname.base += "-" + to_string (*c);
                (*c)++;
@@ -443,10 +443,10 @@ toplevel_expression:
        | score_block {
                Score *sc = $1;
                SCM head = is_module (sc->header_) ? sc->header_
-                       : THIS->input_file_->header_.to_SCM ();
+                       : THIS->header_.to_SCM ();
 
                Path p = split_path (THIS->output_basename_);
-               int *c = &THIS->input_file_->score_count_;
+               int *c = &THIS->score_count_;
                if (*c)
                        p.base += "-" + to_string (*c);
 
@@ -2387,12 +2387,9 @@ My_lily_parser::set_yydebug (bool )
 #endif
 }
 
-extern My_lily_parser *current_parser;
-
 void
 My_lily_parser::do_yyparse ()
 {
-       current_parser = this;;
        yyparse ((void*)this);
 }
 
index 3c9e700f0484f880f1feb2c21d920226cb920eb2..2a12ac1c73a1d07206b9216bae4dfcccc9b2d28e 100644 (file)
@@ -171,7 +171,8 @@ Performance::process (String out)
   Midi_stream midi_stream (out);
   progress_indication (_f ("MIDI output to `%s'...", out));
 
-  global_input_file->target_strings_.push (out);
+  // fixme: dependencies
+  //add_target_file (out);
 
   output (midi_stream);
   progress_indication ("\n");
index e81210c9961e7715247c4b7b10bf0d4b12e2244e..bf668c1b0ff6686377597a47295874018f22f06b 100644 (file)
@@ -174,7 +174,10 @@ default_rendering (SCM music, SCM outdef, SCM header, SCM outname)
          Paper_score *ps = dynamic_cast<Paper_score*> (output);
          paper_book->papers_.push (ps->paper_);
          paper_book->scores_.push (systems);
-         paper_book->global_headers_.push (global_input_file->header_);
+
+         // fixme.
+         //paper_book->global_headers_.push (global_input_file->header_);
+         
          paper_book->headers_.push (header);
          paper_book->classic_output (ly_scm2string (outname));
          scm_gc_unprotect_object (paper_book->self_scm ());
index 5ebdc811beeafd8699fb255416f945740be96753..a138bbc3997441cade3ba0ee8e9703d51363d8a6 100644 (file)
@@ -74,7 +74,7 @@
 
      (if in-which-contexts
         (let*
-            ((paper-alist (My_lily_parser::paper_description))
+            ((paper-alist (ly:output-description $defaultpaper))
              (context-description-alist (map cdr paper-alist))
              (contexts
               (apply append
 (define (all-contexts-doc)
   (let* (
         (paper-alist
-         (sort (My_lily_parser::paper_description)
+         (sort (ly:output-description $defaultpaper)
                (lambda (x y) (symbol<? (car x) (car y)))))
         (names (sort (map symbol->string (map car paper-alist)) string<?))
         (contexts (map cdr paper-alist))
index e07e706625f4a3fe447ee1e574261cc2ee74b510..8491cd3b422e2ed93632b357e924cd04143dd6da 100644 (file)
                ,(delay (ly:font-load "ecti12"))
                )))
      (#(roman italic bold) .
-      (10.0 . #(,(delay (ly:font-load "ecbxti8"))
-               ,(delay (ly:font-load "ecbxti10"))
-               ,(delay (ly:font-load "ecbxti14"))
+      (10.0 . #(,(delay (ly:font-load "ecbi8"))
+               ,(delay (ly:font-load "ecbi10"))
+               ,(delay (ly:font-load "ecbi14"))
                )))
      
      (#(roman caps medium) .