summaryrefslogtreecommitdiff
path: root/command.cc
blob: 23edf1ec36c649ecd7322a893f6e8ea23c9e7b10 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "string.hh"
#include "debug.hh"
#include "command.hh"

bool
Command::isbreak()const
{
    return (code >= BREAK_PRE && code <= BREAK_END);
}

Command::Command()
{
    code = NOP;
    when = -1;
    priority=0;
}



Command::Command(Real w)
{
    code = NOP;
    when = w;
    priority=0;
}

void
Command::print() const
{
#ifndef NPRINT
    mtor << "command at " << when << ", code " << code << " prio " << priority;
    if (args.sz()) {
	mtor<< " args: ";
	for (int i = 0; i<args.sz(); i++)
	    mtor << "`"<<args[i] <<"',";
    }
    mtor << "\n";
#endif
}