From 8c408948cc956c50527cf6e6fc0808e185a6b105 Mon Sep 17 00:00:00 2001 From: Andrey Nakin <andrey.nakin@gmail.com> Date: ćšć, 16 4æ 2015 22:27:12 +0800 Subject: [PATCH] Merge branch 'master' of https://github.com/j123b567/scpi-parser --- 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