+ return(DD_FALSE);
+}
+
+
+/*
+ * Command: set error
+ *----------------------------------------------------------------------------
+ */
+
+//int
+//cl_set_option_cmd::do_work(class cl_sim *sim,
+// class cl_cmdline *cmdline, class cl_console_base *con)
+COMMAND_DO_WORK_APP(cl_set_error_cmd)
+{
+ class cl_cmd_arg *params[4]= { cmdline->param(0),
+ cmdline->param(1),
+ cmdline->param(2),
+ cmdline->param(3) };
+ char *error_name= NIL, *value= NIL;
+
+ if (cmdline->syntax_match(0/*app->get_uc()*/, STRING STRING)) {
+ error_name= params[0]->value.string.string;
+ value= params[1]->value.string.string;
+ }
+ else
+ con->dd_printf("%s\n", short_help?short_help:"Error: wrong syntax\n");
+
+ class cl_list *registered_errors = cl_error_registry::get_list();
+ if (error_name &&
+ value &&
+ registered_errors)
+ {
+ int i;
+ for (i= 0; i < registered_errors->count; i++)
+ {
+ class cl_error_class *e=
+ dynamic_cast<class cl_error_class *>(registered_errors->object_at(i));
+ if (e->is_inamed(error_name))
+ {
+ if (strchr("uU-?", *value) != NULL)
+ e->set_on(ERROR_PARENT);
+ else if (strchr("1tTyY", *value) != NULL ||
+ (strlen(value) > 1 &&
+ strchr("nN", value[2]) != NULL))
+ e->set_on(ERROR_ON);
+ else if (strchr("0fFnN", *value) != NULL ||
+ (strlen(value) > 1 &&
+ strchr("fF", value[2]) != NULL))
+ e->set_on(ERROR_OFF);
+ else
+ con->dd_printf("Bad value (%s)\n", value);
+ return(DD_FALSE);
+ }
+ }
+ }
+ con->dd_printf("Error %s not found\n", error_name);
+
+ return(DD_FALSE);