From: Han-Wen Nienhuys Date: Sun, 4 Aug 2002 16:56:18 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: release/1.5.72~39 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=baf32731650d510882eeb52d02f4ca0c816c7c29;p=lilypond.git *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index 6e7576c933..e15c768941 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2002-08-04 Han-Wen + + * lily/lily-guile.cc: change gh_str02scm scm_makfrom0str. + +2002-08-04 Werner Lemberg + + * tex/lilyponddefs.tex: s/filllastpage/lastpagefill/. + + * Documentation/user/refman.itely: Document it. + 2002-08-04 Han-Wen * lily/main.cc (sane_putenv): Oops. Should supply a private copy diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index b0b73dee1c..9b9eeb11e2 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -4428,6 +4428,15 @@ that case @code{interscoreline} specifies the minimum spacing. @cindex @code{interscoreline} @cindex @code{interscorelinefill} +If the variable @code{lastpagefill} is defined (that is, it gets any +value assigned in the @code{\paper} block), systems are evenly +distributed vertically on the last page. This might produce ugly results +in case there are not enough systems on the last page. Note that +@command{lilypond-book} ignores @code{lastpagefill}. See +@ref{Merging text and music with lilypond-book} for more information. + +@cindex @code{lastpagefill} + Page breaks are normally computed by @TeX{}, so they are not under direct control of LilyPond. However, you can insert a commands into the @file{.tex} output to instruct @TeX{} where to break pages. You diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index cdc4d0ef51..735200a1d0 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -25,9 +25,9 @@ @end menu Operating lilypond is done through text files: to print a piece of -music, you enter the music in a file. When you run lilypond, that -file is read, and after some computations, the program produces a file -containing the sheet music that you can print or view. +music, you enter the music in a file. When you run lilypond on that +file, the program produces another file which contains sheet music that +you can print or view. This tutorial starts with a small introduction to the LilyPond music language. After this first contact, we will show you how to run @@ -38,8 +38,8 @@ complex examples. @node First steps @section First steps -We tsart off with showing how very simple music is entered in -LilyPond: you get a simple note by typing its note name, from +We start off by showing how very simple music is entered in +LilyPond: you get a note simply by typing its note name, from @code{a} through @code{g}. So if you enter @quotation @example @@ -99,7 +99,9 @@ s16_" " @separate A sharp (@texisharp{}) is made by adding ``@code{is}'', a flat -(@texiflat{}) by adding ``@code{es}'': +(@texiflat{}) by adding ``@code{es}''. As you would expect, a +double-sharp or double-flat is made by adding ``@code{isis}'' or +``@code{eses}'': @quotation @example @@ -159,9 +161,10 @@ The clef can be set using the ``@code{\clef}'' command: @c what is more common name treble or violin? @c in Dutch, its violin. +@c in English its definately treble. @quotation @example -\clef violin +\clef treble \clef bass \clef alto \clef tenor @@ -182,9 +185,12 @@ s16_" " @end quotation @separate -From these commands and notes, a piece of music can be formed. A piece -of music is made by enclosing it in ``@code{\notes @{ ... @}}''. -LilyPond then knows that music follows (and not lyrics, for example): +@c From these commands and notes, a piece of music can be formed. A piece +@c of music is made by enclosing it in ``@code{\notes @{ ... @}}''. +@c rephrased: +With these commands you can now write a piece of music. The next step +is to enclose your music inside ``@code{\notes @{ .. @}}''. +This lets LilyPond know that music (and not lyrics, for example) follows: @quotation @example @@ -198,11 +204,11 @@ LilyPond then knows that music follows (and not lyrics, for example): @end quotation @separate -At this point, the piece of music is ready to be printed. This is done -by combining the music with a printing command. +Now the piece of music is almost ready to be printed. The final step is to +combine the music with a printing command. -The printing command is the so-called ``@code{\paper}'' block. You -will see later that the @code{\paper} block is necessary to customize +The printing command is the so-called ``@code{\paper}'' block. Later on +you will see that the @code{\paper} block is used to customize printing specifics. The music and the @code{\paper} block are combined by enclosing them in ``@code{\score @{ ... @}}''. This is what a full LilyPond source file looks like: @@ -238,18 +244,19 @@ LilyPond source file looks like: @node Running LilyPond @section Running LilyPond -In the last section, we explained what kind of things you could enter -in a lilypond file. In this section we explain how to run LilyPond, +In the last section we explained what kind of things you could enter +in a lilypond file. In this section we explain how to run LilyPond and how view or print the output. If you have not used LilyPond -before, want to test your setup of LilyPond, or try to run an example -file yourself, then read this section. The instructions that follow +before, want to test your setup of LilyPond, or want to run an example +file yourself, read this section. Most of the instructions that follow are for running LilyPond on Unix-like systems. Some additional instructions for running LilyPond on Windows are given at the end of this section. -You begin with opening a terminal window, and start up a text editor. -For example, open an xterm and execute @code{joe}. In your text editor, -enter the following input, and save the file as @file{test.ly}: +Begin by opening a terminal window and starting a text editor. +For example, you could open an xterm and execute @code{joe}. In your +text editor, enter the following input and save the file as +@file{test.ly}: @quotation @example @@ -281,7 +288,7 @@ You will see the following on your screen: @quotation @example -GNU LilyPond 1.4.0 +GNU LilyPond 1.6.0 Now processing: `/home/fred/ly/test.ly' Parsing... Interpreting music...[1] @@ -308,16 +315,15 @@ produce a window with some music notation on your screen: kghostview test.ps @end example @end quotation -If you are satisfied with the looks of the music displayed on your -screen, you can print the PS file by clicking File/Print inside -ghostview. +If the music on your screen looks good, you can print it by clicking +File/Print inside ghostview. The DVI file (@file{test.dvi}) contains the same sheet music in a different format. DVI files are more easily processed by the computer, -so viewing them usually is quicker. Execute @code{xdvi test.dvi} or +so viewing them usually is quicker. You can run @code{xdvi test.dvi} or @code{kdvi test.dvi} to view the DVI file. In Xdvi, the mouse buttons -activate magnifying glasses. Unfortunately, variable symbols, such as -beams and slurs won't show up in these. +activate magnifying glasses. Unfortunately, variable symbols (such as +beams and slurs) are not displayed in the magnifying glasses. If your DVI viewer does not have a "Print" button, you can print the file by executing @code{lpr test.ps}. @@ -334,25 +340,25 @@ GhostScript's website at @uref{http://www.ghostscript.com}. @cindex PostScript @cindex PDF -A final option, is to use the popular PDF format. You can get a PDF -file by running @code{ly2dvi --pdf test.ly}. With the @code{--pdf}, -you will get a DVI, PS and PDF file. The viewers for the PS files also +A final option is to use the popular PDF format. You can get a PDF +file by running @code{ly2dvi --pdf test.ly}. With @code{--pdf} +you will get DVI, PS and PDF files. Viewers for PS files also accept PDF files, but there are also many other applications for viewing PDF files. -If you are familiar with @TeX{}, then one warning is in place: do not -use other DVI drivers like @code{dvilj}. The @TeX{} coming out of -LilyPond uses embedded PostScript code, and will not render correctly -if you use anything different than @code{dvips}. +If you are familiar with @TeX{}, be warned: do not use other +DVI drivers like @code{dvilj}. The @TeX{} coming out of LilyPond +uses embedded PostScript code and will not render correctly if +you use anything other than @code{dvips}. @cindex dvips @cindex dvilj @cindex DVI driver @unnumberedsubsec Windows users -Windows users start the terminal by clicking on the LilyPond or Cygwin -icon. Notepad is sufficient for editing the LilyPond file. Viewing -the PS file can be done with: +Windows users can start the terminal by clicking on the LilyPond or +Cygwin icons. You can use any text editor (such as Notepad) to edit +the LilyPond file. Viewing the PS file can be done with: @quotation @example @code{gsview32 test.ps} @@ -368,10 +374,10 @@ You can also print from the command line by executing: @strong{SUMMARY} -To run LilyPond, enter a file, and run the command @code{ly2dvi} on -that file. The resulting files are either DVI or PostScript, and can +To run LilyPond, input a text file, then run the command @code{ly2dvi} on +that file. The resulting files are either DVI or PostScript, and can be viewed with @code{xdvi} (unix) and ghostview (unix and windows) -respectively. The following table summarizes the constructs that were +respectively. The following table summarizes the constructs that were discussed in the previous two sections. @multitable @columnfractions .3 .3 .4 @@ -463,7 +469,7 @@ s16_" " @c but we'd need to remove the ', from \key and tie To raise a note by an octave, add a high quote @code{'} (apostrophe) to the note name, to lower a note one octave, add a ``low quote'' @code{,} -(a comma). The central C is @code{c'}: +(a comma). Middle C is @code{c'}: @quotation @example @@ -480,7 +486,7 @@ c'4 c'' c''' \clef bass c c, A tie is created by entering a tilde ``@code{~}'' between the notes to be tied. A tie between two notes means that the second note must not be -played separately, but just makes the first note sound longer: +played separately; it just makes the first note sound longer: @quotation @lilypond[fragment,verbatim] @@ -561,9 +567,11 @@ and is therefore also a potential source of errors. The solution is to use ``relative octave'' mode. In practice, this is the most convenient way to copy existing music. To use relative mode, add @code{\relative} before the piece of music. You must also give a -note from which relative starts, in this case @code{c''}. If you type -no octavation quotes, relative mode chooses the note that is closest -to the previous one, which is often just the one you need. +note from which relative starts, in this case @code{c''}. If you don't +use octavation quotes (ie don't add ' or , after a note), relative mode +chooses the note that is closest to the previous one. Since most music +has small intervals, you can write quite a lot in relative mode without +using octavation quotes. @c don't use commas or quotes in this sentence For example: @code{c f} goes up; @code{c g} goes down: @@ -584,10 +592,12 @@ For example: @code{c f} goes up; @code{c g} goes down: @end quotation @separate + @c needed better, maybe even redundant explanation +@c added another example below. @c grappig: Pa vond het heel logies, en slim toen-i eenmaal begreep. @c in eerste instantie drong het `relative' niet door zonder extra uitleg. -You can make a large interval by adding octavation quotes. Note that +You can make larger intervals by adding octavation quotes. Note that quotes or commas do not determine the absolute height of a note; the height of a note is relative to the previous one. @c don't use commas or quotes in this sentence @@ -612,9 +622,46 @@ For example: @code{c f,} goes down; @code{f, f} are both the same; @separate +Here's an example of the difference between relative mode and +``normal'' (non-relative) mode: + +@quotation +@example +\relative a @{ +\clef bass + a d a e d c' d' +@} +@end example + +@lilypond[fragment] +\property Score.timing = ##f +\property Staff.TimeSignature = \turnOff +\relative a { +\clef bass + a d a e d c' d' +} +@end lilypond +@end quotation +@separate + +@quotation +@example +\clef bass + a d a e d c' d' +@end example + +@lilypond[fragment] +\property Score.timing = ##f +\property Staff.TimeSignature = \turnOff +\clef bass + a d a e d c' d' +@end lilypond +@end quotation +@separate + @strong{SUMMARY} -The following table summarizes the syntax learned in this section. +The following table summarizes the syntax learned so far in this section. @multitable @columnfractions .3 .3 .4 @@ -807,7 +854,7 @@ happens at the same time, like in chords, or (like in the two-staff example above) in a bunch of stacked staves. @end ignore -Of course, you can combine beams and ties with chords. Notice that +You can combine beams and ties with chords. Notice that beam and tie markings must be placed outside the chord markers: @quotation @lilypond[relative 0, fragment,verbatim] @@ -817,7 +864,8 @@ r4 [ ] ~ When you want to combine chords with slurs and dynamics, technical detail crops up: you have type these commands next to the notes, which -means that they have to be inside the @code{< >}: +means that they have to be inside the @code{< >}. Don't get confused +by the chord @code{< >} and the dynamic @code{\< \>}! @quotation @@ -831,12 +879,20 @@ r4 ( > < ) \! c8 f a> @end quotation @separate -There is one golden rule that you should keep in mind when writing -LilyPond input: -@quotation -@strong{DO NOT START A PIECE WITH A CHORD} -@end quotation -Of course, it is a allowed, but the result might not be what you expect: +@c this example is a bit too strongly worded -- there's nothing wrong +@c with starting a piece with a chord; you just have to be careful when +@c you do so. I've rephrased this example below. +@c There is one golden rule that you should keep in mind when writing +@c LilyPond input: +@c @quotation +@c @strong{DO NOT START A PIECE WITH A CHORD} +@c @end quotation +@c Of course, it is a allowed, but the result might not be what you expect: + +@c rephrased "don't start with a chord" +There is one caution when using chords: if you use a chord at the very +beginning of the piece, LilyPond might not understand what you want: + @quotation @lilypond[verbatim,singleline] \score { \notes } @@ -844,10 +900,10 @@ Of course, it is a allowed, but the result might not be what you expect: @end quotation @separate -If you have a piece that starts with a chord, then you must explicitly +If you have a piece that begins with a chord, you must explicitly state that the notes of the chord are to be put on the same staff, in -the same voice. This is done by specifying @code{\context Staff} for -the notes: +the same voice. This is done by specifying @code{\context Staff} or +@code{\context Voice} for the notes: @quotation @lilypond[verbatim,singleline] @@ -857,7 +913,6 @@ the notes: @separate - @strong{SUMMARY} @multitable @columnfractions .3 .3 .4 @@ -964,14 +1019,14 @@ a\> a \!a @end multitable -You know the basic ingredients of a music file, so this is the right -moment to try your at hand at doing it yourself: try to type some +Now you know the basic ingredients of a music file, so this is the right +moment to try your at hand at doing it yourself: try typing some simple examples, and experiment a little. -When you're comfortable with the basics, then you might want to read -the rest of this chapter. It also a manual in tutorial-style, but it +When you're comfortable with the basics, you might want to read +the rest of this chapter. It continues in tutorial-style, but it is much more in-depth, dealing with more advanced topics such as -lyrics, chords, orchestral scores and parts, fine tuning output, +lyrics, chords, orchestral scores and parts, fine tuning of output, polyphonic music, and integrating text and music. diff --git a/flower/file-path.cc b/flower/file-path.cc index 20dc9ab874..cf9ad32f96 100644 --- a/flower/file-path.cc +++ b/flower/file-path.cc @@ -184,10 +184,11 @@ File_path::find (String nm) const continue; #endif #if !STAT_MACROS_BROKEN + struct stat sbuf; if (stat (path.to_str0 (), &sbuf) != 0) continue; - + if (S_ISDIR (sbuf.st_mode)) continue; #endif diff --git a/lily/all-font-metrics.cc b/lily/all-font-metrics.cc index ada8954edb..fad161affb 100644 --- a/lily/all-font-metrics.cc +++ b/lily/all-font-metrics.cc @@ -39,7 +39,7 @@ All_font_metrics::find_afm (String name) { SCM sname = ly_symbol2scm (name.to_str0 ()); - SCM name_string = ly_str02scm (name.to_str0 ()); + SCM name_string = scm_makfrom0str (name.to_str0 ()); SCM val; @@ -114,7 +114,7 @@ Tex_font_metric * All_font_metrics::find_tfm (String name) { SCM sname = ly_symbol2scm (name.to_str0 ()); - SCM name_string = ly_str02scm (name.to_str0 ()); + SCM name_string = scm_makfrom0str (name.to_str0 ()); SCM val; if (!tfm_p_dict_->try_retrieve (sname, &val)) diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index 697187003c..47bceef5bb 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -63,7 +63,7 @@ Bar_number_engraver::process_music () // guh. text_->set_grob_property ("text", - ly_str02scm (to_string (gh_scm2int (bn)).to_str0 ())); + scm_makfrom0str (to_string (gh_scm2int (bn)).to_str0 ())); } } diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 2a9f951a81..85fc234a92 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -99,7 +99,7 @@ Beam_engraver::try_music (Music *m) if (Span_req * c = dynamic_cast (m)) { if (scm_equal_p (c->get_mus_property ("span-type"), - ly_str02scm ("abort")) == SCM_BOOL_T) + scm_makfrom0str ("abort")) == SCM_BOOL_T) { reqs_drul_[START] = 0; reqs_drul_[STOP] = 0; @@ -108,7 +108,7 @@ Beam_engraver::try_music (Music *m) beam_ = 0; } else if (scm_equal_p (c->get_mus_property ("span-type"), - ly_str02scm ("beam")) == SCM_BOOL_T) + scm_makfrom0str ("beam")) == SCM_BOOL_T) { Direction d =c->get_span_dir (); diff --git a/lily/beam.cc b/lily/beam.cc index 43c7d7a9ca..9d86ab4157 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -472,7 +472,7 @@ Beam::brew_molecule (SCM grob) SCM properties = Font_interface::font_alist_chain (me); - Molecule tm = Text_item::text2molecule (me, ly_str02scm (str.to_str0 ()), properties); + Molecule tm = Text_item::text2molecule (me, scm_makfrom0str (str.to_str0 ()), properties); the_beam.add_at_edge (Y_AXIS, UP, tm, 5.0); } #endif diff --git a/lily/clef.cc b/lily/clef.cc index 96ffec7e96..9a2eec2e3a 100644 --- a/lily/clef.cc +++ b/lily/clef.cc @@ -32,7 +32,7 @@ Clef::before_line_breaking (SCM smob) && !to_boolean (s->get_grob_property ("full-size-change"))) { str += "_change"; - s->set_grob_property ("glyph-name", ly_str02scm (str.to_str0 ())); + s->set_grob_property ("glyph-name", scm_makfrom0str (str.to_str0 ())); } } else diff --git a/lily/duration.cc b/lily/duration.cc index bda828854a..a036c55f52 100644 --- a/lily/duration.cc +++ b/lily/duration.cc @@ -102,7 +102,7 @@ Duration::print_smob (SCM s, SCM port, scm_print_state *) Duration *r = (Duration *) ly_cdr (s); scm_puts ("#string ().to_str0 ()), port); + scm_display (scm_makfrom0str (r->string ().to_str0 ()), port); scm_puts (" >", port); return 1; diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 194a86b2b0..d0d79edab9 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -254,7 +254,7 @@ Dynamic_engraver::process_music () if (gh_string_p (s) || gh_pair_p (s)) { cresc_->set_grob_property ("edge-text", - gh_cons (s, ly_str02scm (""))); + gh_cons (s, scm_makfrom0str (""))); daddy_trans_->set_property ((start_type + "Text").to_str0 (), SCM_EOL); } diff --git a/lily/dynamic-performer.cc b/lily/dynamic-performer.cc index 28e3dbf9fe..e76f07cd62 100644 --- a/lily/dynamic-performer.cc +++ b/lily/dynamic-performer.cc @@ -84,7 +84,7 @@ Dynamic_performer::create_audio_elements () s = get_property ("instrument"); if (!gh_string_p (s)) - s = ly_str02scm ("piano"); + s = scm_makfrom0str ("piano"); SCM eq = get_property ("instrumentEqualizer"); diff --git a/lily/figured-bass-engraver.cc b/lily/figured-bass-engraver.cc index c725f77f48..4efd7644e9 100644 --- a/lily/figured-bass-engraver.cc +++ b/lily/figured-bass-engraver.cc @@ -61,7 +61,7 @@ Figured_bass_engraver::process_music () { figure_ = new Item (get_property ("BassFigure")); announce_grob(figure_, rest_req_->self_scm()); // todo - figure_->set_grob_property ("text" , ly_str02scm ("-")); + figure_->set_grob_property ("text" , scm_makfrom0str ("-")); } else if (figures_.size ()) { diff --git a/lily/font-interface.cc b/lily/font-interface.cc index 7c1fb26bd8..74e8ac1b35 100644 --- a/lily/font-interface.cc +++ b/lily/font-interface.cc @@ -239,7 +239,7 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain) scm_write (scm_list_n (point_str0, shape, series , family, rel_str0, SCM_UNDEFINED), scm_current_error_port ()); scm_flush (scm_current_error_port ()); - return ly_str02scm ("cmr10"); + return scm_makfrom0str ("cmr10"); } diff --git a/lily/function-documentation.cc b/lily/function-documentation.cc index 571777bde4..62740cdd1a 100644 --- a/lily/function-documentation.cc +++ b/lily/function-documentation.cc @@ -11,7 +11,7 @@ void ly_add_function_documentation (char const * fname, doc_hash_table = scm_make_vector (gh_int2scm (59), SCM_EOL); - SCM entry = gh_cons (ly_str02scm (varlist), ly_str02scm (doc)); + SCM entry = gh_cons (scm_makfrom0str (varlist), scm_makfrom0str (doc)); scm_hashq_set_x (doc_hash_table, ly_symbol2scm (fname), entry); } diff --git a/lily/grob-interface.cc b/lily/grob-interface.cc index 09786eb36f..8d0d394c02 100644 --- a/lily/grob-interface.cc +++ b/lily/grob-interface.cc @@ -11,7 +11,7 @@ void add_interface (const char * symbol, const char * vars) { SCM s = ly_symbol2scm (symbol); - SCM d = ly_str02scm (descr); + SCM d = scm_makfrom0str (descr); SCM l = parse_symbol_list (vars); diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index bd8cb9ad4c..0abbedf613 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -113,13 +113,6 @@ SCM ly_truncate_list (int k, SCM l ); #endif -/* - We don't use gh_symbol2scm directly, since it has const-correctness - problems in GUILE 1.3.4 - - */ -SCM my_gh_symbol2scm (const char* x); - #ifdef CACHE_SYMBOLS @@ -141,7 +134,7 @@ SCM my_gh_symbol2scm (const char* x); value = gh_symbol2scm ((char*) (x)); \ value; }) #else -inline SCM ly_symbol2scm(char const* x) { return my_gh_symbol2scm((x)); } +inline SCM ly_symbol2scm(char const* x) { return gh_symbol2scm((x)); } #endif diff --git a/lily/lexer.ll b/lily/lexer.ll index ebeba72848..c1451847d1 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -227,7 +227,7 @@ HYPHEN -- } {RESTNAME} { const char *s = YYText (); - yylval.scm = ly_str02scm (s); + yylval.scm = scm_makfrom0str (s); return RESTNAME; } R { @@ -325,7 +325,7 @@ HYPHEN -- /* yylval is union. Must remember STRING before setting SCM*/ String *sp = yylval.string; - yylval.scm = ly_str02scm (sp->to_str0 ()); + yylval.scm = scm_makfrom0str (sp->to_str0 ()); delete sp; return STRING; } @@ -362,7 +362,7 @@ HYPHEN -- if (c == '{' || c == '}') // brace open is for not confusing dumb tools. here_input ().warning ( _ ("Brace found at end of lyric. Did you forget a space?")); - yylval.scm = ly_str02scm (s.to_str0 ()); + yylval.scm = scm_makfrom0str (s.to_str0 ()); return STRING; @@ -566,7 +566,7 @@ My_lily_lexer::scan_escaped_word (String str) String msg (_f ("unknown escaped string: `\\%s'", str)); LexerError (msg.to_str0 ()); - yylval.scm = ly_str02scm (str.to_str0 ()); + yylval.scm = scm_makfrom0str (str.to_str0 ()); return STRING; } @@ -587,7 +587,7 @@ My_lily_lexer::scan_bare_word (String str) } } - yylval.scm = ly_str02scm (str.to_str0 ()); + yylval.scm = scm_makfrom0str (str.to_str0 ()); return STRING; } diff --git a/lily/ligature-engraver.cc b/lily/ligature-engraver.cc index 2afaad2192..899c3585cd 100644 --- a/lily/ligature-engraver.cc +++ b/lily/ligature-engraver.cc @@ -47,7 +47,7 @@ Ligature_engraver::try_music (Music *m) if (Span_req *req_ = dynamic_cast (m)) { if (scm_equal_p (req_->get_mus_property ("span-type"), - ly_str02scm ("abort")) == SCM_BOOL_T) + scm_makfrom0str ("abort")) == SCM_BOOL_T) { reqs_drul_[START] = 0; reqs_drul_[STOP] = 0; @@ -56,7 +56,7 @@ Ligature_engraver::try_music (Music *m) ligature_ = 0; } else if (scm_equal_p (req_->get_mus_property ("span-type"), - ly_str02scm ("ligature")) == SCM_BOOL_T) + scm_makfrom0str ("ligature")) == SCM_BOOL_T) { Direction d = req_->get_span_dir (); reqs_drul_[d] = req_; diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index fd87823f56..6688d5bef8 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -56,13 +56,6 @@ ly_last (SCM list) return ly_car (scm_last_pair (list)); } -SCM -ly_str02scm (char const*c) -{ - // this all really sucks, guile should take char const* arguments! - return gh_str02scm ((char*)c); -} - SCM ly_write2scm (SCM s) @@ -125,23 +118,10 @@ file is looked up using the lilypond search path. ") { - return ly_str02scm (gulp_file_to_string (ly_scm2string (name)).to_str0 ()); + return scm_makfrom0str (gulp_file_to_string (ly_scm2string (name)).to_str0 ()); } -/** - Read a file, and shove it down GUILE. GUILE also has file read - functions, but you can't fiddle with the path of those. - - - TODO: JUNKME. -*/ -void -read_lily_scm_file (String fn) -{ - gh_eval_str ((char *) gulp_file_to_string (fn).to_str0 ()); -} - extern "C" { // maybe gdb 5.0 becomes quicker if it doesn't do fancy C++ typing? void @@ -233,7 +213,9 @@ ly_init_guile () if (verbose_global_b) progress_indication ("\n"); - read_lily_scm_file ("lily.scm"); + + + scm_primitive_load_path (scm_makfrom0str ("lily.scm")); scm_set_current_module (last_mod); } @@ -359,7 +341,7 @@ ly_type (SCM exp) cp = "list"; } - return ly_str02scm (cp); + return scm_makfrom0str (cp); } /* @@ -394,7 +376,7 @@ leaves a space at the end. sprintf (str, "%d ", gh_scm2int (s)); } - return ly_str02scm (str); + return scm_makfrom0str (str); } /* @@ -434,7 +416,7 @@ LY_DEFINE(ly_version, "ly-version", 0, 0, 0, (), LY_DEFINE(ly_unit, "ly-unit", 0, 0, 0, (), "Return the unit used for lengths as a string.") { - return ly_str02scm (INTERNAL_UNIT); + return scm_makfrom0str (INTERNAL_UNIT); } LY_DEFINE(ly_verbose, "ly-verbose", 0, 0, 0, (), @@ -588,10 +570,6 @@ ly_truncate_list (int k, SCM l ) return l; } -SCM my_gh_symbol2scm (const char* x) -{ - return gh_symbol2scm ((char*)x); -} String print_scm_val (SCM val) diff --git a/lily/lyric-phrasing-engraver.cc b/lily/lyric-phrasing-engraver.cc index 5db329f479..4f7a3c0d11 100644 --- a/lily/lyric-phrasing-engraver.cc +++ b/lily/lyric-phrasing-engraver.cc @@ -103,7 +103,7 @@ Lyric_phrasing_engraver::finalize () Syllable_group * Lyric_phrasing_engraver::lookup_context_id (const String &context_id) { - SCM key = ly_str02scm (context_id.to_str0 ()); + SCM key = scm_makfrom0str (context_id.to_str0 ()); if (! gh_null_p (voice_alist_)) { SCM s = scm_assoc (key, voice_alist_); @@ -155,7 +155,7 @@ Lyric_phrasing_engraver::record_lyric (const String &context_id, Grob * lyric) void Lyric_phrasing_engraver::record_extender (const String &context_id, Grob * extender) { - SCM key = ly_str02scm (context_id.to_str0 ()); + SCM key = scm_makfrom0str (context_id.to_str0 ()); if (! gh_null_p (voice_alist_)) { SCM s = scm_assoc (key, voice_alist_); diff --git a/lily/main.cc b/lily/main.cc index 11de9e3fb1..14fe9a452c 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -404,7 +404,7 @@ sane_putenv (char const* key, char const* value, bool overwrite) { String combine = String (key) + "=" + String (value); char * s = strdup(combine.to_str0 ()); - // return putenv (s); + return putenv (s); } return -1; } @@ -414,17 +414,15 @@ main (int argc, char **argv) { setup_paths (); - /* Prepare GUILE for heavy memory usage. If you have plenty memory, - this may speed up GUILE a bit. If you're short on memory, these - settings + /* - export GUILE_INIT_SEGMENT_SIZE_1=36000 - export GUILE_MAX_SEGMENT_SIZE=576000 + These settings hopefully prepare lily for a lot of memory usage. - may considerably decrease memory footprint (~*0.85), with a small - execution time penalty (~*1.10). However, if this 15% gain in memory - usage prevents swapping, the execution time falls drastically. */ - + In practice the effect on GC times is barely measurable -- larger + segments cost slighly less time for the conservative marking. (but + not impressively much) + + */ sane_putenv ("GUILE_INIT_SEGMENT_SIZE_1", "4194304", false); sane_putenv ("GUILE_MAX_SEGMENT_SIZE", "8388608", false); diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index 4bbda42824..2aa1de4ae8 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -159,7 +159,7 @@ Mark_engraver::process_music () c++; next = to_string (c); } - m = ly_str02scm (next.to_str0 ()); + m = scm_makfrom0str (next.to_str0 ()); } else { @@ -169,7 +169,7 @@ Mark_engraver::process_music () daddy_trans_->set_property ("rehearsalMark", m); text_->set_grob_property ("text", - ly_str02scm (t.to_str0 ())); + scm_makfrom0str (t.to_str0 ())); String style = "mark-number"; for (int i=0; i < t.length (); i++) diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 38318d19b9..23c0c0007a 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -59,7 +59,7 @@ Multi_measure_rest_engraver::try_music (Music* req) { if (scm_equal_p (sp->get_mus_property ("span-type"), - ly_str02scm ("rest")) == SCM_BOOL_T) + scm_makfrom0str ("rest")) == SCM_BOOL_T) { if (sp->get_span_dir () == STOP) { diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index dee5de1135..69d9ec64fe 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -116,7 +116,7 @@ Multi_measure_rest::brew_molecule (SCM smob) if (measures > gh_scm2int (s)) { Molecule s = Text_item::text2molecule (me, - ly_str02scm (to_string (measures).to_str0 ()), + scm_makfrom0str (to_string (measures).to_str0 ()), alist_chain); s.align_to (X_AXIS, CENTER); diff --git a/lily/music.cc b/lily/music.cc index e105072304..313f2c56f3 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -274,7 +274,7 @@ LY_DEFINE(ly_music_name, "ly-music-name", 1, 0, 0, SCM_ASSERT_TYPE(m, mus, SCM_ARG1, __FUNCTION__ ,"music"); const char * nm = classname (m); - return ly_str02scm (nm); + return scm_makfrom0str (nm); } LY_DEFINE(ly_music_list_p,"music-list?", 1, 0, 0, diff --git a/lily/note-head.cc b/lily/note-head.cc index cd9bc3729c..2cc60c17b6 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -209,7 +209,7 @@ Note_head::brew_ez_molecule (SCM smob) s[0] = (pit->notename_ + 2)%7 + 'a'; s[0] = toupper (s[0]); - SCM charstr = ly_str02scm (s); + SCM charstr = scm_makfrom0str (s); SCM at = scm_list_n (ly_symbol2scm ("ez-ball"), charstr, diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 4bad6447d8..97a8b97391 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -59,12 +59,12 @@ Note_heads_engraver::try_music (Music *m) else if (Span_req *req_ = dynamic_cast (m)) { if (scm_equal_p (req_->get_mus_property ("span-type"), - ly_str02scm ("abort")) == SCM_BOOL_T) + scm_makfrom0str ("abort")) == SCM_BOOL_T) { in_ligature = 0; } else if (scm_equal_p (req_->get_mus_property ("span-type"), - ly_str02scm ("ligature")) == SCM_BOOL_T) + scm_makfrom0str ("ligature")) == SCM_BOOL_T) { in_ligature = (req_->get_span_dir () == START); } diff --git a/lily/note-name-engraver.cc b/lily/note-name-engraver.cc index 37133e5e3b..1e7806e676 100644 --- a/lily/note-name-engraver.cc +++ b/lily/note-name-engraver.cc @@ -49,7 +49,7 @@ Note_name_engraver::process_acknowledged_grobs () if (s.length ()) { Item * t = new Item (get_property ("NoteName")); - t->set_grob_property ("text", ly_str02scm (s.to_str0 ())); + t->set_grob_property ("text", scm_makfrom0str (s.to_str0 ())); announce_grob(t, reqs_[0]->self_scm()); texts_.push (t); } diff --git a/lily/paper-column.cc b/lily/paper-column.cc index 5373d06f34..bfb71a0272 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -121,7 +121,7 @@ Paper_column::brew_molecule (SCM p) String r = to_string (Paper_column::get_rank (me)); SCM properties = Font_interface::font_alist_chain (me); - Molecule t = Text_item::text2molecule (me, ly_str02scm (r.to_str0 ()), + Molecule t = Text_item::text2molecule (me, scm_makfrom0str (r.to_str0 ()), properties); t.align_to (X_AXIS, CENTER); t.align_to (Y_AXIS, DOWN); diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index 9cbce394f6..74cd96acc5 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -35,11 +35,11 @@ Paper_outputter::Paper_outputter (String name) gh_define ("security-paranoia", SCM_BOOL_T); } - file_ = scm_open_file (ly_str02scm (name.to_str0 ()), - ly_str02scm ("w")); + file_ = scm_open_file (scm_makfrom0str (name.to_str0 ()), + scm_makfrom0str ("w")); SCM exp = scm_list_n (ly_symbol2scm ("find-dumper"), - ly_str02scm (output_format_global.to_str0 ()), + scm_makfrom0str (output_format_global.to_str0 ()), SCM_UNDEFINED); output_func_ = scm_primitive_eval (exp); @@ -65,8 +65,8 @@ Paper_outputter::output_header () generate = generate + to_string (' ' * (120 - generate.length ())>? 0) ; String creator = "lelie"; - SCM args_scm = scm_list_n (ly_str02scm (creator.to_str0 ()), - ly_str02scm (generate.to_str0 ()), SCM_UNDEFINED); + SCM args_scm = scm_list_n (scm_makfrom0str (creator.to_str0 ()), + scm_makfrom0str (generate.to_str0 ()), SCM_UNDEFINED); SCM scm = gh_cons (ly_symbol2scm ("header"), args_scm); @@ -80,7 +80,7 @@ void Paper_outputter::output_comment (String str) { output_scheme (scm_list_n (ly_symbol2scm ("comment"), - ly_str02scm ((char*)str.to_str0 ()), + scm_makfrom0str ((char*)str.to_str0 ()), SCM_UNDEFINED) ); } @@ -133,8 +133,8 @@ Paper_outputter::output_Real_def (String k, Real v) { SCM scm = scm_list_n (ly_symbol2scm ("lily-def"), - ly_str02scm (k.get_str0 ()), - ly_str02scm (to_string (v).get_str0 ()), + scm_makfrom0str (k.get_str0 ()), + scm_makfrom0str (to_string (v).get_str0 ()), SCM_UNDEFINED); output_scheme (scm); } @@ -144,8 +144,8 @@ Paper_outputter::output_String_def (String k, String v) { SCM scm = scm_list_n (ly_symbol2scm ("lily-def"), - ly_str02scm (k.get_str0 ()), - ly_str02scm (v.get_str0 ()), + scm_makfrom0str (k.get_str0 ()), + scm_makfrom0str (v.get_str0 ()), SCM_UNDEFINED); output_scheme (scm); } @@ -154,8 +154,8 @@ void Paper_outputter::output_int_def (String k, int v) { SCM scm = scm_list_n (ly_symbol2scm ("lily-def"), - ly_str02scm (k.get_str0 ()), - ly_str02scm (to_string (v).get_str0 ()), + scm_makfrom0str (k.get_str0 ()), + scm_makfrom0str (to_string (v).get_str0 ()), SCM_UNDEFINED); output_scheme (scm); } @@ -164,7 +164,7 @@ void Paper_outputter::write_header_field_to_file (String filename, SCM key, SCM value) { output_scheme (scm_list_n (ly_symbol2scm ("header-to-file"), - ly_str02scm (filename.to_str0 ()), + scm_makfrom0str (filename.to_str0 ()), ly_quote_scm (key), value, SCM_UNDEFINED)); } diff --git a/lily/parser.yy b/lily/parser.yy index 5564083b80..5e4e1b6ebf 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -360,9 +360,9 @@ toplevel_expression: } | output_def { if (dynamic_cast ($1)) - THIS->lexer_->set_identifier (gh_str02scm ("$defaultpaper"), $1->self_scm ()); + THIS->lexer_->set_identifier (scm_makfrom0str ("$defaultpaper"), $1->self_scm ()); else if (dynamic_cast ($1)) - THIS->lexer_->set_identifier (gh_str02scm ("$defaultmidi"), $1->self_scm ()); + THIS->lexer_->set_identifier (scm_makfrom0str ("$defaultmidi"), $1->self_scm ()); } | embedded_scm { // junk value @@ -745,7 +745,7 @@ Repeated_music: SCM func = scm_primitive_eval (ly_symbol2scm ("repeat-name-to-ctor")); SCM result = gh_call1 (func, $2); - if (gh_equal_p ($2, ly_str02scm ("tremolo"))) + if (gh_equal_p ($2, scm_makfrom0str ("tremolo"))) { /* we can not get durations and other stuff correct down the line, so we have to @@ -832,7 +832,7 @@ Composite_music: scm_gc_unprotect_object ($3->self_scm ()); csm->set_mus_property ("context-type",$2); - csm->set_mus_property ("context-id", ly_str02scm ("")); + csm->set_mus_property ("context-id", scm_makfrom0str ("")); $$ = csm; } @@ -1156,7 +1156,7 @@ command_element: | E_LEFTSQUARE { Span_req *l = new Span_req; l->set_span_dir (START); - l->set_mus_property ("span-type", ly_str02scm ("ligature")); + l->set_mus_property ("span-type", scm_makfrom0str ("ligature")); l->set_spot (THIS->here_input ()); $$ = new Request_chord (SCM_EOL); @@ -1167,7 +1167,7 @@ command_element: | E_RIGHTSQUARE { Span_req *l = new Span_req; l->set_span_dir (STOP); - l->set_mus_property ("span-type", ly_str02scm ("ligature")); + l->set_mus_property ("span-type", scm_makfrom0str ("ligature")); l->set_spot (THIS->here_input ()); $$ = new Request_chord (SCM_EOL); @@ -1196,7 +1196,7 @@ command_element: $$ = csm; $$->set_spot (THIS->here_input ()); - csm->set_mus_property ("context-type", ly_str02scm ("Score")); + csm->set_mus_property ("context-type", scm_makfrom0str ("Score")); } | PARTIAL duration_length { Moment m = - unsmob_duration ($2)->length_mom (); @@ -1207,7 +1207,7 @@ command_element: scm_gc_unprotect_object (p->self_scm ()); $$ =sp ; - sp-> set_mus_property ("context-type", ly_str02scm ( "Score")); + sp-> set_mus_property ("context-type", scm_makfrom0str ( "Score")); } | CLEF STRING { SCM func = scm_primitive_eval (ly_symbol2scm ("clef-name-to-properties")); @@ -1228,7 +1228,7 @@ command_element: scm_gc_unprotect_object (seq->self_scm ()); $$ =sp ; - sp-> set_mus_property ("context-type", ly_str02scm ("Staff")); + sp-> set_mus_property ("context-type", scm_makfrom0str ("Staff")); } | TIME_T fraction { Music * p1 = set_property_music (ly_symbol2scm ( "timeSignatureFraction"), $2); @@ -1264,7 +1264,7 @@ command_element: TODO: should make alias TimingContext for Score */ - sp-> set_mus_property ("context-type", ly_str02scm ( "Score")); + sp-> set_mus_property ("context-type", scm_makfrom0str ( "Score")); } ; @@ -1286,7 +1286,7 @@ shorthand_command_req: | '[' { Span_req*b= new Span_req; b->set_span_dir (START); - b->set_mus_property ("span-type", ly_str02scm ("beam")); + b->set_mus_property ("span-type", scm_makfrom0str ("beam")); $$ =b; @@ -1295,7 +1295,7 @@ shorthand_command_req: | ']' { Span_req*b= new Span_req; b->set_span_dir ( STOP); - b->set_mus_property ("span-type", ly_str02scm ("beam")); + b->set_mus_property ("span-type", scm_makfrom0str ("beam")); $$ = b; } | BREATHE { @@ -1560,25 +1560,25 @@ close_request_parens: '(' { Span_req* s= new Span_req; $$ = s; - s->set_mus_property ("span-type", ly_str02scm ( "slur")); + s->set_mus_property ("span-type", scm_makfrom0str ( "slur")); s->set_spot (THIS->here_input()); } | E_OPEN { Span_req* s= new Span_req; $$ = s; - s->set_mus_property ("span-type", ly_str02scm ( "phrasing-slur")); + s->set_mus_property ("span-type", scm_makfrom0str ( "phrasing-slur")); s->set_spot (THIS->here_input()); } | E_SMALLER { Span_req*s =new Span_req; $$ = s; - s->set_mus_property ("span-type", ly_str02scm ( "crescendo")); + s->set_mus_property ("span-type", scm_makfrom0str ( "crescendo")); s->set_spot (THIS->here_input()); } | E_BIGGER { Span_req*s =new Span_req; $$ = s; - s->set_mus_property ("span-type", ly_str02scm ("decrescendo")); + s->set_mus_property ("span-type", scm_makfrom0str ("decrescendo")); s->set_spot (THIS->here_input()); } ; @@ -1594,7 +1594,7 @@ open_request: open_request_parens: E_EXCLAMATION { Span_req *s = new Span_req; - s->set_mus_property ("span-type", ly_str02scm ( "crescendo")); + s->set_mus_property ("span-type", scm_makfrom0str ( "crescendo")); s->set_spot (THIS->here_input()); $$ = s; @@ -1602,14 +1602,14 @@ open_request_parens: | ')' { Span_req* s= new Span_req; $$ = s; - s->set_mus_property ("span-type", ly_str02scm ( "slur")); + s->set_mus_property ("span-type", scm_makfrom0str ( "slur")); s->set_spot (THIS->here_input()); } | E_CLOSE { Span_req* s= new Span_req; $$ = s; - s->set_mus_property ("span-type", ly_str02scm ( "phrasing-slur")); + s->set_mus_property ("span-type", scm_makfrom0str ( "phrasing-slur")); s->set_spot (THIS->here_input()); } ; @@ -1631,7 +1631,7 @@ gen_text_def: String ds = to_string ($1); Text_script_req* t = new Text_script_req; SCM finger = ly_symbol2scm ("finger"); - t->set_mus_property ("text", ly_str02scm (ds.to_str0 ())); + t->set_mus_property ("text", scm_makfrom0str (ds.to_str0 ())); t->set_mus_property ("text-type" , finger); t->set_spot (THIS->here_input ()); $$ = t; @@ -1640,22 +1640,22 @@ gen_text_def: script_abbreviation: '^' { - $$ = gh_str02scm ("Hat"); + $$ = scm_makfrom0str ("Hat"); } | '+' { - $$ = gh_str02scm ("Plus"); + $$ = scm_makfrom0str ("Plus"); } | '-' { - $$ = gh_str02scm ("Dash"); + $$ = scm_makfrom0str ("Dash"); } | '|' { - $$ = gh_str02scm ("Bar"); + $$ = scm_makfrom0str ("Bar"); } | '>' { - $$ = gh_str02scm ("Larger"); + $$ = scm_makfrom0str ("Larger"); } | '.' { - $$ = gh_str02scm ("Dot"); + $$ = scm_makfrom0str ("Dot"); } ; @@ -1919,7 +1919,7 @@ simple_element: Span_req *sp2 = new Span_req; sp1-> set_span_dir ( START); sp2-> set_span_dir ( STOP); - SCM r = ly_str02scm ("rest"); + SCM r = scm_makfrom0str ("rest"); sp1->set_mus_property ("span-type", r); sp2->set_mus_property ("span-type", r); diff --git a/lily/part-combine-music-iterator.cc b/lily/part-combine-music-iterator.cc index 7a9c5b254e..7a871bc815 100644 --- a/lily/part-combine-music-iterator.cc +++ b/lily/part-combine-music-iterator.cc @@ -369,7 +369,7 @@ Part_combine_music_iterator::process (Moment m) if (!abort_req) { abort_req = new Span_req; - abort_req->set_mus_property ("span-type", ly_str02scm ("abort")); + abort_req->set_mus_property ("span-type", scm_makfrom0str ("abort")); } if (combine_b && combine_b != previously_combined_b) diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index ee9e6e6dd8..4cbe1feb62 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -164,7 +164,7 @@ Piano_pedal_engraver::try_music (Music *m) p->bracket_ = 0; } if (scm_equal_p (s->get_mus_property ("span-type"), - ly_str02scm (p->name_))==SCM_BOOL_T) + scm_makfrom0str (p->name_))==SCM_BOOL_T) { p->req_l_drul_[s->get_span_dir ()] = s; return true; diff --git a/lily/piano-pedal-performer.cc b/lily/piano-pedal-performer.cc index 675ed9140d..59ed0a4469 100644 --- a/lily/piano-pedal-performer.cc +++ b/lily/piano-pedal-performer.cc @@ -130,7 +130,7 @@ Piano_pedal_performer::try_music (Music* r) for (Pedal_info*p = info_alist_; p->name_; p ++) { if (scm_equal_p (s->get_mus_property ("span-type"), - ly_str02scm (p->name_)) == SCM_BOOL_T) + scm_makfrom0str (p->name_)) == SCM_BOOL_T) { p->req_l_drul_[s->get_span_dir ()] = s; return true; diff --git a/lily/pitch.cc b/lily/pitch.cc index 3be10e2153..09ebadf660 100644 --- a/lily/pitch.cc +++ b/lily/pitch.cc @@ -255,7 +255,7 @@ Pitch::print_smob (SCM s, SCM port, scm_print_state *) Pitch *r = (Pitch *) ly_cdr (s); scm_puts ("#string ().to_str0 ()), port); + scm_display (scm_makfrom0str (r->string ().to_str0 ()), port); scm_puts (" >", port); return 1; diff --git a/lily/repeat-acknowledge-engraver.cc b/lily/repeat-acknowledge-engraver.cc index 8a95a7ba32..1b7d91104f 100644 --- a/lily/repeat-acknowledge-engraver.cc +++ b/lily/repeat-acknowledge-engraver.cc @@ -105,7 +105,7 @@ Repeat_acknowledge_engraver::process_music () { if (s != "" || (volta_found && !gh_string_p (wb))) { - daddy_trans_->set_property ("whichBar", ly_str02scm (s.to_str0 ())); + daddy_trans_->set_property ("whichBar", scm_makfrom0str (s.to_str0 ())); } } } diff --git a/lily/span-bar.cc b/lily/span-bar.cc index 45cfa80e15..4820be55c6 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -218,7 +218,7 @@ Span_bar::evaluate_glyph (Grob*me) type = ".|."; } - gl = ly_str02scm (type.to_str0 ()); + gl = scm_makfrom0str (type.to_str0 ()); if (scm_equal_p (me->internal_get_grob_property (glyph_symbol), gl) != SCM_BOOL_T) me->internal_set_grob_property (glyph_symbol, gl); } diff --git a/lily/system-start-delimiter-engraver.cc b/lily/system-start-delimiter-engraver.cc index 0a577fd27d..88646057f1 100644 --- a/lily/system-start-delimiter-engraver.cc +++ b/lily/system-start-delimiter-engraver.cc @@ -48,11 +48,11 @@ System_start_delimiter_engraver::acknowledge_grob (Grob_info inf) /* UGH UGH */ - if (gh_string_p (gl) && gh_equal_p (gl, ly_str02scm ("brace")) - && gh_string_p (my_gl) && gh_equal_p (my_gl, ly_str02scm ("bracket"))) + if (gh_string_p (gl) && gh_equal_p (gl, scm_makfrom0str ("brace")) + && gh_string_p (my_gl) && gh_equal_p (my_gl, scm_makfrom0str ("bracket"))) inf.grob_->translate_axis (-0.8, X_AXIS); // ugh - else if (gh_string_p (gl) && gh_equal_p (gl, ly_str02scm ("bracket")) - && gh_string_p (my_gl) && gh_equal_p (my_gl, ly_str02scm ("bracket"))) + else if (gh_string_p (gl) && gh_equal_p (gl, scm_makfrom0str ("bracket")) + && gh_string_p (my_gl) && gh_equal_p (my_gl, scm_makfrom0str ("bracket"))) { inf.grob_->translate_axis ( -0.8, X_AXIS); // ugh inf.grob_->set_grob_property ("arch-height", diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index c3a7db4b14..38f0dc7100 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -76,7 +76,7 @@ System_start_delimiter::after_line_breaking (SCM smob) SCM gl = me->get_grob_property ("glyph"); if (scm_ilength (me->get_grob_property ("elements")) <= 1 - && gh_equal_p (gl,ly_str02scm ("bar-line"))) + && gh_equal_p (gl,scm_makfrom0str ("bar-line"))) { me->suicide (); } diff --git a/lily/system.cc b/lily/system.cc index 94ca07ebe3..6731500db6 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -292,7 +292,7 @@ System::output_molecule (SCM expr, Offset o) pscore_->outputter_->output_scheme (scm_list_n (ly_symbol2scm ("define-origin"), - ly_str02scm (ip->file_string ().to_str0 ()), + scm_makfrom0str (ip->file_string ().to_str0 ()), gh_int2scm (ip->line_number ()), gh_int2scm (ip->column_number ()), SCM_UNDEFINED)); diff --git a/lily/time-signature.cc b/lily/time-signature.cc index d3f496b611..e360f81033 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -102,10 +102,10 @@ Time_signature::time_signature (Grob*me,int num, int den) SCM chain = Font_interface::font_alist_chain (me); Molecule n = Text_item::text2molecule (me, - ly_str02scm (to_string (num).to_str0 ()), + scm_makfrom0str (to_string (num).to_str0 ()), chain); Molecule d = Text_item::text2molecule (me, - ly_str02scm (to_string (den).to_str0 ()), + scm_makfrom0str (to_string (den).to_str0 ()), chain); n.align_to (X_AXIS, CENTER); d.align_to (X_AXIS, CENTER); diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index db7693c1b3..dfdf4d51d0 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -54,7 +54,7 @@ Timing_engraver::start_translation_timestep () if (!gh_string_p (which)) which = (now.main_part_ || now.main_part_ == last_moment_.main_part_) - ? SCM_EOL : ly_str02scm ("|"); + ? SCM_EOL : scm_makfrom0str ("|"); Moment mp = measure_position (); bool start_of_measure = (last_moment_.main_part_ != now.main_part_&& !mp.main_part_ ); diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 629d75c6f8..6768de18c7 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -131,7 +131,7 @@ Translator_group::find_create_translator (String n, String id) return existing; Link_array path - = unsmob_translator_def (definition_)->path_to_acceptable_translator (ly_str02scm ((char*)n.to_str0 ()), get_output_def ()); + = unsmob_translator_def (definition_)->path_to_acceptable_translator (scm_makfrom0str ((char*)n.to_str0 ()), get_output_def ()); if (path.size ()) { diff --git a/lily/translator.cc b/lily/translator.cc index 2c1100d4e8..3b233d7f05 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -141,7 +141,7 @@ LY_DEFINE(ly_translator_name, SCM_ASSERT_TYPE(tr, trans, SCM_ARG1, __FUNCTION__, "Context"); char const* nm = classname (tr); - return ly_str02scm (nm); + return scm_makfrom0str (nm); } LY_DEFINE(ly_translator_description, diff --git a/lily/unfolded-repeat-iterator.cc b/lily/unfolded-repeat-iterator.cc index ff5cf9603d..69bc3fbdc7 100644 --- a/lily/unfolded-repeat-iterator.cc +++ b/lily/unfolded-repeat-iterator.cc @@ -146,7 +146,7 @@ Volta_repeat_iterator::next_element (bool side_effect) if (done_count_ <= alt_count_) add_repeat_command (scm_list_n (ly_symbol2scm ("volta"), - ly_str02scm (repstr.to_str0 ()), SCM_UNDEFINED)); + scm_makfrom0str (repstr.to_str0 ()), SCM_UNDEFINED)); } else { diff --git a/lily/voice-devnull-engraver.cc b/lily/voice-devnull-engraver.cc index eb47ba180b..de4988d7f3 100644 --- a/lily/voice-devnull-engraver.cc +++ b/lily/voice-devnull-engraver.cc @@ -55,7 +55,7 @@ Voice_devnull_engraver::try_music (Music *m) for (char const **p = eat_spanners; *p; p++) { - if (t == ly_str02scm (*p)) + if (t == scm_makfrom0str (*p)) return true; } } diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex index 5509e7b2ec..ccf820e122 100644 --- a/tex/lilyponddefs.tex +++ b/tex/lilyponddefs.tex @@ -74,7 +74,7 @@ \fi \def\EndLilyPondOutput{% -\ifundefined{lilypondpaperfilllastpage}% +\ifundefined{lilypondpaperlastpagefill}% \vskip 0pt plus \lilypondpaperinterscorelinefill00 fill \fi \csname bye\endcsname}