| | |
| | | |
| | | for (i = 0; context->cmdlist[i].pattern != NULL; i++) { |
| | | cmd = &context->cmdlist[i]; |
| | | if (matchCommand(cmd->pattern, header, len)) { |
| | | if (matchCommand(cmd->pattern, header, len, NULL, 0)) { |
| | | context->param_list.cmd = cmd; |
| | | return TRUE; |
| | | } |
| | |
| | | |
| | | if (parameter->type == SCPI_TOKEN_PROGRAM_MNEMONIC) { |
| | | for (res = 0; options[res].name; ++res) { |
| | | if (matchPattern(options[res].name, strlen(options[res].name), parameter->ptr, parameter->len)) { |
| | | if (matchPattern(options[res].name, strlen(options[res].name), parameter->ptr, parameter->len, NULL)) { |
| | | *value = options[res].tag; |
| | | result = TRUE; |
| | | break; |
| | |
| | | } |
| | | |
| | | const char * pattern = context->param_list.cmd->pattern; |
| | | return matchCommand(pattern, cmd, strlen(cmd)); |
| | | return matchCommand (pattern, cmd, strlen (cmd), NULL, 0); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | scpi_bool_t SCPI_Match(const char * pattern, const char * value, size_t len) { |
| | | return matchCommand (pattern, value, len); |
| | | return matchCommand (pattern, value, len, NULL, 0); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | scpi_bool_t SCPI_CommandNumbers(scpi_t * context, int32_t * numbers, size_t len) { |
| | | return matchCommand (context->param_list.cmd->pattern, context->param_list.cmd_raw.data, context->param_list.cmd_raw.length, numbers, len); |
| | | } |