void test(); // void nop() { // nop } void good_bye() { ERR_CONTEXT(ret_good_bye); } void verbose() { MIN_ARGUMENTS(1); ARG_MUST_BE_OF_TYPE(0, cmd_number); g_verbose = (int)getf(); } void help() { cout<=1) { ARG_MUST_BE_OF_TYPE(0, cmd_number); number::s_default_precision = (int)getf(); } number::s_current_precision = number::s_default_precision; number::s_mode = number::std; cout.precision(number::s_current_precision); cout.unsetf(ios_base::floatfield); } void fix() { MIN_ARGUMENTS(1); ARG_MUST_BE_OF_TYPE(0, cmd_number); number::s_current_precision = (int)getf(); number::s_mode = number::fix; cout << setprecision(number::s_current_precision) << fixed; } void sci() { MIN_ARGUMENTS(1); ARG_MUST_BE_OF_TYPE(0, cmd_number); number::s_current_precision = (int)getf(); number::s_mode = number::sci; cout << setprecision(number::s_current_precision) << scientific; } void rpn_version() { int naked_entry_len; int obj_len; ostring* str; // entry length without prefix / postfix naked_entry_len = (int)strlen(version); // total object length obj_len = sizeof(ostring)+naked_entry_len+1; // allocate object str = (ostring*)malloc(obj_len); // set it str->set(version, naked_entry_len); // push in stack _stack->push_back(str, str->size(), cmd_string); free(str); } void rpn_uname() { int naked_entry_len; int obj_len; ostring* str; // entry length without prefix / postfix naked_entry_len = (int)strlen(uname); // total object length obj_len = sizeof(ostring)+naked_entry_len+1; // allocate object str = (ostring*)malloc(obj_len); // set it str->set(uname, naked_entry_len); // push in stack _stack->push_back(str, str->size(), cmd_string); free(str); }