| 757 | } |
| 758 | |
| 759 | void |
| 760 | CoreProviderImpl::DefineCommand(const char *name, const char *help, const CommandFunc &callback) |
| 761 | { |
| 762 | char *new_name = sm_strdup(name); |
| 763 | char *new_help = sm_strdup(help); |
| 764 | int flags = 0; |
| 765 | |
| 766 | auto ignore_callback = [] (DISPATCH_ARGS) -> void { |
| 767 | }; |
| 768 | |
| 769 | ConCommand *cmd = new ConCommand(new_name, ignore_callback, new_help, flags); |
| 770 | ke::RefPtr<CommandHook> hook = AddCommandHook(cmd, callback); |
| 771 | |
| 772 | ke::RefPtr<CommandImpl> impl = new CommandImpl(cmd, hook); |
| 773 | commands_.push_back(impl); |
| 774 | } |
| 775 | |
| 776 | void CoreProviderImpl::FormatSourceBinaryName(const char *basename, char *buffer, size_t maxlength) |
| 777 | { |
no test coverage detected