]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/paper-outputter.cc
patch::: 1.3.59.uu2
[lilypond.git] / lily / paper-outputter.cc
index 4999f0800ecd3d00d1ec653df93e7df729022e3b..92e5180e11546467c87e2cacab913dd27e3c70c4 100644 (file)
@@ -13,7 +13,6 @@
 #include <iostream.h>
 
 #include "dimensions.hh"
-#include "dictionary-iter.hh"
 #include "virtual-methods.hh"
 #include "paper-outputter.hh"
 #include "paper-stream.hh"
@@ -149,25 +148,32 @@ Paper_outputter::dump_scheme (SCM s)
 void
 Paper_outputter::output_scope (Scope *scope, String prefix)
 {
-  for (Scope_iter i (*scope); i.ok (); i++)
+  SCM al = scope->to_alist ();
+  for (SCM s = al ; gh_pair_p (s); s = gh_cdr (s))
     {
-      if (dynamic_cast<String_identifier*> (i.val ()))
-       {
-         String val = *i.val()->access_content_String (false);
+      SCM k = gh_caar (s);
+      SCM v = gh_cdar (s);
+
+      Identifier * id = unsmob_identifier (v);
+      String s = ly_symbol2string (k);
 
-         output_String_def (prefix + i.key (), val);
+      if (dynamic_cast<String_identifier*> (id))
+       {
+         String val = *id->access_content_String (false);
+         
+         output_String_def (prefix + s, val);
        }
-      else if(dynamic_cast<Real_identifier*> (i.val ()))
+      else if(dynamic_cast<Real_identifier*> (id))
        {
-         Real val  = *i.val ()->access_content_Real (false);
+         Real val  = *id->access_content_Real (false);
 
-         output_Real_def (prefix + i.key (), val);       
+         output_Real_def (prefix + s, val);      
        }
-      else if (dynamic_cast<int_identifier*> (i.val ()))
+      else if (dynamic_cast<int_identifier*> (id))
        {
-         int val  = *i.val ()->access_content_int (false);       
+         int val  = *id->access_content_int (false);     
          
-         output_int_def (prefix + i.key (), val);        
+         output_int_def (prefix + s, val);       
        }
     }
 }