- Link_array<Grob> start_phrasing_slur_l_arr;
- for (int i=0; i< new_phrasing_slur_req_l_arr_.size (); i++)
- {
- Span_req* phrasing_slur_req_l = new_phrasing_slur_req_l_arr_[i];
- // end phrasing slur: move the phrasing slur to other array
- if (phrasing_slur_req_l->get_span_dir () == STOP)
- {
- if (phrasing_slur_l_stack_.empty ())
- phrasing_slur_req_l->origin ()->warning (_f ("can't find start of phrasing slur"));
- else
- {
- Grob* phrasing_slur = phrasing_slur_l_stack_.pop ();
- SCM s = get_property ("phrasingSlurEndAttachment");
- if (gh_symbol_p (s))
- {
- index_set_cell (phrasing_slur->get_grob_property ("attachment"), STOP, s);
- }
- end_phrasing_slur_l_arr_.push (phrasing_slur);
- requests_arr_.pop ();
- }
- }
- else if (phrasing_slur_req_l->get_span_dir () == START)
- {
- // push a new phrasing_slur onto stack.
- // (use temp. array to wait for all phrasing_slur STOPs)
- Grob* phrasing_slur = new Spanner (get_property ("PhrasingSlur"));
- Slur::set_interface (phrasing_slur); // can't remove.
- SCM s = get_property ("phrasingSlurBeginAttachment");
- if (gh_symbol_p (s))
- {
- index_set_cell (phrasing_slur->get_grob_property ("attachment"), START, s);
- }
- start_phrasing_slur_l_arr.push (phrasing_slur);
- requests_arr_.push (phrasing_slur_req_l);
- announce_grob(phrasing_slur, phrasing_slur_req_l->self_scm());
- }
- }
- for (int i=0; i < start_phrasing_slur_l_arr.size (); i++)
- phrasing_slur_l_stack_.push (start_phrasing_slur_l_arr[i]);
- new_phrasing_slur_req_l_arr_.clear ();