Skip to content

Commit

Permalink
latest from NITRO and coda-oss (#652)
Browse files Browse the repository at this point in the history
* copy_externals.csh

* copy_externals.csh

* copy_externals.csh

* Squashed 'externals/coda-oss/' changes from 67d6362bc..cbfb20ce2

cbfb20ce2 update release notes for C++11/master release (#658)
4bdaf10d9 Change xml lite function to virtual (#645)
6be8f0a2e move debug -g flags to be turned on only if debugging (#644)
e1b0fa349 commit (but not build) HDF5 source code (#634)
1ac97fe48 add HDF5 source code (not built) (#612)
fde6c864f Merge pull request #607 from mdaus/bugfix/change-order-of-config-header-install
c8a004401 Install the cmake-configured header after installing the xercesc source tree. Otherwise, the original config will persist in the install
dda2c9acd Merge pull request #606 from mdaus/fix-xerces-config
004a00f09 Bump zlib version for conan builds
207f4dbb9 Fix Xerces config issue and install its config.h
b84241767 Add support for debug optimizations.
0f6cda57d Use enhanced debug information with gcc/gdb.
5047dce1a Work around GCC avx support bug.
001ab1875 Rebuild the waf self-extractor with a fix for the FIPS error.
5a7f64fca Revert "Rebuild the waf self-extractor with a fix for the FIPS problem."
9f6f775f8 Rebuild the waf self-extractor with a fix for the FIPS problem.
963e8ff40 Revert "add HDF5 source code (#603)"
ec7bb2e52 add HDF5 source code (#603)
6f41c09d7 Release 2022-08-30 (#596)
f91668012 Added handler accessor to MinidomParser for inheriting modules (#594)
72d29e9c2 get unittests working when "nested" in other projects (#595)
f8f18fea5 Actually look at unit test results when using waf (#593)
cda679cee more overloads to take a string length (#592)
b95a32bc4 by default, Uri()s aren't validated (#591)
173930a6f fix a UTF-8 conversion bug (#590)
c5c221a83 CODA code inherits from xml.lite classes :-( (#589)
a4c6294c3 use EncodedStringView instead of _bstr_t (#588)
83c982f0c remove work-arounds to write non-UTF-8 XML (#586)
ebf6db176 <bit> is part of C++20
d3aa8aa5c std::u8string is in C++20, not C++17
03654933c changes to math.linear from coda (#587)
5a2f8e52f release 2022-08-02 (#585)
e5516aba2 tweak names to match utf8:: conventions (#584)
3083ec791 move most platform-specific code to EncodedStringView (#583)
36371410c EncodedString tweaks for XML processing (#582)
cf2016205 remove any vestiges of Expat and libXML (#580)
33538aa0f update for newer Intel compiler
ed65e4ccc Add two patch candidates to fix FIPS problems in waf.
a731ebf8e release 2022-06-29 (#579)
59387bd87 update "ReleaseNotes.md" for recent changes (#578)
e4f940854 remove "boost" and "serialize" (#577)
80b70537e update to zlib-1.2.12 (#576)
202084bac Remove some compiler warnings (#575)
c61232224 build most code with Visual Studio (#574)
6e4d952be some unit-tests need argc/argv (#573)
36e051d7b Add run1D method to GenerationThreadPool (#572)
0a08b8e4e build "coda-oss-lite" as a VS2022 project (#571)
6677cc38e simplify creation of encodes string (#570)
ba62c610c Add the 'universal_newlines=True' flag to python Popen calls.
984e4a96c Fix a bug in waf platform detection.
d2aca8d4b release 2022-05-03 (#569)
ff55fed59 can't replace all TEST_ASSERT macros with functions (#568)
89a636a6a fix copy/assignment in EncodedString (#567)
c3fe91d42 latest tweaks to build with C++17 (#566)
a59a51b57 be sure we use a 64-bit time_t (#565)
1f79fb3dd Poly2D::atY() bugfix (#564)
ac5307662 Testing to see if windows-2019 works with github actions (#563)
8d0726b37 Fix a bug in waf platform detection.
c662b5aac Update ReleaseNotes.md
ef4a3bbd9 Release 2022-02-22 (aka 2/22/22) (#562)
0a0e6cf14 use char16_t on Linux (#560)
fe65bfddf fix units for ICC, sys::filesystem (#559)
def979170 update to GSL 4.0.0 (#558)
fe365e5a4 fix XML validation for UTF-8 (#557)
502e5829b support conversion to std::wstring (#556)
e69422596 Delete codeql-analysis.yml
45bc6a964 Create codeql-analysis.yml
87d9a7ef5 remove CodeQL
eab5ecb89 Update build_unittest.yml
8ab12d47e Delete codeql-analysis.yml
9e542092b try running CodeQL as part of build-linux-cmake
de0c50651 Create codeql-analysis.yml
049608782 tweaks to build in "coda" (#554)
0ba24233b replace sys::U8string with coda_oss::u8string (#553)
bcee6551f add EncodedString class (#552)
c2eecd392 simplify implementation of EncodedStringView (#551)
c1320ef00 fix 'typename' for other compilers (#550)
ac3b93931 tweaks to make "main" build easier (#549)
78da741cf remove sys/Optional.h (#548)
f31730ac7 put our std work-arounds in one place (#547)
9b7bb571a Add an EncodedStringView class (#545)
c0e1da520 another batch of tweaks to cleanup compiler warnings, etc. (#546)
0f3bfd9d0 added missing "virtual", support unique_ptr (#544)
ca32f99c0 Add option to specify curl installation location. (#501)
2df9c1a81 allow std::filesystem::path to be used for validation (#543)
289143576 add SinCos for units::Angle (#542)
e430eddef Delete log4j as 1) it's old, 2) coda-oss doesn't use it, and 3) remove any questions about security vulnerability (#541)
bb11134fd xml.lite tweaks (#540)
955b33e21 Release 2021_12_13 (#539)
d73d74d5c xml.lite tweaks (#537)
3a90e25c6 use more C++11 functionality (#538)
9ca2a0e50 remove more compiler warnings (#536)
0ec9da1e9 be sure == and != are in-sync (#535)
9084be32c fix size_t compiler warnings (#534)
abd6469ec fix ICC errors (#533)
09cb36fff update version number before cutting a new release (#532)
c29e4d298 fix ICC warnings/errors from high-side (#531)
91f8f1c08 simplify our std:: implementations (#530)
7c633c7bb Further reduce use of std::auto_ptr (#529)
d85883749 Provide support for creating simple version numbers (#528)
b03582592 Merge pull request #527 from mdaus/fix-crypt-h-clash
ffed3d633 Disable encryption support in minizip build and remove crypt.h header
ee2b2bf8c Merge pull request #525 from mdaus/swig-fix
3c02ff289 Fix config-python prefix issue
6149053d4 Add new config-python module for SWIG compatibility workarounds
30acf5b9a mt::transform_async(), mem::SharedPtr, math::SinCos() (#526)
21efd6a6c Implement better workaround for lack of SWIG support for "final"
60837a62e Revert unneeded changes
0bc994dea Fix SWIG path issue for waf build
070f4e915 Update SWIG generated files
f8472b0c4 Fix SWIG path issues and warnings
e10707f75 Set minimum SWIG version to 4.0.1
b8cdba5c7 Fix waf SWIG build issue
2bd0ee39e Enable SWIG in Github waf build
f2b001146 Try fixing SWIG compile issue again
afafabcc2 Fix SWIG compile issue on Linux due to missing macro
7c8d4a81d Add SWIG to the CI flow
4023d721c Regenerate SWIG bindings
1d8c70109 Add some compile definitions needed by SWIG for CMake build
e5cc58545 Remove some functions which return unique_ptr from SWIG bindings (incompatible).
965a2913d Remove "final" specifier from structs bound in SWIG (incompatible)
f1bec5601 Merge branch 'master' of https://github.com/mdaus/coda-oss
c01c4d7de do in-line initialization (#524)
fb7230ea1 Update CMakeLists.txt
5dfb05689 tweaks for C++17 (#523)
1a7d3ab52 Merge pull request #515 from mdaus/security-and-conan-updates
d13885df6 make it easier to create a new Element with the right encoding (#522)
3fb09e73a Merge pull request #359 from mdaus/parseArgUpdate
0d546a8f1 Tweak some ArgumentParser tests for the ignoreUnknownArguments option
14bd1f26d Merge remote-tracking branch 'origin/master' into parseArgUpdate
cf398c0d3 tweak code for C++11/C++17 (#521)
2d0322b07 reduce use of std::auto_ptr (#520)
853320e90 reduce use of deprecated C++98 code (#519)
4752ba222 Replace some warning pragmas with macros
32685554f Merge remote-tracking branch 'origin/master' into security-and-conan-updates
f0350c0cf Merge pull request #518 from mdaus/bugfix/python3.9-related
fc01df0d8 fix typos in gcc macros
9d356f36c fix gcc impl
8124da763 remove unreachable code
d034b3a84 clobber warnings from numpy innards
9941a401e macros to disable warnings around system headers
8a725bb8f Merge pull request #516 from mdaus/mbraswell-enablecpp17-windows
2e7b8165a Fixed pragma stuff on gcc
9775bb02d Fixed pragma stuff on gcc
680d3cce4 Merge branch 'master' of https://github.com/mdaus/coda-oss
8ffd6ed79 forgot to add "units" to CMakeFiles.txt
06835676e Remove Auto_ptr flag and make disable warnings cross_platform compatible
d62efece5 Merge branch 'master' of https://github.com/mdaus/coda-oss into mbraswell-enablecpp17-windows
d04042ee9 Merge pull request #517 from mdaus/develop/compiler-warning-helpers
cf5cd16b3 Fix macro usage on gcc
a88bbcd20 Macros to narrowly target disabling warnings
c0d5cdf00 Formatting Changes
be019b44b Formatting Changes
2eb04dc9e Fixed compiler warnings and added option to compile cpp17 with waf on windows
5d9f27fae Refactor coda-oss conan recipe
ce6645714 Disable warning for MSVC2017 and earlier
ecfefbfbe Merge remote-tracking branch 'origin/master' into security-and-conan-updates
8b1479881 Merge pull request #514 from mdaus/develop/fix-unused-symbol-errors
1d9a4ec71 Add conan option to use std::regex instead of pcre
6dd5d4457 add required include
4c0ae7781 add required include
1873ceeb8 parameterize build (somewhat)
c9ef567a7 fix Release compile error
e6b47e94e fix compiler error
eff205ba2 helper macro to fix unusual targets
342098a32 Fix CMake build for modules without include files
5625706eb Enable cpp17 option for windows builds
98e12b138 Use consistent line endings for *.in template files
d01fea0b7 Configure coda_add_module to install more file extension types
30823f673 Delete stray file
ac7760ba2 Load dependency targets when loading coda-oss for conan build
14781cab8 Implement conan build for openjpeg and pcre2 dependencies
9d955efa5 Exclude unsupported XML backend wrappers from CMake build to remove warnings
1e8c9b264 Merge remote-tracking branch 'origin/master' into security-and-conan-updates
772d80495 Implement conan build for libjpeg dependency
98b653dea Implement conan build for xerces-c dependency
11323e8e9 Implement conan build for zlib dependency
d0e6bf2c4 Improve conan test_package
a03e1294e Fix uninitialized member variable warning in mt::AbstractTiedThreadPool
c7bb47b5f Remove member variable duplicated in derived class io::ToggleOutputStream
0838ac2ca Use consistent line endings for conan recipes and CMake files.
2768e5f07 Update libjpeg to v9d
d75f55bca Update zlib to 1.2.11
ca2f84cff Fix warning in GSL for MSVC 2015 and earlier
1babd19b5 Fix warning in thread tests for MSVC
2f1763249 Fix warning in except module for Visual Studio 2015 and earlier
a485bf6bb Fix BIGENDIAN redefinition warning
59543e42b Disable warning in dbi for MSVC 2017 and earlier
b4b212834 Fix warnings in numpyutils for MSVC 2017 and earlier
2b179b658 Fix integer overflow issue
898151ad7 Hook up simple "units" (#513)
4d6beeecc Merge pull request #511 from mdaus/develop/horizontal-improved-numerical-precision
c1878b228 Fix for numerical precision issues surrounding horizontal lines
7d1442c66 Merge pull request #510 from mbraswell/fix-testnumelements-build
58fc85f09 Whitespace change to trigger workflow
ab74026b9 Fix wscript to successfully build test_num_elements
323283cd7 Merge pull request #509 from mbraswell/develop-mbraswell-cpp17
16a550289 Added option to enable cpp17
b0625cf5a tweak debug stuff (#508)
845549487 fix RowCol casting (#507)
01fbb5f00 Get std::u8string working right with C++20 (#506)
df9413efa more "noexcept" for fewer code-analysis diagnostics (#505)
e6219f97f reduce compiler warnings/code-analysis diagnostics (#504)
4c9ea0ef1 tweaks for VS2019 16.10 (#503)
0d8ea070a reduce compiler warnings (#502)
625b8b59d reduce compiler warnings (#500)
3795758da get rid of more compiler warnings/code-analysis diagnostics (#499)
427f91be8 reduce compiler-warnings and code-analysis diagnostics (#498)
c82dd9e37 cleanup compiler and code-analysis diagnistics (#496)
b5105b54a reduce compiler warnings (#495)
e0099cc26 Develop/compiler optimizations (#494)
0eeb3f963 tweaks to python wrappers made in "nitro" (#492)
5f91f7060 fix printf() format string (#491)
55b855a86 Delete codeql-analysis.yml
603c192d3 Update codeql-analysis.yml
f306979e8 Update codeql-analysis.yml
4a1f78f8e Create codeql-analysis.yml
3c80a6568 add back coda_oss::filesystem::path (#490)
eaea659ed tweak how std:: features are exposed (#489)
0492f0d95 simplify code exposing std:: routines (#488)
e5f3d7770 remove code-analysis diagnostics (#485)
5be599e5a make HOME and USERPROFILE the same (#484)
62b22ae01 cleanup more compiler warnings (#483)
c32ec7dcc add unit-tests for env-var editing (#482)
311aea462 allow an environment-variable to be "edited" during expansion (#481)
bbcab1310 static_assert is C++11, don't use it when checking for C++11 (#480)
068562f58 fix glitches in expandEnviromentVariables() (#479)
30ed1d95e produce a new Path::expandEnviromentVariables() function (#478)
074a873b2 remove compiler warnings (#477)
e29f65479 latest C++17 tweaks (#476)
c4e681b0a tweak code when wchar_t is a built-in type (#474)
8449ac29a wchar_t might not be a built-in type on old systems (#473)
a62bdb3e6 add operator= to sys::Optional (#472)
8e310a776 use compiler-provided macros to determine features (#470)
88405c8ed "constexpr" can be hard to get right with older compilers; don't even try (#471)
b195ab3ef need at least VS2017 to use the real GSL (#469)
2978f9114 tweaks to build with older compilers (#468)
7235b898d The (old) version of SWIG we're using doesn't like certain C++11 features. (#464)
cccde7f12 only look in the Win1252->UTF-8 map as a last resort (#467)
3db09742c get rid of more compiler warnings (#465)
5e0d2e845 get rid of "char8_t" compiler warning (#463)
d710bc688 make getValue() easier to use (#462)
f5a928476 make getElement*() be consistent for both 0 and >1 (#461)
88be6dba3 consistently add C++14/17/20 library features (#459)
59c3a7e2e use coda_oss:: as a drop-in replacement for std:: (#458)
35de4524c use sys::Filesystem::path rather than std::string (#457)
cace66600 make sys::Filesystem::path better conform to std::filesystem::path (#456)
f395edc89 remove ambiguous overloads w/C++17 (#455)
eac4371f1 use newly added sys::Optional<> to manage "encoding" (#454)
243ef5e50 don't derive from std::iterator (#453)
a48b01141 Arguments should be "const&" to prevent C4866 (#452)
878bff901 provide std::span (#451)
81727c485 remove newly added a new pure virtual as that's a breaking change (#450)
93cf0f03e main -> master (#449)
5af37a736 be sure code compiles with C++17 (#448)
82b5aecfb build with C++17 (#407)
6ffb888d7 reduce compiler warnings (#439)
9137dda7d GSL (Guideline Support Library) from https://github.com/Microsoft/GSL (#423)
bc5552cd2 update to xerces-c-3.2.3 (#409)
6fe09e1db update to openjpeg-2.3.1 (#417)
6405c0ce5 reduce differences in #407 (#438)
2987bbf8d tweak how std::filesystem is enabled (#437)
8fd3c2f20 tweak how std::endian is enabled (#436)
138372c88 more straight-forward reduction of std::auto_ptr (#435)
f13c7cec8 straight-forward reduction of std::auto_ptr (#434)
d243b08e1 add mem::auto_ptr for transition to C++17 (#432)
54ed52158 allow clients to specify custom toType and toString (#431)
7f90aab25 remove trailing underscore from macro (#429)
999e49068 with C++11, several sys typedefs are the same on both Windows & *nix (#427)
6f075b1be add sys::Byte (#426)
92221bd0d allow except::Throwable to derive from std::exception (#421)
a8f52d0ad reduce compiler warnings (#424)
63ea20af6 #including <bit> w/C++17 generates warnings (#408)
10ef06031 reduce compiler warnings (#405)
cf233fdcf forgot Conf.cpp changes for sys::Endian (#403)
cc53b1853 fix several compiler warnings/code-analysis diagnostics (#404)
1db3751a3 implmeent sys::Endian from C++20 (#402)
f042cd6bb support std::filesystem if desired (#400)
4895a9f2d WIN32 is old, but existing code might still use it; _WIN32 is better (#398)
e2a62f8ec make it easier to use xml.lite (#396)
1059b7da1 allow for explicit use of a UTF-8 string (#395)
27de8b8a4 Optionally record how std::string is encoded when manipulating XML (#378)
e0018cea7 implement some <filesystem>-like routines until we can use C++17 (#388)
cafb2365b Merge pull request #363 from mdaus/feature/fix-compiler-warnings
6a78bec20 use the existing sys::ubyte rather than making our own pre-C++17 std::byte
14c9fc4ca fix a couple of G++ compiler warnings via static_cast<>
e596a6007 std::numeric_limits<T>::epsilon() can be "constexpr"
78b0f6bb2 another try at removing the compiler warning from tiff::split()
8e1de21e1 fixed typo; added a few nots about why we're not using strncpy()
fed3ba8cd retore previous tiff::split() code as the change got rid of the compiler warning but wasn't portable
98a589616 get rid of g++ strncpy() warning
798f84711 don't use memset(0) with C++ objects
7f697d078 casting result of system() to void doesn't get rid of compiler warning
d55a849c5 remove new g++ compiler warnings in WSL
d0aaa2988 Merge pull request #361 from mdaus/feature/fix-compiler-warnings
cc62e866b fix compiler warnings
d45c1f9a0 Updates based on peer review comments which include changing ostream to pointer, adding a couple of more tests, and updating all auto_ptr to unique_ptr in unit test.
fb12ba126 Update ArgumentParser to use a stream as an argument if the ignore unknown argument flag is set to true.
536d2b0ca Added ability to ignore unknown arguments in the ArgumentParser.
27288f49b Merge pull request #358 from mdaus/conan-options
fd5e1eecb Expose additional CMake options in conan recipe
c97216179 Remove unneeded CMake function

git-subtree-dir: externals/coda-oss
git-subtree-split: cbfb20ce2e64635131ed17790d93bd54b78754d6

* Squashed 'externals/nitro/' changes from 496bfba71..342f55276

342f55276 NITRO 2.10.13 (#542)
f0cc26bdd latest from coda-oss (#540)
b39ccc4c0 Fix conan build issues (#516)
103dd73ee latest from coda-oss (#508)
f71128d6f Adding tarfile member sanitization to extractall() (#505)
61dafd407 NITRO-2.10.12 (#496)
06993176d run unittests in SIX (#495)
f0d801e95 coda-oss release 2022-08-30 (#494)
8477e4729 Build jpeg decompression as a plugin. (#487)
59978233a latest from coda-oss (#493)
53bbc6679 latest from coda-oss (#492)
77a1114eb NITRO 2.10.11 (#491)
b5fb2d2a9 another round of removing compiler warnings (#489)
2342edbef coda-oss 2022-08-02 (#490)
7e1fe6a68 NITRO-2.10.10 (#486)
263a98cfc coda-oss 2022-06-29 (#485)
a3bb3a032 nitf::byte is too much trouble right now (#484)
8d28243d2 update CodeQL to @v2 (#483)
7091d36a6 Update coda-oss (#482)
f40179473 return std::optional<> from "enum" utilities (#480)
3972dba9e update coda-oss (#479)
3e38c39a0 latest from coda-oss (#477)
f27a3894e Do not add convenience test targets if given the libs_only flag.
ed0d1899b NITRO-2.10.9 (#476)
f4eacccaf coda-oss release 2022-05-03 (#475)
758ac88e1 latest from feature/j2k branch (#474)
b8a3f5076 tweaks to allow NITRO modules to be built as DLLs (#473)
af745281c latest from feature/j2k branch (#471)
a7da2fc74 build more C code as C++ (#469)
5dbd0d9cd latest from coda-oss (#468)
3e9387973 add lossy compression options (#464)
da6969ae0 latest from coda-oss (#465)
bd8ce8116 build most C with C++ (in Visual Studio ONLY) for better error-checking (#466)
dfeb3fe44 remove docs directory (#463)
2d52cf3f6 remove archive directory (#462)
5b11fe82c copy j2k code from coda (#460)
f02c70645 merge develop/update_coda-oss
8907b9fc3 latest from coda-oss (#461)
1124c00f9 switch VS unit-test projects to VS-test (#459)
c6e7a6e40 Merge branch 'master' of github.com:mdaus/nitro
ed828aaf6 fix CodeQL diagnostic
762b2a2ce NITRO version 2.10.8 (#456)
466534fd8 begin work in C++ wrappers for 'j2k' C API.
3b72561d2 update to coda-oss release 2022-02-22 (#455)
3f70bc3c3 latest from coda-oss (#454)
8a8ea90b0 build with older C++ compilers, compile C as C++ (#453)
9690f9076 update coda-oss (#451)
1d307d9aa latest from coda-oss (#449)
c71dc6d85 latest from coda-oss (#448)
db9f1d2a5 account for missing std::is_trivially_copyable<>  (#446)
7581fe17d latest from coda-oss (#445)
d991a0494 infrastructure to support "reflection" over C structs (#444)
edaf47f81 show how to use strongly-type TRE fields (#440)
8af36f6ed latest from coda-oss (#441)
fe89ce317 Re-add show_nitf++ app (#439)
9ea44741d nitro 2.10.7 (#436)
458055cfc coda-oss release 2021-12-13 (#435)
d4ad4b8a5 allow NITF_PLUGIN_PATH warning to be turned off (#434)
7c96994a9 allow NITF_PLUGIN_PATH warning to be turned off (#432)
1b22d00a6 latest from coda-oss (#431)
489f10d70 tweaks from develop/jdsmith (#426)
9461c626c latest from coda-oss (#425)
2e8d7cfae tweaks for new compiler on Windows (#424)
e868e3747 build with VS2022 (#423)
65b4df02d Build with Visual Studio 2022 (#422)
64dc4e118 -j 2 to prevent G++ crash
64ec3748c try -j 2 for faster build
c4e122edf include all of coda-oss (#421)
888ae9293 update version numbers before cutting a new release (#420)
28d95160e Tweaks from SIX's 8AMPI_PHSI branch (#418)
a0dd912a9 latest from coda-oss (#419)
dfba5e291 fix CodeQL failure (#417)
3c7653c3e make building as a DLL easier (#416)
e17d918d4 read in 8-bit sample files using NITRO (#415)
b78673982 use strongly-typed enums rather than overload strings (#414)
30fc68feb latest from coda-oss (#413)
a4a1fc4f8 add a NITF version number (#412)
eef3c6ec8 update coda-oss (#411)
f5f1f8ce1 "nitro" changes from SIX (#410)
1a19b6b60 latest from coda-oss (#409)
0db498f1e make the TRE API more robust (#406)
404a857ca Bugfix/engrda (#405)
1c73a5284 latest from coda-oss (#404)
9388d5cf2 latest from coda-oss (#402)
9578bcf83 Handle amp-phase data (#403)
81278527b remove compiler warnings that were clobbered by a previous merge (#401)
3ebffd877 update coda-oss (#400)
c8186387f tweak C++ API (#399)
dc000a516 latest from coda-oss (#398)
7af555d63 latest from coda-oss (#396)
cb37a8cff remove compiler warnings (#395)
1b6cfe099 latest from coda-oss (#388)
2229fbde0 forgot to add "units" to CMakeFiles.txt
e1a1bcefa latest from coda-oss (#387)
835da56f5 Bugfix/nitropy import error (#381)
508ee3e75 Fix invalid const cast error (#380)
7bb82996c update coda-oss (#378)
98e6bcf5d remove more code-analysis diagnostics (#377)
c3dc82205 update coda-oss (#376)
ffd5aa858 Revert "do a Debug build on Windows"
5d84be10c do a Debug build on Windows
e6cfbfab8 make parts of the C++ API a bit more python-like (#375)
75caf49ec remove compiler warnings/code-analysis diagnostics (#374)
a6cec9dfe update coda-oss (#373)
f4b80a31d reduce compiler warnings (#371)
4ddaf23d8 remove compiler warnings (#370)
2a57741c2 update coda-oss (#369)
d3fab714a update coda-oss (#368)
8806960a8 tweak to force rebuild of "master" on github
9aee934ea remove compiler warnings (#367)
7be6c13b1 set an "invalid" string result for invalid inputs (#366)
d4f244ee8 remove more compiler warnings/code-analysis diagnostics (#364)
d01179540 latest from coda-oss (#363)
a16f72b0c make it easier to build nitf-c++ as a shared library (#362)
35c5f4ade reduce compiler and code-analysis warnings (#361)
273c39e86 latest from coda-oss  (#360)
298536f40 remove unused coda-oss modules to fix? broken build (#351)
edb9317db Update README.md
152b1d66a Java and MATLAB bindings are no longer built.
2748224ba unittests work from clean build in VS2019 (#347)
296750e1d Delete codacy-analysis.yml
2121cda37 Delete checkmarx-analysis.yml
393b6cd55 Create codacy-analysis.yml
a01fa4d6f Create checkmarx-analysis.yml
effd34006 fix more CodeQL diagnostics (#346)
a2b3a12d9 Fixed bug in python interface, and enabled a few features in the c library to be accessible from python (#342)
1e171cdfc remove code-analysis diagnostics (#345)
c68cd17dd latest from coda-oss (#344)
bb0634924 update coda-oss (#343)
fa20f42ee use new coda-oss header for easier access to "std::" (#341)
c80e163ee Build w/older compilers; remove some code-analysis diagnostics (#340)
dfad79efc Delete ossar-analysis.yml
007ced759 archive matlab and java (#293)
0e201d8b0 Create ossar-analysis.yml
c4eae8e4c Create codeql-analysis.yml
ea1946b4a Delete codeql-analysis.yml
e40a0b3f6 add ENABLE_ASAN to turn on address sanitizer (#336)
2d9a968f2 fixed a bug where an uninitialized pointer caused a crash (#335)
7c5dbed7f `nullptr_t` should be `std::nullptr_t`
612a55889 remove version number from externals/coda-oss (#333)
c14639765 nitro doesn't need "re" module (#332)
14517c04f put a version on externals/coda-oss (#331)
8705bbb63 C iterator routines can be "const" (#330)
62ec49119 update coda-oss (#326)
b7f04aecb fix broken unit-test; implement missing overload (#325)
f810f8f6e Fix length calculation for moveTRE and unmergeTREs (#324)
ad0f83a6f Null init Image writers (#323)
e77ddad8f CMake: Build c libraries, in Windows, as DLLs (#321)
7a8dcf296 update coda-oss (#322)
f0a45b36d latest from coda-oss (#320)
d277cb432 revert c99 changes (#319)
1b6ae6adb hide template<template> from C++11 (#318)
ee89c7d34 Bug fixes, new TREs, and cython interface (#314)
f925204cb revert c99 changes (#317)
1615ce17b update coda-oss (#316)
0fbebcbdc update coda-oss (#313)
280141628 fix errors/warnings from code-diagnostic tools (#312)
f419dc538 Update .gitignore for CMakeSettings.json
2d73f0ee1 latest from coda-oss (#311)
0d6988eb1 latest from coda-oss (#310)
29a88056b get coda-oss #includes via coda-oss.hpp to augment "std" (#309)
5be4b7e63 "noexcept" is a breaking change ... be more careful with it. (#307)
92b19f9c5 remove nitf::byte (#306)
c1ef1e933 bring over non-breaking changes from "main" (#303)
1d91f312e latest from coda-oss (#300)
e6448b1dd tweaks so that six builds with nitro updates (#299)
d27779eb7 std::byte -> nitf::byte until we can use C++17 everywhere (#298)
413fadf3a Update .gitignore
5c6a2ef68 update coda-oss (#297)
8bb4d248c build with Visual Studio 2019 (#295)
698841c86 get unittest changes from main (#294)
9a29ce5f9 latest from coda-oss:master (#291)
67d325690 reduce compiler warnings and the like from C code (#292)
5c8c30b1c build new TREs w/CMake (#246)
4efc97eaf Add four TREs defined in MIL-PRF-89034. (#192)
e13921039 tre: add MATESA support (#244)
7e9b93f71 Create codeql-analysis.yml
eaafd58a1 java: update to supported version (#241)
59afdc92e Fix bug with myResidual calculation (#204)
050fcbc96 Fix assorted compiler warnings (#232)
cad5c02f9 update "documentation" (#231)
0fb160719 Revert "merge "main" into "master" (#224)"
0faaa0165 merge "main" into "master" (#224)
5579e74e8 update "master" with several changes from "develop" (#219)
ed0063048 coda-oss doesn't build "macos" so we don't either (#218)
033220f92 latest coda-oss from master-C++17 (#212)
7caacb941 copy some documentation from the old website; work-in-progress (#211)
0f0d05404 Feature/remove compiler warnings (#210)
9a609577c Feature/use standard c types (#209)
c83348fd3 ignore more build artifacts
3bb1ef02e Merge pull request #205 from mdaus/bugfix/Security-vulnerability-in-nitro
9757b5af5 fix a bunch of code-analysis warnings about using NULL pointers (mostly …
6b72b7c37 fix a bunch of code-analysis warnings about using NULL pointers (mostly benign as pointer won't actually be NULL)
22716b796 be sure local variables are initialized for all code paths
c0b7b38b9 no .vcxproj in this branch
40d66294a fix some build warnings
362b5492e build with VS2019 CMake support

git-subtree-dir: externals/nitro
git-subtree-split: 342f552768e249e86df702062ff3f60ea1ec813a

* copy_externals.csh

* latest from coda-oss and NITRO

* Squashed 'externals/coda-oss/' changes from e87c32b4d..857ff0af3

857ff0af3 HighFive utility routines (#661)
35c19e7e8 change actions to @V3 (#660)
cde6147ce tweak HighFive wrappers (#659)

git-subtree-dir: externals/coda-oss
git-subtree-split: 857ff0af32ebe20a6f1d7059f1f12edf904a2ec0

* Squashed 'externals/nitro/' changes from c8ecbe9ae..90d513ac5

90d513ac5 latest from coda-oss (#543)

git-subtree-dir: externals/nitro
git-subtree-split: 90d513ac5c6edc5bc0be8ac8abec2c1f071b077d

* latest from coda-oss and NITRO

* latest from coda-oss

* Squashed 'externals/coda-oss/' changes from 857ff0af3..f6489b6be

f6489b6be Merge branch 'main' into feature/xml.lite_tweaks
836c426a2 use function-pointers so that isConsoleOutput is only checked once
56e3c45b1 move depthPrint() functionality into non-member function in preparation for future changes
ddcd26d97 Merge branch 'main' into feature/xml.lite_tweaks
69cc0e506 use the more rigorous create_and_check_datatype()
9efb87558 Merge branch 'main' into feature/hdf5
4d2f2f417 more HighFive unittests (#662)
14191a844 HighFive::create_datatype() goes from C++ to HighFive
98583473f utility routines to read string attributes
1fa75ce81 use the C API to read a string attribute
71e7b69f5 still can't figure out how to read a string attribute :-(
e96f37a69 test reading the file attributes
a25244519 getAttribute() unittest
8f12a3000 getDataType() unittest
1d687db57 writeDataSet() utility overload
106aa6894 sigh ... H5Easy::dump() fill fails on Windows/WAF :-(
2641b60b2 Merge branch 'main' into feature/hdf5
212bbd3a3 works on local machine, but not build server ... ?
7125118b0 dump of 1D vector doesn't work :-(
c704db435 sigh ... WAF build still failing :-(
01aae4616 does dump() of a 1D vector work?
76a53c813 comment-out H5 writing :-(
0f0e19aff test_highfive_dump()
cb8f73795 trying to get highfive_dump() unittest working w/Windows-WAF
6584a264a does test_highfive_create() work?
316566854 Revert "trying HighFive "write" unittests again"
a9ec24ca4 trying HighFive "write" unittests again
585ad49a5 tweak names of utility routines
4c91a4d97 make it easier to read a std::vector and std::vecotr<std::vector>
0217ffa26 readDataSet() now works for 1D data
95e8973f2 trying to get hdf5::lite::load() working
4d294611d "const" correctness
5e6305c3f fix load_complex()
4a134dc5f start work on utility routines to read complex data from HDF5
9d76a7f41 Merge branch 'main' into feature/hdf5
8f9667a24 whitepsace
ebd3fc99e Merge branch 'main' into feature/hdf5
40091b069 comment-out writing tests for now ... need to figure our WAF bulid failure
935aa3459 be sure the dataset has real data
114b9bf33 update release notes
bd9c0b26c tweak HighFive utility routines
acda1ef57 turn off diagnostics around expected failures
22a748840 readDataSet() utility routine for HighFive
bd88a8c25 HighFive writeDataSet() utility to work with our SpanRC
6142f5b33 use HighFive routines to write a HDF5 file
5bbf1abaf Use HiveFive routines to get info about the file
84fbc8378 duplicate unittests with H5Easy
f1f054c03 Merge branch 'main' into feature/hdf5
9b63ca470 fix directory names
f6f826689 fix directory names
7aeb82c33 Merge branch 'main' into feature/hdf5
d028baaeb hook up HighFive header-only library (#653)
3083b0a31 Revert "HighFive 2.6.2"
246985a7f Revert ""build" HighFive HDF5 library"
a8b75a586 Revert "turn off HighFive Boost support"
ec68d5f83 Revert "Add HighFive unittests"
f1f85b9e7 Revert "get test_high_five_base more-or-less compiling"
5ea634ee1 Revert "more work on getting HighFive unittests to build"
ecc45433c more work on getting HighFive unittests to build
bb194788a get test_high_five_base more-or-less compiling
d42bde000 Add HighFive unittests
ddc86bb32 turn off HighFive Boost support
b255122d4 "build" HighFive HDF5 library
396cc3ef2 HighFive 2.6.2
5e5f9d9c0 Merge branch 'main' into feature/hdf5
ee938b4a5 changes from SIX
bb764df90 Merge branch 'main' into feature/xml.lite_tweaks
de2a24380 make derived classes 'final' if possible
14e19bcd2 Change xml lite function to virtual (#645)
8f42ac8e9 Merge branch 'main' into feature/xml.lite_tweaks
18ad90645 hdf5Write unittest
3462e1179 createFile() and writeFile() overloads
ecee81d53 fix typos
197eecfa6 sketch-out hdf5::lite::writeFile()
bd2311795 use SpanRC for writeFile(), not yet implemented
ea9af7510 simple SpanRC to hold a 2D-size and pointer
027c19ee8 createFile() unittest
1f9d07ecb hook up createFile()
8c7e4473f start hooking up HDF5 writing
146e0bea3 Merge branch 'main' into feature/hdf5
88ca9fcb7 Merge branch 'main' into feature/hdf5
42b604b46 Squashed commit of the following:
10ee602c2 Merge branch 'main' into feature/hdf5
67aa42b69 restore changes from "main"
8bbfcbfbf unittests can be simplified to match fewer "view" classes
126bb802e Merge branch 'main' into feature/hdf5
3f8ba7a42 again, don't need a class just to convert from std::vector<> to std::span<>
24c2b489c Squashed commit of the following:
2703c119d Squashed commit of the following:
9d5228a2b don't need an entire class just to convert a std::vector<> into std::span<>
51bc931dc Merge branch 'main' into feature/hdf5
a84f25816 Squashed commit of the following:
c4d2ed696 add missing #include guards, fix type in existing #include guard
d541525a0 use a single ComplexViewConstIterator for all views
86e6a459f CODA_OSS_disable_warning causes GCC errors :-(
5d4b9c2cb only need an custom iterator for ComplexSpansView
d9f0fb128 hook up iterators
b9329e4db initial pass at a ComplexViewConstIterator
635238873 remove compiler warning about unused "constexpr" variables
b39f6096f use the casing from H5 to make copy/pasting code slightly easier
0887b13eb Merge branch 'main' into feature/hdf5
bd07df1ca Consistent casing for Dataset, Datatype, Dataspace
7acd30ee2 tweak hdf5.lite dependencies
38ab914df Jupyter notebook for creating H5 files
95a040e0b _small.h5 is now (correctly) FLOAT32
107e7c487 make a simple values() member function to avoid template magic
e1feca919 use TEST_SPECIFIC_EXCEPTION macro instead of try/catch
738333688 readDatasetT() now throws for the wrong buffer type
6b2cc2529 Merge branch 'feature/hdf5' of github.com:mdaus/coda-oss into feature/hdf5
310f8fd3d can't get template magic right for copy_axis()
86b306d59 stepping through copy ctors in the debugger is annoying
f243e92d6 trying to make wrong type of buffer fail
2b10d9652 read in new sample file
a28e59d8c help the compiler with type deduction
49bf5e9bc nested_complex_float_data_small.h5
e029325fc utility routines to "deconstruct" and array of std::complex
dede3bd39 Merge branch 'main' into feature/hdf5
904b1ef5e tweak class names, make_() and copy() utility routines
8237b9efb make it harder to pass the wrong types to ComplexViews
4d9aeda2c ComplexArrayView and ComplexParallelView utility classes
f5e367dfa test std::span<const std::complex<float>>
a4a2844f2 read in the nested "i" and "r" data
115615265 sample file has subgroups
8e1b7869a Merge branch 'feature/hdf5' of github.com:mdaus/coda-oss into feature/hdf5
9f4232a1d update sample H5 file
8c55db73a walk through HDF5 sub-groups
7775ed9c4 Update 123_barfoo_catdog_cx.h5
677975d7c Matlab code to create sample H5 file
a0e7dfe07 Update test_hdf5info.cpp
0b67e1602 pass __FILE__ and __LINE__ from calling site for a more accurate exception message
86a677321 skeleton for more sample data
85f79b099 Merge branch 'main' into feature/hdf5
18088e942 Merge branch 'main' into feature/hdf5
3a1d17692 Merge branch 'main' into feature/hdf5
1755c69d7 Merge branch 'main' into feature/hdf5
9ad015432 No more "11" suffix on exception names
c20d96251 Squashed commit of the following:
c88cee999 other values to be filled-in
bca4a4ecd incorporation NamedObject from HDF5 docs
61fa68f72 groupInfo()
460e7d766 datasetInfo()
14eb9b764 start filling in DatasetInfo
afe5f1c3a start to fill in DatasetInfo
77a968c72 start filling in GroupInfo
d81bcdfd9 openGroup() to open groups (loc)
a0cd29469 comment-out "dataset" unittest for now
86e006024 begin filling in FileInfo
366dda6ab a return_type_of utility is needed to deduce the return type
e21928263 explicitly pass return type to template
4937ccd11 template to reduce boilerplate when calling try_catch_H5Exceptions
b3b5ebde7 use new exception utility routines
ea1c03ef0 put exception handling/conversion in a utility routine
819a99d39 utility routine for exception handling
6f34eea97 put utilities in a separate file for easier reuse
fcbde4f24 break utility routines into smaller pieces for easier reuse
52358ea8a WIN32 no longer automatically defined?
5a4286472 Revert "build HDF5 with C89"
680e599e9 build HDF5 with C89
a87a07121 Merge branch 'main' into feature/hdf5
8447c1a90 Revert "sym-links instead of copying files"
db3b5e12b Merge branch 'main' into feature/xml.lite_tweaks
fb60b5696 Merge branch 'main' into feature/hdf5
5110a5cc8 Comments about _u and _q
1a937d32c Merge branch 'main' into feature/xml.lite_tweaks
fa06f04d7 get ready for hdf5.lite enhancdements
b040c7c43 sym-links instead of copying files
aa431bb47 use _u for xml::lite::Uri
3d0c6d58c fix case-sensitive #include filename
93dcd0e52 operator() for getElementByName()
75a93af85 more operator[] overloads to make attribute management easier
4ab8216f8 user-defined string literals to remove some noise around xml::lite::QName
f82f0b0fc Merge branch 'main' into feature/xml.lite_tweaks
ae30e3644 Merge branch 'feature/xml.lite_tweaks' of github.com:mdaus/coda-oss into feature/xml.lite_tweaks
ffdd9beb0 simplify attribute creation
9bf5414f5 simplify attribute creation
82d7a4e95 SWIG gets confused about namespaces
7a61d0741 fix bug on Element ctor uncovered by unittest
fdd7e58c1 QName is also in the xerces namespace which confuses SWIG bindings
a325b7053 operator+=() overload for addChild
daf30e6c0 Merge branch 'feature/xml.lite_tweaks' of github.com:mdaus/coda-oss into feature/xml.lite_tweaks
b887d2b47 provide overloads for Element& rather than creating new "reference" types
1fa6bba38 rename test_xmleasy.cpp
7c8c9e0f1 += overload
850da6f63 overload for std::string
4547fc5a7 use UIT-8 strings for characterData
4723462a3 convenient addChild() overloads
e48720753 copy over ElementReference from xml.easy
a4ca30a0d Merge branch 'main' into feature/xml.lite_tweaks
6ae9f0b71 Revert "check-in of new xml.easy (to move code between computers)"
f7466a6d7 Revert "simple routines for single element"
a5490230d Revert "make some operators simplier ways of calling functions"
c9a25630a Revert "get document creation working"
8af8710b0 Revert "free functions instead of member functions"
16c3847cb Revert "ElementReference distinct from Element"
7d68e156f Revert "ElementMutableReference"
00eb2a282 Merge branch 'main' into feature/xml.lite_tweaks
a42969c1f ElementMutableReference
a20ae9355 ElementReference distinct from Element
14eeeea0b free functions instead of member functions
4aae014b3 get document creation working
883569269 make some operators simplier ways of calling functions
053bd1212 simple routines for single element
8bf701a2e check-in of new xml.easy (to move code between computers)
41f959051 unittests for creating XML documents from scratch
9752d50ae Merge branch 'main' into feature/xml.lite_tweaks
1531d5709 by default, don't validate strings passed to Uri()
46d13d4bf Merge branch 'master' into feature/xml.lite_tweaks
39b547d32 remove more vestiges of Expat and LibXML
ec8274d52 remove LibXML and Expat as they're no longer used/supported.
20eeefeef Merge branch 'master' into feature/xml.lite_tweaks
95074b9b1 update for newer Intel compiler
7024f71e1 Merge branch 'master' into feature/xml.lite_tweaks
57b1cbc83 Merge branch 'master' into feature/xml.lite_tweaks
4b67561c3 remove validate() overload that nobody is using
fa15f1e5d Squashed commit of the following:
1484a9090 test the new validate() API
470da70fb hookup StringStreamT routines
2cddf2504 begin hooking up validate() overloads
1b5d910f3 overload validate() for UTF-8 and Windows-1252
03309b8c9 Squashed commit of the following:
b72c6c5bf older compiler doesn't like our make_unique
af8f00307 validate UTF-8 XML on Linux
211188613 unit-test for LEGACY XML validation
3c1169d2b Squashed commit of the following:
3afff19ca std::filesystem::path for FileInputStreamOS
908d452f8 WIP: validate all of our sample XML files
00f9bb16b validate against a XML schema
243d8c356 Merge branch 'master' into feature/xml.lite_tweaks
2815d707d fix to work with SWIG bindings. :-(
460862132 trying (again) to remove vestiages of old code
e3c83a858 Revert "new code should use UTF-8"
811207c92 new code should use UTF-8
0ffd835f9 Squashed commit of the following:
1e7e03ded Merge branch 'master' into feature/xml.lite_tweaks
c1d806aff Merge branch 'master' into feature/xml.lite_tweaks
850d3c811 str::strip() that can be easier to use than str::trim()
580ba9c8c explicitly =delete move
2b39831a8 Squashed commit of the following:
39eebdc23 Merge branch 'master' into feature/xml.lite_tweaks
9adf86cba force calling new UTF-8 write() routines
ea61b6204 Merge branch 'master' into feature/xml.lite_tweaks
8a34583fa overload to take schemaPaths as filesystem::path
8671b442f parse XML embedded in a binary file
ec4a902f1 updates from xerces.lite
80dc4d963 updates from xerces.lite
549766d6c Attributes::contains() no longer catches an exception
8a645ceac need "sys/" when building in other environments
36af08269 super-simple URI validation
78ef28a3e SWIG bindings are a PITA! :-(
e9cba8491 SWIG needs help with Uri
8a8d8dc07 another routines used by pre-build SWIG bindings
818e1ec5d pre-build SWIG bindings use getElementByTagName() member function
067cac5d8 old compiler gets confused on unadorned QName
ba92c0ae7 more use of Uri and QName
446c7d17a use QName in new code
d6f8b0c83 more direct use of QName
90fff1c73 use xml::lite::QName instead of tuple<string, string>
646cbb5ed more direct use of QName and Uri
ba589ea3b make QName more robust
bab0ee8b5 createElement() -> addNewElement()
e3a145747 grab changes from six-library
32285e95c Merge branch 'master' into feature/xml.lite_tweaks
9f79f0bf6 Merge branch 'master' into feature/xml.lite_tweaks
a12bbc32c make it easier to create new Elements with a value
fc9967f98 make it easy for callers to addChild() keep a reference to the Element
4627766b7 be sure test_xmlparser works in "externals" of other projects
bf2276396 "private" is part of the name-mangling
fad92bcc8 making sure copy-ctor is implemented
f90fdcead consolidate common XML test code
9fc53f2d5 use str:: utility for casting
6da6f794b still trying to find the right macro for SWIG
0c1b86c56 still trying to fix SWIG
fdc6fc9bd trying to fix SWIG build error
7835e8c27 SWIG needs copy-ctor
585695942 disable copy/assignment for Element, it's probably almost always wrong
391fed613 fix double-delete caused by copying
61790fe69 retry parsing XML with Windows-1252 if first parse() fails
63cffac59 change string_encoding to match coda-oss style of PascalCase
010479bbe read an XML file we know is wrongly encoded as Windows-1252
9a0505062 more references instead of pointers
2d44b6951 Reading Windows-1252 w/o "encoding" fails
63dc7b076 read Windows-1252 too
c9434c9cb test as UIT-8 too
f310ccf0c get reading from UTF-8 XML working on Windows
1fa39c2be get testReadUtf8XmlFile working on Linux
1a83cd815 sys::Path is too much trouble right now
ed60aa22c unit-test to read XML from a file
a9336db7c Squashed commit of the following:
0825beb0d Merge branch 'master' into feature/xml.lite_tweaks
c618489be Merge branch 'master' into feature/xml.lite_tweaks
e8e4b8fe1 determine string_encoding based on platform
1f43bcfc2 create a new Element by using the platform to determine "characterData" encoding
961bef66b Merge branch 'master' into feature/xml.lite_tweaks
e9798a5cb fix static_assert()
6f7772874 Merge branch 'master' into feature/xml.lite_tweaks
b98d4f5a9 Merge branch 'master' into feature/xml.lite_tweaks
1b5abba2a The (old) version of SWIG we're using doesn't like certain C++11 features.
53bdeabaf Merge branch 'master' into feature/xml.lite_tweaks
60cf8ae80 "" doesn't work with decltype() in older C++
97e72477a reduce getValue() overloads by making "key" a template argument
5e6373e55 reduce code duplication
f9e7cfeee provide castValue<T> instead of getValue(T&)
cbd0bd8f2 castValue<T> throws instead of returning a bool like getValue(T&)
87c7514fc Merge branch 'master' into feature/xml.lite_tweaks
10cc61223 make getElement*() consistent for zero or >1 results
f5b137e3c Merge branch 'master' into feature/xml.lite_tweaks
1765efc62 allow clients to specify toType() and toString() for getValue() and setValue()
df8b746e1 allow clients to specify their own toType/toString routines
66702726a Merge branch 'master' into feature/xml.lite_tweaks
6956311f1 Merge branch 'master' into feature/xml.lite_tweaks
d505f3593 Merge branch 'master' into feature/xml.lite_tweaks
fbd106115 catch a BadCastException and return false from getValue()
3a78377b5 use a template to reduce duplicated code
0ad4b8606 Merge branch 'master' into feature/xml.lite_tweaks
a848aa3a2 get & set the characer data as a type
f3ee1ee12 utility routines to set an attribute value
595227683 templates to get an attribute value convert to a specific type
06639227b miised a change in last commit
1aa458ef8 add getValue() overloads that return true/false rather than throwing
faa6d3075 added getElementByTagName() overloads as that's a very common use-case

git-subtree-dir: externals/coda-oss
git-subtree-split: f6489b6bef104d78dacf427901c6a5415a00baec

* Squashed 'externals/nitro/' changes from 90d513ac5..90c6263e2

90c6263e2 latest from coda-oss (#544)

git-subtree-dir: externals/nitro
git-subtree-split: 90c6263e218e20f9d974520d955638ec35ac1085

* Squashed 'externals/coda-oss/' changes from f6489b6be..0b7d581fa

0b7d581fa remove transform_async() (#663)

git-subtree-dir: externals/coda-oss
git-subtree-split: 0b7d581fa62a58ca730fbbf58d24c8ef8b32f764

* latest from coda-oss

* account for sys::byteSwap changes

* Squashed 'externals/coda-oss/' changes from 0b7d581fa..e85ec9331

e85ec9331 --output-on-failure for CTest (#666)
e80376197 turn off "there is no warning number" warning
c5f0a5d15 A C-string may not be NULL-terminated (#665)
0c5eb29ae use platform-specific routines for byteSwap() (#664)

git-subtree-dir: externals/coda-oss
git-subtree-split: e85ec93317a11cf32541b0f0312cacb772777d38

* latest from coda-oss

* latest from NITRO

* Squashed 'externals/coda-oss/' changes from e85ec9331..c120e3255

c120e3255 be sure parameter is used to avoid compiler warning

git-subtree-dir: externals/coda-oss
git-subtree-split: c120e3255d38337020b65b193509abef14c1429c

* Squashed 'externals/nitro/' changes from 90c6263e2..3b52f0025

3b52f0025 latest from coda-oss (#547)

git-subtree-dir: externals/nitro
git-subtree-split: 3b52f0025a286023775c2887dddda30a189937e0

* latest from NITRO

* account for sys::byteSwap changes

* latest from coda-oss

* byte-swapping single-bytes makes no sense

* latest from coda-oss

* Squashed 'externals/coda-oss/' changes from c120e3255..0774c03c4

0774c03c4 threaded byteSwap() (#667)
d156370d3 swapping a single-byte value makes no sense

git-subtree-dir: externals/coda-oss
git-subtree-split: 0774c03c460327bd43beeff1a4e6a275630eb8ea

* Squashed 'externals/nitro/' changes from 3b52f0025..089ba0b5b

089ba0b5b latest from coda-oss

git-subtree-dir: externals/nitro
git-subtree-split: 089ba0b5ba9560e0f00b14c0bbfd07b3717cd78c

* copy_externals

* latest from coda-oss

* Squashed 'externals/coda-oss/' changes from 0774c03c4..540ae763e

540ae763e more byteSwap() tweaks

git-subtree-dir: externals/coda-oss
git-subtree-split: 540ae763e55f3789a04ac20e81e3d2500ac3c221

* restore commented-out unittests

* latest from coda-oss

* build with latest byteSwap() changes from coda-oss

* Squashed 'externals/coda-oss/' changes from 540ae763e..cbc659db2

cbc659db2 add swapBytes() utility from SIX (#669)
891481b64 simplify byte-swapping (#668)

git-subtree-dir: externals/coda-oss
git-subtree-split: cbc659db27ff9156be3fe9c92d4efed1cba8837d

* found two more sys::byteSwapV()s

* latest from coda-oss

* coda-oss now provides as_bytes()

* latest byte-swap from coda-oss

* latest from coda-oss

* fix call to in-place byteSwap

* latest from coda-oss

* Squashed 'externals/coda-oss/' changes from cbc659db2..47684c45b

47684c45b byteSwap now uses byte buffers (#670)

git-subtree-dir: externals/coda-oss
git-subtree-split: 47684c45b8d938265cca26d64b39f75d6e57d11f

* Squashed 'externals/coda-oss/' changes from 47684c45b..1f9fd88d6

1f9fd88d6 remove spurious

git-subtree-dir: externals/coda-oss
git-subtree-split: 1f9fd88d6d54b3e70e7c23a05e213c8e10c5fa37

* xml.lite changes from coda-oss

* latest from NITRO and coda-oss

* Squashed 'externals/coda-oss/' changes from 1f9fd88d6..ff4f820ed

ff4f820ed xml.lite tweaks to support SIDD 3.0 ISM (#672)
b1de8c0e5 std::byte should be a unique type (#671)
c05bf9a02 allow enums to be byte-swapped too

git-subtree-dir: externals/coda-oss
git-subtree-split: ff4f820ed8c406d43e3768508ca06d1a334b831f

* Squashed 'externals/nitro/' changes from 089ba0b5b..2fd7a0bfa

2fd7a0bfa latest from coda-oss (#552)
0eecce004 invoke() utility to reduce code duplication (#550)
59fb02fe9 latest from coda-oss (#551)
9fbf2b7b8 Fill out adapter free block which is used for nitf decompression (#549)

git-subtree-dir: externals/nitro
git-subtree-split: 2fd7a0bfa708a93a4bd17e44dbb4eba400b424d2

* copy_externals

* latest from coda-oss
  • Loading branch information
J. Daniel Smith authored May 30, 2023
1 parent 918e993 commit afd1159
Show file tree
Hide file tree
Showing 10 changed files with 134 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
#define CODA_OSS_coda_oss_cstddef_h_INCLUDED_
#pragma once

#include <stdint.h>

#include <cstddef>
#include <type_traits>

// Need a fairly decent C++ compiler to use the real GSL. This brings in more than
// we really need for span (e.g., gsl::narrow()), but it keeps things simple.
Expand All @@ -37,5 +40,6 @@ namespace coda_oss
enum class byte : unsigned char {};
#endif // GSL_BYTE_H
}
static_assert(!std::is_same<coda_oss::byte, uint8_t>::value, "'coda_oss::byte' should be a unique type.");

#endif // CODA_OSS_coda_oss_cstddef_h_INCLUDED_
4 changes: 4 additions & 0 deletions externals/coda-oss/modules/c++/std/include/std/cstddef
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
#define CODA_OSS_std_cstddef_INCLUDED_
#pragma once

#include <stdint.h>

#include <cstddef>
#include <type_traits>
#include "coda_oss/cstddef.h"
#include "coda_oss/CPlusPlus.h"

Expand All @@ -41,6 +44,7 @@ namespace std // This is slightly uncouth: we're not supposed to augment "std".
{
using coda_oss::byte;
}
static_assert(!std::is_same<std::byte, uint8_t>::value, "'std::byte' should be a unique type.");
#endif // !CODA_OSS_NO_std_byte

#endif // CODA_OSS_std_cstddef_INCLUDED_
5 changes: 5 additions & 0 deletions externals/coda-oss/modules/c++/sys/include/sys/AbstractOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ struct CODA_OSS_API AbstractOS
const std::string& fragment = "",
const std::string& extension = "",
bool recursive = true) const;
std::vector<coda_oss::filesystem::path> search(
const std::vector<coda_oss::filesystem::path>& searchPaths,
const std::string& fragment = "",
const std::string& extension = "",
bool recursive = true) const;

/*!
* Does this path exist?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ namespace sys
// * `struct`s have padding that should be ignored.
// * each individual member of a `struct` should be byte-swaped
// * byte-swaped `float` or `double` bits are nonsense
return !std::is_compound<T>::value;
return (std::is_integral<T>::value || std::is_enum<T>::value) || !std::is_compound<T>::value;
}
}

Expand Down
27 changes: 27 additions & 0 deletions externals/coda-oss/modules/c++/sys/source/AbstractOS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include <map>
#include <stdexcept>
#include <string>
#include <iterator>
#include <algorithm>

#include <import/str.h>
#include <sys/Path.h>
Expand Down Expand Up @@ -83,6 +85,31 @@ AbstractOS::search(const std::vector<std::string>& searchPaths,
return elementsFound;
}

inline auto convert(const std::vector<fs::path>& paths)
{
std::vector<std::string> retval;
std::transform(paths.begin(), paths.end(), std::back_inserter(retval),
[](const fs::path& p) { return p.string(); });
return retval;
}
inline auto convert(const std::vector<std::string>& paths)
{
std::vector<fs::path> retval;
std::transform(paths.begin(), paths.end(), std::back_inserter(retval),
[](const auto& p) { return p; });
return retval;
}

std::vector<coda_oss::filesystem::path> AbstractOS::search(
const std::vector<coda_oss::filesystem::path>& searchPaths,
const std::string& fragment,
const std::string& extension,
bool recursive) const
{
const auto results = search(convert(searchPaths), fragment, extension, recursive);
return convert(results);
}

void AbstractOS::remove(const std::string& path) const
{
if (isDirectory(path))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ struct Attributes final
{
return static_cast<int>(size());
}
bool empty() const
{
return mAttributes.empty();
}

/*!
* Look up an attribute's local name by index.
Expand Down Expand Up @@ -396,6 +400,16 @@ struct Attributes final
{
mAttributes.clear();
}

auto begin() const
{
return mAttributes.begin();
}
auto end() const
{
return mAttributes.end();
}

private:
//! Underlying representation
Attributes_T mAttributes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ class ValidatorXerces : public ValidatorInterface
bool validate(const coda_oss::u8string&, const std::string& xmlID, std::vector<ValidationInfo>&) const override;
bool validate(const str::W1252string&, const std::string& xmlID, std::vector<ValidationInfo>&) const override;

// Search each directory for XSD files
static std::vector<coda_oss::filesystem::path> loadSchemas(const std::vector<coda_oss::filesystem::path>& schemaPaths, bool recursive=true);

private:
bool validate_(const coda_oss::u8string& xml,
const std::string& xmlID,
Expand Down
28 changes: 22 additions & 6 deletions externals/coda-oss/modules/c++/xml.lite/source/ValidatorXerces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <std/memory>
#include <std/string>
#include <regex>
#include <tuple> // std::ignore

#include <sys/OS.h>
#include <io/StringStream.h>
Expand Down Expand Up @@ -89,6 +90,14 @@ inline std::vector<std::string> convert(const std::vector<fs::path>& schemaPaths
[](const fs::path& p) { return p.string(); });
return retval;
}
inline auto convert(const std::vector<std::string>& paths)
{
std::vector<fs::path> retval;
std::transform(paths.begin(), paths.end(), std::back_inserter(retval),
[](const auto& p) { return p; });
return retval;
}

ValidatorXerces::ValidatorXerces(
const std::vector<fs::path>& schemaPaths,
logging::Logger* log,
Expand Down Expand Up @@ -154,19 +163,18 @@ ValidatorXerces::ValidatorXerces(

// load our schemas --
// search each directory for schemas
sys::OS os;
std::vector<std::string> schemas =
os.search(schemaPaths, "", ".xsd", recursive);
const auto schemas = loadSchemas(convert(schemaPaths), recursive);

// add the schema to the validator
for (size_t i = 0; i < schemas.size(); ++i)
// add the schema to the validator
for (auto&& schema : schemas)
{
if (!mValidator->loadGrammar(schemas[i].c_str(),
if (!mValidator->loadGrammar(schema.c_str(),
xercesc::Grammar::SchemaGrammarType,
true))
{
std::ostringstream oss;
oss << "Error: Failure to load schema " << schemas[i];
oss << "Error: Failure to load schema " << schema;
log->warn(Ctxt(oss.str()));
}
}
Expand All @@ -175,6 +183,14 @@ ValidatorXerces::ValidatorXerces(
mSchemaPool->lockPool();
}

std::vector<coda_oss::filesystem::path> ValidatorXerces::loadSchemas(const std::vector<coda_oss::filesystem::path>& schemaPaths, bool recursive)
{
// load our schemas --
// search each directory for schemas
sys::OS os;
return os.search(schemaPaths, "", ".xsd", recursive);
}

// From config.h.in: Define to the 16 bit type used to represent Xerces UTF-16 characters
// On Windows, this needs to be wchar_t so that various "wide character" Win32 APIs can be called.
static_assert(sizeof(XMLCh) == 2, "XMLCh should be two bytes for UTF-16.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#define __NITF_DECOMPRESSION_INTERFACE_HPP__
#pragma once

#include <stdint.h>

#include <nitf/coda-oss.hpp>
#include <nitf/ImageSubheader.hpp>
#include <nitf/IOInterface.hpp>
Expand Down Expand Up @@ -87,10 +89,8 @@ namespace nitf
* during decompression, and gives a c++ api for getting
* things done.
*/
class DecompressionInterface
struct DecompressionInterface final
{
public:

//! These are canned methods which turn around
// and call the nitf_DecompressionControl of your choice
static NITF_BOOL adapterStart(nitf_DecompressionControl* object,
Expand Down Expand Up @@ -121,7 +121,7 @@ class DecompressionInterface
* \class Compressor
* \brief This is the c++ interface for nitf_CompressionControl
*/
struct Decompressor
struct Decompressor final
{
Decompressor() = default;
virtual ~Decompressor() {}
Expand Down
112 changes: 50 additions & 62 deletions externals/nitro/modules/c++/nitf/source/DecompressionInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,35 @@

using namespace nitf;

template<typename TReturn, typename TFunction>
static inline auto invoke(nitf_Error* error, const char* file, int line, const char* func,
TReturn catch_return, TFunction f)
{
try
{
return f();
}
catch (const except::Exception& ex)
{
Utils::error_init(error, ex.getMessage(), file, line, func, NRT_ERR_DECOMPRESSION);
}
catch (const std::exception& ex)
{
Utils::error_init(error, ex, file, line, func, NRT_ERR_DECOMPRESSION);
}
catch (...)
{
nrt_Error_init(error, "Unknown error", file, line, func, NRT_ERR_DECOMPRESSION);
}

return catch_return;
}

// Ensure the return type is deduced correctly. NRT_SUCCESS/NRT_FAILURE
// is `int`, not `NITF_BOOL`.
constexpr NITF_BOOL nrt_success = NRT_SUCCESS;
constexpr NITF_BOOL nrt_failure = NRT_FAILURE;

NITF_BOOL DecompressionInterface::adapterStart(
nitf_DecompressionControl* object,
nitf_IOInterface* io,
Expand All @@ -35,7 +64,7 @@ NITF_BOOL DecompressionInterface::adapterStart(
uint64_t* blockMask,
nitf_Error* error)
{
try
return invoke(error, NRT_CTXT, nrt_failure, [&]()
{
nitf::IOInterface ioInter(io);
ioInter.setManaged(true);
Expand All @@ -46,26 +75,8 @@ NITF_BOOL DecompressionInterface::adapterStart(
fileLength,
blockInfo,
blockMask);
return NRT_SUCCESS;
}
catch (const except::Exception& ex)
{
Utils::error_init(error, ex.getMessage(), NRT_CTXT,
NRT_ERR_DECOMPRESSION);
return NRT_FAILURE;
}
catch (const std::exception& ex)
{
Utils::error_init(error, ex, NRT_CTXT,
NRT_ERR_DECOMPRESSION);
return NRT_FAILURE;
}
catch (...)
{
nrt_Error_init(error, "Unknown error", NRT_CTXT,
NRT_ERR_DECOMPRESSION);
return NRT_FAILURE;
}
return nrt_success;
});
}

uint8_t* DecompressionInterface::adapterReadBlock(
Expand All @@ -74,59 +85,36 @@ uint8_t* DecompressionInterface::adapterReadBlock(
uint64_t* blockSize,
nitf_Error* error)
{
try
{
const auto f = [&]() {
return static_cast<Decompressor*>(object)->readBlock(blockNumber,
blockSize);
}
catch (const except::Exception& ex)
{
Utils::error_init(error, ex.getMessage(), NRT_CTXT,
NRT_ERR_DECOMPRESSION);
return nullptr;
}
catch (const std::exception& ex)
{
Utils::error_init(error, ex, NRT_CTXT,
NRT_ERR_DECOMPRESSION);
return nullptr;
}
catch (...)
};
using retval_t = decltype(f());
return invoke(error, NRT_CTXT, static_cast<retval_t>(nullptr), f);
}

NITF_BOOL DecompressionInterface::adapterFreeBlock(
nitf_DecompressionControl* object,
uint8_t* block,
nitf_Error* error)
{
return invoke(error, NRT_CTXT, nrt_failure, [&]()
{
nrt_Error_init(error, "Unknown error", NRT_CTXT,
NRT_ERR_DECOMPRESSION);
return nullptr;
}
static_cast<Decompressor*>(object)->freeBlock(block);
return nrt_success;
});
}

NITF_BOOL DecompressionInterface::adapterFreeBlock(
nitf_DecompressionControl* object,
std::byte* block,
nitf_Error* error)
{
try
return invoke(error, NRT_CTXT, nrt_failure, [&]()
{
static_cast<Decompressor*>(object)->freeBlock(block);
return NRT_SUCCESS;
}
catch (const except::Exception& ex)
{
Utils::error_init(error, ex.getMessage(), NRT_CTXT,
NRT_ERR_DECOMPRESSION);
return NRT_FAILURE;
}
catch (const std::exception& ex)
{
Utils::error_init(error, ex, NRT_CTXT,
NRT_ERR_DECOMPRESSION);
return NRT_FAILURE;
}
catch (...)
{
nrt_Error_init(error, "Unknown error", NRT_CTXT,
NRT_ERR_DECOMPRESSION);
return NRT_FAILURE;
}
return nrt_success;
});
}

void DecompressionInterface::adapterDestroy(
Expand Down

0 comments on commit afd1159

Please sign in to comment.