#endif
#include "command.h"
-#include "memory_vty.h"
#include "graph.h"
#include "linklist.h"
#include "command_match.h"
/** headers **/
void grammar_sandbox_init(void);
-void pretty_print_graph(struct vty *vty, struct graph_node *, int, int,
- struct graph_node **, size_t);
-void init_cmdgraph(struct vty *, struct graph **);
+static void pretty_print_graph(struct vty *vty, struct graph_node *, int, int,
+ struct graph_node **, size_t);
+static void init_cmdgraph(struct vty *, struct graph **);
/** shim interface commands **/
-struct graph *nodegraph = NULL, *nodegraph_free = NULL;
+static struct graph *nodegraph = NULL, *nodegraph_free = NULL;
#define check_nodegraph() \
do { \
if (!nodegraph)
continue;
vty_out(vty, "scanning node %d (%s)\n", scannode - 1,
- node_names[scannode - 1]);
+ cnode->name);
}
commands = cmd_graph_permutations(nodegraph);
* @param start the node to take as the root
* @param level indent level for recursive calls, always pass 0
*/
-void pretty_print_graph(struct vty *vty, struct graph_node *start, int level,
- int desc, struct graph_node **stack, size_t stackpos)
+static void pretty_print_graph(struct vty *vty, struct graph_node *start,
+ int level, int desc, struct graph_node **stack,
+ size_t stackpos)
{
// print this node
char tokennum[32];
}
/** stuff that should go in command.c + command.h */
-void init_cmdgraph(struct vty *vty, struct graph **graph)
+static void init_cmdgraph(struct vty *vty, struct graph **graph)
{
// initialize graph, add start noe
*graph = graph_new();