| 229 | } |
| 230 | |
| 231 | void SimpleCLI::addCmd(Command& c) { |
| 232 | if (!cmdList) { |
| 233 | cmdList = c.cmdPointer; |
| 234 | } else { |
| 235 | cmd* h = cmdList; |
| 236 | |
| 237 | while (h->next) h = h->next; |
| 238 | h->next = c.cmdPointer; |
| 239 | } |
| 240 | |
| 241 | c.setCaseSensetive(caseSensetive); |
| 242 | c.persistent = true; |
| 243 | } |
| 244 | |
| 245 | Command SimpleCLI::addCmd(const char* name, void (* callback)(cmd* c)) { |
| 246 | Command c(cmd_create_default(name)); |
nothing calls this directly
no test coverage detected