switch runtime.
2004-03-09 Jan Nieuwenhuizen <janneke@gnu.org>
+ * lily/include/paper-book.hh (PAGE_LAYOUT): Define as "ps"; make
+ switch runtime.
+
* lily/include/music-output.hh (process): Change signature to
return SCM.
#ifndef PAPER_BOOK_HH
#define PAPER_BOOK_HH
-// #define PAGE_LAYOUT 1
-
#include "lily-guile.hh"
#include "parray.hh"
#include "protected-scm.hh"
+#define PAGE_LAYOUT "ps"
+
class Paper_book
{
public:
Paper_book book;
paper_book = &book;
Input_file_results inp_file (init, in_file, out_file);
-#ifdef PAGE_LAYOUT
- book.output (out_file);
-#endif
+ if (output_format_global == PAGE_LAYOUT)
+ book.output (out_file);
}
#include "paper-def.hh"
#include "input-file-results.hh"
#include "ly-module.hh"
-
-
+#include "paper-book.hh"
#include "input-smob.hh" // output_expr
{
Stencil *stil = unsmob_stencil (ly_cdar (s));
SCM head = ly_caar (s);
-#ifndef PAGE_LAYOUT
+
if (head == ly_symbol2scm ("between-system-string"))
{
between = stil->get_expr ();
continue;
}
-#endif
+
output_expr (stil->get_expr (), ly_scm2offset (head));
}
else
{
output_scheme (scm_list_1 (ly_symbol2scm ("stop-system")));
- if (between != SCM_EOL)
+ if (output_format_global != PAGE_LAYOUT && between != SCM_EOL)
output_scheme (between);
}
}
id = id ? id->clone () : new Paper_def;
default_rendering (sc->music_, id->self_scm (), head, outname);
-
-#ifndef PAGE_LAYOUT
- scm_gc_unprotect_object (id->self_scm ());
-#endif
+
+ if (output_format_global != PAGE_LAYOUT)
+ scm_gc_unprotect_object (id->self_scm ());
}
-#ifndef PAGE_LAYOUT
- scm_gc_unprotect_object (sc->self_scm ());
-#endif
+ if (output_format_global != PAGE_LAYOUT)
+ scm_gc_unprotect_object (sc->self_scm ());
}
| output_def {
SCM id = SCM_EOL;
paper_book->headers_.push (header);
Paper_score *ps = dynamic_cast<Paper_score*> (output);
paper_book->papers_.push (ps->paper_);
-#ifndef PAGE_LAYOUT
- paper_book->classic_output (ly_scm2string (outname));
-#endif
+ if (output_format_global != PAGE_LAYOUT)
+ paper_book->classic_output (ly_scm2string (outname));
}
delete output;
}
stil->smobbed_copy ()), line);
}
-#ifndef PAGE_LAYOUT
- SCM lastcol = ly_car (get_property ("columns"));
- Grob *g = unsmob_grob (lastcol);
-
- SCM between = ly_symbol2scm ("between-system-string");
- SCM inter = g->internal_get_property (between);
- if (gh_string_p (inter))
+ if (output_format_global != PAGE_LAYOUT)
{
- Stencil *stil = new Stencil (Box (), scm_list_2 (between, inter));
- line = scm_cons (scm_cons (between, stil->smobbed_copy ()), line);
+ SCM lastcol = ly_car (get_property ("columns"));
+ Grob *g = unsmob_grob (lastcol);
+
+ SCM between = ly_symbol2scm ("between-system-string");
+ SCM inter = g->internal_get_property (between);
+ if (gh_string_p (inter))
+ {
+ Stencil *stil = new Stencil (Box (), scm_list_2 (between, inter));
+ line = scm_cons (scm_cons (between, stil->smobbed_copy ()), line);
+ }
}
-#endif
Interval x (extent (this, X_AXIS));
Interval y (extent (this, Y_AXIS));