Skip to content

If called from external with -Vi or lower, print command string #4131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/gmt_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -11034,6 +11034,12 @@ int GMT_Call_Module (void *V_API, const char *module, int mode, void *args) {
else { /* Call the function and pass back its return value */
gmt_manage_workflow (API, GMT_USE_WORKFLOW, NULL); /* First detect and set modern mode if modern mode session dir is found */
gmtapi_check_for_modern_oneliner (API, module, mode, args); /* If a modern mode one-liner we must switch run--mode here */
if (API->external && gmt_M_is_verbose (API->GMT, GMT_MSG_DEBUG)) {
/* For externals only, print the equivalent command-line string under -Vd */
char *text = (mode == GMT_MODULE_OPT) ? GMT_Create_Cmd (API, args) : args;
GMT_Report (API, GMT_MSG_DEBUG, "GMT_Call_Command string: %s %s\n", module, text);
if (mode == GMT_MODULE_OPT) GMT_Destroy_Cmd (API, &text);
}
status = (*p_func) (V_API, mode, args); /* Call the module in peace */
}
return (status);
Expand Down