Revision: 76078
http://sourceforge.net/p/brlcad/code/76078
Author: starseeker
Date: 2020-06-09 00:02:58 +0000 (Tue, 09 Jun 2020)
Log Message:
-----------
Merge changes from trunk - r76051 through r76077
Modified Paths:
--------------
brlcad/branches/dm-fb-merge/INSTALL
brlcad/branches/dm-fb-merge/configure
brlcad/branches/dm-fb-merge/doc/docbook/CMakeLists.txt
brlcad/branches/dm-fb-merge/doc/docbook/resources/other/CMakeLists.txt
brlcad/branches/dm-fb-merge/doc/legal/embedded/CMakeLists.txt
brlcad/branches/dm-fb-merge/doc/legal/other/CMakeLists.txt
brlcad/branches/dm-fb-merge/include/gcv/util.h
brlcad/branches/dm-fb-merge/include/rt/tree.h
brlcad/branches/dm-fb-merge/misc/CMake/BRLCAD_Targets.cmake
brlcad/branches/dm-fb-merge/misc/CMake/CMakeLists.txt
brlcad/branches/dm-fb-merge/regress/gchecker/regress-gchecker.cmake.in
brlcad/branches/dm-fb-merge/regress/licenses/regress-licenses.cmake.in
brlcad/branches/dm-fb-merge/regress/repository/regress-repository.cmake.in
brlcad/branches/dm-fb-merge/regress/user/CMakeLists.txt
brlcad/branches/dm-fb-merge/src/adrt/load_g.c
brlcad/branches/dm-fb-merge/src/burst/CMakeLists.txt
brlcad/branches/dm-fb-merge/src/burst/Hm.c
brlcad/branches/dm-fb-merge/src/burst/HmGetc.c
brlcad/branches/dm-fb-merge/src/burst/burst.c
brlcad/branches/dm-fb-merge/src/burst/burst.h
brlcad/branches/dm-fb-merge/src/burst/extern.h
brlcad/branches/dm-fb-merge/src/burst/trie.c
brlcad/branches/dm-fb-merge/src/burst/ui.c
brlcad/branches/dm-fb-merge/src/conv/CMakeLists.txt
brlcad/branches/dm-fb-merge/src/conv/dxf/g-dxf.c
brlcad/branches/dm-fb-merge/src/conv/g-egg.c
brlcad/branches/dm-fb-merge/src/conv/raw/g-raw.c
brlcad/branches/dm-fb-merge/src/conv/stl/g-stl.c
brlcad/branches/dm-fb-merge/src/libbrep/CMakeLists.txt
brlcad/branches/dm-fb-merge/src/libgcv/CMakeLists.txt
brlcad/branches/dm-fb-merge/src/libgcv/plugins/CMakeLists.txt
brlcad/branches/dm-fb-merge/src/libgcv/plugins/fastgen4/CMakeLists.txt
brlcad/branches/dm-fb-merge/src/libgcv/plugins/fastgen4/fastgen4_write.cpp
brlcad/branches/dm-fb-merge/src/libgcv/plugins/gdal/CMakeLists.txt
brlcad/branches/dm-fb-merge/src/libgcv/plugins/obj/CMakeLists.txt
brlcad/branches/dm-fb-merge/src/libgcv/plugins/stl/CMakeLists.txt
brlcad/branches/dm-fb-merge/src/libgcv/plugins/stl/stl_write.c
brlcad/branches/dm-fb-merge/src/libgcv/plugins/vrml/CMakeLists.txt
brlcad/branches/dm-fb-merge/src/librt/CMakeLists.txt
brlcad/branches/dm-fb-merge/src/librt/cache.c
brlcad/branches/dm-fb-merge/src/other/CMakeLists.txt
Added Paths:
-----------
brlcad/branches/dm-fb-merge/doc/legal/embedded/lz4.txt
brlcad/branches/dm-fb-merge/src/librt/cache_lz4.c
brlcad/branches/dm-fb-merge/src/librt/region_end.c
brlcad/branches/dm-fb-merge/src/librt/region_end_mc.c
Removed Paths:
-------------
brlcad/branches/dm-fb-merge/doc/legal/other/lz4.txt
brlcad/branches/dm-fb-merge/misc/CMake/FindLZ4.cmake
brlcad/branches/dm-fb-merge/src/burst/Hm.h
brlcad/branches/dm-fb-merge/src/burst/trie.h
brlcad/branches/dm-fb-merge/src/libgcv/region_end.c
brlcad/branches/dm-fb-merge/src/libgcv/region_end_mc.c
brlcad/branches/dm-fb-merge/src/other/lz4/
brlcad/branches/dm-fb-merge/src/other/lz4.dist
Property Changed:
----------------
brlcad/branches/dm-fb-merge/
brlcad/branches/dm-fb-merge/doc/
brlcad/branches/dm-fb-merge/include/
brlcad/branches/dm-fb-merge/regress/
brlcad/branches/dm-fb-merge/src/other/
Index: brlcad/branches/dm-fb-merge
===================================================================
--- brlcad/branches/dm-fb-merge 2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge 2020-06-09 00:02:58 UTC (rev 76078)
Property changes on: brlcad/branches/dm-fb-merge
___________________________________________________________________
Modified: svn:mergeinfo
## -8,4 +8,4 ##
/brlcad/branches/osg:62110-62113
/brlcad/branches/prep-cache:68236-68933
/brlcad/branches/tcltk86:68300-75257
-/brlcad/trunk:75440-76050
\ No newline at end of property
+/brlcad/trunk:75440-76077
\ No newline at end of property
Modified: brlcad/branches/dm-fb-merge/INSTALL
===================================================================
--- brlcad/branches/dm-fb-merge/INSTALL 2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/INSTALL 2020-06-09 00:02:58 UTC (rev 76078)
@@ -541,17 +541,6 @@
Aliases: ENABLE_PNG
---- BRLCAD_LZ4 ---
-
-Option for enabling and disabling compilation of the lz4 data
-compression library provided with BRL-CAD's source code. Default
-is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
-testing first for a system version if BRLCAD_BUNDLED_LIBS is also
-AUTO.
-
-Aliases: ENABLE_LZ4
-
-
--- BRLCAD_NETPBM ---
Option for enabling and disabling compilation of the netpbm library
Modified: brlcad/branches/dm-fb-merge/configure
===================================================================
--- brlcad/branches/dm-fb-merge/configure 2020-06-08 21:00:54 UTC (rev
76077)
+++ brlcad/branches/dm-fb-merge/configure 2020-06-09 00:02:58 UTC (rev
76078)
@@ -122,10 +122,6 @@
shift;;
--disable-png) options="$options -DBRLCAD_PNG=SYSTEM";
shift;;
- --enable-lz4) options="$options -DBRLCAD_LZ4=BUNDLED";
- shift;;
- --disable-lz4) options="$options -DBRLCAD_LZ4=SYSTEM";
- shift;;
--enable-netpbm) options="$options
-DBRLCAD_NETPBM=BUNDLED";
shift;;
--disable-netpbm) options="$options
-DBRLCAD_NETPBM=SYSTEM";
Index: brlcad/branches/dm-fb-merge/doc
===================================================================
--- brlcad/branches/dm-fb-merge/doc 2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/doc 2020-06-09 00:02:58 UTC (rev 76078)
Property changes on: brlcad/branches/dm-fb-merge/doc
___________________________________________________________________
Modified: svn:mergeinfo
## -8,4 +8,4 ##
/brlcad/branches/osg/doc:62110-62113
/brlcad/branches/prep-cache/doc:68236-68933
/brlcad/branches/tcltk86/doc:68300-75257
-/brlcad/trunk/doc:75512-75597,75630-75814,75935-76034
\ No newline at end of property
+/brlcad/trunk/doc:75512-75597,75630-75814,75935-76034,76051-76077
\ No newline at end of property
Modified: brlcad/branches/dm-fb-merge/doc/docbook/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/doc/docbook/CMakeLists.txt 2020-06-08
21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/doc/docbook/CMakeLists.txt 2020-06-09
00:02:58 UTC (rev 76078)
@@ -2,6 +2,7 @@
# a target for generator expression use regardless of other changes elsewhere
# in the build system
add_executable(db_dir_info db_dir_info.c)
+set_target_properties(db_dir_info PROPERTIES FOLDER "DocBook")
# We need various configuration files set up for DocBook processing tools
add_subdirectory(resources)
@@ -26,7 +27,9 @@
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/css/brlcad.css
)
add_custom_target(brlcad_css DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/brlcad_css-${CMAKE_CFG_INTDIR}-done)
+set_target_properties(brlcad_css PROPERTIES FOLDER "DocBook")
install(FILES css/brlcad.css DESTINATION ${DOC_DIR}/html/css)
+DISTCLEAN(${CMAKE_CFG_INTDIR}/${DOC_DIR}/html/css/brlcad.css)
# Include CMake macros for DocBook.
include(${BRLCAD_SOURCE_DIR}/misc/CMake/DocBook.cmake)
@@ -43,6 +46,7 @@
README
README.DB_authors_notes
css/brlcad.css
+ db_dir_info.c
fop.xconf.in
log4j.properties
)
Modified: brlcad/branches/dm-fb-merge/doc/docbook/resources/other/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/doc/docbook/resources/other/CMakeLists.txt
2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/doc/docbook/resources/other/CMakeLists.txt
2020-06-09 00:02:58 UTC (rev 76078)
@@ -82,6 +82,7 @@
# immediately so targets in other directories can see it
set(DOCBOOK_RESOURCE_FILES schema-expand fonts-dejavu-expand fonts-stix-expand
offo-2-expand svg-dtd-expand xsl-expand)
set(DOCBOOK_RESOURCE_FILES "${DOCBOOK_RESOURCE_FILES}" CACHE STRING "DocBook
target list")
+mark_as_advanced(DOCBOOK_RESOURCE_FILES)
set(ignore_files
CMakeLists.txt
Modified: brlcad/branches/dm-fb-merge/doc/legal/embedded/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/doc/legal/embedded/CMakeLists.txt
2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/doc/legal/embedded/CMakeLists.txt
2020-06-09 00:02:58 UTC (rev 76078)
@@ -26,6 +26,7 @@
hv3_snit.txt
libtermlib.txt
lseg_lseg.txt
+ lz4.txt
marching_cubes.txt
msinttypes.txt
mt19937ar.txt
Copied: brlcad/branches/dm-fb-merge/doc/legal/embedded/lz4.txt (from rev 76077,
brlcad/trunk/doc/legal/embedded/lz4.txt)
===================================================================
--- brlcad/branches/dm-fb-merge/doc/legal/embedded/lz4.txt
(rev 0)
+++ brlcad/branches/dm-fb-merge/doc/legal/embedded/lz4.txt 2020-06-09
00:02:58 UTC (rev 76078)
@@ -0,0 +1,26 @@
+LZ4 Library
+Copyright (c) 2011-2016, Yann Collet
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+file:/src/librt/cache_lz4.c
Modified: brlcad/branches/dm-fb-merge/doc/legal/other/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/doc/legal/other/CMakeLists.txt 2020-06-08
21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/doc/legal/other/CMakeLists.txt 2020-06-09
00:02:58 UTC (rev 76078)
@@ -12,7 +12,6 @@
libvds.txt
libz.txt
linenoise.txt
- lz4.txt
OpenNURBS.txt
openscenegraph.txt
poly2tri.txt
Deleted: brlcad/branches/dm-fb-merge/doc/legal/other/lz4.txt
===================================================================
--- brlcad/branches/dm-fb-merge/doc/legal/other/lz4.txt 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/doc/legal/other/lz4.txt 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -1,24 +0,0 @@
-LZ4 Library
-Copyright (c) 2011-2016, Yann Collet
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
this
- list of conditions and the following disclaimer in the documentation and/or
- other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: brlcad/branches/dm-fb-merge/include
===================================================================
--- brlcad/branches/dm-fb-merge/include 2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/include 2020-06-09 00:02:58 UTC (rev 76078)
Property changes on: brlcad/branches/dm-fb-merge/include
___________________________________________________________________
Modified: svn:mergeinfo
## -8,4 +8,4 ##
/brlcad/branches/osg/include:62110-62113
/brlcad/branches/prep-cache/include:68236-68933
/brlcad/branches/tcltk86/include:68300-75257
-/brlcad/trunk/include:75463-75467,75630-75814,75880-76050
\ No newline at end of property
+/brlcad/trunk/include:75463-75467,75630-75814,75880-76077
\ No newline at end of property
Modified: brlcad/branches/dm-fb-merge/include/gcv/util.h
===================================================================
--- brlcad/branches/dm-fb-merge/include/gcv/util.h 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/include/gcv/util.h 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -57,34 +57,6 @@
GCV_EXPORT extern int gcv_bot_is_orientable(const struct rt_bot_internal *bot);
-/**
- * write_region is a function pointer to a routine that will
- * write out the region in a given file format.
- *
- * This routine must be prepared to run in parallel.
- */
-struct gcv_region_end_data
-{
- void (*write_region)(struct nmgregion *r, const struct db_full_path
*pathp, int region_id, int material_id, float color[3], void *client_data);
- void *client_data;
-};
-
-/**
- * Perform Boolean evaluation on a tree of tessellated leaf nodes.
- *
- * Usually specified as the db_walk_tree() region_end callback,
- * calling this routine for each positive region encountered.
- *
- * The client_data parameter is expected to point to a struct
gcv_region_end_data.
- */
-GCV_EXPORT extern union tree *gcv_region_end(struct db_tree_state *tsp, const
struct db_full_path *pathp, union tree *curtree, void *client_data);
-
-/**
- * Exact same as gcv_region_end, except using the marching cubes algorithm.
- */
-GCV_EXPORT extern union tree *gcv_region_end_mc(struct db_tree_state *tsp,
const struct db_full_path *pathp, union tree *curtree, void *client_data);
-
-
GCV_EXPORT extern union tree *gcv_bottess_region_end(struct db_tree_state
*tsp, const struct db_full_path *pathp, union tree *curtree, void *client_data);
Modified: brlcad/branches/dm-fb-merge/include/rt/tree.h
===================================================================
--- brlcad/branches/dm-fb-merge/include/rt/tree.h 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/include/rt/tree.h 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -774,7 +774,33 @@
struct resource *resp);
+/**
+ * write_region is a function pointer to a routine that will
+ * write out the region in a given file format.
+ *
+ * This routine must be prepared to run in parallel.
+ */
+struct rt_region_end_data
+{
+ void (*write_region)(struct nmgregion *r, const struct db_full_path
*pathp, int region_id, int material_id, float color[3], void *client_data);
+ void *client_data;
+};
+/**
+ * Perform Boolean evaluation on a tree of tessellated leaf nodes.
+ *
+ * Usually specified as the db_walk_tree() region_end callback,
+ * calling this routine for each positive region encountered.
+ *
+ * The client_data parameter is expected to point to a struct
rt_region_end_data.
+ */
+RT_EXPORT extern union tree *rt_region_end(struct db_tree_state *tsp, const
struct db_full_path *pathp, union tree *curtree, void *client_data);
+
+/**
+ * Exact same as rt_region_end, except using the marching cubes algorithm.
+ */
+RT_EXPORT extern union tree *rt_region_end_mc(struct db_tree_state *tsp, const
struct db_full_path *pathp, union tree *curtree, void *client_data);
+
__END_DECLS
#endif /* RT_TREE_H */
Modified: brlcad/branches/dm-fb-merge/misc/CMake/BRLCAD_Targets.cmake
===================================================================
--- brlcad/branches/dm-fb-merge/misc/CMake/BRLCAD_Targets.cmake 2020-06-08
21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/misc/CMake/BRLCAD_Targets.cmake 2020-06-09
00:02:58 UTC (rev 76078)
@@ -149,7 +149,7 @@
# Assemble the targets and compilation flags needed by the target
function(GET_FLAGS_AND_DEFINITIONS targetname target_libs)
- cmake_parse_arguments(G "" "CFLAGS;CXXFLAGS;DEFINES;DLL_DEFINES" "" ${ARGN})
+ cmake_parse_arguments(G "" "CFLAGS;CXXFLAGS;DEFINES" "" ${ARGN})
#####################################################################
# Compile flags - note that targets may have separate C and C++ flags
@@ -216,36 +216,6 @@
endif(G_DEFINES)
- # DLL defines (needed for Visual Studio import/export)
- if(G_DLL_DEFINES)
-
- get_property(T_DLL_DEFINES GLOBAL PROPERTY ${targetname}_DLL_DEFINES)
- foreach(libitem ${target_libs})
- get_property(${libitem}_DLL_DEFINES GLOBAL PROPERTY
${libitem}_DLL_DEFINES)
- list(APPEND T_DLL_DEFINES ${${libitem}_DLL_DEFINES})
- endforeach(libitem ${target_libs})
-
- # In case of re-running cmake, make sure the DLL_IMPORTS define for this
- # specific target is removed if the target looks like a library, since for
- # the actual library target we need to export, not import. (Don't want to
- # do this willy-nilly, since (for example) the rt exec target and the librt
- # library will both map to the same "UPPER_CORE" name...)
- if(T_DLL_DEFINES AND ${targetname} MATCHES "^lib*")
- string(REPLACE "lib" "" LOWERCORE "${targetname}")
- string(TOUPPER ${LOWERCORE} UPPER_CORE)
- list(REMOVE_ITEM T_DLL_DEFINES ${UPPER_CORE}_DLL_IMPORTS)
- endif(T_DLL_DEFINES AND ${targetname} MATCHES "^lib*")
-
- # No duplicate definitions needed
- if(T_DLL_DEFINES)
- list(REMOVE_DUPLICATES T_DLL_DEFINES)
- endif(T_DLL_DEFINES)
-
- # Send the finalized list back to the parent
- set(${G_DLL_DEFINES} ${T_DLL_DEFINES} PARENT_SCOPE)
-
- endif(G_DLL_DEFINES)
-
endfunction(GET_FLAGS_AND_DEFINITIONS)
# Determine the language for a target
@@ -254,7 +224,7 @@
# than build targets (less logic, simplifies dealing with OBJECT libraries.)
function(SET_FLAGS_AND_DEFINITIONS srcslist)
- cmake_parse_arguments(S "NO_STRICT_CXX" "TARGET"
"CFLAGS;CXXFLAGS;DEFINES;DLL_DEFINES" ${ARGN})
+ cmake_parse_arguments(S "NO_STRICT_CXX" "TARGET" "CFLAGS;CXXFLAGS;DEFINES"
${ARGN})
foreach(srcfile ${srcslist})
@@ -331,18 +301,6 @@
endforeach(srcfile ${srcslist})
- # If we have been supplied a target name, set the appropriate properties.
- if(S_TARGET)
- set_property(GLOBAL PROPERTY ${S_TARGET}_DEFINES "${S_DEFINES}")
- if(S_DLL_DEFINES)
- # Make sure we append here, since the target will probably already have
this property set.
- set_property(GLOBAL APPEND PROPERTY ${S_TARGET}_DLL_DEFINES
"${S_DLL_DEFINES}")
- foreach(tdef ${S_DLL_DEFINES})
- set_property(TARGET ${S_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS
"${tdef}")
- endforeach(tdef ${S_DLL_DEFINES})
- endif(S_DLL_DEFINES)
- endif(S_TARGET)
-
endfunction(SET_FLAGS_AND_DEFINITIONS)
@@ -375,10 +333,10 @@
# Use the list of libraries to be linked into this target to
# accumulate the necessary definitions and compilation flags.
- GET_FLAGS_AND_DEFINITIONS(${execname} "${libslist}" CFLAGS E_C_FLAGS
CXXFLAGS E_CXX_FLAGS DEFINES E_DEFINES DLL_DEFINES E_DLL_DEFINES)
+ GET_FLAGS_AND_DEFINITIONS(${execname} "${libslist}" CFLAGS E_C_FLAGS
CXXFLAGS E_CXX_FLAGS DEFINES E_DEFINES)
# Having built up the necessary sets, apply them
- SET_FLAGS_AND_DEFINITIONS("${srcslist}" TARGET ${execname} CFLAGS
"${E_C_FLAGS}" CXXFLAGS "${E_CXX_FLAGS}" DEFINES "${E_DEFINES}" DLL_DEFINES
"${E_DLL_DEFINES}")
+ SET_FLAGS_AND_DEFINITIONS("${srcslist}" TARGET ${execname} CFLAGS
"${E_C_FLAGS}" CXXFLAGS "${E_CXX_FLAGS}" DEFINES "${E_DEFINES}")
# If we have libraries to link, link them.
if(NOT "${libslist}" STREQUAL "" AND NOT "${libslist}" STREQUAL "NONE")
@@ -440,6 +398,11 @@
cmake_parse_arguments(L "SHARED;STATIC;NO_INSTALL;NO_STRICT;NO_STRICT_CXX"
"FOLDER" "SHARED_SRCS;STATIC_SRCS" ${ARGN})
+ # The naming convention used for variables is the upper case of the library
+ # name, without the lib prefix.
+ string(REPLACE "lib" "" LOWERCORE "${libname}")
+ string(TOUPPER ${LOWERCORE} UPPER_CORE)
+
# Let CMAKEFILES know what's going on
CMAKEFILES(${srcslist} ${L_SHARED_SRCS} ${L_STATIC_SRCS})
@@ -451,7 +414,6 @@
CFLAGS L_C_FLAGS
CXXFLAGS L_CXX_FLAGS
DEFINES L_DEFINES
- DLL_DEFINES L_DLL_DEFINES
)
# Local copy of srcslist in case manipulation is needed
@@ -472,8 +434,7 @@
target_compile_definitions(${libname}-obj PRIVATE BRLCADBUILD
HAVE_CONFIG_H)
if(HIDE_INTERNAL_SYMBOLS)
- string(REPLACE "lib" "" LOWERCORE "${libname}")
- string(TOUPPER ${LOWERCORE} UPPER_CORE)
+
set_property(TARGET ${libname}-obj APPEND PROPERTY COMPILE_DEFINITIONS
"${UPPER_CORE}_DLL_EXPORTS")
endif(HIDE_INTERNAL_SYMBOLS)
@@ -496,10 +457,8 @@
target_compile_definitions(${libname} PRIVATE BRLCADBUILD HAVE_CONFIG_H)
if(HIDE_INTERNAL_SYMBOLS)
- string(REPLACE "lib" "" LOWERCORE "${libname}")
- string(TOUPPER ${LOWERCORE} UPPER_CORE)
set_property(TARGET ${libname} APPEND PROPERTY COMPILE_DEFINITIONS
"${UPPER_CORE}_DLL_EXPORTS")
- set_property(GLOBAL APPEND PROPERTY ${libname}_DLL_DEFINES
"${UPPER_CORE}_DLL_IMPORTS")
+ set_property(TARGET ${libname} APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS "${UPPER_CORE}_DLL_IMPORTS")
endif(HIDE_INTERNAL_SYMBOLS)
endif(L_SHARED OR (BUILD_SHARED_LIBS AND NOT L_STATIC))
@@ -534,7 +493,6 @@
CFLAGS "${L_C_FLAGS}"
CXXFLAGS "${L_CXX_FLAGS}"
DEFINES "${L_DEFINES}"
- DLL_DEFINES "${L_DLL_DEFINES}"
)
# Extra static lib specific work
Modified: brlcad/branches/dm-fb-merge/misc/CMake/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/misc/CMake/CMakeLists.txt 2020-06-08
21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/misc/CMake/CMakeLists.txt 2020-06-09
00:02:58 UTC (rev 76078)
@@ -26,7 +26,6 @@
FindGL.cmake
FindIlmBase.cmake
FindLEMON.cmake
- FindLZ4.cmake
FindNETPBM.cmake
FindOPENNURBS.cmake
FindOSL.cmake
Deleted: brlcad/branches/dm-fb-merge/misc/CMake/FindLZ4.cmake
===================================================================
--- brlcad/branches/dm-fb-merge/misc/CMake/FindLZ4.cmake 2020-06-08
21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/misc/CMake/FindLZ4.cmake 2020-06-09
00:02:58 UTC (rev 76078)
@@ -1,64 +0,0 @@
-# F I N D L Z 4 . C M A K E
-# BRL-CAD
-#
-# Copyright (c) 2013-2020 United States Government as represented by
-# the U.S. Army Research Laboratory.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-#
-# 3. The name of the author may not be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-###
-# The following variables are set:
-#
-# LZ4_INCLUDE_DIRS - where to find lz4.h, etc.
-# LZ4_LIBRARIES - List of libraries when using lz4.
-# LZ4_FOUND - True if lz4 found.
-
-find_path(LZ4_INCLUDE_DIR lz4.h)
-find_library(LZ4_LIBRARY NAMES lz4 lz4lib)
-
-# We need LZ4_compress_fast - check for it
-if(LZ4_INCLUDE_DIR AND LZ4_LIBRARY)
- include(CheckLibraryExists)
- check_library_exists("${LZ4_LIBRARY}" "LZ4_compress_default" ""
HAVE_LZ4_COMPRESS_DEFAULT)
-endif(LZ4_INCLUDE_DIR AND LZ4_LIBRARY)
-
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR
HAVE_LZ4_COMPRESS_DEFAULT)
-
-IF (LZ4_FOUND)
- set(LZ4_INCLUDE_DIRS ${LZ4_INCLUDE_DIR})
- set(LZ4_LIBRARIES ${LZ4_LIBRARY})
-endif()
-
-# Local Variables:
-# tab-width: 8
-# mode: cmake
-# indent-tabs-mode: t
-# End:
-# ex: shiftwidth=2 tabstop=8
Index: brlcad/branches/dm-fb-merge/regress
===================================================================
--- brlcad/branches/dm-fb-merge/regress 2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/regress 2020-06-09 00:02:58 UTC (rev 76078)
Property changes on: brlcad/branches/dm-fb-merge/regress
___________________________________________________________________
Modified: svn:mergeinfo
## -8,4 +8,4 ##
/brlcad/branches/osg/regress:62110-62113
/brlcad/branches/prep-cache/regress:68236-68933
/brlcad/branches/tcltk86/regress:68300-75257
-/brlcad/trunk/regress:75512-75597,75630-76034,76038-76050
\ No newline at end of property
+/brlcad/trunk/regress:75512-75597,75630-76034,76038-76077
\ No newline at end of property
Modified: brlcad/branches/dm-fb-merge/regress/gchecker/regress-gchecker.cmake.in
===================================================================
--- brlcad/branches/dm-fb-merge/regress/gchecker/regress-gchecker.cmake.in
2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/regress/gchecker/regress-gchecker.cmake.in
2020-06-09 00:02:58 UTC (rev 76078)
@@ -35,7 +35,7 @@
if(gchecker_result)
file(APPEND "${LOGFILE}" "\n\nError: return code ${gchecker_result}")
- message(FATAL_ERROR "[gchecker] Failure, see ${CBDIR}/gchecker.log for more
info.\n")
+ message(FATAL_ERROR "[gchecker] Failure, see ${LOGFILE} for more info.\n")
endif(gchecker_result)
# Local Variables:
Modified: brlcad/branches/dm-fb-merge/regress/licenses/regress-licenses.cmake.in
===================================================================
--- brlcad/branches/dm-fb-merge/regress/licenses/regress-licenses.cmake.in
2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/regress/licenses/regress-licenses.cmake.in
2020-06-09 00:02:58 UTC (rev 76078)
@@ -12,7 +12,7 @@
if(license_result)
file(APPEND ${LOGFILE} "${license_log}\n")
- message(FATAL_ERROR "[license check] Failure: ${license_result}\n")
+ message(FATAL_ERROR "[license check] Failure: ${license_result} - see
details in log file: ${LOGFILE}\n")
endif(license_result)
# Local Variables:
Modified:
brlcad/branches/dm-fb-merge/regress/repository/regress-repository.cmake.in
===================================================================
--- brlcad/branches/dm-fb-merge/regress/repository/regress-repository.cmake.in
2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/regress/repository/regress-repository.cmake.in
2020-06-09 00:02:58 UTC (rev 76078)
@@ -10,7 +10,7 @@
)
if(repository_result)
file(APPEND ${LOGFILE} "${repository_log}\n")
- message(FATAL_ERROR "[repository check] Failure: ${license_result}\n")
+ message(FATAL_ERROR "[repository check] Failure: ${repository_result} - see
details in log file: ${LOGFILE}\n")
endif(repository_result)
# Local Variables:
Modified: brlcad/branches/dm-fb-merge/regress/user/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/regress/user/CMakeLists.txt 2020-06-08
21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/regress/user/CMakeLists.txt 2020-06-09
00:02:58 UTC (rev 76078)
@@ -20,8 +20,16 @@
# defintions or other magic specific to BRL-CAD's internal build.
add_executable(cad_user cad_user.c)
target_link_libraries(cad_user libged)
-target_include_directories(cad_user PUBLIC
"${CMAKE_BINARY_DIR}/${INCLUDE_DIR}/brlcad")
+# Include only the folder with the build-output headers (this will be a
+# superset of what will be installed, but is the best available option without
+# performing an actual install step.)
+if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
+ target_include_directories(cad_user PUBLIC
"${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${INCLUDE_DIR}/brlcad")
+else(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
+ target_include_directories(cad_user PUBLIC
"${CMAKE_BINARY_DIR}/${INCLUDE_DIR}/brlcad")
+endif(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
+
set_target_properties(cad_user PROPERTIES FOLDER "BRL-CAD Regression
Tests/user")
set(LOG_FILE "${CMAKE_CURRENT_BINARY_DIR}/regress-user.log")
@@ -30,6 +38,7 @@
CMAKEFILES(
CMakeLists.txt
+ cad_user.c
regress-user.cmake.in
)
Modified: brlcad/branches/dm-fb-merge/src/adrt/load_g.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/adrt/load_g.c 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/src/adrt/load_g.c 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -54,7 +54,7 @@
static void nmg_to_adrt_gcvwrite(struct nmgregion *r, const struct
db_full_path *pathp, int region_id, int material_id, float color[3], void
*client_data);
struct gcv_data {
- struct gcv_region_end_data region_end_data;
+ struct rt_region_end_data region_end_data;
struct adrt_mesh_s **meshes;
};
static struct gcv_data gcvwriter = {{nmg_to_adrt_gcvwrite, NULL}, NULL};
@@ -309,7 +309,7 @@
1, /* ncpu */
&tree_state, /* initial tree state */
nmg_to_adrt_regstart, /* region start function */
- gcv_region_end, /* region end function */
+ rt_region_end, /* region end function */
nmg_booltree_leaf_tess, /* leaf func */
(void *)&gcvwriter); /* client data */
Modified: brlcad/branches/dm-fb-merge/src/burst/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/src/burst/CMakeLists.txt 2020-06-08
21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/src/burst/CMakeLists.txt 2020-06-09
00:02:58 UTC (rev 76078)
@@ -33,10 +33,8 @@
ascii.h
burst.h
extern.h
- Hm.h
Mm.h
Sc.h
- trie.h
)
CMAKEFILES(${burst_noinst_HEADERS} burst.format)
Modified: brlcad/branches/dm-fb-merge/src/burst/Hm.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/burst/Hm.c 2020-06-08 21:00:54 UTC (rev
76077)
+++ brlcad/branches/dm-fb-merge/src/burst/Hm.c 2020-06-09 00:02:58 UTC (rev
76078)
@@ -33,7 +33,6 @@
#include "bu/file.h"
#include "./Sc.h"
-#include "./Hm.h"
#include "./Mm.h"
#include "./extern.h"
Deleted: brlcad/branches/dm-fb-merge/src/burst/Hm.h
===================================================================
--- brlcad/branches/dm-fb-merge/src/burst/Hm.h 2020-06-08 21:00:54 UTC (rev
76077)
+++ brlcad/branches/dm-fb-merge/src/burst/Hm.h 2020-06-09 00:02:58 UTC (rev
76078)
@@ -1,308 +0,0 @@
-/* H M . H
- * BRL-CAD
- *
- * Copyright (c) 2004-2020 United States Government as represented by
- * the U.S. Army Research Laboratory.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this file; see the file named COPYING for more
- * information.
- *
- */
-/** @file burst/Hm.h
- *
- * MUVES "Hm" (hierarchical menu) package definitions
- *
- * This software and documentation is derived in part from the
- * menuhit(9.3) manual pages (not source code) in AT&T 9th Edition
- * UNIX, Version 1 Programmer's Manual.
- *
- * The Hm package provides a pop-up menu implementation which uses a
- * terminal-independent screen management facility (Sc package) to
- * simulate the necessary graphics using the ASCII character set.
- * Only a few keyboard characters are required to control the menus,
- * but when possible, as with DMD terminals running a MYX terminal
- * emulator, the menus can be controlled with the mouse.
- */
-
-#ifndef BURST_HM_H
-#define BURST_HM_H
-
-
-/**
- * Each menu is defined by the following structure:
- *
- * typedef struct {
- * HmItem *item;
- * HmItem *(*generator)();
- * short prevtop;
- * short prevhit;
- * int sticky;
- * }
- * HmMenu;
- *
- * A menu can be built as an array of HmItem's, pointed to by item, or
- * with a generator function. If item is (HmItem *) 0, the generator
- * field is assumed to be valid. The generator function is passed an
- * integer parameter, and must return the pointer to an HmItem in a
- * static area (the result is only needed until the next call). The
- * n's are guaranteed to start at 0 and increase by 1 each invocation
- * until generator returns (HmItem *) 0. Prevtop will contain the
- * index of the menu item which appeared at the top of the menu the
- * last time it was displayed. Prevhit will contain the index of the
- * last item traversed (indices begin at 0). If sticky is true, the
- * menu will hang around after an entry is selected so that another
- * entry may be chosen and the menu must be exited explicitly with the
- * appropriate key-stroke or equivalent mouse operation. Otherwise,
- * the menu will exit after selection of an item (and any actions
- * resulting from that selection such as submenus have finished).
- * WARNING: if a menu is to be used more than once during recursive
- * calls to HmHit, there needs to be distinct copies (allocated
- * storage) since the item field is filled in by the generator
- * function, and the prevtop and prevhit fields should be private to
- * the current invocation of HmHit.
- */
-
-struct HmMenu;
-
-typedef struct
-{
- char *text; /* menu item string */
- char *help; /* help string */
- struct HmMenu *next; /* sub-menu pointer or NULL */
- void (*dfn)();
- void (*bfn)();
- void (*hfn)();
- long data;
-}
-HmItem;
-
-/**
- * Menu items are defined by the following structure:
- *
- * typedef struct {
- * char *text;
- * char *help;
- * HmMenu *next;
- * void (*dfn)();
- * void (*bfn)();
- * void (*hfn)();
- * long data;
- * }
- * HmItem;
- *
- * The text field will be displayed as the name of the item.
- * Characters with the 0200 bit set are regarded as fill characters.
- * For example, the string "\240X" will appear in the menu as a
- * right-justified X (040 is the ASCII space character). Menu strings
- * without fill characters are drawn centered in the menu. Whether
- * generated statically or dynamically, the list of HmItem's must be
- * terminated by a NULL text field. The help string will be displayed
- * when the user presses the help key. If next is not equal to
- * (HmMenu *) 0, it is assumed to point to a submenu, "dfn()" if
- * non-zero is called just before the submenu is invoked, and "bfn()"
- * likewise just afterwards. These functions are passed the current
- * menu item. If the menu item is selected and next is 0, "hfn()" is
- * called (if non-zero), also with the current menu item. The "data"
- * field is reserved for the user to pass information between these
- * functions and the calling routine.
- */
-typedef struct HmMenu
-{
- HmItem *item; /* List of menu items or 0. */
- HmItem *(*generator)(); /* If item == 0, generates items. */
- short prevtop; /* Top entry currently visible */
- short prevhit; /* Offset from top of last select */
- int sticky; /* If true, menu stays around after
- SELECT, and until QUIT. */
-}
-HmMenu;
-
-/* Structure used internally for screen management. These are stacked
- dynamically with calls to HmHit() such that the head of the chain
- is the current menu, and the end of the chain such that next is
- 0, is the top-level menu.
-*/
-typedef struct HmWin
-{
- struct HmWin *next; /* Parent of this menu. */
- HmMenu *menup; /* Address of menu data structure. */
- int menux; /* Position on screen where top-left */
- int menuy; /* corner of menu will be displayed. */
- int width; /* Width of menu, not including border. */
- int height; /* Number of menu entries. */
- int *dirty; /* Dynamically allocated bitmap. ON bits
- mean character needs a redraw. */
-}
-HmWindow;
-
-/**
- * int HmInit(int x, int y, int maxvis)
- *
- * HmInit() must be called before any other routines in the Hm package
- * to initialize the screen position of the top-left corner of the
- * top-level menu to x and y and to set the maximum number of menu
- * entries which will be visible at one time to maxvis. If the number
- * of entries in a menu exceeds maxvis, the menu will scroll to
- * accommodate them. The values of x, y and maxvis are stored in
- * these external variables:
- *
- * int HmLftMenu
- * int HmTopMenu
- * int HmMaxVis
- *
- * If this routine is not called, default parameters will be used.
- *
- * HmInit() also opens "/dev/tty" for input and stores its file
- * descriptor in HmTtyFd and associated stream handle in HmTtyFp.
- *
- * int HmTtyFd
- * FILE *HmTtyFp
- *
- * This routine returns true or false on success or failure to open
- * "/dev/tty".
- */
-extern int HmInit(int x, int y, int maxvis);
-extern FILE *HmTtyFp;
-extern int HmLftMenu;
-extern int HmTopMenu;
-extern int HmMaxVis;
-extern int HmLastMaxVis;
-extern int HmTtyFd;
-
-/**
- * HmItem *HmHit(HmMenu *menup)
- *
- * HmHit() presents the user with a menu specified by HmMenu pointer
- * menup and returns a pointer to the selected HmItem or 0 if nothing
- * was selected. The menu is presented to the user with the item
- * corresponding to prevhit (current item) highlighted. If a menu has
- * not been accessed yet, prevhit will be set to the first item. The
- * user may move the cursor to the item below the current one by
- * pressing the 'd' key, or move up by pressing the 'u'. If the user
- * presses 'h', the help message for the current item will be
- * displayed until another key is struck. To select an item, the user
- * presses the space bar. An actual selection has been made when the
- * selected item does not have a submenu, otherwise, it may be termed
- * a traversal of that item. Traversing an item does change the value
- * of prevhit, but is not final as the submenu can be exited by the
- * user pressing 'q', before selecting an item. In case the screen
- * becomes disturbed (i.e. by the output of another process), holding
- * down the CONTROL key and striking an 'l' will re-display all of the
- * menus.
- *
- * Both the help and warning (non-fatal error) messages will be
- * displayed in the one-line window at HmYCOMMO. For instance, if the
- * user hits any keys other than the ones mentioned above, an error
- * message will appear in this window. Also, a one-line window is
- * reserved for application prompts at HmYPROMPT. The prompt window
- * is cleared just prior to blocking on user input, and the message
- * window is cleared when the user provides input (strikes a key).
- *
- * If a menu has more items than can be displayed at once, the corners
- * of the menu will indicate this as follows:
- *
- * '+' means the adjacent displayed item is the actual first (or last
- * if a bottom corner) item in the menu.
- *
- * 'v' means that the entry displayed in the previous line is not the
- * last, and the menu can be scrolled upwards.
- *
- * '^' means that the entry displayed on the next line is not actually
- * the first, and the menu can be scrolled downwards.
- *
- * Attempting to move the cursor below the bottom entry of the menu
- * will cause the menu to scroll half a page or until the entries run
- * out, which ever comes first. If there are no entries to scroll the
- * terminal will beep. The analogous holds true for attempting to
- * move upward past the top entry of the menu. If a DMD terminal with
- * MYX running is used, a special cursor will appear, and the user may
- * use the mouse rather than the keyboard as follows: Clicking button
- * 1 of the mouse while the cursor is outside the "current menu", will
- * cause the terminal to beep. If the cursor is on an item, that item
- * will be made "current". If on the "current" item, that item will
- * be selected. If on the top border of the current menu, that menu
- * will scroll down if possible, and if not, that menu will exit. If
- * on the bottom border, that menu will scroll upward if possible and
- * beep if not.
- */
- extern HmItem *HmHit(HmMenu *menup);
-
-/**
- * void HmRedraw(void)
- *
- * HmRedraw() will force the entire set of active menus to be redrawn
- * on the next call to HmHit(). This is useful when an application
- * interferes with the portion of the screen used by the Hm package
- * (from HmTopMenu to HmYCOMMO).
-**/
-extern void HmRedraw(void);
-
-/**
- * void HmError(const char *string)
- *
- * HmError() will display string on line HmYCOMMO.
- */
-extern void HmError(const char *str);
-
-#define HmYCOMMO (HmTopMenu+HmMaxVis+HmHGTBORDER)
-#define HmYPROMPT (HmYCOMMO+1)
-#define HmXPROMPT 1
-#define HmYBORDER (HmYPROMPT+1)
-
-/**
- * int HmGetchar(void)
- * int HmUngetchar(int c)
- *
- * HmGetchar() and HmUngetchar() are used by the Hm package to read a
- * character from the keyboard and to stuff one character back on the
- * input stream. They may be both be supplied by the application if
- * the default behavior is not desirable. HmGetchar() returns the
- * next character on the standard input. This command will block
- * until input is available. HmUngetchar() inserts the character c on
- * the standard input. An EOF will be returned if this is not
- * possible or c is equal to EOF. In general, this is guaranteed to
- * work for one character assuming that something has already been
- * read with HmGetchar() and the input stream is buffered.
- */
-extern int HmGetchar(void);
-extern int HmUngetchar(int c);
-
-/**
- * void HmTtySet(void)
- * void HmTtyReset(void)
- *
- * HmTtySet() and HmTtyReset() set/restore the terminal modes for the
- * menus to work properly. These are mainly internal routines which
- * are called from HmHit(), but are provided in case an escape from
- * the program is provided by the application or job control is
- * enabled in the underlying shell, in which case, these routines can
- * be called from a menu function or signal handler.
- */
-extern void HmTtySet();
-extern void HmTtyReset();
-
-
-#define HmMAXLINE 132
-#define HmHGTBORDER 2
-
-#endif /* BURST_HM_H */
-
-/*
- * Local Variables:
- * mode: C
- * tab-width: 8
- * indent-tabs-mode: t
- * c-file-style: "stroustrup"
- * End:
- * ex: shiftwidth=4 tabstop=8
- */
Modified: brlcad/branches/dm-fb-merge/src/burst/HmGetc.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/burst/HmGetc.c 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/src/burst/HmGetc.c 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -28,7 +28,6 @@
#include <signal.h>
#include "./burst.h"
-#include "./Hm.h"
int
HmGetchar(void)
Modified: brlcad/branches/dm-fb-merge/src/burst/burst.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/burst/burst.c 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/src/burst/burst.c 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -38,7 +38,6 @@
#include "bu/vls.h"
#include "./burst.h"
-#include "./trie.h"
#include "./extern.h"
#include "./ascii.h"
@@ -159,6 +158,7 @@
int
main(int argc, const char *argv[])
{
+ struct burst_state s;
const char *bfile = NULL;
int burst_opt; /* unused, for option compatibility */
int plot_lines = 0;
@@ -175,6 +175,9 @@
BU_OPT(d[2], "b", "", "", NULL, &burst_opt, "Batch mode");
BU_OPT_NULL(d[3]);
+ burst_state_init(&s);
+
+
/* Interactive mode is gone - until we strip all the leftovers out
* of the code, let it know we're not in tty mode */
tty = 0;
@@ -259,6 +262,123 @@
exit(code);
}
+void
+burst_state_init(struct burst_state *s)
+{
+ //Colors colorids;
+ s->fbiop = NULL;
+ s->burstfp = NULL;
+ s->gridfp = NULL;
+ s->histfp = NULL;
+ s->outfp = NULL;
+ s->plotfp = NULL;
+ s->shotfp = NULL;
+ s->shotlnfp = NULL;
+ s->tmpfp = NULL;
+ s->mainhmenu = NULL;
+ //Ids airids;
+ //Ids armorids;
+ //Ids critids;
+ s->pixgrid = NULL;
+ VSET(s->pixaxis, 255, 0, 0);
+ VSET(s->pixbhit, 200, 255, 200);
+ VSET(s->pixbkgr, 150, 100, 255);
+ VSET(s->pixblack, 0, 0, 0);
+ VSET(s->pixcrit, 255, 200, 200);
+ VSET(s->pixghit, 255, 0, 255);
+ VSET(s->pixmiss, 200, 200, 200);
+ VSET(s->pixtarg, 255, 255, 255);
+ s->cmdtrie = NULL;
+ s->plotline = 0;
+ s->batchmode = 0;
+ s->cantwarhead = 0;
+ s->deflectcone = DFL_DEFLECT;
+ s->dithercells = DFL_DITHER;
+ s->fatalerror = 0;
+ s->groundburst = 0;
+ s->reportoverlaps = DFL_OVERLAPS;
+ s->reqburstair = 1;
+ s->shotburst = 0;
+ s->tty = 1;
+ s->userinterrupt = 0;
+ memset(s->airfile, 0, LNBUFSZ);
+ memset(s->armorfile, 0, LNBUFSZ);
+ memset(s->burstfile, 0, LNBUFSZ);
+ memset(s->cmdbuf, 0, LNBUFSZ);
+ memset(s->cmdname, 0, LNBUFSZ);
+ memset(s->colorfile, 0, LNBUFSZ);
+ memset(s->critfile, 0, LNBUFSZ);
+ memset(s->errfile, 0, LNBUFSZ);
+ memset(s->fbfile, 0, LNBUFSZ);
+ memset(s->gedfile, 0, LNBUFSZ);
+ memset(s->gridfile, 0, LNBUFSZ);
+ memset(s->histfile, 0, LNBUFSZ);
+ memset(s->objects, 0, LNBUFSZ);
+ memset(s->outfile, 0, LNBUFSZ);
+ memset(s->plotfile, 0, LNBUFSZ);
+ memset(s->scrbuf, 0, LNBUFSZ);
+ memset(s->scriptfile, 0, LNBUFSZ);
+ memset(s->shotfile, 0, LNBUFSZ);
+ memset(s->shotlnfile, 0, LNBUFSZ);
+ memset(s->title, 0, TITLE_LEN);
+ memset(s->timer, 0, TIMER_LEN);
+ memset(s->tmpfname, 0, TIMER_LEN);
+ s->cmdptr = NULL;
+ s->bdist = DFL_BDIST;
+ VSET(s->burstpoint, 0.0, 0.0, 0.0);
+ s->cellsz = DFL_CELLSIZE;
+ s->conehfangle = DFL_CONEANGLE;
+ VSET(s->fire, 0.0, 0.0, 0.0);
+ s->griddn = 0.0;
+ s->gridlf = 0.0;
+ s->gridrt = 0.0;
+ s->gridup = 0.0;
+ VSET(s->gridhor, 0.0, 0.0, 0.0);
+ VSET(s->gridsoff, 0.0, 0.0, 0.0);
+ VSET(s->gridver, 0.0, 0.0, 0.0);
+ s->grndbk = 0.0;
+ s->grndht = 0.0;
+ s->grndfr = 0.0;
+ s->grndlf = 0.0;
+ s->grndrt = 0.0;
+ VSET(s->modlcntr, 0.0, 0.0, 0.0);
+ s->modldn = 0.0;
+ s->modllf = 0.0;
+ s->modlrt = 0.0;
+ s->modlup = 0.0;
+ s->raysolidangle = 0.0;
+ s->standoff = 0.0;
+ s->unitconv = 1.0;
+ s->viewazim = DFL_AZIMUTH;
+ s->viewelev = DFL_ELEVATION;
+ s->pitch = 0.0;
+ s->yaw = 0.0;
+ VSET(s->xaxis, 1.0, 0.0, 0.0);
+ VSET(s->zaxis, 0.0, 0.0, 1.0);
+ VSET(s->negzaxis, 0.0, 0.0, -1.0);
+ co = 0;
+ devwid = 0;
+ devhgt = 0;
+ firemode = FM_DFLT;
+ gridsz = 512;
+ gridxfin = 0;
+ gridyfin = 0;
+ gridxorg = 0;
+ gridyorg = 0;
+ gridwidth = 0;
+ gridheight = 0;
+ li = 0;
+ nbarriers = DFL_BARRIERS;
+ noverlaps = 0;
+ nprocessors = 0;
+ nriplevels = DFL_RIPLEVELS;
+ s->nspallrays = DFL_NRAYS;
+ s->units = DFL_UNITS;
+ s->zoom = 1;
+ s->rtip = RTI_NULL;
+ s->norml_sig = NULL; /* active during interactive operation */
+ s->abort_sig = NULL; /* active during ray tracing only */
+}
/*
* Local Variables:
Modified: brlcad/branches/dm-fb-merge/src/burst/burst.h
===================================================================
--- brlcad/branches/dm-fb-merge/src/burst/burst.h 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/src/burst/burst.h 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -26,11 +26,13 @@
#define BURST_BURST_H
#include "common.h"
+#include <stdio.h>
+#include <signal.h>
-/* for void **/
#include "vmath.h"
+#include "fb.h"
+#include "raytrace.h"
-
/* NSIG not always defined in <signal.h> */
#ifndef NSIG
# define NSIG 64
@@ -214,6 +216,443 @@
#define PT_Q_NULL (Pt_Queue *) 0
+/*
+ * MUVES "Hm" (hierarchical menu) package definitions
+ *
+ * This software and documentation is derived in part from the
+ * menuhit(9.3) manual pages (not source code) in AT&T 9th Edition
+ * UNIX, Version 1 Programmer's Manual.
+ *
+ * The Hm package provides a pop-up menu implementation which uses a
+ * terminal-independent screen management facility (Sc package) to
+ * simulate the necessary graphics using the ASCII character set.
+ * Only a few keyboard characters are required to control the menus,
+ * but when possible, as with DMD terminals running a MYX terminal
+ * emulator, the menus can be controlled with the mouse.
+ */
+/**
+ * Each menu is defined by the following structure:
+ *
+ * typedef struct {
+ * HmItem *item;
+ * HmItem *(*generator)();
+ * short prevtop;
+ * short prevhit;
+ * int sticky;
+ * }
+ * HmMenu;
+ *
+ * A menu can be built as an array of HmItem's, pointed to by item, or
+ * with a generator function. If item is (HmItem *) 0, the generator
+ * field is assumed to be valid. The generator function is passed an
+ * integer parameter, and must return the pointer to an HmItem in a
+ * static area (the result is only needed until the next call). The
+ * n's are guaranteed to start at 0 and increase by 1 each invocation
+ * until generator returns (HmItem *) 0. Prevtop will contain the
+ * index of the menu item which appeared at the top of the menu the
+ * last time it was displayed. Prevhit will contain the index of the
+ * last item traversed (indices begin at 0). If sticky is true, the
+ * menu will hang around after an entry is selected so that another
+ * entry may be chosen and the menu must be exited explicitly with the
+ * appropriate key-stroke or equivalent mouse operation. Otherwise,
+ * the menu will exit after selection of an item (and any actions
+ * resulting from that selection such as submenus have finished).
+ * WARNING: if a menu is to be used more than once during recursive
+ * calls to HmHit, there needs to be distinct copies (allocated
+ * storage) since the item field is filled in by the generator
+ * function, and the prevtop and prevhit fields should be private to
+ * the current invocation of HmHit.
+ */
+
+struct HmMenu;
+
+typedef struct
+{
+ char *text; /* menu item string */
+ char *help; /* help string */
+ struct HmMenu *next; /* sub-menu pointer or NULL */
+ void (*dfn)();
+ void (*bfn)();
+ void (*hfn)();
+ long data;
+}
+HmItem;
+
+/**
+ * Menu items are defined by the following structure:
+ *
+ * typedef struct {
+ * char *text;
+ * char *help;
+ * HmMenu *next;
+ * void (*dfn)();
+ * void (*bfn)();
+ * void (*hfn)();
+ * long data;
+ * }
+ * HmItem;
+ *
+ * The text field will be displayed as the name of the item.
+ * Characters with the 0200 bit set are regarded as fill characters.
+ * For example, the string "\240X" will appear in the menu as a
+ * right-justified X (040 is the ASCII space character). Menu strings
+ * without fill characters are drawn centered in the menu. Whether
+ * generated statically or dynamically, the list of HmItem's must be
+ * terminated by a NULL text field. The help string will be displayed
+ * when the user presses the help key. If next is not equal to
+ * (HmMenu *) 0, it is assumed to point to a submenu, "dfn()" if
+ * non-zero is called just before the submenu is invoked, and "bfn()"
+ * likewise just afterwards. These functions are passed the current
+ * menu item. If the menu item is selected and next is 0, "hfn()" is
+ * called (if non-zero), also with the current menu item. The "data"
+ * field is reserved for the user to pass information between these
+ * functions and the calling routine.
+ */
+typedef struct HmMenu
+{
+ HmItem *item; /* List of menu items or 0. */
+ HmItem *(*generator)(); /* If item == 0, generates items. */
+ short prevtop; /* Top entry currently visible */
+ short prevhit; /* Offset from top of last select */
+ int sticky; /* If true, menu stays around after
+ SELECT, and until QUIT. */
+}
+HmMenu;
+
+/* Structure used internally for screen management. These are stacked
+ dynamically with calls to HmHit() such that the head of the chain
+ is the current menu, and the end of the chain such that next is
+ 0, is the top-level menu.
+*/
+typedef struct HmWin
+{
+ struct HmWin *next; /* Parent of this menu. */
+ HmMenu *menup; /* Address of menu data structure. */
+ int menux; /* Position on screen where top-left */
+ int menuy; /* corner of menu will be displayed. */
+ int width; /* Width of menu, not including border. */
+ int height; /* Number of menu entries. */
+ int *dirty; /* Dynamically allocated bitmap. ON bits
+ mean character needs a redraw. */
+}
+HmWindow;
+
+/**
+ * int HmInit(int x, int y, int maxvis)
+ *
+ * HmInit() must be called before any other routines in the Hm package
+ * to initialize the screen position of the top-left corner of the
+ * top-level menu to x and y and to set the maximum number of menu
+ * entries which will be visible at one time to maxvis. If the number
+ * of entries in a menu exceeds maxvis, the menu will scroll to
+ * accommodate them. The values of x, y and maxvis are stored in
+ * these external variables:
+ *
+ * int HmLftMenu
+ * int HmTopMenu
+ * int HmMaxVis
+ *
+ * If this routine is not called, default parameters will be used.
+ *
+ * HmInit() also opens "/dev/tty" for input and stores its file
+ * descriptor in HmTtyFd and associated stream handle in HmTtyFp.
+ *
+ * int HmTtyFd
+ * FILE *HmTtyFp
+ *
+ * This routine returns true or false on success or failure to open
+ * "/dev/tty".
+ */
+extern int HmInit(int x, int y, int maxvis);
+extern FILE *HmTtyFp;
+extern int HmLftMenu;
+extern int HmTopMenu;
+extern int HmMaxVis;
+extern int HmLastMaxVis;
+extern int HmTtyFd;
+
+/**
+ * HmItem *HmHit(HmMenu *menup)
+ *
+ * HmHit() presents the user with a menu specified by HmMenu pointer
+ * menup and returns a pointer to the selected HmItem or 0 if nothing
+ * was selected. The menu is presented to the user with the item
+ * corresponding to prevhit (current item) highlighted. If a menu has
+ * not been accessed yet, prevhit will be set to the first item. The
+ * user may move the cursor to the item below the current one by
+ * pressing the 'd' key, or move up by pressing the 'u'. If the user
+ * presses 'h', the help message for the current item will be
+ * displayed until another key is struck. To select an item, the user
+ * presses the space bar. An actual selection has been made when the
+ * selected item does not have a submenu, otherwise, it may be termed
+ * a traversal of that item. Traversing an item does change the value
+ * of prevhit, but is not final as the submenu can be exited by the
+ * user pressing 'q', before selecting an item. In case the screen
+ * becomes disturbed (i.e. by the output of another process), holding
+ * down the CONTROL key and striking an 'l' will re-display all of the
+ * menus.
+ *
+ * Both the help and warning (non-fatal error) messages will be
+ * displayed in the one-line window at HmYCOMMO. For instance, if the
+ * user hits any keys other than the ones mentioned above, an error
+ * message will appear in this window. Also, a one-line window is
+ * reserved for application prompts at HmYPROMPT. The prompt window
+ * is cleared just prior to blocking on user input, and the message
+ * window is cleared when the user provides input (strikes a key).
+ *
+ * If a menu has more items than can be displayed at once, the corners
+ * of the menu will indicate this as follows:
+ *
+ * '+' means the adjacent displayed item is the actual first (or last
+ * if a bottom corner) item in the menu.
+ *
+ * 'v' means that the entry displayed in the previous line is not the
+ * last, and the menu can be scrolled upwards.
+ *
+ * '^' means that the entry displayed on the next line is not actually
+ * the first, and the menu can be scrolled downwards.
+ *
+ * Attempting to move the cursor below the bottom entry of the menu
+ * will cause the menu to scroll half a page or until the entries run
+ * out, which ever comes first. If there are no entries to scroll the
+ * terminal will beep. The analogous holds true for attempting to
+ * move upward past the top entry of the menu. If a DMD terminal with
+ * MYX running is used, a special cursor will appear, and the user may
+ * use the mouse rather than the keyboard as follows: Clicking button
+ * 1 of the mouse while the cursor is outside the "current menu", will
+ * cause the terminal to beep. If the cursor is on an item, that item
+ * will be made "current". If on the "current" item, that item will
+ * be selected. If on the top border of the current menu, that menu
+ * will scroll down if possible, and if not, that menu will exit. If
+ * on the bottom border, that menu will scroll upward if possible and
+ * beep if not.
+ */
+ extern HmItem *HmHit(HmMenu *menup);
+
+/**
+ * void HmRedraw(void)
+ *
+ * HmRedraw() will force the entire set of active menus to be redrawn
+ * on the next call to HmHit(). This is useful when an application
+ * interferes with the portion of the screen used by the Hm package
+ * (from HmTopMenu to HmYCOMMO).
+**/
+extern void HmRedraw(void);
+
+/**
+ * void HmError(const char *string)
+ *
+ * HmError() will display string on line HmYCOMMO.
+ */
+extern void HmError(const char *str);
+
+#define HmYCOMMO (HmTopMenu+HmMaxVis+HmHGTBORDER)
+#define HmYPROMPT (HmYCOMMO+1)
+#define HmXPROMPT 1
+#define HmYBORDER (HmYPROMPT+1)
+
+/**
+ * int HmGetchar(void)
+ * int HmUngetchar(int c)
+ *
+ * HmGetchar() and HmUngetchar() are used by the Hm package to read a
+ * character from the keyboard and to stuff one character back on the
+ * input stream. They may be both be supplied by the application if
+ * the default behavior is not desirable. HmGetchar() returns the
+ * next character on the standard input. This command will block
+ * until input is available. HmUngetchar() inserts the character c on
+ * the standard input. An EOF will be returned if this is not
+ * possible or c is equal to EOF. In general, this is guaranteed to
+ * work for one character assuming that something has already been
+ * read with HmGetchar() and the input stream is buffered.
+ */
+extern int HmGetchar(void);
+extern int HmUngetchar(int c);
+
+/**
+ * void HmTtySet(void)
+ * void HmTtyReset(void)
+ *
+ * HmTtySet() and HmTtyReset() set/restore the terminal modes for the
+ * menus to work properly. These are mainly internal routines which
+ * are called from HmHit(), but are provided in case an escape from
+ * the program is provided by the application or job control is
+ * enabled in the underlying shell, in which case, these routines can
+ * be called from a menu function or signal handler.
+ */
+extern void HmTtySet();
+extern void HmTtyReset();
+
+
+#define HmMAXLINE 132
+#define HmHGTBORDER 2
+
+#ifdef NULL_FUNC
+# undef NULL_FUNC
+#endif
+
+#define NULL_FUNC ((Func *) NULL)
+#define TRIE_NULL ((Trie *) NULL)
+
+/* Datum for trie leaves. */
+typedef void Func();
+
+/* Trie tree node. */
+typedef union trie Trie;
+union trie {
+ struct {
+ /* Internal nodes: datum is current letter. */
+ int t_char; /* Current letter. */
+ Trie *t_altr; /* Alternate letter node link. */
+ Trie *t_next; /* Next letter node link. */
+ }
+ n;
+ struct {
+ /* Leaf nodes: datum is function ptr. */
+ Func *t_func; /* Function pointer. */
+ Trie *t_altr; /* Alternate letter node link. */
+ Trie *t_next; /* Next letter node link. */
+ }
+ l;
+};
+#define NewTrie(p) if (((p) = (Trie *) malloc(sizeof(Trie))) == TRIE_NULL) {\
+ Malloc_Bomb(sizeof(Trie));\
+ return TRIE_NULL;\
+}
+extern Trie *cmd_trie;
+
+
+struct burst_state {
+ Colors colorids; /* ident range to color mappings for plots */
+ fb *fbiop; /* frame buffer specific access from libfb */
+ FILE *burstfp; /* input stream for burst point locations */
+ FILE *gridfp; /* grid file output stream (2-d shots) */
+ FILE *histfp; /* histogram output stream (statistics) */
+ FILE *outfp; /* burst point library output stream */
+ FILE *plotfp; /* 3-D UNIX plot stream (debugging) */
+ FILE *shotfp; /* input stream for shot positions */
+ FILE *shotlnfp; /* shotline file output stream */
+ FILE *tmpfp; /* temporary file output stream for logging
input */
+ HmMenu *mainhmenu; /* */
+ Ids airids; /* burst air idents */
+ Ids armorids; /* burst armor idents */
+ Ids critids; /* critical component idents */
+ unsigned char *pixgrid; /* */
+ unsigned char pixaxis[3]; /* grid axis */
+ unsigned char pixbhit[3]; /* burst ray hit non-critical comps */
+ unsigned char pixbkgr[3]; /* outside grid */
+ unsigned char pixblack[3]; /* black */
+ unsigned char pixcrit[3]; /* burst ray hit critical component */
+ unsigned char pixghit[3]; /* ground burst */
+ unsigned char pixmiss[3]; /* shot missed target */
+ unsigned char pixtarg[3]; /* shot hit target */
+ Trie *cmdtrie; /* */
+
+ int plotline; /* boolean for plot lines (otherwise plots
points) */
+ int batchmode; /* are we processing batch input now */
+ int cantwarhead; /* pitch or yaw will be applied to warhead */
+ int deflectcone; /* cone axis deflects towards normal */
+ int dithercells; /* if true, randomize shot within cell */
+ int fatalerror; /* must abort ray tracing */
+ int groundburst; /* if true, burst on imaginary ground */
+ int reportoverlaps; /* if true, overlaps are reported */
+ int reqburstair; /* if true, burst air required for shotburst */
+ int shotburst; /* if true, burst along shotline */
+ int tty; /* if true, full screen display is used */
+ int userinterrupt; /* has the ray trace been interrupted */
+
+ char airfile[LNBUFSZ]; /* input file name for burst air ids */
+ char armorfile[LNBUFSZ]; /* input file name for burst armor ids */
+ char burstfile[LNBUFSZ]; /* input file name for burst points */
+ char cmdbuf[LNBUFSZ]; /* */
+ char cmdname[LNBUFSZ]; /* */
+ char colorfile[LNBUFSZ]; /* ident range-to-color file name */
+ char critfile[LNBUFSZ]; /* input file for critical components */
+ char errfile[LNBUFSZ]; /* errors/diagnostics log file name */
+ char fbfile[LNBUFSZ]; /* frame buffer image file name */
+ char gedfile[LNBUFSZ]; /* MGED data base file name */
+ char gridfile[LNBUFSZ]; /* saved grid (2-d shots) file name */
+ char histfile[LNBUFSZ]; /* histogram file name (statistics) */
+ char objects[LNBUFSZ]; /* list of objects from MGED file */
+ char outfile[LNBUFSZ]; /* burst point library output file name */
+ char plotfile[LNBUFSZ]; /* 3-D UNIX plot file name (debugging) */
+ char scrbuf[LNBUFSZ]; /* scratch buffer for temporary use */
+ char scriptfile[LNBUFSZ]; /* shell script file name */
+ char shotfile[LNBUFSZ]; /* input file of firing coordinates */
+ char shotlnfile[LNBUFSZ]; /* shotline output file name */
+ char title[TITLE_LEN]; /* title of MGED target description */
+ char timer[TIMER_LEN]; /* CPU usage statistics */
+ char tmpfname[TIMER_LEN]; /* temporary file for logging input */
+ char *cmdptr; /* */
+
+ fastf_t bdist; /* fusing distance for warhead */
+ fastf_t burstpoint[3]; /* explicit burst point coordinates */
+ fastf_t cellsz; /* shotline separation */
+ fastf_t conehfangle; /* spall cone half angle */
+ fastf_t fire[3]; /* explicit firing coordinates (2-D or 3-D) */
+ fastf_t griddn; /* distance in model coordinates from origin to
bottom border of grid */
+ fastf_t gridlf; /* distance to left border */
+ fastf_t gridrt; /* distance to right border */
+ fastf_t gridup; /* distance to top border */
+ fastf_t gridhor[3]; /* horizontal grid direction cosines */
+ fastf_t gridsoff[3]; /* origin of grid translated by stand-off */
+ fastf_t gridver[3]; /* vertical grid direction cosines */
+ fastf_t grndbk; /* distance to back border of ground plane (-X)
*/
+ fastf_t grndht; /* distance of ground plane below target origin
(-Z) */
+ fastf_t grndfr; /* distance to front border of ground plane
(+X) */
+ fastf_t grndlf; /* distance to left border of ground plane (+Y)
*/
+ fastf_t grndrt; /* distance to right border of ground plane
(-Y) */
+ fastf_t modlcntr[3]; /* centroid of target's bounding RPP */
+ fastf_t modldn; /* distance in model coordinates from origin to
bottom extent of projection of model in grid plane */
+ fastf_t modllf; /* distance to left extent */
+ fastf_t modlrt; /* distance to right extent */
+ fastf_t modlup; /* distance to top extent */
+ fastf_t raysolidangle; /* solid angle per spall sampling ray */
+ fastf_t standoff; /* distance from model origin to grid */
+ fastf_t unitconv; /* units conversion factor (mm to "units") */
+ fastf_t viewazim; /* degrees from X-axis to firing position */
+ fastf_t viewelev; /* degrees from XY-plane to firing position */
+
+ /* These are the angles and fusing distance used to specify the path of
+ the canted warhead in Bob Wilson's simulation.
+ */
+ fastf_t pitch; /* elevation above path of main penetrator */
+ fastf_t yaw; /* deviation right of path of main penetrator */
+
+ /* useful vectors */
+ fastf_t xaxis[3];
+ fastf_t zaxis[3];
+ fastf_t negzaxis[3];
+
+ int co; /* columns of text displayable on video
screen */
+ int devwid; /* width in pixels of frame buffer window */
+ int devhgt; /* height in pixels of frame buffer window */
+ int firemode; /* mode of specifying shots */
+ int gridsz;
+ int gridxfin;
+ int gridyfin;
+ int gridxorg;
+ int gridyorg;
+ int gridwidth; /* Grid width in cells. */
+ int gridheight; /* Grid height in cells. */
+ int li; /* lines of text displayable on video
screen */
+ int nbarriers; /* no. of barriers allowed to critical comp */
+ int noverlaps; /* no. of overlaps encountered in this view */
+ int nprocessors; /* no. of processors running concurrently */
+ int nriplevels; /* no. of levels of ripping (0 = no ripping) */
+ int nspallrays; /* no. of spall rays at each burst point */
+ int units; /* target units (default is millimeters) */
+ int zoom; /* magnification factor on frame buffer */
+
+ struct rt_i *rtip; /* model specific access from librt */
+
+ /* signal handlers */
+ void (*norml_sig)(); /* active during interactive operation */
+ void (*abort_sig)(); /* active during ray tracing only */
+};
+
+void burst_state_init(struct burst_state *s);
+
#endif /* BURST_BURST_H */
/*
Modified: brlcad/branches/dm-fb-merge/src/burst/extern.h
===================================================================
--- brlcad/branches/dm-fb-merge/src/burst/extern.h 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/src/burst/extern.h 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -34,8 +34,6 @@
#include "dm.h"
#include "./burst.h"
-#include "./trie.h"
-#include "./Hm.h"
/* External functions from application. */
Modified: brlcad/branches/dm-fb-merge/src/burst/trie.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/burst/trie.c 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/src/burst/trie.c 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -31,7 +31,6 @@
#include "bu/log.h"
#include "./burst.h"
-#include "./trie.h"
#include "./extern.h"
#include "./ascii.h"
Deleted: brlcad/branches/dm-fb-merge/src/burst/trie.h
===================================================================
--- brlcad/branches/dm-fb-merge/src/burst/trie.h 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/src/burst/trie.h 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -1,71 +0,0 @@
-/* T R I E . H
- * BRL-CAD
- *
- * Copyright (c) 2004-2020 United States Government as represented by
- * the U.S. Army Research Laboratory.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this file; see the file named COPYING for more
- * information.
- *
- */
-/** @file burst/trie.h
- *
- */
-
-#ifndef BURST_TRIE_H
-#define BURST_TRIE_H
-
-#ifdef NULL_FUNC
-# undef NULL_FUNC
-#endif
-
-#define NULL_FUNC ((Func *) NULL)
-#define TRIE_NULL ((Trie *) NULL)
-
-/* Datum for trie leaves. */
-typedef void Func();
-
-/* Trie tree node. */
-typedef union trie Trie;
-union trie {
- struct {
- /* Internal nodes: datum is current letter. */
- int t_char; /* Current letter. */
- Trie *t_altr; /* Alternate letter node link. */
- Trie *t_next; /* Next letter node link. */
- }
- n;
- struct {
- /* Leaf nodes: datum is function ptr. */
- Func *t_func; /* Function pointer. */
- Trie *t_altr; /* Alternate letter node link. */
- Trie *t_next; /* Next letter node link. */
- }
- l;
-};
-#define NewTrie(p) if (((p) = (Trie *) malloc(sizeof(Trie))) == TRIE_NULL) {\
- Malloc_Bomb(sizeof(Trie));\
- return TRIE_NULL;\
-}
-extern Trie *cmd_trie;
-#endif /* BURST_TRIE_H */
-
-/*
- * Local Variables:
- * mode: C
- * tab-width: 8
- * indent-tabs-mode: t
- * c-file-style: "stroustrup"
- * End:
- * ex: shiftwidth=4 tabstop=8
- */
Modified: brlcad/branches/dm-fb-merge/src/burst/ui.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/burst/ui.c 2020-06-08 21:00:54 UTC (rev
76077)
+++ brlcad/branches/dm-fb-merge/src/burst/ui.c 2020-06-09 00:02:58 UTC (rev
76078)
@@ -38,7 +38,6 @@
#include "./Sc.h"
#include "./Mm.h"
#include "./burst.h"
-#include "./trie.h"
#include "./extern.h"
#include "./ascii.h"
Modified: brlcad/branches/dm-fb-merge/src/conv/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/src/conv/CMakeLists.txt 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/src/conv/CMakeLists.txt 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -57,10 +57,8 @@
BRLCAD_ADDEXEC(g-dot g-dot.c "libged;libbu")
BRLCAD_ADDEXEC(g-dxf dxf/g-dxf.c "librt;libgcv;libnmg;libbu")
-add_dependencies(g-dxf libgcv_plugins)
-BRLCAD_ADDEXEC(g-egg g-egg.c "libwdb;libgcv;libnmg")
-add_dependencies(g-egg libgcv_plugins)
+BRLCAD_ADDEXEC(g-egg g-egg.c "libwdb;librt;libgcv;libnmg")
BRLCAD_ADDEXEC(g-nff g-nff.c "libwdb;libnmg;${M_LIBRARY}")
Modified: brlcad/branches/dm-fb-merge/src/conv/dxf/g-dxf.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/conv/dxf/g-dxf.c 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/src/conv/dxf/g-dxf.c 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -366,7 +366,7 @@
}
-static struct gcv_region_end_data gcvwriter = {nmg_to_dxf, NULL};
+static struct rt_region_end_data gcvwriter = {nmg_to_dxf, NULL};
/**
@@ -378,7 +378,7 @@
* 4. db_walk_tree (get_layer) for layer names only
* 5. Initialize tree_state
* 6. Initialize model (nmg)\
- * 7. db_walk_tree (gcv_region_end)
+ * 7. db_walk_tree (rt_region_end)
* 8. Cleanup
*/
int
@@ -532,9 +532,9 @@
1, /* ncpu */
&tree_state,
0, /* take all regions */
- gcv_region_end,
+ rt_region_end,
nmg_booltree_leaf_tess,
- (void *)&gcvwriter); /* callback for gcv_region_end
*/
+ (void *)&gcvwriter); /* callback for rt_region_end */
percent = 0;
if (regions_tried>0) {
Modified: brlcad/branches/dm-fb-merge/src/conv/g-egg.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/conv/g-egg.c 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/src/conv/g-egg.c 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -38,8 +38,6 @@
#include <string.h>
#include "bio.h"
-#include "gcv.h"
-
/* interface headers */
#include "bu/app.h"
#include "bu/getopt.h"
@@ -46,6 +44,7 @@
#include "vmath.h"
#include "nmg.h"
#include "rt/geom.h"
+#include "rt/tree.h"
#include "raytrace.h"
#include "gcv.h"
@@ -192,7 +191,7 @@
int i, use_mc = 0, use_bottess = 0;
struct egg_conv_data conv_data;
- struct gcv_region_end_data gcvwriter = {nmg_to_egg, NULL};
+ struct rt_region_end_data gcvwriter = {nmg_to_egg, NULL};
gcvwriter.client_data = (void *)&conv_data;
@@ -327,7 +326,7 @@
ncpu, /* ncpu */
&tree_state, /* state */
NULL, /* start func */
-
use_mc?gcv_region_end_mc:use_bottess?gcv_bottess_region_end:gcv_region_end, /*
end func */
+
use_mc?rt_region_end_mc:use_bottess?gcv_bottess_region_end:rt_region_end, /*
end func */
use_mc?NULL:nmg_booltree_leaf_tess, /* leaf func */
(void *)&gcvwriter); /* client_data */
fprintf(conv_data.fp, "}\n");
Modified: brlcad/branches/dm-fb-merge/src/conv/raw/g-raw.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/conv/raw/g-raw.c 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/src/conv/raw/g-raw.c 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -44,6 +44,7 @@
#include "vmath.h"
#include "nmg.h"
#include "rt/geom.h"
+#include "rt/tree.h"
#include "raytrace.h"
#include "gcv.h"
@@ -210,7 +211,7 @@
}
-static struct gcv_region_end_data gcvwriter = {nmg_to_raw, NULL};
+static struct rt_region_end_data gcvwriter = {nmg_to_raw, NULL};
int
@@ -349,7 +350,7 @@
1,
&tree_state,
0, /* take all regions */
- use_mc?gcv_region_end_mc:gcv_region_end,
+ use_mc?rt_region_end_mc:rt_region_end,
use_mc?NULL:nmg_booltree_leaf_tess,
(void *)&gcvwriter);
Modified: brlcad/branches/dm-fb-merge/src/conv/stl/g-stl.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/conv/stl/g-stl.c 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/src/conv/stl/g-stl.c 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -44,6 +44,7 @@
#include "vmath.h"
#include "nmg.h"
#include "rt/geom.h"
+#include "rt/tree.h"
#include "raytrace.h"
#include "gcv.h"
@@ -301,7 +302,7 @@
}
-static struct gcv_region_end_data gcvwriter = {nmg_to_stl, NULL};
+static struct rt_region_end_data gcvwriter = {nmg_to_stl, NULL};
int
@@ -474,7 +475,7 @@
1,
&tree_state,
0, /* take all regions */
- use_mc?gcv_region_end_mc:gcv_region_end,
+ use_mc?rt_region_end_mc:rt_region_end,
use_mc?NULL:nmg_booltree_leaf_tess,
(void *)&gcvwriter);
Modified: brlcad/branches/dm-fb-merge/src/libbrep/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/src/libbrep/CMakeLists.txt 2020-06-08
21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/src/libbrep/CMakeLists.txt 2020-06-09
00:02:58 UTC (rev 76078)
@@ -81,15 +81,15 @@
)
CMAKEFILES(${libbrep_ignored_files})
-# Anyone who needs to import libbrep will also need to import openNURBS
+BRLCAD_ADDLIB(libbrep "${LIBBREP_SOURCES}"
"libbg;libbn;libbu;${OPENNURBS_LIBRARIES};${P2T_LIBRARY};${WINSOCK_LIB};${RPCRT_LIB};${STDCXX_LIBRARIES}")
+set_target_properties(libbrep PROPERTIES VERSION 20.0.1 SOVERSION 20)
+
if(HIDE_INTERNAL_SYMBOLS)
- set_property(GLOBAL APPEND PROPERTY libbrep_DLL_DEFINES "ON_DLL_IMPORTS")
+ set_property(TARGET libbrep APPEND PROPERTY COMPILE_DEFINITIONS
"ON_DLL_IMPORTS")
+ # Anyone who needs to import libbrep will also need to import openNURBS
+ set_property(TARGET libbrep APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS
"ON_DLL_IMPORTS")
endif(HIDE_INTERNAL_SYMBOLS)
-BRLCAD_ADDLIB(libbrep "${LIBBREP_SOURCES}"
"libbg;libbn;libbu;${OPENNURBS_LIBRARIES};${P2T_LIBRARY};${WINSOCK_LIB};${RPCRT_LIB};${STDCXX_LIBRARIES}")
-
-set_target_properties(libbrep PROPERTIES VERSION 20.0.1 SOVERSION 20)
-
add_subdirectory(tests)
CMAKEFILES(CMakeLists.txt)
Modified: brlcad/branches/dm-fb-merge/src/libgcv/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/src/libgcv/CMakeLists.txt 2020-06-08
21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/src/libgcv/CMakeLists.txt 2020-06-09
00:02:58 UTC (rev 76078)
@@ -21,8 +21,6 @@
bottess.c
facetize.c
gcv.c
- region_end.c
- region_end_mc.c
tri_intersect.c
)
@@ -33,6 +31,9 @@
set_property(SOURCE gcv.c APPEND PROPERTY COMPILE_DEFINITIONS
"LIBGCV_PLUGINS_PATH=\"${LIBGCV_PLUGINS_PATH}\"")
set_property(SOURCE gcv.c APPEND PROPERTY COMPILE_DEFINITIONS
"LIBGCV_PLUGIN_SUFFIX=\"${CMAKE_SHARED_LIBRARY_SUFFIX}\"")
+# Make sure anyone building the library builds the plugins
+add_dependencies(libgcv libgcv_plugins)
+
enable_testing()
BRLCAD_ADDEXEC(test_bottess test_bottess.c libgcv NO_INSTALL)
if(HIDE_INTERNAL_SYMBOLS)
Modified: brlcad/branches/dm-fb-merge/src/libgcv/plugins/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/src/libgcv/plugins/CMakeLists.txt
2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/src/libgcv/plugins/CMakeLists.txt
2020-06-09 00:02:58 UTC (rev 76078)
@@ -4,7 +4,7 @@
function(LIBGCV_ADD_PLUGIN plugin_name sources libs)
set(target_name libgcv_${plugin_name})
- BRLCAD_ADDLIB(${target_name} "${sources}" "libgcv;${libs}" SHARED NO_INSTALL
FOLDER "LibGCV Plugins")
+ BRLCAD_ADDLIB(${target_name} "${sources}" "${libs}" SHARED NO_INSTALL FOLDER
"LibGCV Plugins")
target_include_directories(${target_name} PRIVATE "${GCV_INCLUDE_DIRS}")
set(DIR_TYPES LIBRARY RUNTIME ARCHIVE)
@@ -30,6 +30,7 @@
# We're using GCV_EXPORT for these plugins, so we need to set the
DLL_EXPORTS accordingly
if(HIDE_INTERNAL_SYMBOLS)
set_property(TARGET ${target_name} APPEND PROPERTY COMPILE_DEFINITIONS
"GCV_DLL_EXPORTS")
+ set_property(TARGET ${target_name} APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS "GCV_DLL_EXPORTS")
if (TARGET ${target_name}-obj)
set_property(TARGET ${target_name}-obj APPEND PROPERTY
COMPILE_DEFINITIONS "GCV_DLL_EXPORTS")
endif (TARGET ${target_name}-obj)
Modified: brlcad/branches/dm-fb-merge/src/libgcv/plugins/fastgen4/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/src/libgcv/plugins/fastgen4/CMakeLists.txt
2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/src/libgcv/plugins/fastgen4/CMakeLists.txt
2020-06-09 00:02:58 UTC (rev 76078)
@@ -1,4 +1,4 @@
-LIBGCV_ADD_PLUGIN(fastgen4 "fastgen4_read.c;fastgen4_write.cpp" "librt;libbu")
+LIBGCV_ADD_PLUGIN(fastgen4 "fastgen4_read.c;fastgen4_write.cpp"
"libwdb;librt;libbu")
CMAKEFILES(NOTES)
CMAKEFILES(CMakeLists.txt)
Modified:
brlcad/branches/dm-fb-merge/src/libgcv/plugins/fastgen4/fastgen4_write.cpp
===================================================================
--- brlcad/branches/dm-fb-merge/src/libgcv/plugins/fastgen4/fastgen4_write.cpp
2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/src/libgcv/plugins/fastgen4/fastgen4_write.cpp
2020-06-09 00:02:58 UTC (rev 76078)
@@ -2522,8 +2522,8 @@
if (tree_state->ts_mater.ma_color_valid)
section.set_color(color_from_floats(tree_state->ts_mater.ma_color));
- gcv_region_end_data gcv_data = {write_nmg_region, &data};
- return gcv_region_end(tree_state, path, current_tree, &gcv_data);
+ rt_region_end_data gcv_data = {write_nmg_region, &data};
+ return rt_region_end(tree_state, path, current_tree, &gcv_data);
}
Modified: brlcad/branches/dm-fb-merge/src/libgcv/plugins/gdal/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/src/libgcv/plugins/gdal/CMakeLists.txt
2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/src/libgcv/plugins/gdal/CMakeLists.txt
2020-06-09 00:02:58 UTC (rev 76078)
@@ -1,6 +1,6 @@
if(GDAL_LIBRARY AND GDAL_INCLUDE_DIR)
include_directories(SYSTEM ${GDAL_INCLUDE_DIR})
- LIBGCV_ADD_PLUGIN(gdal "gdal.cpp" "librt;libbu;${GDAL_LIBRARY}")
+ LIBGCV_ADD_PLUGIN(gdal "gdal.cpp" "libwdb;librt;libbu;${GDAL_LIBRARY}")
endif(GDAL_LIBRARY AND GDAL_INCLUDE_DIR)
CMAKEFILES(gdal.cpp)
Modified: brlcad/branches/dm-fb-merge/src/libgcv/plugins/obj/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/src/libgcv/plugins/obj/CMakeLists.txt
2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/src/libgcv/plugins/obj/CMakeLists.txt
2020-06-09 00:02:58 UTC (rev 76078)
@@ -12,7 +12,7 @@
${CMAKE_CURRENT_BINARY_DIR}/wfobj
)
-LIBGCV_ADD_PLUGIN(obj "obj_read.c;obj_write.c;tri_face.c" "librt;libwfobj")
+LIBGCV_ADD_PLUGIN(obj "obj_read.c;obj_write.c;tri_face.c"
"libwdb;librt;libwfobj")
set(obj_ignore_files
CMakeLists.txt
Modified: brlcad/branches/dm-fb-merge/src/libgcv/plugins/stl/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/src/libgcv/plugins/stl/CMakeLists.txt
2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/src/libgcv/plugins/stl/CMakeLists.txt
2020-06-09 00:02:58 UTC (rev 76078)
@@ -1,2 +1,2 @@
-LIBGCV_ADD_PLUGIN(stl "stl_read.c;stl_write.c" "librt")
+LIBGCV_ADD_PLUGIN(stl "stl_read.c;stl_write.c" "libwdb;librt")
CMAKEFILES(CMakeLists.txt)
Modified: brlcad/branches/dm-fb-merge/src/libgcv/plugins/stl/stl_write.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libgcv/plugins/stl/stl_write.c
2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/src/libgcv/plugins/stl/stl_write.c
2020-06-09 00:02:58 UTC (rev 76078)
@@ -350,7 +350,7 @@
double percent;
struct db_tree_state tree_state;
struct conversion_state state;
- struct gcv_region_end_data gcvwriter;
+ struct rt_region_end_data gcvwriter;
gcvwriter.write_region = nmg_to_stl;
gcvwriter.client_data = &state;
@@ -414,7 +414,7 @@
1,
&tree_state,
0, /* take all regions */
- (gcv_options->tessellation_algorithm ==
GCV_TESS_MARCHING_CUBES)?gcv_region_end_mc:gcv_region_end,
+ (gcv_options->tessellation_algorithm ==
GCV_TESS_MARCHING_CUBES)?rt_region_end_mc:rt_region_end,
(gcv_options->tessellation_algorithm ==
GCV_TESS_MARCHING_CUBES)?NULL:nmg_booltree_leaf_tess,
(void *)&gcvwriter);
Modified: brlcad/branches/dm-fb-merge/src/libgcv/plugins/vrml/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/src/libgcv/plugins/vrml/CMakeLists.txt
2020-06-08 21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/src/libgcv/plugins/vrml/CMakeLists.txt
2020-06-09 00:02:58 UTC (rev 76078)
@@ -10,7 +10,7 @@
)
-LIBGCV_ADD_PLUGIN(vrml "${LIBGCV_VRML_SOURCES}" "librt;libbn;libbu")
+LIBGCV_ADD_PLUGIN(vrml "${LIBGCV_VRML_SOURCES}" "libwdb;librt;libbn;libbu")
CMAKEFILES(
CMakeLists.txt
Deleted: brlcad/branches/dm-fb-merge/src/libgcv/region_end.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libgcv/region_end.c 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/src/libgcv/region_end.c 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -1,216 +0,0 @@
-/* R E G I O N _ E N D . C
- * BRL-CAD
- *
- * Copyright (c) 2008-2020 United States Government as represented by
- * the U.S. Army Research Laboratory.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this file; see the file named COPYING for more
- * information.
- */
-/** @file libgcv/region_end.c
- *
- * Routines to process regions during a db_walk_tree.
- *
- */
-
-#include "common.h"
-
-#include "bu/parallel.h"
-#include "rt/wdb.h"
-#include "rt/global.h"
-#include "gcv.h"
-
-
-union tree *
-_gcv_cleanup(int state, union tree *tp)
-{
- /* restore previous debug state */
- nmg_debug = state;
-
- /* Dispose of original tree, so that all associated dynamic memory
- * is released now, not at the end of all regions. A return of
- * TREE_NULL from this routine signals an error, and there is no
- * point to adding _another_ message to our output, so we need to
- * cons up an OP_NOP node to return.
- */
- db_free_tree(tp, &rt_uniresource); /* Does an nmg_kr() */
-
- BU_ALLOC(tp, union tree);
- RT_TREE_INIT(tp);
- tp->tr_op = OP_NOP;
- return tp;
-}
-
-
-union tree *
-gcv_region_end(struct db_tree_state *tsp, const struct db_full_path *pathp,
union tree *curtree, void *client_data)
-{
- union tree *tp = NULL;
- union tree *ret_tree = NULL;
- struct nmgregion *r = NULL;
- struct shell *s = NULL;
- struct bu_list vhead;
-
- int empty_region = 0;
- int empty_model = 0;
- int NMG_debug_state = 0;
-
- struct gcv_region_end_data *data = (struct gcv_region_end_data
*)client_data;
-
- if (!tsp || !curtree || !pathp || !client_data) {
- bu_log("INTERNAL ERROR: gcv_region_end missing parameters\n");
- return TREE_NULL;
- }
-
- if (!data->write_region) {
- bu_log("INTERNAL ERROR: gcv_region_end missing conversion callback
function\n");
- return TREE_NULL;
- }
-
- RT_CK_FULL_PATH(pathp);
- RT_CK_TREE(curtree);
- BG_CK_TESS_TOL(tsp->ts_ttol);
- BN_CK_TOL(tsp->ts_tol);
- NMG_CK_MODEL(*tsp->ts_m);
-
- BU_LIST_INIT(&vhead);
-
- if (curtree->tr_op == OP_NOP)
- return curtree;
-
- /* get a copy to play with as the parameters might get clobbered
- * by a longjmp. FIXME: db_dup_subtree() doesn't create real copies
- */
- tp = db_dup_subtree(curtree, &rt_uniresource);
-
- /* FIXME: we can't free curtree until we get a "real" copy form
- * db_dup_subtree(). right now we get a fake copy just so we can
- * keep the compiler quiet about clobbering curtree during longjmp
- */
- /* db_free_tree(curtree, &rt_uniresource); */
-
- /* Sometimes the NMG library adds debugging bits when it detects
- * an internal error, before bombing. Stash.
- */
- NMG_debug_state = nmg_debug;
-
- if (!BU_SETJUMP) {
- /* try */
- /* perform boolean evaluation on the NMG, presently modifies
- * curtree to an evaluated result and returns it if the evaluation
- * is successful.
- */
- ret_tree = nmg_booltree_evaluate(tp, &RTG.rtg_vlfree, tsp->ts_tol,
&rt_uniresource);
- } else {
- /* catch */
- /* Error, bail out */
- char *sofar;
-
- /* Relinquish bomb protection */
- BU_UNSETJUMP;
-
- sofar = db_path_to_string(pathp);
- bu_log("FAILED in boolean evaluation: %s\n", sofar);
- bu_free((char *)sofar, "sofar");
-
- /* Release any intersector 2d tables */
- nmg_isect2d_final_cleanup();
-
- /* Get rid of (m)any other intermediate structures */
- if ((*tsp->ts_m)->magic == NMG_MODEL_MAGIC)
- nmg_km(*tsp->ts_m);
- else
- bu_log("WARNING: tsp->ts_m pointer corrupted, ignoring it.\n");
-
- /* Now, make a new, clean model structure for next pass. */
- *tsp->ts_m = nmg_mm();
-
- return _gcv_cleanup(NMG_debug_state, tp);
- } BU_UNSETJUMP; /* Relinquish bomb protection */
-
- r = (struct nmgregion *)NULL;
- if (ret_tree)
- r = ret_tree->tr_d.td_r;
-
- if (r == (struct nmgregion *)NULL)
- return _gcv_cleanup(NMG_debug_state, tp);
-
- /* Kill cracks */
- s = BU_LIST_FIRST(shell, &r->s_hd);
- while (BU_LIST_NOT_HEAD(&s->l, &r->s_hd)) {
- struct shell *next_s;
-
- next_s = BU_LIST_PNEXT(shell, &s->l);
- if (nmg_kill_cracks(s)) {
- if (nmg_ks(s)) {
- empty_region = 1;
- break;
- }
- }
- s = next_s;
- }
- if (empty_region)
- return _gcv_cleanup(NMG_debug_state, tp);
-
- /* kill zero length edgeuses */
- empty_model = nmg_kill_zero_length_edgeuses(*tsp->ts_m);
- if (empty_model)
- return _gcv_cleanup(NMG_debug_state, tp);
-
- if (BU_SETJUMP) {
- /* Error, bail out */
- char *sofar;
-
- /* Relinquish bomb protection */
- BU_UNSETJUMP;
-
- sofar = db_path_to_string(pathp);
- bu_log("FAILED in triangulator: %s\n", sofar);
- bu_free((char *)sofar, "sofar");
-
- /* Release any intersector 2d tables */
- nmg_isect2d_final_cleanup();
-
- /* Get rid of (m)any other intermediate structures */
- if ((*tsp->ts_m)->magic == NMG_MODEL_MAGIC)
- nmg_km(*tsp->ts_m);
- else
- bu_log("WARNING: tsp->ts_m pointer corrupted, ignoring it.\n");
-
- /* Now, make a new, clean model structure for next pass. */
- *tsp->ts_m = nmg_mm();
- nmg_kr(r);
-
- return _gcv_cleanup(NMG_debug_state, tp);
- } else {
-
- /* Write the region out */
- data->write_region(r, pathp, tsp->ts_regionid, tsp->ts_gmater,
tsp->ts_mater.ma_color, data->client_data);
-
- } BU_UNSETJUMP; /* Relinquish bomb protection */
-
- nmg_kr(r);
-
- return _gcv_cleanup(NMG_debug_state, tp);
-}
-
-
-/*
- * Local Variables:
- * tab-width: 8
- * mode: C
- * indent-tabs-mode: t
- * c-file-style: "stroustrup"
- * End:
- * ex: shiftwidth=4 tabstop=8
- */
Deleted: brlcad/branches/dm-fb-merge/src/libgcv/region_end_mc.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/libgcv/region_end_mc.c 2020-06-08
21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/src/libgcv/region_end_mc.c 2020-06-09
00:02:58 UTC (rev 76078)
@@ -1,190 +0,0 @@
-/* R E G I O N _ E N D _ M C . C
- * BRL-CAD
- *
- * Copyright (c) 2008-2020 United States Government as represented by
- * the U.S. Army Research Laboratory.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this file; see the file named COPYING for more
- * information.
- */
-
-/** @file libgcv/region_end.c
- *
- * Routines to process regions during a db_walk_tree using the marching cubes
- * algorithm.
- *
- */
-
-#include "common.h"
-
-#include "bu/parallel.h"
-#include "rt/rt_instance.h"
-#include "gcv.h"
-
-
-/* in region_end.c */
-union tree * _gcv_cleanup(int state, union tree *tp);
-
-union tree *
-gcv_region_end_mc(struct db_tree_state *tsp, const struct db_full_path *pathp,
union tree *curtree, void *client_data)
-{
- union tree *tp = NULL;
- struct model *m = NULL;
- struct nmgregion *r = NULL;
- struct shell *s = NULL;
- struct bu_list vhead;
-
- int empty_region = 0;
- int empty_model = 0;
- int NMG_debug_state = 0;
- int count = 0;
-
- struct gcv_region_end_data *data = (struct gcv_region_end_data
*)client_data;
-
- if (!tsp || !pathp || !client_data) {
- bu_log("INTERNAL ERROR: gcv_region_end_mc missing parameters\n");
- return TREE_NULL;
- }
-
- if (!data->write_region) {
- bu_log("INTERNAL ERROR: gcv_region_end missing conversion callback
function\n");
- return TREE_NULL;
- }
-
- RT_CK_FULL_PATH(pathp);
- RT_CK_TREE(curtree);
- BG_CK_TESS_TOL(tsp->ts_ttol);
- BN_CK_TOL(tsp->ts_tol);
- NMG_CK_MODEL(*tsp->ts_m);
-
- BU_LIST_INIT(&vhead);
-
- /*
- if (curtree->tr_op == OP_NOP)
- return 0;
- */
-
-
- /* get a copy to play with as the parameters might get clobbered
- * by a longjmp. FIXME: db_dup_subtree() doesn't create real copies
- */
- tp = db_dup_subtree(curtree, &rt_uniresource);
-
- /* FIXME: we can't free curtree until we get a "real" copy form
- * db_dup_subtree(). right now we get a fake copy just so we can
- * keep the compiler quiet about clobbering curtree during longjmp
- */
- /* db_free_tree(curtree, &rt_uniresource); */
-
- /* Sometimes the NMG library adds debugging bits when it detects
- * an internal error, before bombing. Stash.
- */
- NMG_debug_state = nmg_debug;
-
- m = nmg_mmr();
- r = nmg_mrsv(m);
- s = BU_LIST_FIRST(shell, &r->s_hd);
-
- if (tsp->ts_rtip == NULL)
- tsp->ts_rtip = rt_new_rti(tsp->ts_dbip);
-
- count += nmg_mc_evaluate (s, tsp->ts_rtip, pathp, tsp->ts_ttol,
tsp->ts_tol);
-
- /* empty region? */
- if (count == 0) {
- char *str_path = db_path_to_string(pathp);
- bu_log("Region %s appears to be empty.\n", str_path);
- bu_free(str_path, "str_path");
- return TREE_NULL;
- }
-
- /*
- bu_log("Target is shot, %d triangles seen.\n", count);
-
- bu_log("Fusing\n"); fflush(stdout);
- nmg_model_fuse(m, tsp->ts_tol);
- bu_log("Done\n"); fflush(stdout);
- */
-
- /* Kill cracks */
- while (BU_LIST_NOT_HEAD(&s->l, &r->s_hd)) {
- struct shell *next_s;
-
- next_s = BU_LIST_PNEXT(shell, &s->l);
- if (nmg_kill_cracks(s)) {
- if (nmg_ks(s)) {
- empty_region = 1;
- break;
- }
- }
- /*
- nmg_shell_coplanar_face_merge(s, tsp->ts_tol, 42);
- */
- s = next_s;
- }
- if (empty_region)
- return _gcv_cleanup(NMG_debug_state, tp);
-
- /* kill zero length edgeuses */
- empty_model = nmg_kill_zero_length_edgeuses(*tsp->ts_m);
- if (empty_model)
- return _gcv_cleanup(NMG_debug_state, tp);
-
- if (!BU_SETJUMP) {
- /* try */
- /* Write the region out */
- data->write_region(r, pathp, tsp->ts_regionid, tsp->ts_gmater,
tsp->ts_mater.ma_color, data->client_data);
- } else {
- /* catch */
- /* Error, bail out */
- char *sofar;
-
- /* Relinquish bomb protection */
- BU_UNSETJUMP;
-
- sofar = db_path_to_string(pathp);
- bu_log("FAILED in triangulator: %s\n", sofar);
- bu_free((char *)sofar, "sofar");
-
- /* Release any intersector 2d tables */
- nmg_isect2d_final_cleanup();
-
- /* Get rid of (m)any other intermediate structures */
- if ((*tsp->ts_m)->magic == NMG_MODEL_MAGIC)
- nmg_km(*tsp->ts_m);
- else
- bu_log("WARNING: tsp->ts_m pointer corrupted, ignoring it.\n");
-
- /* Now, make a new, clean model structure for next pass. */
- *tsp->ts_m = nmg_mm();
- nmg_kr(r);
-
- return _gcv_cleanup(NMG_debug_state, tp);
-
- } BU_UNSETJUMP; /* Relinquish bomb protection */
-
- nmg_kr(r);
-
- return _gcv_cleanup(NMG_debug_state, tp);
-}
-
-
-/*
- * Local Variables:
- * tab-width: 8
- * mode: C
- * indent-tabs-mode: t
- * c-file-style: "stroustrup"
- * End:
- * ex: shiftwidth=4 tabstop=8
- */
Modified: brlcad/branches/dm-fb-merge/src/librt/CMakeLists.txt
===================================================================
--- brlcad/branches/dm-fb-merge/src/librt/CMakeLists.txt 2020-06-08
21:00:54 UTC (rev 76077)
+++ brlcad/branches/dm-fb-merge/src/librt/CMakeLists.txt 2020-06-09
00:02:58 UTC (rev 76078)
@@ -22,7 +22,6 @@
${REGEX_INCLUDE_DIRS}
${VDS_INCLUDE_DIRS}
${GDIAM_INCLUDE_DIRS}
- ${LZ4_INCLUDE_DIRS}
)
BRLCAD_LIB_INCLUDE_DIRS(rt RT_INCLUDE_DIRS RT_LOCAL_INCLUDE_DIRS)
@@ -35,6 +34,7 @@
bool.c
bundle.c
cache.c
+ cache_lz4.c
cmd.c
comb/comb.c
comb/comb_brep.cpp
@@ -211,6 +211,8 @@
primitives/xxx/xxx.c
reduce.c
reduce_db.cpp
+ region_end.c
+ region_end_mc.c
regionfix.c
roots.c
search.c
@@ -361,7 +363,7 @@
set(SPR_LIB libSPR)
endif(BRLCAD_ENABLE_SPR)
-BRLCAD_ADDLIB(librt "${LIBRT_SOURCES}"
"${OPENCL_LIBS};${GDIAM_LIBRARY};${VDS_LIBRARY};libbrep;libnmg;libbg;libbn;libbu;${OPENNURBS_LIBRARIES};${P2T_LIBRARY};${SPR_LIB};${REGEX_LIBRARIES};${LZ4_LIBRARIES};${WINSOCK_LIB};${RPCRT_LIB};${STDCXX_LIBRARIES}")
+BRLCAD_ADDLIB(librt "${LIBRT_SOURCES}"
"${OPENCL_LIBS};${GDIAM_LIBRARY};${VDS_LIBRARY};libbrep;libnmg;libbg;libbn;libbu;${OPENNURBS_LIBRARIES};${P2T_LIBRARY};${SPR_LIB};${REGEX_LIBRARIES};${WINSOCK_LIB};${RPCRT_LIB};${STDCXX_LIBRARIES}")
set_target_properties(librt PROPERTIES VERSION 20.0.1 SOVERSION 20)
if(HIDE_INTERNAL_SYMBOLS)
@@ -373,9 +375,6 @@
if(TARGET gdiam OR HIDE_INTERNAL_SYMBOLS_EXT)
set_property(TARGET librt APPEND PROPERTY COMPILE_DEFINITIONS
"GDIAM_DLL_IMPORTS")
endif(TARGET gdiam OR HIDE_INTERNAL_SYMBOLS_EXT)
- if(TARGET lz4 OR HIDE_INTERNAL_SYMBOLS_EXT)
- set_property(TARGET librt APPEND PROPERTY COMPILE_DEFINITIONS
"LZ4_DLL_IMPORT=1")
- endif(TARGET lz4 OR HIDE_INTERNAL_SYMBOLS_EXT)
if (TARGET librt-obj)
set_property(TARGET librt-obj APPEND PROPERTY COMPILE_DEFINITIONS
"TIE_DLL_EXPORTS")
set_property(TARGET librt-obj APPEND PROPERTY COMPILE_DEFINITIONS
"DB5_DLL_EXPORTS")
@@ -385,9 +384,6 @@
if(TARGET gdiam OR HIDE_INTERNAL_SYMBOLS_EXT)
set_property(TARGET librt-obj APPEND PROPERTY COMPILE_DEFINITIONS
"GDIAM_DLL_IMPORTS")
endif(TARGET gdiam OR HIDE_INTERNAL_SYMBOLS_EXT)
- if(TARGET lz4 OR HIDE_INTERNAL_SYMBOLS_EXT)
- set_property(TARGET librt-obj APPEND PROPERTY COMPILE_DEFINITIONS
"LZ4_DLL_IMPORT=1")
- endif(TARGET lz4 OR HIDE_INTERNAL_SYMBOLS_EXT)
endif (TARGET librt-obj)
endif(HIDE_INTERNAL_SYMBOLS)
@@ -407,8 +403,10 @@
add_subdirectory(tests)
-CMAKEFILES(CMakeLists.txt)
-CMAKEFILES(db_fp.cpp)
+CMAKEFILES(
+ CMakeLists.txt
+ db_fp.cpp
+ )
# Local Variables:
# tab-width: 8
Modified: brlcad/branches/dm-fb-merge/src/librt/cache.c
===================================================================
--- brlcad/branches/dm-fb-merge/src/librt/cache.c 2020-06-08 21:00:54 UTC
(rev 76077)
+++ brlcad/branches/dm-fb-merge/src/librt/cache.c 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -35,7 +35,6 @@
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h> /* for mkdir */
#endif
-#include "lz4.h"
#include "bio.h"
#include "bnetwork.h"
@@ -54,6 +53,10 @@
#include "rt/db_io.h"
#include "rt/func.h"
+/* Defined in cache_lz4.c */
+extern int brl_LZ4_compress_default(const char* source, char* dest, int
sourceSize, int maxDestSize);
+extern int brl_LZ4_compressBound(int inputSize);
+extern int brl_LZ4_decompress_fast (const char* source, char* dest, int
originalSize);
#define CACHE_FORMAT 3
@@ -349,7 +352,7 @@
BU_CK_EXTERNAL(external);
BU_ASSERT(external->ext_nbytes < INT_MAX);
- compressed_size = LZ4_compressBound((int)external->ext_nbytes);
+ compressed_size = brl_LZ4_compressBound((int)external->ext_nbytes);
/* buffer is uncompsize + maxcompsize + compressed_data */
buffer = (uint8_t *)bu_malloc((size_t)compressed_size +
SIZEOF_NETWORK_LONG, "buffer");
@@ -356,7 +359,7 @@
*(uint32_t *)buffer = htonl((uint32_t)external->ext_nbytes);
- ret = LZ4_compress_default((const char *)external->ext_buf, (char
*)(buffer + SIZEOF_NETWORK_LONG), external->ext_nbytes, compressed_size);
+ ret = brl_LZ4_compress_default((const char *)external->ext_buf, (char
*)(buffer + SIZEOF_NETWORK_LONG), external->ext_nbytes, compressed_size);
if (ret != 0)
compressed = 1;
@@ -388,7 +391,7 @@
buffer = (uint8_t *)bu_malloc(dest->ext_nbytes, "buffer");
BU_ASSERT(dest->ext_nbytes < INT_MAX);
- ret = LZ4_decompress_fast((const char *)(external->ext_buf +
SIZEOF_NETWORK_LONG), (char *)buffer, (int)dest->ext_nbytes);
+ ret = brl_LZ4_decompress_fast((const char *)(external->ext_buf +
SIZEOF_NETWORK_LONG), (char *)buffer, (int)dest->ext_nbytes);
if (ret > 0)
uncompressed = 1;
Copied: brlcad/branches/dm-fb-merge/src/librt/cache_lz4.c (from rev 76077,
brlcad/trunk/src/librt/cache_lz4.c)
===================================================================
--- brlcad/branches/dm-fb-merge/src/librt/cache_lz4.c
(rev 0)
+++ brlcad/branches/dm-fb-merge/src/librt/cache_lz4.c 2020-06-09 00:02:58 UTC
(rev 76078)
@@ -0,0 +1,770 @@
+/*
+ LZ4 - Fast LZ compression algorithm
+ Copyright (C) 2011-2016, Yann Collet.
+
+ BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ You can contact the author at :
+ - LZ4 homepage : http://www.lz4.org
+ - LZ4 source repository : https://github.com/lz4/lz4
+*/
+
+#include "common.h"
+
+#include <stddef.h>
+#include <string.h>
+
+#define brl_LZ4_MEMORY_USAGE 14
+#define brl_LZ4_MAX_INPUT_SIZE 0x7E000000 /* 2 113 929 216 bytes */
+#define brl_LZ4_COMPRESSBOUND(isize) ((unsigned)(isize) >
(unsigned)brl_LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16)
+
+int brl_LZ4_compressBound(int isize) { return brl_LZ4_COMPRESSBOUND(isize); }
+
+/*-************************************
+* Compiler Options
+**************************************/
+#ifdef _MSC_VER /* Visual Studio */
+# define FORCE_INLINE static __forceinline
+# include <intrin.h>
+# pragma warning(disable : 4127) /* disable: C4127: conditional
expression is constant */
+# pragma warning(disable : 4293) /* disable: C4293: too large shift
(32-bits) */
+#else
+# if defined(__GNUC__) || defined(__clang__)
+# define FORCE_INLINE static inline __attribute__((always_inline))
+# elif defined(__cplusplus) || (defined(__STDC_VERSION__) &&
(__STDC_VERSION__ >= 199901L) /* C99 */)
+# define FORCE_INLINE static inline
+# else
+# define FORCE_INLINE static
+# endif
+#endif /* _MSC_VER */
+
+#if (defined(__GNUC__) && (__GNUC__ >= 3)) || (defined(__INTEL_COMPILER) &&
(__INTEL_COMPILER >= 800)) || defined(__clang__)
+# define expect(expr,value) (__builtin_expect ((expr),(value)) )
+#else
+# define expect(expr,value) (expr)
+#endif
+
+#define likely(expr) expect((expr) != 0, 1)
@@ Diff output truncated at 100000 characters. @@
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