Skip to content

Commit

Permalink
Squashed 'externals/nitro/' changes from cca11bf4c..80a517fcb
Browse files Browse the repository at this point in the history
80a517fcb Merge commit '911c7b3ae49e1f92b94f2dc83d7716b7abc459c2' into cpp17
911c7b3ae Squashed 'externals/coda-oss/' changes from eb60210ff2..e573adb323
c3e3d3768 add config.h files
1cca072bd latest from CODA-OSS
cb5d115bc Squashed 'externals/coda-oss/' changes from 434b85fe53..eb60210ff2
8a3df82fb Merge commit 'cb5d115bcc2ecc11f81e4ccad23caff4f3f8ac29' into cpp17
dc3074153 Merge branch 'main' into cpp17
0357b1432 NITRO-2.11.5 (#589)
a0ad6f943 CODA-OSS 2023-10-23 (#588)

git-subtree-dir: externals/nitro
git-subtree-split: 80a517fcba1d0260effe0ab4af7e39060c0433ae
  • Loading branch information
Dan Smith committed Nov 3, 2023
1 parent a6083af commit 69b472a
Show file tree
Hide file tree
Showing 965 changed files with 333,842 additions and 107 deletions.
78 changes: 29 additions & 49 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,62 +7,35 @@ CMakeLists.txt text eol=lf

# Modern tools on Windows can handle Linux LF
# See https://stackoverflow.com/a/13154031/8877 for details
* text=auto eol=lf
.git?* text
* text=auto eol=lf
*.* text=auto eol=lf
.git?* text=auto eol=lf

# Leave known Windows-only text files as CR/LF
*.sln text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
*.ruleset text eol=crlf

# Text file formats
*.txt text eol=lf
*.text text eol=lf
*.md text eol=lf
*.tex text eol=lf
*.?ml text eol=lf
*.kmz binary
*.log text eol=lf

# Programming languages
*.htm? text eol=lf
*.css text eol=lf
*.c text eol=lf
*.cc text eol=lf
*.c?? text eol=lf
*.c??m text eol=lf
*.ccm text eol=lf
*.C text eol=lf
*.h?? text eol=lf
*.h text eol=lf
*.hh text eol=lf
*.ixx text eol=lf
*.mpp text eol=lf
*.py text eol=lf
*.pyc binary
# .f and .f90
*.f* text eol=lf
*.m text eol=lf
*.java text eol=lf
*.cs text eol=lf
*.vb text eol=lf
*.js text eol=lf
*.ts text eol=lf
*.pl text eol=lf
*.sh text eol=lf
*.csh text eol=lf
*.sln text eol=crlf
*.dsw text eol=crlf
*.dsp text eol=crlf
*.vcproj text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
*.ruleset text eol=crlf
*.bat text eol=crlf

######################
# Known binary files

# Python builds with WAF
waf binary

# executables, libraries; yes, sometimes they're part of a repository
*.exe binary
*.out binary
lib*.so* binary
*.dll binary
lib*.a* binary
*.lib binary
*.mex binary
*.pyc binary

# from various unit_test/ directories
*.dat binary
Expand All @@ -82,9 +55,10 @@ lib*.a* binary
*.jpeg binary
*.png binary
# SVG images are XML
*.svg text eol=lf
*.svg text
*.raw binary
*.hei* binary
*.hei? binary
*.kmz binary

# music
*.mp3 binary
Expand All @@ -101,15 +75,21 @@ lib*.a* binary
# documents
*.pdf binary
*.dvi binary
*.doc* binary
*.xls* binary
*.ppt* binary
*.doc binary
*.docx binary
*.xls binary
*.xlsx binary
*.ppt binary
*.pptx binary

# SAR
*.h5 binary
*.sio binary
*.hdr binary
*.ntf binary
*.nitf binary
*.si?d binary
*.sidd binary
*.sicd? binary

# containers
*.zip binary
Expand Down
6 changes: 5 additions & 1 deletion ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# NITRO (NITF i/o) Release Notes

## [Version 2.11.5](https://github.com/mdaus/nitro/releases/tag/NITRO-2.11.5); October 23, 2023
* [coda-oss](https://github.com/mdaus/coda-oss) release [2023-10-23](https://github.com/mdaus/coda-oss/releases/tag/2023-10-23)
* Fix some ASAN diagnostics, still more to do.

## [Version 2.11.4](https://github.com/mdaus/nitro/releases/tag/NITRO-2.11.4); August 18 5, 2023
* [coda-oss](https://github.com/mdaus/coda-oss) release [2023-08-18](https://github.com/mdaus/coda-oss/releases/tag/2023-08-18)
* added **.gitattributes** and normalized line-endings (`\n` for most text files).
* Added **.gitattributes** and normalized line-endings (`\n` for most text files).

## [Version 2.11.3](https://github.com/mdaus/nitro/releases/tag/NITRO-2.11.3); June 5, 2023
* [coda-oss](https://github.com/mdaus/coda-oss) release [2023-06-05](https://github.com/mdaus/coda-oss/releases/tag/2023-06-05)
Expand Down
78 changes: 29 additions & 49 deletions externals/coda-oss/.gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,62 +7,35 @@ CMakeLists.txt text eol=lf

# Modern tools on Windows can handle Linux LF
# See https://stackoverflow.com/a/13154031/8877 for details
* text=auto eol=lf
.git?* text
* text=auto eol=lf
*.* text=auto eol=lf
.git?* text=auto eol=lf

# Leave known Windows-only text files as CR/LF
*.sln text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
*.ruleset text eol=crlf

# Text file formats
*.txt text eol=lf
*.text text eol=lf
*.md text eol=lf
*.tex text eol=lf
*.?ml text eol=lf
*.kmz binary
*.log text eol=lf

# Programming languages
*.htm? text eol=lf
*.css text eol=lf
*.c text eol=lf
*.cc text eol=lf
*.c?? text eol=lf
*.c??m text eol=lf
*.ccm text eol=lf
*.C text eol=lf
*.h?? text eol=lf
*.h text eol=lf
*.hh text eol=lf
*.ixx text eol=lf
*.mpp text eol=lf
*.py text eol=lf
*.pyc binary
# .f and .f90
*.f* text eol=lf
*.m text eol=lf
*.java text eol=lf
*.cs text eol=lf
*.vb text eol=lf
*.js text eol=lf
*.ts text eol=lf
*.pl text eol=lf
*.sh text eol=lf
*.csh text eol=lf
*.sln text eol=crlf
*.dsw text eol=crlf
*.dsp text eol=crlf
*.vcproj text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
*.ruleset text eol=crlf
*.bat text eol=crlf

######################
# Known binary files

# Python builds with WAF
waf binary

# executables, libraries; yes, sometimes they're part of a repository
*.exe binary
*.out binary
lib*.so* binary
*.dll binary
lib*.a* binary
*.lib binary
*.mex binary
*.pyc binary

# from various unit_test/ directories
*.dat binary
Expand All @@ -82,9 +55,10 @@ lib*.a* binary
*.jpeg binary
*.png binary
# SVG images are XML
*.svg text eol=lf
*.svg text
*.raw binary
*.hei* binary
*.hei? binary
*.kmz binary

# music
*.mp3 binary
Expand All @@ -101,15 +75,21 @@ lib*.a* binary
# documents
*.pdf binary
*.dvi binary
*.doc* binary
*.xls* binary
*.ppt* binary
*.doc binary
*.docx binary
*.xls binary
*.xlsx binary
*.ppt binary
*.pptx binary

# SAR
*.h5 binary
*.sio binary
*.hdr binary
*.ntf binary
*.nitf binary
*.si?d binary
*.sidd binary
*.sicd? binary

# containers
*.zip binary
Expand Down
10 changes: 9 additions & 1 deletion externals/coda-oss/ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# coda-oss Release Notes

## [Release 2023-10-23](https://github.com/mdaus/coda-oss/releases/tag/2023-10-23)
* Tweaked **.gitattributes**.
* Removed *str::EncodedStringView*; made *str* conversion routines more consistent.
* *FmtX()* uses overloads rather than C-style varargs.
* Add [`std::ssize()`](https://en.cppreference.com/w/cpp/iterator/size).
* `ENABLE_AVX2` and `ENABLE_AVX512F` flags for CMake builds.
* Build cleanly with ASAN.

## [Release 2023-08-18](https://github.com/mdaus/coda-oss/releases/tag/2023-08-18)
* New `sys::OS::getSIMDInstructionSet()` utility routine; SSE2 is required (default with 64-bit builds).
* `types::ComplexInteger` to work-around `std::complex<short>` no longer being [valid C++](https://en.cppreference.com/w/cpp/numeric/complex).
* Another round of reducing various compiler warnings (of note: `NULL` -> `nullptr`).
* Some suport for [`std::numbers`](https://en.cppreference.com/w/cpp/header/numbers) from C++20.
* Some support for [`std::numbers`](https://en.cppreference.com/w/cpp/header/numbers) from C++20.
* Update to [HighFive 2.7.1](https://github.com/BlueBrain/HighFive/releases/tag/v2.7.1).
* Update to [e2fsprogs 1.47.0](https://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.47.0).
* Update to [xerces-c 3.2.4](https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12350542&styleName=Text&projectId=10510).
Expand Down
2 changes: 2 additions & 0 deletions externals/coda-oss/modules/c++/coda-oss.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@
<ClInclude Include="tiff\include\tiff\ImageReader.h" />
<ClInclude Include="tiff\include\tiff\ImageWriter.h" />
<ClInclude Include="tiff\include\tiff\KnownTags.h" />
<ClInclude Include="tiff\include\tiff\TiffUtils.h" />
<ClInclude Include="tiff\include\tiff\TypeFactory.h" />
<ClInclude Include="tiff\include\tiff\Utils.h" />
<ClInclude Include="types\include\types\Complex.h" />
Expand Down Expand Up @@ -471,6 +472,7 @@
<ClCompile Include="tiff\source\ImageReader.cpp" />
<ClCompile Include="tiff\source\ImageWriter.cpp" />
<ClCompile Include="tiff\source\KnownTags.cpp" />
<ClCompile Include="tiff\source\TiffUtils.cpp" />
<ClCompile Include="tiff\source\TypeFactory.cpp" />
<ClCompile Include="tiff\source\Utils.cpp" />
<ClCompile Include="types\source\Range.cpp" />
Expand Down
7 changes: 7 additions & 0 deletions externals/coda-oss/modules/c++/coda-oss.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,10 @@
<ClInclude Include="str\include\str\W1252string.h">
<Filter>str</Filter>
</ClInclude>
<ClInclude Include="coda_oss\include\coda_oss\optional_.h" />
<ClInclude Include="tiff\include\tiff\TiffUtils.h">
<Filter>tiff</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp" />
Expand Down Expand Up @@ -1395,6 +1399,9 @@
<ClCompile Include="unique\source\UUID.cpp">
<Filter>unique</Filter>
</ClCompile>
<ClCompile Include="tiff\source\TiffUtils.cpp">
<Filter>tiff</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="config">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ static_assert(CODA_OSS_MAKE_VERSION_MMPB(9999, 9999, 9999, 9999) <= UINT64_MAX,

// Do this ala C++ ... we don't currently have major/minor/patch
//#define CODA_OSS_VERSION_ 20210910L // c.f. __cplusplus
#define CODA_OSS_VERSION_ 2023 ## 0008 ## 0018 ## 0000 ## L
#define CODA_OSS_VERSION_ 2023 ## 0010 ## 0023 ## 0000 ## L

// Use the same macros other projects might want to use; overkill for us.
#define CODA_OSS_VERSION_MAJOR 2023
#define CODA_OSS_VERSION_MINOR 8
#define CODA_OSS_VERSION_PATCH 18 // a.k.a. "point," but too similar to "patch."
#define CODA_OSS_VERSION_MINOR 10
#define CODA_OSS_VERSION_PATCH 23 // a.k.a. "point," but too similar to "patch."
#define CODA_OSS_VERSION_BUILD 0 // a.k.a. "patch," but too similar to "point."
#define CODA_OSS_VERSION CODA_OSS_MAKE_VERSION_MMPB(CODA_OSS_VERSION_MAJOR, CODA_OSS_VERSION_MINOR, CODA_OSS_VERSION_PATCH, CODA_OSS_VERSION_BUILD)

Expand Down
2 changes: 1 addition & 1 deletion externals/coda-oss/modules/c++/tiff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(MODULE_NAME tiff)
coda_add_module(
${MODULE_NAME}
VERSION 1.0
DEPS mt-c++ io-c++)
DEPS libtiff-c mt-c++ io-c++)

coda_add_tests(
MODULE_NAME ${MODULE_NAME}
Expand Down
44 changes: 44 additions & 0 deletions externals/coda-oss/modules/c++/tiff/include/tiff/TiffUtils.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* =========================================================================
* This file is part of tiff-c++
* =========================================================================
*
* (C) Copyright 2004 - 2014, MDA Information Systems LLC
* © Copyright 2023, Maxar Technologies, Inc.
*
* tiff-c++ is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; If not,
* see <http://www.gnu.org/licenses/>.
*
*/

#pragma once

#include <stdarg.h>
#include <iostream>
#include <string>

#include <sys/filesystem.h>
#include <coda_oss/cstddef.h>

using tiff_errorhandler_t = void(*)(const char*, const char*, va_list); // TIFFErrorHandler
tiff_errorhandler_t tiff_setErrorHandler(tiff_errorhandler_t pHandler = nullptr); // TIFFSetWarningHandler()
tiff_errorhandler_t tiff_setWarningHandler(tiff_errorhandler_t pHandler = nullptr); // TIFFSetErrorHandler()

bool tiff_readData(const coda_oss::filesystem::path&, coda_oss::byte* buffer, size_t numElements);

struct tiff_stream_ final { };
using tiff_stream = tiff_stream_*; // TIFF

tiff_stream tiff_streamOpen(const std::string& name, std::istream&); // TIFFStreamOpen()
bool tiff_readData(tiff_stream, coda_oss::byte* buffer, size_t numElements);

Loading

0 comments on commit 69b472a

Please sign in to comment.