]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/input-file-results.cc
* lily/auto-beam-engraver.cc (process_music): end/junk beam if
[lilypond.git] / lily / input-file-results.cc
index 7ceb7b2cfc2ad30660caa75df1fe928dc673858d..8239852e4b02ec52859edb863e817f9f8dcb824d 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #include "config.h"
 
 #include "source.hh"
 #include "lily-version.hh"
 #include "scm-hash.hh"
+#include "ly-modules.hh"
 
 
-LY_DEFINE(ly_set_point_and_click_x, "set-point-and-click!", 1, 0, 0,
+/*
+  no ! suffix since it doesn't modify 1st argument.
+ */
+LY_DEFINE(ly_set_point_and_click, "ly:set-point-and-click", 1, 0, 0,
          (SCM what),
-         "Set the options for Point-and-click source specials output. The
-argument is a symbol.  Possible options are @code{none} (no source specials),
-@code{line} and @code{line-column}")
+         "Set the options for Point-and-click source specials output. The\n"
+"argument is a symbol.  Possible options are @code{none} (no source specials),\n"
+"@code{line} and @code{line-column}")
 {
   /*
     UGH.
@@ -47,13 +51,10 @@ argument is a symbol.  Possible options are @code{none} (no source specials),
   else if (what == ly_symbol2scm ("line"))
     val = gh_eval_str ("line-location");
 
-  /*
-    UGH.
+  extern SCM lily_module; 
+  scm_module_define (lily_module, ly_symbol2scm ("point-and-click"), val);
 
-    How do you do set! from C ? 
-   */
-  scm_primitive_eval (scm_list_n (ly_symbol2scm ("set!"),
-                                 ly_symbol2scm ("point-and-click"), val, SCM_UNDEFINED));
+  store_locations_global_b =gh_procedure_p (val);
   return SCM_UNSPECIFIED;
 }
 
@@ -108,7 +109,7 @@ Input_file_results::do_deps ()
     {
       Path p = split_path (output_name_global);
       p.ext = "dep";
-      write_dependency_file (p.string (),
+      write_dependency_file (p.to_string (),
                             target_strings_,
                             inclusion_names_);
     }
@@ -150,16 +151,18 @@ Input_file_results::~Input_file_results ()
     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, String file_string)
 {
   header_ = SCM_EOL;
   global_input_file = this;
-  ly_set_point_and_click_x (SCM_BOOL_F);
   
   sources_.set_path (&global_path);
   
@@ -185,7 +188,7 @@ do_one_file (String init_string, String file_string)
    if (init_string.length () && global_path.find (init_string).empty_b ())
     {
       warning (_f ("can't find file: `%s'", init_string));
-      warning (_f ("(search path: `%s')", global_path.string ().to_str0 ()));
+      warning (_f ("(search path: `%s')", global_path.to_string ().to_str0 ()));
       return;
     }
   if ((file_string != "-") && global_path.find (file_string).empty_b ())