yanglint FEATURE extdata cmd for interactive mode

Implementation of --ext-data parameter for interactive yanglint mode.
diff --git a/tools/lint/cmd.c b/tools/lint/cmd.c
index 93994c7..885b689 100644
--- a/tools/lint/cmd.c
+++ b/tools/lint/cmd.c
@@ -90,6 +90,18 @@
 #endif
 
 void
+cmd_free(void)
+{
+    uint16_t i;
+
+    for (i = 0; commands[i].name; i++) {
+        if (commands[i].free_func) {
+            commands[i].free_func();
+        }
+    }
+}
+
+void
 cmd_verb_help(void)
 {
     printf("Usage: verb (error | warning | verbose | debug)\n");
@@ -239,22 +251,23 @@
 
 /* Also keep enum COMMAND_INDEX updated. */
 COMMAND commands[] = {
-    {"help", cmd_help, cmd_help_help, "Display commands description", "h"},
-    {"add", cmd_add, cmd_add_help, "Add a new module from a specific file", "DF:hi"},
-    {"load", cmd_load, cmd_load_help, "Load a new schema from the searchdirs", "F:hi"},
-    {"print", cmd_print, cmd_print_help, "Print a module", "f:hL:o:P:q"},
-    {"data", cmd_data, cmd_data_help, "Load, validate and optionally print instance data", "d:ef:F:hmo:O:R:r:nt:x:"},
-    {"list", cmd_list, cmd_list_help, "List all the loaded modules", "f:h"},
-    {"feature", cmd_feature, cmd_feature_help, "Print all features of module(s) with their state", "haf"},
-    {"searchpath", cmd_searchpath, cmd_searchpath_help, "Print/set the search path(s) for schemas", "ch"},
-    {"clear", cmd_clear, cmd_clear_help, "Clear the context - remove all the loaded modules", "iyh"},
-    {"verb", cmd_verb, cmd_verb_help, "Change verbosity", "h"},
+    {"help", cmd_help, cmd_help_help, NULL, "Display commands description", "h"},
+    {"add", cmd_add, cmd_add_help, NULL, "Add a new module from a specific file", "DF:hi"},
+    {"load", cmd_load, cmd_load_help, NULL, "Load a new schema from the searchdirs", "F:hi"},
+    {"print", cmd_print, cmd_print_help, NULL, "Print a module", "f:hL:o:P:q"},
+    {"data", cmd_data, cmd_data_help, NULL, "Load, validate and optionally print instance data", "d:ef:F:hmo:O:R:r:nt:x:"},
+    {"list", cmd_list, cmd_list_help, NULL, "List all the loaded modules", "f:h"},
+    {"feature", cmd_feature, cmd_feature_help, NULL, "Print all features of module(s) with their state", "haf"},
+    {"searchpath", cmd_searchpath, cmd_searchpath_help, NULL, "Print/set the search path(s) for schemas", "ch"},
+    {"extdata", cmd_extdata, cmd_extdata_help, cmd_extdata_free, "Set the specific data required by an extension", "ch"},
+    {"clear", cmd_clear, cmd_clear_help, NULL, "Clear the context - remove all the loaded modules", "iyh"},
+    {"verb", cmd_verb, cmd_verb_help, NULL, "Change verbosity", "h"},
 #ifndef NDEBUG
-    {"debug", cmd_debug, cmd_debug_help, "Display specific debug message groups", "h"},
+    {"debug", cmd_debug, cmd_debug_help, NULL, "Display specific debug message groups", "h"},
 #endif
-    {"quit", cmd_quit, NULL, "Quit the program", "h"},
+    {"quit", cmd_quit, NULL, NULL, "Quit the program", "h"},
     /* synonyms for previous commands */
-    {"?", cmd_help, NULL, "Display commands description", "h"},
-    {"exit", cmd_quit, NULL, "Quit the program", "h"},
-    {NULL, NULL, NULL, NULL, NULL}
+    {"?", cmd_help, NULL, NULL, "Display commands description", "h"},
+    {"exit", cmd_quit, NULL, NULL, "Quit the program", "h"},
+    {NULL, NULL, NULL, NULL, NULL, NULL}
 };