user definable flags for commands
parent
fb11619ef7
commit
352dfd58f6
|
@ -929,7 +929,7 @@ void CsState::set_var_str_checked(Ident *id, ostd::ConstCharRange v) {
|
|||
}
|
||||
|
||||
bool CsState::add_command(ostd::ConstCharRange name, ostd::ConstCharRange args,
|
||||
IdentFunc func, int type) {
|
||||
IdentFunc func, int type, int flags) {
|
||||
ostd::Uint32 argmask = 0;
|
||||
int nargs = 0;
|
||||
bool limit = true;
|
||||
|
@ -979,7 +979,7 @@ bool CsState::add_command(ostd::ConstCharRange name, ostd::ConstCharRange args,
|
|||
name, nargs);
|
||||
return false;
|
||||
}
|
||||
add_ident(type, name, args, argmask, nargs, func);
|
||||
add_ident(type, name, args, argmask, nargs, func, flags);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -380,13 +380,14 @@ struct CsState {
|
|||
|
||||
template<typename F>
|
||||
bool add_command(ostd::ConstCharRange name, ostd::ConstCharRange args,
|
||||
F func, int type = ID_COMMAND) {
|
||||
F func, int type = ID_COMMAND, int flags = 0) {
|
||||
return add_command(name, args,
|
||||
(IdentFunc)(ostd::FunctionMakeDefaultConstructible<F>)func, type);
|
||||
(IdentFunc)(ostd::FunctionMakeDefaultConstructible<F>)func,
|
||||
type, flags);
|
||||
}
|
||||
|
||||
bool add_command(ostd::ConstCharRange name, ostd::ConstCharRange args,
|
||||
IdentFunc func, int type = ID_COMMAND);
|
||||
IdentFunc func, int type = ID_COMMAND, int flags = 0);
|
||||
|
||||
ostd::String run_str(const ostd::Uint32 *code);
|
||||
ostd::String run_str(ostd::ConstCharRange code);
|
||||
|
|
Loading…
Reference in New Issue