From 9bf31c356898a8ab43de2a7bb76126d7441407eb Mon Sep 17 00:00:00 2001 From: Clifford Yapp <238416+starseeker@users.noreply.github.com> Date: Tue, 29 Aug 2023 15:54:59 -0400 Subject: [PATCH] open_db -> opendb, close_db -> closedb --- src/libged/close/close.cpp | 2 +- src/libged/garbage_collect/garbage_collect.cpp | 12 ++++++------ src/libged/ged.cpp | 3 +++ src/libged/open/open.cpp | 2 +- src/libged/tests/draw/draw.cpp | 4 ++-- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/libged/close/close.cpp b/src/libged/close/close.cpp index 199047b53ff..fe5f06c2fc2 100644 --- a/src/libged/close/close.cpp +++ b/src/libged/close/close.cpp @@ -81,7 +81,7 @@ extern "C" { #ifdef GED_PLUGIN #include "../include/plugin.h" -struct ged_cmd_impl close_cmd_impl = {"close_db", ged_close_core, GED_CMD_DEFAULT}; +struct ged_cmd_impl close_cmd_impl = {"closedb", ged_close_core, GED_CMD_DEFAULT}; const struct ged_cmd close_cmd = { &close_cmd_impl }; const struct ged_cmd *close_cmds[] = { &close_cmd, NULL }; diff --git a/src/libged/garbage_collect/garbage_collect.cpp b/src/libged/garbage_collect/garbage_collect.cpp index 504e90fcf84..7685a094cc0 100644 --- a/src/libged/garbage_collect/garbage_collect.cpp +++ b/src/libged/garbage_collect/garbage_collect.cpp @@ -232,11 +232,11 @@ ged_garbage_collect_core(struct ged *gedp, int argc, const char *argv[]) // If we got this far, we need to close the current database, open the new // one, and verify the data - av[0] = "close_db"; + av[0] = "closedb"; av[1] = NULL; ged_exec(gedp, 1, (const char **)av); - - av[0] = "open_db"; +bu_exit(-1, "done"); + av[0] = "opendb"; av[1] = bu_vls_cstr(&working_file); av[2] = NULL; if (ged_exec(gedp, 2, (const char **)av) != BRLCAD_OK) { @@ -273,14 +273,14 @@ ged_garbage_collect_core(struct ged *gedp, int argc, const char *argv[]) } if (ret == BRLCAD_ERROR) { bu_vls_printf(gedp->ged_result_str, "ERROR: %s has incorrect data! Something is very wrong. Aborting garbage collect, database unchanged\n", bu_vls_cstr(&working_file)); - av[0] = "close_db"; + av[0] = "closedb"; av[1] = NULL; ged_exec(gedp, 1, (const char **)av); goto gc_cleanup; } // Done verifying - av[0] = "close_db"; + av[0] = "closedb"; av[1] = NULL; ged_exec(gedp, 1, (const char **)av); @@ -314,7 +314,7 @@ ged_garbage_collect_core(struct ged *gedp, int argc, const char *argv[]) } // Open the renamed, garbage collected file - av[0] = "open_db"; + av[0] = "opendb"; av[1] = bu_vls_cstr(&fpath); av[2] = NULL; if (ged_exec(gedp, 2, (const char **)av) != BRLCAD_OK) { diff --git a/src/libged/ged.cpp b/src/libged/ged.cpp index 85428d1a763..52395270baf 100644 --- a/src/libged/ged.cpp +++ b/src/libged/ged.cpp @@ -196,6 +196,9 @@ ged_init(struct ged *gedp) gedp->fbs_open_client_handler = NULL; gedp->fbs_close_client_handler = NULL; + gedp->ged_opendb_callback = NULL; + gedp->ged_closedb_callback = NULL; + gedp->ged_subprocess_init_callback = NULL; gedp->ged_subprocess_end_callback = NULL; diff --git a/src/libged/open/open.cpp b/src/libged/open/open.cpp index 229458fe777..15a529a5234 100644 --- a/src/libged/open/open.cpp +++ b/src/libged/open/open.cpp @@ -140,7 +140,7 @@ extern "C" { struct ged_cmd_impl reopen_cmd_impl = {"reopen", ged_reopen_core, GED_CMD_DEFAULT}; const struct ged_cmd reopen_cmd = { &reopen_cmd_impl }; -struct ged_cmd_impl open_cmd_impl = {"open_db", ged_reopen_core, GED_CMD_DEFAULT}; +struct ged_cmd_impl open_cmd_impl = {"opendb", ged_reopen_core, GED_CMD_DEFAULT}; const struct ged_cmd open_cmd = { &open_cmd_impl }; diff --git a/src/libged/tests/draw/draw.cpp b/src/libged/tests/draw/draw.cpp index d0bb6cb1a97..d4a94ccc6f7 100644 --- a/src/libged/tests/draw/draw.cpp +++ b/src/libged/tests/draw/draw.cpp @@ -719,7 +719,7 @@ main(int ac, char *av[]) { // Done with moss.g - s_av[0] = "close_db"; + s_av[0] = "closedb"; s_av[1] = NULL; ged_exec(dbp, 1, s_av); bu_file_delete("moss_tmp.g"); @@ -727,7 +727,7 @@ main(int ac, char *av[]) { /* The rook model is a more appropriate test case for mode 3, since its * wireframe is dramatically different when evaluated.*/ bu_vls_sprintf(&fname, "%s/rook.g", av[1]); - s_av[0] = "open_db"; + s_av[0] = "opendb"; s_av[1] = bu_vls_cstr(&fname); s_av[2] = NULL; ged_exec(dbp, 2, s_av);