Revision: 53398
http://brlcad.svn.sourceforge.net/brlcad/?rev=53398&view=rev
Author: brlcad
Date: 2012-10-30 01:48:52 +0000 (Tue, 30 Oct 2012)
Log Message:
-----------
set the stage for distinguishing between a double-precision structparse and a
fastf_t, which may be single or double precision. almost without exception,
most of the existing callers use %f for fastf_t so add %g for doubles.
Modified Paths:
--------------
brlcad/trunk/include/bu.h
Modified: brlcad/trunk/include/bu.h
===================================================================
--- brlcad/trunk/include/bu.h 2012-10-30 01:44:49 UTC (rev 53397)
+++ brlcad/trunk/include/bu.h 2012-10-30 01:48:52 UTC (rev 53398)
@@ -2121,10 +2121,11 @@
char str[32];
short a_short;
int a_int;
+ fastf_t a_fastf_t;
double a_double;
}
- struct data_structure default = { 'c', "the default string", 32767, 1, 1.0 };
+ struct data_structure default = { 'c', "the default string", 32767, 1, 1.0,
1.0 };
struct data_structure my_values;
@@ -2133,7 +2134,8 @@
{"%s", 32, "str", bu_offsetofarray(data_structure, str),
BU_STRUCTPARSE_FUNC_NULL, "This is a full character string",
(void*)default.str},
{"%i", 1, "a_short", bu_offsetof(data_structure, a_short),
BU_STRUCTPARSE_FUNC_NULL, "A 16bit integer",
(void*)&default.a_short},
{"%d", 1, "a_int", bu_offsetof(data_structure, a_int),
BU_STRUCTPARSE_FUNC_NULL, "A full integer",
(void*)&default.a_int},
- {"%f", 1, "a_double", bu_offsetof(data_structure, a_double),
BU_STRUCTPARSE_FUNC_NULL, "A double-precision floating point value",
(void*)&default.a_double},
+ {"%f", 1, "a_fastf_t", bu_offsetof(data_structure, a_fastf_t),
BU_STRUCTPARSE_FUNC_NULL, "A variable-precision fasf_t floating point value",
(void*)&default.a_fastf_t},
+ {"%g", 1, "a_double", bu_offsetof(data_structure, a_double),
BU_STRUCTPARSE_FUNC_NULL, "A double-precision fasf_t floating point value",
(void*)&default.a_double},
{ "", 0, (char *)NULL, 0,
BU_STRUCTPARSE_FUNC_NULL, (char *)NULL, (void
*)NULL}
};
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_sfd2d_oct
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits