@@ -1064,8 +1064,7 @@ ged_scale_args(struct ged *gedp, int argc, const char *argv[], fastf_t *sf1, fas
1064
1064
size_t
1065
1065
ged_who_argc (struct ged *gedp)
1066
1066
{
1067
- const char *cmd2 = getenv (" GED_TEST_NEW_CMD_FORMS" );
1068
- if (BU_STR_EQUAL (cmd2, " 1" )) {
1067
+ if (gedp->new_cmd_forms ) {
1069
1068
if (!gedp || !gedp->ged_gvp || !gedp->dbi_state )
1070
1069
return 0 ;
1071
1070
BViewState *bvs = gedp->dbi_state ->get_view_state (gedp->ged_gvp );
@@ -1100,9 +1099,10 @@ int
1100
1099
ged_who_argv (struct ged *gedp, char **start, const char **end)
1101
1100
{
1102
1101
char **vp = start;
1103
- const char *cmd2 = getenv (" GED_TEST_NEW_CMD_FORMS" );
1104
- if (BU_STR_EQUAL (cmd2, " 1" )) {
1105
- if (!gedp || !gedp->ged_gvp || !gedp->dbi_state )
1102
+ if (!gedp)
1103
+ return 0 ;
1104
+ if (gedp->new_cmd_forms ) {
1105
+ if (!gedp->ged_gvp || !gedp->dbi_state )
1106
1106
return 0 ;
1107
1107
BViewState *bvs = gedp->dbi_state ->get_view_state (gedp->ged_gvp );
1108
1108
if (bvs) {
@@ -1427,8 +1427,7 @@ _ged_rt_set_eye_model(struct ged *gedp,
1427
1427
extremum[1 ][i] = -INFINITY;
1428
1428
}
1429
1429
1430
- const char *cmd2 = getenv (" GED_TEST_NEW_CMD_FORMS" );
1431
- if (BU_STR_EQUAL (cmd2, " 1" )) {
1430
+ if (gedp->new_cmd_forms ) {
1432
1431
VSETALL (extremum[0 ], INFINITY);
1433
1432
VSETALL (extremum[1 ], -INFINITY);
1434
1433
struct bu_ptbl *db_objs = bv_view_objs (gedp->ged_gvp , BV_DB_OBJS);
@@ -1578,16 +1577,16 @@ ged_rt_output_handler_helper(struct ged_subprocess* rrtp, bu_process_io_t type)
1578
1577
void
1579
1578
_ged_rt_output_handler (void *clientData, int mask)
1580
1579
{
1581
- const char *cmd2 = getenv (" GED_TEST_NEW_CMD_FORMS" );
1582
- if (BU_STR_EQUAL (cmd2, " 1" )) {
1583
- _ged_rt_output_handler2 (clientData, mask);
1584
- return ;
1585
- }
1586
1580
struct ged_subprocess *rrtp = (struct ged_subprocess *)clientData;
1587
-
1588
1581
if ((rrtp == (struct ged_subprocess *)NULL ) || (rrtp->gedp == (struct ged *)NULL ))
1589
1582
return ;
1590
1583
1584
+ struct ged *gedp = rrtp->gedp ;
1585
+ if (gedp->new_cmd_forms ) {
1586
+ _ged_rt_output_handler2 (clientData, mask);
1587
+ return ;
1588
+ }
1589
+
1591
1590
BU_CKMAG (rrtp, GED_CMD_MAGIC, " ged subprocess" );
1592
1591
1593
1592
/* Get data from rt */
@@ -1597,7 +1596,6 @@ _ged_rt_output_handler(void *clientData, int mask)
1597
1596
return ;
1598
1597
1599
1598
int retcode = 0 ;
1600
- struct ged *gedp = rrtp->gedp ;
1601
1599
1602
1600
/* Either EOF has been sent or there was a read error.
1603
1601
* there is no need to block indefinitely */
@@ -1721,8 +1719,7 @@ _ged_rt_write(struct ged *gedp,
1721
1719
* remove the -1 case.) */
1722
1720
if (argc >= 0 ) {
1723
1721
if (!argc) {
1724
- const char *cmd2 = getenv (" GED_TEST_NEW_CMD_FORMS" );
1725
- if (BU_STR_EQUAL (cmd2, " 1" )) {
1722
+ if (gedp->new_cmd_forms ) {
1726
1723
BViewState *bvs = gedp->dbi_state ->get_view_state (gedp->ged_gvp );
1727
1724
if (bvs) {
1728
1725
std::vector<std::string> drawn_paths = bvs->list_drawn_paths (-1 , true );
0 commit comments