Revision: 76959
http://sourceforge.net/p/brlcad/code/76959
Author: starseeker
Date: 2020-08-26 12:21:02 +0000 (Wed, 26 Aug 2020)
Log Message:
-----------
Merge from trunk r76861 through 76954
Modified Paths:
--------------
brlcad/branches/RELEASE/BUGS
brlcad/branches/RELEASE/CHANGES
brlcad/branches/RELEASE/CMakeLists.txt
brlcad/branches/RELEASE/NEWS
brlcad/branches/RELEASE/TODO
brlcad/branches/RELEASE/doc/docbook/system/man1/remrt.xml
brlcad/branches/RELEASE/doc/docbook/system/man1/rtweight.xml
brlcad/branches/RELEASE/doc/legal/embedded/CMakeLists.txt
brlcad/branches/RELEASE/include/bu/magic.h
brlcad/branches/RELEASE/include/dm/defines.h
brlcad/branches/RELEASE/include/dm.h
brlcad/branches/RELEASE/misc/CMake/BRLCAD_Targets.cmake
brlcad/branches/RELEASE/misc/tools/debug2c/debug2c.cxx
brlcad/branches/RELEASE/regress/CMakeLists.txt
brlcad/branches/RELEASE/regress/asc/CMakeLists.txt
brlcad/branches/RELEASE/regress/asc/asc2dsp.sh
brlcad/branches/RELEASE/regress/comgeom/comgeom.sh
brlcad/branches/RELEASE/regress/licenses/licenses_check.cpp
brlcad/branches/RELEASE/regress/repository/CMakeLists.txt
brlcad/branches/RELEASE/regress/repository/repocheck.cpp
brlcad/branches/RELEASE/regress/solids/solids.sh
brlcad/branches/RELEASE/regress/usage.sh
brlcad/branches/RELEASE/regress/weight/weight.ref
brlcad/branches/RELEASE/regress/weight/weight.test2.ref
brlcad/branches/RELEASE/sh/CMakeLists.txt
brlcad/branches/RELEASE/sh/cmp.sh
brlcad/branches/RELEASE/src/conv/asc/asc2dsp.c
brlcad/branches/RELEASE/src/conv/asc/g2asc.c
brlcad/branches/RELEASE/src/libanalyze/density.cpp
brlcad/branches/RELEASE/src/libbn/sphmap.c
brlcad/branches/RELEASE/src/libbu/bomb.c
brlcad/branches/RELEASE/src/libbu/opt.c
brlcad/branches/RELEASE/src/libdm/X/dm-X.c
brlcad/branches/RELEASE/src/libdm/dm-generic.c
brlcad/branches/RELEASE/src/libdm/dm_init.cpp
brlcad/branches/RELEASE/src/libdm/dm_plugins.cpp
brlcad/branches/RELEASE/src/libdm/glx/dm-ogl.c
brlcad/branches/RELEASE/src/libdm/glx/if_ogl.c
brlcad/branches/RELEASE/src/libdm/if_stack.c
brlcad/branches/RELEASE/src/libdm/include/calltable.h
brlcad/branches/RELEASE/src/libdm/null/dm-Null.c
brlcad/branches/RELEASE/src/libdm/osgl/dm-osgl.cpp
brlcad/branches/RELEASE/src/libdm/plot/dm-plot.c
brlcad/branches/RELEASE/src/libdm/postscript/dm-ps.c
brlcad/branches/RELEASE/src/libdm/qt/dm-qt.cpp
brlcad/branches/RELEASE/src/libdm/qt/dm-qt.h
brlcad/branches/RELEASE/src/libdm/tests/dm_test.c
brlcad/branches/RELEASE/src/libdm/tk/dm-tk.c
brlcad/branches/RELEASE/src/libdm/txt/dm-txt.c
brlcad/branches/RELEASE/src/libdm/wgl/dm-wgl.c
brlcad/branches/RELEASE/src/librt/primitives/vol/vol.c
brlcad/branches/RELEASE/src/libtclcad/tclcad_init.c
brlcad/branches/RELEASE/src/libtclcad/tclcad_mouse.c
brlcad/branches/RELEASE/src/libtclcad/tclcad_obj.c
brlcad/branches/RELEASE/src/libtclcad/tclcad_polygons.c
brlcad/branches/RELEASE/src/libtclcad/view/util.c
brlcad/branches/RELEASE/src/mged/adc.c
brlcad/branches/RELEASE/src/mged/attach.c
brlcad/branches/RELEASE/src/mged/axes.c
brlcad/branches/RELEASE/src/mged/buttons.c
brlcad/branches/RELEASE/src/mged/chgmodel.c
brlcad/branches/RELEASE/src/mged/chgview.c
brlcad/branches/RELEASE/src/mged/cmd.c
brlcad/branches/RELEASE/src/mged/color_scheme.c
brlcad/branches/RELEASE/src/mged/dm-generic.c
brlcad/branches/RELEASE/src/mged/doevent.c
brlcad/branches/RELEASE/src/mged/dozoom.c
brlcad/branches/RELEASE/src/mged/edarb.c
brlcad/branches/RELEASE/src/mged/edsol.c
brlcad/branches/RELEASE/src/mged/fbserv.c
brlcad/branches/RELEASE/src/mged/grid.c
brlcad/branches/RELEASE/src/mged/mater.c
brlcad/branches/RELEASE/src/mged/menu.c
brlcad/branches/RELEASE/src/mged/mged.c
brlcad/branches/RELEASE/src/mged/mged.h
brlcad/branches/RELEASE/src/mged/mged_dm.h
brlcad/branches/RELEASE/src/mged/overlay.c
brlcad/branches/RELEASE/src/mged/predictor.c
brlcad/branches/RELEASE/src/mged/rect.c
brlcad/branches/RELEASE/src/mged/sedit.h
brlcad/branches/RELEASE/src/mged/set.c
brlcad/branches/RELEASE/src/mged/share.c
brlcad/branches/RELEASE/src/mged/titles.c
brlcad/branches/RELEASE/src/mged/usepen.c
brlcad/branches/RELEASE/src/qged/main_window.cpp
brlcad/branches/RELEASE/src/qged/main_window.h
brlcad/branches/RELEASE/src/qged/qtads/CMakeLists.txt
brlcad/branches/RELEASE/src/qged/qtads/DockAreaTabBar.cpp
brlcad/branches/RELEASE/src/qged/qtads/DockAreaTitleBar.cpp
brlcad/branches/RELEASE/src/qged/qtads/DockAreaWidget.cpp
brlcad/branches/RELEASE/src/qged/qtads/DockAreaWidget.h
brlcad/branches/RELEASE/src/qged/qtads/DockContainerWidget.cpp
brlcad/branches/RELEASE/src/qged/qtads/DockContainerWidget.h
brlcad/branches/RELEASE/src/qged/qtads/DockFocusController.cpp
brlcad/branches/RELEASE/src/qged/qtads/DockFocusController.h
brlcad/branches/RELEASE/src/qged/qtads/DockManager.cpp
brlcad/branches/RELEASE/src/qged/qtads/DockManager.h
brlcad/branches/RELEASE/src/qged/qtads/DockOverlay.cpp
brlcad/branches/RELEASE/src/qged/qtads/DockSplitter.cpp
brlcad/branches/RELEASE/src/qged/qtads/DockSplitter.h
brlcad/branches/RELEASE/src/qged/qtads/DockWidget.cpp
brlcad/branches/RELEASE/src/qged/qtads/DockWidget.h
brlcad/branches/RELEASE/src/qged/qtads/DockWidgetTab.cpp
brlcad/branches/RELEASE/src/qged/qtads/FloatingDragPreview.cpp
brlcad/branches/RELEASE/src/remrt/remrt.c
brlcad/branches/RELEASE/src/remrt/rtsrv.c
brlcad/branches/RELEASE/src/rt/viewarea.c
brlcad/branches/RELEASE/src/rt/viewweight.c
brlcad/branches/RELEASE/src/rtwizard/main.c
brlcad/branches/RELEASE/src/sig/dauto.c
brlcad/branches/RELEASE/src/tclscripts/mged/CMakeLists.txt
brlcad/branches/RELEASE/src/tclscripts/mged/help.tcl
brlcad/branches/RELEASE/src/tclscripts/mged/openw.tcl
brlcad/branches/RELEASE/src/tclscripts/rtwizard/rtwizard
Added Paths:
-----------
brlcad/branches/RELEASE/doc/legal/embedded/strnstr.txt
brlcad/branches/RELEASE/regress/coverage/
brlcad/branches/RELEASE/regress/repository/strnstr.c
brlcad/branches/RELEASE/src/qged/qtads/images/maximize-button-focused.svg
brlcad/branches/RELEASE/src/qged/qtads/images/maximize-button.svg
brlcad/branches/RELEASE/src/qged/qtads/images/restore-button-focused.svg
brlcad/branches/RELEASE/src/qged/qtads/images/restore-button.svg
Removed Paths:
-------------
brlcad/branches/RELEASE/sh/facetall.sh
brlcad/branches/RELEASE/src/tclscripts/mged/dmtype.tcl
Property Changed:
----------------
brlcad/branches/RELEASE/
brlcad/branches/RELEASE/CHANGES
brlcad/branches/RELEASE/NEWS
brlcad/branches/RELEASE/doc/
brlcad/branches/RELEASE/include/
brlcad/branches/RELEASE/src/libbu/
Index: brlcad/branches/RELEASE
===================================================================
--- brlcad/branches/RELEASE 2020-08-26 12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE 2020-08-26 12:21:02 UTC (rev 76959)
Property changes on: brlcad/branches/RELEASE
___________________________________________________________________
Modified: svn:mergeinfo
## -7,4 +7,4 ##
/brlcad/branches/opencl:65867-66137
/brlcad/branches/osg:62110-62113
/brlcad/branches/prep-cache:68236-68933
-/brlcad/trunk:36844-37285,37571-38764,38777-38845,41559-43155,43159-43908,44241-44324,44326-44385,44710-45373,45377,45379-47342,47370-68122,68125-75207,75325,75375,75377-75378,75387,75470-75472,75477,75492,75495,75549,75565-75566,75656-75661,75672,75675,75678,75729,75811,76641-76768,76771-76861
\ No newline at end of property
+/brlcad/trunk:36844-37285,37571-38764,38777-38845,41559-43155,43159-43908,44241-44324,44326-44385,44710-45373,45377,45379-47342,47370-68122,68125-75207,75325,75375,75377-75378,75387,75470-75472,75477,75492,75495,75549,75565-75566,75656-75661,75672,75675,75678,75729,75811,76641-76768,76771-76954
\ No newline at end of property
Modified: brlcad/branches/RELEASE/BUGS
===================================================================
--- brlcad/branches/RELEASE/BUGS 2020-08-26 12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/BUGS 2020-08-26 12:21:02 UTC (rev 76959)
@@ -15,6 +15,9 @@
Recent Bugs
-----------
+* fbclear -c appears to hang indefinitely inside pkg_bwaitfor,
+ possible protocol mismatch or capability removed/changed in fbserv.
+
* dbupgrade -r produces an invalid rhc with the default v5 rhc produced
by MGED with "make rhc rhc"
Modified: brlcad/branches/RELEASE/CHANGES
===================================================================
--- brlcad/branches/RELEASE/CHANGES 2020-08-26 12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/CHANGES 2020-08-26 12:21:02 UTC (rev 76959)
@@ -364,6 +364,7 @@
*** OBSOLETED CHANGES ***
**********************************************************************
(reverse chronological order)
+
7.30.2
------
ray tracing tools
@@ -1537,3 +1538,8 @@
renamed points from pt to pnt for consistency [7.30]
s/proe-brl/creo-brl/g
replaced by newer creo plugin [7.30]
+
+7.32
+----
+s/facetall.sh/mged -c facetize/g
+ replaced by more improved facetize command [7.30]
Property changes on: brlcad/branches/RELEASE/CHANGES
___________________________________________________________________
Modified: svn:mergeinfo
## -6,4 +6,4 ##
/brlcad/branches/opencl/CHANGES:65867-66137
/brlcad/branches/osg/CHANGES:62110-62113
/brlcad/branches/prep-cache/CHANGES:68236-68933
-/brlcad/trunk/CHANGES:36844-37285,37571-38764,38777-38845,41559-43155,43159-43908,44241-44324,44326-44385,44710-45373,45377,45379-47342,47370-68122,68125-74373,74376-75141,76795-76858
\ No newline at end of property
+/brlcad/trunk/CHANGES:36844-37285,37571-38764,38777-38845,41559-43155,43159-43908,44241-44324,44326-44385,44710-45373,45377,45379-47342,47370-68122,68125-74373,74376-75141,76795-76858,76862-76954
\ No newline at end of property
Modified: brlcad/branches/RELEASE/CMakeLists.txt
===================================================================
--- brlcad/branches/RELEASE/CMakeLists.txt 2020-08-26 12:12:42 UTC (rev
76958)
+++ brlcad/branches/RELEASE/CMakeLists.txt 2020-08-26 12:21:02 UTC (rev
76959)
@@ -1294,6 +1294,9 @@
# we've indicated we *don't* want an X11 build
if(NOT BRLCAD_ENABLE_AQUA AND NOT BRLCAD_ENABLE_MINIMAL)
include(FindX11)
+ if (X11_Xrender_FOUND)
+ CONFIG_H_APPEND(BRLCAD "#define HAVE_XRENDER 1\n")
+ endif (X11_Xrender_FOUND)
endif(NOT BRLCAD_ENABLE_AQUA AND NOT BRLCAD_ENABLE_MINIMAL)
# make sure Xi is included in the list of X11 libs
@@ -3633,6 +3636,7 @@
# Handle some toplevel distclean listings
DISTCLEAN("${CMAKE_BINARY_DIR}/CMakeCache.txt")
DISTCLEAN("${CMAKE_BINARY_DIR}/cmakefiles.cmake")
+ DISTCLEAN("${CMAKE_BINARY_DIR}/brlcadexec.cmake")
DISTCLEAN("${CMAKE_BINARY_DIR}/cmake_install.cmake")
DISTCLEAN("${CMAKE_BINARY_DIR}/install_manifest.txt")
DISTCLEAN("${CMAKE_BINARY_DIR}/OPTIONS")
@@ -3767,6 +3771,12 @@
string(REPLACE ";" "\n" CMAKE_IGNORE_FILES "${CMAKE_IGNORE_FILES}")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cmakefiles.cmake"
"${CMAKE_IGNORE_FILES}")
+get_property(BRLCAD_EXEC_FILES GLOBAL PROPERTY BRLCAD_EXEC_FILES)
+list(REMOVE_DUPLICATES BRLCAD_EXEC_FILES)
+list(SORT BRLCAD_EXEC_FILES)
+string(REPLACE ";" "\n" BRLCAD_EXEC_FILES "${BRLCAD_EXEC_FILES}")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/brlcadexec.cmake"
"${BRLCAD_EXEC_FILES}")
+
#Done with all really time-consuming steps - do the configure time delta
if(NOT BRLCAD_IS_SUBBUILD)
execute_process(COMMAND "${CMAKE_BINARY_DIR}/CMakeTmp/dreport" "Elapsed
configuration time: " "${CONFIG_DELTA_START}")
Modified: brlcad/branches/RELEASE/NEWS
===================================================================
--- brlcad/branches/RELEASE/NEWS 2020-08-26 12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/NEWS 2020-08-26 12:21:02 UTC (rev 76959)
@@ -13,6 +13,12 @@
--- 2020-08-XX Release 7.32.X ---
----------------------------------------------------------------------
+* fixed semi-transparent DM and FB windows on Linux - Cliff Yapp
+* improved rtweight manual page - Sean Morrison
+* added line reporting TCP listening port to remrt output - Cliff Yapp
+* added help options support (-h,-?) to asc2dsp and g2asc - Cliff Yapp
+* fixed crash when drawing a VOL with missing data - Cliff Yapp
+* facetall.sh script is replaced by MGED facetize command - Cliff Yapp
* dynamic LIBGED command loading in MGED & Archer - Cliff Yapp
* dynamic LIBDM display manager loading in MGED & Archer - Cliff Yapp
* fixed 'idents' crash when running in a read-only dir - Sean Morrison
Property changes on: brlcad/branches/RELEASE/NEWS
___________________________________________________________________
Modified: svn:mergeinfo
## -9,4 +9,4 ##
/brlcad/branches/prep-cache/NEWS:68236-68933
/brlcad/branches/tcltk86/NEWS:68300-75257
/brlcad/trunk:68170-68252
-/brlcad/trunk/NEWS:36844-37285,37571-38764,38777-38845,41559-43155,43159-43908,44241-44324,44326-44385,44710-45373,45377,45379-47342,47370-68122,68125-74373,74376-75141,75375,75377-75378,75565-75566,75811,76645-76654,76748-76764
\ No newline at end of property
+/brlcad/trunk/NEWS:36844-37285,37571-38764,38777-38845,41559-43155,43159-43908,44241-44324,44326-44385,44710-45373,45377,45379-47342,47370-68122,68125-74373,74376-75141,75375,75377-75378,75565-75566,75811,76645-76654,76748-76764,76862-76954
\ No newline at end of property
Modified: brlcad/branches/RELEASE/TODO
===================================================================
--- brlcad/branches/RELEASE/TODO 2020-08-26 12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/TODO 2020-08-26 12:21:02 UTC (rev 76959)
@@ -2311,8 +2311,15 @@
THESE BREAK PROTOCOL OR ARE BACKWARDS-INCOMPATIBLE
+(i.e., v6 database format)
--------------------------------------------------
+* support matrices over any object, including over top-level combs
+ without affecting members and including over primitives so they may
+ optionally retain a local coordinate system even after a push
+ operation this also will allow primitives like the torus support
+ non-uniform scaling.
+
* change convention of using 'u', '+', and '-' for unions,
intersections, and subtractions respectively to symbols that
unambiguously describe the underlying CSG operation.
@@ -2360,11 +2367,6 @@
* remove the storage of the never-implemented keypoint parameter for
extrude objects.
-* have all primitives record a transformation matrix so that they may
- retain a local coordinate system even after pushed matrices. this
- also will allow primitives like the torus to support non-uniform
- scaling.
-
* rename 'part' primitive to 'pill' or remove it entirely in favor of
a more generalized metaprimitive primitive.
@@ -2571,11 +2573,6 @@
doc/docbook/presentations/en/intro-to-tcltk.xml
doc/docbook/specifications/en/BRL_CAD_g_format_V5.xml
-* improve rtweight documentation, explain how it computes its
- "centroid" (as it's not the center of bounding box of all objects,
- it's the geometric centoid that that takes booleans into
- consideration).
-
* write up some documentation on other build tools besides make -
CMake supports other generators, wouldn't hurt to detail how to
trigger builds in them (MSVC is partially covered, make sure to
Index: brlcad/branches/RELEASE/doc
===================================================================
--- brlcad/branches/RELEASE/doc 2020-08-26 12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/doc 2020-08-26 12:21:02 UTC (rev 76959)
Property changes on: brlcad/branches/RELEASE/doc
___________________________________________________________________
Modified: svn:mergeinfo
## -7,4 +7,4 ##
/brlcad/branches/osg/doc:62110-62113
/brlcad/branches/prep-cache/doc:68236-68933
/brlcad/branches/tcltk86/doc:68300-75257
-/brlcad/trunk/doc:76645-76726,76795-76858
\ No newline at end of property
+/brlcad/trunk/doc:76645-76726,76795-76858,76862-76954
\ No newline at end of property
Modified: brlcad/branches/RELEASE/doc/docbook/system/man1/remrt.xml
===================================================================
--- brlcad/branches/RELEASE/doc/docbook/system/man1/remrt.xml 2020-08-26
12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/doc/docbook/system/man1/remrt.xml 2020-08-26
12:21:02 UTC (rev 76959)
@@ -1,391 +1,538 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- lifted from troff+man by doclifter -->
-<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en'
xml:id='remrt1'>
-<refmeta>
+<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="remrt1">
+ <refmeta>
<refentrytitle>REMRT
-</refentrytitle>
-<manvolnum>1</manvolnum>
-<refmiscinfo class='source'>BRL-CAD</refmiscinfo>
-<refmiscinfo class='manual'>BRL-CAD</refmiscinfo>
-</refmeta>
+ </refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class='source'>BRL-CAD</refmiscinfo>
+ <refmiscinfo class='manual'>BRL-CAD</refmiscinfo>
+ </refmeta>
-<refnamediv>
-<refname>remrt</refname>
-<refpurpose>network distributed (remote) ray-trace dispatcher</refpurpose>
-</refnamediv>
-<!-- body begins here -->
-<refsynopsisdiv xml:id='synopsis'>
-<cmdsynopsis>
- <command>remrt</command>
- <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>
- <arg choice='plain'><replaceable>model.g</replaceable></arg>
- <arg choice='plain' rep='repeat'><replaceable>objects</replaceable></arg>
+ <refnamediv>
+ <refname>remrt</refname>
+ <refpurpose>network distributed (remote) ray-trace dispatcher</refpurpose>
+ </refnamediv>
+ <!-- body begins here -->
+ <refsynopsisdiv xml:id='synopsis'>
+ <cmdsynopsis>
+ <command>remrt</command>
+ <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>
+ <arg choice='plain'><replaceable>model.g</replaceable></arg>
+ <arg choice='plain' rep='repeat'><replaceable>objects</replaceable></arg>
-</cmdsynopsis>
-</refsynopsisdiv>
+ </cmdsynopsis>
+ </refsynopsisdiv>
-<refsect1 xml:id='description'><title>DESCRIPTION</title>
-<para><command>remrt</command>
-is intended to be an entirely plug-compatible replacement for
-the
-<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-program.
-While
-<emphasis remap='I'>rt</emphasis>
-can operate on more than one processor of a shared memory MIMD style
-multi-processor, it can not spread the work out across the network.
-<command>remrt</command>
-and its companion program
-<citerefentry><refentrytitle>rtsrv</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-implement a
-<citerefentry><refentrytitle>libpkg</refentrytitle><manvolnum>3</manvolnum></citerefentry>-based
-protocol for distributing the task of ray-traced rendering out
-to an arbitrary number of processors on the network.
-Those processors can be from an arbitrary mix of vendors,
-with differing instruction sets and data representations,
-operating at widely different speeds.</para>
+ <refsection xml:id='description'><title>DESCRIPTION</title>
+ <para>
+ <command>remrt</command> is intended to be an entirely plug-compatible
replacement for
+ the
<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ program. While <emphasis remap='I'>rt</emphasis> can operate on more
than one processor
+ of a shared memory MIMD style multi-processor, it can not spread the work
out across the network.
+ <command>remrt</command> and its companion program
+
<citerefentry><refentrytitle>rtsrv</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ implement a
+
<citerefentry><refentrytitle>libpkg</refentrytitle><manvolnum>3</manvolnum></citerefentry>-based
+ protocol for distributing the task of ray-traced rendering out to an
arbitrary number of
+ processors on the network. Those processors can be from an arbitrary mix
of vendors, with
+ differing instruction sets and data representations, operating at widely
different speeds.
+ </para>
-<para><command>remrt</command>
-provides two levels of fault-tolerance in its distributed computation.
-First, any
-<emphasis remap='I'>rtsrv</emphasis>
-processor which fails (or whose network link fails) will have its work
-reassigned automatically by
-<command>remrt</command>
-to other processors, so that the failure of that processor does not
-hold up the progress of the computation.
-On a regular interval
-<command>remrt</command>
-attempts to restart computation on failed processors marked "active",
-so that when failed systems become available again they are
-put back to work.
-Second,
-<command>remrt</command>
-offers a form of "checkpoint-restart" by carefully writing all
-received pixel data immediately to disk. If the machine running
-<command>remrt</command>
-should fail, when
-<command>remrt</command>
-is restarted, it will determine what work remains to be done and
-restart all the
-<emphasis remap='I'>rtsrv</emphasis>
-processes on the remote machines.</para>
+ <para>
+ <command>remrt</command> provides two levels of fault-tolerance in its
distributed
+ computation. First, any <emphasis remap='I'>rtsrv</emphasis> processor
which fails (or whose
+ network link fails) will have its work reassigned automatically by
<command>remrt</command>
+ to other processors, so that the failure of that processor does not hold
up the progress of
+ the computation. On a regular interval <command>remrt</command> attempts
to restart computation
+ on failed processors marked "active", so that when failed systems become
available again they are
+ put back to work. Second, <command>remrt</command> offers a form of
"checkpoint-restart" by
+ carefully writing all received pixel data immediately to disk. If the
machine running
+ <command>remrt</command> should fail, when <command>remrt</command> is
restarted, it will
+ determine what work remains to be done and restart all the <emphasis
remap='I'>rtsrv</emphasis>
+ processes on the remote machines.
+ </para>
-<para><command>remrt</command>
-takes exactly the same set of command line arguments as
-<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
-For a full discussion of those options, consult the
-<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-manual page.
-From within
-<citerefentry><refentrytitle>mged</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-the
-<command>remrt</command>
-program can be run from the current
-<emphasis remap='I'>mged</emphasis>
-view by giving the
-<emphasis remap='I'>mged</emphasis>
-command</para>
+ <para>
+ <command>remrt</command>
+ takes exactly the same set of command line arguments as
+
<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
+ For a full discussion of those options, consult the
+
<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ manual page. From within
+
<citerefentry><refentrytitle>mged</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ the <command>remrt</command> program can be run from the current
+ <emphasis remap='I'>mged</emphasis> view by giving the
+ <emphasis remap='I'>mged</emphasis>
+ command</para>
-<literallayout remap='.nf'>
- rrt remrt -M -s###
-</literallayout> <!-- .fi -->
+ <literallayout remap='.nf'>
+ rrt remrt -M -s###
+ </literallayout> <!-- .fi -->
-<para>where "###" is the image resolution desired.</para>
+ <para>
+ where "###" is the image resolution desired.
+ </para>
-<para><command>remrt</command>
-depends on the Berkeley
-<emphasis remap='I'>rsh (1)</emphasis>
-remote shell command and the user's corresponding ".rhosts" file
-to automatically initiate remote computation.</para>
+ <para>
+ <command>remrt</command> depends on the Berkeley <emphasis remap='I'>rsh
(1)</emphasis>
+ remote shell command and the user's corresponding ".rhosts" file to
automatically
+ initiate remote computation.
+ </para>
-<para><command>remrt</command>
-requires a control file called ".remrtrc" which specifies
-a few essential parameters of the server machines (network hosts)
-that are to participate in the distributed computation.
-The ".remrtrc" file contains a list of normal
-<command>remrt</command>
-commands which are to be executed before distributed processing
-is to begin.
-This can be useful for establishing a variety of user-specific
-defaults.
-However, the most important command to provide is a "host"
-command to describe each of the remote hosts that will (or may)
-participate in the distributed computation.
-Here is a sample ".remrt" file:</para>
+ <para>
+ <command>remrt</command>
+ requires a control file called ".remrtrc" which specifies a few essential
parameters
+ of the server machines (network hosts) that are to participate in the
distributed
+ computation. The ".remrtrc" file contains a list of normal
<command>remrt</command>
+ commands which are to be executed before distributed processing is to
begin.
+ This can be useful for establishing a variety of user-specific defaults.
However,
+ the most important command to provide is a "host" command to describe each
of the
+ remote hosts that will (or may) participate in the distributed computation.
+ Here is a sample ".remrt" file:
+ </para>
-<!-- .in +5 -->
+ <!-- .in +5 -->
-<literallayout remap='.nf'>
-host wolf passive cd /tmp/cad/.remrt.4d
-host voyage always cd /tmp/cad/.remrt.4d
-host whiz hacknight convert /tmp
-</literallayout> <!-- .fi -->
+ <literallayout remap='.nf'>
+ host wolf passive cd /tmp/cad/.remrt.4d
+ host voyage always cd /tmp/cad/.remrt.4d
+ host whiz hacknight convert /tmp
+ </literallayout> <!-- .fi -->
-<!-- .in -->
+ <!-- .in -->
-<para>The first argument to the "host" command is the name of the
-server machine.
-It will be converted to a fully qualified name by calling
-<citerefentry><refentrytitle>gethostbyname</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-and
-<citerefentry><refentrytitle>gethostbyaddr</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
+ <para>
+ The first argument to the "host" command is the name of the server machine.
+ It will be converted to a fully qualified name by calling
+
<citerefentry><refentrytitle>gethostbyname</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ and
+
<citerefentry><refentrytitle>gethostbyaddr</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
+ </para>
-<para>The second argument to the "host" command describes "when" this
-machine should be used.</para>
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='B'>always</emphasis></term>
- <listitem>
-<para>says that whenever this host is not participating in the computation,
-repeated attempts should be made (every 5 minutes) to start an
-<emphasis remap='I'>rtsrv</emphasis>
-process on that machine.
-This option is most useful for machines where the system administrator
-and/or owner of the machine won't mind your using the machine at any
-time. (Note that
-<emphasis remap='I'>rtsrv</emphasis>
-runs at the lowest priority by default, so this isn't too terribly
-uncivilized. But be polite and ask first.)</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis remap='B'>night</emphasis></term>
- <listitem>
-<para>indicates that the machine should only be used during
-the night and on weekends.
-Night extends from 1800 through 0000 to 0800.
-Saturday and Sunday are considered to be in night time for the entire
day.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis remap='B'>hacknight</emphasis></term>
- <listitem>
-<para>indicates that the machine is owned by a late-night "hacker",
-and can be used while that hacker is likely to be asleep.
-Hacking tends to run from 1300 through 0000 to 0400, so
-<emphasis remap='B'>hacknight</emphasis>
-is the time period from 0400 to 1300.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis remap='B'>passive</emphasis></term>
- <listitem>
-<para>indicates that
-<command>remrt</command>
-should never attempt to initiate an
-<emphasis remap='I'>rtsrv</emphasis>
-process on this machine, but if the user should happen to start
-<emphasis remap='I'>rtsrv</emphasis>
-manually on the machine and direct it to join the computational fray,
-then the necessary information will be available.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>If an unlisted machine should join the fray, it will be added</term>
- <listitem>
-<para>with a "when" value of
-<emphasis remap='B'>passive</emphasis>
-and a "where" value of
-<emphasis remap='B'>convert</emphasis>.
-When an
-<emphasis remap='I'>rtsrv</emphasis>
-passes from night into day, it is automatically terminated by
-<command>remrt</command>
-at the appointed time.</para>
- </listitem>
- </varlistentry>
-</variablelist>
+ <para>
+ The second argument to the "host" command describes "when" this machine
should be used.
+ </para>
+
+ <variablelist remap='TP'>
+ <varlistentry>
+ <term><emphasis remap='B'>always</emphasis></term>
+ <listitem>
+ <para>
+ says that whenever this host is not participating in the computation,
+ repeated attempts should be made (every 5 minutes) to start an
+ <emphasis remap='I'>rtsrv</emphasis> process on that machine.
+ This option is most useful for machines where the system administrator
+ and/or owner of the machine won't mind your using the machine at any
+ time. (Note that <emphasis remap='I'>rtsrv</emphasis>
+ runs at the lowest priority by default, so this isn't too terribly
+ uncivilized. But be polite and ask first.)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='B'>night</emphasis></term>
+ <listitem>
+ <para>
+ indicates that the machine should only be used during
+ the night and on weekends. Night extends from 1800 through 0000 to
0800.
+ Saturday and Sunday are considered to be in night time for the entire
day.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='B'>hacknight</emphasis></term>
+ <listitem>
+ <para>
+ indicates that the machine is owned by a late-night "hacker",
+ and can be used while that hacker is likely to be asleep.
+ Hacking tends to run from 1300 through 0000 to 0400, so
+ <emphasis remap='B'>hacknight</emphasis>
+ is the time period from 0400 to 1300.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='B'>passive</emphasis></term>
+ <listitem>
+ <para>
+ indicates that <command>remrt</command> should never attempt to
initiate an
+ <emphasis remap='I'>rtsrv</emphasis> process on this machine, but if
the
+ user should happen to start <emphasis remap='I'>rtsrv</emphasis>
+ manually on the machine and direct it to join the computational fray,
+ then the necessary information will be available.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>If an unlisted machine should join the fray, it will be
added</term>
+ <listitem>
+ <para>
+ with a "when" value of <emphasis remap='B'>passive</emphasis>
+ and a "where" value of <emphasis remap='B'>convert</emphasis>.
+ When an <emphasis remap='I'>rtsrv</emphasis>
+ passes from night into day, it is automatically terminated by
+ <command>remrt</command> at the appointed time.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
-<para>The third argument to the "host" command is the "where" parameter,
-which indicates where the BRL-CAD ".g" file (and any related texture
-maps) can be found.</para>
-<variablelist remap='TP'>
- <varlistentry>
- <term><emphasis remap='B'>cd</emphasis></term>
- <listitem>
-<para>indicates that the
-<emphasis remap='I'>rtsrv</emphasis>
-program should change directory
-<citerefentry><refentrytitle>cd</refentrytitle><manvolnum>2</manvolnum></citerefentry>
-to the indicated directory path, and should just read the
-data files in that directory as
-<emphasis remap='I'>rt</emphasis>
-normally would.
-This can be used to specify NFS or RFS mounted remote directories,
-or static copies of the binary database file(s) needed to perform
-the ray-tracing.
-This is the most efficient way of operating
-<emphasis remap='I'>rtsrv</emphasis>,
-but it also requires some manual preparation on the part of the user
-to install all the required files in the designated location.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis remap='B'>convert</emphasis></term>
- <listitem>
-<para>indicates that
-<command>remrt</command>
-should send across an ASCII machine-independent version of the
-".g" database file using the command:</para>
+ <para>
+ The third argument to the "host" command is the "where" parameter,
+ which indicates where the BRL-CAD ".g" file (and any related texture
+ maps) can be found.
+ </para>
+ <variablelist remap='TP'>
+ <varlistentry>
+ <term><emphasis remap='B'>cd</emphasis></term>
+ <listitem>
+ <para>
+ indicates that the <emphasis remap='I'>rtsrv</emphasis>
+ program should change directory
+
<citerefentry><refentrytitle>cd</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ to the indicated directory path, and should just read the
+ data files in that directory as <emphasis remap='I'>rt</emphasis>
+ normally would. This can be used to specify NFS or RFS mounted remote
+ directories, or static copies of the binary database file(s) needed
+ to perform the ray-tracing. This is the most efficient way of
operating
+ <emphasis remap='I'>rtsrv</emphasis>,
+ but it also requires some manual preparation on the part of the user
+ to install all the required files in the designated location.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='B'>convert</emphasis></term>
+ <listitem>
+ <para>
+ indicates that <command>remrt</command> should send across an ASCII
+ machine-independent version of the ".g" database file using the
command:
+ </para>
-<literallayout remap='.nf'>
- asc2g < file.g | rsh host 'cd directory; g2asc > file.g'
-</literallayout> <!-- .fi -->
+ <literallayout remap='.nf'>
+ asc2g < file.g | rsh host 'cd directory; g2asc > file.g'
+ </literallayout> <!-- .fi -->
-<para>before starting up the
-<emphasis remap='I'>rtsrv</emphasis>
-program in that same directory.
-This relieves the user of the burden of setting up the ".g"
-database file, but suffers from several drawbacks.
-First, the transmission of a large database can take a noticeable
-amount of time.
-Second, should the server host go down and then re-join the fray,
-the database will be sent again, because
-<command>remrt</command>
-has no easy way to tell if the previous ".g" file is still intact
-after the crash/restart.
-Third,
-<command>remrt</command>
-has no way to tell what auxiliary files might be needed for this ".g"
-file, and thus can not send them automatically.
-If the ".g" file references height field, extruded bit-map, or volumetric
-solids, the associated data files will not be present on a
-<emphasis remap='B'>convert</emphasis>
-mode server. The same applies for texture map and bump map files.</para>
- </listitem>
- </varlistentry>
-</variablelist>
+ <para>
+ before starting up the <emphasis remap='I'>rtsrv</emphasis>
+ program in that same directory. This relieves the user of the burden
of
+ setting up the ".g" database file, but suffers from several drawbacks.
+ First, the transmission of a large database can take a noticeable
+ amount of time.
+ Second, should the server host go down and then
+ re-join the fray, the database will be sent again, because
+ <command>remrt</command>
+ has no easy way to tell if the previous ".g" file is still intact
+ after the crash/restart.
+ Third, <command>remrt</command> has no way to tell what auxiliary
files
+ might be needed for this ".g" file, and thus can not send them
automatically.
+ If the ".g" file references height field, extruded bit-map, or
volumetric
+ solids, the associated data files will not be present on a
+ <emphasis remap='B'>convert</emphasis>
+ mode server. The same applies for texture map and bump map files.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
-<para><command>remrt</command>
-uses several different strategies for optimizing the dispatching of work.
-These can be controlled by the "allocate" command.
-If "allocate frame" has been specified,
-then the work allocation method is
-a "free for all", allocating work from one frame at a time
-to all servers as they become ready for more.
-This maximizes the CPU overhead for prepping (because all CPUs will
-prep all frames), but it also provides the shortest wall-clock time
-to getting the first frame finished.
-This mode is recommended for demonstrations, and other situations
-where people are sitting around waiting for results to appear on the
screen.</para>
+ <para>
+ <command>remrt</command>
+ uses several different strategies for optimizing the dispatching of work.
+ These can be controlled by the "allocate" command. If "allocate frame" has
+ been specified, then the work allocation method is a "free for all",
+ allocating work from one frame at a time to all servers as they become
ready
+ for more. This maximizes the CPU overhead for prepping (because all CPUs
will
+ prep all frames), but it also provides the shortest wall-clock time
+ to getting the first frame finished. This mode is recommended for
demonstrations,
+ and other situations where people are sitting around waiting for results
+ to appear on the screen.
+ </para>
-<para>If the
-"allocate load" command has been given, then new servers
-will not be assigned to a given frame unless there is at least
-enough work remaining on that frame to require
-10 percent of that server's measured performance capacity.
-Otherwise the server is started on a subsequent frame.</para>
+ <para>
+ If the
+ "allocate load" command has been given, then new servers will not be
assigned to
+ a given frame unless there is at least enough work remaining on that frame
to
+ require 10 percent of that server's measured performance capacity.
+ Otherwise the server is started on a subsequent frame.
+ </para>
-<para>If the "allocate movie" command is given, then each server is
-allocated a whole frame to do. This minimizes the CPU time
-spent in the overhead of prepping the frame, and tends to maximize overall
-throughput, at the price of making you wait a long time for the first
-frame to finish.
-This mode is best used when crunching out large numbers of frames
-for an animation.
-(See also the
-<citerefentry><refentrytitle>scriptsort</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-command for a clever power-of-two script rearrangement technique first
-proposed by Jim Blinn).</para>
+ <para>
+ If the "allocate movie" command is given, then each server is allocated a
whole
+ frame to do. This minimizes the CPU time spent in the overhead of
prepping the
+ frame, and tends to maximize overall throughput, at the price of making you
+ wait a long time for the first frame to finish. This mode is best used
when
+ crunching out large numbers of frames for an animation.
+ (See also the
+
<citerefentry><refentrytitle>scriptsort</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ command for a clever power-of-two script rearrangement technique first
+ proposed by Jim Blinn).
+ </para>
-<para>The output can be stored either in a file, or sent to the current
-framebuffer, the same as with
-<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
+ <para>
+ The output can be stored either in a file, or sent to the current
+ framebuffer, the same as with
+
<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
+ </para>
-<para>When
-<command>remrt</command>
-is run without command line arguments, it enters an interactive
-mode. In this mode, the current framebuffer can be assigned and
-released, frames can be added to the list of pending work, and
-many other control and status commands can be used.</para>
+ <para>
+ When <command>remrt</command> is run without command line arguments, it
enters
+ an interactive mode. In this mode, the current framebuffer can be
assigned and
+ released, frames can be added to the list of pending work, and many other
control
+ and status commands can be used.
+ </para>
-<para>Normally
-<command>remrt</command>
-runs in a batch mode, taking all its information from the
-command line, the script file on stdin, and the ".remrtrc" file.
-If you wish to issue an interactive-style command to
-<command>remrt</command>
-while it is running in batch mode, this can be accomplished by
-giving an extra argument to
-<emphasis remap='I'>rtsrv</emphasis>,
-which will simply pass on the command and exit.
-For example:</para>
+ <para>
+ Normally <command>remrt</command> runs in a batch mode, taking all its
information
+ from the command line, the script file on stdin, and the ".remrtrc" file.
+ If you wish to issue an interactive-style command to
<command>remrt</command>
+ while it is running in batch mode, this can be accomplished by
+ giving an extra argument to <emphasis remap='I'>rtsrv</emphasis>,
+ which will simply pass on the command and exit.
+ </para>
+ <para>
+ For example:
+ </para>
-<literallayout remap='.nf'>
+ <literallayout remap='.nf'>
rtsrv server_host 4446 status
-</literallayout> <!-- .fi -->
+ </literallayout> <!-- .fi -->
-<para>would send the command "status" to the
-<command>remrt</command>
-process running on the machine called "server_host" and listening
-at port 4446.
-4446 is the port used by the first copy of
-<command>remrt</command>
-running on a machine. If a second copy of
-<command>remrt</command>
-is started while the first one continues to run, it
-will be assigned port 4447. One is added to the port number
-repeatedly until an available port is found.
-Normally you do not need to worry about which port is being used,
-unless you wish to send commands there directly.
-The
-<citerefentry><refentrytitle>netstat</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-command can sometimes be useful to track down which ports are being
used.</para>
-</refsect1>
+ <para>
+ would send the command "status" to the <command>remrt</command>
+ process running on the machine called "server_host" and listening
+ at port 4446. 4446 is the port used by the first copy of
+ <command>remrt</command> running on a machine. If a second copy of
+ <command>remrt</command> is started while the first one continues to run,
it
+ will be assigned port 4447. One is added to the port number repeatedly
+ until an available port is found. Normally you do not need to worry about
+ which port is being used, unless you wish to send commands there directly.
+ The
<citerefentry><refentrytitle>netstat</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ command can sometimes be useful to track down which ports are being used.
+ </para>
+</refsection>
-<refsect1 xml:id='see_also'><title>SEE ALSO</title>
-<para><citerefentry><refentrytitle>rtsrv</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>scriptsort</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>brlcad</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>mged</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>lgt</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>pix-fb</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>rtray</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>rtpp</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>librt</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>ray</refentrytitle><manvolnum>5V</manvolnum></citerefentry>,
<citerefentry><refentrytitle>pix</refentrytitle><manvolnum>5</manvolnum></citerefentry></para>
-</refsect1>
+<refsection>
+<example>
+ <title>Performing a Basic remrt/rtsrv Raytrace</title>
+ <para>
+ The following steps will set up a local (single machine) example remrt
session.
+ This does not utilize the full power of the remrt system, but will
illustrate
+ how the individual pieces relate to each other. Rather than use rsh, each
+ process will be launched manually.
+ </para>
+ <para>
+ Launch an <command>fbserv</command> instance on the desired port and with
the desired type
+ (we will use port 0 and /dev/X for a Linux-based X11 rendering - windows
users can try /dev/wgl.)
+ For a somewhat larger render we specify a size of 2048 pixels square.
+ </para>
+ <para>
+ <userinput>fbserv -s2048 -p0 -F/dev/X</userinput>
+ </para>
+ <para>
+ If an graphical framebuffer was specified, a window should appear.
Otherwise, fbserv will silently
+ wait for input.
+ </para>
+ <para>
+ In MGED, set up the scene you wish to render and then save a script with
<command>saveview</command>
+ </para>
+ <para>
+ <userinput>saveview remrt.rt</userinput>
+ </para>
+ <para>
+ Edit the script and replace the <command>rt</command> command with
<command>remrt</command>. Replace
+ the output file specification (<option>-o filename</option>) with a -F0
option to point the render
+ to the fbserv started in the previous step. Also add a -s2048 option to
specify a rendering size to
+ match that provided to the fbserv.
+ </para>
+ <para>
+ Run the script to launch remrt. You should see output indicating the
program has launched. (Note:
+ the port number printed by the default output is not useful - you want to
use 4446 by default to
+ connect to remrt.)
+ </para>
+ <para>
+ <userinput>./remrt.rt</userinput>
+ <literallayout>
+08/22 21:51:41 machinename BRL-CAD Release 7.30.0 Network-Distributed RT
(REMRT)
+ Sat, 22 Aug 2020 11:24:22 -0400, Compilation 1
+ user@machinename
-<refsect1 xml:id='diagnostics'><title>DIAGNOSTICS</title>
-<para>Numerous error conditions are possible.
-Descriptive messages are printed on standard error.</para>
-</refsect1>
+pkg_permserver(rtsrv, 8): unknown service
+08/22 21:51:41 Automatic REMRT on machine
+08/23 21:51:41 Assigned LIBPKG permport 24081
+08/23 21:51:41 Listening at TCP port 4446
+08/23 21:51:41 Reading script on stdin
+08/22 21:51:41 Starting to scan animation script
+08/22 21:51:41 Animation script loaded
+08/22 21:51:41 Worker assignment interval=5 seconds:
+ Server Last Last Average Cur Machine
+ State Lump Elapsed pix/sec Frame Name
+ -------- ----- ------- ------- ----- -------------
+08/22 21:51:41 Seeking servers to start
+ </literallayout>
+ </para>
+ <para>
+ Note that it is seeking servers - we have not given
<command>remrt</command> any instructions on
+ how to start its own. To start a server and see the system work, we set
up a local directory
+ containing the same .g file we used to set up the scene, and from that
directory run <command>rtsrv</command>.
+ (For these purposes we also add the <option>-d</option> so we can see more
of what is happening.
+ Without this option, if anything isn't set up correctly rtsrv can fail
with cryptic errors.)
+ </para>
+ <para>
+ <userinput>rtsrv -d machinename 4446</userinput>
+ </para>
+ <para>
+ If successful, both <command>remrt</command> and <command>rtsrv</command>
will being producing output.
+ The <command>rtsrv</command> will be more verbose, and should look like
the following:
-<refsect1 xml:id='see_also2'><title>SEE ALSO</title>
-<para>M. Muuss,
-"<emphasis remap='I'>Workstations</emphasis>,
-<emphasis remap='I'>Networking</emphasis>,
-<emphasis remap='I'>Distributed Graphics</emphasis>,
-<emphasis remap='I'>and Parallel Processing</emphasis>",
-in "<emphasis remap='I'>Computer Graphics Techniques</emphasis>: <emphasis
remap='I'>Theory and Practice</emphasis>",
-ed: Rogers & Earnshaw,
-Springer Verlag, New York, pages 409-472</para>
-</refsect1>
+ <literallayout>
+PIXELS fr=0 pix=3588096..3592191, rays=3712, cpu=0.153336
+ph_enqueue: 3592192 3596287 0
+PIXELS fr=0 pix=3592192..3596287, rays=3856, cpu=0.143813
+ph_enqueue: 3596288 3600383 0
+PIXELS fr=0 pix=3596288..3600383, rays=3456, cpu=0.145104
+ph_enqueue: 3600384 3604479 0
+PIXELS fr=0 pix=3600384..3604479, rays=4032, cpu=0.145221
+ph_enqueue: 3604480 3608575 0
+PIXELS fr=0 pix=3604480..3608575, rays=3776, cpu=0.141353
+ph_enqueue: 3608576 3612671 0
+PIXELS fr=0 pix=3608576..3612671, rays=3696, cpu=0.13579
+ph_enqueue: 3612672 3616767 0
+ </literallayout>
+ </para>
+ <para>
+ Upon completion, remrt will notify the user and exit. For this examle,
the full remrt output is:
+ <literallayout>
+08/22 21:51:41 machinename BRL-CAD Release 7.31.0 Network-Distributed RT
(REMRT)
+ Sat, 22 Aug 2020 11:24:22 -0400, Compilation 1
+ user@machinename
-<refsect1 xml:id='bugs'><title>BUGS</title>
-<para>Most deficiencies observed while using the
-<command>remrt</command>
-program are usually with the
-<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-program, with which it shares a substantial amount of common code,
-or with the
-<citerefentry><refentrytitle>librt</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-library.
-If a frame fails to render properly, try processing it on a single
-machine using
-<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-to determine if the problem is in the ray-tracing side of things,
-or the distributed computation side of things.</para>
+pkg_permserver(rtsrv, 8): unknown service
+08/22 21:51:41 Automatic REMRT on machinename
+08/22 21:51:41 Listening at port 24081, reading script on stdin
+08/22 21:51:41 Starting to scan animation script
+08/22 21:51:41 Animation script loaded
+08/22 21:51:41 Worker assignment interval=5 seconds:
+ Server Last Last Average Cur Machine
+ State Lump Elapsed pix/sec Frame Name
+ -------- ----- ------- ------- ----- -------------
+08/22 21:51:41 Seeking servers to start
+host_lookup_by_hostent(localhost) got localhost?
+08/22 21:54:32 127.0.0.1: using 12 of 12 cpus
+08/22 21:54:32 127.0.0.1 dirbuild OK (Output from STEP converter step-g.)
+08/22 21:54:32 127.0.0.1: process_cmd 'opt -w2048 -n2048 -H0 -p0 -U0 -J0 -A0.4
-l0 -E1.41421 -x0 -X0 -T5.000000e-04/0.000000e+00'
+08/22 21:54:32 127.0.0.1: Using tolerance 0
+08/22 21:54:32 127.0.0.1: process_cmd 'viewsize 9.86571722597487e+02'
+08/22 21:54:32 127.0.0.1: process_cmd 'orientation 2.48097349045873e-01
4.76590573266048e-01 7.48097349045873e-01 3.89434830518390e-01'
+08/22 21:54:32 127.0.0.1: process_cmd 'eye_pt 1.01790192500394e+04
6.80791388110900e+03 5.76220366705708e+03'
+08/22 21:54:32 127.0.0.1: process_cmd 'clean'
+08/22 21:54:33 127.0.0.1: BRL-CAD Release 7.31.0 The BRL-CAD Optical Shader
Library
+ Sat, 22 Aug 2020 11:24:22 -0400, Compilation 1
+ user@machinename
+08/22 21:54:33 127.0.0.1: PREP: cpu = 9.7e-05 sec, elapsed = 0.000109 sec
+ parent: 0.0user 0.0sys 0:00real 0% i+d maxrss +pf csw
+ children: 0.0user 0.0sys 0:00real 0% i+d maxrss +pf csw
+08/22 21:54:33 127.0.0.1: NUBSP: 0 cut, 1 box (1 empty)
+08/22 21:54:33 127.0.0.1 gettrees OK (Document)
+08/22 21:54:34 127.0.0.1: shade_inputs(Brep_1.s) flip N xy=1292, 238 ID_BREP
surf=125 dot=0.422618
+08/22 21:54:34 127.0.0.1: center: 10236.048570366667 7005.4508761769466
5419.0434225048521
+08/22 21:54:34 127.0.0.1: dir: -0.74240387650610384 -0.51983679072568423
-0.42261826174069994
+08/22 21:54:35 127.0.0.1: shade_inputs(Brep_1.s) flip N xy=1090, 331 ID_BREP
surf=37 dot=0.422618
+08/22 21:54:35 127.0.0.1: center: 10276.352963334217 6914.8807626523731
5459.6463522037802
+08/22 21:54:35 127.0.0.1: dir: -0.74240387650610384 -0.51983679072568423
-0.42261826174069994
+08/22 21:55:58 127.0.0.1: shade_inputs(Brep_1.s) flip N xy=1069, 1335 ID_BREP
surf=171 dot=0.422618
+08/22 21:55:58 127.0.0.1: center: 10114.720787667989 6789.3550779060624
5897.983356695433
+08/22 21:55:58 127.0.0.1: dir: -0.74240387650610384 -0.51983679072568423
-0.42261826174069994
+08/22 21:56:16 Frame 0 DONE: 103.085 elapsed sec, 3890128 rays/1189.42 cpu sec
+08/22 21:56:16 RTFM=37737.1 rays/sec (3270.61 rays/cpu sec)
+08/22 21:56:16 All work done!
+08/22 21:56:16 Task accomplished
+ </literallayout>
-</refsect1>
+ The framebuffer started in the beginning will now hold the image results.
To save those
+ results to a file, the <command>fb-png</command> is used:
+ </para>
+ <para>
+ <userinput>fb-png -F0 -s2048 image.png</userinput>
+ </para>
+</example>
+</refsection>
-<refsect1 xml:id='author'><title>AUTHOR</title>
-<para>BRL-CAD Team</para>
-</refsect1>
-<refsect1 xml:id='copyright'><title>COPYRIGHT</title>
-<para>This software is Copyright (c) 1994-2020 by the United States
-Government as represented by U.S. Army Research Laboratory.</para>
-</refsect1>
+<refsection xml:id='see_also'><title>SEE ALSO</title>
+<para>
+
<citerefentry><refentrytitle>rtsrv</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+
<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+
<citerefentry><refentrytitle>scriptsort</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+
<citerefentry><refentrytitle>brlcad</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+
<citerefentry><refentrytitle>mged</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+
<citerefentry><refentrytitle>lgt</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+
<citerefentry><refentrytitle>pix-fb</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+
<citerefentry><refentrytitle>rtray</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+
<citerefentry><refentrytitle>rtpp</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+
<citerefentry><refentrytitle>librt</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+
<citerefentry><refentrytitle>ray</refentrytitle><manvolnum>5V</manvolnum></citerefentry>,
+
<citerefentry><refentrytitle>pix</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+</para>
+</refsection>
-<refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
-<para>Reports of bugs or problems should be submitted via electronic
-mail to <email>[email protected]</email></para>
-</refsect1>
+<refsection xml:id='diagnostics'>
+ <title>DIAGNOSTICS</title>
+ <para>
+ Numerous error conditions are possible.
+ Descriptive messages are printed on standard error.
+ </para>
+</refsection>
+
+<refsection xml:id='see_also2'>
+ <title>SEE ALSO</title>
+ <para>
+ M. Muuss,
+ "<emphasis remap='I'>Workstations</emphasis>,
+ <emphasis remap='I'>Networking</emphasis>,
+ <emphasis remap='I'>Distributed Graphics</emphasis>,
+ <emphasis remap='I'>and Parallel Processing</emphasis>",
+ in "<emphasis remap='I'>Computer Graphics Techniques</emphasis>: <emphasis
remap='I'>Theory and Practice</emphasis>",
+ ed: Rogers & Earnshaw,
+ Springer Verlag, New York, pages 409-472
+ </para>
+</refsection>
+
+<refsection xml:id='bugs'>
+ <title>BUGS</title>
+ <para>
+ Most deficiencies observed while using the <command>remrt</command>
program are usually
+ with the
<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ program, with which it shares a substantial amount of common code, or with
the
+
<citerefentry><refentrytitle>librt</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ library. If a frame fails to render properly, try processing it on a
single machine using
+
<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ to determine if the problem is in the ray-tracing side of things, or the
distributed
+ computation side of things.
+ </para>
+
+</refsection>
+
+<refsection xml:id='author'>
+ <title>AUTHOR</title>
+ <para>
+ BRL-CAD Team
+ </para>
+</refsection>
+
+<refsection xml:id='copyright'>
+ <title>COPYRIGHT</title>
+ <para>
+ This software is Copyright (c) 1994-2020 by the United States
+ Government as represented by U.S. Army Research Laboratory.
+ </para>
+</refsection>
+
+<refsection xml:id='bug_reports'>
+ <title>BUG REPORTS</title>
+ <para>
+ Reports of bugs or problems should be submitted via electronic
+ mail to <email>[email protected]</email>
+ </para>
+</refsection>
</refentry>
Modified: brlcad/branches/RELEASE/doc/docbook/system/man1/rtweight.xml
===================================================================
--- brlcad/branches/RELEASE/doc/docbook/system/man1/rtweight.xml
2020-08-26 12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/doc/docbook/system/man1/rtweight.xml
2020-08-26 12:21:02 UTC (rev 76959)
@@ -1,163 +1,170 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- lifted from troff+man by doclifter -->
<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en'
xml:id='rtweight1'>
-<refmeta>
+ <refmeta>
<refentrytitle>RTWEIGHT
-</refentrytitle>
-<manvolnum>1</manvolnum>
-<refmiscinfo class='source'>BRL-CAD</refmiscinfo>
-<refmiscinfo class='manual'>BRL-CAD</refmiscinfo>
-</refmeta>
+ </refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class='source'>BRL-CAD</refmiscinfo>
+ <refmiscinfo class='manual'>BRL-CAD</refmiscinfo>
+ </refmeta>
-<refnamediv>
-<refname>rtweight</refname>
-<refpurpose>Calculate weight, centroid and volume data for an mged model,
using raytracing</refpurpose>
-</refnamediv>
-<!-- body begins here -->
-<refsynopsisdiv xml:id='synopsis'>
-<cmdsynopsis>
- <command>rtweight</command>
- <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>
- <arg choice='plain'><replaceable>model.g</replaceable></arg>
- <arg choice='plain' rep='repeat'><replaceable>objects</replaceable></arg>
+ <refnamediv>
+ <refname>rtweight</refname>
+ <refpurpose>Calculate mass, centroid, and volume of geometry using
raytracing</refpurpose>
+ </refnamediv>
+ <!-- body begins here -->
+ <refsynopsisdiv xml:id='synopsis'>
+ <cmdsynopsis>
+ <command>rtweight</command>
+ <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>
+ <arg choice='plain'><replaceable>model.g</replaceable></arg>
+ <arg choice='plain' rep='repeat'><replaceable>objects</replaceable></arg>
-</cmdsynopsis>
-</refsynopsisdiv>
+ </cmdsynopsis>
+ </refsynopsisdiv>
-<refsect1 xml:id='description'><title>DESCRIPTION</title>
-<para><command>rtweight</command>
-operates on the indicated
-<emphasis remap='I'>objects</emphasis>
-in
-<emphasis remap='I'>model.g</emphasis>
-to calculate the volume and centroid of each region encountered along
-rays. Material density information
-and region line of sight (LOS) thickness estimates are used to calculate
-the mass for each region.
-</para>
+ <refsect1 xml:id='description'><title>DESCRIPTION</title>
+ <para>
+ <command>rtweight</command> operates on the indicated <emphasis
+ remap='I'>objects</emphasis> in <emphasis
+ remap='I'>model.g</emphasis>. Material density information and
+ region line of sight (LOS) thickness measurements obtained via ray
+ tracing are used to calculate the mass for each region encountered.
+ It will calculate and report volume of the objects specified. With
+ material properties, it will also report per-region mass information
+ as well as the overall geometric centroid. All calculations take
+ any Boolean operations into consideration.
+ </para>
-<para>
- <command>rtweight</command> can either use density information stored
- directly in a .g database or read a density
- file specified by the <option>-d</option> option.
-</para>
-<para>
- If using a density file the file must contain lines with the material
- number, density in g/cc, and material name, each separated by some
- white space. See the
<citerefentry><refentrytitle>gqa</refentrytitle><manvolnum>1</manvolnum></citerefentry>
manual page for more information about defining
- and managing density information.
-</para>
+ <para>
+ <command>rtweight</command> can either use density information
+ stored directly in a .g database or read a density file specified by
+ the <option>-d</option> option.
+ </para>
-<para>The following options are recognized.</para>
-<variablelist remap='TP'>
- <varlistentry>
- <term><option>-s#</option></term>
- <listitem>
-<para>Number of rays to fire in X and Y directions (square grid).
-Default is 512 (512x512). Conflicts with
-<option>-g</option></para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-g#</option></term>
- <listitem>
-<para>Distance between rays in the X and Y directions in millimeters.
Conflicts with
-<option>-s</option></para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-a#</option></term>
- <listitem>
-<para>Select azimuth in degrees. Used with
-<option>-e</option>
-and conflicts with
-<option>-M</option></para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-e#</option></term>
- <listitem>
-<para>Select elevation in degrees. Used with
-<option>-a</option>
-and conflicts with
-<option>-M</option></para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-d file</option></term>
- <listitem>
-<para>Read density information from the specified file.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-M</option></term>
- <listitem>
-<para>Read model2view matrix from standard input.
-Conflicts with
-<option>-a</option>
-and
-<option>-e</option></para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-r</option></term>
- <listitem>
-<para>Report individual region weights by region path name and also by region
-id number. The default only prints the total weight for all the objects
-specified.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-o file</option></term>
- <listitem>
-<para>Send the output to a specified file. The default is to standard
output.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-P#</option></term>
- <listitem>
-<para>Specify the maximum number of processors (in a multi-processor system)
to be
-used for this execution. The default is the maximum number for the
machine.</para>
- </listitem>
- </varlistentry>
-</variablelist>
+ <para>
+ If using a density file the file must contain lines with the
+ material number, density in g/cc, and material name, each separated
+ by some white space. See the
+
<citerefentry><refentrytitle>gqa</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ manual page for more information about defining and managing density
+ information.
+ </para>
-<para><command>rtweight</command>
-also accepts all other options that the
-<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-program implements, such as for non-square views, perspective, etc.</para>
-</refsect1>
+ <para>The following options are recognized.</para>
+ <variablelist remap='TP'>
+ <varlistentry>
+ <term><option>-s#</option></term>
+ <listitem>
+ <para>Number of rays to fire in X and Y directions (square grid).
+ Default is 512 (512x512). Conflicts with
+ <option>-g</option></para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-g#</option></term>
+ <listitem>
+ <para>Distance between rays in the X and Y directions in
+ millimeters. Conflicts with <option>-s</option></para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-a#</option></term>
+ <listitem>
+ <para>Select azimuth in degrees. Used with
+ <option>-e</option>
+ and conflicts with
+ <option>-M</option></para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-e#</option></term>
+ <listitem>
+ <para>Select elevation in degrees. Used with
+ <option>-a</option>
+ and conflicts with
+ <option>-M</option></para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-d file</option></term>
+ <listitem>
+ <para>Read density information from the specified file.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-M</option></term>
+ <listitem>
+ <para>Read model2view matrix from standard input.
+ Conflicts with
+ <option>-a</option>
+ and
+ <option>-e</option></para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-r</option></term>
+ <listitem>
+ <para>Report individual region weights by region path name and
+ also by region id number. The default only prints the total
+ weight for all the objects specified.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-o file</option></term>
+ <listitem>
+ <para>Send the output to a specified file. The default is to
+ standard output.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-P#</option></term>
+ <listitem>
+ <para>Specify the maximum number of processors (in a
+ multi-processor system) to be used for this execution. The
+ default is the maximum number for the machine.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
-<refsect1 xml:id='see_also'><title>SEE ALSO</title>
-<para><citerefentry><refentrytitle>mged</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>librt</refentrytitle><manvolnum>3</manvolnum></citerefentry></para>
-</refsect1>
+ <para><command>rtweight</command> also accepts all other options
+ that the
+
<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ program implements, such as for non-square views, perspective,
+ etc.</para>
+ </refsect1>
-<refsect1 xml:id='diagnostics'><title>DIAGNOSTICS</title>
-<para>Numerous error conditions are possible.
-Descriptive messages are printed on standard error (file descriptor 2).</para>
-</refsect1>
+ <refsect1 xml:id='see_also'><title>SEE ALSO</title>
+
<para><citerefentry><refentrytitle>mged</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>librt</refentrytitle><manvolnum>3</manvolnum></citerefentry></para>
+ </refsect1>
-<refsect1 xml:id='bugs'><title>BUGS</title>
-<para>Most deficiencies observed while using the
-<command>rtweight</command>
-program are usually with the
-<citerefentry><refentrytitle>librt</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-package instead.</para>
-</refsect1>
+ <refsect1 xml:id='diagnostics'><title>DIAGNOSTICS</title>
+ <para>Numerous error conditions are possible. Descriptive messages
+ are printed on standard error (file descriptor 2).</para>
+ </refsect1>
-<refsect1 xml:id='author'><title>AUTHOR</title>
-<para>James E. Hunt</para>
-</refsect1>
+ <refsect1 xml:id='bugs'><title>BUGS</title>
+ <para>Most deficiencies observed while using the
+ <command>rtweight</command>
+ program are usually with the
+
<citerefentry><refentrytitle>librt</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ package instead.</para>
+ </refsect1>
-<refsect1 xml:id='copyright'><title>COPYRIGHT</title>
-<para>This software is Copyright (c) 1991-2020 United States Government as
-represented by the U.S. Army Research Laboratory.</para>
-</refsect1>
+ <refsect1 xml:id='author'><title>AUTHOR</title>
+ <para>James E. Hunt</para>
+ </refsect1>
-<refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
-<para>Reports of bugs or problems should be submitted via electronic
-mail to <email>[email protected]</email></para>
-</refsect1>
+ <refsect1 xml:id='copyright'><title>COPYRIGHT</title>
+ <para>This software is Copyright (c) 1991-2020 United States Government as
+ represented by the U.S. Army Research Laboratory.</para>
+ </refsect1>
+
+ <refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
+ <para>Reports of bugs or problems should be submitted via electronic
+ mail to <email>[email protected]</email></para>
+ </refsect1>
</refentry>
Modified: brlcad/branches/RELEASE/doc/legal/embedded/CMakeLists.txt
===================================================================
--- brlcad/branches/RELEASE/doc/legal/embedded/CMakeLists.txt 2020-08-26
12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/doc/legal/embedded/CMakeLists.txt 2020-08-26
12:21:02 UTC (rev 76959)
@@ -62,6 +62,7 @@
sscanf.txt
stb_truetype.txt
STIX_Font_License_2010.txt
+ strnstr.txt
tcl.txt
tcllib.txt
tinythread.txt
Copied: brlcad/branches/RELEASE/doc/legal/embedded/strnstr.txt (from rev 76954,
brlcad/trunk/doc/legal/embedded/strnstr.txt)
===================================================================
--- brlcad/branches/RELEASE/doc/legal/embedded/strnstr.txt
(rev 0)
+++ brlcad/branches/RELEASE/doc/legal/embedded/strnstr.txt 2020-08-26
12:21:02 UTC (rev 76959)
@@ -0,0 +1,22 @@
+Copyright (c) 2005-2018 Rich Felker
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+file:/regress/repository/strnstr.c
Index: brlcad/branches/RELEASE/include
===================================================================
--- brlcad/branches/RELEASE/include 2020-08-26 12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/include 2020-08-26 12:21:02 UTC (rev 76959)
Property changes on: brlcad/branches/RELEASE/include
___________________________________________________________________
Modified: svn:mergeinfo
## -7,4 +7,4 ##
/brlcad/branches/opencl/include:65867-66137
/brlcad/branches/osg/include:62110-62113
/brlcad/branches/prep-cache/include:68236-68933
-/brlcad/trunk/include:36844-37285,37571-38764,38777-38845,41559-43155,43159-43908,44241-44324,44326-44385,44710-45373,45377,45379-47342,47370-68122,68125-75207,75325,75375,75377-75378,75387,75470-75472,75477,75492,75495,75549,75565-75566,75656-75661,75672,75675,75678,75729,75811,76641-76726,76729-76730,76748-76764,76771-76858
\ No newline at end of property
+/brlcad/trunk/include:36844-37285,37571-38764,38777-38845,41559-43155,43159-43908,44241-44324,44326-44385,44710-45373,45377,45379-47342,47370-68122,68125-75207,75325,75375,75377-75378,75387,75470-75472,75477,75492,75495,75549,75565-75566,75656-75661,75672,75675,75678,75729,75811,76641-76726,76729-76730,76748-76764,76771-76858,76862-76954
\ No newline at end of property
Modified: brlcad/branches/RELEASE/include/bu/magic.h
===================================================================
--- brlcad/branches/RELEASE/include/bu/magic.h 2020-08-26 12:12:42 UTC (rev
76958)
+++ brlcad/branches/RELEASE/include/bu/magic.h 2020-08-26 12:21:02 UTC (rev
76959)
@@ -218,6 +218,7 @@
#define DB5_RAW_INTERNAL_MAGIC 0x64357269 /**< d5ri */
#define DBI_MAGIC 0x57204381 /**< W C? */
#define DB_FULL_PATH_MAGIC 0x64626670 /**< dbfp */
+#define DM_MAGIC 0x444d4d4d /**< DMMM */
#define LIGHT_MAGIC 0xdbddbdb7 /**< ???? */
#define MF_MAGIC 0x55968058 /**< U??X */
#define PIXEL_EXT_MAGIC 0x50787400 /**< Pxt */
Modified: brlcad/branches/RELEASE/include/dm/defines.h
===================================================================
--- brlcad/branches/RELEASE/include/dm/defines.h 2020-08-26 12:12:42 UTC
(rev 76958)
+++ brlcad/branches/RELEASE/include/dm/defines.h 2020-08-26 12:21:02 UTC
(rev 76959)
@@ -55,6 +55,7 @@
/* The internals of the dm structure are hidden using the PImpl pattern*/
struct dm_impl;
struct dm {
+ uint32_t magic;
struct dm_impl *i;
};
Modified: brlcad/branches/RELEASE/include/dm.h
===================================================================
--- brlcad/branches/RELEASE/include/dm.h 2020-08-26 12:12:42 UTC (rev
76958)
+++ brlcad/branches/RELEASE/include/dm.h 2020-08-26 12:21:02 UTC (rev
76959)
@@ -273,7 +273,6 @@
/* TODO - dm_vp is supposed to go away, but until we figure it out
* expose it here to allow dm hiding */
-DM_EXPORT extern fastf_t *dm_get_vp(struct dm *dmp);
DM_EXPORT extern void dm_set_vp(struct dm *dmp, fastf_t *vp);
DM_EXPORT extern int dm_set_hook(const struct bu_structparse_map *map,
Modified: brlcad/branches/RELEASE/misc/CMake/BRLCAD_Targets.cmake
===================================================================
--- brlcad/branches/RELEASE/misc/CMake/BRLCAD_Targets.cmake 2020-08-26
12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/misc/CMake/BRLCAD_Targets.cmake 2020-08-26
12:21:02 UTC (rev 76959)
@@ -303,6 +303,7 @@
endfunction(SET_FLAGS_AND_DEFINITIONS)
+define_property(GLOBAL PROPERTY BRLCAD_EXEC_FILES BRIEF_DOCS "BRL-CAD
binaries" FULL_DOCS "List of installed BRL-CAD binary programs")
#-----------------------------------------------------------------------------
# Core routines for adding executables and libraries to the build and
@@ -328,6 +329,11 @@
# Let CMAKEFILES know what's going on
CMAKEFILES(${srcslist})
+ # If this is an installed program, note that
+ if (NOT E_NO_INSTALL AND NOT E_TEST)
+ set_property(GLOBAL APPEND PROPERTY BRLCAD_EXEC_FILES "${execname}")
+ endif (NOT E_NO_INSTALL AND NOT E_TEST)
+
# Check at compile time the standard BRL-CAD style rules
VALIDATE_STYLE("${execname}" "${srcslist}")
Modified: brlcad/branches/RELEASE/misc/tools/debug2c/debug2c.cxx
===================================================================
--- brlcad/branches/RELEASE/misc/tools/debug2c/debug2c.cxx 2020-08-26
12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/misc/tools/debug2c/debug2c.cxx 2020-08-26
12:21:02 UTC (rev 76959)
@@ -111,6 +111,14 @@
return -1;
}
+ for (int i = 0; i < argc; i++) {
+ std::string arg(argv[i]);
+ if (arg == std::string("--help") || arg == std::string("-h") || arg ==
std::string("-?")) {
+ std::cerr << "Usage: debug2c [-v] file_list output_file\n";
+ return 0;
+ }
+ }
+
if (argc == 4) {
if (std::string(argv[1]) == std::string("-v")) {
argc--;
Modified: brlcad/branches/RELEASE/regress/CMakeLists.txt
===================================================================
--- brlcad/branches/RELEASE/regress/CMakeLists.txt 2020-08-26 12:12:42 UTC
(rev 76958)
+++ brlcad/branches/RELEASE/regress/CMakeLists.txt 2020-08-26 12:21:02 UTC
(rev 76959)
@@ -28,6 +28,9 @@
# comgeom Conversion Tests
add_subdirectory(comgeom)
+# Coverage Tests
+add_subdirectory(coverage)
+
# DSP Regression Tests
add_subdirectory(dsp)
Modified: brlcad/branches/RELEASE/regress/asc/CMakeLists.txt
===================================================================
--- brlcad/branches/RELEASE/regress/asc/CMakeLists.txt 2020-08-26 12:12:42 UTC
(rev 76958)
+++ brlcad/branches/RELEASE/regress/asc/CMakeLists.txt 2020-08-26 12:21:02 UTC
(rev 76959)
@@ -7,8 +7,8 @@
endif (TARGET asc2g)
- #add_test(NAME regress-asc2dsp COMMAND ${SH_EXEC}
"${CMAKE_CURRENT_SOURCE_DIR}/asc2dsp.sh" ${CMAKE_SOURCE_DIR})
- #BRLCAD_REGRESSION_TEST(regress-asc2dsp "cv;asc2pix;pix-bw;asc2dsp"
TEST_DEFINED)
+ add_test(NAME regress-asc2dsp COMMAND ${SH_EXEC}
"${CMAKE_CURRENT_SOURCE_DIR}/asc2dsp.sh" ${CMAKE_SOURCE_DIR})
+ BRLCAD_REGRESSION_TEST(regress-asc2dsp "cv;asc2pix;pix-bw;asc2dsp"
TEST_DEFINED)
endif(SH_EXEC)
Modified: brlcad/branches/RELEASE/regress/asc/asc2dsp.sh
===================================================================
--- brlcad/branches/RELEASE/regress/asc/asc2dsp.sh 2020-08-26 12:12:42 UTC
(rev 76958)
+++ brlcad/branches/RELEASE/regress/asc/asc2dsp.sh 2020-08-26 12:21:02 UTC
(rev 76959)
@@ -54,53 +54,54 @@
exit 1
fi
-CV="`ensearch cv`"
-if test ! -f "$CV" ; then
- log "Unable to find cv, aborting"
- exit 1
-fi
+#CV="`ensearch cv`"
+#if test ! -f "$CV" ; then
+# log "Unable to find cv, aborting"
+# exit 1
+#fi
+#
+#A2P="`ensearch asc2pix`"
+#if test ! -f "$A2P" ; then
+# log "Unable to find asc2pix, aborting"
+# exit 1
+#fi
+#
+#P2B="`ensearch pix-bw`"
+#if test ! -f "$P2B" ; then
+# log "Unable to find pix-bw, aborting"
+# exit 1
+#fi
-A2P="`ensearch asc2pix`"
-if test ! -f "$A2P" ; then
- log "Unable to find asc2pix, aborting"
- exit 1
-fi
-P2B="`ensearch pix-bw`"
-if test ! -f "$P2B" ; then
- log "Unable to find pix-bw, aborting"
- exit 1
-fi
-
-
-BASE1=asc2dsp-old
+#BASE1=asc2dsp-old
BASE2=asc2dsp-new
# we generate one dsp file the old way and one the new way--they should be
identical
# old first
-log "... convert dsp data file in asc hex format to pix format"
-ASC1="$1/regress/dsp/$BASE1.asc"
-rm -f $BASE1.pix
-$A2P < $ASC1 > $BASE1.pix 2>>$LOGFILE
+#log "... convert dsp data file in asc hex format to pix format"
+#ASC1="$1/regress/dsp/$BASE1.asc"
+#rm -f $BASE1.pix
+#$A2P < $ASC1 > $BASE1.pix 2>>$LOGFILE
+#
+#log "convert pix to bw format"
+#rm -f $BASE1.bw
+## take the blue pixel only
+#$P2B -B1.0 $BASE1.pix > $BASE1.bw 2>>$LOGFILE
+#
+#log "convert pix to dsp format"
+#rm -f $BASE1.dsp
+#run $CV huc nu16 $BASE1.bw $BASE1.dsp
-log "convert pix to bw format"
-rm -f $BASE1.bw
-# take the blue pixel only
-$P2B -B1.0 $BASE1.pix > $BASE1.bw 2>>$LOGFILE
-
-log "convert pix to dsp format"
-rm -f $BASE1.dsp
-run $CV huc nu16 $BASE1.bw $BASE1.dsp
-
log "convert dsp data file in asc decimal format to dsp format"
ASC2="$1/regress/dsp/$BASE2.asc"
rm -f $BASE2.dsp
-run $A2D $BASE2.asc $BASE2.dsp
+run $A2D "$ASC2" $BASE2.dsp
+STATUS=$?
# the two dsp files should be identical
-run cmp $BASE1.dsp $BASE2.dsp
-STATUS=$?
+#run cmp $BASE1.dsp $BASE2.dsp
+#STATUS=$?
if [ $STATUS -gt 0 ] ; then
Modified: brlcad/branches/RELEASE/regress/comgeom/comgeom.sh
===================================================================
--- brlcad/branches/RELEASE/regress/comgeom/comgeom.sh 2020-08-26 12:12:42 UTC
(rev 76958)
+++ brlcad/branches/RELEASE/regress/comgeom/comgeom.sh 2020-08-26 12:21:02 UTC
(rev 76959)
@@ -126,11 +126,11 @@
log "comgeom-g conversion errors: $STATUS"
FAILURES="`expr $FAILURES + 1`"
else
- ERR=`grep error comgeom-g.log`
+ ERR=`grep error $LOGFILE`
if test "x$ERR" = "x" ; then
log "comgeom-g v5 test succeeded (2 of 3)"
else
- log "comgeom-g v5 errors, see 'comgeom-g.log'"
+ log "comgeom-g v5 errors, see $LOGFILE"
FAILURES="`expr $FAILURES + 1`"
fi
fi
@@ -145,11 +145,11 @@
log "comgeom-g conversion errors: $STATUS"
FAILURES="`expr $FAILURES + 1`"
else
- ERR=`grep error comgeom-g.log`
+ ERR=`grep error $LOGFILE`
if test "x$ERR" = "x" ; then
log "comgeom-g v4 test succeeded (3 of 3)"
else
- log "comgeom-g v4 errors, see 'comgeom-g.log'"
+ log "comgeom-g v4 errors, see $LOGFILE"
FAILURES="`expr $FAILURES + 1`"
fi
fi
Modified: brlcad/branches/RELEASE/regress/licenses/licenses_check.cpp
===================================================================
--- brlcad/branches/RELEASE/regress/licenses/licenses_check.cpp 2020-08-26
12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/regress/licenses/licenses_check.cpp 2020-08-26
12:21:02 UTC (rev 76959)
@@ -57,7 +57,7 @@
process_file(std::string f, std::map<std::string, std::string>
&file_to_license)
{
std::regex cad_regex(".*BRL-CAD.*");
- std::regex copyright_regex(".*[Cc]opyright.*[12][0-9[0-9[0-9].*");
+ std::regex copyright_regex(".*[Cc]opyright.*[1-2][0-9][0-9][0-9].*");
std::regex gov_regex(".*United[ ]States[ ]Government.*");
std::regex pd_regex(".*[Pp]ublic[ ][Dd]omain.*");
std::string sline;
Modified: brlcad/branches/RELEASE/regress/repository/CMakeLists.txt
===================================================================
--- brlcad/branches/RELEASE/regress/repository/CMakeLists.txt 2020-08-26
12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/regress/repository/CMakeLists.txt 2020-08-26
12:21:02 UTC (rev 76959)
@@ -5,7 +5,7 @@
# Build a scanner to check the repository for various problems
-BRLCAD_ADDEXEC(repocheck repocheck.cpp "libbu;${CMAKE_THREAD_LIBS_INIT}" TEST)
+BRLCAD_ADDEXEC(repocheck "repocheck.cpp;strnstr.c"
"libbu;${CMAKE_THREAD_LIBS_INIT}" TEST)
if (O3_COMPILER_FLAG)
# This check benefits greatly from optimization. If we have the O3 flag, use
# it - whether or not the standard build settings would add it.
@@ -22,6 +22,7 @@
CMAKEFILES(
CMakeLists.txt
repocheck.cpp
+ strnstr.c
regress-repository.cmake.in
)
Modified: brlcad/branches/RELEASE/regress/repository/repocheck.cpp
===================================================================
--- brlcad/branches/RELEASE/regress/repository/repocheck.cpp 2020-08-26
12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/regress/repository/repocheck.cpp 2020-08-26
12:21:02 UTC (rev 76959)
@@ -59,6 +59,9 @@
#include "bu/mapped_file.h"
#include "bu/str.h"
+extern "C" char *
+bu_strnstr(const char *h, const char *n, size_t hlen);
+
#define MAX_LINES_CHECK 500
#define EXPECTED_PLATFORM_SYMBOLS 257
@@ -392,12 +395,12 @@
// If we have anything in the buffer that looks like it might be
// of interest, continue - otherwise we're done
- if (!std::strstr((const char *)ifile->buf, "bio.h")) {
+ if (!bu_strnstr((const char *)ifile->buf, "bio.h", ifile->buflen)) {
bu_close_mapped_file(ifile);
continue;
}
- std::string fbuff((char *)ifile->buf);
+ std::string fbuff((char *)ifile->buf, ifile->buflen);
std::istringstream fs(fbuff);
int lcnt = 0;
@@ -463,12 +466,12 @@
// If we have anything in the buffer that looks like it might be
// of interest, continue - otherwise we're done
- if (!std::strstr((const char *)ifile->buf, "bnetwork.h")) {
+ if (!bu_strnstr((const char *)ifile->buf, "bnetwork.h", ifile->buflen))
{
bu_close_mapped_file(ifile);
continue;
}
- std::string fbuff((char *)ifile->buf);
+ std::string fbuff((char *)ifile->buf, ifile->buflen);
std::istringstream fs(fbuff);
int lcnt = 0;
@@ -541,12 +544,12 @@
// If we have anything in the buffer that looks like it might be
// of interest, continue - otherwise we're done
- if (!std::strstr((const char *)ifile->buf, "common.h")) {
+ if (!bu_strnstr((const char *)ifile->buf, "common.h", ifile->buflen)) {
bu_close_mapped_file(ifile);
continue;
}
- std::string fbuff((char *)ifile->buf);
+ std::string fbuff((char *)ifile->buf, ifile->buflen);
std::istringstream fs(fbuff);
int lcnt = 0;
@@ -599,7 +602,7 @@
continue;
}
- std::string fbuff((char *)ifile->buf);
+ std::string fbuff((char *)ifile->buf, ifile->buflen);
std::istringstream fs(fbuff);
@@ -696,12 +699,12 @@
// If we have anything in the buffer that looks like it might be
// of interest, continue - otherwise we're done
- if (!std::strstr((const char *)ifile->buf, "main")) {
+ if (!bu_strnstr((const char *)ifile->buf, "main", ifile->buflen)) {
bu_close_mapped_file(ifile);
continue;
}
- std::string fbuff((char *)ifile->buf);
+ std::string fbuff((char *)ifile->buf, ifile->buflen);
std::istringstream fs(fbuff);
int lcnt = 0;
@@ -768,7 +771,7 @@
continue;
}
- std::string fbuff((char *)ifile->buf);
+ std::string fbuff((char *)ifile->buf, ifile->buflen);
std::istringstream fs(fbuff);
//std::cout << "Reading " << srcs[i] << "\n";
Copied: brlcad/branches/RELEASE/regress/repository/strnstr.c (from rev 76954,
brlcad/trunk/regress/repository/strnstr.c)
===================================================================
--- brlcad/branches/RELEASE/regress/repository/strnstr.c
(rev 0)
+++ brlcad/branches/RELEASE/regress/repository/strnstr.c 2020-08-26
12:21:02 UTC (rev 76959)
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2005-2018 Rich Felker
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * This is a length limited version of strstr, based on the OpenBSD
+ * implementation:
+ *
+ * OpenBSD: strstr.c,v 1.9 2020/04/16 12:37:52 claudio Exp
+ *
https://github.com/libressl-portable/openbsd/blob/master/src/lib/libc/string/strstr.c
+ *
+ * It's primary use is for situations like libbu mapped files where a NULL
+ * termination is not guaranteed, but we still need a fast search for a
+ * substring within the file contents. With this API we can use
+ * bu_mapped_file's buflen to limit the search to the file contents even if
+ * there is no NULL termination.
+ */
+
+#include <string.h>
+#include <stdint.h>
+
+static char *
+twobyte_strstr(const unsigned char *h, const unsigned char *n, size_t hlen)
+{
+ size_t hpos = 0;
+ uint16_t nw = n[0]<<8 | n[1], hw = h[0]<<8 | h[1];
+ for (h++; *h && hpos++ && hpos < hlen && hw != nw; hw = hw<<8 | *++h);
+ return *h ? (char *)h-1 : 0;
+}
+
+static char *
+threebyte_strstr(const unsigned char *h, const unsigned char *n, size_t hlen)
+{
+ size_t hpos = 0;
+ uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8;
+ uint32_t hw = h[0]<<24 | h[1]<<16 | h[2]<<8;
+ for (h+=2; *h && hpos++ && hpos < hlen && hw != nw; hw = (hw|*++h)<<8);
+ return *h ? (char *)h-2 : 0;
+}
+
+static char *
+fourbyte_strstr(const unsigned char *h, const unsigned char *n, size_t hlen)
+{
+ size_t hpos = 0;
+ uint32_t nw = n[0]<<24 | n[1]<<16 | n[2]<<8 | n[3];
+ uint32_t hw = h[0]<<24 | h[1]<<16 | h[2]<<8 | h[3];
+ for (h+=3; *h && hpos++ && hpos < hlen && hw != nw; hw = hw<<8 | *++h);
+ return *h ? (char *)h-3 : 0;
+}
+
+#define MAX(a,b) ((a)>(b)?(a):(b))
+#define MIN(a,b) ((a)<(b)?(a):(b))
+
+#define BITOP(a,b,op) \
+ ((a)[(size_t)(b)/(8*sizeof *(a))] op (size_t)1<<((size_t)(b)%(8*sizeof
*(a))))
+
+/*
+ * Maxime Crochemore and Dominique Perrin, Two-way string-matching,
+ * Journal of the ACM, 38(3):651-675, July 1991.
+ */
+static char *
+twoway_strstr(const unsigned char *h, const unsigned char *n, size_t hlen)
+{
+ const unsigned char *z;
+ size_t l, ip, jp, k, p, ms, p0, mem, mem0;
+ size_t byteset[32 / sizeof(size_t)] = { 0 };
+ size_t shift[256];
+
+ /* Computing length of needle and fill shift table */
+ for (l=0; n[l] && h[l]; l++)
+ BITOP(byteset, n[l], |=), shift[n[l]] = l+1;
+ if (n[l]) return 0; /* hit the end of h */
+
+ /* Compute maximal suffix */
+ ip = -1; jp = 0; k = p = 1;
+ while (jp+k<l) {
+ if (n[ip+k] == n[jp+k]) {
+ if (k == p) {
+ jp += p;
+ k = 1;
+ } else k++;
+ } else if (n[ip+k] > n[jp+k]) {
+ jp += k;
+ k = 1;
+ p = jp - ip;
+ } else {
+ ip = jp++;
+ k = p = 1;
+ }
+ }
+ ms = ip;
+ p0 = p;
+
+ /* And with the opposite comparison */
+ ip = -1; jp = 0; k = p = 1;
+ while (jp+k<l) {
+ if (n[ip+k] == n[jp+k]) {
+ if (k == p) {
+ jp += p;
+ k = 1;
+ } else k++;
+ } else if (n[ip+k] < n[jp+k]) {
+ jp += k;
+ k = 1;
+ p = jp - ip;
+ } else {
+ ip = jp++;
+ k = p = 1;
+ }
+ }
+ if (ip+1 > ms+1) ms = ip;
+ else p = p0;
+
+ /* Periodic needle? */
+ if (memcmp(n, n+p, ms+1)) {
+ mem0 = 0;
+ p = MAX(ms, l-ms-1) + 1;
+ } else mem0 = l-p;
+ mem = 0;
+
+ /* Initialize incremental end-of-haystack pointer */
+ size_t hcnt = 0;
+ z = h;
+
+ /* Search loop */
+ for (;;) {
+ if (hcnt >= hlen) return 0;
+
+ /* Update incremental end-of-haystack pointer */
+ if (z-h < (long)l) {
+ /* Fast estimate for MIN(l,63) */
+ size_t grow = l | 63;
+ if (grow + hcnt > hlen) {
+ grow = hlen - hcnt;
+ }
+ const unsigned char *z2 = (const unsigned char *)memchr(z, 0, grow);
+ if (z2) {
+ z = z2;
+ if (z-h < (long)l) return 0;
+ } else {
+ z += grow;
+ hcnt = hcnt + grow;
+ }
+ }
+
+ /* Check last byte first; advance by shift on mismatch */
+ if (BITOP(byteset, h[l-1], &)) {
+ k = l-shift[h[l-1]];
+ if (k) {
+ if (k < mem) k = mem;
+ h += k;
+ mem = 0;
+ continue;
+ }
+ } else {
+ h += l;
+ mem = 0;
+ continue;
+ }
+
+ /* Compare right half */
+ for (k=MAX(ms+1,mem); n[k] && n[k] == h[k]; k++);
+ if (n[k]) {
+ h += k-ms;
+ mem = 0;
+ continue;
+ }
+ /* Compare left half */
+ for (k=ms+1; k>mem && n[k-1] == h[k-1]; k--);
+ if (k <= mem) return (char *)h;
+ h += p;
+ mem = mem0;
+ }
+}
+
+char *
+bu_strnstr(const char *h, const char *n, size_t hlen)
+{
+ /* Return immediately on empty needle */
+ if (!n[0]) return (char *)h;
+
+ /* Use faster algorithms for short needles */
+ const char *tmph = (const char *)memchr((void *)h, *n, hlen);
+ if (!tmph || !n[1]) return (char *)h;
+ if (!h[1]) return 0;
+ if (!n[2]) return twobyte_strstr((const unsigned char *)h, (const unsigned
char *)n, hlen);
+ if (!h[2]) return 0;
+ if (!n[3]) return threebyte_strstr((const unsigned char *)h, (const
unsigned char *)n, hlen);
+ if (!h[3]) return 0;
+ if (!n[4]) return fourbyte_strstr((const unsigned char *)h, (const
unsigned char *)n, hlen);
+
+ return twoway_strstr((const unsigned char *)h, (const unsigned char *)n,
hlen);
+}
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */
Modified: brlcad/branches/RELEASE/regress/solids/solids.sh
===================================================================
--- brlcad/branches/RELEASE/regress/solids/solids.sh 2020-08-26 12:12:42 UTC
(rev 76958)
+++ brlcad/branches/RELEASE/regress/solids/solids.sh 2020-08-26 12:21:02 UTC
(rev 76959)
@@ -110,7 +110,6 @@
rm -f solids.simple.pix.diff
$PIXDIFF solids.simple.rt.pix "$PATH_TO_THIS/solids.simple.ref.pix" >
solids.simple.pix.diff 2>> $LOGFILE
-log "... running tail -n1 $LOGFILE | tr , '\012' | awk '/many/ {print $1}'"
NUMBER_WRONG=`tail -n1 "$LOGFILE" | tr , '\012' | awk '/many/ {print $1}'`
log "solids.simple.rt.pix $NUMBER_WRONG off by many"
@@ -180,7 +179,6 @@
rm -f solids.pix.diff
$PIXDIFF solids.rt.pix "$PATH_TO_THIS/solids.ref.pix" > solids.pix.diff 2>
$LOGFILE
-tail -n1 "$LOGFILE" | tr , '\012' | awk '/many/ {print $0}'
NUMBER_WRONG=`tail -n1 "$LOGFILE" | tr , '\012' | awk '/many/ {print $1}'`
log "solids.rt.pix $NUMBER_WRONG off by many"
Modified: brlcad/branches/RELEASE/regress/usage.sh
===================================================================
--- brlcad/branches/RELEASE/regress/usage.sh 2020-08-26 12:12:42 UTC (rev
76958)
+++ brlcad/branches/RELEASE/regress/usage.sh 2020-08-26 12:21:02 UTC (rev
76959)
@@ -78,7 +78,7 @@
exists="`timeout --version 2>&1 | head -1 | awk '{print $1}'`"
if test "x$exists" != "xtimeout" ; then
- function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
+ timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
fi
@@ -92,6 +92,7 @@
test_usage ( ) {
cmd=$1
+ echo $cmd
log "=== $cmd === (pid: $$)"
usage="`timeout ${WAIT} $cmd -h -? 2>&1`"
@@ -106,6 +107,17 @@
lines=0
fi
+ # This is only feasible if we're in single-process-at-a-time mode, but if
+ # we are see if the execution of the command put out a -? file. If it
+ # did, that means it improperly handled the supplied options.
+ if test $NPSW -eq 1 ; then
+ QFILE=`pwd`/-?
+ if test -f "$QFILE"; then
+ log "ERROR: command $cmd created a -? file"
+ rm -f $QFILE
+ fi
+ fi
+
printf " %-30s lines:%3d maxline:%3d\n" "$cmd ..." "$lines" "$length"
if test "x`echo $usage | grep -i usage`" != "x" ; then
Modified: brlcad/branches/RELEASE/regress/weight/weight.ref
===================================================================
(Binary files differ)
Modified: brlcad/branches/RELEASE/regress/weight/weight.test2.ref
===================================================================
(Binary files differ)
Modified: brlcad/branches/RELEASE/sh/CMakeLists.txt
===================================================================
--- brlcad/branches/RELEASE/sh/CMakeLists.txt 2020-08-26 12:12:42 UTC (rev
76958)
+++ brlcad/branches/RELEASE/sh/CMakeLists.txt 2020-08-26 12:21:02 UTC (rev
76959)
@@ -3,7 +3,6 @@
elapsed.sh
cmp.sh
conversion.sh
- facetall.sh
show.sh
)
foreach(script ${sh_SCRIPTS})
Modified: brlcad/branches/RELEASE/sh/cmp.sh
===================================================================
--- brlcad/branches/RELEASE/sh/cmp.sh 2020-08-26 12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/sh/cmp.sh 2020-08-26 12:21:02 UTC (rev 76959)
@@ -80,8 +80,9 @@
echo ""
echo "=== $i ==="
+export MGED=mged
if ! test -r "$base.base.rt" ; then
- mged -c "$dbfile" "e $base ; ae 35 25 ; zoom 1.25 ; saveview -e ./run.me
-l /dev/stdout $base.base.rt"
+ $MGED -c "$dbfile" "e $base ; ae 35 25 ; zoom 1.25 ; saveview -e ./run.me
-l /dev/stdout $base.base.rt"
if ! test -r "$base.base.rt" ; then
echo "ERROR: couldn't saveview from $dbfile to $base.base.rt"
fi
@@ -98,10 +99,10 @@
fi
sed "s/\.base\././g" $base.base.rt | sed "s/'$base'/'$i'/g" | sed "s/-o
$base.rt.pix/-o $i.rt.pix/g" > $i.rt
-export RT=rt
################
echo -n "Perf: "
+export RT=rt
export LIBRT_BOT_MINTIE=0
unset LIBRT_BOT_MINTIE
rm -f "$i.rt.log" "$i.rt.pix"
@@ -223,8 +224,9 @@
# nrps=`printf -- "%10.0f rays/s" "${norm}"`
# printf -- "%-25s ($bigger $fore $ratio)\n" "$nrps"
- ################
-export RT=rtxray
+################
+export RTXRAY=rtxray
+export RT=$RTXRAY
echo -n "Xray: "
rm -f $base.base.rtxray.pix $base.base.rtxray.log
sh $base.base.rt -o $base.base.rtxray.pix -s$SZ >$base.base.rtxray.log 2>&1
@@ -249,7 +251,8 @@
fi
################
-export RT=rtedge
+export RTEDGE=rtedge
+export RT=$RTEDGE
echo -n "Edge: "
rm -f $base.base.rtedge.pix $base.base.rtedge.log
sh $base.base.rt -o $base.base.rtedge.pix -s$SZ >$base.base.rtedge.log 2>&1
@@ -272,7 +275,8 @@
fi
################
-export RT=rtarea
+export RTAREA=rtarea
+export RT=$RTAREA
echo -n "Area: "
rm -f $base.base.rtarea.log
sh $base.base.rt -o /dev/null -s$SZ >$base.base.rtarea.log 2>&1
@@ -296,9 +300,10 @@
fi
################
+export GQA=gqa
echo -n "Volu: "
rm -f $base.base.gqa.log
-gqa "$GQTOL" -Av $dbfile $base >$base.base.gqa.log 2>&1
+$GQA "$GQTOL" -Av $dbfile $base >$base.base.gqa.log 2>&1
if ! test -f $base.base.gqa.log ; then
echo "ERROR: $base.base.gqa.log failed to evaluate"
fi
@@ -307,7 +312,7 @@
bvol=`printf "%f" $bvol`
if ! test "x$bvol2" = "x" && ! test "x$bvol2" = "x0.0" ; then
rm -f "$i.gqa.log"
- vol="`gqa "$GQTOL" -Av $dbfile $i 2>&1 | tee $i.gqa.log | tail -n 5 | grep
total | awk '{print $4}'`"
+ vol="`$GQA "$GQTOL" -Av $dbfile $i 2>&1 | tee $i.gqa.log | tail -n 5 |
grep total | awk '{print $4}'`"
vol2=`printf "%.1f" $vol`
vol=`printf "%f" $vol`
if test "x$vol2" = "x" ; then
Deleted: brlcad/branches/RELEASE/sh/facetall.sh
===================================================================
--- brlcad/branches/RELEASE/sh/facetall.sh 2020-08-26 12:12:42 UTC (rev
76958)
+++ brlcad/branches/RELEASE/sh/facetall.sh 2020-08-26 12:21:02 UTC (rev
76959)
@@ -1,87 +0,0 @@
-#!/bin/sh
-# F A C E T A L L . S H
-# BRL-CAD
-#
-# Copyright (c) 2007-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.
-#
-###
-#
-# This script iterates over all regions in a geometry file and
-# attempts to facetize them all. The following scripts can then
-#
-# Replaces facetall.sh conversions assuming file didn't already
-# contain bot objects:
-#
-# file=file.g ; for i in `mged -c $file search . -type bot 2>&1` ; do
base=`echo $i|sed 's/.bot//g'` ; mged -c $file killtree $base \; mv $i $base ;
done
-#
-# Great for calculating number of polygons in file:
-#
-# file=file.g ; total=0 ; for i in `mged -c $file search . -type bot 2>&1` ;
do cnt=`mged -c $file l $i 2>&1 | tail -1 | awk '{print $2}' | tr -d :` ;
total="`expr $cnt + $total`" ; echo "$total (+ $cnt)" ; done
-#
-# This script could use some TLC.
-#
-###
-
-export IGNOREEOF=10
-if [ $# -lt 1 -o $# -gt 2 ] ; then
- echo "Usage: $0 database.g [tol]"
- exit -1
-fi
-
-if [ $# -eq 2 ] ; then
- export TOL=$2
-else
- TOL="rel 0.01"
-fi
-
-STATUS=1
-
-# first make an attempt on all regions
-while [ X$STATUS != X0 ] ; do
-
- mged -c $1 <<EOF
- tol $TOL
- facetize_all_regions $1.fail
-EOF
- STATUS=$?
-
-done
-echo status $STATUS
-
-# Local Variables:
-# mode: sh
-# tab-width: 8
-# sh-indentation: 4
-# sh-basic-offset: 4
-# indent-tabs-mode: t
-# End:
-# ex: shiftwidth=4 tabstop=8
Modified: brlcad/branches/RELEASE/src/conv/asc/asc2dsp.c
===================================================================
--- brlcad/branches/RELEASE/src/conv/asc/asc2dsp.c 2020-08-26 12:12:42 UTC
(rev 76958)
+++ brlcad/branches/RELEASE/src/conv/asc/asc2dsp.c 2020-08-26 12:21:02 UTC
(rev 76959)
@@ -45,6 +45,7 @@
#include "bnetwork.h"
#include "bu/app.h"
#include "bu/log.h"
+#include "bu/opt.h"
static char usage[] = "\
@@ -90,8 +91,8 @@
/* now output it */
ret = fwrite(&netshort, sizeof(uint16_t), 1, fpo);
if (UNLIKELY(ret != 1)) {
- perror("fwrite failed");
- bu_bomb("output_netshort: write error");
+ perror("fwrite failed");
+ bu_bomb("output_netshort: write error");
}
/* prep buffer for next value */
@@ -104,7 +105,7 @@
{
FILE *fpi = NULL;
FILE *fpo = NULL;
- int d;
+ int need_help = 0;
char buf[BUFSZ] = {0};
unsigned nchars = 0;
@@ -111,16 +112,37 @@
bu_setprogname(argv[0]);
- if (argc != 3)
+ struct bu_opt_desc d[3];
+ BU_OPT(d[0], "h", "help", "", NULL, &need_help,
"Print help and exit");
+ BU_OPT(d[1], "?", "", "", NULL, &need_help, "");
+ BU_OPT_NULL(d[2]);
+
+ /* Skip first arg */
+ argv++; argc--;
+ struct bu_vls optparse_msg = BU_VLS_INIT_ZERO;
+ int uac = bu_opt_parse(&optparse_msg, argc, (const char **)argv, d);
+
+ if (uac == -1) {
+ bu_exit(EXIT_FAILURE, "%s", bu_vls_addr(&optparse_msg));
+ }
+ bu_vls_free(&optparse_msg);
+
+ argc = uac;
+
+ if (need_help) {
+ bu_exit(EXIT_SUCCESS, "%s", usage);
+ }
+
+ if (argc != 2)
bu_exit(1, "%s", usage);
- fpi = fopen(argv[1], "r");
+ fpi = fopen(argv[0], "r");
if (!fpi)
- perror(argv[1]);
+ perror(argv[0]);
- fpo = fopen(argv[2], "wb");
+ fpo = fopen(argv[1], "wb");
if (!fpo)
- perror(argv[2]);
+ perror(argv[1]);
if (fpi == NULL || fpo == NULL) {
bu_exit(1, "asc2dsp: can't open files.");
}
@@ -128,24 +150,25 @@
buf[0] = '\0';
nchars = 0;
- while ((d = fgetc(fpi)) != EOF) {
- unsigned char c = (unsigned char)d;
- if (isspace(c)) {
- /* may be end of a chunk of digits indicating need to process buffer
*/
- /* there should be nchars > 0 if anything is there */
- if (nchars) {
- /* note that the following call resets the buffer and nchars */
- output_netshort(buf, &nchars, fpo);
- }
- continue;
- } else if (c < '0' || c > '9') {
- /* invalid char--bail */
- bu_log("asc2dsp: invalid char '%c'\n", c);
- bu_exit(1, "asc2dsp: FATAL");
- }
+ int cg;
+ while ((cg = fgetc(fpi)) != EOF) {
+ unsigned char c = (unsigned char) cg;
+ if (isspace(c)) {
+ /* may be end of a chunk of digits indicating need to process
buffer */
+ /* there should be nchars > 0 if anything is there */
+ if (nchars) {
+ /* note that the following call resets the buffer and nchars */
+ output_netshort(buf, &nchars, fpo);
+ }
+ continue;
+ } else if (c < '0' || c > '9') {
+ /* invalid char--bail */
+ bu_log("asc2dsp: invalid char '%c'\n", c);
+ bu_exit(1, "asc2dsp: FATAL");
+ }
- /* copy the 0-9 to the buffer's next spot */
- buf[nchars++] = c;
+ /* copy the 0-9 to the buffer's next spot */
+ buf[nchars++] = c;
}
fclose(fpi);
@@ -155,7 +178,7 @@
}
fclose(fpo);
- printf("See output file '%s'.\n", argv[2]);
+ printf("See output file '%s'.\n", argv[1]);
exit(0);
}
Modified: brlcad/branches/RELEASE/src/conv/asc/g2asc.c
===================================================================
--- brlcad/branches/RELEASE/src/conv/asc/g2asc.c 2020-08-26 12:12:42 UTC
(rev 76958)
+++ brlcad/branches/RELEASE/src/conv/asc/g2asc.c 2020-08-26 12:21:02 UTC
(rev 76959)
@@ -35,6 +35,7 @@
#include "bu/app.h"
#include "bu/debug.h"
+#include "bu/opt.h"
#include "bu/units.h"
#include "vmath.h"
#include "rt/db4.h"
@@ -112,10 +113,33 @@
main(int argc, char **argv)
{
unsigned i;
+ int need_help = 0;
bu_setprogname(argv[0]);
+ Tcl_FindExecutable(argv[0]);
- if (argc != 3) {
+ struct bu_opt_desc d[3];
+ BU_OPT(d[0], "h", "help", "", NULL, &need_help,
"Print help and exit");
+ BU_OPT(d[1], "?", "", "", NULL, &need_help, "");
+ BU_OPT_NULL(d[2]);
+
+ /* Skip first arg */
+ argv++; argc--;
+ struct bu_vls optparse_msg = BU_VLS_INIT_ZERO;
+ int uac = bu_opt_parse(&optparse_msg, argc, (const char **)argv, d);
+
+ if (uac == -1) {
+ bu_exit(EXIT_FAILURE, "%s", bu_vls_addr(&optparse_msg));
+ }
+ bu_vls_free(&optparse_msg);
+
+ argc = uac;
+
+ if (need_help) {
+ bu_exit(EXIT_SUCCESS, "%s", usage);
+ }
+
+ if (argc != 2) {
bu_exit(1, "%s", usage);
}
@@ -129,30 +153,37 @@
bu_debug = BU_DEBUG_COREDUMP;
- if (argc >= 3) {
- iname = argv[1];
+ if (argc >= 2) {
+
+ iname = argv[0];
+
if (BU_STR_EQUAL(iname, "-")) {
ifp = stdin;
} else {
ifp = fopen(iname, "rb");
}
- if (!ifp) perror(iname);
- if (BU_STR_EQUAL(argv[2], "-")) {
+
+ if (!ifp)
+ perror(iname);
+
+ if (BU_STR_EQUAL(argv[1], "-")) {
ofp = stdout;
} else {
- ofp = fopen(argv[2], "wb");
+ ofp = fopen(argv[1], "wb");
}
- if (!ofp) perror(argv[2]);
+
+ if (!ofp)
+ perror(argv[1]);
+
if (ifp == NULL || ofp == NULL) {
bu_exit(1, "g2asc: can't open files.");
}
}
+
if (isatty(fileno(ifp))) {
bu_exit(1, "%s", usage);
}
- Tcl_FindExecutable(argv[0]);
-
/* First, determine what version database this is */
if (fread((char *)&record, sizeof record, 1, ifp) != 1) {
bu_exit(2, "g2asc(%s) ERROR, file too short to be BRL-CAD database\n",
Modified: brlcad/branches/RELEASE/src/libanalyze/density.cpp
===================================================================
--- brlcad/branches/RELEASE/src/libanalyze/density.cpp 2020-08-26 12:12:42 UTC
(rev 76958)
+++ brlcad/branches/RELEASE/src/libanalyze/density.cpp 2020-08-26 12:21:02 UTC
(rev 76959)
@@ -29,9 +29,14 @@
#include "analyze.h"
+
+/* the largest material ID value that can be used in a density table */
#define MAX_MATERIAL_ID 32768
+
+/* arbitrary upper limit just to prevent out-of-control behavior */
#define MAX_MATERIAL_CNT 1000000
+
struct analyze_densities_impl {
std::map<long int,std::string> id2name;
std::map<long int,fastf_t> id2density;
@@ -80,14 +85,14 @@
if (id > MAX_MATERIAL_ID) {
if (msgs) {
- bu_vls_printf(msgs, "Error: material id %ld is large than
MAX_MATERIAL_ID (%d)\n", id, MAX_MATERIAL_ID);
+ bu_vls_printf(msgs, "ERROR: material ID %ld is larger than
MAX_MATERIAL_ID (%d)\n", id, MAX_MATERIAL_ID);
}
return -1;
}
- if (a->i->id2density.size() == MAX_MATERIAL_CNT) {
+ if (a->i->id2density.size() >= MAX_MATERIAL_CNT) {
if (msgs) {
- bu_vls_printf(msgs, "Error: analyze densities database is full -
maximum density count of %d has been reached\n", MAX_MATERIAL_CNT);
+ bu_vls_printf(msgs, "ERROR: Maximum materials (%d) exceeded in
density table.\n", MAX_MATERIAL_CNT);
}
return -1;
}
Modified: brlcad/branches/RELEASE/src/libbn/sphmap.c
===================================================================
--- brlcad/branches/RELEASE/src/libbn/sphmap.c 2020-08-26 12:12:42 UTC (rev
76958)
+++ brlcad/branches/RELEASE/src/libbn/sphmap.c 2020-08-26 12:21:02 UTC (rev
76959)
@@ -64,6 +64,10 @@
int i, nx, total, idx;
register bn_spm_map_t *mapp;
+ if (!N || !elsize) {
+ return BN_SPM_MAP_NULL;
+ }
+
BU_ALLOC(mapp, bn_spm_map_t);
if (mapp == BN_SPM_MAP_NULL)
return BN_SPM_MAP_NULL;
@@ -206,6 +210,11 @@
int got;
FILE *fp;
+ /* Sanity */
+ if (mapp == BN_SPM_MAP_NULL || !filename) {
+ return -1;
+ }
+
BN_CK_SPM_MAP(mapp);
if (BU_STR_EQUAL(filename, "-"))
@@ -253,6 +262,11 @@
long count;
FILE *fp;
+ /* Sanity */
+ if (mapp == BN_SPM_MAP_NULL || !filename || !nx || !ny) {
+ return -1;
+ }
+
BN_CK_SPM_MAP(mapp);
if (BU_STR_EQUAL(filename, "-"))
Index: brlcad/branches/RELEASE/src/libbu
===================================================================
--- brlcad/branches/RELEASE/src/libbu 2020-08-26 12:12:42 UTC (rev 76958)
+++ brlcad/branches/RELEASE/src/libbu 2020-08-26 12:21:02 UTC (rev 76959)
Property changes on: brlcad/branches/RELEASE/src/libbu
___________________________________________________________________
Modified: svn:mergeinfo
## -1,2 +1,2 ##
@@ 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