From 81364db0bc98b01319dc5ecb835a4e37b906bad2 Mon Sep 17 00:00:00 2001 From: Dmitry Zhulanov Date: Sat, 1 Oct 2016 13:05:10 +0700 Subject: disable xverb feature if WITH_YAML defined (bzr r15136.1.9) --- src/main-cmdlinexact.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main-cmdlinexact.cpp') diff --git a/src/main-cmdlinexact.cpp b/src/main-cmdlinexact.cpp index a3c9436bd..3dc83bc8f 100644 --- a/src/main-cmdlinexact.cpp +++ b/src/main-cmdlinexact.cpp @@ -52,7 +52,10 @@ #include #include "main-cmdlinexact.h" +#ifdef WITH_YAML #include "yaml.h" +#endif // WITH_YAML + #include "extension/system.h" #include "file.h" #include @@ -312,6 +315,9 @@ typedef std::list verbs_list_t; void CmdLineXAction::createActionsFromYAML( gchar const *yaml_filename ) { +#ifndef WITH_YAML + return; +#else // WITH_YAML FILE *fh = fopen(yaml_filename, "r"); if(fh == NULL) { printf("Failed to open file!\n"); @@ -409,7 +415,7 @@ CmdLineXAction::createActionsFromYAML( gchar const *yaml_filename ) { verb_info_t verb; verb.xverb = true; verb.args = vectorFromString((char *)token.data.scalar.value); - if ((verb.args.size() > 1) && Verb::getbyid((char *)token.data.scalar.value)) + if ((verb.args.size() > 1) && Verb::getbyid((char *)token.data.scalar.value, false)) verb.xverb = false; verbs_list.push_back(verb); } @@ -529,7 +535,7 @@ CmdLineXAction::createActionsFromYAML( gchar const *yaml_filename ) { } fflush(stdout); - return; +#endif // WITH_YAML } -- cgit v1.2.3