Revision: 76914
http://sourceforge.net/p/brlcad/code/76914
Author: starseeker
Date: 2020-08-24 13:17:35 +0000 (Mon, 24 Aug 2020)
Log Message:
-----------
More adjustments to dm_get_pathname calls
Modified Paths:
--------------
brlcad/trunk/src/libtclcad/tclcad_polygons.c
Modified: brlcad/trunk/src/libtclcad/tclcad_polygons.c
===================================================================
--- brlcad/trunk/src/libtclcad/tclcad_polygons.c 2020-08-24 13:11:04 UTC
(rev 76913)
+++ brlcad/trunk/src/libtclcad/tclcad_polygons.c 2020-08-24 13:17:35 UTC
(rev 76914)
@@ -1146,12 +1146,13 @@
argv[1] = argv[0];
ret = to_poly_circ_mode_func(current_top->to_interp, gedp, gdvp, argc-1,
argv+1, usage);
- if (dm_get_pathname((struct dm *)gdvp->dmp)) {
+ struct bu_vls *pathname = dm_get_pathname((struct dm *)gdvp->dmp);
+ if (pathname && bu_vls_strlen(pathname)) {
bu_vls_printf(&bindings, "bind %s <Motion> {%s mouse_poly_circ %s %%x
%%y}",
- bu_vls_addr(dm_get_pathname((struct dm *)gdvp->dmp)),
- bu_vls_addr(¤t_top->to_gedp->go_name),
- bu_vls_addr(&gdvp->gv_name));
- Tcl_Eval(current_top->to_interp, bu_vls_addr(&bindings));
+ bu_vls_cstr(pathname),
+ bu_vls_cstr(¤t_top->to_gedp->go_name),
+ bu_vls_cstr(&gdvp->gv_name));
+ Tcl_Eval(current_top->to_interp, bu_vls_cstr(&bindings));
}
bu_vls_free(&bindings);
@@ -1308,12 +1309,13 @@
(void)to_data_polygons_func(interp, gedp, gdvp, ac, (const char **)av);
bu_vls_free(&plist);
- if (doBind && dm_get_pathname((struct dm *)gdvp->dmp)) {
+ struct bu_vls *pathname = dm_get_pathname((struct dm *)gdvp->dmp);
+ if (doBind && pathname && bu_vls_strlen(pathname)) {
bu_vls_printf(&bindings, "bind %s <Motion> {%s mouse_poly_cont %s
%%x %%y}",
- bu_vls_addr(dm_get_pathname((struct dm *)gdvp->dmp)),
- bu_vls_addr(¤t_top->to_gedp->go_name),
- bu_vls_addr(&gdvp->gv_name));
- Tcl_Eval(interp, bu_vls_addr(&bindings));
+ bu_vls_cstr(pathname),
+ bu_vls_cstr(¤t_top->to_gedp->go_name),
+ bu_vls_cstr(&gdvp->gv_name));
+ Tcl_Eval(interp, bu_vls_cstr(&bindings));
}
bu_vls_free(&bindings);
} else {
@@ -1577,12 +1579,13 @@
argv[1] = argv[0];
ret = to_poly_ell_mode_func(current_top->to_interp, gedp, gdvp, argc-1,
argv+1, usage);
- if (dm_get_pathname((struct dm *)gdvp->dmp)) {
+ struct bu_vls *pathname = dm_get_pathname((struct dm *)gdvp->dmp);
+ if (pathname && bu_vls_strlen(pathname)) {
bu_vls_printf(&bindings, "bind %s <Motion> {%s mouse_poly_ell %s %%x
%%y}",
- bu_vls_addr(dm_get_pathname((struct dm *)gdvp->dmp)),
- bu_vls_addr(¤t_top->to_gedp->go_name),
- bu_vls_addr(&gdvp->gv_name));
- Tcl_Eval(current_top->to_interp, bu_vls_addr(&bindings));
+ bu_vls_cstr(pathname),
+ bu_vls_cstr(¤t_top->to_gedp->go_name),
+ bu_vls_cstr(&gdvp->gv_name));
+ Tcl_Eval(current_top->to_interp, bu_vls_cstr(&bindings));
}
bu_vls_free(&bindings);
@@ -1733,12 +1736,13 @@
argv[1] = argv[0];
ret = to_poly_rect_mode_func(current_top->to_interp, gedp, gdvp, argc-1,
argv+1, usage);
- if (dm_get_pathname((struct dm *)gdvp->dmp)) {
+ struct bu_vls *pathname = dm_get_pathname((struct dm *)gdvp->dmp);
+ if (pathname && bu_vls_strlen(pathname)) {
bu_vls_printf(&bindings, "bind %s <Motion> {%s mouse_poly_rect %s %%x
%%y}",
- bu_vls_addr(dm_get_pathname((struct dm *)gdvp->dmp)),
- bu_vls_addr(¤t_top->to_gedp->go_name),
- bu_vls_addr(&gdvp->gv_name));
- Tcl_Eval(current_top->to_interp, bu_vls_addr(&bindings));
+ bu_vls_cstr(pathname),
+ bu_vls_cstr(¤t_top->to_gedp->go_name),
+ bu_vls_cstr(&gdvp->gv_name));
+ Tcl_Eval(current_top->to_interp, bu_vls_cstr(&bindings));
}
bu_vls_free(&bindings);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits