Revision: 54067
http://brlcad.svn.sourceforge.net/brlcad/?rev=54067&view=rev
Author: brlcad
Date: 2012-12-14 19:30:17 +0000 (Fri, 14 Dec 2012)
Log Message:
-----------
the fclose() isn't particularly optional on windows as the program will still
have a file handle open
Modified Paths:
--------------
brlcad/trunk/include/bu.h
Modified: brlcad/trunk/include/bu.h
===================================================================
--- brlcad/trunk/include/bu.h 2012-12-14 18:59:23 UTC (rev 54066)
+++ brlcad/trunk/include/bu.h 2012-12-14 19:30:17 UTC (rev 54067)
@@ -1178,7 +1178,7 @@
* TODO: If used pervasively, it should eventually be possible to make
* fastf_t a GMP C++ type for fixed-precision computations.
*/
-typedef double fastf_t;
+typedef float fastf_t;
/**
* Definitions about limits of floating point representation
@@ -1210,6 +1210,8 @@
* (DEPRECATED)
*
*/
+#if 0
+
#if defined(vax)
/* DEC VAX "D" format, the most restrictive */
# define MAX_FASTF 1.0e37 /* Very close to the largest number */
@@ -1228,6 +1230,24 @@
# endif
#endif
+#else
+
+# define MAX_FASTF 1.0e37 /* Very close to the largest number */
+# define SQRT_MAX_FASTF 1.0e18 /* This squared just avoids overflow */
+# define SMALL_FASTF 1.0e-37 /* Anything smaller is zero */
+# define SQRT_SMALL_FASTF 1.0e-18 /* This squared gives zero */
+
+#if 0
+
+#include <float.h>
+# define MAX_FASTF (sizeof(fastf_t) == sizeof(float) ? FLT_MAX : DBL_MAX)
+# define SQRT_MAX_FASTF sqrt(MAX_FASTF)
+# define SMALL_FASTF (sizeof(fastf_t) == sizeof(float) ? FLT_MIN : DBL_MIN)
+# define SQRT_SMALL_FASTF sqrt(SMALL_FASTF)
+#endif
+
+#endif /* testing new macros */
+
/** DEPRECATED, do not use */
#define SMALL SQRT_SMALL_FASTF
@@ -3282,7 +3302,7 @@
char filename[MAXPATHLEN];
fp = bu_temp_file(&filename, MAXPATHLEN); // get file name
...
- fclose(fp); // optional, auto-closed on exit
+ fclose(fp); // close the file when you're done
...
fp = bu_temp_file(NULL, 0); // don't need file name
bu_fchmod(fileno(fp), 0777);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits