Revision: 76474
          http://sourceforge.net/p/brlcad/code/76474
Author:   starseeker
Date:     2020-07-24 22:45:37 +0000 (Fri, 24 Jul 2020)
Log Message:
-----------
merging RELEASE branch to STABLE branch, r75757 through r76473

Modified Paths:
--------------
    brlcad/branches/STABLE/ChangeLog
    brlcad/branches/STABLE/NEWS
    brlcad/branches/STABLE/README
    brlcad/branches/STABLE/TODO
    brlcad/branches/STABLE/include/bio.h
    brlcad/branches/STABLE/include/brep/defines.h
    brlcad/branches/STABLE/include/bu/cmd.h
    brlcad/branches/STABLE/include/bu/file.h
    brlcad/branches/STABLE/include/bu/glob.h
    brlcad/branches/STABLE/include/bu/ptbl.h
    brlcad/branches/STABLE/include/bu/tc.h
    brlcad/branches/STABLE/include/bu/time.h
    brlcad/branches/STABLE/include/bu/vls.h
    brlcad/branches/STABLE/include/common.h
    brlcad/branches/STABLE/include/conf/PATCH
    brlcad/branches/STABLE/include/fb/fb_osgl.h
    brlcad/branches/STABLE/include/fb/fb_wgl.h
    brlcad/branches/STABLE/include/fb.h
    brlcad/branches/STABLE/include/ged/defines.h
    brlcad/branches/STABLE/include/nmg.h
    brlcad/branches/STABLE/include/rt/anim.h
    brlcad/branches/STABLE/include/rt/calc.h
    brlcad/branches/STABLE/include/rt/cmd.h
    brlcad/branches/STABLE/include/rt/db_fullpath.h
    brlcad/branches/STABLE/include/rt/db_instance.h
    brlcad/branches/STABLE/include/rt/db_internal.h
    brlcad/branches/STABLE/include/rt/db_io.h
    brlcad/branches/STABLE/include/rt/directory.h
    brlcad/branches/STABLE/include/rt/mater.h
    brlcad/branches/STABLE/include/rt/mem.h
    brlcad/branches/STABLE/include/rt/vlist.h
    brlcad/branches/STABLE/misc/CMake/FindGDAL.cmake
    brlcad/branches/STABLE/misc/debian/changelog
    brlcad/branches/STABLE/misc/macosx/Resources/ReadMe.rtfd/TXT.rtf
    brlcad/branches/STABLE/misc/macosx/Resources/Welcome.rtfd/TXT.rtf
    brlcad/branches/STABLE/src/burst/ui.c
    brlcad/branches/STABLE/src/conv/asc/asc2g.c
    brlcad/branches/STABLE/src/conv/conv-vg2g.c
    brlcad/branches/STABLE/src/conv/dxf/dxf-g.c
    brlcad/branches/STABLE/src/conv/fast4-g.c
    brlcad/branches/STABLE/src/conv/g-acad.c
    brlcad/branches/STABLE/src/conv/iges/findp.c
    brlcad/branches/STABLE/src/conv/iges/g-iges.c
    brlcad/branches/STABLE/src/conv/iges/n_iges.cpp
    brlcad/branches/STABLE/src/conv/iges/n_iges.hpp
    brlcad/branches/STABLE/src/conv/iges/readrec.c
    brlcad/branches/STABLE/src/conv/iges/recsize.c
    brlcad/branches/STABLE/src/conv/nastran-g.c
    brlcad/branches/STABLE/src/conv/shp/shapelib/shpopen.c
    brlcad/branches/STABLE/src/conv/stl/g-stl.c
    brlcad/branches/STABLE/src/conv/vdeck/vdeck.c
    brlcad/branches/STABLE/src/fb/bw-fb.c
    brlcad/branches/STABLE/src/fb/fb-bw.c
    brlcad/branches/STABLE/src/fb/fb-pix.c
    brlcad/branches/STABLE/src/fb/fb-png.c
    brlcad/branches/STABLE/src/fb/fbcbars.c
    brlcad/branches/STABLE/src/fb/fbcmap.c
    brlcad/branches/STABLE/src/fb/fbcolor.c
    brlcad/branches/STABLE/src/fb/fbfade.c
    brlcad/branches/STABLE/src/fb/fbframe.c
    brlcad/branches/STABLE/src/fb/fbgrid.c
    brlcad/branches/STABLE/src/fb/fbpoint.c
    brlcad/branches/STABLE/src/fb/fbstretch.c
    brlcad/branches/STABLE/src/fb/fbzoom.c
    brlcad/branches/STABLE/src/fb/gif-fb.c
    brlcad/branches/STABLE/src/fb/gif2fb.c
    brlcad/branches/STABLE/src/fb/pix-fb.c
    brlcad/branches/STABLE/src/fb/plot3-fb.c
    brlcad/branches/STABLE/src/fb/png-fb.c
    brlcad/branches/STABLE/src/fb/spm-fb.c
    brlcad/branches/STABLE/src/gtools/ganalyze.cpp
    brlcad/branches/STABLE/src/halftone/main.c
    brlcad/branches/STABLE/src/libbu/file.c
    brlcad/branches/STABLE/src/libbu/vfont.c
    brlcad/branches/STABLE/src/libfb/fb_generic.c
    brlcad/branches/STABLE/src/libfb/fbserv_obj.c
    brlcad/branches/STABLE/src/libfb/if_X24.c
    brlcad/branches/STABLE/src/libfb/if_disk.c
    brlcad/branches/STABLE/src/libfb/if_tk.c
    brlcad/branches/STABLE/src/libgcv/plugins/fastgen4/fastgen4_read.c
    brlcad/branches/STABLE/src/libgcv/plugins/rhino/rhino_read.cpp
    brlcad/branches/STABLE/src/libgcv/plugins/stl/stl_write.c
    brlcad/branches/STABLE/src/libged/CMakeLists.txt
    brlcad/branches/STABLE/src/libged/bot_dump.c
    brlcad/branches/STABLE/src/libged/editit.c
    brlcad/branches/STABLE/src/libged/facetize.cpp
    brlcad/branches/STABLE/src/libged/fb2pix.c
    brlcad/branches/STABLE/src/libged/ged_private.h
    brlcad/branches/STABLE/src/libged/ged_util.c
    brlcad/branches/STABLE/src/libged/pix2fb.c
    brlcad/branches/STABLE/src/libged/tables.c
    brlcad/branches/STABLE/src/libged/typein.c
    brlcad/branches/STABLE/src/libicv/rot.c
    brlcad/branches/STABLE/src/librt/cache.c
    brlcad/branches/STABLE/src/librt/db5_scan.c
    brlcad/branches/STABLE/src/librt/db_corrupt.c
    brlcad/branches/STABLE/src/librt/db_io.c
    brlcad/branches/STABLE/src/librt/db_scan.c
    brlcad/branches/STABLE/src/librt/primitives/primitive_util.c
    brlcad/branches/STABLE/src/libtclcad/tclcad_obj.c
    brlcad/branches/STABLE/src/mged/cmd.c
    brlcad/branches/STABLE/src/mged/fbserv.c
    brlcad/branches/STABLE/src/mged/mged.c
    brlcad/branches/STABLE/src/mged/plot.c
    brlcad/branches/STABLE/src/remrt/remrt.c
    brlcad/branches/STABLE/src/remrt/rtsrv.c
    brlcad/branches/STABLE/src/rt/do.c
    brlcad/branches/STABLE/src/rt/main.c
    brlcad/branches/STABLE/src/rt/view.c
    brlcad/branches/STABLE/src/sig/ddisp.c
    brlcad/branches/STABLE/src/util/ap-pix.c
    brlcad/branches/STABLE/src/util/bw-a.c
    brlcad/branches/STABLE/src/util/bw-png.c
    brlcad/branches/STABLE/src/util/bwcrop.c
    brlcad/branches/STABLE/src/util/bwhist.c
    brlcad/branches/STABLE/src/util/bwhisteq.c
    brlcad/branches/STABLE/src/util/bwrot.c
    brlcad/branches/STABLE/src/util/bwscale.c
    brlcad/branches/STABLE/src/util/double-asc.c
    brlcad/branches/STABLE/src/util/dpix-pix.c
    brlcad/branches/STABLE/src/util/pix-png.c
    brlcad/branches/STABLE/src/util/pix-ppm.c
    brlcad/branches/STABLE/src/util/pixbgstrip.c
    brlcad/branches/STABLE/src/util/pixborder.c
    brlcad/branches/STABLE/src/util/pixbustup.c
    brlcad/branches/STABLE/src/util/pixcrop.c
    brlcad/branches/STABLE/src/util/pixelswap.c
    brlcad/branches/STABLE/src/util/pixhalve.c
    brlcad/branches/STABLE/src/util/pixhist.c
    brlcad/branches/STABLE/src/util/pixhist3d.c
    brlcad/branches/STABLE/src/util/pixmorph.c
    brlcad/branches/STABLE/src/util/pixrot.c
    brlcad/branches/STABLE/src/util/pixscale.c
    brlcad/branches/STABLE/src/util/plot3rot.c
    brlcad/branches/STABLE/src/util/wavelet.c

Added Paths:
-----------
    brlcad/branches/STABLE/src/libged/facetize_log.c

Property Changed:
----------------
    brlcad/branches/STABLE/
    brlcad/branches/STABLE/NEWS
    brlcad/branches/STABLE/src/libbu/

Index: brlcad/branches/STABLE
===================================================================
--- brlcad/branches/STABLE      2020-07-24 22:02:40 UTC (rev 76473)
+++ brlcad/branches/STABLE      2020-07-24 22:45:37 UTC (rev 76474)

Property changes on: brlcad/branches/STABLE
___________________________________________________________________
Modified: svn:mergeinfo
## -1,5 +1,6 ##
-/brlcad/branches/RELEASE:60491,61063,61075-66129,66135,66164,66169-68615,68617-75757
+/brlcad/branches/RELEASE:60491,61063,61075-66129,66135,66164,66169-68615,68617-76473
 /brlcad/branches/STABLE:66164
+/brlcad/branches/bioh:75720-75728
 
/brlcad/branches/brep-debug:61373,61375,61404,61427,61429,61470,61544,61567,61576,61999,62018,62094,62098,62107,62117,62406,62416-62519,62521-62584,62593-62614,62623,62658,62660-62674,62681-62771,62876,62901,62907,62910,62925,62928,62931-63025,63027,63051,63054-63056,63069,63071-63073,63122,63160-63161,63165,63171,63184,63187,63189-63190,63193-63196,63200,63202,63205-63210,63213,63219-63225,63232-63233,63236,63238,63338,63350-63353,63481,63618,63669,64173-64174,64176-64177,64229-64233,64242,64244,64360-64362,65165,65245,65249,65334,65833-65834,66370-66375,66931-66932,66934,67012-67015,67018-67019,67021-67022,67406,67740,67746-67748,67950,67952,68144-68145,68636,68640-68643,68820,69081,69109,69168,69206,69289,69346,69460-69461,69582-69583,69719-69721,69857-69859,69927,69995-69996,70148-70149,70347-70349,70377,70526-70527,71006-71007,71009-71022,71046-71047,71049,71096-71100
 /brlcad/branches/bullet:62518
 /brlcad/branches/cmake:43219
## -7,4 +8,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-66123,66128-66132,66134-68122,68125-74976,74981,74991,75000,75056,75063-75064,75077-75078,75084,75325,75375,75377-75378,75387,75470-75472,75477,75492,75495,75549,75656-75661,75672,75675,75678
\ 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-66123,66128-66132,66134-68122,68125-74976,74981,74991,75000,75053,75056,75063-75064,75077-75078,75084,75325,75375,75377-75378,75387,75470-75472,75477,75492,75495,75549,75565-75566,75656-75661,75672,75675,75678,75729,75811
\ No newline at end of property
Modified: brlcad/branches/STABLE/ChangeLog
===================================================================
--- brlcad/branches/STABLE/ChangeLog    2020-07-24 22:02:40 UTC (rev 76473)
+++ brlcad/branches/STABLE/ChangeLog    2020-07-24 22:45:37 UTC (rev 76474)
@@ -1,247 +1,87 @@
-2020-05-05 18:39  starseeker
+2020-07-24 20:14  starseeker
 
-       * [r75697] src/other/libregex/regex.h:
-         libregex doesn't appear to use lseek and it's making VS2019
-         unhappy to redefine it.
+       * [r76471] README, include/conf/PATCH, misc/debian/changelog,
+         misc/macosx/Resources/ReadMe.rtfd/TXT.rtf,
+         misc/macosx/Resources/Welcome.rtfd/TXT.rtf:
+         Bump version number
 
-2020-05-04 17:35  starseeker
+2020-07-24 15:59  starseeker
 
-       * [r75687] include/bu/vls.h:
-         don't need stdio.h here
+       * [r76469] misc/CMake/FindGDAL.cmake:
+         Older version of FindGDAL isn't properly detecting - try newer
+         one.
 
-2020-05-04 16:11  starseeker
+2020-07-23 23:07  starseeker
 
-       * [r75685] misc/attributes/gen-attributes-file.cpp:
-         ditto gen-attributes-file.cpp - needs off_t update
-
-2020-05-04 16:09  starseeker
-
-       * [r75684] src/other/stepcode/src/clstepcore/complexSupport.h:
-         stepcode needs the same off_t bit
-
-2020-05-04 15:52  starseeker
-
-       * [r75682] src/libpkg/pkg.c:
-         Use bio.h here
-
-2020-05-04 15:45  starseeker
-
-       * [r75681] src/other/libregex/regex.h:
-         ws
-
-2020-05-04 15:44  starseeker
-
-       * [r75680] src/other/libregex/regex.h:
-         Update our bundled regex.h to use the same type of off_t
-         definition as bio.h
-
-2020-05-04 15:23  starseeker
-
-       * [r75679] ., include/bu/glob.h, include/bu/vls.h:
-         Cherrypick r75678
-
-2020-05-04 14:08  starseeker
-
-       * [r75677] ., include/bio.h, include/config_win.h.in,
-         src/conv/intaval/tgf-g.cpp, src/conv/k-g.cpp,
-         src/conv/raw/raw-g.cpp, src/libanalyze/nirt.cpp,
-         src/libgcv/plugins/fastgen4/fastgen4_write.cpp,
-         src/libgcv/plugins/vrml/vrml_read/file_util.cpp,
-         src/nirt/main.cpp:
-         Cherrypick r75077, r75078 and r75084 - off_t fixes
-
-2020-05-04 13:34  starseeker
-
-       * [r75676] ., src/gtools/gchecker.cpp:
-         Cherrypick r75675
-
-2020-05-04 13:07  starseeker
-
-       * [r75674] ., bench/pixcmp.c, include/bio.h, include/bu/file.h,
-         include/bu/ptbl.h, include/bu/time.h, include/common.h,
-         include/rt/db_fullpath.h, include/rt/db_instance.h,
+       * [r76458] ., include/bio.h, include/brep/defines.h,
+         include/bu/cmd.h, include/bu/file.h, include/bu/glob.h,
+         include/bu/ptbl.h, include/bu/tc.h, include/bu/time.h,
+         include/bu/vls.h, include/common.h, include/fb.h,
+         include/fb/fb_osgl.h, include/fb/fb_wgl.h, include/ged/defines.h,
+         include/nmg.h, include/rt/anim.h, include/rt/calc.h,
+         include/rt/cmd.h, include/rt/db_fullpath.h,
+         include/rt/db_instance.h, include/rt/db_internal.h,
          include/rt/db_io.h, include/rt/directory.h, include/rt/mater.h,
-         include/rt/mem.h, src/conv/asc/asc2g.c, src/conv/conv-vg2g.c,
-         src/conv/dxf/dxf-g.c, src/conv/fast4-g.c, src/conv/g-acad.c,
-         src/conv/g-obj.c, src/conv/iges/findp.c, src/conv/iges/g-iges.c,
-         src/conv/iges/readrec.c, src/conv/iges/recsize.c,
-         src/conv/intaval/tgf-g.cpp, src/conv/k-g.cpp,
-         src/conv/nastran-g.c, src/conv/raw/raw-g.cpp,
-         src/conv/vdeck/vdeck.c, src/conv/vdeck/vextern.h, src/fb/bw-fb.c,
-         src/fb/pix-fb.c, src/fb/tests/fbthreadtest.c,
-         src/gtools/gdiff/gdiff.c, src/libanalyze/nirt.cpp, src/libbu,
-         src/libbu/file.c, src/libbu/mappedfile.c, src/libbu/vfont.c,
-         src/libbu/vfont.h, src/libbu/vls.c, src/libfb/fb_generic.c,
-         src/libfb/if_X24.c, src/libfb/if_disk.c,
-         src/libgcv/plugins/fastgen4/fastgen4_read.c,
-         src/libgcv/plugins/fastgen4/fastgen4_write.cpp,
-         src/libgcv/plugins/obj/obj_write.c,
-         src/libgcv/plugins/vrml/vrml_read/file_util.cpp,
-         src/libged/dup.c, src/libged/ged.c, src/libged/tables.c,
-         src/libicv/rot.c, src/liboptical/oslexec_pvt.h,
-         src/librt/db5_alloc.c, src/librt/db5_scan.c,
-         src/librt/db_alloc.c, src/librt/db_corrupt.c,
-         src/librt/db_fullpath.c, src/librt/db_inmem.c, src/librt/db_io.c,
-         src/librt/db_lookup.c, src/librt/db_open.c, src/librt/db_scan.c,
-         src/librt/librt_private.h, src/librt/mater.c,
-         src/librt/memalloc.c, src/librt/primitives/primitive_util.c,
-         src/mged/edsol.c, src/mged/wdb_obj.c, src/nirt/main.cpp,
-         src/rt/do.c, src/rt/view.c, src/util/ap-pix.c, src/util/bwcrop.c,
+         include/rt/mem.h, include/rt/vlist.h, src/burst/ui.c,
+         src/conv/asc/asc2g.c, src/conv/conv-vg2g.c, src/conv/dxf/dxf-g.c,
+         src/conv/fast4-g.c, src/conv/g-acad.c, src/conv/iges/findp.c,
+         src/conv/iges/g-iges.c, src/conv/iges/n_iges.cpp,
+         src/conv/iges/n_iges.hpp, src/conv/iges/readrec.c,
+         src/conv/iges/recsize.c, src/conv/nastran-g.c,
+         src/conv/shp/shapelib/shpopen.c, src/conv/stl/g-stl.c,
+         src/conv/vdeck/vdeck.c, src/fb/bw-fb.c, src/fb/fb-bw.c,
+         src/fb/fb-pix.c, src/fb/fb-png.c, src/fb/fbcbars.c,
+         src/fb/fbcmap.c, src/fb/fbcolor.c, src/fb/fbfade.c,
+         src/fb/fbframe.c, src/fb/fbgrid.c, src/fb/fbpoint.c,
+         src/fb/fbstretch.c, src/fb/fbzoom.c, src/fb/gif-fb.c,
+         src/fb/gif2fb.c, src/fb/pix-fb.c, src/fb/plot3-fb.c,
+         src/fb/png-fb.c, src/fb/spm-fb.c, src/gtools/ganalyze.cpp,
+         src/halftone/main.c, src/libbu, src/libbu/file.c,
+         src/libbu/vfont.c, src/libfb/fb_generic.c,
+         src/libfb/fbserv_obj.c, src/libfb/if_X24.c, src/libfb/if_disk.c,
+         src/libfb/if_tk.c, src/libgcv/plugins/fastgen4/fastgen4_read.c,
+         src/libgcv/plugins/stl/stl_write.c, src/libged/bot_dump.c,
+         src/libged/editit.c, src/libged/facetize_log.c,
+         src/libged/fb2pix.c, src/libged/ged_util.c, src/libged/pix2fb.c,
+         src/libged/tables.c, src/libicv/rot.c, src/librt/cache.c,
+         src/librt/db5_scan.c, src/librt/db_corrupt.c, src/librt/db_io.c,
+         src/librt/db_scan.c, src/librt/primitives/primitive_util.c,
+         src/libtclcad/tclcad_obj.c, src/mged/cmd.c, src/mged/fbserv.c,
+         src/mged/mged.c, src/mged/plot.c, src/remrt/remrt.c,
+         src/remrt/rtsrv.c, src/rt/do.c, src/rt/main.c, src/rt/view.c,
+         src/sig/ddisp.c, src/util/ap-pix.c, src/util/bw-a.c,
+         src/util/bw-png.c, src/util/bwcrop.c, src/util/bwhist.c,
          src/util/bwhisteq.c, src/util/bwrot.c, src/util/bwscale.c,
-         src/util/pixbustup.c, src/util/pixcrop.c, src/util/pixrot.c,
-         src/util/pixscale.c, src/util/plot3rot.c:
-         Cherrypick r75063 - switch to b_off_t for newer MSVC 64 bit
-         offsets.
+         src/util/double-asc.c, src/util/dpix-pix.c, src/util/pix-png.c,
+         src/util/pix-ppm.c, src/util/pixbgstrip.c, src/util/pixborder.c,
+         src/util/pixbustup.c, src/util/pixcrop.c, src/util/pixelswap.c,
+         src/util/pixhalve.c, src/util/pixhist.c, src/util/pixhist3d.c,
+         src/util/pixmorph.c, src/util/pixrot.c, src/util/pixscale.c,
+         src/util/plot3rot.c, src/util/wavelet.c:
+         Cherrypick trunk commit r75729 to try and resolve the *seek*
+         function issues on Windows.
 
-2020-05-04 12:59  starseeker
+2020-07-23 22:15  starseeker
 
-       * [r75673] ., regress/gchecker/CMakeLists.txt:
-         Cherrypick r75672 - dependencies for regress-gchecker
+       * [r76455] ., src/libged/CMakeLists.txt, src/libged/facetize.cpp,
+         src/libged/facetize_log.c, src/libged/ged_private.h:
+         Cherrypick r75053 - avoid mixing open and C++ for Windows
 
-2020-05-04 12:52  starseeker
+2020-07-23 20:04  starseeker
 
-       * [r75671] ., NEWS, regress/CMakeLists.txt, regress/gchecker,
-         src/gtools/CMakeLists.txt, src/gtools/gchecker.cpp:
-         Cherrypick cross-platform generator of overlap outputs from trunk
+       * [r76451] ., NEWS, TODO, src/util/bw-png.c:
+         Cherrypick r75565 and r75566 - fix for bw-png on Windows
 
-2020-05-04 12:50  starseeker
+2020-07-23 19:58  starseeker
 
-       * [r75670] src/libbu, src/libbu/dir.c:
-         Cherrypick r75000 from trunk - bu_dir fix for ext and libext
+       * [r76450] ., NEWS, src/libgcv/plugins/rhino/rhino_read.cpp:
+         Cherrypick r75811 improving the failure message of the 3dm-g
+         converter.
 
-2020-04-22 20:02  starseeker
+2020-07-23 19:45  starseeker
 
-       * [r75551] ChangeLog:
-         update changelog
+       * [r76449] NEWS, src/libged/typein.c:
+         Backport trunk fix r76443 for missing idb_major_type assignment
+         in "in" command for datums - fixes inability to generate datums
+         that manfiested in r71953 (post 7.26 series releases).
 
-
-2020-04-22 20:01  starseeker
-
-       * [r75550] ., src/libged/draw.c, src/libged/vdraw.c,
-         src/mged/dodraw.c:
-         Cherrypick r75549 - fix for nirt, rtcheck, etc. vlist drawing
-         behavior
-
-2020-04-22 15:53  starseeker
-
-       * [r75541] regress/CMakeLists.txt:
-         Add dsp products to the regression cleaning list
-
-2020-04-22 14:25  starseeker
-
-       * [r75532] ChangeLog:
-         update changelog
-
-
-2020-04-22 14:25  starseeker
-
-       * [r75531] NEWS:
-         Update release date
-
-2020-04-21 16:59  starseeker
-
-       * [r75497] ., src/tclscripts/checker/check.tcl:
-         Cherrypick r75495 - Add a checkbutton to the overlap checker to
-         toggle fullpath display
-
-2020-04-21 16:58  starseeker
-
-       * [r75496] ., src/tclscripts/checker/check.tcl:
-         Cherrypick r75492 - restore overlap checker using full paths for
-         drawing, subtraction and marks
-
-2020-04-21 11:00  starseeker
-
-       * [r75486] ChangeLog:
-         Update ChangeLog
-
-2020-04-21 10:58  starseeker
-
-       * [r75485] NEWS:
-         Note overlap checker improvements in NEWS file
-
-2020-04-21 10:57  starseeker
-
-       * [r75484] ., src/tclscripts/checker/menu.tcl:
-         Cherrypick r75477 - overlap checker layout improvements
-
-2020-04-21 10:56  starseeker
-
-       * [r75483] ., src/tclscripts/checker/check.tcl:
-         Cherrypick r75472 - Have overlap checker display only region
-         names, with fullpath copy to clipboard available via right-click
-         menu
-
-2020-04-21 10:55  starseeker
-
-       * [r75482] ., src/tclscripts/checker/menu.tcl:
-         Cherrypick r75471 - Fix truncation of overlap checker columns
-         when path names are long.
-
-2020-04-21 10:53  starseeker
-
-       * [r75481] NEWS:
-         Update news entry for solid wireframes
-
-2020-04-21 10:53  starseeker
-
-       * [r75480] ., src/libdm/dm-generic.c, src/mged/dozoom.c:
-         Cherrypick r75470 - fix for transparency issue with awareness of
-         solid editing wireframes
-
-2020-04-14 14:51  starseeker
-
-       * [r75393] ChangeLog:
-         Update changelog
-
-
-2020-04-14 14:50  starseeker
-
-       * [r75392] ., NEWS, src/tclscripts/checker/menu.tcl:
-         Cherrypick r74991 - fix for initial dimensions of overlap checker
-         window
-
-2020-04-14 12:03  starseeker
-
-       * [r75388] ., src/librt/primitives/brep/brep.cpp:
-         Cherrypick r75387 - disable logging messages during brep prep.
-
-2020-04-13 17:36  starseeker
-
-       * [r75382] NEWS, README, include/conf/PATCH, misc/debian/changelog,
-         misc/macosx/Resources/ReadMe.rtfd/TXT.rtf,
-         misc/macosx/Resources/Welcome.rtfd/TXT.rtf:
-         Bump the patch release number in the RELEASE branch
-
-2020-04-13 16:38  starseeker
-
-       * [r75380] ., NEWS, doc/docbook/system/mann/lint.xml,
-         src/libged/lint.cpp:
-         Cherrypick r75377 - search style filtering for lint command
-
-2020-04-13 16:33  starseeker
-
-       * [r75379] ., NEWS, src/rt/viewedge.c:
-         Cherrypick r75378 - fix of rtedge line color with -W option
-
-2020-04-13 14:01  starseeker
-
-       * [r75376] ., NEWS, src/tclscripts/mged/bindings.tcl:
-         Cherrypick r75375 - mouse wheel scrolling in MGED
-
-2020-04-13 13:28  starseeker
-
-       * [r75374] ., misc/CMake/BRLCAD_Util.cmake:
-         Cherrypick r74981 - support for newer CMake message types
-
-2020-04-13 13:27  starseeker
-
-       * [r75373] ., NEWS, src/libgcv/plugins/rhino/rhino_read.cpp:
-         Cherrypick r75056 - Add .r suffixes to regions in 3dm-g import
-
-2020-04-13 13:08  starseeker
-
-       * [r75372] ., NEWS, src/libdm/dm-generic.c, src/mged/dozoom.c:
-         Cherrypick r75325 to fix MGED solid editing (disables
-         transparency)
-

Modified: brlcad/branches/STABLE/NEWS
===================================================================
--- brlcad/branches/STABLE/NEWS 2020-07-24 22:02:40 UTC (rev 76473)
+++ brlcad/branches/STABLE/NEWS 2020-07-24 22:45:37 UTC (rev 76474)
@@ -10,6 +10,15 @@
 changes made.  See document footer for additional details.
 
 ----------------------------------------------------------------------
+--- 2020-07-24  Release 7.30.10                                    ---
+----------------------------------------------------------------------
+
+* added 3dm-g failure message about supported versions - Cliff Yapp
+* fixed MGED "in" command support for datums - Sean Morrison
+* fixed bw-png writing corrupted png files on Windows - Sean Morrison
+
+
+----------------------------------------------------------------------
 --- 2020-05-08  Release 7.30.8                                     ---
 ----------------------------------------------------------------------
 


Property changes on: brlcad/branches/STABLE/NEWS
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
-/brlcad/branches/RELEASE/NEWS:60491,61063,61075-66129,66164,66169-68615,68617-75757
+/brlcad/branches/RELEASE/NEWS:60491,61063,61075-66129,66164,66169-68615,68617-76473
 /brlcad/branches/STABLE/NEWS:66164
 
/brlcad/branches/brep-debug/NEWS:61373,61375,61404,61427,61429,61470,61544,61567,61576,61999,62018,62094,62098,62107,62117,62406,62416-62519,62521-62584,62593-62614,62623,62658,62660-62674,62681-62771,62876,62901,62907,62910,62925,62928,62931-63025,63027,63051,63054-63056,63069,63071-63073,63122,63160-63161,63165,63171,63184,63187,63189-63190,63193-63196,63200,63202,63205-63210,63213,63219-63225,63232-63233,63236,63238,63338,63350-63353,63481,63618,63669,64173-64174,64176-64177,64229-64233,64242,64244,64360-64362,65165,65245,65249,65334,65833-65834,66370-66375,66931-66932,66934,67012-67015,67018-67019,67021-67022,67406,67740,67746-67748,67950,67952,68144-68145,68636,68640-68643,68820,69081,69109,69168,69206,69289,69346,69460-69461,69582-69583,69719-69721,69857-69859,69927,69995-69996,70148-70149,70347-70349,70377,70526-70527,71006-71007,71009-71022,71046-71047,71049,71096-71100
 /brlcad/branches/bullet/NEWS:62518
## -8,4 +8,4 ##
 /brlcad/branches/osg/NEWS:62110-62113
 /brlcad/branches/prep-cache/NEWS:68236-68933
 /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-74976,75056,75375,75377-75378
\ 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-74976,75056,75375,75377-75378,75565-75566,75811
\ No newline at end of property
Modified: brlcad/branches/STABLE/README
===================================================================
--- brlcad/branches/STABLE/README       2020-07-24 22:02:40 UTC (rev 76473)
+++ brlcad/branches/STABLE/README       2020-07-24 22:45:37 UTC (rev 76474)
@@ -1,5 +1,5 @@
                            BRL-CAD
-                        Release 7.30.8
+                       Release 7.30.10
                       http://brlcad.org/
 
 BRL-CAD is a powerful cross-platform open source combinatorial

Modified: brlcad/branches/STABLE/TODO
===================================================================
--- brlcad/branches/STABLE/TODO 2020-07-24 22:02:40 UTC (rev 76473)
+++ brlcad/branches/STABLE/TODO 2020-07-24 22:45:37 UTC (rev 76474)
@@ -131,6 +131,10 @@
 THESE ARE UNSCHEDULED BACKLOG TASKS
 -----------------------------------
 
+* audit/fix all of the src/util and src/fb utilities to ensure they
+  set binary mode (setmode O_BINARY) when writing out files.  at quick
+  glance, there are many (about 50) that still do not.
+
 * replace los references/terminology with span, len, dist, factor, etc
   accordingly since los is ambiguous and a source of user confusion.
 

Modified: brlcad/branches/STABLE/include/bio.h
===================================================================
--- brlcad/branches/STABLE/include/bio.h        2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/bio.h        2020-07-24 22:45:37 UTC (rev 
76474)
@@ -95,35 +95,6 @@
 #   define S_ISDIR(_st_mode) (((_st_mode) & S_IFMT) == S_IFDIR)
 #endif
 
-/* We want 64 bit (large file) I/O capabilities whenever they are available.
- * Always define this before we include sys/types.h */
-#ifndef _FILE_OFFSET_BITS
-#  define _FILE_OFFSET_BITS 64
-#endif
-#include <sys/types.h>
-
-/* off_t is 32 bit size even on 64 bit Windows. In the past we have tried to
- * force off_t to be 64 bit but this is failing on newer Windows/Visual Studio
- * verions in 2020 - therefore, we instead introduce the b_off_t define to
- * properly substitute the correct numerical type for the correct platform.  */
-#if defined(_WIN64)
-#  include <sys/stat.h>
-#  define b_off_t __int64
-#  define fseek _fseeki64
-#  define ftell _ftelli64
-#  define fstat _fstati64
-#  define lseek _lseeki64
-#  define stat  _stati64
-#elif defined (_WIN32)
-#  include <sys/stat.h>
-#  define b_off_t _off_t
-#  define fstat _fstat
-#  define lseek _lseek
-#  define stat  _stat
-#else
-#  define b_off_t off_t
-#endif
-
 #endif /* BIO_H */
 
 /** @} */

Modified: brlcad/branches/STABLE/include/brep/defines.h
===================================================================
--- brlcad/branches/STABLE/include/brep/defines.h       2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/include/brep/defines.h       2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -29,7 +29,25 @@
 
 #include "common.h"
 
-#include "bio.h" /* needed to include windows.h with protections */
+/* We need to include windows.h with protections,
+ * rather than having opennurbs.h do it */
+#ifdef HAVE_WINDOWS_H
+#  ifdef WIN32_LEAN_AND_MEAN
+#    undef WIN32_LEAN_AND_MEAN
+#  endif
+#  define WIN32_LEAN_AND_MEAN 434144 /* don't want winsock.h */
+
+#  ifdef NOMINMAX
+#    undef NOMINMAX
+#  endif
+#  define NOMINMAX 434144 /* don't break std::min and std::max */
+
+#  include <windows.h>
+
+#  undef WIN32_LEAN_AND_MEAN /* unset to not interfere with calling apps */
+#  undef NOMINMAX
+#endif
+
 #ifdef __cplusplus
 
 

Modified: brlcad/branches/STABLE/include/bu/cmd.h
===================================================================
--- brlcad/branches/STABLE/include/bu/cmd.h     2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/bu/cmd.h     2020-07-24 22:45:37 UTC (rev 
76474)
@@ -36,7 +36,6 @@
 #include <time.h>
 
 #include "bsocket.h" /* for timeval */
-#include "bio.h"
 
 #define BU_CMD_NULL (int (*)(void *, int, const char **))NULL
 

Modified: brlcad/branches/STABLE/include/bu/file.h
===================================================================
--- brlcad/branches/STABLE/include/bu/file.h    2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/bu/file.h    2020-07-24 22:45:37 UTC (rev 
76474)
@@ -164,6 +164,16 @@
  */
 BU_EXPORT extern char *bu_file_realpath(const char *path, char *resolved_path);
 
+/**
+ * Windows corecrt_io.h defines an lseek and an _lseeki64, with different 
function
+ * signatures, that cause trouble when we try to simply #define lseek 
_lseeki64.
+ *
+ * Similarly, _ftelli64 has a problematic signature.
+ */
+BU_EXPORT int bu_fseek(FILE *stream, b_off_t offset, int origin);
+BU_EXPORT b_off_t bu_lseek(int fd, b_off_t offset, int whence);
+BU_EXPORT b_off_t bu_ftell(FILE *stream);
+
 /** @} */
 
 __END_DECLS

Modified: brlcad/branches/STABLE/include/bu/glob.h
===================================================================
--- brlcad/branches/STABLE/include/bu/glob.h    2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/bu/glob.h    2020-07-24 22:45:37 UTC (rev 
76474)
@@ -23,8 +23,6 @@
 
 #include "common.h"
 
-#include "bio.h" /* for b_off_t */
-
 #include "bu/defines.h"
 #include "bu/vls.h"
 

Modified: brlcad/branches/STABLE/include/bu/ptbl.h
===================================================================
--- brlcad/branches/STABLE/include/bu/ptbl.h    2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/bu/ptbl.h    2020-07-24 22:45:37 UTC (rev 
76474)
@@ -24,7 +24,6 @@
 #include "common.h"
 
 #include <stddef.h> /* for size_t */
-#include "bio.h" /* for b_off_t */
 
 #include "bu/defines.h"
 #include "bu/magic.h"

Modified: brlcad/branches/STABLE/include/bu/tc.h
===================================================================
--- brlcad/branches/STABLE/include/bu/tc.h      2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/bu/tc.h      2020-07-24 22:45:37 UTC (rev 
76474)
@@ -35,7 +35,6 @@
 
 #include "common.h"
 #include "bu/defines.h"
-#include "bio.h"
 
 __BEGIN_DECLS
 
@@ -43,6 +42,21 @@
 #  include <pthread.h>
 #endif
 #if defined(HAVE_WINDOWS_H)
+#  ifdef WIN32_LEAN_AND_MEAN
+#    undef WIN32_LEAN_AND_MEAN
+#  endif
+#  define WIN32_LEAN_AND_MEAN 434144 /* don't want winsock.h */
+
+#  ifdef NOMINMAX
+#    undef NOMINMAX
+#  endif
+#  define NOMINMAX 434144 /* don't break std::min and std::max */
+
+#  include <windows.h>
+
+#  undef WIN32_LEAN_AND_MEAN /* unset to not interfere with calling apps */
+#  undef NOMINMAX
+
 #  include <process.h>
 #  include <sys/timeb.h>
 #endif

Modified: brlcad/branches/STABLE/include/bu/time.h
===================================================================
--- brlcad/branches/STABLE/include/bu/time.h    2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/bu/time.h    2020-07-24 22:45:37 UTC (rev 
76474)
@@ -25,7 +25,6 @@
 
 #include <stddef.h> /* for size_t */
 #include <stdlib.h> /* for getenv */
-#include "bio.h" /* for b_off_t */
 
 #include "bu/defines.h"
 #include "bu/vls.h"

Modified: brlcad/branches/STABLE/include/bu/vls.h
===================================================================
--- brlcad/branches/STABLE/include/bu/vls.h     2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/bu/vls.h     2020-07-24 22:45:37 UTC (rev 
76474)
@@ -22,10 +22,10 @@
 #define BU_VLS_H
 
 #include "common.h"
+#include <stdio.h> /* for FILE */
 #include <stddef.h> /* for size_t */
 #include <stdarg.h> /* For va_list */
 
-#include "bio.h" /* for FILE and off_t */
 
 #include "bu/defines.h"
 #include "bu/magic.h"

Modified: brlcad/branches/STABLE/include/common.h
===================================================================
--- brlcad/branches/STABLE/include/common.h     2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/common.h     2020-07-24 22:45:37 UTC (rev 
76474)
@@ -159,6 +159,12 @@
 #  define HAVE_U_TYPES 1
 #endif
 
+/* We want 64 bit (large file) I/O capabilities whenever they are available.
+ * Always define this before we include sys/types.h */
+#ifndef _FILE_OFFSET_BITS
+#  define _FILE_OFFSET_BITS 64
+#endif
+
 /**
  * C99 does not provide a ssize_t even though it is provided by SUS97.
  * regardless, we use it so make sure it's declared by using the
@@ -198,6 +204,24 @@
 #  endif
 #endif
 
+/* off_t is 32 bit size even on 64 bit Windows. In the past we have tried to
+ * force off_t to be 64 bit but this is failing on newer Windows/Visual Studio
+ * verions in 2020 - therefore, we instead introduce the b_off_t define to
+ * properly substitute the correct numerical type for the correct platform.  */
+#if defined(_WIN64)
+#  include <sys/stat.h>
+#  define b_off_t __int64
+#  define fstat _fstati64
+#  define stat  _stati64
+#elif defined (_WIN32)
+#  include <sys/stat.h>
+#  define b_off_t _off_t
+#  define fstat _fstat
+#  define stat  _stat
+#else
+#  define b_off_t off_t
+#endif
+
 /**
  * Provide a means to conveniently test the version of the GNU
  * compiler.  Use it like this:

Modified: brlcad/branches/STABLE/include/conf/PATCH
===================================================================
--- brlcad/branches/STABLE/include/conf/PATCH   2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/conf/PATCH   2020-07-24 22:45:37 UTC (rev 
76474)
@@ -1 +1 @@
-8
+10

Modified: brlcad/branches/STABLE/include/fb/fb_osgl.h
===================================================================
--- brlcad/branches/STABLE/include/fb/fb_osgl.h 2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/fb/fb_osgl.h 2020-07-24 22:45:37 UTC (rev 
76474)
@@ -54,8 +54,6 @@
 #  include <sys/wait.h>
 #endif
 
-#include "bio.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif

Modified: brlcad/branches/STABLE/include/fb/fb_wgl.h
===================================================================
--- brlcad/branches/STABLE/include/fb/fb_wgl.h  2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/fb/fb_wgl.h  2020-07-24 22:45:37 UTC (rev 
76474)
@@ -32,7 +32,22 @@
 #ifdef FB_USE_INTERNAL_API
 #ifdef IF_WGL
 #  include "common.h"
-#  include "bio.h"
+
+#  ifdef WIN32_LEAN_AND_MEAN
+#    undef WIN32_LEAN_AND_MEAN
+#  endif
+#  define WIN32_LEAN_AND_MEAN 434144 /* don't want winsock.h */
+
+#  ifdef NOMINMAX
+#    undef NOMINMAX
+#  endif
+#  define NOMINMAX 434144 /* don't break std::min and std::max */
+
+#  include <windows.h>
+
+#  undef WIN32_LEAN_AND_MEAN /* unset to not interfere with calling apps */
+#  undef NOMINMAX
+
 /* The wgl interface as currently implemented uses some
  * X11 types, supplied by Tk. */
 #  include <tk.h>

Modified: brlcad/branches/STABLE/include/fb.h
===================================================================
--- brlcad/branches/STABLE/include/fb.h 2020-07-24 22:02:40 UTC (rev 76473)
+++ brlcad/branches/STABLE/include/fb.h 2020-07-24 22:45:37 UTC (rev 76474)
@@ -54,9 +54,9 @@
 #if defined(HAVE_SYS_TIME_H)
 #  include <sys/time.h>
 #endif
+#include <stdio.h> /* for FILE */
 
 #include "bsocket.h"
-#include "bio.h"
 
 #include "tcl.h"
 #include "pkg.h"

Modified: brlcad/branches/STABLE/include/ged/defines.h
===================================================================
--- brlcad/branches/STABLE/include/ged/defines.h        2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/include/ged/defines.h        2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -29,7 +29,6 @@
 #define GED_DEFINES_H
 
 #include "common.h"
-#include "bio.h"
 #include "bu/hash.h"
 #include "bu/list.h"
 #include "bu/process.h"

Modified: brlcad/branches/STABLE/include/nmg.h
===================================================================
--- brlcad/branches/STABLE/include/nmg.h        2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/nmg.h        2020-07-24 22:45:37 UTC (rev 
76474)
@@ -67,6 +67,9 @@
 
 #include "common.h"
 
+/* system headers */
+#include <stdio.h> /* for FILE */
+
 /* interface headers */
 #include "vmath.h"
 #include "bu/list.h"
@@ -78,10 +81,7 @@
 #include "bn/vlist.h"
 #include "vmath.h"
 
-/* system headers */
-#include "bio.h" /* for FILE */
 
-
 #ifndef NMG_EXPORT
 #  if defined(NMG_DLL_EXPORTS) && defined(NMG_DLL_IMPORTS)
 #    error "Only NMG_DLL_EXPORTS or NMG_DLL_IMPORTS can be defined, not both."

Modified: brlcad/branches/STABLE/include/rt/anim.h
===================================================================
--- brlcad/branches/STABLE/include/rt/anim.h    2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/rt/anim.h    2020-07-24 22:45:37 UTC (rev 
76474)
@@ -26,6 +26,9 @@
 
 #include "common.h"
 
+/* system headers */
+#include <stdio.h> /* for FILE */
+
 /* interface headers */
 #include "vmath.h"
 #include "bu/vls.h"
@@ -34,9 +37,6 @@
 #include "rt/mater.h"
 #include "rt/db_fullpath.h"
 
-/* system headers */
-#include "bio.h" /* for FILE */
-
 __BEGIN_DECLS
 
 struct db_i; /* forward declaration */

Modified: brlcad/branches/STABLE/include/rt/calc.h
===================================================================
--- brlcad/branches/STABLE/include/rt/calc.h    2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/rt/calc.h    2020-07-24 22:45:37 UTC (rev 
76474)
@@ -28,14 +28,14 @@
 
 #include "common.h"
 
+/* system headers */
+#include <stdio.h> /* for FILE */
+
 /* interface headers */
 #include "vmath.h"
 #include "bu/vls.h"
 #include "bn/poly.h"
 
-/* system headers */
-#include "bio.h" /* for FILE */
-
 __BEGIN_DECLS
 
 /* apply a matrix transformation */

Modified: brlcad/branches/STABLE/include/rt/cmd.h
===================================================================
--- brlcad/branches/STABLE/include/rt/cmd.h     2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/rt/cmd.h     2020-07-24 22:45:37 UTC (rev 
76474)
@@ -26,14 +26,14 @@
 
 #include "common.h"
 
+/* system headers */
+#include <stdio.h> /* for FILE */
+
 /* interface headers */
 #include "vmath.h"
 #include "rt/defines.h"
 #include "rt/rt_instance.h"
 
-/* system headers */
-#include "bio.h" /* for FILE */
-
 __BEGIN_DECLS
 
 /**

Modified: brlcad/branches/STABLE/include/rt/db_fullpath.h
===================================================================
--- brlcad/branches/STABLE/include/rt/db_fullpath.h     2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/include/rt/db_fullpath.h     2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -22,7 +22,6 @@
 #define RT_DB_FULLPATH_H
 
 #include "common.h"
-#include "bio.h" /* for b_off_t */
 #include "bu/vls.h"
 #include "rt/defines.h"
 

Modified: brlcad/branches/STABLE/include/rt/db_instance.h
===================================================================
--- brlcad/branches/STABLE/include/rt/db_instance.h     2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/include/rt/db_instance.h     2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -25,8 +25,10 @@
 #define RT_DB_INSTANCE_H
 
 #include "common.h"
-#include "bio.h" /* for b_off_t */
 
+/* system headers */
+#include <stdio.h> /* for FILE */
+
 /* interface headers */
 #include "bu/magic.h"
 #include "bu/file.h"
@@ -36,9 +38,6 @@
 #include "rt/directory.h"
 #include "rt/anim.h"
 
-/* system headers */
-#include "bio.h" /* for FILE */
-
 __BEGIN_DECLS
 
 struct rt_wdb; /* forward declaration */

Modified: brlcad/branches/STABLE/include/rt/db_internal.h
===================================================================
--- brlcad/branches/STABLE/include/rt/db_internal.h     2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/include/rt/db_internal.h     2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -26,6 +26,9 @@
 
 #include "common.h"
 
+/* system headers */
+#include <stdio.h> /* for FILE */
+
 /* interface headers */
 #include "bu/magic.h"
 #include "bu/avs.h"
@@ -33,9 +36,6 @@
 #include "rt/defines.h"
 #include "rt/resource.h"
 
-/* system headers */
-#include "bio.h" /* for FILE */
-
 __BEGIN_DECLS
 
 struct rt_functab; /* forward declaration */

Modified: brlcad/branches/STABLE/include/rt/db_io.h
===================================================================
--- brlcad/branches/STABLE/include/rt/db_io.h   2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/rt/db_io.h   2020-07-24 22:45:37 UTC (rev 
76474)
@@ -26,6 +26,9 @@
 
 #include "common.h"
 
+/* system headers */
+#include <stdio.h> /* for FILE */
+
 /* interface headers */
 #include "vmath.h"
 #include "bu/avs.h"
@@ -32,9 +35,6 @@
 #include "rt/db5.h"
 #include "rt/defines.h"
 
-/* system headers */
-#include "bio.h" /* for FILE, b_off_t */
-
 __BEGIN_DECLS
 
 

Modified: brlcad/branches/STABLE/include/rt/directory.h
===================================================================
--- brlcad/branches/STABLE/include/rt/directory.h       2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/include/rt/directory.h       2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -25,7 +25,6 @@
 #define RT_DIRECTORY_H
 
 #include "common.h"
-#include "bio.h" /* for b_off_T */
 #include "vmath.h"
 #include "bu/list.h"
 #include "rt/anim.h"

Modified: brlcad/branches/STABLE/include/rt/mater.h
===================================================================
--- brlcad/branches/STABLE/include/rt/mater.h   2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/rt/mater.h   2020-07-24 22:45:37 UTC (rev 
76474)
@@ -25,7 +25,6 @@
 #define RT_MATER_H
 
 #include "common.h"
-#include "bio.h" /* for b_off_t */
 #include "rt/defines.h"
 #include "bu/vls.h"
 

Modified: brlcad/branches/STABLE/include/rt/mem.h
===================================================================
--- brlcad/branches/STABLE/include/rt/mem.h     2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/rt/mem.h     2020-07-24 22:45:37 UTC (rev 
76474)
@@ -25,7 +25,6 @@
 #define RT_MEM_H
 
 #include "common.h"
-#include "bio.h" /* for b_off_t */
 #include "vmath.h"
 #include "rt/defines.h"
 

Modified: brlcad/branches/STABLE/include/rt/vlist.h
===================================================================
--- brlcad/branches/STABLE/include/rt/vlist.h   2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/include/rt/vlist.h   2020-07-24 22:45:37 UTC (rev 
76474)
@@ -26,14 +26,13 @@
 
 #include "common.h"
 
+/* system headers */
+#include <stdio.h> /* for FILE */
+
 /* interface headers */
 #include "vmath.h"
 #include "bu/vls.h"
 
-/* system headers */
-#include "bio.h" /* for FILE */
-
-
 __BEGIN_DECLS
 
 /**

Modified: brlcad/branches/STABLE/misc/CMake/FindGDAL.cmake
===================================================================
--- brlcad/branches/STABLE/misc/CMake/FindGDAL.cmake    2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/misc/CMake/FindGDAL.cmake    2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -1,4 +1,4 @@
-# Copyright 2000-2017 Kitware, Inc. and Contributors
+# Copyright 2000-2020 Kitware, Inc. and Contributors
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -27,30 +27,53 @@
 # 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.
-
-#.rst:
-# FindGDAL
-# --------
 #
-# Locate gdal
-#
-# This module accepts the following environment variables:
-#
-# ::
-#
-#     GDAL_DIR or GDAL_ROOT - Specify the location of GDAL
-#
-#
-#
-# This module defines the following CMake variables:
-#
-# ::
-#
-#     GDAL_FOUND - True if libgdal is found
-#     GDAL_LIBRARY - A variable pointing to the GDAL library
-#     GDAL_INCLUDE_DIR - Where to find the headers
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
 
-#
+#[=======================================================================[.rst:
+FindGDAL
+--------
+
+Find Geospatial Data Abstraction Library (GDAL).
+
+IMPORTED Targets
+^^^^^^^^^^^^^^^^
+
+This module defines :prop_tgt:`IMPORTED` target ``GDAL::GDAL``
+if GDAL has been found.
+
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module will set the following variables in your project:
+
+``GDAL_FOUND``
+  True if GDAL is found.
+``GDAL_INCLUDE_DIRS``
+  Include directories for GDAL headers.
+``GDAL_LIBRARIES``
+  Libraries to link to GDAL.
+``GDAL_VERSION``
+  The version of GDAL found.
+
+Cache variables
+^^^^^^^^^^^^^^^
+
+The following cache variables may also be set:
+
+``GDAL_LIBRARY``
+  The libgdal library file.
+``GDAL_INCLUDE_DIR``
+  The directory containing ``gdal.h``.
+
+Hints
+^^^^^
+
+Set ``GDAL_DIR`` or ``GDAL_ROOT`` in the environment to specify the
+GDAL installation prefix.
+#]=======================================================================]
+
 # $GDALDIR is an environment variable that would
 # correspond to the ./configure --prefix=$GDAL_DIR
 # used in building gdal.
@@ -67,114 +90,105 @@
 #
 #include "gdal.h"
 
-include(CheckCSourceCompiles)
-function(GDALTRANS_TEST HGDALTRANS)
+find_path(GDAL_INCLUDE_DIR gdal.h
+  HINTS
+    ENV GDAL_DIR
+    ENV GDAL_ROOT
+  PATH_SUFFIXES
+     include/gdal
+     include/GDAL
+     include
+)
 
-  set(CMAKE_REQUIRED_INCLUDES ${GDAL_INCLUDE_DIR})
-  set(CMAKE_REQUIRED_LIBRARIES ${GDAL_LIBRARY})
+if(UNIX)
+    # Use gdal-config to obtain the library version (this should hopefully
+    # allow us to -lgdal1.x.y where x.y are correct version)
+    # For some reason, libgdal development packages do not contain
+    # libgdal.so...
+    find_program(GDAL_CONFIG gdal-config
+        HINTS
+          ENV GDAL_DIR
+          ENV GDAL_ROOT
+        PATH_SUFFIXES bin
+    )
 
-  set(GT_SRCS "
-  #include <gdal.h>
-  #include <gdalwarper.h>
-  #include <gdal_utils.h>
-  #include <cpl_conv.h>
-  #include <cpl_string.h>
-  #include <cpl_multiproc.h>
-  #include <ogr_spatialref.h>
-  #include <vrtdataset.h>
+    if(GDAL_CONFIG)
+        exec_program(${GDAL_CONFIG} ARGS --libs OUTPUT_VARIABLE 
GDAL_CONFIG_LIBS)
 
-  int main(int ac, char *av[])
-  {
-  GDALDatasetH gd = GDALTranslate(NULL, NULL, NULL, NULL);
-  }
-  ")
+        if(GDAL_CONFIG_LIBS)
+            # treat the output as a command line and split it up
+            separate_arguments(args NATIVE_COMMAND "${GDAL_CONFIG_LIBS}")
 
-  CHECK_C_SOURCE_COMPILES("${GT_SRCS}" H_GT)
+            # only consider libraries whose name matches this pattern
+            set(name_pattern "[gG][dD][aA][lL]")
 
-  set(${HGDALTRANS} ${H_GT} PARENT_SCOPE)
+            # consider each entry as a possible library path, name, or parent 
directory
+            foreach(arg IN LISTS args)
+                # library name
+                if("${arg}" MATCHES "^-l(.*)$")
+                    set(lib "${CMAKE_MATCH_1}")
 
-endfunction(GDALTRANS_TEST)
+                    # only consider libraries whose name matches the expected 
pattern
+                    if("${lib}" MATCHES "${name_pattern}")
+                        list(APPEND _gdal_lib "${lib}")
+                    endif()
+                # library search path
+                elseif("${arg}" MATCHES "^-L(.*)$")
+                    list(APPEND _gdal_libpath "${CMAKE_MATCH_1}")
+                # assume this is a full path to a library
+                elseif(IS_ABSOLUTE "${arg}" AND EXISTS "${arg}")
+                    # extract the file name
+                    get_filename_component(lib "${arg}" NAME)
 
+                    # only consider libraries whose name matches the expected 
pattern
+                    if(NOT "${lib}" MATCHES "${name_pattern}")
+                        continue()
+                    endif()
 
-find_path(GDAL_INCLUDE_DIR gdal.h
-  HINTS
-  ENV GDAL_DIR
-  ENV GDAL_ROOT
-  PATH_SUFFIXES
-  include/gdal
-  include/GDAL
-  include
-  PATHS
-  ~/Library/Frameworks/gdal.framework/Headers
-  /Library/Frameworks/gdal.framework/Headers
-  /sw # Fink
-  /opt/local # DarwinPorts
-  /opt/csw # Blastwave
-  /opt
-  )
+                    # extract the file directory
+                    get_filename_component(dir "${arg}" DIRECTORY)
 
-# Use gdal-config to obtain the library version (this should hopefully
-# allow us to -lgdal1.x.y where x.y are correct version)
-# For some reason, libgdal development packages do not contain
-# libgdal.so...
-find_program(GDAL_CONFIG gdal-config
-  HINTS
-  ENV GDAL_DIR
-  ENV GDAL_ROOT
-  PATH_SUFFIXES bin
-  PATHS
-  /sw # Fink
-  /opt/local # DarwinPorts
-  /opt/csw # Blastwave
-  /opt
-  )
+                    # remove library prefixes/suffixes
+                    string(REGEX REPLACE 
"^(${CMAKE_SHARED_LIBRARY_PREFIX}|${CMAKE_STATIC_LIBRARY_PREFIX})" "" lib 
"${lib}")
+                    string(REGEX REPLACE 
"(${CMAKE_SHARED_LIBRARY_SUFFIX}|${CMAKE_STATIC_LIBRARY_SUFFIX})$" "" lib 
"${lib}")
 
-if(GDAL_CONFIG AND NOT "${GDAL_CONFIG}" MATCHES "NOTFOUND")
-  exec_program(${GDAL_CONFIG} ARGS --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS)
-  if(GDAL_CONFIG_LIBS)
-    string(REGEX MATCHALL "-l[^ ]+" _gdal_dashl ${GDAL_CONFIG_LIBS})
-    string(REPLACE "-l" "" _gdal_lib "${_gdal_dashl}")
-    string(REGEX MATCHALL "-L[^ ]+" _gdal_dashL ${GDAL_CONFIG_LIBS})
-    string(REPLACE "-L" "" _gdal_libpath "${_gdal_dashL}")
-  endif(GDAL_CONFIG_LIBS)
-endif(GDAL_CONFIG AND NOT "${GDAL_CONFIG}" MATCHES "NOTFOUND")
+                    # use the file name and directory as hints
+                    list(APPEND _gdal_libpath "${dir}")
+                    list(APPEND _gdal_lib "${lib}")
+                endif()
+            endforeach()
+        endif()
+    endif()
+endif()
 
 find_library(GDAL_LIBRARY
-  NAMES ${_gdal_lib} gdal GDAL
+  NAMES ${_gdal_lib} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
   HINTS
-  ENV GDAL_DIR
-  ENV GDAL_ROOT
-  ${_gdal_libpath}
+     ENV GDAL_DIR
+     ENV GDAL_ROOT
+     ${_gdal_libpath}
   PATH_SUFFIXES lib
-  PATHS
-  /sw
-  /opt/local
-  /opt/csw
-  /opt
-  /usr/freeware
-  )
+)
 
-# Check for GDALTranslate - if we don't have that, we're not in business
-if(GDAL_LIBRARY AND GDAL_INCLUDE_DIR)
-  GDALTRANS_TEST(HAVE_GDALTRANSLATE)
-  if(NOT HAVE_GDALTRANSLATE)
-    set(GDAL_LIBRARY NOTFOUND)
-    set(GDAL_INCLUDE_DIR "")
-  endif(NOT HAVE_GDALTRANSLATE)
-endif(GDAL_LIBRARY AND GDAL_INCLUDE_DIR)
+if (EXISTS "${GDAL_INCLUDE_DIR}/gdal_version.h")
+    file(STRINGS "${GDAL_INCLUDE_DIR}/gdal_version.h" _gdal_version
+        REGEX "GDAL_RELEASE_NAME")
+    string(REGEX REPLACE ".*\"\(.*\)\"" "\\1" GDAL_VERSION "${_gdal_version}")
+    unset(_gdal_version)
+else ()
+    set(GDAL_VERSION GDAL_VERSION-NOTFOUND)
+endif ()
 
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDAL DEFAULT_MSG GDAL_LIBRARY 
GDAL_INCLUDE_DIR HAVE_GDALTRANSLATE)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDAL
+    VERSION_VAR GDAL_VERSION
+    REQUIRED_VARS GDAL_LIBRARY GDAL_INCLUDE_DIR)
 
-if(HAVE_GDALTRANSLATE)
-  set(GDAL_LIBRARIES ${GDAL_LIBRARY})
-  set(GDAL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR})
-endif(HAVE_GDALTRANSLATE)
+if (GDAL_FOUND AND NOT TARGET GDAL::GDAL)
+    add_library(GDAL::GDAL UNKNOWN IMPORTED)
+    set_target_properties(GDAL::GDAL PROPERTIES
+        IMPORTED_LOCATION "${GDAL_LIBRARY}"
+        INTERFACE_INCLUDE_DIRECTORIES "${GDAL_INCLUDE_DIR}")
+endif ()
 
-# Local Variables:
-# tab-width: 8
-# mode: cmake
-# indent-tabs-mode: t
-# End:
-# ex: shiftwidth=2 tabstop=8
-
+set(GDAL_LIBRARIES ${GDAL_LIBRARY})
+set(GDAL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR})

Modified: brlcad/branches/STABLE/misc/debian/changelog
===================================================================
--- brlcad/branches/STABLE/misc/debian/changelog        2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/misc/debian/changelog        2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -1,3 +1,10 @@
+brlcad (7.30.10-0) unstable; urgency=low
+
+  * update brlcad version
+
+ -- Cliff Yapp <[email protected]>  Fri, 24 Jul 2020 08:10:36 UTC 
+
+
 brlcad (7.30.8-0) unstable; urgency=low
 
   * update brlcad version

Modified: brlcad/branches/STABLE/misc/macosx/Resources/ReadMe.rtfd/TXT.rtf
===================================================================
--- brlcad/branches/STABLE/misc/macosx/Resources/ReadMe.rtfd/TXT.rtf    
2020-07-24 22:02:40 UTC (rev 76473)
+++ brlcad/branches/STABLE/misc/macosx/Resources/ReadMe.rtfd/TXT.rtf    
2020-07-24 22:45:37 UTC (rev 76474)
@@ -11,7 +11,7 @@
 \f0\i\b\fs72 \cf0 README
 \fs36 \
 
-\f1\i0\b0\fs28 This is BRL-CAD 7.30.8 for Mac OS X.  Please send any bugs, 
comments, questions, or suggestions to the project website.\
+\f1\i0\b0\fs28 This is BRL-CAD 7.30.10 for Mac OS X.  Please send any bugs, 
comments, questions, or suggestions to the project website.\
 
 \fs22 \
 

Modified: brlcad/branches/STABLE/misc/macosx/Resources/Welcome.rtfd/TXT.rtf
===================================================================
--- brlcad/branches/STABLE/misc/macosx/Resources/Welcome.rtfd/TXT.rtf   
2020-07-24 22:02:40 UTC (rev 76473)
+++ brlcad/branches/STABLE/misc/macosx/Resources/Welcome.rtfd/TXT.rtf   
2020-07-24 22:45:37 UTC (rev 76474)
@@ -4,7 +4,7 @@
 \margl1440\margr1440\vieww8020\viewh6280\viewkind0
 
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
 
-\f0\fs22 \cf0 This installer will guide you through the installation of 
BRL-CAD 7.30.8 for Mac OS X and Darwin.\
+\f0\fs22 \cf0 This installer will guide you through the installation of 
BRL-CAD 7.30.10 for Mac OS X and Darwin.\
 \
 This distribution of BRL-CAD requires approximately 500 MB of available disk 
space and does not include source code.\
 \

Modified: brlcad/branches/STABLE/src/burst/ui.c
===================================================================
--- brlcad/branches/STABLE/src/burst/ui.c       2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/burst/ui.c       2020-07-24 22:45:37 UTC (rev 
76474)
@@ -26,12 +26,12 @@
 #include "common.h"
 
 #include <assert.h>
-#include <stdio.h>
 #include <signal.h>
-#include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 
+#include "bio.h"
+
 #include "vmath.h"
 #include "raytrace.h"
 

Modified: brlcad/branches/STABLE/src/conv/asc/asc2g.c
===================================================================
--- brlcad/branches/STABLE/src/conv/asc/asc2g.c 2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/conv/asc/asc2g.c 2020-07-24 22:45:37 UTC (rev 
76474)
@@ -1049,7 +1049,7 @@
     name = bu_strdup(cp);
 
     /* Count up the number of poly data lines which follow */
-    startpos = ftell(ifp);
+    startpos = bu_ftell(ifp);
     for (nlines = 0;; nlines++) {
        if (bu_fgets(buf, BUFSIZE, ifp) == NULL) break;
        if (buf[0] != ID_P_DATA) break; /* 'Q' */
@@ -1065,7 +1065,7 @@
     pg->max_npts = 0;
 
     /* Return to first 'Q' record */
-    fseek(ifp, startpos, 0);
+    bu_fseek(ifp, startpos, 0);
 
     for (nlines = 0; nlines < pg->npoly; nlines++) {
        struct rt_pg_face_internal *fp = &pg->poly[nlines];

Modified: brlcad/branches/STABLE/src/conv/conv-vg2g.c
===================================================================
--- brlcad/branches/STABLE/src/conv/conv-vg2g.c 2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/conv/conv-vg2g.c 2020-07-24 22:45:37 UTC (rev 
76474)
@@ -107,7 +107,7 @@
            bu_strlcpy(rec.i.i_version, ID_VERSION, sizeof(rec.i.i_version));
        }
     } else {
-       lseek(ifd, 0, 0);
+       bu_lseek(ifd, 0, 0);
        /* have an old vged file to convert */
 
        /* units are important now because:
@@ -206,7 +206,7 @@
            case ID_ARS_A:
                if (rec.a.a_name[0] == '\0') {
                    /* Skip deleted junk */
-                   lseek(ifd, (b_off_t)(rec.a.a_totlen * sizeof(rec)), 1);
+                   bu_lseek(ifd, (b_off_t)(rec.a.a_totlen * sizeof(rec)), 1);
                    goto top;
                }
                rec.a.a_xmin *= factor;

Modified: brlcad/branches/STABLE/src/conv/dxf/dxf-g.c
===================================================================
--- brlcad/branches/STABLE/src/conv/dxf/dxf-g.c 2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/conv/dxf/dxf-g.c 2020-07-24 22:45:37 UTC (rev 
76474)
@@ -629,7 +629,7 @@
            } else if (!bu_strncmp(line, "BLOCK", 5)) {
                /* start of a new block */
                BU_ALLOC(curr_block, struct block_list);
-               curr_block->offset = ftell(dxf);
+               curr_block->offset = bu_ftell(dxf);
                BU_LIST_INSERT(&(block_head), &(curr_block->l));
                break;
            }
@@ -1109,7 +1109,7 @@
                    break;
                }
                bu_free((char *)tmp_state, "curr_state");
-               fseek(dxf, curr_state->file_offset, SEEK_SET);
+               bu_fseek(dxf, curr_state->file_offset, SEEK_SET);
                curr_state->sub_state = UNKNOWN_ENTITY_STATE;
                if (verbose) {
                    bu_log("Popped state at end of inserted block (seeked to 
%jd)\n", (intmax_t)curr_state->file_offset);
@@ -1223,7 +1223,7 @@
                BU_LIST_PUSH(&state_stack, &(curr_state->l));
                curr_state = new_state;
                new_state = NULL;
-               fseek(dxf, curr_state->curr_block->offset, SEEK_SET);
+               bu_fseek(dxf, curr_state->curr_block->offset, SEEK_SET);
                curr_state->state = ENTITIES_SECTION;
                curr_state->sub_state = UNKNOWN_ENTITY_STATE;
                if (verbose) {
@@ -2504,7 +2504,7 @@
                    BU_LIST_PUSH(&state_stack, &(curr_state->l));
                    curr_state = new_state;
                    new_state = NULL;
-                   fseek(dxf, curr_state->curr_block->offset, SEEK_SET);
+                   bu_fseek(dxf, curr_state->curr_block->offset, SEEK_SET);
                    curr_state->state = ENTITIES_SECTION;
                    curr_state->sub_state = UNKNOWN_ENTITY_STATE;
                    if (verbose) {
@@ -3083,7 +3083,7 @@
     size_t line_len;
     static int line_num = 0;
 
-    curr_state->file_offset = ftell(dxf);
+    curr_state->file_offset = bu_ftell(dxf);
 
     if (bu_fgets(line, MAX_LINE_SIZE, dxf) == NULL) {
        return ERROR_FLAG;

Modified: brlcad/branches/STABLE/src/conv/fast4-g.c
===================================================================
--- brlcad/branches/STABLE/src/conv/fast4-g.c   2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/conv/fast4-g.c   2020-07-24 22:45:37 UTC (rev 
76474)
@@ -2065,7 +2065,7 @@
     b_off_t section_start;
 
     /* skip to start of next section */
-    section_start = ftell(fpin);
+    section_start = bu_ftell(fpin);
     if (section_start < 0) {
        bu_exit(1, "Error: couldn't get input file's current file position.\n");
     }
@@ -2076,7 +2076,7 @@
               bu_strncmp(line, "WALL", 4) &&
               bu_strncmp(line, "VEHICLE", 7))
        {
-           section_start = ftell(fpin);
+           section_start = bu_ftell(fpin);
            if (section_start < 0) {
                bu_exit(1, "Error: couldn't get input file's current file 
position.\n");
            }
@@ -2085,7 +2085,7 @@
        }
     }
     /* seek to start of the section */
-    fseek(fpin, section_start, SEEK_SET);
+    bu_fseek(fpin, section_start, SEEK_SET);
 }
 
 

Modified: brlcad/branches/STABLE/src/conv/g-acad.c
===================================================================
--- brlcad/branches/STABLE/src/conv/g-acad.c    2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/conv/g-acad.c    2020-07-24 22:45:37 UTC (rev 
76474)
@@ -649,7 +649,7 @@
     /* Write out number of facet entities to .facet file */
 
     rewind(fp);
-    fseek(fp, 46, 0); /* Re-position pointer to 2nd line */
+    bu_fseek(fp, 46, 0); /* Re-position pointer to 2nd line */
     fprintf(fp, "%d\n", regions_written); /* Write out number of regions */
     fclose(fp);
 

Modified: brlcad/branches/STABLE/src/conv/iges/findp.c
===================================================================
--- brlcad/branches/STABLE/src/conv/iges/findp.c        2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/conv/iges/findp.c        2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -44,13 +44,13 @@
 
     saverec = currec;  /* save current record number */
 
-    if (fseek(fd, 0, 2)) {
+    if (bu_fseek(fd, 0, 2)) {
        /* go to end of file */
        bu_log("Cannot seek to end of file\n");
        perror("Findp");
        bu_exit(1, NULL);
     }
-    offset = ftell(fd);        /* get file length */
+    offset = bu_ftell(fd);     /* get file length */
     rec2 = offset/reclen;      /* calculate record number for last record */
     Readrec(rec2);     /* read last record into "card" buffer */
     dstart = 0;

Modified: brlcad/branches/STABLE/src/conv/iges/g-iges.c
===================================================================
--- brlcad/branches/STABLE/src/conv/iges/g-iges.c       2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/conv/iges/g-iges.c       2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -402,7 +402,7 @@
 
     if (!multi_file) {
        /* Copy the parameter section from the temporary file to the output 
file */
-       if ((fseek(fp_param, 0, 0))) {
+       if ((bu_fseek(fp_param, 0, 0))) {
            perror("g-iges");
            bu_exit(1, "Cannot seek to start of temporary file\n");
        }
@@ -619,7 +619,7 @@
            char copy_buffer[CP_BUF_SIZE] = {0};
 
            /* Copy the parameter section from the temporary file to the output 
file */
-           if ((fseek(fp_param, 0, 0))) {
+           if ((bu_fseek(fp_param, 0, 0))) {
                perror("g-iges");
                bu_exit(1, "Cannot seek to start of temporary file\n");
            }

Modified: brlcad/branches/STABLE/src/conv/iges/n_iges.cpp
===================================================================
--- brlcad/branches/STABLE/src/conv/iges/n_iges.cpp     2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/conv/iges/n_iges.cpp     2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -206,7 +206,7 @@
     if (k == (-1))     /* We didn't encounter an early EOF */
        k = NRECS;
 
-    if (fseek(in, 0, SEEK_SET)) {
+    if (bu_fseek(in, 0, SEEK_SET)) {
        /* rewind file */
        perror("Recsize");
        bu_exit(-1, "Cannot rewind file\n");
@@ -228,7 +228,7 @@
 
 Record::Record(FILE* in) : _fp(in) {
     if (_reclen < 0) calcRecsize(in); // FIXME: ...
-    _start = ftell(in);
+    _start = bu_ftell(in);
     _read();
 }
 
@@ -235,9 +235,9 @@
 
 Record::Record(FILE* in, int paramStart, int record) : _fp(in) {
     if (_reclen < 0) calcRecsize(in);
-    _start = ftell(in);
+    _start = bu_ftell(in);
     int pos = (record-1)*_reclen;
-    fseek(_fp, paramStart + pos, SEEK_SET);
+    bu_fseek(_fp, paramStart + pos, SEEK_SET);
     _read();
 }
 
@@ -262,7 +262,7 @@
 
 void
 Record::_undoRead(int numLines) {
-    fseek(_fp, -(numLines * _reclen), SEEK_CUR);
+    bu_fseek(_fp, -(numLines * _reclen), SEEK_CUR);
 }
 
 

Modified: brlcad/branches/STABLE/src/conv/iges/n_iges.hpp
===================================================================
--- brlcad/branches/STABLE/src/conv/iges/n_iges.hpp     2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/conv/iges/n_iges.hpp     2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -359,8 +359,8 @@
     bool isParameter() { return _type == 'P'; }
     bool isTerminal() { return _type == 'T'; }
     // reset the stream to the start of this record
-    void reset() { fseek(_fp, _start, SEEK_SET); }
-    long where() { return ftell(_fp); }
+    void reset() { bu_fseek(_fp, _start, SEEK_SET); }
+    long where() { return bu_ftell(_fp); }
 
     GlobalSection* createGlobalSection();
     void createDirectory(vector<DirectoryEntry*>& dir);

Modified: brlcad/branches/STABLE/src/conv/iges/readrec.c
===================================================================
--- brlcad/branches/STABLE/src/conv/iges/readrec.c      2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/conv/iges/readrec.c      2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -44,7 +44,7 @@
 
     currec = recno;
     offset = (recno - 1) * reclen;
-    if (fseek(fd, offset, 0)) {
+    if (bu_fseek(fd, offset, 0)) {
        bu_log("Error in seek\n");
        perror("Readrec");
        bu_exit(1, NULL);

Modified: brlcad/branches/STABLE/src/conv/iges/recsize.c
===================================================================
--- brlcad/branches/STABLE/src/conv/iges/recsize.c      2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/conv/iges/recsize.c      2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -68,7 +68,7 @@
     if (k == (-1))     /* We didn't encounter an early EOF */
        k = NRECS;
 
-    if (fseek(fd, 0, 0)) {
+    if (bu_fseek(fd, 0, 0)) {
        /* rewind file */
        bu_log("Cannot rewind file\n");
        perror("Recsize");

Modified: brlcad/branches/STABLE/src/conv/nastran-g.c
===================================================================
--- brlcad/branches/STABLE/src/conv/nastran-g.c 2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/conv/nastran-g.c 2020-07-24 22:45:37 UTC (rev 
76474)
@@ -161,7 +161,7 @@
     for (i=0; i < 20; i++)
        prev_rec[i][0] = '\0';
 
-    fseek(fpin, start_off, SEEK_SET);
+    bu_fseek(fpin, start_off, SEEK_SET);
     line_count = bulk_data_start_line;
 
     tmp = bu_fgets(next_line, MAX_LINE_SIZE, fpin);
@@ -1193,7 +1193,7 @@
        if (bu_strncmp(line, "BEGIN BULK", 10))
            continue;
 
-       start_off = ftell(fpin);
+       start_off = bu_ftell(fpin);
        break;
     }
 
@@ -1219,7 +1219,7 @@
     nmg_model = (struct model *)NULL;
 
     /* count grid points */
-    fseek(fptmp, 0, SEEK_SET);
+    bu_fseek(fptmp, 0, SEEK_SET);
     while (bu_fgets(line, MAX_LINE_SIZE, fptmp)) {
        if (!bu_strncmp(line, "GRID", 4))
            grid_count++;
@@ -1229,7 +1229,7 @@
     }
 
     /* get default values and properties */
-    fseek(fptmp, 0, SEEK_SET);
+    bu_fseek(fptmp, 0, SEEK_SET);
     while (get_next_record(fptmp, 1, 0)) {
        if (!bu_strncmp(curr_rec[0], "BAROR", 5)) {
            /* get BAR defaults */
@@ -1262,7 +1262,7 @@
     g_pts = (struct grid_point *)bu_calloc(grid_count, sizeof(struct 
grid_point), "grid points");
 
     /* get all grid points */
-    fseek(fptmp, 0, SEEK_SET);
+    bu_fseek(fptmp, 0, SEEK_SET);
     while (get_next_record(fptmp, 1, 0)) {
        int gid;
        int cid;
@@ -1287,7 +1287,7 @@
 
 
     /* find coordinate systems */
-    fseek(fptmp, 0, SEEK_SET);
+    bu_fseek(fptmp, 0, SEEK_SET);
     while (get_next_record(fptmp, 1, 0)) {
        if (bu_strncmp(curr_rec[0], "CORD", 4))
            continue;
@@ -1306,7 +1306,7 @@
     mk_id(fpout, nastran_file);
 
     /* get elements */
-    fseek(fptmp, 0, SEEK_SET);
+    bu_fseek(fptmp, 0, SEEK_SET);
     while (get_next_record(fptmp, 1, 0)) {
        if (!bu_strncmp(curr_rec[0], "CBAR", 4))
            get_cbar();

Modified: brlcad/branches/STABLE/src/conv/shp/shapelib/shpopen.c
===================================================================
--- brlcad/branches/STABLE/src/conv/shp/shapelib/shpopen.c      2020-07-24 
22:02:40 UTC (rev 76473)
+++ brlcad/branches/STABLE/src/conv/shp/shapelib/shpopen.c      2020-07-24 
22:45:37 UTC (rev 76474)
@@ -1596,7 +1596,7 @@
         */
        char str[128];
        sprintf( str,
-                "Error in fseek() reading object from .shp file at offset %u",
+                "Error in bu_fseek() reading object from .shp file at offset 
%u",
                 psSHP->panRecOffset[hEntity]);
 
        psSHP->sHooks.Error( str );

Modified: brlcad/branches/STABLE/src/conv/stl/g-stl.c
===================================================================
--- brlcad/branches/STABLE/src/conv/stl/g-stl.c 2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/conv/stl/g-stl.c 2020-07-24 22:45:37 UTC (rev 
76474)
@@ -283,7 +283,7 @@
            unsigned char tot_buffer[4];
 
            /* Re-position pointer to 80th byte */
-           lseek(bfd, 80, SEEK_SET);
+           bu_lseek(bfd, 80, SEEK_SET);
 
            /* Write out number of triangles */
            *(uint32_t *)tot_buffer = htonl((unsigned long)region_polys);
@@ -499,7 +499,7 @@
            unsigned char tot_buffer[4];
 
            /* Re-position pointer to 80th byte */
-           lseek(bfd, 80, SEEK_SET);
+           bu_lseek(bfd, 80, SEEK_SET);
 
            /* Write out number of triangles */
            *(uint32_t *)tot_buffer = htonl((unsigned long)tot_polygons);

Modified: brlcad/branches/STABLE/src/conv/vdeck/vdeck.c
===================================================================
--- brlcad/branches/STABLE/src/conv/vdeck/vdeck.c       2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/conv/vdeck/vdeck.c       2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -1218,7 +1218,7 @@
     ewrite(solfp, LF, 1);
 
     /* Save space for number of solids and regions.                    */
-    savsol = ftell(solfp);
+    savsol = bu_ftell(solfp);
     if (savsol < 0) {
        perror("ftell");
     }
@@ -1272,7 +1272,7 @@
 
     /* Go back, and add number of solids and regions on second card. */
     if (savsol >= 0)
-       fseek(solfp, savsol, 0);
+       bu_fseek(solfp, savsol, 0);
 
     vdeck_itoa(nns, buff, 5);
     ewrite(solfp, buff, 5);

Modified: brlcad/branches/STABLE/src/fb/bw-fb.c
===================================================================
--- brlcad/branches/STABLE/src/fb/bw-fb.c       2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/bw-fb.c       2020-07-24 22:45:37 UTC (rev 
76474)
@@ -36,6 +36,9 @@
 #ifdef HAVE_SYS_STAT_H
 #  include <sys/stat.h>
 #endif
+
+#include "bio.h"
+
 #include "bu/color.h"
 #include "bu/getopt.h"
 #include "bu/malloc.h"
@@ -339,7 +342,7 @@
     int n, tries;
 
     if (fileinput) {
-       (void)lseek(fd, num, 1);
+       (void)bu_lseek(fd, num, 1);
        return 0;
     }
 

Modified: brlcad/branches/STABLE/src/fb/fb-bw.c
===================================================================
--- brlcad/branches/STABLE/src/fb/fb-bw.c       2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/fb-bw.c       2020-07-24 22:45:37 UTC (rev 
76474)
@@ -29,6 +29,8 @@
 
 #include <stdlib.h>
 
+#include "bio.h"
+
 #include "bu/color.h"
 #include "bu/getopt.h"
 #include "bu/exit.h"

Modified: brlcad/branches/STABLE/src/fb/fb-pix.c
===================================================================
--- brlcad/branches/STABLE/src/fb/fb-pix.c      2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/fb-pix.c      2020-07-24 22:45:37 UTC (rev 
76474)
@@ -29,6 +29,8 @@
 #include <stdlib.h>
 #include <sys/stat.h>
 
+#include "bio.h"
+
 #include "bu/app.h"
 #include "bu/getopt.h"
 #include "bu/exit.h"

Modified: brlcad/branches/STABLE/src/fb/fb-png.c
===================================================================
--- brlcad/branches/STABLE/src/fb/fb-png.c      2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/fb-png.c      2020-07-24 22:45:37 UTC (rev 
76474)
@@ -31,6 +31,8 @@
 #include <sys/stat.h>
 #include <png.h>
 
+#include "bio.h"
+
 #include "bu/app.h"
 #include "bu/getopt.h"
 #include "bu/log.h"

Modified: brlcad/branches/STABLE/src/fb/fbcbars.c
===================================================================
--- brlcad/branches/STABLE/src/fb/fbcbars.c     2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/fbcbars.c     2020-07-24 22:45:37 UTC (rev 
76474)
@@ -62,6 +62,8 @@
 
 #include <stdlib.h>
 
+#include "bio.h"
+
 #include "bu/color.h"
 #include "bu/getopt.h"
 #include "bu/exit.h"

Modified: brlcad/branches/STABLE/src/fb/fbcmap.c
===================================================================
--- brlcad/branches/STABLE/src/fb/fbcmap.c      2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/fbcmap.c      2020-07-24 22:45:37 UTC (rev 
76474)
@@ -30,6 +30,8 @@
 
 #include <stdlib.h>
 
+#include "bio.h"
+
 #include "bu/getopt.h"
 #include "bu/log.h"
 #include "bu/snooze.h"

Modified: brlcad/branches/STABLE/src/fb/fbcolor.c
===================================================================
--- brlcad/branches/STABLE/src/fb/fbcolor.c     2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/fbcolor.c     2020-07-24 22:45:37 UTC (rev 
76474)
@@ -30,6 +30,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "bio.h"
+
 #include "bu/color.h"
 #include "bu/getopt.h"
 #include "bu/exit.h"

Modified: brlcad/branches/STABLE/src/fb/fbfade.c
===================================================================
--- brlcad/branches/STABLE/src/fb/fbfade.c      2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/fbfade.c      2020-07-24 22:45:37 UTC (rev 
76474)
@@ -59,6 +59,8 @@
 #include <string.h>
 #include <stdarg.h>
 
+#include "bio.h"
+
 #include "bu/getopt.h"
 #include "vmath.h"
 #include "fb.h"                        /* BRL-CAD package libfb.a interface */

Modified: brlcad/branches/STABLE/src/fb/fbframe.c
===================================================================
--- brlcad/branches/STABLE/src/fb/fbframe.c     2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/fbframe.c     2020-07-24 22:45:37 UTC (rev 
76474)
@@ -29,6 +29,8 @@
 
 #include <stdlib.h>
 
+#include "bio.h"
+
 #include "bu/color.h"
 #include "bu/getopt.h"
 #include "bu/exit.h"

Modified: brlcad/branches/STABLE/src/fb/fbgrid.c
===================================================================
--- brlcad/branches/STABLE/src/fb/fbgrid.c      2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/fbgrid.c      2020-07-24 22:45:37 UTC (rev 
76474)
@@ -26,6 +26,8 @@
 
 #include <stdlib.h>
 
+#include "bio.h"
+
 #include "bu/color.h"
 #include "bu/getopt.h"
 #include "bu/exit.h"

Modified: brlcad/branches/STABLE/src/fb/fbpoint.c
===================================================================
--- brlcad/branches/STABLE/src/fb/fbpoint.c     2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/fbpoint.c     2020-07-24 22:45:37 UTC (rev 
76474)
@@ -29,6 +29,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "bio.h"
+
 #include "bu/color.h"
 #include "bu/str.h"
 #include "bu/exit.h"

Modified: brlcad/branches/STABLE/src/fb/fbstretch.c
===================================================================
--- brlcad/branches/STABLE/src/fb/fbstretch.c   2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/fbstretch.c   2020-07-24 22:45:37 UTC (rev 
76474)
@@ -77,6 +77,8 @@
 #include <string.h>
 #include <stdarg.h>
 
+#include "bio.h"
+
 #include "bu/color.h"
 #include "bu/getopt.h"
 #include "bu/getopt.h"

Modified: brlcad/branches/STABLE/src/fb/fbzoom.c
===================================================================
--- brlcad/branches/STABLE/src/fb/fbzoom.c      2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/fbzoom.c      2020-07-24 22:45:37 UTC (rev 
76474)
@@ -29,6 +29,8 @@
 
 #include <stdlib.h>
 
+#include "bio.h"
+
 #include "bu/getopt.h"
 #include "bu/log.h"
 #include "vmath.h"

Modified: brlcad/branches/STABLE/src/fb/gif-fb.c
===================================================================
--- brlcad/branches/STABLE/src/fb/gif-fb.c      2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/gif-fb.c      2020-07-24 22:45:37 UTC (rev 
76474)
@@ -72,6 +72,8 @@
 #include <stdarg.h>
 #include <limits.h>
 
+#include "bio.h"
+
 #include "bu/color.h"
 #include "bu/getopt.h"
 #include "bu/malloc.h"

Modified: brlcad/branches/STABLE/src/fb/gif2fb.c
===================================================================
--- brlcad/branches/STABLE/src/fb/gif2fb.c      2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/gif2fb.c      2020-07-24 22:45:37 UTC (rev 
76474)
@@ -42,6 +42,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "bio.h"
+
 #include "bu/getopt.h"
 #include "bu/exit.h"
 #include "vmath.h"

Modified: brlcad/branches/STABLE/src/fb/pix-fb.c
===================================================================
--- brlcad/branches/STABLE/src/fb/pix-fb.c      2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/pix-fb.c      2020-07-24 22:45:37 UTC (rev 
76474)
@@ -37,6 +37,8 @@
 #  include <winsock.h>
 #endif
 
+#include "bio.h"
+
 #include "bu/getopt.h"
 #include "bu/malloc.h"
 #include "bu/file.h"
@@ -191,7 +193,7 @@
     int n, tries;
 
     if (fileinput) {
-       (void)lseek(fd, num, 1);
+       (void)bu_lseek(fd, num, 1);
        return 0;
     }
 

Modified: brlcad/branches/STABLE/src/fb/plot3-fb.c
===================================================================
--- brlcad/branches/STABLE/src/fb/plot3-fb.c    2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/plot3-fb.c    2020-07-24 22:45:37 UTC (rev 
76474)
@@ -77,6 +77,8 @@
 #include <string.h>
 #include <ctype.h>
 
+#include "bio.h"
+
 #include "bu/color.h"
 #include "bu/cv.h"
 #include "bu/getopt.h"

Modified: brlcad/branches/STABLE/src/fb/png-fb.c
===================================================================
--- brlcad/branches/STABLE/src/fb/png-fb.c      2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/png-fb.c      2020-07-24 22:45:37 UTC (rev 
76474)
@@ -27,8 +27,11 @@
 #include "common.h"
 
 #include <stdlib.h>
-#include <png.h>
 
+#include "bio.h"
+
+#include "png.h"
+
 #include "bu/getopt.h"
 #include "bu/log.h"
 #include "bu/malloc.h"

Modified: brlcad/branches/STABLE/src/fb/spm-fb.c
===================================================================
--- brlcad/branches/STABLE/src/fb/spm-fb.c      2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/fb/spm-fb.c      2020-07-24 22:45:37 UTC (rev 
76474)
@@ -27,6 +27,8 @@
 #include <stdlib.h>
 #include <math.h>
 
+#include "bio.h"
+
 #include "bu/exit.h"
 #include "bu/getopt.h"
 #include "fb.h"

Modified: brlcad/branches/STABLE/src/gtools/ganalyze.cpp
===================================================================
--- brlcad/branches/STABLE/src/gtools/ganalyze.cpp      2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/gtools/ganalyze.cpp      2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -31,6 +31,8 @@
 #include <signal.h>
 #include <math.h>
 
+#include "bio.h"
+
 #include "bu/log.h"
 #include "bu/vls.h"
 #include "raytrace.h"

Modified: brlcad/branches/STABLE/src/halftone/main.c
===================================================================
--- brlcad/branches/STABLE/src/halftone/main.c  2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/halftone/main.c  2020-07-24 22:45:37 UTC (rev 
76474)
@@ -68,6 +68,8 @@
 #include <ctype.h>
 #include <math.h>
 
+#include "bio.h"
+
 #include "bu/getopt.h"
 #include "vmath.h"
 #include "raytrace.h"

Index: brlcad/branches/STABLE/src/libbu
===================================================================
--- brlcad/branches/STABLE/src/libbu    2020-07-24 22:02:40 UTC (rev 76473)
+++ brlcad/branches/STABLE/src/libbu    2020-07-24 22:45:37 UTC (rev 76474)

Property changes on: brlcad/branches/STABLE/src/libbu
___________________________________________________________________
Modified: svn:mergeinfo
## -1,2 +1,3 ##
-/brlcad/branches/RELEASE/src/libbu:72828-75050,75562-75757
-/brlcad/trunk/src/libbu:72525-74373,74376-74976,75000,75063
\ No newline at end of property
+/brlcad/branches/RELEASE/src/libbu:72828-75050,75562-76473
+/brlcad/branches/bioh/src/libbu:75720-75728
+/brlcad/trunk/src/libbu:72525-74373,74376-74976,75000,75063,75729
\ No newline at end of property
Modified: brlcad/branches/STABLE/src/libbu/file.c
===================================================================
--- brlcad/branches/STABLE/src/libbu/file.c     2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/libbu/file.c     2020-07-24 22:45:37 UTC (rev 
76474)
@@ -490,6 +490,49 @@
     return 1;
 }
 
+int
+bu_fseek(FILE *stream, b_off_t offset, int origin)
+{
+    int ret;
+
+#if defined(HAVE__FSEEKI64) && defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8^M
+    ret = _fseeki64(stream, offset, origin);
+#else
+    ret = fseek(stream, offset, origin);
+#endif
+
+    return ret;
+}
+
+b_off_t
+bu_lseek(int fd, b_off_t offset, int whence)
+{
+    b_off_t ret;
+
+#if defined(HAVE__LSEEKI64) && defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
+    ret = _lseeki64(fd, offset, whence);
+#else
+    ret = lseek(fd, offset, whence);
+#endif
+
+    return ret;
+}
+
+b_off_t
+bu_ftell(FILE *stream)
+{
+    b_off_t ret;
+
+#if defined(HAVE__FTELLI64) && defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
+    /* windows 64bit */
+    ret = _ftelli64(stream);
+#else
+    ret = ftell(stream);
+#endif
+
+    return ret;
+}
+
 /*
  * Local Variables:
  * mode: C

Modified: brlcad/branches/STABLE/src/libbu/vfont.c
===================================================================
--- brlcad/branches/STABLE/src/libbu/vfont.c    2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/libbu/vfont.c    2020-07-24 22:45:37 UTC (rev 
76474)
@@ -99,7 +99,7 @@
     /* Addresses of characters in the file are relative to point in
      * the file after the directory, so grab the current position.
      */
-    font.offset = ftell(font.ffdes);
+    font.offset = bu_ftell(font.ffdes);
 
     return font;
 }

Modified: brlcad/branches/STABLE/src/libfb/fb_generic.c
===================================================================
--- brlcad/branches/STABLE/src/libfb/fb_generic.c       2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/libfb/fb_generic.c       2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -43,6 +43,7 @@
 #include "bio.h"
 
 #include "bu/color.h"
+#include "bu/file.h"
 #include "bu/malloc.h"
 #include "bu/str.h"
 #include "bu/log.h"
@@ -675,7 +676,7 @@
     int n, tries;
 
     if (fileinput) {
-       (void)lseek(fd, num, 1);
+       (void)bu_lseek(fd, num, 1);
        return 0;
     }
 

Modified: brlcad/branches/STABLE/src/libfb/fbserv_obj.c
===================================================================
--- brlcad/branches/STABLE/src/libfb/fbserv_obj.c       2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/libfb/fbserv_obj.c       2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -34,6 +34,7 @@
 #include <string.h>
 #include <ctype.h>
 #include <tcl.h>
+#include "bio.h"
 #include "bnetwork.h"
 
 #include "raytrace.h"

Modified: brlcad/branches/STABLE/src/libfb/if_X24.c
===================================================================
--- brlcad/branches/STABLE/src/libfb/if_X24.c   2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/libfb/if_X24.c   2020-07-24 22:45:37 UTC (rev 
76474)
@@ -70,6 +70,8 @@
 
 #include <ctype.h>
 
+#include "bio.h"
+
 #include "bu/color.h"
 #include "bu/file.h"
 #include "bu/malloc.h"
@@ -2009,11 +2011,11 @@
                fd = open(BS_NAME, O_RDWR | O_CREAT | O_BINARY, 0666);
                if (fd < 0)
                    fb_log("X24_getmem: can't create fb file, using private 
memory instead, errno %d\n", errno);
-               else if (lseek(fd, (b_off_t)size, SEEK_SET) < 0)
+               else if (bu_lseek(fd, (b_off_t)size, SEEK_SET) < 0)
                    fb_log("X24_getmem: can't seek fb file, using private 
memory instead, errno %d\n", errno);
                else if (write(fd, &isnew, 1) < 0)
                    fb_log("X24_getmem: can't zero fb file, using private 
memory instead, errno %d\n", errno);
-               else if (lseek(fd, 0, SEEK_SET) < 0)
+               else if (bu_lseek(fd, 0, SEEK_SET) < 0)
                    fb_log("X24_getmem: can't seek fb file, using private 
memory instead, errno %d\n", errno);
                else if ((mem = (char *)mmap(NULL, size, PROT_READ | 
PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED)
                    fb_log("X24_getmem: can't mmap fb file, using private 
memory instead, errno %d\n", errno);

Modified: brlcad/branches/STABLE/src/libfb/if_disk.c
===================================================================
--- brlcad/branches/STABLE/src/libfb/if_disk.c  2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/libfb/if_disk.c  2020-07-24 22:45:37 UTC (rev 
76474)
@@ -26,6 +26,8 @@
 
 #include "common.h"
 
+#include "bio.h"
+
 #include "bu/color.h"
 #include "bu/file.h"
 #include "bu/log.h"
@@ -74,7 +76,7 @@
        && (ifp->if_fd = open(file, O_RDONLY | O_BINARY, 0)) == -1) {
        if ((ifp->if_fd = open(file, O_RDWR | O_CREAT | O_BINARY, 0664)) > 0) {
            /* New file, write byte at end */
-           if (lseek(ifp->if_fd, (height*width*sizeof(RGBpixel)-1), 0) == -1) {
+           if (bu_lseek(ifp->if_fd, (height*width*sizeof(RGBpixel)-1), 0) == 
-1) {
                fb_log("disk_device_open : can not seek to end of new file.\n");
                return -1;
            }
@@ -90,7 +92,7 @@
 
     ifp->if_width = width;
     ifp->if_height = height;
-    if (lseek(ifp->if_fd, 0, 0) == -1) {
+    if (bu_lseek(ifp->if_fd, 0, 0) == -1) {
        fb_log("disk_device_open : can not seek to beginning.\n");
        return -1;
     }
@@ -174,7 +176,7 @@
 
     /* Set start of framebuffer */
     fd = ifp->if_fd;
-    if (ifp->if_seekpos != 0 && lseek(fd, 0, 0) == -1) {
+    if (ifp->if_seekpos != 0 && bu_lseek(fd, 0, 0) == -1) {
        fb_log("disk_color_clear : seek failed.\n");
        return -1;
     }
@@ -219,7 +221,7 @@
     if (fd == 1) fd = 0;
 
     dest = ((y * ifp->if_width) + x) * sizeof(RGBpixel);
-    if (ifp->if_seekpos != dest && lseek(fd, dest, 0) == -1) {
+    if (ifp->if_seekpos != dest && bu_lseek(fd, dest, 0) == -1) {
        fb_log("disk_buffer_read : seek to %ld failed.\n", dest);
        return -1;
     }
@@ -262,7 +264,7 @@
 
     dest = (y * ifp->if_width + x) * sizeof(RGBpixel);
     if (dest != ifp->if_seekpos) {
-       if (lseek(ifp->if_fd, (b_off_t)dest, 0) == -1) {
+       if (bu_lseek(ifp->if_fd, (b_off_t)dest, 0) == -1) {
            fb_log("disk_buffer_write : seek to %zd failed.\n", dest);
            return -1;
        }
@@ -293,7 +295,7 @@
     if (fd == 1) fd = 0;
 
     if (ifp->if_seekpos != FILE_CMAP_SIZE &&
-       lseek(fd, (b_off_t)FILE_CMAP_SIZE, 0) == -1) {
+       bu_lseek(fd, (b_off_t)FILE_CMAP_SIZE, 0) == -1) {
        fb_log("disk_colormap_read : seek to %zd failed.\n", FILE_CMAP_SIZE);
        return -1;
     }
@@ -316,7 +318,7 @@
        return 0;
     if (fb_is_linear_cmap(cmap))
        return 0;
-    if (lseek(ifp->if_fd, (b_off_t)FILE_CMAP_SIZE, 0) == -1) {
+    if (bu_lseek(ifp->if_fd, (b_off_t)FILE_CMAP_SIZE, 0) == -1) {
        fb_log("disk_colormap_write : seek to %zd failed.\n", FILE_CMAP_SIZE);
        return -1;
     }

Modified: brlcad/branches/STABLE/src/libfb/if_tk.c
===================================================================
--- brlcad/branches/STABLE/src/libfb/if_tk.c    2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/libfb/if_tk.c    2020-07-24 22:45:37 UTC (rev 
76474)
@@ -35,6 +35,7 @@
 #include <string.h>
 #include <tcl.h>
 #include <tk.h>
+#include "bio.h"
 #include "bnetwork.h"
 
 #include "bu/color.h"

Modified: brlcad/branches/STABLE/src/libgcv/plugins/fastgen4/fastgen4_read.c
===================================================================
--- brlcad/branches/STABLE/src/libgcv/plugins/fastgen4/fastgen4_read.c  
2020-07-24 22:02:40 UTC (rev 76473)
+++ brlcad/branches/STABLE/src/libgcv/plugins/fastgen4/fastgen4_read.c  
2020-07-24 22:45:37 UTC (rev 76474)
@@ -2161,7 +2161,7 @@
     b_off_t section_start;
 
     /* skip to start of next section */
-    section_start = ftell(pstate->fpin);
+    section_start = bu_ftell(pstate->fpin);
     if (section_start < 0) {
        bu_bomb("Error: couldn't get input file's current file position.");
     }
@@ -2172,7 +2172,7 @@
               bu_strncmp(pstate->line, "WALL", 4) &&
               bu_strncmp(pstate->line, "vehicle", 7))
        {
-           section_start = ftell(pstate->fpin);
+           section_start = bu_ftell(pstate->fpin);
            if (section_start < 0) {
                bu_bomb("Error: couldn't get input file's current file 
position.");
            }
@@ -2181,7 +2181,7 @@
        }
     }
     /* seek to start of the section */
-    fseek(pstate->fpin, section_start, SEEK_SET);
+    bu_fseek(pstate->fpin, section_start, SEEK_SET);
 }
 
 

Modified: brlcad/branches/STABLE/src/libgcv/plugins/rhino/rhino_read.cpp
===================================================================
--- brlcad/branches/STABLE/src/libgcv/plugins/rhino/rhino_read.cpp      
2020-07-24 22:02:40 UTC (rev 76473)
+++ brlcad/branches/STABLE/src/libgcv/plugins/rhino/rhino_read.cpp      
2020-07-24 22:45:37 UTC (rev 76474)
@@ -297,7 +297,7 @@
           ONX_Model &model, std::string &root_name)
 {
     if (!model.Read(path.c_str()))
-       throw InvalidRhinoModelError("ONX_Model::Read() failed");
+       throw InvalidRhinoModelError("ONX_Model::Read() failed.\n\nNote:  if 
this file was saved from Rhino3D, make sure it was saved using\nRhino's v5 
format or lower - newer versions of the 3dm format are not\ncurrently supported 
by BRL-CAD.");
 
     std::size_t num_problems;
     std::size_t num_repairs = replace_invalid_uuids(model);

Modified: brlcad/branches/STABLE/src/libgcv/plugins/stl/stl_write.c
===================================================================
--- brlcad/branches/STABLE/src/libgcv/plugins/stl/stl_write.c   2020-07-24 
22:02:40 UTC (rev 76473)
+++ brlcad/branches/STABLE/src/libgcv/plugins/stl/stl_write.c   2020-07-24 
22:45:37 UTC (rev 76474)
@@ -298,7 +298,7 @@
            unsigned char tot_buffer[4];
 
            /* Re-position pointer to 80th byte */
-           lseek(pstate->bfd, 80, SEEK_SET);
+           bu_lseek(pstate->bfd, 80, SEEK_SET);
 
            /* Write out number of triangles */
            *(uint32_t *)tot_buffer = htonl((unsigned long)region_polys);
@@ -441,7 +441,7 @@
            unsigned char tot_buffer[4];
 
            /* Re-position pointer to 80th byte */
-           lseek(state.bfd, 80, SEEK_SET);
+           bu_lseek(state.bfd, 80, SEEK_SET);
 
            /* Write out number of triangles */
            *(uint32_t *)tot_buffer = htonl((unsigned long)state.tot_polygons);

Modified: brlcad/branches/STABLE/src/libged/CMakeLists.txt
===================================================================
--- brlcad/branches/STABLE/src/libged/CMakeLists.txt    2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/libged/CMakeLists.txt    2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -147,6 +147,7 @@
   eye.c
   eye_pos.c
   facedef.c
+  facetize_log.c
   facetize.cpp
   fb2pix.c
   fbclear.c

Modified: brlcad/branches/STABLE/src/libged/bot_dump.c
===================================================================
--- brlcad/branches/STABLE/src/libged/bot_dump.c        2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/libged/bot_dump.c        2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -30,6 +30,7 @@
 #include <sys/stat.h>
 #include <string.h>
 #include <ctype.h>
+#include "bio.h"
 #include "bnetwork.h"
 
 #include "bu/cv.h"
@@ -644,7 +645,7 @@
            stl_write_bot_binary(bot, fd, dp->d_namep);
 
            /* Re-position pointer to 80th byte */
-           lseek(fd, 80, SEEK_SET);
+           bu_lseek(fd, 80, SEEK_SET);
 
            /* Write out number of triangles */
            *(uint32_t *)tot_buffer = htonl((unsigned long)total_faces);
@@ -1036,7 +1037,7 @@
            unsigned char tot_buffer[4];
 
            /* Re-position pointer to 80th byte */
-           lseek(fd, 80, SEEK_SET);
+           bu_lseek(fd, 80, SEEK_SET);
 
            /* Write out number of triangles */
            *(uint32_t *)tot_buffer = htonl((unsigned long)total_faces);
@@ -1516,7 +1517,7 @@
            unsigned char tot_buffer[4];
 
            /* Re-position pointer to 80th byte */
-           lseek(fd, 80, SEEK_SET);
+           bu_lseek(fd, 80, SEEK_SET);
 
            /* Write out number of triangles */
            *(uint32_t *)tot_buffer = htonl((unsigned long)total_faces);

Modified: brlcad/branches/STABLE/src/libged/editit.c
===================================================================
--- brlcad/branches/STABLE/src/libged/editit.c  2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/libged/editit.c  2020-07-24 22:45:37 UTC (rev 
76474)
@@ -32,6 +32,7 @@
 #  include <sys/types.h>
 #endif
 
+#include "bio.h"
 #include "bresource.h"
 
 #include "bu/app.h"

Modified: brlcad/branches/STABLE/src/libged/facetize.cpp
===================================================================
--- brlcad/branches/STABLE/src/libged/facetize.cpp      2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/libged/facetize.cpp      2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -150,55 +150,6 @@
     return ret;
 }
 
-struct _ged_facetize_opts {
-
-    int quiet;
-    int verbosity;
-    int regions;
-    int resume;
-    int retry;
-    int in_place;
-    fastf_t feature_size;
-    fastf_t feature_scale;
-    fastf_t d_feature_size;
-    int max_time;
-    struct bg_tess_tol *tol;
-    struct bu_vls *faceted_suffix;
-
-    /* NMG specific options */
-    int triangulate;
-    int make_nmg;
-    int nmgbool;
-    int screened_poisson;
-    int continuation;
-    int method_flags;
-    int nmg_use_tnurbs;
-
-    /* Poisson specific options */
-    int max_pnts;
-    struct bg_3d_spsr_opts s_opts;
-
-    /* Brep specific options */
-    double nonovlp_threshold;
-
-    /* internal */
-    struct bu_attribute_value_set *c_map;
-    struct bu_attribute_value_set *s_map;
-    struct bu_hook_list *saved_bomb_hooks;
-    struct bu_hook_list *saved_log_hooks;
-    struct bu_vls *nmg_log;
-    struct bu_vls *nmg_log_header;
-    int nmg_log_print_header;
-    int stderr_stashed;
-    int serr;
-    int fnull;
-
-    struct bu_vls *froot;
-    struct bu_vls *nmg_comb;
-    struct bu_vls *continuation_comb;
-    struct bu_vls *spsr_comb;
-};
-
 struct _ged_facetize_opts * _ged_facetize_opts_create()
 {
     struct bg_3d_spsr_opts s_opts = BG_3D_SPSR_OPTS_DEFAULT;
@@ -358,87 +309,7 @@
     }
 }
 
-
-static int
-_ged_facetize_bomb_hook(void *cdata, void *str)
-{
-    struct _ged_facetize_opts *o = (struct _ged_facetize_opts *)cdata;
-    if (o->nmg_log_print_header) {
-       bu_vls_printf(o->nmg_log, "%s\n", bu_vls_addr(o->nmg_log_header));
-       o->nmg_log_print_header = 0;
-    }
-    bu_vls_printf(o->nmg_log, "%s\n", (const char *)str);
-    return 0;
-}
-
-static int
-_ged_facetize_nmg_logging_hook(void *data, void *str)
-{
-    struct _ged_facetize_opts *o = (struct _ged_facetize_opts *)data;
-    if (o->nmg_log_print_header) {
-       bu_vls_printf(o->nmg_log, "%s\n", bu_vls_addr(o->nmg_log_header));
-       o->nmg_log_print_header = 0;
-    }
-    bu_vls_printf(o->nmg_log, "%s\n", (const char *)str);
-    return 0;
-}
-
 static void
-_ged_facetize_log_nmg(struct _ged_facetize_opts *o)
-{
-    if (fileno(stderr) < 0)
-       return;
-
-    /* Seriously, bu_bomb, we don't want you blathering
-     * to stderr... shut down stderr temporarily, assuming
-     * we can find /dev/null or something similar */
-    o->fnull = open("/dev/null", O_WRONLY);
-    if (o->fnull == -1) {
-       /* https://gcc.gnu.org/ml/gcc-patches/2005-05/msg01793.html */
-       o->fnull = open("nul", O_WRONLY);
-    }
-    if (o->fnull != -1) {
-       o->serr = fileno(stderr);
-       o->stderr_stashed = dup(o->serr);
-       dup2(o->fnull, o->serr);
-       close(o->fnull);
-    }
-
-    /* Set bu_log logging to capture in nmg_log, rather than the
-     * application defaults */
-    bu_log_hook_delete_all();
-    bu_log_add_hook(_ged_facetize_nmg_logging_hook, (void *)o);
-
-    /* Also engage the nmg bomb hooks */
-    bu_bomb_delete_all_hooks();
-    bu_bomb_add_hook(_ged_facetize_bomb_hook, (void *)o);
-}
-
-
-static void
-_ged_facetize_log_default(struct _ged_facetize_opts *o)
-{
-    if (fileno(stderr) < 0)
-       return;
-
-    /* Put stderr back */
-    if (o->fnull != -1) {
-       fflush(stderr);
-       dup2(o->stderr_stashed, o->serr);
-       close(o->stderr_stashed);
-       o->fnull = -1;
-    }
-
-    /* Restore bu_bomb hooks to the application defaults */
-    bu_bomb_delete_all_hooks();
-    bu_bomb_restore_hooks(o->saved_bomb_hooks);
-
-    /* Restore bu_log hooks to the application defaults */
-    bu_log_hook_delete_all();
-    bu_log_hook_restore_all(o->saved_log_hooks);
-}
-
-static void
 _ged_facetize_mkname(struct ged *gedp, struct _ged_facetize_opts *opts, const 
char *n, int type)
 {
     struct bu_vls incr_template = BU_VLS_INIT_ZERO;
@@ -3102,12 +2973,12 @@
 }
 
 
-/*
- * Local Variables:
- * tab-width: 8
- * mode: C
- * indent-tabs-mode: t
- * c-file-style: "stroustrup"
- * End:
- * ex: shiftwidth=4 tabstop=8
- */
+
+// Local Variables:
+// tab-width: 8
+// mode: C++
+// c-basic-offset: 4
+// indent-tabs-mode: t
+// c-file-style: "stroustrup"
+// End:
+// ex: shiftwidth=4 tabstop=8

Copied: brlcad/branches/STABLE/src/libged/facetize_log.c (from rev 76473, 
brlcad/branches/RELEASE/src/libged/facetize_log.c)
===================================================================
--- brlcad/branches/STABLE/src/libged/facetize_log.c                            
(rev 0)
+++ brlcad/branches/STABLE/src/libged/facetize_log.c    2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -0,0 +1,123 @@
+/*                F A C E T I Z E _ L O G . C
+ * BRL-CAD
+ *
+ * Copyright (c) 2008-2020 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file libged/facetize_log.c
+ *
+ * logging mechanisms for the facetize command.
+ *
+ */
+
+#include "common.h"
+
+#include <string.h>
+
+#include "bio.h"
+
+#include "bu/hook.h"
+#include "bu/vls.h"
+#include "./ged_private.h"
+
+static int
+_ged_facetize_bomb_hook(void *cdata, void *str)
+{
+    struct _ged_facetize_opts *o = (struct _ged_facetize_opts *)cdata;
+    if (o->nmg_log_print_header) {
+       bu_vls_printf(o->nmg_log, "%s\n", bu_vls_addr(o->nmg_log_header));
+       o->nmg_log_print_header = 0;
+    }
+    bu_vls_printf(o->nmg_log, "%s\n", (const char *)str);
+    return 0;
+}
+
+static int
+_ged_facetize_nmg_logging_hook(void *data, void *str)
+{
+    struct _ged_facetize_opts *o = (struct _ged_facetize_opts *)data;
+    if (o->nmg_log_print_header) {
+       bu_vls_printf(o->nmg_log, "%s\n", bu_vls_addr(o->nmg_log_header));
+       o->nmg_log_print_header = 0;
+    }
+    bu_vls_printf(o->nmg_log, "%s\n", (const char *)str);
+    return 0;
+}
+
+void
+_ged_facetize_log_nmg(struct _ged_facetize_opts *o)
+{
+    if (fileno(stderr) < 0)
+       return;
+
+    /* Seriously, bu_bomb, we don't want you blathering
+     * to stderr... shut down stderr temporarily, assuming
+     * we can find /dev/null or something similar */
+    o->fnull = open("/dev/null", O_WRONLY);
+    if (o->fnull == -1) {
+       /* https://gcc.gnu.org/ml/gcc-patches/2005-05/msg01793.html */
+       o->fnull = open("nul", O_WRONLY);
+    }
+    if (o->fnull != -1) {
+       o->serr = fileno(stderr);
+       o->stderr_stashed = dup(o->serr);
+       dup2(o->fnull, o->serr);
+       close(o->fnull);
+    }
+
+    /* Set bu_log logging to capture in nmg_log, rather than the
+     * application defaults */
+    bu_log_hook_delete_all();
+    bu_log_add_hook(_ged_facetize_nmg_logging_hook, (void *)o);
+
+    /* Also engage the nmg bomb hooks */
+    bu_bomb_delete_all_hooks();
+    bu_bomb_add_hook(_ged_facetize_bomb_hook, (void *)o);
+}
+
+
+void
+_ged_facetize_log_default(struct _ged_facetize_opts *o)
+{
+    if (fileno(stderr) < 0)
+       return;
+
+    /* Put stderr back */
+    if (o->fnull != -1) {
+       fflush(stderr);
+       dup2(o->stderr_stashed, o->serr);
+       close(o->stderr_stashed);
+       o->fnull = -1;
+    }
+
+    /* Restore bu_bomb hooks to the application defaults */
+    bu_bomb_delete_all_hooks();
+    bu_bomb_restore_hooks(o->saved_bomb_hooks);
+
+    /* Restore bu_log hooks to the application defaults */
+    bu_log_hook_delete_all();
+    bu_log_hook_restore_all(o->saved_log_hooks);
+}
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */

Modified: brlcad/branches/STABLE/src/libged/fb2pix.c
===================================================================
--- brlcad/branches/STABLE/src/libged/fb2pix.c  2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/libged/fb2pix.c  2020-07-24 22:45:37 UTC (rev 
76474)
@@ -29,6 +29,8 @@
 #include <stdlib.h>
 #include <sys/stat.h>
 
+#include "bio.h"
+
 #include "bu/app.h"
 #include "bu/getopt.h"
 #include "fb.h"

Modified: brlcad/branches/STABLE/src/libged/ged_private.h
===================================================================
--- brlcad/branches/STABLE/src/libged/ged_private.h     2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/libged/ged_private.h     2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -30,7 +30,10 @@
 
 #include <time.h>
 
+#include "bu/avs.h"
 #include "bu/opt.h"
+#include "bg/spsr.h"
+#include "bg/trimesh.h"
 #include "rt/db4.h"
 #include "raytrace.h"
 #include "rt/geom.h"
@@ -612,6 +615,63 @@
 extern void
 _ged_delete_io_handler(void *interp, void *chan, struct bu_process *p, int fd, 
void *data, io_handler_callback_t callback);
 
+
+
+/* Ideally all of this could be in facetize.cpp, but the open() calls
+ * used by the logging routines are problematic in C++ with Visual C++. */
+struct _ged_facetize_opts {
+    int quiet;
+    int verbosity;
+    int regions;
+    int resume;
+    int retry;
+    int in_place;
+    fastf_t feature_size;
+    fastf_t feature_scale;
+    fastf_t d_feature_size;
+    int max_time;
+    struct bg_tess_tol *tol;
+    struct bu_vls *faceted_suffix;
+
+    /* NMG specific options */
+    int triangulate;
+    int make_nmg;
+    int nmgbool;
+    int screened_poisson;
+    int continuation;
+    int method_flags;
+    int nmg_use_tnurbs;
+
+    /* Poisson specific options */
+    int max_pnts;
+    struct bg_3d_spsr_opts s_opts;
+
+    /* Brep specific options */
+    double nonovlp_threshold;
+
+    /* internal */
+    struct bu_attribute_value_set *c_map;
+    struct bu_attribute_value_set *s_map;
+    struct bu_hook_list *saved_bomb_hooks;
+    struct bu_hook_list *saved_log_hooks;
+    struct bu_vls *nmg_log;
+    struct bu_vls *nmg_log_header;
+    int nmg_log_print_header;
+    int stderr_stashed;
+    int serr;
+    int fnull;
+
+    struct bu_vls *froot;
+    struct bu_vls *nmg_comb;
+    struct bu_vls *continuation_comb;
+    struct bu_vls *spsr_comb;
+};
+
+void
+_ged_facetize_log_nmg(struct _ged_facetize_opts *o);
+void
+_ged_facetize_log_default(struct _ged_facetize_opts *o);
+
 __END_DECLS
 
 #endif /* LIBGED_GED_PRIVATE_H */

Modified: brlcad/branches/STABLE/src/libged/ged_util.c
===================================================================
--- brlcad/branches/STABLE/src/libged/ged_util.c        2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/libged/ged_util.c        2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -31,6 +31,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "bio.h"
+
 #include "bu/app.h"
 #include "bu/path.h"
 #include "bu/sort.h"

Modified: brlcad/branches/STABLE/src/libged/pix2fb.c
===================================================================
--- brlcad/branches/STABLE/src/libged/pix2fb.c  2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/libged/pix2fb.c  2020-07-24 22:45:37 UTC (rev 
76474)
@@ -37,6 +37,8 @@
 #  include <winsock.h>
 #endif
 
+#include "bio.h"
+
 #include "bu/getopt.h"
 #include "bu/snooze.h"
 #include "fb.h"

Modified: brlcad/branches/STABLE/src/libged/tables.c
===================================================================
--- brlcad/branches/STABLE/src/libged/tables.c  2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/libged/tables.c  2020-07-24 22:45:37 UTC (rev 
76474)
@@ -35,6 +35,8 @@
 #include <ctype.h>
 #include <string.h>
 
+#include "bio.h"
+
 #include "bu/sort.h"
 #include "bu/units.h"
 #include "./ged_private.h"
@@ -111,7 +113,7 @@
     MAT_COPY(idbuf1.i_mat, matrix);
 
     for (i = 0; i < (ssize_t)*numsol; i++) {
-       (void)lseek(rd_idfd, i*sizeof(identt), 0);
+       (void)bu_lseek(rd_idfd, i*sizeof(identt), 0);
        readval = read(rd_idfd, &idbuf2, sizeof identt);
 
        if (readval < 0) {
@@ -128,7 +130,7 @@
     (*numsol)++;
     idbuf1.i_index = *numsol;
 
-    (void)lseek(idfd, 0, 2);
+    (void)bu_lseek(idfd, 0, 2);
     i = write(idfd, &idbuf1, sizeof identt);
     if (i < 0)
        perror("write");

Modified: brlcad/branches/STABLE/src/libged/typein.c
===================================================================
--- brlcad/branches/STABLE/src/libged/typein.c  2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/libged/typein.c  2020-07-24 22:45:37 UTC (rev 
76474)
@@ -3023,6 +3023,7 @@
     intern->idb_ptr = datums;
     intern->idb_meth = &OBJ[ID_DATUM];
     intern->idb_type = ID_DATUM;
+    intern->idb_major_type = DB5_MAJORTYPE_BRLCAD;
 
     /* Set a default color for datum objects */
     bu_avs_add(&intern->idb_avs, "color", "255/255/0");

Modified: brlcad/branches/STABLE/src/libicv/rot.c
===================================================================
--- brlcad/branches/STABLE/src/libicv/rot.c     2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/libicv/rot.c     2020-07-24 22:45:37 UTC (rev 
76474)
@@ -326,7 +326,7 @@
 
     /*
      * Clear our "file pointer."  We need to maintain this
-     * In order to tell if seeking is required.  ftell() always
+     * In order to tell if seeking is required.  bu_ftell() always
      * fails on pipes, so we can't use it.
      */
     outplace = 0;
@@ -353,7 +353,7 @@
                xout = (nyin - 1) - lasty;
                outbyte = ((yout * nyin) + xout) * pixbytes;
                if (outplace != outbyte) {
-                   if (fseek(ofp, outbyte, SEEK_SET) < 0) {
+                   if (bu_fseek(ofp, outbyte, SEEK_SET) < 0) {
                        ret = 3;
                        perror("fseek");
                        bu_log("ERROR: %s can't seek on output (ofp=%p, 
outbyte=%jd)\n", argv[0], (void *)ofp, (intmax_t)outbyte);
@@ -383,7 +383,7 @@
                xout = yin;
                outbyte = ((yout * nyin) + xout) * pixbytes;
                if (outplace != outbyte) {
-                   if (fseek(ofp, outbyte, SEEK_SET) < 0) {
+                   if (bu_fseek(ofp, outbyte, SEEK_SET) < 0) {
                        ret = 3;
                        perror("fseek");
                        bu_log("ERROR: %s can't seek on output (ofp=%p, 
outbyte=%jd)\n", argv[0], (void *)ofp, (intmax_t)outbyte);
@@ -405,7 +405,7 @@
                yout = (nyin - 1) - y + 1;
                outbyte = yout * scanbytes;
                if (outplace != outbyte) {
-                   if (fseek(ofp, outbyte, SEEK_SET) < 0) {
+                   if (bu_fseek(ofp, outbyte, SEEK_SET) < 0) {
                        ret = 3;
                        perror("fseek");
                        bu_log("ERROR: %s can't seek on output (ofp=%p, 
outbyte=%jd)\n", argv[0], (void *)ofp, (intmax_t)outbyte);

Modified: brlcad/branches/STABLE/src/librt/cache.c
===================================================================
--- brlcad/branches/STABLE/src/librt/cache.c    2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/librt/cache.c    2020-07-24 22:45:37 UTC (rev 
76474)
@@ -37,6 +37,7 @@
 #endif
 #include <lz4.h>
 
+#include "bio.h"
 #include "bnetwork.h"
 
 /* implementation headers */

Modified: brlcad/branches/STABLE/src/librt/db5_scan.c
===================================================================
--- brlcad/branches/STABLE/src/librt/db5_scan.c 2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/librt/db5_scan.c 2020-07-24 22:45:37 UTC (rev 
76474)
@@ -85,7 +85,7 @@
            goto fatal;
        }
        for (;;) {
-           addr = ftell(dbip->dbi_fp);
+           addr = bu_ftell(dbip->dbi_fp);
            if ((got = db5_get_raw_internal_fp(&raw, dbip->dbi_fp)) < 0) {
                if (got == -1) break;           /* EOF */
                goto fatal;
@@ -97,7 +97,7 @@
                raw.buf = NULL;
            }
        }
-       dbip->dbi_eof = ftell(dbip->dbi_fp);
+       dbip->dbi_eof = bu_ftell(dbip->dbi_fp);
        rewind(dbip->dbi_fp);
     }
 

Modified: brlcad/branches/STABLE/src/librt/db_corrupt.c
===================================================================
--- brlcad/branches/STABLE/src/librt/db_corrupt.c       2020-07-24 22:02:40 UTC 
(rev 76473)
+++ brlcad/branches/STABLE/src/librt/db_corrupt.c       2020-07-24 22:45:37 UTC 
(rev 76474)
@@ -54,7 +54,7 @@
     RT_CK_DBI(dbip);
 
     /* get into position */
-    ret = fseek(dbip->dbi_fp, offset, 0);
+    ret = bu_fseek(dbip->dbi_fp, offset, 0);
     if (ret) {
        bu_log("Database seek failure, unable to seek [%s]\n", name);
        return 0;

Modified: brlcad/branches/STABLE/src/librt/db_io.c
===================================================================
--- brlcad/branches/STABLE/src/librt/db_io.c    2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/librt/db_io.c    2020-07-24 22:45:37 UTC (rev 
76474)
@@ -80,7 +80,7 @@
     }
     bu_semaphore_acquire(BU_SEM_SYSCALL);
 
-    ret = fseek(dbip->dbi_fp, offset, 0);
+    ret = bu_fseek(dbip->dbi_fp, offset, 0);
     if (ret)
        bu_bomb("db_read: fseek error\n");
     got = (size_t)fread(addr, 1, count, dbip->dbi_fp);
@@ -198,7 +198,7 @@
     bu_semaphore_acquire(BU_SEM_SYSCALL);
     bu_interrupt_suspend();
 
-    (void)fseek(dbip->dbi_fp, offset, 0);
+    (void)bu_fseek(dbip->dbi_fp, offset, 0);
     got = fwrite(addr, 1, count, dbip->dbi_fp);
     fflush(dbip->dbi_fp);
 

Modified: brlcad/branches/STABLE/src/librt/db_scan.c
===================================================================
--- brlcad/branches/STABLE/src/librt/db_scan.c  2020-07-24 22:02:40 UTC (rev 
76473)
+++ brlcad/branches/STABLE/src/librt/db_scan.c  2020-07-24 22:45:37 UTC (rev 
76474)
@@ -99,7 +99,7 @@
        return -1;
     }
     rewind(dbip->dbi_fp);
-    next = ftell(dbip->dbi_fp);
+    next = bu_ftell(dbip->dbi_fp);
     if (next < 0) {
        perror("ftell");
        next = 0;
@@ -111,8 +111,8 @@
     totrec = 0;
     while (1) {
        nrec = 0;
-       if (fseek(dbip->dbi_fp, next, 0) != 0) {
-           bu_log("db_scan:  fseek(offset=%jd) failure\n", (intmax_t)next);
+       if (bu_fseek(dbip->dbi_fp, next, 0) != 0) {
+           bu_log("db_scan:  bu_fseek(offset=%jd) failure\n", (intmax_t)next);
            return -1;
        }
        addr = next;
@@ -120,7 +120,7 @@
        if (fread((char *)&record, sizeof record, 1, dbip->dbi_fp) != 1
            || feof(dbip->dbi_fp))
            break;
-       next = ftell(dbip->dbi_fp);
+       next = bu_ftell(dbip->dbi_fp);
        if (next < 0) {
            perror("db_scan:  ftell:  ");
            return -1;
@@ -146,18 +146,18 @@
                break;
            case ID_ARS_A:
                while (1) {
-                   here = ftell(dbip->dbi_fp);
+                   here = bu_ftell(dbip->dbi_fp);
                    if (fread((char *)&rec2, sizeof(rec2),
                              1, dbip->dbi_fp) != 1)
                        break;
                    RT_DEBUG_PR(here, rec2);
                    if (rec2.u_id != ID_ARS_B) {
-                       fseek(dbip->dbi_fp, here, 0);
+                       bu_fseek(dbip->dbi_fp, here, 0);
                        break;
                    }
                    nrec++;
                }
-               next = ftell(dbip->dbi_fp);
+               next = bu_ftell(dbip->dbi_fp);
                handler(dbip, record.a.a_name, addr, nrec, RT_DIR_SOLID, 
client_data);
                break;
            case ID_ARS_B:
@@ -171,7 +171,7 @@
                    if (fread((char *)&rec2, sizeof(rec2), 1, dbip->dbi_fp) != 
1)
                        break;
                }
-               next = ftell(dbip->dbi_fp);
+               next = bu_ftell(dbip->dbi_fp);
                handler(dbip, record.ss.ss_name, addr, nrec, RT_DIR_SOLID, 
client_data);
                break;
            case ID_MATERIAL:
@@ -192,17 +192,17 @@
                break;
            case ID_P_HEAD:
                while (1) {
-                   here = ftell(dbip->dbi_fp);
+                   here = bu_ftell(dbip->dbi_fp);
                    if (fread((char *)&rec2, sizeof(rec2), 1, dbip->dbi_fp) != 
1)
                        break;
                    RT_DEBUG_PR(here, rec2);
                    if (rec2.u_id != ID_P_DATA) {
-                       fseek(dbip->dbi_fp, here, 0);
+                       bu_fseek(dbip->dbi_fp, here, 0);
                        break;
                    }
                    nrec++;
                }
-               next = ftell(dbip->dbi_fp);
+               next = bu_ftell(dbip->dbi_fp);
                handler(dbip, record.p.p_name, addr, nrec, RT_DIR_SOLID, 
client_data);
                break;
            case ID_P_DATA:
@@ -211,12 +211,12 @@
            case ID_BSOLID:
                while (1) {
                    /* Find and skip subsequent BSURFs */
-                   here = ftell(dbip->dbi_fp);
+                   here = bu_ftell(dbip->dbi_fp);
                    if (fread((char *)&rec2, sizeof(rec2), 1, dbip->dbi_fp) != 
1)
                        break;
                    RT_DEBUG_PR(here, rec2);
                    if (rec2.u_id != ID_BSURF) {
-                       fseek(dbip->dbi_fp, here, 0);
+                       bu_fseek(dbip->dbi_fp, here, 0);
                        break;
                    }
 
@@ -227,7 +227,7 @@

@@ 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

Reply via email to