dir = globals->get_props()->getNode(path + "/" + tokens[1]);
}
if ( dir == 0 ) {
- tokens[1] += " Not Found\n";
+ tokens[1] = "ERR Node \"" + tokens[1] + "\" not found.\n";
io->writestring( tokens[1].c_str() );
return true;
}
string name = child->getName();
string line = name;
if ( dir->getChild(name, 1) ) {
+ char buf[16];
sprintf(buf, "[%d]", child->getIndex());
line += buf;
}
if ( child->nChildren() > 0 ) {
line += "/";
} else {
- if (mode == PROMPT) {
+ if ( mode == PROMPT ) {
string value = dir->getStringValue ( name, "" );
line += " =\t'" + value + "'\t(";
line += getValueTypeString( dir->getNode( name ) );
writeProperties ( buf, child );
io->writestring( buf.str() );
} else {
- tokens[1] += " Not Found\n";
+ tokens[1] = "ERR Node \"" + tokens[1] + "\" not found.\n";
io->writestring( tokens[1].c_str() );
}
}
node = child;
path = node->getPath();
} else {
- tokens[1] += " Not Found\n";
+ tokens[1] = "ERR Node \"" + tokens[1] + "\" not found.\n";
io->writestring( tokens[1].c_str() );
}
}
string tmp;
string value = node->getStringValue ( tokens[1], "" );
if ( mode == PROMPT ) {
- string ttt = "debug = '" + tokens[1] + "'\n";
- io->writestring( ttt.c_str() );
+ //string ttt = "debug = '" + tokens[1] + "'\n";
+ //io->writestring( ttt.c_str() );
tmp = tokens[1] + " = '" + value + "' (";
tmp += getValueTypeString( node->getNode( tokens[1] ) );
// process work for this port
bool FGProps::process() {
SGIOChannel *io = get_io_channel();
+ char buf[max_cmd_len];
// cout << "processing incoming props command" << endl;