From 323ec66d62f19673e66762fe25585746d3b2a5e0 Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: 周三, 18 3月 2015 17:09:30 +0800 Subject: [PATCH] Add new AUTO special value, resolve #20 --- 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