Revision: 53629
          http://brlcad.svn.sourceforge.net/brlcad/?rev=53629&view=rev
Author:   brlcad
Date:     2012-11-09 17:32:25 +0000 (Fri, 09 Nov 2012)
Log Message:
-----------
few more scanf precision conversions that went uncaught due to them being 
wrapped in our own stdard bu_sscanf function.

Modified Paths:
--------------
    brlcad/trunk/src/libged/edbot.c
    brlcad/trunk/src/libtclcad/tclcad_obj.c

Modified: brlcad/trunk/src/libged/edbot.c
===================================================================
--- brlcad/trunk/src/libged/edbot.c     2012-11-09 17:23:31 UTC (rev 53628)
+++ brlcad/trunk/src/libged/edbot.c     2012-11-09 17:32:25 UTC (rev 53629)
@@ -299,9 +299,12 @@
     struct rt_db_internal intern;
     struct rt_bot_internal *botip;
     mat_t mat;
+    int vi1, vi2;
     vect_t view;
-    int vi1, vi2;
 
+    /* must be double for scanf */
+    double scan[ELEMENTS_PER_VECT];
+
     GED_CHECK_DATABASE_OPEN(gedp, GED_ERROR);
     GED_CHECK_VIEW(gedp, GED_ERROR);
     GED_CHECK_ARGC_GT_0(gedp, argc, GED_ERROR);
@@ -320,10 +323,11 @@
        return GED_ERROR;
     }
 
-    if (bu_sscanf(argv[2], "%lf %lf %lf", &view[X], &view[Y], &view[Z]) != 3) {
+    if (bu_sscanf(argv[2], "%lf %lf %lf", &scan[X], &scan[Y], &scan[Z]) != 3) {
        bu_vls_printf(gedp->ged_result_str, "%s: bad view location - %s", 
argv[0], argv[2]);
        return GED_ERROR;
     }
+    VMOVE(view, scan); /* convert double to fastf_t */
 
     if (wdb_import_from_path2(gedp->ged_result_str, &intern, argv[1], 
gedp->ged_wdbp, mat) == GED_ERROR) {
        bu_vls_printf(gedp->ged_result_str, "%s: failed to find %s", argv[0], 
argv[1]);
@@ -354,9 +358,12 @@
     struct rt_db_internal intern;
     struct rt_bot_internal *botip;
     mat_t mat;
+    int nearest_pt;
     vect_t view;
-    int nearest_pt;
 
+    /* must be double for scanf */
+    double scan[ELEMENTS_PER_VECT];
+
     GED_CHECK_DATABASE_OPEN(gedp, GED_ERROR);
     GED_CHECK_VIEW(gedp, GED_ERROR);
     GED_CHECK_ARGC_GT_0(gedp, argc, GED_ERROR);
@@ -375,7 +382,7 @@
        return GED_ERROR;
     }
 
-    if (bu_sscanf(argv[2], "%lf %lf %lf", &view[X], &view[Y], &view[Z]) != 3) {
+    if (bu_sscanf(argv[2], "%lf %lf %lf", &scan[X], &scan[Y], &scan[Z]) != 3) {
        bu_vls_printf(gedp->ged_result_str, "%s: bad view location - %s", 
argv[0], argv[2]);
        return GED_ERROR;
     }
@@ -465,11 +472,13 @@
     struct rt_db_internal intern;
     struct rt_bot_internal *botip;
     mat_t mat;
-    point_t pt;
     size_t vertex_i;
     int rflag = 0;
     char *last;
 
+    /* must be double for scanf */
+    double pt[ELEMENTS_PER_POINT];
+
     GED_CHECK_DATABASE_OPEN(gedp, GED_ERROR);
     GED_CHECK_ARGC_GT_0(gedp, argc, GED_ERROR);
 
@@ -580,11 +589,13 @@
     struct rt_db_internal intern;
     struct rt_bot_internal *botip;
     mat_t mat;
-    vect_t vec;
     register int i;
     size_t vertex_i;
     char *last;
 
+    /* must be double for scanf */
+    double vec[ELEMENTS_PER_VECT];
+
     GED_CHECK_DATABASE_OPEN(gedp, GED_ERROR);
     GED_CHECK_ARGC_GT_0(gedp, argc, GED_ERROR);
 

Modified: brlcad/trunk/src/libtclcad/tclcad_obj.c
===================================================================
--- brlcad/trunk/src/libtclcad/tclcad_obj.c     2012-11-09 17:23:31 UTC (rev 
53628)
+++ brlcad/trunk/src/libtclcad/tclcad_obj.c     2012-11-09 17:32:25 UTC (rev 
53629)
@@ -1572,7 +1572,7 @@
        }
 
        if (argc == 4) {
-           fastf_t size;
+           double size; /* must be double for scanf */
 
            if (bu_sscanf(argv[3], "%lf", &size) != 1)
                goto bad;
@@ -1594,7 +1594,7 @@
        }
 
        if (argc == 6) {
-           fastf_t x, y, z;
+           double x, y, z; /* must be double for scanf */
 
            if (bu_sscanf(argv[3], "%lf", &x) != 1 ||
                bu_sscanf(argv[4], "%lf", &y) != 1 ||
@@ -2054,9 +2054,12 @@
          const char *usage,
          int UNUSED(maxargs))
 {
+    struct ged_dm_view *gdvp;
     fastf_t bounds[6];
-    struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double scan[6];
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -2095,12 +2098,15 @@
 
     /* set window bounds */
     if (bu_sscanf(argv[2], "%lf %lf %lf %lf %lf %lf",
-              &bounds[0], &bounds[1],
-              &bounds[2], &bounds[3],
-              &bounds[4], &bounds[5]) != 6) {
+              &scan[0], &scan[1],
+              &scan[2], &scan[3],
+              &scan[4], &scan[5]) != 6) {
        bu_vls_printf(gedp->ged_result_str, "%s: invalid bounds - %s", argv[0], 
argv[2]);
        return GED_ERROR;
     }
+    /* convert double to fastf_t */
+    VMOVE(bounds, scan);         /* first point */
+    VMOVE(&bounds[3], &scan[3]); /* second point */
 
     /*
      * Since dm_bound doesn't appear to be used anywhere, I'm going to
@@ -2189,10 +2195,12 @@
                   const char *usage,
                   int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -2253,10 +2261,12 @@
                   const char *usage,
                   int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -2591,11 +2601,10 @@
            gdasp->gdas_num_points = ac;
            gdasp->gdas_points = (point_t *)bu_calloc(ac, sizeof(point_t), 
"data points");
            for (i = 0; i < ac; ++i) {
-               if (bu_sscanf(av[i], "%lf %lf %lf",
-                          &gdasp->gdas_points[i][X],
-                          &gdasp->gdas_points[i][Y],
-                          &gdasp->gdas_points[i][Z]) != 3) {
+               double scan[ELEMENTS_PER_VECT];
 
+               if (bu_sscanf(av[i], "%lf %lf %lf", &scan[X], &scan[Y], 
&scan[Z]) != 3) {
+
                    bu_vls_printf(gedp->ged_result_str, "bad data point - 
%s\n", av[i]);
 
                    bu_free((genptr_t)gdasp->gdas_points, "data points");
@@ -2606,6 +2615,8 @@
                    Tcl_Free((char *)av);
                    return GED_ERROR;
                }
+               /* convert double to fastf_t */
+               VMOVE(gdasp->gdas_points[i], scan);
            }
 
            to_refresh_view(gdvp);
@@ -2784,7 +2795,7 @@
        }
 
        if (argc == 4) {
-           fastf_t size;
+           double size; /* must be double for scanf */
 
            if (bu_sscanf(argv[3], "%lf", &size) != 1)
                goto bad;
@@ -2834,11 +2845,9 @@
            gdasp->gdas_num_points = ac;
            gdasp->gdas_points = (point_t *)bu_calloc(ac, sizeof(point_t), 
"data points");
            for (i = 0; i < ac; ++i) {
-               if (bu_sscanf(av[i], "%lf %lf %lf",
-                          &gdasp->gdas_points[i][X],
-                          &gdasp->gdas_points[i][Y],
-                          &gdasp->gdas_points[i][Z]) != 3) {
+               double scan[3];
 
+               if (bu_sscanf(av[i], "%lf %lf %lf", &scan[X], &scan[Y], 
&scan[Z]) != 3) {
                    bu_vls_printf(gedp->ged_result_str, "bad data point - 
%s\n", av[i]);
 
                    bu_free((genptr_t)gdasp->gdas_points, "data points");
@@ -2849,6 +2858,8 @@
                    Tcl_Free((char *)av);
                    return GED_ERROR;
                }
+               /* convert double to fastf_t */
+               VMOVE(gdasp->gdas_points[i], scan);
            }
 
            to_refresh_view(gdvp);
@@ -3004,6 +3015,7 @@
            for (i = 0; i < ac; ++i) {
                int sub_ac;
                const char **sub_av;
+               double scan[ELEMENTS_PER_VECT];
 
                if (Tcl_SplitList(current_top->to_interp, av[i], &sub_ac, 
&sub_av) != TCL_OK) {
                    /*XXX Need a macro for the following lines. Do something 
similar for the rest. */
@@ -3034,10 +3046,7 @@
                    return GED_ERROR;
                }
 
-               if (bu_sscanf(sub_av[1], "%lf %lf %lf",
-                          &gdlsp->gdls_points[i][X],
-                          &gdlsp->gdls_points[i][Y],
-                          &gdlsp->gdls_points[i][Z]) != 3) {
+               if (bu_sscanf(sub_av[1], "%lf %lf %lf", &scan[X], &scan[Y], 
&scan[Z]) != 3) {
                    bu_vls_printf(gedp->ged_result_str, "bad data point - 
%s\n", sub_av[1]);
 
                    /*XXX Need a macro for the following lines. Do something 
similar for the rest. */
@@ -3052,6 +3061,8 @@
                    to_refresh_view(gdvp);
                    return GED_ERROR;
                }
+               /* convert double to fastf_t */
+               VMOVE(gdlsp->gdls_points[i], scan);
 
                gdlsp->gdls_labels[i] = bu_strdup(sub_av[0]);
                Tcl_Free((char *)sub_av);
@@ -3247,11 +3258,9 @@
            gdlsp->gdls_num_points = ac;
            gdlsp->gdls_points = (point_t *)bu_calloc(ac, sizeof(point_t), 
"data points");
            for (i = 0; i < ac; ++i) {
-               if (bu_sscanf(av[i], "%lf %lf %lf",
-                          &gdlsp->gdls_points[i][X],
-                          &gdlsp->gdls_points[i][Y],
-                          &gdlsp->gdls_points[i][Z]) != 3) {
+               double scan[3];
 
+               if (bu_sscanf(av[i], "%lf %lf %lf", &scan[X], &scan[Y], 
&scan[Z]) != 3) {
                    bu_vls_printf(gedp->ged_result_str, "bad data point - 
%s\n", av[i]);
 
                    bu_free((genptr_t)gdlsp->gdls_points, "data points");
@@ -3262,6 +3271,8 @@
                    Tcl_Free((char *)av);
                    return GED_ERROR;
                }
+               /* convert double to fastf_t */
+               VMOVE(gdlsp->gdls_points[i], scan);
            }
 
            to_refresh_view(gdvp);
@@ -3356,7 +3367,7 @@
        gpp->gp_hole[j] = hole;
 
        for (k = 1; k < point_ac; ++k) {
-           point_t pt;
+           double pt[ELEMENTS_PER_POINT]; /* must be double for scanf */
 
            if (bu_sscanf(point_av[k], "%lf %lf %lf", &pt[X], &pt[Y], &pt[Z]) 
!= 3) {
                bu_vls_printf(gedp->ged_result_str, "contour %zu, point %zu: 
bad data point - %s\n",
@@ -4100,7 +4111,7 @@
      */
     if (BU_STR_EQUAL(argv[2], "append_point")) {
        size_t i, j, k;
-       point_t pt;
+       double pt[ELEMENTS_PER_POINT]; /* must be double for scan */
 
        if (argc != 6)
            goto bad;
@@ -4158,7 +4169,7 @@
      */
     if (BU_STR_EQUAL(argv[2], "replace_point")) {
        size_t i, j, k;
-       point_t pt;
+       double pt[ELEMENTS_PER_POINT];
 
        if (argc != 7)
            goto bad;
@@ -6168,7 +6179,6 @@
 {
     int ret;
     char *av[4];
-    fastf_t x, y;
     fastf_t inv_width;
     fastf_t inv_height;
     fastf_t inv_aspect;
@@ -6177,6 +6187,9 @@
     struct bu_vls pt_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -6252,12 +6265,14 @@
     int ret;
     int ac;
     char *av[4];
-    fastf_t x, y;
     fastf_t dx, dy;
     fastf_t sf;
     struct bu_vls rot_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -6360,13 +6375,15 @@
     int ret;
     int ac;
     char *av[4];
-    fastf_t x, y;
     fastf_t dx, dy;
     fastf_t sf;
     fastf_t inv_width;
     struct bu_vls tran_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -6469,7 +6486,6 @@
                       int UNUSED(maxargs))
 {
     char *av[6];
-    fastf_t x, y;
     fastf_t inv_width;
     fastf_t inv_height;
     fastf_t inv_aspect;
@@ -6477,6 +6493,9 @@
     struct bu_vls pt_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -6538,7 +6557,6 @@
                    int UNUSED(maxargs))
 {
     char *av[6];
-    fastf_t x, y;
     fastf_t inv_width;
     fastf_t inv_height;
     fastf_t inv_aspect;
@@ -6546,6 +6564,9 @@
     struct bu_vls pt_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -6607,7 +6628,6 @@
                     int UNUSED(maxargs))
 {
     char *av[6];
-    fastf_t x, y;
     fastf_t inv_width;
     fastf_t inv_height;
     fastf_t inv_aspect;
@@ -6616,6 +6636,9 @@
     struct bu_vls pt_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -6678,7 +6701,6 @@
 {
     int ret;
     char *av[6];
-    fastf_t x, y;
     fastf_t dx, dy;
     fastf_t inv_width;
     point_t model;
@@ -6687,6 +6709,9 @@
     struct bu_vls pt_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -6774,7 +6799,6 @@
 {
     int ret;
     char *av[6];
-    fastf_t x, y;
     fastf_t dx, dy;
     fastf_t inv_width;
     point_t model;
@@ -6783,6 +6807,9 @@
     struct bu_vls pt_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -6873,7 +6900,6 @@
     int rflag;
     char *av[6];
     const char *cmd;
-    fastf_t x, y;
     fastf_t dx, dy, dz;
     fastf_t inv_width;
     point_t model;
@@ -6882,6 +6908,9 @@
     struct bu_vls pt_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -7058,7 +7087,6 @@
 {
     int ret;
     const char *cmd;
-    fastf_t x, y;
     fastf_t dx, dy, dz;
     fastf_t inv_width;
     point_t model;
@@ -7067,6 +7095,9 @@
     struct bu_vls pt_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -7172,7 +7203,6 @@
 {
     int ret;
     char *av[6];
-    fastf_t x, y;
     fastf_t dx, dy;
     fastf_t inv_width;
     point_t model;
@@ -7181,6 +7211,9 @@
     struct bu_vls pt_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -7266,7 +7299,6 @@
                 const char *usage,
                 int UNUSED(maxargs))
 {
-    fastf_t x, y;
     fastf_t dx, dy;
     point_t model;
     point_t view;
@@ -7276,6 +7308,9 @@
     struct bu_vls rot_z_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -7375,13 +7410,15 @@
                const char *usage,
                int UNUSED(maxargs))
 {
-    fastf_t x, y;
     fastf_t dx, dy;
     fastf_t sf;
     fastf_t inv_width;
     struct bu_vls sf_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -7477,7 +7514,6 @@
                    const char *usage,
                    int UNUSED(maxargs))
 {
-    fastf_t x, y;
     fastf_t dx, dy;
     fastf_t inv_width;
     point_t model;
@@ -7488,6 +7524,9 @@
     struct bu_vls tran_z_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -8147,11 +8186,13 @@
     int ret;
     int ac;
     char *av[4];
-    fastf_t x, y;
     fastf_t dx, dy;
     struct bu_vls rot_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -8234,7 +8275,6 @@
 {
     int ret;
     char *av[6];
-    fastf_t x, y;
     fastf_t dx, dy;
     point_t model;
     point_t view;
@@ -8242,6 +8282,9 @@
     struct bu_vls pt_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -8328,13 +8371,15 @@
 {
     int ret;
     char *av[3];
-    fastf_t x, y;
     fastf_t dx, dy;
     fastf_t sf;
     fastf_t inv_width;
     struct bu_vls zoom_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -8421,7 +8466,6 @@
 {
     int ret;
     char *av[6];
-    fastf_t x, y;
     fastf_t dx, dy;
     point_t model;
     point_t view;
@@ -8429,6 +8473,9 @@
     struct bu_vls mrot_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -8514,13 +8561,15 @@
 {
     int ret;
     char *av[6];
-    fastf_t x, y;
     fastf_t dx, dy;
     fastf_t sf;
     fastf_t inv_width;
     struct bu_vls sf_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -8609,7 +8658,6 @@
 {
     int ret;
     char *av[6];
-    fastf_t x, y;
     fastf_t dx, dy;
     point_t model;
     point_t view;
@@ -8618,6 +8666,9 @@
     struct bu_vls tvec_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -8706,12 +8757,14 @@
     int ret;
     int ac;
     char *av[4];
-    fastf_t x, y;
     fastf_t dx, dy;
     fastf_t inv_width;
     struct bu_vls trans_vls = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -8803,10 +8856,12 @@
                      const char *usage,
                      int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -8862,10 +8917,12 @@
                      const char *usage,
                      int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -8977,10 +9034,12 @@
                   const char *usage,
                   int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -9037,10 +9096,12 @@
                    int UNUSED(maxargs))
 {
     register int i;
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -9131,10 +9192,12 @@
                    const char *usage,
                    int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -9325,10 +9388,12 @@
                const char *usage,
                int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -9382,10 +9447,12 @@
               const char *usage,
               int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -9441,10 +9508,12 @@
                   const char *usage,
                   int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -10516,10 +10585,12 @@
                        const char *usage,
                        int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -10575,10 +10646,12 @@
               const char *usage,
               int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -10738,10 +10811,12 @@
                const char *usage,
                int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -10796,10 +10871,12 @@
               const char *usage,
               int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -10854,10 +10931,12 @@
                   const char *usage,
                   int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -10912,10 +10991,12 @@
              const char *usage,
              int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -10968,7 +11049,6 @@
                const char *usage,
                int UNUSED(maxargs))
 {
-    fastf_t x, y;
     fastf_t inv_width;
     fastf_t inv_height;
     fastf_t inv_aspect;
@@ -10976,6 +11056,9 @@
     point_t model;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -11027,13 +11110,15 @@
               const char *usage,
               int UNUSED(maxargs))
 {
-    fastf_t x, y;
     fastf_t inv_width;
     fastf_t inv_height;
     fastf_t inv_aspect;
     point_t view;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -11193,9 +11278,12 @@
             const char *usage,
             int UNUSED(maxargs))
 {
-    fastf_t vx, vy;
     struct ged_dm_view *gdvp;
+    fastf_t fvx, fvy;
 
+    /* must be double for scanf */
+    double vx, vy;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -11225,15 +11313,18 @@
        bu_vls_printf(gedp->ged_result_str, "Usage: %s %s", argv[0], usage);
        return GED_ERROR;
     }
+    /* convert double to fastf_t */
+    fvx = vx;
+    fvy = vy;
 
     gedp->ged_gvp = gdvp->gdv_view;
     if (!gedp->ged_gvp->gv_grid.ggs_snap) {
-       bu_vls_printf(gedp->ged_result_str, "%lf %lf", vx, vy);
+       bu_vls_printf(gedp->ged_result_str, "%lf %lf", fvx, fvy);
        return GED_OK;
     }
 
-    ged_snap_to_grid(gedp, &vx, &vy);
-    bu_vls_printf(gedp->ged_result_str, "%lf %lf", vx, vy);
+    ged_snap_to_grid(gedp, &fvx, &fvy);
+    bu_vls_printf(gedp->ged_result_str, "%lf %lf", fvx, fvy);
 
     return GED_OK;
 }
@@ -11311,10 +11402,12 @@
                  const char *usage,
                  int UNUSED(maxargs))
 {
-    fastf_t x, y;
     struct bu_vls bindings = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double x, y;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -11578,9 +11671,11 @@
 {
     fastf_t x, y;
     fastf_t aspect;
-    point_t view;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double view[ELEMENTS_PER_POINT];
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -11699,12 +11794,14 @@
     int ret;
     int ac;
     char *av[3];
-    fastf_t xpos1, ypos1;
     fastf_t xpos2, ypos2;
     fastf_t sf;
     struct bu_vls slew_vec = BU_VLS_INIT_ZERO;
     struct ged_dm_view *gdvp;
 
+    /* must be double for scanf */
+    double xpos1, ypos1;
+
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 

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


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to