]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.32
authorfred <fred>
Sun, 24 Mar 2002 19:41:18 +0000 (19:41 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:41:18 +0000 (19:41 +0000)
13 files changed:
hdr/clef.hh [deleted file]
hdr/command.hh [deleted file]
hdr/getcommand.hh [deleted file]
hdr/inputcommand.hh [deleted file]
hdr/inputcommands.hh [deleted file]
hdr/staffcommands.hh [deleted file]
src/clef.cc [deleted file]
src/command.cc [deleted file]
src/complexprint.cc [deleted file]
src/getcommands.cc [deleted file]
src/inputcommand.cc [deleted file]
src/inputcommands.cc [deleted file]
src/staffcommands.cc [deleted file]

diff --git a/hdr/clef.hh b/hdr/clef.hh
deleted file mode 100644 (file)
index 7325c54..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-  clef.hh -- part of LilyPond
-
-  (c) 1996,97 Han-Wen Nienhuys
-*/
-
-#ifndef CLEF_HH
-#define CLEF_HH
-#include "scalar.hh"
-#include "varray.hh"
-
-/// where is c-0 in the staff?
-class Clef {
-
-public:
-    int c0_position_i_;
-    String clef_type_str_;
-
-    Clef();
-    void set_type(String);
-};
-#endif // CLEF_HH
-
diff --git a/hdr/command.hh b/hdr/command.hh
deleted file mode 100644 (file)
index 2408ac0..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#ifndef COMMAND_HH
-#define COMMAND_HH
-
-#include "glob.hh"
-#include "varray.hh"
-#include "scalar.hh"
-
-/// what kind of command?
-enum Commandcode {
-       NOP,
-       INTERPRET,
-       TYPESET,
-       BREAK_PRE,BREAK_MIDDLE, BREAK_POST, BREAK_END
-};
-
-/// set a nonrythmical symbol
-
-/**
-    A nonrhythmical "thing" in a  staff is called a "command".
-    Commands have these properties:
-
-    \begin{itemize}
-    \item They are \bf{not} rhythmical, i.e. they do not have  a duration
-    \item They have a staff-wide impact, i.e. a command cannot be targeted at
-    only one voice in the staff: two voices sharing a staff can't have
-    different clefs
-    \item Commands are ordered, that is, when from musical point of view the
-    commands happen simultaneously, the order in which Staff receives the
-    commands can still make a difference in the output
-    \item Some commands are actually score wide, so Score has to issue these
-    commands to the Staff, eg. BREAK commands
-    \end{itemize}
-
-    At this moment we have three classes of commands:
-    \begin{description}
-    INTERPRET commands are not grouped.
-    \item[TYPESET] These commands instruct the Staff to
-    typeset symbols on the output, eg meter/clef/key changes
-    \item[INTERPRET] These commands do not produce output, instead,
-    they change the interpretation of other commands or requests. 
-    example: shift output vertically, set the key.
-    \item[BREAK_XXX] These commands group TYPESET commands in
-    prebreak and postbreak commands. See Documentation/breaking    
-    
-    Staff can insert additional commands in a sequence of BREAK_XXX
-    commands, eg. key change commands
-
-    \end{description}
-    
-    These commands are generated by Score, since they have to be the
-    same for the whole score.
-    
-
-    \begin{description}
-    \item[BREAK_PRE]
-    \item[BREAK_MIDDLE]
-    \item[BREAK_POST]
-    \item[BREAK_END]
-    \item[TYPESET] METER,BAR
-    \end{description}
-
-    Commands can be freely copied, they do not have virtual methods.
-    
-    */
-
-struct Command {
-    Commandcode code;
-
-    /// analogous to argv[]
-    Array<Scalar> args;
-
-
-    /** in what order relative to other TYPESET commands (eg, bar
-       should precede meter). Highest priority first. */
-    int priority;
-    
-    /* *************** */
-    
-    Command();
-    bool isbreak()const;
-    void print() const;
-};
-
-#endif
diff --git a/hdr/getcommand.hh b/hdr/getcommand.hh
deleted file mode 100644 (file)
index 77123e8..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-  getcommand.hh -- part of LilyPond
-
-  (c) 1996,97 Han-Wen Nienhuys
-*/
-
-#ifndef GETCOMMAND_HH
-#define GETCOMMAND_HH
-#include "proto.hh"
-
-
-Command* get_meter_command(int,int);
-Command get_defaultbar_command();
-
-void split_bar_command(Command &pre_com, Command &no_break_com, Command &post_com,String s);
-
-
-#endif // GETCOMMAND_HH
diff --git a/hdr/inputcommand.hh b/hdr/inputcommand.hh
deleted file mode 100644 (file)
index 8437454..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-  inputcommand.hh -- part of LilyPond
-
-  (c) 1996,97 Han-Wen Nienhuys
-*/
-
-#ifndef INPUTCOMMAND_HH
-#define INPUTCOMMAND_HH
-#include "proto.hh"
-#include "scalar.hh"
-#include "varray.hh"
-#include "moment.hh"
-/// command without time assoced 
-struct Input_command {
-    /// analogous to argv[]
-    Array<Scalar> args;
-    void print()const;
-    Input_command();
-
-    operator Command();
-};
-Input_command*get_cadenza_toggle(int i);
-Input_command *get_meterchange_command( int,int);
-Input_command *get_key_interpret_command(Array<int >);
-Input_command *get_clef_interpret_command(String w);
-Input_command *get_reset_command();
-Input_command *get_partial_command(Moment u);
-Input_command *get_skip_command(int,Moment);
-Input_command *get_grouping_command(Array<int>);
-Input_command *get_bar_command(String);
-Input_command *get_newmeasure_command();
-Input_command *get_goto_command(String);
-Array<int> get_default_grouping(int count, int onenote);
-#endif // INPUTCOMMAND_HH
-
diff --git a/hdr/inputcommands.hh b/hdr/inputcommands.hh
deleted file mode 100644 (file)
index 94d94c4..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-  inputcommands.hh -- part of LilyPond
-
-  (c) 1996,97 Han-Wen Nienhuys
-*/
-
-#ifndef INPUTCOMMANDS_HH
-#define INPUTCOMMANDS_HH
-
-#include "proto.hh"
-#include "plist.hh"
-#include "real.hh"
-#include "timedescription.hh"
-
-struct Commands_at : public IPointerList<Input_command*> {
-    Time_description tdescription_;
-    
-    /* *************** */
-
-    Moment when();
-    void parse(Staff_commands_at*);
-    void print() const;
-    Moment barleft();
-    void add(Input_command*);
-    void setpartial(Moment);
-    Commands_at(const Commands_at&);
-    Commands_at(Moment, Commands_at*prev);
-};
-
-struct Input_cursor : public PCursor<Commands_at*>
-{
-    /* *************** */
-    Input_cursor(PCursor<Commands_at*>);
-    Moment when()const;
-    void find_moment(Moment w);
-    void prev() { operator --(0); }
-    void next() { operator ++(0); }    
-};
-
-/// the list of commands in Score
-struct Input_commands : public IPointerList<Commands_at*> {    
-    Input_cursor ptr;
-    
-    /* *************** */
-
-    void find_moment(Moment);
-    void add(Input_command c,Assoc<String,Moment> &marks_assoc_r);
-    void do_skip(int bars, Moment wholes);
-        
-    Input_commands();
-    Input_commands(Input_commands const&);
-
-    void reset();
-    void print()const;
-    void parse(Staff *) const;
-};
-
-#endif // INPUTCOMMANDS_HH
-
diff --git a/hdr/staffcommands.hh b/hdr/staffcommands.hh
deleted file mode 100644 (file)
index 1caead8..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-  lilypond, (c) 1996,97 Han-Wen Nienhuys
-*/
-#ifndef SCORECOMMANDS_HH
-#define SCORECOMMANDS_HH
-
-#include "proto.hh"
-#include "command.hh"
-#include "varray.hh"
-#include "plist.hh"
-#include "timedescription.hh"
-
-
-struct Staff_commands_at : public IPointerList<Command*> {
-    Time_description tdescription_;
-    
-    /* *************** */
-    
-    bool is_breakable();
-    Moment when();
-    Staff_commands_at(Time_description);
-    void set_breakable();
-    void add_command_to_break(Command pre, Command mid,Command post);
-    void print() const;
-    void OK() const;
-    void insert_between(Command victim, PCursor<Command*> firstc,
-                       PCursor<Command*> last);
-    void add(Command c);
-};
-
-#endif
-
diff --git a/src/clef.cc b/src/clef.cc
deleted file mode 100644 (file)
index bf7b924..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-  clef.cc -- implement  Clef
-
-  source file of the LilyPond music typesetter
-
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>,
-  Mats Bengtsson <matsb@s3.kth.se>
-*/
-
-#include "clef.hh"
-#include "debug.hh"
-
-Clef::Clef()
-{
-    set_type("violin");
-}
-
-void 
-Clef::set_type(String type_str)
-{
-    clef_type_str_  = type_str;
-    if (clef_type_str_ == "violin") {
-       c0_position_i_= -2;
-    } else if (clef_type_str_ == "alto") {
-       c0_position_i_= 4;
-    } else if (clef_type_str_ == "tenor") {
-       c0_position_i_= 6;
-    } else if (clef_type_str_ == "bass") {
-       c0_position_i_= 10;
-    } else
-       error("unknown clef type `"+clef_type_str_+"\'");
-}
diff --git a/src/command.cc b/src/command.cc
deleted file mode 100644 (file)
index 7ddebc6..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#include "string.hh"
-#include "debug.hh"
-#include "command.hh"
-
-bool
-Command::isbreak()const
-{
-    return (code >= BREAK_PRE && code <= BREAK_END);
-}
-
-Command::Command()
-{
-    code = NOP;
-    priority=0;
-}
-
-void
-Command::print() const
-{
-#ifndef NPRINT
-    mtor << "Command " << "code " << code << " prio " << priority;
-    if ( isbreak())
-       mtor << "(break separator)";
-    if (args.size()) {
-       mtor<< " args: ";
-       for (int i = 0; i<args.size(); i++)
-           mtor << "`"<<args[i] <<"',";
-    }
-    mtor << "\n";
-#endif
-}
diff --git a/src/complexprint.cc b/src/complexprint.cc
deleted file mode 100644 (file)
index 6abe765..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-#include "keyitem.hh"
-
-#include "request.hh"
-#include "pscore.hh"
-#include "paperdef.hh"
-#include "complexstaff.hh"
-#include "sccol.hh"
-#include "debug.hh"
-
-#include "clefitem.hh"
-#include "bar.hh"
-#include "meter.hh"
-const NO_LINES = 5;
-
-Item *
-Complex_staff::get_TYPESET_item(Command *com)
-{
-    Item *s=0;
-    Array<Scalar> arg( com->args);
-    String type =arg[0];
-    arg.del(0);
-    if (com->args[0] == "KEY") {
-       return new Keyitem(NO_LINES);   // urgh. depends on clef.
-    } else if (type ==  "BAR" ) {
-       s = new Bar(com->args[1]);      
-    } else if (type == "METER") {
-       s = new Meter(arg);
-    } else if (type == "CLEF" || type == "CURRENTCLEF") {
-       Clef_item * c = new Clef_item;
-       s = c;
-       c->change = (type == "CLEF");   
-    }else{
-       WARN << "ignoring TYPESET command for " << type << '\n';
-    }
-    return s;
-}
-
-
-
-Interval
-itemlist_width(const Array<Item*> &its)
-{
-    Interval iv ;
-    iv.set_empty();
-     
-    for (int j =0; j < its.size(); j++){
-       iv.unite (its[j]->width());
-
-    }
-    return iv;
-}
-
-void
-Complex_column::typeset_item(Item *i, int breakst)
-{
-    assert(i);
-    
-    staff_l_->pscore_l_->typeset_item(i, score_column_l_->pcol_l_,
-                                 staff_l_->pstaff_l_,breakst);
-    
-    if (breakst == BREAK_PRE - BREAK_PRE) {
-       
-        Array<Item*> to_move(
-           staff_l_->pscore_l_->select_items(staff_l_->pstaff_l_,
-                                         score_column_l_->pcol_l_->prebreak_p_));
-       Interval column_wid = itemlist_width(to_move);
-       assert(!column_wid.empty());
-
-       for (int j=0; j < to_move.size(); j++) {
-           to_move[j]->translate(Offset(-column_wid.right, 0));
-       }
-    }
-}    
-/*
-  UGGGG
-  */
-void
-Complex_column::typeset_item_directional(Item *i, int dir, int breakst) // UGH!
-{
-    assert(i);
-    PCol * c=score_column_l_->pcol_l_;
-    if (breakst == 0)
-       c = c->prebreak_p_;
-    else if (breakst == 2)
-       c = c->postbreak_p_;
-    
-    Array<Item*> to_move(staff_l_->pscore_l_->select_items(staff_l_->pstaff_l_,
-                                                     c));    
-    typeset_item(i, breakst);
-
-    Interval column_wid = itemlist_width(to_move);
-    if (column_wid.empty())
-       column_wid = Interval(0,0);
-    i->translate(Offset(column_wid[dir] - i->width()[-dir], 0));
-}
-
-void
-Complex_staff::set_output(PScore* pscore_l )
-{
-    pstaff_l_ = new PStaff(pscore_l); // pstaff_l_ is added to pscore later.
-    pscore_l_ = pscore_l;
-    pscore_l_->add(pstaff_l_);
-}
-
-
diff --git a/src/getcommands.cc b/src/getcommands.cc
deleted file mode 100644 (file)
index 61a3f59..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#include "string.hh"
-#include "inputcommand.hh"
-#include "parseconstruct.hh"
-#include "command.hh"
-
-Command*
-get_key_typeset_command(Array<Scalar>which)
-{
-    Command*c = new Command;
-    c->code = TYPESET;    
-    c->args = which;
-    String k("KEY");
-    c->args.insert(k,0 );
-    c->priority = 70;
-    return c;
-}
-
-Command *
-get_meter_command(int n, int m)
-{
-    Command*c = new Command;
-    
-    c->code = TYPESET;
-    c->args.push( "METER");
-    c->args.push( n );
-    c->args.push( m );
-    c->priority = 40;
-    return c;
-}
-
-Command
-get_defaultbar_command()
-{
-    Command c;
-    c.code = TYPESET;
-    c.args.push("BAR");
-    c.args.push("default");
-    return c;
-}
-
-void
-split_bar_command(Command &pre_com, Command &no_break_com, Command &post_com,
-                 String s)
-{
-    Command c;
-    c.code = TYPESET;
-    c.priority = (s=="default") ? 100: 110;
-    c.args.push("BAR");
-    if(s=="default")
-       s = "|";
-    
-    if (s == ":|:") {
-       no_break_com=post_com=pre_com = c;
-       
-       pre_com.args.push( ":|");
-       no_break_com.args.push( s);
-       post_com.args.push( "|:");
-    }else if (s=="|:") {
-       c.args.push(s);
-       no_break_com=post_com=c;
-    } else {
-       c.args.push(s);
-       pre_com= no_break_com= c;       
-    } 
-}
diff --git a/src/inputcommand.cc b/src/inputcommand.cc
deleted file mode 100644 (file)
index aab0ea4..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-#include "inputcommand.hh"
-#include "debug.hh"
-#include "command.hh"
-
-Input_command::Input_command()
-{
-}
-
-
-Input_command::operator Command()
-{
-    Command c;
-    if (!args.size())
-       return c;
-    
-    c.code = INTERPRET;
-    String s = args[0];
-        
-    int p=0;
-    if (s == "KEY")
-       p = 200;
-    else if (s=="CLEF")
-       p = 190;
-    else if (s == "METER")
-       p = 180;
-    else if (s == "BAR")
-       p = 170;
-    else if (s == "GROUPING")
-       p = 160;
-    
-    c.priority = p;
-    c.args = args;
-    
-    return c;    
-}
-
-
-Input_command*
-get_partial_command(Moment u)
-{
-    Input_command*c = new Input_command;
-    c->args.push("PARTIAL");
-    c->args.push(u);
-    return c;
-}
-
-Input_command*
-get_goto_command(String s)
-{
-    Input_command*c = new Input_command;
-    c->args.push("GOTO");
-    c->args.push(s);
-    return c;
-}
-
-Input_command*
-get_cadenza_toggle(int i)
-{
-    
-    Input_command*c = new Input_command;
-    c->args.push("CADENZA");
-    c->args.push(i);
-    return c;
-}
-Input_command*
-get_grouping_command(Array<int>a ) 
-{
-    Input_command*c = new Input_command;
-    c->args.push("GROUPING");    
-    for (int i=0; i < a.size(); i ++)
-       c->args.push(a[i]);
-
-    return c;
-}
-
-Input_command*
-get_key_interpret_command(Array<int >a ) 
-{
-    Input_command*c = new Input_command;
-    c->args.push("KEY");
-    for (int i=0; i < a.size(); i ++) {
-       c->args.push(a[i]);
-    }
-    return c;
-}
-
-Input_command*
-get_reset_command()
-{
-    Input_command*c = new Input_command;
-    c->args.push("RESET");
-    return c;
-}
-
-Input_command *
-get_meterchange_command(int n, int m)
-{
-    Input_command*c = new Input_command;
-
-    c->args.push( "METER");
-    c->args.push( n );
-    c->args.push( m );
-
-    return c;
-}
-
-Input_command *
-get_newmeasure_command()
-{
-    Input_command*c = new Input_command;
-    c->args.push( "NEWMEASURE");
-    return c;
-}
-
-Input_command *
-get_skip_command(int n, Moment m)
-{
-    Input_command*c = new Input_command;
-    
-    c->args.push( "SKIP");
-    c->args.push( n );
-    c->args.push( m );
-
-    return c;
-}
-
-
-void
-Input_command::print()const
-{
-#ifndef NPRINT
-    mtor << "{ ";
-    if (args.size()) {
-       mtor<< " args: ";
-       for (int i = 0; i<args.size(); i++)
-           mtor << "`"<<args[i] <<"',";
-    }
-    mtor << "}\n";
-#endif    
-}
-
-Input_command*
-get_clef_interpret_command(String w)
-{
-    Input_command*c = new Input_command;
-    c->args.push("CLEF");
-    c->args.push(w);
-    return c;
-}
-
-Input_command*
-get_bar_command(String w)
-{
-    Input_command*c = new Input_command;
-    c->args.push("BAR");
-    c->args.push(w);
-    return c;
-}
-
-Array<int>
-get_default_grouping(int count, int one_beat_note)
-{
-    Array<int> s;
-    if (!(count % 3 )) {
-       for (int i=0; i < count/3; i++) {
-           s.push(3);
-           s.push(one_beat_note);
-       }
-    } else if (!(count %2)) {
-       for (int i=0; i < count/2; i++) {
-           s.push(2);
-           s.push(one_beat_note);
-       }
-           
-    }else {
-       s.push(2);
-       s.push(one_beat_note);
-       s.concat(get_default_grouping(count-2, one_beat_note));
-    }
-    return s;
-}
diff --git a/src/inputcommands.cc b/src/inputcommands.cc
deleted file mode 100644 (file)
index 36e421c..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-#include "inputcommands.hh"
-#include "inputcommand.hh"
-#include "debug.hh"
-#include "staffcommands.hh"
-#include "getcommand.hh"
-#include "command.hh"
-#include "stcol.hh"
-#include "staff.hh"
-#include "assoc.hh"
-#include "lexer.hh"
-
-void
-Commands_at::print() const
-{
-#ifndef NPRINT
-    mtor << "Commands_at {";
-    tdescription_.print();
-    for (iter_top(*this,cc); cc.ok(); cc++) 
-       cc->print();
-    mtor << "}\n";
-#endif
-}
-
-Moment
-Commands_at::when()
-{
-    return tdescription_.when;
-}
-
-Commands_at::Commands_at(Moment dt, Commands_at* prev)
-    : tdescription_(dt, (prev)? &prev->tdescription_ : 0)
-{
-    if (prev && !tdescription_.whole_in_measure) {
-       bottom().add(get_newmeasure_command());
-    }
-}
-
-void
-Commands_at::add(Input_command *i)
-{
-    bottom().add(i);
-
-    // should check for other meterchanges here.
-    if (i->args[0] == "METER") { 
-       int l = i->args[1];
-       int o = i->args[2];
-       tdescription_.set_meter(l,o);
-       bottom().add(get_grouping_command( get_default_grouping(l,o)));
-    }
-}
-
-Commands_at::Commands_at(Commands_at const&src) :
-    tdescription_(src.tdescription_)
-{
-    IPointerList<Input_command*> &me(*this);
-    const IPointerList<Input_command*> &that(src);
-    
-    PL_copy(me, that);
-}
-
-void
-Commands_at::setpartial(Moment p)
-{
-    tdescription_.setpartial(p);
-}
-
-Moment
-Commands_at::barleft()
-{
-    return  tdescription_.barleft();
-}
-
-void
-Commands_at::parse(Staff_commands_at*s)
-{
-    s->tdescription_ = tdescription_;
-    for (iter_top(*this,cc); cc.ok(); cc++) {
-       if (cc->args.size() &&  cc->args[0] !="") {
-           Command c = **cc;
-           s->add(c);
-           
-       }
-    }
-}
-/* *************** */
-
-void
-Input_cursor::find_moment(Moment w)
-{
-    Moment last = when();
-    while  (1) {
-       if (! ok() ) {
-           *this = list().bottom();
-           
-           Moment dt = (w - when());
-           if ( !ptr()->tdescription_.cadenza_b_ )
-               dt = dt <? ptr()->barleft();
-
-           Commands_at * c = new Commands_at(dt, *this);
-           assert(c->when() <= w);
-           add(c);
-       } else if (when() == w ) {
-           return ;
-       } else if (when() > w )
-           break;
-       
-       
-       last = when();
-       next();
-    }
-
-    prev();
-    Moment dt = (w - when());
-    Commands_at * c = new Commands_at(dt, *this);
-    add(c);
-    next();
-}
-
-
-
-/* *************** */
-void
-Input_commands::find_moment(Moment m)
-{
-    ptr.find_moment(m);
-}
-
-Input_commands::Input_commands(Input_commands const&src)
-    : ptr(src.ptr)
-{
-    IPointerList<Commands_at*> &me(*this);
-    const IPointerList<Commands_at*> &that(src);
-    
-    PL_copy(me, that);    
-}
-
-Input_commands::Input_commands()
-    :    ptr (bottom())
-{
-    Commands_at * p = new Commands_at(0,0);    
-    bottom().add(p);    
-    ptr = bottom();    
-}
-
-void
-Input_commands::do_skip(int bars, Moment wholes)
-{
-    while (bars > 0) {
-       Moment b = ptr->barleft();
-       ptr.find_moment(ptr->when() + b);
-       bars --;        
-    }
-    if (wholes) {
-       ptr.find_moment(ptr->when() + wholes);
-    }
-}
-
-
-void
-Input_commands::add(Input_command c, Assoc<String,Moment> &marks_assoc_r)
-{
-    String s(c.args[0]);
-    if (s == "CADENZA") {
-       ptr->tdescription_.set_cadenza((int)c.args[1]);
-    } if (s == "PARTIAL") {    
-       ptr->setpartial(c.args[1]);
-    } else if (s == "GROUPING") {
-       Input_command *ic = new Input_command(c);
-       ic->args.insert(ptr->tdescription_.one_beat, 1);
-       ptr->add(ic);
-    } else if (s == "METER") {
-       int beats_per_meas = c.args[1];
-       int one_beat = c.args[2];
-       Input_command *ch = get_meterchange_command(beats_per_meas, one_beat);
-       ptr->add(ch);           
-    } else if (s == "SKIP") {
-       int bars = c.args[1] ;
-       Moment wholes= c.args[2];
-       do_skip(bars, wholes);
-    } else if (s == "RESET") {
-       ptr= top();
-    } else if (s=="GOTO") {
-       ptr = top();
-       String m(c.args[1]);
-       if (!marks_assoc_r.elt_query(m)) { 
-           warning( "Unknown marker: `" +m + "\'", 0 );
-           return;
-       }
-       
-       ptr.find_moment(marks_assoc_r[m]);
-    } else {
-       Input_command *ic = new Input_command(c);
-       ptr->add(ic);
-    } 
-    
-}
-
-void
-Input_commands::parse(Staff * staff_l) const
-{
-    print();
-    for (iter_top(*this,i); i.ok(); i++) {
-
-       Staff_column* col_l = staff_l->get_col(i->when(), false);
-       if (!col_l->staff_commands_p_)
-           col_l->staff_commands_p_ = new Staff_commands_at(i->tdescription_);
-       
-       Staff_commands_at * com_l = col_l->staff_commands_p_;
-       
-       if (!i->when()) {   /* all pieces should start with a breakable. */
-           com_l->set_breakable();
-       }
-
-       i->parse(com_l);
-    }
-}
-
-
-void
-Input_commands::print() const
-{
-#ifndef NPRINT
-    for (iter_top(*this,cc); cc.ok() ; cc++) {
-       cc->print();
-    }
-#endif
-}
-/* *************** */
-
-Moment
-Input_cursor::when()const
-{
-    return (*this)->when(); 
-}
-Input_cursor::Input_cursor(PCursor<Commands_at *>c)
-    : PCursor<Commands_at*>(c)
-{
-}
diff --git a/src/staffcommands.cc b/src/staffcommands.cc
deleted file mode 100644 (file)
index 517e7d1..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-#include "staffcommands.hh"
-#include "debug.hh"
-#include "parseconstruct.hh"
-#include "getcommand.hh"
-
-Moment
-Staff_commands_at::when()
-{
-    return tdescription_.when;
-}
-
-void
-Staff_commands_at::print() const
-{
-#ifndef NPRINT
-    iter_top(*this,i);
-    mtor << "Commands at: " ;
-    tdescription_.print();
-    
-    for (; i.ok(); i++)
-       i->print();
-#endif
-}
-void
-Staff_commands_at::OK()const
-{
-#ifndef NDEBUG
-    iter_top(*this,i);
-    for (; i.ok() && (i+1).ok(); i++)
-       if (!i->isbreak() && !(i+1)->isbreak())
-           assert(i->priority >= (i+1)->priority);
-#endif
-}
-
-Staff_commands_at::Staff_commands_at(Time_description m)
-    :tdescription_(m)
-{
-    
-}
-
-bool
-Staff_commands_at::is_breakable()
-{
-    iter_top(*this,i);
-    for (; i.ok(); i++) {
-       if (i->isbreak())
-           return true;
-    }
-    return false;
-}
-
-void
-Staff_commands_at::set_breakable()
-{
-    if (is_breakable()) return;
-    
-    Command k;
-    k.code = BREAK_PRE;
-    bottom().add(new Command(k));
-    k.code = BREAK_MIDDLE;
-    bottom().add(new Command(k));
-    k.code = BREAK_POST;
-    bottom().add(new Command(k));
-    k.code = BREAK_END;
-    bottom().add(new Command(k));        
-}
-
-void
-Staff_commands_at::insert_between(Command victim, PCursor<Command*> firstc,
-                                 PCursor<Command*> last)
-{
-    PCursor<Command*> c(firstc+1);
-//    assert(firstc < last&&last.ok());
-    assert(firstc->code < last->code && last.ok());
-    
-//    while (c < last) { 
-    while (c->code < last->code ) { 
-       if (c->priority <= victim.priority) {
-           c.insert(new Command(victim));
-           return;
-       }
-       c++;
-    }
-    last.insert(new Command(victim));    
-}
-
-void
-Staff_commands_at::add_command_to_break(Command pre, Command mid,Command post)
-{
-    assert(is_breakable());
-    iter_top(*this,c), f(c), l(c);
-
-    while (!c->isbreak())
-       c++;
-    f = c++;
-    while (!c->isbreak())
-       c++;
-    l = c++;
-    
-    insert_between(pre, f, l);
-    f = l;
-    while (!c->isbreak())
-       c++;
-    l = c++;    
-    insert_between(mid, f, l);
-    f = l;
-    while (!c->isbreak())
-       c++;
-    l = c++;
-    assert(l.ok() && l->code == BREAK_END);
-    
-    insert_between(post, f, l);
-}
-
-
-/*
-  should move this stuff into inputlanguage.
-  */
-void
-Staff_commands_at::add(Command c)
-{
-    bool encapsulate =false;
-    Command pre;
-    Command mid;
-    Command post;
-
-    if (c.code == INTERPRET)
-    {                          // UGH
-       Command typeset;        // kut met peren
-       typeset.code = TYPESET;
-       typeset.args = c.args;
-       if (c.args[0] == "NEWMEASURE") {
-           add(get_defaultbar_command());
-       } else if (c.args[0] == "BAR") {
-           add(typeset);
-           c.code= NOP;        // no INTERPRET (BAR) commands
-       } else if (c.args[0] == "KEY") {
-           typeset.priority = 70;
-           add(typeset);
-       } else if (c.args[0] == "CLEF") {
-           typeset.priority = 90;
-           add(typeset);
-       } else if (c.args[0] == "METER") {
-           typeset.priority = 40;
-           add(typeset);
-           return;
-       }
-    }
-
-    // kut en peer
-    if (c.code == TYPESET) {
-       encapsulate  = is_breakable();
-       if (c.args[0] == "BAR") {
-           set_breakable();
-           encapsulate = true;
-           split_bar_command(pre,mid,post, c.args[1]);
-
-           { /* every line a currentkey. */
-               Command kc;
-               kc.code =TYPESET;
-               kc.args.push( "CURRENTKEY");
-               kc.priority = 60;
-               add(kc);
-           }
-           { /* every line a currentclef. */
-               Command kc;
-               kc.code =TYPESET;
-               kc.args.push( "CURRENTCLEF");
-               kc.priority = 80;
-               add(kc);
-           }
-       }
-       if (is_breakable()) {
-           if (c.args[0] == "METER") {
-               mid = c;
-               pre = c;
-               post =c;
-           }else if( c.args[0] == "KEY") {
-
-               mid = c;
-               pre = c;
-               post = c;
-           }else if (c.args[0] == "CURRENTKEY" ){
-               post = c;
-
-           }else
-               if (c.args[0] == "CURRENTCLEF" ){
-                   post = c;
-
-               }else if (c.args[0] == "CLEF") {
-
-                   post = c;
-                   pre = c;
-                   mid = c;                   
-               }
-       }
-    }
-    
-    if (encapsulate)
-       add_command_to_break(pre, mid, post);
-    else {
-       if (c.priority>0)
-           top().insert(new Command(c));
-       else
-           bottom().add(new Command(c));
-    }
-}
-