From b7b35117e2982e99dae0716d217945efe81f49e5 Mon Sep 17 00:00:00 2001 From: luizrenault <luiz@luizrenault.com> Date: 周五, 16 1月 2015 02:03:42 +0800 Subject: [PATCH] Update ieee488.c --- 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