From 173867689a0b328947c12e45a863145ec20c7628 Mon Sep 17 00:00:00 2001 From: Andrey Nakin <andrey.nakin@gmail.com> Date: 周一, 23 3月 2015 20:36:11 +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