Revision: 72315 http://sourceforge.net/p/brlcad/code/72315 Author: starseeker Date: 2019-02-01 19:37:39 +0000 (Fri, 01 Feb 2019) Log Message: ----------- Make ps command in MGED list running subprocesses like the Unix 'ps' command. For the next release or two lead off with a note about the rename of what is now the postscript command. Not sure this is quite ready to announce yet as a command, but initial testing looks OK.
Modified Paths: -------------- brlcad/trunk/src/mged/cmd.c brlcad/trunk/src/mged/cmd.h brlcad/trunk/src/mged/setup.c Modified: brlcad/trunk/src/mged/cmd.c =================================================================== --- brlcad/trunk/src/mged/cmd.c 2019-02-01 19:29:47 UTC (rev 72314) +++ brlcad/trunk/src/mged/cmd.c 2019-02-01 19:37:39 UTC (rev 72315) @@ -1950,6 +1950,23 @@ return TCL_OK; } +int +cmd_ps(ClientData UNUSED(clientData), + Tcl_Interp *interpreter, + int UNUSED(argc), + const char **UNUSED(argv)) +{ + int ret = 0; + const char *av[3]; + av[0] = "process"; + av[1] = "list"; + av[2] = '\0'; + ret = ged_process(gedp, 2, (const char **)av); + /* For the next couple releases, print a rename notice */ + Tcl_AppendResult(interpreter, "(Note: former 'ps' command has been renamed to 'postscript')\n", NULL); + Tcl_AppendResult(interpreter, bu_vls_addr(gedp->ged_result_str), NULL); + return (ret) ? TCL_ERROR : TCL_OK; +} int cmd_stub(ClientData UNUSED(clientData), Tcl_Interp *UNUSED(interpreter), int argc, const char *argv[]) Modified: brlcad/trunk/src/mged/cmd.h =================================================================== --- brlcad/trunk/src/mged/cmd.h 2019-02-01 19:29:47 UTC (rev 72314) +++ brlcad/trunk/src/mged/cmd.h 2019-02-01 19:37:39 UTC (rev 72315) @@ -77,6 +77,7 @@ extern int cmd_oed(ClientData, Tcl_Interp *, int, const char *[]); extern int cmd_output_hook(ClientData, Tcl_Interp *, int, const char *[]); extern int cmd_overlay(ClientData, Tcl_Interp *, int, const char *[]); +extern int cmd_ps(ClientData, Tcl_Interp *, int, const char *[]); extern int cmd_put(ClientData, Tcl_Interp *, int, const char *[]); extern int cmd_rot(ClientData, Tcl_Interp *, int, const char *[]); extern int cmd_rrt(ClientData, Tcl_Interp *, int, const char *[]); Modified: brlcad/trunk/src/mged/setup.c =================================================================== --- brlcad/trunk/src/mged/setup.c 2019-02-01 19:29:47 UTC (rev 72314) +++ brlcad/trunk/src/mged/setup.c 2019-02-01 19:37:39 UTC (rev 72315) @@ -261,6 +261,7 @@ {"preview", cmd_ged_dm_wrapper, ged_preview}, {"process", cmd_ged_plain_wrapper, ged_process}, {"postscript", f_postscript, GED_FUNC_PTR_NULL}, + {"ps", cmd_ps, GED_FUNC_PTR_NULL}, {"pull", cmd_ged_plain_wrapper, ged_pull}, {"push", cmd_ged_plain_wrapper, ged_push}, {"put", cmd_ged_plain_wrapper, ged_put}, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits