Revision: 41559
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41559&view=rev
Author:   brlcad
Date:     2010-12-08 00:14:09 +0000 (Wed, 08 Dec 2010)

Log Message:
-----------
inline the call to _ged_setup_rt().  no logic change.

Modified Paths:
--------------
    brlcad/trunk/src/libged/preview.c

Modified: brlcad/trunk/src/libged/preview.c
===================================================================
--- brlcad/trunk/src/libged/preview.c   2010-12-08 00:06:26 UTC (rev 41558)
+++ brlcad/trunk/src/libged/preview.c   2010-12-08 00:14:09 UTC (rev 41559)
@@ -197,24 +197,6 @@
 }
 
 
-void
-_ged_setup_rt(struct ged *gedp, char **vp, int printcmd)
-{
-    _ged_current_gedp->ged_gdp->gd_rt_cmd_len = vp - 
_ged_current_gedp->ged_gdp->gd_rt_cmd;
-    _ged_current_gedp->ged_gdp->gd_rt_cmd_len += ged_build_tops(gedp, 
-                                                               vp, 
&_ged_current_gedp->ged_gdp->gd_rt_cmd[MAXARGS]);
-
-    if (printcmd) {
-       /* Print out the command we are about to run */
-       vp = &_ged_current_gedp->ged_gdp->gd_rt_cmd[0];
-       while (*vp)
-           bu_vls_printf(&gedp->ged_result_str, "%s ", *vp++);
-
-       bu_vls_printf(&gedp->ged_result_str, "\n");
-    }
-}
-
-
 struct command_tab ged_preview_cmdtab[] = {
     {"start", "frame number", "start a new frame",
      ged_cm_start,     2, 2},
@@ -263,11 +245,14 @@
 int
 ged_preview(struct ged *gedp, int argc, const char *argv[])
 {
+    static const char *usage = "[-v] [-d sec_delay] [-D start frame] [-K last 
frame] rt_script_file";
+
     FILE *fp;
     char *cmd;
     int c;
     vect_t temp;
-    static const char *usage = "[-v] [-d sec_delay] [-D start frame] [-K last 
frame] rt_script_file";
+    char **vp;
+    const char *argv0 = NULL;
 
     GED_CHECK_DATABASE_OPEN(gedp, GED_ERROR);
     GED_CHECK_DRAWABLE(gedp, GED_ERROR);
@@ -292,6 +277,7 @@
     preview_desiredframe = 0;
     preview_finalframe = 0;
     _ged_current_gedp = gedp;
+    argv0 = argv[0]; /* temp stash */
 
     /* Parse options */
     bu_optind = 1;                     /* re-init bu_getopt() */
@@ -330,8 +316,18 @@
     }
 
     /* Build list of top-level objects in view, in 
_ged_current_gedp->ged_gdp->gd_rt_cmd[] */
-    _ged_setup_rt(gedp, _ged_current_gedp->ged_gdp->gd_rt_cmd, 1);
+    vp = _ged_current_gedp->ged_gdp->gd_rt_cmd;
+    _ged_current_gedp->ged_gdp->gd_rt_cmd_len = vp - 
_ged_current_gedp->ged_gdp->gd_rt_cmd;
+    _ged_current_gedp->ged_gdp->gd_rt_cmd_len += ged_build_tops(gedp, 
+                                                               vp, 
&_ged_current_gedp->ged_gdp->gd_rt_cmd[MAXARGS]);
 
+    /* Print out the command we are about to run */
+    vp = &_ged_current_gedp->ged_gdp->gd_rt_cmd[0];
+    while (*vp)
+       bu_vls_printf(&gedp->ged_result_str, "%s ", *vp++);
+    
+    bu_vls_printf(&gedp->ged_result_str, "\n");
+
     preview_vbp = rt_vlblock_init();
 
     bu_vls_printf(&gedp->ged_result_str, "eyepoint at (0, 0, 1) viewspace\n");


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

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to