X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=sim%2Fucsim%2Fsim.src%2Foption.cc;h=2b237a3ad3f4f6e84ba87dcedbde5b8ef30e2592;hb=6ba6105dc5975c3b0cc0d1ce53f47a1ddf4be9cf;hp=ff151da1441a852491b3c47c577da8c3efd7a225;hpb=02d4f3e2b701dcdb88981a3292d226fc818b93b7;p=fw%2Fsdcc diff --git a/sim/ucsim/sim.src/option.cc b/sim/ucsim/sim.src/option.cc index ff151da1..2b237a3a 100644 --- a/sim/ucsim/sim.src/option.cc +++ b/sim/ucsim/sim.src/option.cc @@ -112,19 +112,19 @@ cl_bool_opt::set_value(char *s) * Debug on console */ -cl_cons_debug_opt::cl_cons_debug_opt(class cl_sim *Asim, +cl_cons_debug_opt::cl_cons_debug_opt(class cl_app *the_app, char *Iid, char *Ihelp): cl_option(0, Iid, Ihelp) { - sim= Asim; + app= the_app; } void cl_cons_debug_opt::print(class cl_console *con) { - if (sim->cmd->actual_console && - sim->cmd->actual_console->flags & CONS_DEBUG) + if (/*sim->cmd->actual_console && + sim->cmd->actual_console*/con->flags & CONS_DEBUG) con->printf("TRUE"); else con->printf("FALSE"); @@ -133,20 +133,20 @@ cl_cons_debug_opt::print(class cl_console *con) bool cl_cons_debug_opt::get_value(void) { - return(sim->cmd->actual_console? - (sim->cmd->actual_console->flags & CONS_DEBUG): + return(app->get_commander()->actual_console? + (app->get_commander()->actual_console->flags & CONS_DEBUG): 0); } void cl_cons_debug_opt::set_value(bool opt) { - if (sim->cmd->actual_console) + if (app->get_commander()->actual_console) { if (opt) - sim->cmd->actual_console->flags|= CONS_DEBUG; + app->get_commander()->actual_console->flags|= CONS_DEBUG; else - sim->cmd->actual_console->flags&= ~CONS_DEBUG; + app->get_commander()->actual_console->flags&= ~CONS_DEBUG; } } @@ -157,15 +157,15 @@ cl_cons_debug_opt::set_value(char *s) char c; if (s && - sim->cmd->actual_console) + app->get_commander()->actual_console) { c= toupper(*s); if (c == '1' || c == 'T' || c == 'Y') - sim->cmd->actual_console->flags|= CONS_DEBUG; + app->get_commander()->actual_console->flags|= CONS_DEBUG; else - sim->cmd->actual_console->flags&= ~CONS_DEBUG; + app->get_commander()->actual_console->flags&= ~CONS_DEBUG; } }