- /*
- we don't rename dump_scheme, because we might in the future want
- to remember Scheme. We don't now, because it sucks up a lot of memory.
- */
- dump_scheme (scm);
-}
-
-void flatten_write (SCM x, Paper_stream*ps)
-{
- if (ly_pair_p (x))
- {
- flatten_write (ly_car (x),ps);
- flatten_write (ly_cdr (x),ps);
- }
- else if (gh_string_p (x))
- {
- *ps << String ( SCM_STRING_CHARS(x)) ;
- }
-}
-
-
-/*
- UGH.
-
- Should probably change interface to do less eval (symbol), and more
- apply (procedure, args)
- */
-void
-Paper_outputter::dump_scheme (SCM s)
-{
- if (verbatim_scheme_b_)
- {
- *stream_p_ << ly_scm2string (ly_write2scm (s));
- }
- else
- {
- SCM result = scm_primitive_eval (s);
- flatten_write (result, stream_p_);
- }