Revision: 76412
          http://sourceforge.net/p/brlcad/code/76412
Author:   starseeker
Date:     2020-07-22 12:50:38 +0000 (Wed, 22 Jul 2020)
Log Message:
-----------
Walk through and exec without argument all of the libged commands.

Modified Paths:
--------------
    brlcad/branches/gedplugins/src/libged/help/help.cpp
    brlcad/branches/gedplugins/src/libged/tests/plugins.c

Modified: brlcad/branches/gedplugins/src/libged/help/help.cpp
===================================================================
--- brlcad/branches/gedplugins/src/libged/help/help.cpp 2020-07-22 12:50:10 UTC 
(rev 76411)
+++ brlcad/branches/gedplugins/src/libged/help/help.cpp 2020-07-22 12:50:38 UTC 
(rev 76412)
@@ -235,7 +235,7 @@
 
 
 int
-ged_help(struct ged *gedp, int argc, const char *argv[])
+ged_help_core(struct ged *gedp, int argc, const char *argv[])
 {
     char *dir = NULL;
     char **entries = NULL;
@@ -271,19 +271,19 @@
 #ifdef GED_PLUGIN
 #include "../include/plugin.h"
 extern "C" {
-    struct ged_cmd_impl help_cmd_impl     = { "help",    ged_help, 
GED_CMD_DEFAULT };
+    struct ged_cmd_impl help_cmd_impl     = { "help",    ged_help_core, 
GED_CMD_DEFAULT };
     const struct ged_cmd help_cmd = { &help_cmd_impl };
 
-    struct ged_cmd_impl apropos_cmd_impl  = { "apropos", ged_help, 
GED_CMD_DEFAULT };
+    struct ged_cmd_impl apropos_cmd_impl  = { "apropos", ged_help_core, 
GED_CMD_DEFAULT };
     const struct ged_cmd apropos_cmd = { &apropos_cmd_impl };
 
-    struct ged_cmd_impl info_cmd_impl     = { "info",    ged_help, 
GED_CMD_DEFAULT };
+    struct ged_cmd_impl info_cmd_impl     = { "info",    ged_help_core, 
GED_CMD_DEFAULT };
     const struct ged_cmd info_cmd = { &info_cmd_impl };
 
-    struct ged_cmd_impl man_cmd_impl      = { "man",     ged_help, 
GED_CMD_DEFAULT };
+    struct ged_cmd_impl man_cmd_impl      = { "man",     ged_help_core, 
GED_CMD_DEFAULT };
     const struct ged_cmd man_cmd = { &man_cmd_impl };
 
-    struct ged_cmd_impl question_cmd_impl = { "?",       ged_help, 
GED_CMD_DEFAULT };
+    struct ged_cmd_impl question_cmd_impl = { "?",       ged_help_core, 
GED_CMD_DEFAULT };
     const struct ged_cmd question_cmd = { &question_cmd_impl };
 
     const struct ged_cmd *help_cmds[] = { &help_cmd,  &apropos_cmd,  
&info_cmd,  &man_cmd,  &question_cmd, NULL };

Modified: brlcad/branches/gedplugins/src/libged/tests/plugins.c
===================================================================
--- brlcad/branches/gedplugins/src/libged/tests/plugins.c       2020-07-22 
12:50:10 UTC (rev 76411)
+++ brlcad/branches/gedplugins/src/libged/tests/plugins.c       2020-07-22 
12:50:38 UTC (rev 76412)
@@ -48,6 +48,11 @@
        bu_log("%s\n", ged_cmds[i]);
     }
 
+    for (size_t i = 0; i < ged_cmd_cnt; i++) {
+       bu_log("ged_execing %s\n", ged_cmds[i]);
+       ged_exec(gbp, 1, (const char **)&ged_cmds[i]);
+    }
+
     ged_close(gbp);
     BU_PUT(gbp, struct ged);
     return 0;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to