From 7ada0b665433d5eec84993f35ac5a6b8f934bfca Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Tue, 18 Jan 2011 15:55:42 -0800 Subject: have caller handle edit level for context diff --- src/cnode/cnode-algorithm.cpp | 7 ++++--- src/cnode/cnode-algorithm.hpp | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/cnode') diff --git a/src/cnode/cnode-algorithm.cpp b/src/cnode/cnode-algorithm.cpp index 526a218..fbb26e9 100644 --- a/src/cnode/cnode-algorithm.cpp +++ b/src/cnode/cnode-algorithm.cpp @@ -820,7 +820,8 @@ _print_cmds_list(const char *op, vector >& list) ////// algorithms void -cnode::show_cfg_diff(const CfgNode& cfg1, const CfgNode& cfg2, bool show_def, +cnode::show_cfg_diff(const CfgNode& cfg1, const CfgNode& cfg2, + vector& cur_path, bool show_def, bool hide_secret, bool context_diff) { if (cfg1.isInvalid() || cfg2.isInvalid()) { @@ -832,14 +833,14 @@ cnode::show_cfg_diff(const CfgNode& cfg1, const CfgNode& cfg2, bool show_def, printf("Configuration under specified path is empty\n"); return; } - vector cur_path; _show_diff(&cfg1, &cfg2, -1, cur_path, show_def, hide_secret, context_diff); } void cnode::show_cfg(const CfgNode& cfg, bool show_def, bool hide_secret) { - show_cfg_diff(cfg, cfg, show_def, hide_secret); + vector cur_path; + show_cfg_diff(cfg, cfg, cur_path, show_def, hide_secret); } void diff --git a/src/cnode/cnode-algorithm.hpp b/src/cnode/cnode-algorithm.hpp index 8837054..4b1ec2f 100644 --- a/src/cnode/cnode-algorithm.hpp +++ b/src/cnode/cnode-algorithm.hpp @@ -22,6 +22,7 @@ namespace cnode { void show_cfg_diff(const CfgNode& cfg1, const CfgNode& cfg2, + vector& cur_path, bool show_def = false, bool hide_secret = false, bool context_diff = false); void show_cfg(const CfgNode& cfg, bool show_def = false, -- cgit v1.2.3