[brlcad-commits] SF.net SVN: brlcad:[43200] geomcore/trunk/src

2011-02-10 Thread erikgreenwald
Revision: 43200
  http://brlcad.svn.sourceforge.net/brlcad/?rev=43200view=rev
Author:   erikgreenwald
Date: 2011-02-10 17:43:14 + (Thu, 10 Feb 2011)

Log Message:
---
remove coreInterface

Modified Paths:
--
geomcore/trunk/src/CMakeLists.txt

Removed Paths:
-
geomcore/trunk/src/coreInterface/

Modified: geomcore/trunk/src/CMakeLists.txt
===
--- geomcore/trunk/src/CMakeLists.txt   2011-02-10 07:11:20 UTC (rev 43199)
+++ geomcore/trunk/src/CMakeLists.txt   2011-02-10 17:43:14 UTC (rev 43200)
@@ -36,7 +36,6 @@
 ADD_SUBDIRECTORY(libEvent)
 ADD_SUBDIRECTORY(libPkgCpp)
 ADD_SUBDIRECTORY(libNet)
-#ADD_SUBDIRECTORY(coreInterface)
 
 #Apps Last
 ADD_SUBDIRECTORY(GS)


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

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[43201] brlcad/trunk/src/tclscripts/archer/Archer.tcl

2011-02-10 Thread bob1961
Revision: 43201
  http://brlcad.svn.sourceforge.net/brlcad/?rev=43201view=rev
Author:   bob1961
Date: 2011-02-10 18:15:07 + (Thu, 10 Feb 2011)

Log Message:
---
Reset output handler when going to/from a separate command window configuration.

Modified Paths:
--
brlcad/trunk/src/tclscripts/archer/Archer.tcl

Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl
===
--- brlcad/trunk/src/tclscripts/archer/Archer.tcl   2011-02-10 17:43:14 UTC 
(rev 43200)
+++ brlcad/trunk/src/tclscripts/archer/Archer.tcl   2011-02-10 18:15:07 UTC 
(rev 43201)
@@ -8133,6 +8133,8 @@
 
activateMenusEtc
updateSaveMode
+
+   $itk_component(ged) set_outputHandler $itk_component(cmd) putstring
 }
 
 if {$mEnableBigEPref != $mEnableBigE} {


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

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[43203] brlcad/branches/cmake

2011-02-10 Thread starseeker
Revision: 43203
  http://brlcad.svn.sourceforge.net/brlcad/?rev=43203view=rev
Author:   starseeker
Date: 2011-02-10 18:47:40 + (Thu, 10 Feb 2011)

Log Message:
---
Use a sentinel file instead of listing all of the output directories - approach 
suggested by David Cole on the CMake list, seems to work and build doesn't keep 
recopying files.  Also tweak the tclscript routines to depend on the file used 
by the copy target.  Disable the option to turn targets on/off - now needed for 
tclscripts build, no longer spewing one target for file, and anyway the build 
should ensure changes made to data files in the src dir are reflected in the 
data tree in the build dir.

Modified Paths:
--
brlcad/branches/cmake/CMakeLists.txt
brlcad/branches/cmake/misc/CMake/BRLCAD_Util.cmake
brlcad/branches/cmake/src/tclscripts/CMakeLists.txt

Modified: brlcad/branches/cmake/CMakeLists.txt
===
--- brlcad/branches/cmake/CMakeLists.txt2011-02-10 18:32:09 UTC (rev 
43202)
+++ brlcad/branches/cmake/CMakeLists.txt2011-02-10 18:47:40 UTC (rev 
43203)
@@ -578,13 +578,6 @@
OPTION(BUILD_STATIC_LIBS Build static libraries ON)
 ENDIF(CMAKE_BUILD_TYPE)
 
-# Enable data build targets - this will result in the build logic
-# being aware of changes in tclscripts, documentation files, and
-# other data and re-copying them to the build directory.  This
-# allows the build output to stay current without re-running
-# CMake
-OPTION(BRLCAD-ENABLE_DATA_TARGETS Enable the data build targets. ON)
-
 # Turn on librtserver build.  
 OPTION(BRLCAD-ENABLE_RTSERVER Enable the librtserver target. ON)
 

Modified: brlcad/branches/cmake/misc/CMake/BRLCAD_Util.cmake
===
--- brlcad/branches/cmake/misc/CMake/BRLCAD_Util.cmake  2011-02-10 18:32:09 UTC 
(rev 43202)
+++ brlcad/branches/cmake/misc/CMake/BRLCAD_Util.cmake  2011-02-10 18:47:40 UTC 
(rev 43203)
@@ -125,29 +125,23 @@
# This first line shouldn't be needed if target dependencies are set up 
correctly
FILE(COPY ${${datalist}} DESTINATION 
${CMAKE_BINARY_DIR}/${DATA_DIR}/${targetdir})
STRING(REGEX REPLACE / _ targetprefix ${targetdir})
-   IF(BRLCAD-ENABLE_DATA_TARGETS)
-   SET(inputlist)
-   FOREACH(filename ${${datalist}})
-   SET(inputlist ${inputlist} 
${CMAKE_CURRENT_SOURCE_DIR}/${filename})
-   ENDFOREACH(filename ${${datalist}})
-   SET(${targetprefix}_cmake_contents 
-   SET(FILES_TO_COPY ${inputlist})
-   FILE(COPY \${FILES_TO_COPY} DESTINATION 
${CMAKE_BINARY_DIR}/${DATA_DIR}/${targetdir})
-   )
-   FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.cmake 
${${targetprefix}_cmake_contents})
-   SET(outputlist)
-   FOREACH(filename ${${datalist}})
-   GET_FILENAME_COMPONENT(ITEM_NAME ${filename} NAME)
-   SET(outputlist ${outputlist} 
${CMAKE_BINARY_DIR}/${DATA_DIR}/${targetdir}/${ITEM_NAME})
-   ENDFOREACH(filename ${${datalist}})
-   ADD_CUSTOM_COMMAND(
-   OUTPUT ${outputlist}
-   COMMAND ${CMAKE_COMMAND} -P 
${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.cmake
-   DEPENDS ${${datalist}}
-   )
-   ADD_CUSTOM_TARGET(${datalist}_cp ALL DEPENDS ${outputlist})
-   ENDIF(BRLCAD-ENABLE_DATA_TARGETS)
+   SET(inputlist)
FOREACH(filename ${${datalist}})
+   SET(inputlist ${inputlist} 
${CMAKE_CURRENT_SOURCE_DIR}/${filename})
+   ENDFOREACH(filename ${${datalist}})
+   SET(${targetprefix}_cmake_contents 
+   SET(FILES_TO_COPY ${inputlist})
+   FILE(COPY \${FILES_TO_COPY} DESTINATION 
${CMAKE_BINARY_DIR}/${DATA_DIR}/${targetdir})
+   )
+   FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.cmake 
${${targetprefix}_cmake_contents})
+   ADD_CUSTOM_COMMAND(
+   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.sentinel
+   COMMAND ${CMAKE_COMMAND} -P 
${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.cmake
+   COMMAND ${CMAKE_COMMAND} -E touch 
${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.sentinel
+   DEPENDS ${${datalist}}
+   )
+   ADD_CUSTOM_TARGET(${datalist}_cp ALL DEPENDS 
${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.sentinel)
+   FOREACH(filename ${${datalist}})
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${filename} 
DESTINATION ${${CMAKE_PROJECT_NAME}_INSTALL_DATA_DIR}/${targetdir})
ENDFOREACH(filename ${${datalist}})
CMAKEFILES(${${datalist}})

Modified: brlcad/branches/cmake/src/tclscripts/CMakeLists.txt
===
--- brlcad/branches/cmake/src/tclscripts/CMakeLists.txt 

[brlcad-commits] SF.net SVN: brlcad:[43204] geomcore/trunk

2011-02-10 Thread starseeker
Revision: 43204
  http://brlcad.svn.sourceforge.net/brlcad/?rev=43204view=rev
Author:   starseeker
Date: 2011-02-10 21:11:37 + (Thu, 10 Feb 2011)

Log Message:
---
Remove some more stuff that's either unused or not  related to geomcore

Removed Paths:
-
geomcore/trunk/data/
geomcore/trunk/m4/
geomcore/trunk/media/
geomcore/trunk/misc/
geomcore/trunk/sandbox/


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

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[43206] geomcore/trunk/src/utility/Config.cxx

2011-02-10 Thread erikgreenwald
Revision: 43206
  http://brlcad.svn.sourceforge.net/brlcad/?rev=43206view=rev
Author:   erikgreenwald
Date: 2011-02-10 22:32:11 + (Thu, 10 Feb 2011)

Log Message:
---
eliminate QFile/QFileInfo in favor of standard ansi C

Modified Paths:
--
geomcore/trunk/src/utility/Config.cxx

Modified: geomcore/trunk/src/utility/Config.cxx
===
--- geomcore/trunk/src/utility/Config.cxx   2011-02-10 21:14:04 UTC (rev 
43205)
+++ geomcore/trunk/src/utility/Config.cxx   2011-02-10 22:32:11 UTC (rev 
43206)
@@ -24,8 +24,10 @@
  */
 
 #include Config.h
-#include QtCore/QFile
-#include QtCore/QFileInfo
+
+#include stdio.h
+#include errno.h
+
 #include QtCore/QMutexLocker
 
 Config* Config::pInstance = NULL;
@@ -51,51 +53,28 @@
 
 bool Config::loadFile(std::string pathAndFileName, bool verbose)
 {
-std::string msg;
-msg = Attemping to load config from: ' + pathAndFileName + '.;
-this-log-logINFO(Config, msg);
+FILE *f;
+char buf[BUFSIZ];
 
-//init file object
-QFile f(QString(pathAndFileName.c_str()));
+this-log-logINFO(Config, Attemping to load config from: ' + 
pathAndFileName + '.);
 
-if (f.exists() == false) {
-   msg = Could not find file: ' + pathAndFileName + '.;
-   this-log-logFATAL(Config, msg);
-   return false;
+if ((f=fopen(pathAndFileName.c_str(), r)) == NULL) {
+   this-log-logFATAL(Config, Could not find file: ' + 
pathAndFileName + '.);
+   return false;
 }
 
+while (!feof(f)) {
+   if(fgets(buf, BUFSIZ, f) == NULL)
+   log-logINFO(Config, std::string(Error reading file: ) + 
strerror(errno));
+   if(*buf == '#')
+   continue;
 
-//verify  open
-if (!f.open(QIODevice::ReadOnly | QIODevice::Text)) {
-   msg = Loading config from: ' + pathAndFileName + ' FAILED.;
-   this-log-logFATAL(Config, msg);
-   return false;
+   std::string key = this-processLine(std::string(buf));
+   if (verbose  key.length()  0)
+   log-logINFO(Config, Read key/value: ' + key + '-' + 
configMap-find(key)-second + ');
 }
 
-while (!f.atEnd()) {
-   QByteArray lineBytes = f.readLine();
-
-   std::string line(lineBytes);
-
-   //Rem newline:
-   this-removeAllOccurances(line, \n, );
-
-   //Check for comments
-   if (line[0] == '#') {
-   //log-logINFO(Config, Ignoring Comment. ( + line + 
));
-   } else {
-   std::string key = this-processLine(line);
-
-   if (verbose  key.length()  0) {
-   std::string value = 
this-configMap-find(key)-second;
-   log-logINFO(Config, Read key/value: ' + 
key + '-' + value + ');
-   }
-
-   }
-}
-QFileInfo info(f);
-
-log-logINFO(Config, Done loading config from:  + 
info.absoluteFilePath().toStdString());
+log-logINFO(Config, std::string(Done loading config from: ) + 
realpath(pathAndFileName.c_str(), NULL));
 return true;
 }
 


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

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[43207] geomcore/trunk/cmake

2011-02-10 Thread starseeker
Revision: 43207
  http://brlcad.svn.sourceforge.net/brlcad/?rev=43207view=rev
Author:   starseeker
Date: 2011-02-11 00:01:00 + (Fri, 11 Feb 2011)

Log Message:
---
Start playing with FindBRLCAD.cmake - still quite a lot to do here, this is an 
intermediate state.

Modified Paths:
--
geomcore/trunk/cmake/FindBRLCAD.cmake

Removed Paths:
-
geomcore/trunk/cmake/FindCPPUNIT.cmake

Modified: geomcore/trunk/cmake/FindBRLCAD.cmake
===
--- geomcore/trunk/cmake/FindBRLCAD.cmake   2011-02-10 22:32:11 UTC (rev 
43206)
+++ geomcore/trunk/cmake/FindBRLCAD.cmake   2011-02-11 00:01:00 UTC (rev 
43207)
@@ -19,7 +19,7 @@
 #  information.
 #  
 #
-#  @file /cmake/FindBRLCAD.cmake
+#  @file geomcore/cmake/FindBRLCAD.cmake
 #
 #  Try to find brlcad libraries.
 #  Once done, this will define:
@@ -29,34 +29,92 @@
 #  BRLCAD_INCLUDE_DIRS - the BRL-CAD include directories
 #  BRLCAD_LIBRARIES - link these to use the BRL-CAD Libraries
 #
+# BRLCAD_BU_LIBRARY - BRL-CAD Utility library
+# BRLCAD_BN_LIBRARY - BRL-CAD Numerical library
+# BRLCAD_RT_LIBRARY - BRL-CAD Raytracing library
+# BRLCAD_DM_LIBRARY - BRL-CAD Display Manager library
+# BRLCAD_FB_LIBRARY - BRL-CAD Frame Buffer library
+# BRLCAD_FFT_LIBRARY - BRL-CAD FFT library
+# BRLCAD_ANALYZE_LIBRARY - BRL-CAD Analysis library
+# BRLCAD_GCV_LIBRARY - BRL-CAD Geometry Conversion library
+# BRLCAD_ICV_LIBRARY - BRL-CAD Image Conversion library
+# BRLCAD_WDB_LIBRARY - BRL-CAD Write Database library
+# BRLCAD_GED_LIBRARY - BRL-CAD Geometry Editing library
+# BRLCAD_MULTISPECTRAL_LIBRARY - BRL-CAD multispectral library
+# BRLCAD_OPTICAL_LIBRARY - BRL-CAD optical library
+# BRLCAD_GED_LIBRARY - BRL-CAD Geometry Editing library
+# BRLCAD_PKG_LIBRARY - BRL-CAD libpkg
+# BRLCAD_CURSOR_LIBRARY - libcursor
+# BRLCAD_ORLE_LIBRARY - liborle
+# BRLCAD_RENDER_LIBRARY - librender
+# BRLCAD_TIE_LIBRARY - libtie
+# BRLCAD_SYSV_LIBRARY - libsysv
+# BRLCAD_TERMIO_LIBRARY - libtermio
+# BRLCAD_EXPPP_LIBRARY - SCL libexppp library
+# BRLCAD_EXPRESS_LIBRARY - SCL libexpress library
+# BRLCAD_STEPCORE_LIBRARY - SCL core library
+# BRLCAD_STEPDAI_LIBRARY - SCL dai library
+# BRLCAD_STEPEDITOR_LIBRARY - SCL editor library
+# BRLCAD_STEPUTILS_LIBRARY - SCL utils library
+# BRLCAD_OPENNURBS_LIBRARY - openNURBS library
+# BRLCAD_UTAHRLE_LIBRARY - libutahrle
 #
+#  In addition to the above variables, which are essentially unique
+#  to BRL-CAD, this routine will look for local copies of libraries
+#  installed with BRL-CAD and return  their results as would a 
+#  standard find_package for that library (if one exists).  The 
+#  libraries searched for:
+#
+#  libregex
+#  libpng
+#  zlib
+#  libtermlib
+#  tcl/tk
+#  incrTcl
+#  Togl
+# 
 #  $Revision:  $
 #  $Author:  $
 #
 #
 
-MESSAGE(STATUS \tSearching for BRLCAD...)
-IF(RT3_VERBOSE_CMAKE_OUTPUT)   
-MESSAGE(STATUS \t\tEnviornment Variable 'PATH': $ENV{PATH})
-ENDIF(RT3_VERBOSE_CMAKE_OUTPUT)  
+SET(BRLCAD_ROOT $ENV{BRLCAD_ROOT})
+IF(BRLCAD_BASE_DIR AND BRLCAD_ROOT)
+   MESSAGE(Warning - BRLCAD_ROOT was found but is overridden by 
BRLCAD_BASE_DIR)
+ELSE(BRLCAD_BASE_DIR AND BRLCAD_ROOT)
+   IF(BRLCAD_ROOT)
+   SET(BRLCAD_BASE_DIR ${BRLCAD_ROOT})
+   ENDIF(BRLCAD_ROOT)
+ENDIF(BRLCAD_BASE_DIR AND BRLCAD_ROOT)
 
 #First, find the install directories.
 IF(BRLCAD_BASE_DIR)
-MESSAGE(STATUS \t\t Using BRLCAD_BASE_DIR...)
 #if BRLCAD_BASE_DIR is set, then this makes it easy!
 SET(BRLCAD_BIN_DIR ${BRLCAD_BASE_DIR}/bin)
 SET(BRLCAD_INC_DIRS ${BRLCAD_BASE_DIR}/include 
${BRLCAD_BASE_DIR}/include/brlcad ${BRLCAD_BASE_DIR}/include/openNURBS)
 SET(BRLCAD_LIB_DIR ${BRLCAD_BASE_DIR}/lib)
 ELSE(BRLCAD_BASE_DIR)
-MESSAGE(STATUS \t\t Searching for BRLCAD components...)
-#if BRLCAD_BASE_DIR is NOT set, then search for files KNOWN to be in the 
BRLCAD installation.
+#try looking for BRL-CAD's brlcad-config - it should give us
+#a location
+FIND_PATH(BRLCAD_BIN_DIR brlcad-config)
+IF(BRLCAD_BIN_PATH)
+EXEC_PROGRAM(${BRLCAD_BIN_DIR} ARGS --prefix OUTPUT_VARIABLE 
BRLCAD_BASE_DIR)
+ENDIF(BRLCAD_BIN_PATH)
+IF(NOT BRLCAD_BASE_DIR)
+SET(BRLCAD_HEADERS_DIR_CANDIDATES 
+/usr/brlcad/include/brlcad 
+/usr/local/brlcad/include/brlcad
+)
+#Look for headers if brlcad-config fails
+FIND_PATH(BRLCAD_HEADERS_DIR NAMES bu.h bn.h rt.h PATHS 
${BRLCAD_HEADERS_DIR_CANDIDATES})
+IF(BRLCAD_HEADERS_DIR)
+

[brlcad-commits] SF.net SVN: brlcad:[43208] brlcad/trunk/sh

2011-02-10 Thread jordisayol
Revision: 43208
  http://brlcad.svn.sourceforge.net/brlcad/?rev=43208view=rev
Author:   jordisayol
Date: 2011-02-11 00:21:54 + (Fri, 11 Feb 2011)

Log Message:
---

correct an error on deb and rpm scripts

Modified Paths:
--
brlcad/trunk/sh/make_deb.sh
brlcad/trunk/sh/make_rpm.sh

Modified: brlcad/trunk/sh/make_deb.sh
===
--- brlcad/trunk/sh/make_deb.sh 2011-02-11 00:01:00 UTC (rev 43207)
+++ brlcad/trunk/sh/make_deb.sh 2011-02-11 00:21:54 UTC (rev 43208)
@@ -35,7 +35,7 @@
 #
 ###
 
-test -e
+set -e
 
 ferror(){
 echo ==

Modified: brlcad/trunk/sh/make_rpm.sh
===
--- brlcad/trunk/sh/make_rpm.sh 2011-02-11 00:01:00 UTC (rev 43207)
+++ brlcad/trunk/sh/make_rpm.sh 2011-02-11 00:21:54 UTC (rev 43208)
@@ -35,7 +35,7 @@
 #
 ###
 
-test -e
+set -e
 
 ferror(){
 echo ==


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

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[43209] brlcad/trunk/doc/deprecation.txt

2011-02-10 Thread brlcad
Revision: 43209
  http://brlcad.svn.sourceforge.net/brlcad/?rev=43209view=rev
Author:   brlcad
Date: 2011-02-11 05:06:42 + (Fri, 11 Feb 2011)

Log Message:
---
SMALL was deprecated a long time ago, but is a minimally impacting change

Modified Paths:
--
brlcad/trunk/doc/deprecation.txt

Modified: brlcad/trunk/doc/deprecation.txt
===
--- brlcad/trunk/doc/deprecation.txt2011-02-11 00:21:54 UTC (rev 43208)
+++ brlcad/trunk/doc/deprecation.txt2011-02-11 05:06:42 UTC (rev 43209)
@@ -338,6 +338,9 @@
 have been identified in reverse chronological order.  As expressions
 are not extensively tested, use with caution.
 
+s/SMALL\([^_]\)/SMALL_FAST\1/g
+SMALL renamed to SMALL_FASTF [7.18]
+
 s/db_shader_mat(/rt_shader_mat(/g
 db_shader_mat() renamed to rt_shader_mat() [7.18]
 


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

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[43210] brlcad/trunk/include/vmath.h

2011-02-10 Thread brlcad
Revision: 43210
  http://brlcad.svn.sourceforge.net/brlcad/?rev=43210view=rev
Author:   brlcad
Date: 2011-02-11 05:08:26 + (Fri, 11 Feb 2011)

Log Message:
---
provide a ZERO() macro that corresponds with the EQUAL() macro.  tolerance is 
defined at compile-time so it's not the best to use, but still more reliable 
than exact floating point comparisons.  it'll also permit cleaning up numerous 
NEAR_ZERO() callers that arbitrarily use SMALL, SMALL_FASTF, and 
SQRT_SMALL_FASTF when the intent is just a nearness to zero.

Modified Paths:
--
brlcad/trunk/include/vmath.h

Modified: brlcad/trunk/include/vmath.h
===
--- brlcad/trunk/include/vmath.h2011-02-11 05:06:42 UTC (rev 43209)
+++ brlcad/trunk/include/vmath.h2011-02-11 05:08:26 UTC (rev 43210)
@@ -302,6 +302,14 @@
  NEAR_ZERO(v[Z], tol))
 
 /**
+ * Return truthfully whether a value is within a minimum
+ * representation tolerance from zero.
+ *
+ * Use not recommended due to compilation-variant tolerance.
+ */
+#define ZERO(_a) NEAR_ZERO((_a), SMALL_FASTF)
+
+/**
  * Return truthfully whether two values are within a specified epsilon
  * distance from each other.
  */
@@ -320,7 +328,7 @@
  * Return truthfully whether two values are within a minimum
  * representation tolerance from each other.
  *
- * Unspecified unreliable tolerance.  Use not recommended.
+ * Use not recommended due to compilation-variant tolerance.
  */
 #define EQUAL(_a, _b) NEAR_EQUAL((_a), (_b), SMALL_FASTF)
 
@@ -328,7 +336,7 @@
  * Return truthfully whether two vectors are equal within a minimum
  * representation tolerance.
  *
- * Unspecified unreliable tolerance.  Use not recommended.
+ * Use not recommended due to compilation-variant tolerance.
  */
 #define VEQUAL(_a, _b) VNEAR_EQUAL((_a), (_b), SMALL_FASTF)
 


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

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[43211] brlcad/trunk/src/libbu/units.c

2011-02-10 Thread brlcad
Revision: 43211
  http://brlcad.svn.sourceforge.net/brlcad/?rev=43211view=rev
Author:   brlcad
Date: 2011-02-11 05:25:36 + (Fri, 11 Feb 2011)

Log Message:
---
convert from NEAR_ZERO() to ZERO()

Modified Paths:
--
brlcad/trunk/src/libbu/units.c

Modified: brlcad/trunk/src/libbu/units.c
===
--- brlcad/trunk/src/libbu/units.c  2011-02-11 05:08:26 UTC (rev 43210)
+++ brlcad/trunk/src/libbu/units.c  2011-02-11 05:25:36 UTC (rev 43211)
@@ -31,6 +31,7 @@
 
 /* done specifically to avoid a libbn dependency */
 #define NEAR_ZERO(val, epsilon) (((val)  -epsilon)  ((val)  epsilon))
+#define ZERO(val) NEAR_ZERO((val), SMALL_FASTF)
 
 
 struct cvt_tab {
@@ -221,7 +222,7 @@
 for (tp=bu_units_length_tab; tp-name[0]; tp++) {
fastf_t diff, bigger;
 
-   if (NEAR_ZERO(mm - tp-val, SMALL_FASTF))
+   if (ZERO(mm - tp-val))
return tp-name;
 
/* Check for near-miss */
@@ -254,7 +255,7 @@
 BU_GETSTRUCT(vlsp, bu_vls);
 bu_vls_init(vlsp);
 for (tp=bu_units_length_tab; tp-name[0]; tp++) {
-   if (NEAR_ZERO(prev_val - tp-val, SMALL_FASTF))
+   if (ZERO(prev_val - tp-val))
continue;
 
bu_vls_printf(vlsp, %s, , tp-name);
@@ -284,11 +285,11 @@
double nearness;
 
/* skip zero so we don't return 'none' */
-   if (NEAR_ZERO(tp-val, SMALL_FASTF))
+   if (ZERO(tp-val))
continue;
 
/* break early on perfect match */
-   if (NEAR_ZERO(mm - tp-val, SMALL_FASTF))
+   if (ZERO(mm - tp-val))
return tp-name;
 
/* Check for nearness */


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

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[43212] brlcad/trunk/src/libbn

2011-02-10 Thread brlcad
Revision: 43212
  http://brlcad.svn.sourceforge.net/brlcad/?rev=43212view=rev
Author:   brlcad
Date: 2011-02-11 05:26:42 + (Fri, 11 Feb 2011)

Log Message:
---
lots of conversions from NEAR_ZERO() to the new ZERO() macro where the 
tolerance test is merely against SMALL_FASTF or used to test for zero-division.

Modified Paths:
--
brlcad/trunk/src/libbn/anim.c
brlcad/trunk/src/libbn/axis.c
brlcad/trunk/src/libbn/complex.c
brlcad/trunk/src/libbn/mat.c
brlcad/trunk/src/libbn/noise.c
brlcad/trunk/src/libbn/plane.c
brlcad/trunk/src/libbn/poly.c
brlcad/trunk/src/libbn/tabdata.c
brlcad/trunk/src/libbn/vector.c

Modified: brlcad/trunk/src/libbn/anim.c
===
--- brlcad/trunk/src/libbn/anim.c   2011-02-11 05:25:36 UTC (rev 43211)
+++ brlcad/trunk/src/libbn/anim.c   2011-02-11 05:26:42 UTC (rev 43212)
@@ -92,7 +92,7 @@
 fastf_t sin_x, sin_z, cos_x, cos_z, big_x, big_z;
 static fastf_t previous[3];
 
-if (NEAR_ZERO(viewrot[1], SMALL_FASTF)  NEAR_ZERO(viewrot[0], 
SMALL_FASTF)) {
+if (ZERO(viewrot[1])  ZERO(viewrot[0])) {
return_value = ERROR1;
angle[0] = 0.0;
angle[2] = atan2(viewrot[4], viewrot[5]);
@@ -152,7 +152,7 @@
 fastf_t sin_y, sin_r, cos_y, cos_r, big_y, big_r;
 static fastf_t prev_angle[3];
 
-if (NEAR_ZERO(viewrot[9], SMALL_FASTF)  NEAR_ZERO(viewrot[10], 
SMALL_FASTF)) {
+if (ZERO(viewrot[9])  ZERO(viewrot[10])) {
return_value = ERROR1;
angle[2] = 0.0;
angle[0] = atan2(-viewrot[1], viewrot[5]);
@@ -212,7 +212,7 @@
 static fastf_t prev_quat[4];
 
 square = 0.25 * (1 + viewrot[0] + viewrot[5] + viewrot[10]);
-if (!NEAR_ZERO(square, SMALL_FASTF)) {
+if (!ZERO(square)) {
quat[W] = sqrt(square);
quat[X] = 0.25 * (viewrot[9] - viewrot[6])/ quat[W];
quat[Y] = 0.25 * (viewrot[2] - viewrot[8])/ quat[W];
@@ -220,14 +220,14 @@
 } else {
quat[W] = 0.0;
square = -0.5 * (viewrot[5] + viewrot[10]);
-   if (!NEAR_ZERO(square, SMALL_FASTF)) {
+   if (!ZERO(square)) {
quat[X] = sqrt(square);
quat[Y] = 0.5 * viewrot[4] / quat[X];
quat[Z] = 0.5 * viewrot[8] / quat[X];
} else {
quat[X] = 0.0;
square = 0.5 * (1 - viewrot[10]);
-   if (!NEAR_ZERO(square, SMALL_FASTF)) {
+   if (!ZERO(square)) {
quat[Y] = sqrt(square);
quat[Z] = 0.5 * viewrot[9]/ quat[Y];
} else {

Modified: brlcad/trunk/src/libbn/axis.c
===
--- brlcad/trunk/src/libbn/axis.c   2011-02-11 05:25:36 UTC (rev 43211)
+++ brlcad/trunk/src/libbn/axis.c   2011-02-11 05:26:42 UTC (rev 43212)
@@ -91,7 +91,7 @@
 else
ccw = 1;/* clockwise */
 
-if (NEAR_ZERO(tick_separation, SMALL)) tick_separation = 1;
+if (ZERO(tick_separation)) tick_separation = 1;
 
 /*
  *  The point origin will be the center of the axis rotation.

Modified: brlcad/trunk/src/libbn/complex.c
===
--- brlcad/trunk/src/libbn/complex.c2011-02-11 05:25:36 UTC (rev 43211)
+++ brlcad/trunk/src/libbn/complex.c2011-02-11 05:26:42 UTC (rev 43212)
@@ -52,7 +52,7 @@
 r = bp-re;
 s = bp-im;
 if (fabs(r) = fabs(s)) {
-   if (NEAR_ZERO(r, SQRT_SMALL_FASTF))
+   if (ZERO(r))
goto err;
r = s / r;  /* = 1 */
s = 1.0 / (bp-re + r * s);
@@ -60,7 +60,7 @@
ap-im = (ap-im - ap__re * r) * s;
return;
 } else {
-   if (NEAR_ZERO(s, SQRT_SMALL_FASTF))
+   if (ZERO(s))
goto err;
r = r / s;  /*  1 */
s = 1.0 / (s + r * bp-re);
@@ -92,8 +92,8 @@
 const fastf_t im = ip-im;
 
 /* special cases are not necessary; they are here for speed */
-if (NEAR_ZERO(re, SMALL_FASTF)) {
-   if (NEAR_ZERO(im, SMALL_FASTF)) {
+if (ZERO(re)) {
+   if (ZERO(im)) {
op-re = op-im = 0.0;
} else if (im  0.0) {
op-re = op-im = sqrt(im * 0.5);
@@ -101,7 +101,7 @@
/* ip-im  0.0 */
op-re = -(op-im = sqrt(im * -0.5));
}
-} else if (NEAR_ZERO(im, SMALL_FASTF)) {
+} else if (ZERO(im)) {
if (re  0.0) {
op-re = sqrt(re);
op-im = 0.0;

Modified: brlcad/trunk/src/libbn/mat.c
===
--- brlcad/trunk/src/libbn/mat.c2011-02-11 05:25:36 UTC (rev 43211)
+++ brlcad/trunk/src/libbn/mat.c2011-02-11 05:26:42 UTC (rev 43212)
@@ -316,7 +316,7 @@
}
}
 
-   if (NEAR_ZERO(y, SQRT_SMALL_FASTF)) {
+   if (ZERO(y)) {
/* SINGULAR */
return 0;
}
@@ -398,10 +398,10 @@
 {
 register 

[brlcad-commits] SF.net SVN: brlcad:[43213] brlcad/trunk/src/anim

2011-02-10 Thread brlcad
Revision: 43213
  http://brlcad.svn.sourceforge.net/brlcad/?rev=43213view=rev
Author:   brlcad
Date: 2011-02-11 05:27:54 + (Fri, 11 Feb 2011)

Log Message:
---
start of larger covnersion over to new ZERO() macro.

Modified Paths:
--
brlcad/trunk/src/anim/anim_fly.c
brlcad/trunk/src/anim/anim_hardtrack.c

Modified: brlcad/trunk/src/anim/anim_fly.c
===
--- brlcad/trunk/src/anim/anim_fly.c2011-02-11 05:26:42 UTC (rev 43212)
+++ brlcad/trunk/src/anim/anim_fly.c2011-02-11 05:27:54 UTC (rev 43213)
@@ -134,7 +134,7 @@
 *p_pch = xyz2pch(vel);
 *p_rll = bank(accel, vel);
 
-if (NEAR_ZERO(fabs(*p_pch) - 90.0, SMALL_FASTF)) /* don't change yaw if 
velocity vertical */
+if (ZERO(fabs(*p_pch) - 90.0)) /* don't change yaw if velocity vertical */
*p_yaw = last_yaw;
 
 /* avoid sudden yaw changes in vertical loops */

Modified: brlcad/trunk/src/anim/anim_hardtrack.c
===
--- brlcad/trunk/src/anim/anim_hardtrack.c  2011-02-11 05:26:42 UTC (rev 
43212)
+++ brlcad/trunk/src/anim/anim_hardtrack.c  2011-02-11 05:27:54 UTC (rev 
43213)
@@ -344,7 +344,7 @@
return 0;
 }
 num_wheels = -1;
-if (!NEAR_ZERO(radius, SMALL_FASTF)) {
+if (!ZERO(radius)) {
while (!feof(stream)) {
count = fscanf(stream, %*f %*f %*f);
if (count != 3)
@@ -368,7 +368,7 @@
count = fscanf(stream, %lf %lf %lf, temp, temp+1, temp+2);
if (count != 3)
break;
-   if (!NEAR_ZERO(radius, SMALL_FASTF))
+   if (!ZERO(radius))
x[i].w.rad = radius;
else {
count = fscanf(stream, %lf,  x[i].w.rad);


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

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits