From cece739275710b06aef9b6d38fb63d7028571bff Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: 周二, 14 4月 2015 03:37:41 +0800 Subject: [PATCH] Final resolution of #18, #19 and #28 --- libscpi/src/parser.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/libscpi/src/parser.c b/libscpi/src/parser.c index 3b53665..122b557 100644 --- a/libscpi/src/parser.c +++ b/libscpi/src/parser.c @@ -675,3 +675,11 @@ return FALSE; } +scpi_bool_t SCPI_IsCmd(scpi_t * context, const char * cmd) { + if (! context->paramlist.cmd) { + return FALSE; + } + + const char * pattern = context->paramlist.cmd->pattern; + return matchCommand (pattern, cmd, strlen (cmd)); +} -- Gitblit v1.9.1