2007-01-28 12:20:18 +00:00
|
|
|
# debug.nas -- debugging helpers
|
2007-05-09 17:31:45 +00:00
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# debug.color(<enabled>); ... turns terminal colors on (1) or off (0)
|
2007-01-28 12:20:18 +00:00
|
|
|
#
|
2007-02-07 17:06:05 +00:00
|
|
|
# debug.dump(<variable>) ... dumps contents of variable to terminal;
|
|
|
|
# abbreviation for print(debug.string(v))
|
|
|
|
#
|
|
|
|
# debug.local([<frame:int>]) ... dump local variables of current
|
|
|
|
# or given frame
|
|
|
|
#
|
2007-01-28 12:20:18 +00:00
|
|
|
# debug.backtrace([<comment:string>]} ... writes backtrace with local variables
|
|
|
|
# (similar to gdb's "bt full)
|
2007-02-07 17:06:05 +00:00
|
|
|
#
|
2007-10-16 17:23:25 +00:00
|
|
|
# debug.proptrace([<property [, <frames>]]) ... trace property write/add/remove
|
|
|
|
# events under the <property> subtree for
|
|
|
|
# a number of frames. Defaults are "/" and
|
|
|
|
# 1 frame.
|
2007-10-16 15:24:30 +00:00
|
|
|
#
|
2007-05-09 17:31:45 +00:00
|
|
|
# debug.tree([<property> [, <mode>]) ... dump property tree under property path
|
|
|
|
# or props.Node hash (default: root). If
|
|
|
|
# <mode> is unset or 0, use flat mode
|
|
|
|
# (similar to props.dump()), otherwise
|
|
|
|
# use space indentation
|
|
|
|
#
|
2007-01-28 12:20:18 +00:00
|
|
|
# debug.exit() ... exits fgfs
|
|
|
|
#
|
|
|
|
# debug.bt ... abbreviation for debug.backtrace
|
2007-02-07 17:06:05 +00:00
|
|
|
#
|
|
|
|
# debug.string(<variable>) ... returns contents of variable as string
|
2007-11-15 06:46:14 +00:00
|
|
|
# debug.attributes(<property> [, <verb>]) ... returns attribute string for a given property.
|
|
|
|
# <verb>ose is by default 0, and shows the
|
|
|
|
# node's refcounter if 1.
|
2007-02-07 17:06:05 +00:00
|
|
|
#
|
2007-06-12 21:27:48 +00:00
|
|
|
# debug.load_nasal(<file> [, <module>])) ... load and run Nasal file (under namespace
|
|
|
|
# <module> if defined, or the basename
|
|
|
|
# otherwise)
|
2007-05-14 16:28:53 +00:00
|
|
|
#
|
|
|
|
# debug.benchmark(<label:string>, <func> [<args>])
|
|
|
|
# ... calls function with optional args and
|
|
|
|
# prints execution time in seconds,
|
|
|
|
# prefixed with <label>.
|
2007-06-10 20:31:33 +00:00
|
|
|
#
|
2007-06-16 08:21:39 +00:00
|
|
|
# debug.printerror(<err-vector>) ... prints error vector as set by call()
|
|
|
|
#
|
2007-10-16 15:24:30 +00:00
|
|
|
# debug.propify(<variable>) ... turn about everything into a props.Node
|
2007-06-16 08:21:39 +00:00
|
|
|
#
|
2007-06-10 20:31:33 +00:00
|
|
|
# CAVE: this file makes extensive use of ANSI color codes. These are
|
|
|
|
# interpreted by UNIX shells and MS Windows with ANSI.SYS extension
|
|
|
|
# installed. If the color codes aren't interpreted correctly, then
|
|
|
|
# set property /sim/startup/terminal-ansi-colors=0
|
2007-11-25 20:36:57 +00:00
|
|
|
#
|
2007-11-19 13:31:18 +00:00
|
|
|
var isprint = nil;
|
|
|
|
var isalnum = nil;
|
|
|
|
var isalpha = nil;
|
2007-01-28 12:20:18 +00:00
|
|
|
|
2008-05-15 15:23:17 +00:00
|
|
|
var _c = func nil;
|
2007-01-28 12:20:18 +00:00
|
|
|
|
2007-05-09 17:31:45 +00:00
|
|
|
var color = func(enabled) {
|
2008-05-15 15:23:17 +00:00
|
|
|
if (enabled)
|
|
|
|
_c = func(color, s) "\x1b[" ~ color ~ "m" ~ s ~ "\x1b[m";
|
|
|
|
else
|
|
|
|
_c = func(dummy, s) s;
|
2007-01-28 12:20:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-01-29 16:24:58 +00:00
|
|
|
# for color codes see $ man console_codes
|
|
|
|
#
|
2008-05-15 15:23:17 +00:00
|
|
|
var _title = func(s) _c("33;42;1", s); # backtrace header
|
|
|
|
var _section = func(s) _c("37;41;1", s); # backtrace frame
|
|
|
|
var _error = func(s) _c("31;1", s); # internal errors
|
|
|
|
var _bench = func(s) _c("37;45;1", s); # benchmark info
|
|
|
|
|
|
|
|
var _nil = func(s) _c("32", s); # nil
|
|
|
|
var _string = func(s) _c("31", s); # "foo"
|
|
|
|
var _num = func(s) _c("31", s); # 0.0
|
|
|
|
var _bracket = func(s) _c("", s); # [ ]
|
|
|
|
var _brace = func(s) _c("", s); # { }
|
|
|
|
var _angle = func(s) _c("", s); # < >
|
|
|
|
var _vartype = func(s) _c("33", s); # func ghost
|
|
|
|
var _proptype = func(s) _c("34", s); # BOOL INT LONG DOUBLE ...
|
|
|
|
var _path = func(s) _c("36", s); # /some/property/path
|
|
|
|
var _internal = func(s) _c("35", s); # me parents
|
|
|
|
var _varname = func(s) s; # variable_name
|
2007-02-07 17:06:05 +00:00
|
|
|
|
2007-07-02 20:58:30 +00:00
|
|
|
var ghosttypes = {};
|
|
|
|
|
2007-02-07 17:06:05 +00:00
|
|
|
|
2007-10-16 15:24:30 +00:00
|
|
|
##
|
|
|
|
# Turn p into props.Node (if it isn't yet), or return nil.
|
|
|
|
#
|
|
|
|
var propify = func(p, create = 0) {
|
|
|
|
var type = typeof(p);
|
|
|
|
if (type == "ghost" and ghosttype(p) == ghosttype(props.globals._g))
|
|
|
|
return props.wrapNode(p);
|
|
|
|
if (type == "scalar" and num(p) == nil)
|
|
|
|
return props.globals.getNode(p, create);
|
|
|
|
if (isa(p, props.Node))
|
|
|
|
return p;
|
|
|
|
return nil;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var tree = func(n = "", graph = 1) {
|
|
|
|
n = propify(n);
|
2007-05-09 17:31:45 +00:00
|
|
|
if (n == nil)
|
|
|
|
dump(n);
|
|
|
|
else
|
|
|
|
_tree(n, graph);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var _tree = func(n, graph = 1, prefix = "", level = 0) {
|
|
|
|
var path = n.getPath();
|
|
|
|
var children = n.getChildren();
|
|
|
|
var s = "";
|
|
|
|
|
|
|
|
if (graph) {
|
|
|
|
s = prefix ~ n.getName();
|
|
|
|
var index = n.getIndex();
|
|
|
|
if (index)
|
|
|
|
s ~= "[" ~ index ~ "]";
|
|
|
|
} else {
|
|
|
|
s = n.getPath();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (size(children)) {
|
|
|
|
s ~= "/";
|
|
|
|
if (n.getType() != "NONE")
|
2007-11-15 06:46:14 +00:00
|
|
|
s ~= " = " ~ string(n.getValue()) ~ " " ~ attributes(n)
|
2007-05-09 17:31:45 +00:00
|
|
|
~ " " ~ _section(" PARENT-VALUE ");
|
|
|
|
} else {
|
2007-11-15 06:46:14 +00:00
|
|
|
s ~= " = " ~ string(n.getValue()) ~ " " ~ attributes(n);
|
2007-05-09 17:31:45 +00:00
|
|
|
}
|
|
|
|
print(s);
|
|
|
|
|
|
|
|
if (n.getType() != "ALIAS")
|
|
|
|
forindex (var i; children)
|
|
|
|
_tree(children[i], graph, prefix ~ ". ", level + 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-11-15 21:27:42 +00:00
|
|
|
var attributes = func(p, verbose = 1) {
|
2007-01-30 23:22:36 +00:00
|
|
|
var r = p.getAttribute("read") ? "" : "r";
|
|
|
|
var w = p.getAttribute("write") ? "" : "w";
|
|
|
|
var R = p.getAttribute("trace-read") ? "R" : "";
|
|
|
|
var W = p.getAttribute("trace-write") ? "W" : "";
|
|
|
|
var A = p.getAttribute("archive") ? "A" : "";
|
|
|
|
var U = p.getAttribute("userarchive") ? "U" : "";
|
|
|
|
var T = p.getAttribute("tied") ? "T" : "";
|
2007-05-09 17:31:45 +00:00
|
|
|
var attr = r ~ w ~ R ~ W ~ A ~ U ~ T;
|
2008-05-15 15:23:17 +00:00
|
|
|
var type = "(" ~ p.getType();
|
2007-05-09 17:31:45 +00:00
|
|
|
if (size(attr))
|
|
|
|
type ~= ", " ~ attr;
|
|
|
|
if (var l = p.getAttribute("listeners"))
|
|
|
|
type ~= ", L" ~ l;
|
2007-11-15 06:46:14 +00:00
|
|
|
if (verbose and (var c = p.getAttribute("references")) > 2)
|
|
|
|
type ~= ", #" ~ (c - 2);
|
2008-05-15 15:23:17 +00:00
|
|
|
return _proptype(type ~ ")");
|
2007-05-09 17:31:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var _dump_prop = func(p) {
|
2007-11-15 06:46:14 +00:00
|
|
|
_path(p.getPath()) ~ " = " ~ string(p.getValue()) ~ " " ~ attributes(p);
|
2007-01-28 12:20:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-02-07 17:06:05 +00:00
|
|
|
var _dump_var = func(v) {
|
2007-05-09 17:31:45 +00:00
|
|
|
if (v == "me" or v == "parents")
|
2007-01-29 16:24:58 +00:00
|
|
|
return _internal(v);
|
2007-05-09 17:31:45 +00:00
|
|
|
else
|
2007-01-28 12:20:18 +00:00
|
|
|
return _varname(v);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-11-19 12:36:26 +00:00
|
|
|
var _dump_string = func(str) {
|
2007-11-25 20:36:57 +00:00
|
|
|
var s = "'";
|
2007-11-19 12:36:26 +00:00
|
|
|
for (var i = 0; i < size(str); i += 1) {
|
2007-11-25 20:36:57 +00:00
|
|
|
var c = str[i];
|
|
|
|
if (c == `\``)
|
|
|
|
s ~= "\\`";
|
|
|
|
elsif (c == `\n`)
|
|
|
|
s ~= "\\n";
|
|
|
|
elsif (c == `\r`)
|
|
|
|
s ~= "\\r";
|
|
|
|
elsif (c == `\t`)
|
|
|
|
s ~= "\\t";
|
|
|
|
elsif (isprint(c))
|
|
|
|
s ~= chr(c);
|
|
|
|
else
|
|
|
|
s ~= sprintf("\\x%02x", c);
|
2007-11-19 12:36:26 +00:00
|
|
|
}
|
2007-11-25 20:36:57 +00:00
|
|
|
return _string(s ~ "'");
|
2007-11-19 12:36:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# dump hash keys as variables if they are valid variable names, or as string otherwise
|
|
|
|
var _dump_key = func(s) {
|
2007-11-19 13:31:18 +00:00
|
|
|
if (num(s) != nil)
|
|
|
|
return _num(s);
|
|
|
|
if (!isalpha(s[0]) and s[0] != `_`)
|
2007-11-19 12:36:26 +00:00
|
|
|
return _dump_string(s);
|
|
|
|
for (var i = 1; i < size(s); i += 1) {
|
2007-11-19 13:31:18 +00:00
|
|
|
if (!isalnum(s[i]) and s[i] != `_`)
|
2007-11-19 12:36:26 +00:00
|
|
|
return _dump_string(s);
|
|
|
|
}
|
|
|
|
_dump_var(s);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-02-07 17:06:05 +00:00
|
|
|
var string = func(o) {
|
2007-01-28 12:20:18 +00:00
|
|
|
var t = typeof(o);
|
|
|
|
if (t == "nil") {
|
|
|
|
return _nil("nil");
|
2007-11-19 12:36:26 +00:00
|
|
|
|
2007-01-28 12:20:18 +00:00
|
|
|
} elsif (t == "scalar") {
|
2007-11-19 12:36:26 +00:00
|
|
|
return num(o) == nil ? _dump_string(o) : _num(o);
|
|
|
|
|
2007-01-28 12:20:18 +00:00
|
|
|
} elsif (t == "vector") {
|
2007-01-30 23:22:36 +00:00
|
|
|
var s = "";
|
2007-05-09 17:31:45 +00:00
|
|
|
forindex (var i; o)
|
2007-02-07 17:06:05 +00:00
|
|
|
s ~= (i == 0 ? "" : ", ") ~ string(o[i]);
|
2007-01-30 23:22:36 +00:00
|
|
|
return _bracket("[") ~ " " ~ s ~ " " ~ _bracket("]");
|
2007-11-19 12:36:26 +00:00
|
|
|
|
2007-01-28 12:20:18 +00:00
|
|
|
} elsif (t == "hash") {
|
|
|
|
if (contains(o, "parents") and typeof(o.parents) == "vector"
|
2007-06-12 21:27:48 +00:00
|
|
|
and size(o.parents) == 1 and o.parents[0] == props.Node)
|
2007-01-28 12:20:18 +00:00
|
|
|
return _angle("<") ~ _dump_prop(o) ~ _angle(">");
|
2007-06-12 21:27:48 +00:00
|
|
|
|
2007-01-28 12:20:18 +00:00
|
|
|
var k = keys(o);
|
2007-01-30 23:22:36 +00:00
|
|
|
var s = "";
|
2007-05-09 17:31:45 +00:00
|
|
|
forindex (var i; k)
|
2007-11-19 12:36:26 +00:00
|
|
|
s ~= (i == 0 ? "" : ", ") ~ _dump_key(k[i]) ~ " : " ~ string(o[k[i]]);
|
2007-01-30 23:22:36 +00:00
|
|
|
return _brace("{") ~ " " ~ s ~ " " ~ _brace("}");
|
2007-11-19 12:36:26 +00:00
|
|
|
|
2007-06-21 20:00:21 +00:00
|
|
|
} elsif (t == "ghost") {
|
2007-07-02 20:58:30 +00:00
|
|
|
var gt = ghosttype(o);
|
|
|
|
if (contains(ghosttypes, gt))
|
|
|
|
return _angle("<") ~ _nil(ghosttypes[gt]) ~ _angle(">");
|
|
|
|
else
|
|
|
|
return _angle("<") ~ _nil(gt) ~ _angle(">");
|
2007-11-19 12:36:26 +00:00
|
|
|
|
2007-01-28 12:20:18 +00:00
|
|
|
} else {
|
2007-01-29 16:24:58 +00:00
|
|
|
return _angle("<") ~ _vartype(t) ~ _angle(">");
|
2007-01-28 12:20:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-05-15 15:23:17 +00:00
|
|
|
var dump = func(vars...) {
|
|
|
|
if (!size(vars))
|
|
|
|
return local(1);
|
|
|
|
if (size(vars) == 1)
|
|
|
|
return print(string(vars[0]));
|
|
|
|
forindex (var i; vars)
|
|
|
|
print(_c("33;40;1", "#" ~ i) ~ " ", string(vars[i]));
|
|
|
|
}
|
2007-02-07 17:06:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
var local = func(frame = 0) {
|
|
|
|
var v = caller(frame + 1);
|
|
|
|
print(v == nil ? _error("<no such frame>") : string(v[0]));
|
|
|
|
return v;
|
|
|
|
}
|
2007-01-28 12:20:18 +00:00
|
|
|
|
|
|
|
|
2007-06-10 20:31:33 +00:00
|
|
|
var backtrace = func(desc = nil) {
|
|
|
|
var d = desc == nil ? "" : " '" ~ desc ~ "'";
|
|
|
|
print("\n" ~ _title("\n### backtrace" ~ d ~ " ###"));
|
|
|
|
for (var i = 1; 1; i += 1) {
|
|
|
|
v = caller(i);
|
|
|
|
if (v == nil)
|
|
|
|
return;
|
|
|
|
print(_section(sprintf("#%-2d called from %s, line %s:", i - 1, v[2], v[3])));
|
2007-01-28 12:20:18 +00:00
|
|
|
dump(v[0]);
|
|
|
|
}
|
|
|
|
}
|
2007-02-07 17:06:05 +00:00
|
|
|
var bt = backtrace;
|
2007-01-28 12:20:18 +00:00
|
|
|
|
|
|
|
|
2007-10-16 17:23:25 +00:00
|
|
|
var proptrace = func(root = "/", frames = 1) {
|
|
|
|
var events = 0;
|
2007-10-16 15:24:30 +00:00
|
|
|
var trace = setlistener(propify(root), func(this, base, type) {
|
2007-10-16 17:23:25 +00:00
|
|
|
events += 1;
|
2007-10-16 15:24:30 +00:00
|
|
|
if (type > 0)
|
2007-10-16 18:54:25 +00:00
|
|
|
print(_nil("ADD "), this.getPath());
|
2007-10-16 15:24:30 +00:00
|
|
|
elsif (type < 0)
|
2007-10-16 18:54:25 +00:00
|
|
|
print(_num("DEL "), this.getPath());
|
2007-10-16 15:24:30 +00:00
|
|
|
else
|
2007-11-15 06:46:14 +00:00
|
|
|
print("SET ", this.getPath(), " = ", string(this.getValue()), " ", attributes(this));
|
2007-10-16 15:24:30 +00:00
|
|
|
}, 0, 2);
|
2007-10-16 17:23:25 +00:00
|
|
|
var mark = setlistener("/sim/signals/frame", func {
|
|
|
|
print("-------------------- FRAME --------------------");
|
|
|
|
if (!frames) {
|
|
|
|
removelistener(trace);
|
|
|
|
removelistener(mark);
|
|
|
|
print("proptrace: stop (", events, " calls)");
|
|
|
|
}
|
|
|
|
frames -= 1;
|
|
|
|
});
|
2007-10-16 15:24:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-05-14 16:28:53 +00:00
|
|
|
##
|
2007-06-22 18:49:38 +00:00
|
|
|
# Executes function f with optional arguments and prints execution
|
2007-05-14 16:28:53 +00:00
|
|
|
# time in seconds. Examples:
|
|
|
|
#
|
2007-06-16 08:21:39 +00:00
|
|
|
# var test = func(n) { for (var i = 0; i < n; i +=1) { print(i) }
|
|
|
|
# debug.benchmark("test()/1", test, 10);
|
|
|
|
# debug.benchmark("test()/2", func { test(10) });
|
2007-05-14 16:28:53 +00:00
|
|
|
#
|
|
|
|
var benchmark = func(label, f, arg...) {
|
|
|
|
var start = systime();
|
|
|
|
call(f, arg);
|
|
|
|
print(_bench(sprintf(" %s --> %.6f s ", label, systime() - start)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-05-15 15:23:17 +00:00
|
|
|
var exit = func fgcommand("exit");
|
2007-01-28 12:20:18 +00:00
|
|
|
|
|
|
|
|
2007-11-15 06:46:14 +00:00
|
|
|
##
|
2007-06-16 08:21:39 +00:00
|
|
|
# print error vector as set by call(). By using call() one can execute
|
|
|
|
# code that catches "exceptions" (by a die() call or errors). The Nasal
|
|
|
|
# code doesn't abort in this case. Example:
|
|
|
|
#
|
|
|
|
# call(func { possibly_buggy() }, nil, var err = []);
|
|
|
|
# debug.printerror(err);
|
|
|
|
#
|
|
|
|
var printerror = func(err) {
|
|
|
|
if (!size(err))
|
|
|
|
return;
|
|
|
|
|
|
|
|
print(sprintf("%s at %s line %d", err[0], err[1], err[2]));
|
|
|
|
for (var i = 3; i < size(err); i += 2)
|
|
|
|
print(sprintf(" called from %s line %d", err[i], err[i + 1]));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-01-28 12:20:18 +00:00
|
|
|
if (getprop("/sim/logging/priority") != "alert") {
|
2008-05-15 15:23:17 +00:00
|
|
|
_setlistener("/sim/signals/nasal-dir-initialized", func print(_c("32", "** NASAL initialized **")));
|
|
|
|
_setlistener("/sim/signals/fdm-initialized", func print(_c("36", "** FDM initialized **")));
|
2007-01-28 12:20:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-03-29 15:00:04 +00:00
|
|
|
|
|
|
|
##
|
2007-06-12 19:13:28 +00:00
|
|
|
# Loads Nasal file into namespace and executes it. The namespace
|
|
|
|
# (module name) is taken from the optional second argument, or
|
|
|
|
# derived from the Nasal file's name.
|
2007-03-29 15:00:04 +00:00
|
|
|
#
|
2007-06-12 19:13:28 +00:00
|
|
|
# Usage: debug.load_nasal(<filename> [, <modulename>]);
|
2007-03-29 15:00:04 +00:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
2007-06-16 08:21:39 +00:00
|
|
|
# debug.load_nasal(getprop("/sim/fg-root") ~ "/Local/test.nas");
|
|
|
|
# debug.load_nasal("/tmp/foo.nas", "test");
|
2007-03-29 15:00:04 +00:00
|
|
|
#
|
2007-06-12 19:13:28 +00:00
|
|
|
var load_nasal = func(file, module = nil) {
|
|
|
|
if (module == nil)
|
|
|
|
module = split(".", split("/", file)[-1])[0];
|
2007-03-29 15:00:04 +00:00
|
|
|
|
2007-06-12 19:13:28 +00:00
|
|
|
if (!contains(globals, module))
|
|
|
|
globals[module] = {};
|
|
|
|
|
2007-11-15 06:46:14 +00:00
|
|
|
var err = [];
|
2007-06-12 19:13:28 +00:00
|
|
|
printlog("info", "loading ", file, " into namespace ", module);
|
2007-11-15 06:46:14 +00:00
|
|
|
var code = call(func { compile(io.readfile(file), file) }, nil, err);
|
|
|
|
if (size(err))
|
|
|
|
return print(file ~ ": " ~ err[0]);
|
|
|
|
|
|
|
|
call(bind(code, globals), nil, nil, globals[module], err);
|
|
|
|
printerror(err);
|
2007-06-12 19:13:28 +00:00
|
|
|
}
|
2007-03-29 15:00:04 +00:00
|
|
|
|
2007-05-09 17:31:45 +00:00
|
|
|
|
|
|
|
_setlistener("/sim/signals/nasal-dir-initialized", func {
|
2007-11-19 13:31:18 +00:00
|
|
|
isalnum = globals["string"].isalnum;
|
|
|
|
isalpha = globals["string"].isalpha;
|
|
|
|
isprint = globals["string"].isprint;
|
2007-07-02 20:58:30 +00:00
|
|
|
ghosttypes[ghosttype(props._globals())] = "PropertyNode";
|
|
|
|
ghosttypes[ghosttype(io.stderr)] = "FileHandle";
|
|
|
|
|
2008-05-15 15:23:17 +00:00
|
|
|
setlistener("/sim/startup/terminal-ansi-colors", func(n) color(n.getBoolValue()), 1);
|
2007-05-09 17:31:45 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|