Merge branch 'main' into find_pnetcdf
6
.github/workflows/run_tests_cdash.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.10.8, 1.12.2, 1.14.0 ]
|
||||
hdf5: [ 1.10.8, 1.12.2, 1.14.3 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@ -66,7 +66,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.14.0 ]
|
||||
hdf5: [ 1.14.3 ]
|
||||
|
||||
steps:
|
||||
|
||||
@ -126,7 +126,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.10.8, 1.12.2, 1.14.0 ]
|
||||
hdf5: [ 1.10.8, 1.12.2, 1.14.3 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
197
.github/workflows/run_tests_osx.yml
vendored
@ -16,11 +16,11 @@ jobs:
|
||||
|
||||
build-deps-osx:
|
||||
|
||||
runs-on: macos-11
|
||||
runs-on: macos-12
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.12.2, 1.14.0 ]
|
||||
hdf5: [ 1.12.2, 1.14.3 ]
|
||||
|
||||
steps:
|
||||
|
||||
@ -49,15 +49,14 @@ jobs:
|
||||
make install -j
|
||||
popd
|
||||
|
||||
|
||||
nc-autotools-osx:
|
||||
|
||||
needs: [ nc-cmake-tests-oneoff-osx, nc-ac-tests-oneoff-osx ]
|
||||
runs-on: macos-11
|
||||
needs: [ nc-cmake-tests-oneoff-osx-shared, nc-cmake-tests-oneoff-osx-static, nc-ac-tests-oneoff-osx ]
|
||||
runs-on: macos-12
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.12.2, 1.14.0 ]
|
||||
hdf5: [ 1.12.2, 1.14.3 ]
|
||||
use_nc4: [ nc3, nc4 ]
|
||||
use_dap: [ dap_off, dap_on ]
|
||||
use_nczarr: [ nczarr_off, nczarr_on ]
|
||||
@ -65,9 +64,9 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
###
|
||||
# Set Environmental Variables
|
||||
###
|
||||
###
|
||||
# Set Environmental Variables
|
||||
###
|
||||
|
||||
- run: echo "CFLAGS=-I${HOME}/environments/${{ matrix.hdf5 }}/include" >> $GITHUB_ENV
|
||||
- run: echo "LDFLAGS=-L${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
|
||||
@ -89,9 +88,9 @@ jobs:
|
||||
- run: echo "ENABLE_NCZARR=--enable-nczarr" >> $GITHUB_ENV
|
||||
if: matrix.use_nczarr == 'nczarr_on'
|
||||
|
||||
###
|
||||
# Fetch Cache
|
||||
###
|
||||
###
|
||||
# Fetch Cache
|
||||
###
|
||||
|
||||
- name: Fetch HDF Cache
|
||||
id: cache-hdf-osx
|
||||
@ -104,9 +103,9 @@ jobs:
|
||||
shell: bash -l {0}
|
||||
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib
|
||||
|
||||
###
|
||||
# Configure and build
|
||||
###
|
||||
###
|
||||
# Configure and build
|
||||
###
|
||||
- name: Install autoconf
|
||||
shell: bash -l {0}
|
||||
run: brew install automake
|
||||
@ -144,10 +143,10 @@ jobs:
|
||||
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check -j
|
||||
if: ${{ success() }}
|
||||
|
||||
# - name: Make Distcheck
|
||||
# shell: bash -l {0}
|
||||
# run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} DISTCHECK_CONFIGURE_FLAGS="${ENABLE_HDF4} ${ENABLE_HDF5} ${ENABLE_DAP} ${ENABLE_NCZARR}" make distcheck
|
||||
# if: ${{ success() }}
|
||||
# - name: Make Distcheck
|
||||
# shell: bash -l {0}
|
||||
# run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} DISTCHECK_CONFIGURE_FLAGS="${ENABLE_HDF4} ${ENABLE_HDF5} ${ENABLE_DAP} ${ENABLE_NCZARR}" make distcheck
|
||||
# if: ${{ success() }}
|
||||
|
||||
#- name: Start SSH Debug
|
||||
# uses: luchihoratiu/debug-via-ssh@main
|
||||
@ -158,12 +157,12 @@ jobs:
|
||||
|
||||
nc-cmake-osx:
|
||||
|
||||
needs: [ nc-cmake-tests-oneoff-osx, nc-ac-tests-oneoff-osx ]
|
||||
runs-on: macos-11
|
||||
needs: [ nc-cmake-tests-oneoff-osx-shared, nc-cmake-tests-oneoff-osx-static, nc-ac-tests-oneoff-osx ]
|
||||
runs-on: macos-12
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.12.2, 1.14.0 ]
|
||||
hdf5: [ 1.12.2, 1.14.3 ]
|
||||
use_nc4: [ nc3, nc4 ]
|
||||
use_dap: [ dap_off, dap_on ]
|
||||
use_nczarr: [ nczarr_off, nczarr_on ]
|
||||
@ -171,9 +170,9 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
###
|
||||
# Set Environmental Variables
|
||||
###
|
||||
###
|
||||
# Set Environmental Variables
|
||||
###
|
||||
|
||||
- run: echo "CMAKE_PREFIX_PATH=${HOME}/environments/${{ matrix.hdf5 }}/" >> $GITHUB_ENV
|
||||
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
|
||||
@ -195,9 +194,9 @@ jobs:
|
||||
if: matrix.use_nczarr == 'nczarr_on'
|
||||
- run: echo "CTEST_OUTPUT_ON_FAILURE=1" >> $GITHUB_ENV
|
||||
|
||||
###
|
||||
# Fetch Cache
|
||||
###
|
||||
###
|
||||
# Fetch Cache
|
||||
###
|
||||
|
||||
- name: Fetch HDF Cache
|
||||
id: cache-hdf5-osx
|
||||
@ -210,9 +209,9 @@ jobs:
|
||||
shell: bash -l {0}
|
||||
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib
|
||||
|
||||
###
|
||||
# Configure and build
|
||||
###
|
||||
###
|
||||
# Configure and build
|
||||
###
|
||||
|
||||
- name: Perform out-of-directory build
|
||||
shell: bash -l {0}
|
||||
@ -248,34 +247,33 @@ jobs:
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 --rerun-failed --output-on-failure -VV
|
||||
if: ${{ failure() }}
|
||||
|
||||
|
||||
#####
|
||||
# One-Off Autotools-based tests.
|
||||
#####
|
||||
#####
|
||||
# One-Off Autotools-based tests.
|
||||
#####
|
||||
nc-ac-tests-oneoff-osx:
|
||||
|
||||
needs: build-deps-osx
|
||||
runs-on: macos-11
|
||||
runs-on: macos-12
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.12.2, 1.14.0 ]
|
||||
hdf5: [ 1.12.2, 1.14.3 ]
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
###
|
||||
# Set Environmental Variables
|
||||
###
|
||||
###
|
||||
# Set Environmental Variables
|
||||
###
|
||||
|
||||
- run: echo "CFLAGS=-I${HOME}/environments/${{ matrix.hdf5 }}/include" >> $GITHUB_ENV
|
||||
- run: echo "LDFLAGS=-L${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
|
||||
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
|
||||
|
||||
|
||||
###
|
||||
# Fetch Cache
|
||||
###
|
||||
###
|
||||
# Fetch Cache
|
||||
###
|
||||
|
||||
- name: Fetch HDF Cache
|
||||
id: cache-hdf-osx
|
||||
@ -288,9 +286,9 @@ jobs:
|
||||
shell: bash -l {0}
|
||||
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib
|
||||
|
||||
###
|
||||
# Configure and build
|
||||
###
|
||||
###
|
||||
# Configure and build
|
||||
###
|
||||
|
||||
- name: Install autoconf
|
||||
shell: bash -l {0}
|
||||
@ -329,33 +327,33 @@ jobs:
|
||||
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check -j
|
||||
if: ${{ success() }}
|
||||
|
||||
#####
|
||||
# One-Off CMake-based tests.
|
||||
#####
|
||||
#####
|
||||
# One-Off CMake-based tests.
|
||||
#####
|
||||
|
||||
nc-cmake-tests-oneoff-osx:
|
||||
nc-cmake-tests-oneoff-osx-shared:
|
||||
|
||||
needs: build-deps-osx
|
||||
runs-on: macos-11
|
||||
runs-on: macos-12
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.12.2, 1.14.0 ]
|
||||
hdf5: [ 1.12.2, 1.14.3 ]
|
||||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
###
|
||||
# Set Environmental Variables
|
||||
###
|
||||
###
|
||||
# Set Environmental Variables
|
||||
###
|
||||
|
||||
- run: echo "CMAKE_PREFIX_PATH=${HOME}/environments/${{ matrix.hdf5 }}/" >> $GITHUB_ENV
|
||||
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
|
||||
|
||||
###
|
||||
# Fetch Cache
|
||||
###
|
||||
###
|
||||
# Fetch Cache
|
||||
###
|
||||
|
||||
- name: Fetch HDF Cache
|
||||
id: cache-hdf5-osx
|
||||
@ -368,16 +366,91 @@ jobs:
|
||||
shell: bash -l {0}
|
||||
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib
|
||||
|
||||
###
|
||||
# Configure and build
|
||||
###
|
||||
###
|
||||
# Configure and build
|
||||
###
|
||||
|
||||
- name: Perform out-of-directory build
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_XML2=FALSE
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_LIBXML2=FALSE
|
||||
|
||||
- name: Print Summary
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
cd build
|
||||
cat libnetcdf.settings
|
||||
|
||||
- name: Build All
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
cd build
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j 12
|
||||
if: ${{ success() }}
|
||||
|
||||
- name: Run Tests
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
cd build
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest --output-on-failure -j 12 .
|
||||
if: ${{ success() }}
|
||||
|
||||
- name: Verbose Output if CTest Failure
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
cd build
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 --rerun-failed --output-on-failure -VV
|
||||
if: ${{ failure() }}
|
||||
|
||||
|
||||
nc-cmake-tests-oneoff-osx-static:
|
||||
|
||||
needs: build-deps-osx
|
||||
runs-on: macos-12
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.12.2, 1.14.3 ]
|
||||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
###
|
||||
# Set Environmental Variables
|
||||
###
|
||||
|
||||
- run: echo "CMAKE_PREFIX_PATH=${HOME}/environments/${{ matrix.hdf5 }}/" >> $GITHUB_ENV
|
||||
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
|
||||
- run: echo "CMAKE_C_FLAGS=-fPIC" >> $GITHUB_ENV
|
||||
|
||||
###
|
||||
# Fetch Cache
|
||||
###
|
||||
|
||||
- name: Fetch HDF Cache
|
||||
id: cache-hdf5-osx
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/environments/${{ matrix.hdf5 }}
|
||||
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
|
||||
|
||||
- name: Check Cache
|
||||
shell: bash -l {0}
|
||||
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib
|
||||
|
||||
###
|
||||
# Configure and build
|
||||
###
|
||||
|
||||
- name: Perform out-of-directory build
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_LIBXML2=FALSE -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
|
||||
|
||||
- name: Print Summary
|
||||
shell: bash -l {0}
|
||||
|
4
.github/workflows/run_tests_s3.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.10.8, 1.12.2, 1.14.0 ]
|
||||
hdf5: [ 1.10.8, 1.12.2, 1.14.3 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@ -70,7 +70,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.14.0 ]
|
||||
hdf5: [ 1.14.3 ]
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
208
.github/workflows/run_tests_ubuntu.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.10.8, 1.12.2, 1.14.0 ]
|
||||
hdf5: [ 1.10.8, 1.12.2, 1.14.3 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@ -66,7 +66,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.14.0 ]
|
||||
hdf5: [ 1.14.3 ]
|
||||
|
||||
steps:
|
||||
|
||||
@ -119,16 +119,16 @@ jobs:
|
||||
# One-Off Autotools-based tests.
|
||||
#####
|
||||
##
|
||||
# Serial
|
||||
# Serial, Shared
|
||||
##
|
||||
nc-ac-tests-oneoff-serial:
|
||||
nc-ac-tests-oneoff-serial-shared:
|
||||
|
||||
needs: build-deps-serial
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.14.0 ]
|
||||
hdf5: [ 1.14.3 ]
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
@ -213,6 +213,102 @@ jobs:
|
||||
*.zip
|
||||
*.tgz
|
||||
|
||||
##
|
||||
#
|
||||
## Serial, Static
|
||||
nc-ac-tests-oneoff-serial-static:
|
||||
|
||||
needs: build-deps-serial
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.14.0 ]
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install System dependencies
|
||||
shell: bash -l {0}
|
||||
run: sudo apt update && sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev doxygen valgrind
|
||||
|
||||
###
|
||||
# Set Environmental Variables
|
||||
###
|
||||
|
||||
- run: echo "CFLAGS=-I${HOME}/environments/${{ matrix.hdf5 }}/include" >> $GITHUB_ENV
|
||||
- run: echo "LDFLAGS=-L${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
|
||||
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
|
||||
|
||||
|
||||
###
|
||||
# Fetch Cache
|
||||
###
|
||||
|
||||
- name: Fetch HDF Cache
|
||||
id: cache-hdf
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/environments/${{ matrix.hdf5 }}
|
||||
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
|
||||
|
||||
- name: Check Cache
|
||||
shell: bash -l {0}
|
||||
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib
|
||||
|
||||
###
|
||||
# Configure and build
|
||||
###
|
||||
|
||||
- name: Run autoconf
|
||||
shell: bash -l {0}
|
||||
run: autoreconf -if
|
||||
|
||||
- name: Configure
|
||||
shell: bash -l {0}
|
||||
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./configure --enable-hdf5 --enable-dap --disable-dap-remote-tests --enable-doxygen --enable-external-server-tests --disable-xml2 --disable-shared --enable-static
|
||||
if: ${{ success() }}
|
||||
|
||||
- name: Look at config.log if error
|
||||
shell: bash -l {0}
|
||||
run: cat config.log
|
||||
if: ${{ failure() }}
|
||||
|
||||
- name: Print Summary
|
||||
shell: bash -l {0}
|
||||
run: cat libnetcdf.settings
|
||||
|
||||
- name: Build Library and Utilities
|
||||
shell: bash -l {0}
|
||||
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j
|
||||
if: ${{ success() }}
|
||||
|
||||
- name: Build Tests
|
||||
shell: bash -l {0}
|
||||
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check TESTS="" -j
|
||||
if: ${{ success() }}
|
||||
|
||||
- name: Run Tests
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
LD_LIBRARY_PATH="/home/runner/work/netcdf-c/netcdf-c/liblib/.libs:${LD_LIBRARY_PATH}"
|
||||
CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check -j
|
||||
if: ${{ success() }}
|
||||
|
||||
- name: Create source distribution
|
||||
shell: bash -l {0}
|
||||
if: ${{ success() }}
|
||||
run: make dist -j
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: netcdf-c-autotools-source-distribution
|
||||
path: |
|
||||
*.tar*
|
||||
*.zip
|
||||
*.tgz
|
||||
|
||||
|
||||
##
|
||||
# Parallel
|
||||
##
|
||||
@ -223,7 +319,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.14.0 ]
|
||||
hdf5: [ 1.14.3 ]
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
@ -294,16 +390,16 @@ jobs:
|
||||
# One-Off CMake-based tests.
|
||||
#####
|
||||
##
|
||||
# Serial
|
||||
# Serial, Shared
|
||||
##
|
||||
nc-cmake-tests-oneoff-serial:
|
||||
nc-cmake-tests-oneoff-serial-shared:
|
||||
|
||||
needs: build-deps-serial
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.14.0 ]
|
||||
hdf5: [ 1.14.3 ]
|
||||
|
||||
steps:
|
||||
|
||||
@ -344,7 +440,7 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -DENABLE_DAP_LONG_TESTS=TRUE -DENABLE_XML2=FALSE
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -DENABLE_DAP_LONG_TESTS=TRUE -DENABLE_LIBXML2=FALSE
|
||||
|
||||
- name: Print Summary
|
||||
shell: bash -l {0}
|
||||
@ -373,6 +469,88 @@ jobs:
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 --rerun-failed --output-on-failure -VV
|
||||
if: ${{ failure() }}
|
||||
|
||||
##
|
||||
# Serial, Shared
|
||||
##
|
||||
nc-cmake-tests-oneoff-serial-static:
|
||||
|
||||
needs: build-deps-serial
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.14.3 ]
|
||||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install System dependencies
|
||||
shell: bash -l {0}
|
||||
run: sudo apt update && sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev doxygen
|
||||
|
||||
###
|
||||
# Set Environmental Variables
|
||||
###
|
||||
|
||||
- run: echo "CMAKE_PREFIX_PATH=${HOME}/environments/${{ matrix.hdf5 }}/" >> $GITHUB_ENV
|
||||
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
|
||||
- run: echo "CMAKE_C_FLAGS=-fPIC" >> $GITHUB_ENV
|
||||
|
||||
###
|
||||
# Fetch Cache
|
||||
###
|
||||
|
||||
- name: Fetch HDF Cache
|
||||
id: cache-hdf5
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/environments/${{ matrix.hdf5 }}
|
||||
key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }}
|
||||
|
||||
- name: Check Cache
|
||||
shell: bash -l {0}
|
||||
run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib
|
||||
|
||||
###
|
||||
# Configure and build
|
||||
###
|
||||
|
||||
- name: Perform out-of-directory build
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -DENABLE_DAP_LONG_TESTS=TRUE -DENABLE_LIBXML2=FALSE -DBUILD_SHARED_LIBS=FALSE -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
|
||||
|
||||
- name: Print Summary
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
cd build
|
||||
cat libnetcdf.settings
|
||||
|
||||
- name: Build All
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
cd build
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j 12
|
||||
if: ${{ success() }}
|
||||
|
||||
- name: Run Tests
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
cd build
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest --output-on-failure -j 12 .
|
||||
if: ${{ success() }}
|
||||
|
||||
- name: Verbose Output if CTest Failure
|
||||
shell: bash -l {0}
|
||||
run: |
|
||||
cd build
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 --rerun-failed --output-on-failure -VV
|
||||
if: ${{ failure() }}
|
||||
|
||||
|
||||
##
|
||||
# Parallel
|
||||
##
|
||||
@ -383,7 +561,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.14.0 ]
|
||||
hdf5: [ 1.14.3 ]
|
||||
|
||||
steps:
|
||||
|
||||
@ -455,12 +633,12 @@ jobs:
|
||||
|
||||
nc-autotools:
|
||||
|
||||
needs: [ nc-cmake-tests-oneoff-serial, nc-ac-tests-oneoff-serial, nc-cmake-tests-oneoff-parallel, nc-ac-tests-oneoff-parallel ]
|
||||
needs: [ nc-cmake-tests-oneoff-serial-shared, nc-cmake-tests-oneoff-serial-static, nc-ac-tests-oneoff-serial-shared, nc-ac-tests-oneoff-serial-static, nc-cmake-tests-oneoff-parallel, nc-ac-tests-oneoff-parallel ]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [1.10.8, 1.12.2, 1.14.0 ]
|
||||
hdf5: [1.10.8, 1.12.2, 1.14.3 ]
|
||||
use_nc4: [ nc3, nc4 ]
|
||||
use_dap: [ dap_off, dap_on ]
|
||||
use_nczarr: [ nczarr_off, nczarr_on ]
|
||||
@ -619,12 +797,12 @@ jobs:
|
||||
|
||||
nc-cmake:
|
||||
|
||||
needs: [ nc-cmake-tests-oneoff-serial, nc-ac-tests-oneoff-serial, nc-cmake-tests-oneoff-parallel, nc-ac-tests-oneoff-parallel ]
|
||||
needs: [ nc-cmake-tests-oneoff-serial-shared, nc-cmake-tests-oneoff-serial-static, nc-ac-tests-oneoff-serial-shared, nc-ac-tests-oneoff-serial-static, nc-cmake-tests-oneoff-parallel, nc-ac-tests-oneoff-parallel ]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.10.8, 1.12.2, 1.14.0 ]
|
||||
hdf5: [ 1.10.8, 1.12.2, 1.14.3 ]
|
||||
use_nc4: [ nc3, nc4 ]
|
||||
use_dap: [ dap_off, dap_on ]
|
||||
use_nczarr: [ nczarr_off, nczarr_on ]
|
||||
|
59
CITATION.cff
Normal file
@ -0,0 +1,59 @@
|
||||
# This CITATION.cff file was generated with cffinit.
|
||||
# Visit https://bit.ly/cffinit to generate yours today!
|
||||
|
||||
cff-version: 1.2.0
|
||||
title: 'NetCDF-C '
|
||||
message: >-
|
||||
If you use this software, please cite it using the
|
||||
metadata from this file.
|
||||
type: software
|
||||
authors:
|
||||
- name: NSF Unidata
|
||||
website: 'https://unidata.ucar.edu'
|
||||
- given-names: Glenn
|
||||
family-names: Davis
|
||||
affiliation: UCAR/Unidata
|
||||
- given-names: Russ
|
||||
family-names: Rew
|
||||
affiliation: UCAR/Unidata
|
||||
- given-names: Dennis
|
||||
family-names: Heimbigner
|
||||
affiliation: UCAR/Unidata
|
||||
- given-names: Edward
|
||||
family-names: Hartnett
|
||||
affiliation: 'UCAR/Unidata, NOAA'
|
||||
- given-names: Ward
|
||||
family-names: Fisher
|
||||
affiliation: UCAR/Unidata
|
||||
- given-names: Many
|
||||
family-names: Others
|
||||
affiliation: >-
|
||||
https://github.com/Unidata/netcdf-c/blob/main/docs/credits.md
|
||||
identifiers:
|
||||
- type: doi
|
||||
value: 10.5065/D6H70CW6
|
||||
description: NetCDF-C library
|
||||
- type: url
|
||||
value: 'https://www.unidata.ucar.edu/software/netcdf/'
|
||||
description: NetCDF Homepage
|
||||
repository-code: 'https://github.com/Unidata/netcdf-c'
|
||||
keywords:
|
||||
- data
|
||||
- netcdf
|
||||
- netcdf-c
|
||||
- data model
|
||||
- software
|
||||
- NSF
|
||||
license: BSD-3-Clause
|
||||
contact:
|
||||
- name: Unidata
|
||||
city: Boulder
|
||||
region: Colorado
|
||||
country: US
|
||||
email: support@unidata.ucar.edu
|
||||
tel: 303-497-8643
|
||||
fax: 303-497-8690
|
||||
website: 'https://www.unidata.ucar.edu'
|
||||
doi: 10.5065/D6H70CW6
|
||||
abstract: >
|
||||
NetCDF (Network Common Data Form) is a set of software libraries and machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. It is also a community standard for sharing scientific data. The Unidata Program Center supports and maintains netCDF programming interfaces for C, C++, Java, and Fortran. Programming interfaces are also available for Python, IDL, MATLAB, R, Ruby, and Perl.
|
127
CMakeLists.txt
@ -6,7 +6,7 @@
|
||||
# Set Project Properties
|
||||
##################################
|
||||
|
||||
cmake_minimum_required(VERSION 3.12.0)
|
||||
cmake_minimum_required(VERSION 3.20.0)
|
||||
|
||||
#Project Name
|
||||
project(netCDF
|
||||
@ -33,6 +33,24 @@ if (NOT DEFINED NETCDF_IS_TOP_LEVEL)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
################################
|
||||
# The target
|
||||
################################
|
||||
|
||||
##
|
||||
# Default building shared libraries.
|
||||
# BUILD_SHARED_LIBS is provided by/used by
|
||||
# CMake directly.
|
||||
##
|
||||
option(BUILD_SHARED_LIBS "Configure netCDF as a shared library." ON)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
add_library(netcdf)
|
||||
add_library(netCDF::netcdf ALIAS netcdf)
|
||||
|
||||
#####
|
||||
# Version Info:
|
||||
#
|
||||
@ -114,7 +132,7 @@ include(GNUInstallDirs)
|
||||
|
||||
if(MSVC)
|
||||
set(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
add_compile_options("/utf-8")
|
||||
target_compile_options(netcdf PUBLIC "/utf-8")
|
||||
endif()
|
||||
|
||||
# auto-configure style checks, other CMake modules.
|
||||
@ -205,16 +223,6 @@ include(GenerateExportHeader)
|
||||
# Compiler and Linker Configuration
|
||||
################################
|
||||
|
||||
##
|
||||
# Default building shared libraries.
|
||||
# BUILD_SHARED_LIBS is provided by/used by
|
||||
# CMake directly.
|
||||
##
|
||||
option(BUILD_SHARED_LIBS "Configure netCDF as a shared library." ON)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
option(NC_FIND_SHARED_LIBS "Find dynamically-built versions of dependent libraries" ${BUILD_SHARED_LIBS})
|
||||
|
||||
##
|
||||
@ -276,17 +284,15 @@ if(MINGW)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_definitions()
|
||||
|
||||
# Suppress CRT Warnings.
|
||||
# Only necessary for Windows
|
||||
if(MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
target_compile_definitions(netcdf PRIVATE _CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
# Support ANSI format specifiers for *printf on MINGW:
|
||||
if(MINGW)
|
||||
add_definitions(-D__USE_MINGW_ANSI_STDIO=1)
|
||||
target_compile_definitions(netcdf PRIVATE __USE_MINGW_ANSI_STDIO=1)
|
||||
endif()
|
||||
|
||||
#####
|
||||
@ -462,8 +468,8 @@ if(WIN32)
|
||||
option(ENABLE_DLL "Build a Windows DLL." ${BUILD_SHARED_LIBS})
|
||||
if(ENABLE_DLL)
|
||||
set(BUILD_DLL ON CACHE BOOL "")
|
||||
add_definitions(-DDLL_NETCDF)
|
||||
add_definitions(-DDLL_EXPORT)
|
||||
target_compile_definitions(netcdf PRIVATE DLL_EXPORT)
|
||||
target_compile_definitions(netcdf PUBLIC DLL_NETCDF)
|
||||
endif()
|
||||
endif()
|
||||
# Did the user specify a default minimum blocksize for posixio?
|
||||
@ -486,14 +492,13 @@ if(NOT ENABLE_NETCDF_4)
|
||||
set(ENABLE_LOGGING OFF)
|
||||
endif()
|
||||
if(ENABLE_LOGGING)
|
||||
add_definitions(-DLOGGING)
|
||||
add_definitions(-DENABLE_SET_LOG_LEVEL)
|
||||
target_compile_definitions(netcdf PRIVATE LOGGING ENABLE_SET_LOG_LEVEL)
|
||||
set(LOGGING ON)
|
||||
set(ENABLE_SET_LOG_LEVEL ON)
|
||||
endif()
|
||||
option(ENABLE_SET_LOG_LEVEL_FUNC "Enable definition of nc_set_log_level()." ON)
|
||||
if(ENABLE_NETCDF_4 AND NOT ENABLE_LOGGING AND ENABLE_SET_LOG_LEVEL_FUNC)
|
||||
add_definitions(-DENABLE_SET_LOG_LEVEL)
|
||||
target_compile_definitions(netcdf PRIVATE -DENABLE_SET_LOG_LEVEL)
|
||||
set(ENABLE_SET_LOG_LEVEL ON)
|
||||
endif()
|
||||
|
||||
@ -568,7 +573,7 @@ if(DEFINED PLUGIN_INSTALL_DIR)
|
||||
if(boolval)
|
||||
set(ENABLE_PLUGIN_INSTALL YES)
|
||||
# No actual value was specified
|
||||
UNset(PLUGIN_INSTALL_DIR CACHE)
|
||||
unset(PLUGIN_INSTALL_DIR CACHE)
|
||||
else()
|
||||
if(boolval STREQUAL "NOTFOUND")
|
||||
# Must be an actual value
|
||||
@ -583,7 +588,7 @@ endif()
|
||||
|
||||
# Ensure no defined plugin dir if not enabled
|
||||
if(NOT ENABLE_PLUGIN_INSTALL)
|
||||
UNset(PLUGIN_INSTALL_DIR CACHE)
|
||||
unset(PLUGIN_INSTALL_DIR CACHE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_PLUGIN_INSTALL)
|
||||
@ -615,17 +620,22 @@ if(ENABLE_PLUGIN_INSTALL)
|
||||
set(PLUGIN_INSTALL_DIR_SETTING "${PLUGIN_INSTALL_DIR}")
|
||||
message("Final value of-DPLUGIN_INSTALL_DIR=${PLUGIN_INSTALL_DIR}")
|
||||
else() # No option specified
|
||||
UNset(PLUGIN_INSTALL_DIR)
|
||||
UNset(PLUGIN_INSTALL_DIR CACHE)
|
||||
unset(PLUGIN_INSTALL_DIR)
|
||||
unset(PLUGIN_INSTALL_DIR CACHE)
|
||||
set(PLUGIN_INSTALL_DIR_SETTING "N.A.")
|
||||
endif()
|
||||
|
||||
# Try to enable NCZarr zip support
|
||||
option(ENABLE_NCZARR_ZIP "Enable NCZarr ZIP support." OFF)
|
||||
|
||||
include(CMakeDependentOption)
|
||||
|
||||
# libdl is always available; built-in in Windows and OSX
|
||||
option(ENABLE_PLUGINS "Enable dynamically loaded plugins (default on)." ON)
|
||||
cmake_dependent_option(ENABLE_PLUGINS "Enable dynamically loaded plugins (default on)."
|
||||
ON "BUILD_SHARED_LIBS" OFF)
|
||||
MESSAGE(STATUS "ENABLE_PLUGINS: ${ENABLE_PLUGINS}")
|
||||
if(MINGW)
|
||||
message(STATUS "MINGW Detected, disabling plugins.")
|
||||
set(ENABLE_PLUGINS OFF CACHE BOOL "Disable plugins" FORCE)
|
||||
else()
|
||||
if(NOT WIN32)
|
||||
@ -634,6 +644,7 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_PLUGINS)
|
||||
set(USEPLUGINS yes)
|
||||
endif()
|
||||
@ -696,7 +707,7 @@ endif()
|
||||
if (NOT ENABLE_S3 AND ENABLE_NCZARR_S3)
|
||||
set(ENABLE_S3 ON CACHE BOOL "NCARR S3" FORCE) # For back compatibility
|
||||
endif()
|
||||
UNset(ENABLE_NCZARR_S3)
|
||||
unset(ENABLE_NCZARR_S3)
|
||||
|
||||
if(NOT ENABLE_REMOTE_FUNCTIONALITY)
|
||||
message(WARNING "ENABLE_REMOTE_FUNCTIONALITY=NO => disable all s3 functionality")
|
||||
@ -936,7 +947,7 @@ endif()
|
||||
|
||||
if(ENABLE_ZERO_LENGTH_COORD_BOUND)
|
||||
message(STATUS "Enabling a more relaxed check for NC_EINVALCOORDS")
|
||||
add_definitions(-DRELAX_COORD_BOUND)
|
||||
target_compile_definitions(netcdf PRIVATE RELAX_COORD_BOUND)
|
||||
endif()
|
||||
|
||||
# Enable Parallel Tests.
|
||||
@ -953,7 +964,7 @@ IF (ENABLE_PARALLEL_TESTS AND NOT USE_PARALLEL)
|
||||
endif()
|
||||
|
||||
# Enable special filter test; experimental when using cmake.
|
||||
option(ENABLE_FILTER_TESTING "Enable filter testing. Ignored if shared libraries or netCDF4 are not enabled" ON)
|
||||
option(ENABLE_FILTER_TESTING "Enable filter testing. Ignored if shared libraries or netCDF4 are not enabled" ${ENABLE_PLUGINS})
|
||||
|
||||
if(ENABLE_FILTER_TESTING)
|
||||
if(NOT ENABLE_HDF5 AND NOT ENABLE_NCZARR)
|
||||
@ -967,12 +978,12 @@ if(NOT BUILD_SHARED_LIBS)
|
||||
set(ENABLE_FILTER_TESTING OFF)
|
||||
endif()
|
||||
|
||||
option(ENABLE_NCZARR_FILTERS "Enable NCZarr filters" ON)
|
||||
option(ENABLE_NCZARR_FILTERS_TESTING "Enable NCZarr filter testing." ON)
|
||||
option(ENABLE_NCZARR_FILTERS "Enable NCZarr filters" ${ENABLE_PLUGINS})
|
||||
option(ENABLE_NCZARR_FILTERS_TESTING "Enable NCZarr filter testing." ${ENABLE_NCZARR_FILTERS})
|
||||
|
||||
# Constraints
|
||||
IF (NOT ENABLE_PLUGINS)
|
||||
message(WARNING "ENABLE_FILTER_TESTING requires shared libraries. Disabling.")
|
||||
if (NOT ENABLE_PLUGINS AND ENABLE_NCZARR_FILTERS)
|
||||
message(WARNING "ENABLE_NCZARR_FILTERS requires ENABLE_PLUGINS. Disabling.")
|
||||
set(ENABLE_NCZARR_FILTERS OFF CACHE BOOL "Enable NCZarr Filters." FORCE)
|
||||
endif()
|
||||
|
||||
@ -1348,15 +1359,12 @@ endif(ENABLE_BASH_SCRIPT_TESTING)
|
||||
# Create config.h file.
|
||||
configure_file("${netCDF_SOURCE_DIR}/config.h.cmake.in"
|
||||
"${netCDF_BINARY_DIR}/config.h")
|
||||
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
include_directories(${netCDF_BINARY_DIR})
|
||||
# End autotools-style checks for config.h
|
||||
|
||||
#####
|
||||
# Set core names of the libraries.
|
||||
#####
|
||||
set(netCDF_LIB_CORENAME "netcdf")
|
||||
|
||||
#####
|
||||
# Set the true names of all the libraries, if customized by external project
|
||||
#####
|
||||
@ -1424,12 +1432,6 @@ if(ENABLE_PLUGINS)
|
||||
add_subdirectory(plugins)
|
||||
endif()
|
||||
|
||||
# For tests and utilities, we are no longer
|
||||
# exporting symbols but rather importing them.
|
||||
if(BUILD_DLL)
|
||||
REMOVE_DEFINITIONS(-DDLL_EXPORT)
|
||||
endif()
|
||||
|
||||
# Enable Utilities.
|
||||
if(BUILD_UTILITIES)
|
||||
include_directories(ncdump)
|
||||
@ -1666,14 +1668,14 @@ else()
|
||||
endif()
|
||||
|
||||
if(WITH_S3_TESTING STREQUAL PUBLIC)
|
||||
set(ENABLE_S3_TESTING "public")
|
||||
set(ENABLE_S3_TESTING "public")
|
||||
elseif(WITH_S3_TESTING)
|
||||
set(ENABLE_S3_TESTING "yes")
|
||||
set(ENABLE_S3_TESTALL "yes")
|
||||
set(ENABLE_S3_TESTING "yes")
|
||||
set(ENABLE_S3_TESTALL "yes")
|
||||
elseif(NOT WITH_S3_TESTING)
|
||||
set(ENABLE_S3_TESTING "no")
|
||||
set(ENABLE_S3_TESTING "no")
|
||||
else()
|
||||
set(ENABLE_S3_TESTING "no")
|
||||
set(ENABLE_S3_TESTING "no")
|
||||
endif()
|
||||
|
||||
# The Unidata testing S3 bucket
|
||||
@ -1799,25 +1801,15 @@ install(EXPORT netCDFTargets
|
||||
NAMESPACE netCDF::
|
||||
)
|
||||
|
||||
export(EXPORT netCDFTargets FILE netCDFTargets.cmake NAMESPACE netCDF::)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
CONFIGURE_PACKAGE_CONFIG_file(
|
||||
configure_package_config_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/netCDFConfig.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/netCDFConfig.cmake"
|
||||
INSTALL_DESTINATION "${ConfigPackageLocation}"
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
||||
PATH_VARS
|
||||
CMAKE_INSTALL_PREFIX
|
||||
CMAKE_INSTALL_INCLUDEDIR
|
||||
CMAKE_INSTALL_LIBDIR
|
||||
)
|
||||
)
|
||||
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/netCDFConfig.cmake"
|
||||
DESTINATION "${ConfigPackageLocation}"
|
||||
COMPONENT headers
|
||||
)
|
||||
|
||||
add_library(netCDF::netcdf ALIAS netcdf)
|
||||
target_include_directories(netcdf
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
@ -1826,17 +1818,18 @@ target_include_directories(netcdf
|
||||
|
||||
# Create export configuration
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/netCDF/netCDFConfigVersion.cmake"
|
||||
netCDFConfigVersion.cmake
|
||||
VERSION ${netCDF_VERSION}
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/netCDF/netCDFConfigVersion.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/netCDFConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/netCDFConfigVersion.cmake"
|
||||
DESTINATION ${ConfigPackageLocation}
|
||||
COMPONENT headers
|
||||
)
|
||||
)
|
||||
|
||||
####
|
||||
# End export files
|
||||
|
@ -33,7 +33,7 @@ cmake CMakeLists.txt COMPILE.cmake.txt config.h.cmake.in \
|
||||
cmake_uninstall.cmake.in FixBundle.cmake.in nc-config.cmake.in \
|
||||
RELEASE_NOTES.md CTestConfig.cmake.in CTestCustom.cmake.in \
|
||||
libnetcdf.settings.in netCDFConfig.cmake.in CMakeInstallation.cmake \
|
||||
test-driver-verbose test_common.in fuzz
|
||||
test-driver-verbose test_common.in fuzz CITATION.cff
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = netcdf.pc
|
||||
|
@ -7,7 +7,8 @@ This file contains a high-level description of this package's evolution. Release
|
||||
|
||||
## 4.9.3 - TBD
|
||||
|
||||
|
||||
* Fix some problems in handling S3 urls with missing regions. See [Github #2819](https://github.com/Unidata/netcdf-c/pull/2819).
|
||||
* Incorporate a more modern look and feel to user documentation generated by Doxygen. See [Doxygen Awesome CSS](https://github.com/jothepro/doxygen-awesome-css) and [Github #2864](https://github.com/Unidata/netcdf-c/pull/2864) for more information.
|
||||
* Added infrastructure to allow for `CMAKE_UNITY_BUILD`, (thanks \@jschueller). See [Github #2839](https://github.com/Unidata/netcdf-c/pull/2839) for more information.
|
||||
* [cmake] Move dependency management out of the root-level `CMakeLists.txt` into two different files in the `cmake/` folder, `dependencies.cmake` and `netcdf_functions_macros.cmake`. See [Github #2838](https://github.com/Unidata/netcdf-c/pull/2838/) for more information.
|
||||
* Obviate a number of irrelevant warnings. See [Github #2781](https://github.com/Unidata/netcdf-c/pull/2781).
|
||||
@ -36,6 +37,8 @@ This file contains a high-level description of this package's evolution. Release
|
||||
* Remove obsolete code. See [Github #2680](https://github.com/Unidata/netcdf-c/pull/2680).
|
||||
* [Bug Fix] Add a crude test to see if an NCZarr path looks like a valid NCZarr/Zarr file. See [Github #2658](https://github.com/Unidata/netcdf-c/pull/2658).
|
||||
* Fix 'make distcheck' error in run_interop.sh. See [Github #2631](https://github.com/Unidata/netcdf-c/pull/2631).
|
||||
* Bump cmake minimum version to 3.20.0 to support finding HDF5 with cmake's find_package
|
||||
* Refactor the cmake files to remove global include directories and compile definitions
|
||||
|
||||
## 4.9.2 - March 14, 2023
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
image: Visual Studio 2017
|
||||
image: Visual Studio 2019
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
@ -6,7 +6,7 @@ environment:
|
||||
CONDA_INSTALL_LOCN: C:\\Miniconda-x64
|
||||
MSYS2_INSTALL_LOCN: C:\msys64
|
||||
MSYS2_BIN_LOCN: C:\msys64\usr\bin
|
||||
CMAKE_GENERATOR: "Visual Studio 15 Win64"
|
||||
CMAKE_GENERATOR: "Visual Studio 16"
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
@ -18,9 +18,9 @@ function(check_hdf5_feature_header)
|
||||
|
||||
message(STATUS "Checking for HDF5 config header")
|
||||
foreach(_h5_header "H5public.h" "H5pubconf.h" "H5pubconf-64.h" "H5pubconf-32.h")
|
||||
check_include_file(${_h5_header} _can_include_h5_header)
|
||||
check_include_file(${_h5_header} _can_include_h5_header${_h5_header})
|
||||
|
||||
if (_can_include_h5_header)
|
||||
if (_can_include_h5_header${_h5_header})
|
||||
message(STATUS "Using ${_h5_header} to check for feature macros")
|
||||
set(_H5_FEATURE_HEADER ${_h5_header} CACHE INTERNAL "")
|
||||
return()
|
||||
|
@ -22,7 +22,11 @@ if(ENABLE_HDF4)
|
||||
if(NOT MFHDF_H_INCLUDE_DIR)
|
||||
message(FATAL_ERROR "HDF4 Support specified, cannot find file mfhdf.h")
|
||||
else()
|
||||
include_directories(${MFHDF_H_INCLUDE_DIR})
|
||||
|
||||
target_include_directories(netcdf
|
||||
PRIVATE
|
||||
${MFHDF_H_INCLUDE_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_library(HDF4_DF_LIB NAMES df libdf hdf)
|
||||
@ -50,7 +54,11 @@ if(ENABLE_HDF4)
|
||||
else()
|
||||
set(HAVE_JPEGLIB_H ON CACHE BOOL "")
|
||||
set(HAVE_LIBJPEG TRUE )
|
||||
include_directories(${JPEGLIB_H_INCLUDE_DIR})
|
||||
|
||||
target_include_directories(netcdf
|
||||
PRIVATE
|
||||
${JPEGLIB_H_INCLUDE_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
find_library(JPEG_LIB NAMES jpeg libjpeg)
|
||||
@ -101,214 +109,41 @@ if(USE_HDF5)
|
||||
##
|
||||
set(HDF5_VERSION_REQUIRED 1.8.10)
|
||||
|
||||
|
||||
###
|
||||
# For now we assume that if we are building netcdf
|
||||
# as a shared library, we will use hdf5 as a shared
|
||||
# library. If we are building netcdf statically,
|
||||
# we will use a static library. This can be toggled
|
||||
# by explicitly modifying NC_FIND_SHARED_LIBS.
|
||||
##
|
||||
# Accommodate developers who have hdf5 libraries and
|
||||
# headers on their system, but do not have a the hdf
|
||||
# .cmake files. If this is the case, they should
|
||||
# specify HDF5_HL_LIBRARY, HDF5_LIBRARY, HDF5_INCLUDE_DIR manually.
|
||||
#
|
||||
# This script will attempt to determine the version of the HDF5 library programatically.
|
||||
##
|
||||
if(HDF5_C_LIBRARY AND HDF5_HL_LIBRARY AND HDF5_INCLUDE_DIR)
|
||||
set(HDF5_LIBRARIES ${HDF5_C_LIBRARY} ${HDF5_HL_LIBRARY} )
|
||||
set(HDF5_C_LIBRARIES ${HDF5_C_LIBRARY} )
|
||||
set(HDF5_C_LIBRARY_hdf5 ${HDF5_C_LIBRARY} )
|
||||
set(HDF5_HL_LIBRARIES ${HDF5_HL_LIBRARY} )
|
||||
include_directories(${HDF5_INCLUDE_DIR})
|
||||
message(STATUS "Using HDF5 C Library: ${HDF5_C_LIBRARY}")
|
||||
message(STATUS "Using HDF5 HL LIbrary: ${HDF5_HL_LIBRARY}")
|
||||
if (EXISTS "${HDF5_INCLUDE_DIR}/H5pubconf.h")
|
||||
file(READ "${HDF5_INCLUDE_DIR}/H5pubconf.h" _hdf5_version_lines
|
||||
REGEX "#define[ \t]+H5_VERSION")
|
||||
string(REGEX REPLACE ".*H5_VERSION .*\"\(.*\)\".*" "\\1" _hdf5_version "${_hdf5_version_lines}")
|
||||
set(HDF5_VERSION "${_hdf5_version}" CACHE STRING "")
|
||||
set(HDF5_VERSION ${HDF5_VERSION} PARENT_SCOPE)
|
||||
unset(_hdf5_version)
|
||||
unset(_hdf5_version_lines)
|
||||
endif ()
|
||||
message(STATUS "Found HDF5 libraries version ${HDF5_VERSION}")
|
||||
###
|
||||
# If HDF5_VERSION is still empty, we have a problem.
|
||||
# Error out.
|
||||
###
|
||||
if("${HDF5_VERSION}" STREQUAL "")
|
||||
message(FATAL_ERR "Unable to determine HDF5 version. NetCDF requires at least version ${HDF5_VERSION_REQUIRED}. Please ensure that libhdf5 is installed and accessible.")
|
||||
endif()
|
||||
#if (MSVC)
|
||||
# if(NC_FIND_SHARED_LIBS)
|
||||
# set(HDF5_USE_STATIC_LIBRARIES OFF)
|
||||
# else()
|
||||
# set(HDF5_USE_STATIC_LIBRARIES ON)
|
||||
# endif()
|
||||
#endif()
|
||||
|
||||
###
|
||||
# Now that we know HDF5_VERSION isn't empty, we can check for minimum required version,
|
||||
# and toggle various options.
|
||||
###
|
||||
if(${HDF5_VERSION} VERSION_LESS ${HDF5_VERSION_REQUIRED})
|
||||
message(FATAL_ERROR "netCDF requires at least HDF5 ${HDF5_VERSION_REQUIRED}. Found ${HDF5_VERSION}.")
|
||||
endif()
|
||||
#####
|
||||
# First, find the C and HL libraries.
|
||||
#####
|
||||
find_package(HDF5 ${HDF5_VERSION_REQUIRED} COMPONENTS C HL REQUIRED)
|
||||
|
||||
else(HDF5_C_LIBRARY AND HDF5_HL_LIBRARY AND HDF5_INCLUDE_DIR) # We are seeking out HDF5 with Find Package.
|
||||
###
|
||||
# For now we assume that if we are building netcdf
|
||||
# as a shared library, we will use hdf5 as a shared
|
||||
# library. If we are building netcdf statically,
|
||||
# we will use a static library. This can be toggled
|
||||
# by explicitly modifying NC_FIND_SHARED_LIBS.
|
||||
##
|
||||
if(NC_FIND_SHARED_LIBS)
|
||||
set(NC_HDF5_LINK_TYPE "shared")
|
||||
set(NC_HDF5_LINK_TYPE_UPPER "SHARED")
|
||||
ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB)
|
||||
else(NC_FIND_SHARED_LIBS)
|
||||
set(NC_HDF5_LINK_TYPE "static")
|
||||
set(NC_HDF5_LINK_TYPE_UPPER "STATIC")
|
||||
ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB )
|
||||
endif(NC_FIND_SHARED_LIBS)
|
||||
|
||||
#####
|
||||
# First, find the C and HL libraries.
|
||||
#
|
||||
# This has been updated to reflect what is in the hdf5
|
||||
# examples, even though the previous version of what we
|
||||
# had worked.
|
||||
#####
|
||||
if(MSVC)
|
||||
set(SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME})
|
||||
find_package(HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS C HL CONFIG REQUIRED ${NC_HDF5_LINK_TYPE})
|
||||
else(MSVC)
|
||||
find_package(HDF5 COMPONENTS C HL REQUIRED)
|
||||
endif(MSVC)
|
||||
|
||||
##
|
||||
# Next, check the HDF5 version. This will inform which
|
||||
# HDF5 variables we need to munge.
|
||||
##
|
||||
|
||||
# Some versions of HDF5 set HDF5_VERSION_STRING instead of HDF5_VERSION
|
||||
if(HDF5_VERSION_STRING AND NOT HDF5_VERSION)
|
||||
set(HDF5_VERSION ${HDF5_VERSION_STRING})
|
||||
endif()
|
||||
|
||||
|
||||
###
|
||||
# If HDF5_VERSION is undefined, attempt to determine it programatically.
|
||||
###
|
||||
if("${HDF5_VERSION}" STREQUAL "")
|
||||
message(STATUS "HDF5_VERSION not detected. Attempting to determine programatically.")
|
||||
IF (EXISTS "${HDF5_INCLUDE_DIR}/H5pubconf.h")
|
||||
file(READ "${HDF5_INCLUDE_DIR}/H5pubconf.h" _hdf5_version_lines
|
||||
REGEX "#define[ \t]+H5_VERSION")
|
||||
string(REGEX REPLACE ".*H5_VERSION .*\"\(.*\)\".*" "\\1" _hdf5_version "${_hdf5_version_lines}")
|
||||
set(HDF5_VERSION "${_hdf5_version}" CACHE STRING "")
|
||||
unset(_hdf5_version)
|
||||
unset(_hdf5_version_lines)
|
||||
message(STATUS "Found HDF5 libraries version ${HDF5_VERSION}")
|
||||
endif()
|
||||
else()
|
||||
set(HDF5_VERSION ${HDF5_VERSION} CACHE STRING "")
|
||||
endif()
|
||||
|
||||
###
|
||||
# If HDF5_VERSION is still empty, we have a problem.
|
||||
# Error out.
|
||||
###
|
||||
if("${HDF5_VERSION}" STREQUAL "")
|
||||
message(FATAL_ERR "Unable to determine HDF5 version. NetCDF requires at least version ${HDF5_VERSION_REQUIRED}. Please ensure that libhdf5 is installed and accessible.")
|
||||
endif()
|
||||
|
||||
###
|
||||
# Now that we know HDF5_VERSION isn't empty, we can check for minimum required version,
|
||||
# and toggle various options.
|
||||
###
|
||||
|
||||
if(${HDF5_VERSION} VERSION_LESS ${HDF5_VERSION_REQUIRED})
|
||||
message(FATAL_ERROR "netCDF requires at least HDF5 ${HDF5_VERSION_REQUIRED}. Found ${HDF5_VERSION}.")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
##
|
||||
# Include the HDF5 include directory.
|
||||
##
|
||||
if(HDF5_INCLUDE_DIRS AND NOT HDF5_INCLUDE_DIR)
|
||||
set(HDF5_INCLUDE_DIR ${HDF5_INCLUDE_DIRS} )
|
||||
endif()
|
||||
message(STATUS "Using HDF5 include dir: ${HDF5_INCLUDE_DIR}")
|
||||
include_directories(${HDF5_INCLUDE_DIR})
|
||||
|
||||
###
|
||||
# This is the block where we figure out what the appropriate
|
||||
# variables are, and we ensure that we end up with
|
||||
# HDF5_C_LIBRARY, HDF5_HL_LIBRARY and HDF5_LIBRARIES.
|
||||
###
|
||||
if(MSVC)
|
||||
####
|
||||
# Environmental variables in Windows when using MSVC
|
||||
# are a hot mess between versions.
|
||||
####
|
||||
|
||||
##
|
||||
# HDF5 1.8.15 defined HDF5_LIBRARIES.
|
||||
##
|
||||
if(${HDF5_VERSION} VERSION_LESS "1.8.16")
|
||||
set(HDF5_C_LIBRARY hdf5 )
|
||||
set(HDF5_C_LIBRARY_hdf5 hdf5 )
|
||||
endif(${HDF5_VERSION} VERSION_LESS "1.8.16")
|
||||
|
||||
if(${HDF5_VERSION} VERSION_GREATER "1.8.15")
|
||||
if(NOT HDF5_LIBRARIES AND HDF5_C_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY AND HDF5_HL_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY)
|
||||
set(HDF5_C_LIBRARY ${HDF5_C_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY} )
|
||||
set(HDF5_C_LIBRARY_hdf5 ${HDF5_C_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY} )
|
||||
set(HDF5_HL_LIBRARY ${HDF5_HL_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY} )
|
||||
|
||||
set(HDF5_LIBRARIES ${HDF5_C_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY} ${HDF5_HL_${NC_HDF5_LINK_TYPE_UPPER}_LIBRARY} )
|
||||
endif()
|
||||
endif(${HDF5_VERSION} VERSION_GREATER "1.8.15")
|
||||
|
||||
else(MSVC)
|
||||
|
||||
# Depending on the install, either HDF5_hdf_library or
|
||||
# HDF5_C_LIBRARIES may be defined. We must check for either.
|
||||
if(HDF5_C_LIBRARIES AND NOT HDF5_hdf5_LIBRARY)
|
||||
set(HDF5_hdf5_LIBRARY ${HDF5_C_LIBRARIES} )
|
||||
endif()
|
||||
|
||||
# Some versions of find_package set HDF5_C_LIBRARIES, but not HDF5_C_LIBRARY
|
||||
# We use HDF5_C_LIBRARY below, so need to make sure it is set.
|
||||
if(HDF5_C_LIBRARIES AND NOT HDF5_C_LIBRARY)
|
||||
set(HDF5_C_LIBRARY ${HDF5_C_LIBRARIES} )
|
||||
endif()
|
||||
|
||||
# Same issue as above...
|
||||
if(HDF5_HL_LIBRARIES AND NOT HDF5_HL_LIBRARY)
|
||||
set(HDF5_HL_LIBRARY ${HDF5_HL_LIBRARIES} )
|
||||
endif()
|
||||
|
||||
endif(MSVC)
|
||||
if(NOT HDF5_C_LIBRARY)
|
||||
set(HDF5_C_LIBRARY hdf5 )
|
||||
endif()
|
||||
|
||||
endif(HDF5_C_LIBRARY AND HDF5_HL_LIBRARY AND HDF5_INCLUDE_DIR)
|
||||
message(STATUS "Using HDF5 include dir: ${HDF5_INCLUDE_DIRS}")
|
||||
target_link_libraries(netcdf
|
||||
PRIVATE
|
||||
HDF5::HDF5
|
||||
)
|
||||
|
||||
find_package(Threads)
|
||||
|
||||
# There is a missing case in the above code so default it
|
||||
if(NOT HDF5_C_LIBRARY_hdf5 OR "${HDF5_C_LIBRARY_hdf5}" STREQUAL "" )
|
||||
set(HDF5_C_LIBRARY_hdf5 "${HDF5_C_LIBRARY}" )
|
||||
endif()
|
||||
|
||||
find_path(HAVE_HDF5_H hdf5.h PATHS ${HDF5_INCLUDE_DIR} NO_DEFAULT_PATH)
|
||||
if(NOT HAVE_HDF5_H)
|
||||
message(FATAL_ERROR "Compiling a test with hdf5 failed. Either hdf5.h cannot be found, or the log messages should be checked for another reason.")
|
||||
else(NOT HAVE_HDF5_H)
|
||||
include_directories(${HAVE_HDF5_H})
|
||||
endif(NOT HAVE_HDF5_H)
|
||||
|
||||
include(cmake/check_hdf5.cmake)
|
||||
set (CMAKE_REQUIRED_INCLUDES ${HDF5_INCLUDE_DIRS})
|
||||
|
||||
# Check to ensure that HDF5 was built with zlib.
|
||||
# This needs to be near the beginning since we
|
||||
# need to know whether to add "-lz" to the symbol
|
||||
# tests below.
|
||||
|
||||
include(check_hdf5)
|
||||
check_hdf5_feature(HAVE_HDF5_ZLIB H5_HAVE_ZLIB_H)
|
||||
if(NOT HAVE_HDF5_ZLIB)
|
||||
message(FATAL_ERROR "HDF5 was built without zlib. Rebuild HDF5 with zlib.")
|
||||
@ -341,38 +176,22 @@ if(USE_HDF5)
|
||||
set(HDF5_UTF8_PATHS OFF )
|
||||
endif()
|
||||
|
||||
message("-- HDF5_UTF8_PATHS (HDF5 version 1.10.6+): ${HDF5_UTF8_PATHS}")
|
||||
message(STATUS "-- HDF5_UTF8_PATHS (HDF5 version 1.10.6+): ${HDF5_UTF8_PATHS}")
|
||||
|
||||
# Find out if HDF5 was built with parallel support.
|
||||
# Do that by checking for the targets H5Pget_fapl_mpiposx and
|
||||
# H5Pget_fapl_mpio in ${HDF5_LIB}.
|
||||
set(HDF5_PARALLEL ${HDF5_IS_PARALLEL})
|
||||
|
||||
# H5Pset_fapl_mpiposix and H5Pget_fapl_mpiposix have been removed since HDF5 1.8.12.
|
||||
# Use H5Pset_fapl_mpio and H5Pget_fapl_mpio, instead.
|
||||
# CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pget_fapl_mpiposix "" HDF5_IS_PARALLEL_MPIPOSIX)
|
||||
|
||||
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pget_fapl_mpio "" HDF5_IS_PARALLEL_MPIO)
|
||||
if(HDF5_IS_PARALLEL_MPIO)
|
||||
set(HDF5_PARALLEL ON)
|
||||
else()
|
||||
set(HDF5_PARALLEL OFF)
|
||||
endif()
|
||||
set(HDF5_PARALLEL ${HDF5_PARALLEL} )
|
||||
set(CMAKE_REQUIRED_LIBRARIES HDF5::HDF5)
|
||||
include(CheckSymbolExists)
|
||||
|
||||
#Check to see if HDF5 library has collective metadata APIs, (HDF5 >= 1.10.0)
|
||||
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_all_coll_metadata_ops "" HDF5_HAS_COLL_METADATA_OPS)
|
||||
|
||||
if(HDF5_PARALLEL)
|
||||
set(HDF5_CC h5pcc )
|
||||
else()
|
||||
set(HDF5_CC h5cc )
|
||||
endif()
|
||||
check_symbol_exists(H5Pset_all_coll_metadata_ops "hdf5.h" HDF5_HAS_COLL_METADATA_OPS)
|
||||
|
||||
# Check to see if H5Dread_chunk is available
|
||||
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Dread_chunk "" HAS_READCHUNKS)
|
||||
check_symbol_exists(H5Dread_chunk "hdf5.h" HAS_READCHUNKS)
|
||||
|
||||
# Check to see if H5Pset_fapl_ros3 is available
|
||||
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_fapl_ros3 "" HAS_HDF5_ROS3)
|
||||
check_symbol_exists(H5Pset_fapl_ros3 "hdf5.h" HAS_HDF5_ROS3)
|
||||
|
||||
# Check to see if this is hdf5-1.10.3 or later.
|
||||
if(HAS_READCHUNKS)
|
||||
@ -392,17 +211,6 @@ if(USE_HDF5)
|
||||
set(HDF5_HAS_PAR_FILTERS FALSE CACHE BOOL "" )
|
||||
set(HAS_PAR_FILTERS no CACHE STRING "" )
|
||||
endif()
|
||||
|
||||
find_path(HAVE_HDF5_H hdf5.h PATHS ${HDF5_INCLUDE_DIR} NO_DEFAULT_PATH)
|
||||
if(NOT HAVE_HDF5_H)
|
||||
message(FATAL_ERROR "Compiling a test with hdf5 failed. Either hdf5.h cannot be found, or the log messages should be checked for another reason.")
|
||||
else(NOT HAVE_HDF5_H)
|
||||
include_directories(${HAVE_HDF5_H})
|
||||
endif(NOT HAVE_HDF5_H)
|
||||
|
||||
#option to include HDF5 High Level header file (hdf5_hl.h) in case we are not doing a make install
|
||||
include_directories(${HDF5_HL_INCLUDE_DIR})
|
||||
|
||||
endif(USE_HDF5)
|
||||
|
||||
################################
|
||||
@ -410,9 +218,18 @@ endif(USE_HDF5)
|
||||
################################
|
||||
# See if we have libcurl
|
||||
find_package(CURL)
|
||||
ADD_DEFINITIONS(-DCURL_STATICLIB=1)
|
||||
include_directories(${CURL_INCLUDE_DIRS})
|
||||
target_compile_options(netcdf
|
||||
PRIVATE
|
||||
-DCURL_STATICLIB=1
|
||||
)
|
||||
target_include_directories(netcdf
|
||||
PRIVATE
|
||||
${CURL_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
||||
|
||||
MESSAGE(STATUS "Found CURL_INCLUDE_DIRS: ${CURL_INCLUDE_DIRS}")
|
||||
# Define a test flag for have curl library
|
||||
if(CURL_LIBRARIES OR CURL_LIBRARY)
|
||||
set(FOUND_CURL TRUE)
|
||||
@ -517,7 +334,10 @@ find_package(ZLIB)
|
||||
|
||||
# Define a test flag for have zlib library
|
||||
if(ZLIB_FOUND)
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
target_include_directories(netcdf
|
||||
PRIVATE
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
)
|
||||
set(ENABLE_ZLIB TRUE)
|
||||
else()
|
||||
set(ENABLE_ZLIB FALSE)
|
||||
@ -563,7 +383,10 @@ endif()
|
||||
|
||||
IF (ENABLE_NCZARR_ZIP)
|
||||
find_package(Zip REQUIRED)
|
||||
include_directories(${Zip_INCLUDE_DIRS})
|
||||
target_include_directories(netcdf
|
||||
PRIVATE
|
||||
${Zip_INCLUDE_DIRS}
|
||||
)
|
||||
endif ()
|
||||
|
||||
################################
|
||||
@ -578,7 +401,10 @@ if(ENABLE_S3)
|
||||
find_package(AWSSDK REQUIRED COMPONENTS s3;transfer)
|
||||
if(AWSSDK_FOUND)
|
||||
set(ENABLE_S3_AWS ON CACHE BOOL "S3 AWS" FORCE)
|
||||
include_directories(${AWSSDK_INCLUDE_DIR})
|
||||
target_include_directories(netcdf
|
||||
PRIVATE
|
||||
${AWSSDK_INCLUDE_DIR}
|
||||
)
|
||||
else(AWSSDK_FOUND)
|
||||
set(ENABLE_S3_AWS OFF CACHE BOOL "S3 AWS" FORCE)
|
||||
endif(AWSSDK_FOUND)
|
||||
@ -608,7 +434,10 @@ if(ENABLE_LIBXML2)
|
||||
find_package(LibXml2)
|
||||
if(LibXml2_FOUND)
|
||||
set(HAVE_LIBXML2 TRUE)
|
||||
include_directories(${LIBXML2_INCLUDE_DIRS})
|
||||
target_include_directories(netcdf
|
||||
PRIVATE
|
||||
${LIBXML2_INCLUDE_DIRS}
|
||||
)
|
||||
set(XMLPARSER "libxml2")
|
||||
else()
|
||||
set(HAVE_LIBXML2 FALSE)
|
||||
|
@ -150,14 +150,12 @@ macro(build_bin_test F)
|
||||
target_link_libraries(${F} netcdf ${ALL_TLL_LIBS})
|
||||
if(MSVC)
|
||||
set_target_properties(${F}
|
||||
PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
|
||||
)
|
||||
set_target_properties(${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
PROPERTIES
|
||||
LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@ -167,12 +165,11 @@ macro(add_bin_test_no_prefix F)
|
||||
add_test(${F} ${EXECUTABLE_OUTPUT_PATH}/${F})
|
||||
if(MSVC)
|
||||
set_property(TEST ${F} PROPERTY FOLDER "tests/")
|
||||
set_target_properties(${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(${F} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@ -181,12 +178,11 @@ macro(build_bin_test_no_prefix F)
|
||||
build_bin_test(${F})
|
||||
if(MSVC)
|
||||
#SET_PROPERTY(TEST ${F} PROPERTY FOLDER "tests/")
|
||||
set_target_properties(${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(${F} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@ -207,12 +203,12 @@ macro(add_bin_test prefix F)
|
||||
)
|
||||
if(MSVC)
|
||||
set_property(TEST ${prefix}_${F} PROPERTY FOLDER "tests/")
|
||||
set_target_properties(${prefix}_${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(${prefix}_${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(${prefix}_${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_target_properties(${prefix}_${F}
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
@ -283,12 +283,6 @@ are set when opening a binary file on Windows. */
|
||||
/* Define to 1 if you have libsz */
|
||||
#cmakedefine HAVE_SZ 1
|
||||
|
||||
/* Define to 1 if you have the <hdf5.h> header file. */
|
||||
#cmakedefine HAVE_HDF5_H 1
|
||||
|
||||
/* Define to 1 if you have the <hdf5.h> header file. */
|
||||
#cmakedefine HAVE_HDF5_HL_H 1
|
||||
|
||||
/* Define to 1 if the system has the type `int64'. */
|
||||
#cmakedefine HAVE_INT64 1
|
||||
|
||||
|
@ -1077,7 +1077,7 @@ HTML_FILE_EXTENSION = .html
|
||||
# of the possible markers and block names see the documentation.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_HEADER =
|
||||
HTML_HEADER = ./docs/developer_header.html
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
|
||||
# generated HTML page. If the tag is left blank doxygen will generate a standard
|
||||
@ -1110,7 +1110,8 @@ HTML_STYLESHEET =
|
||||
# see the documentation.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_EXTRA_STYLESHEET =
|
||||
HTML_EXTRA_STYLESHEET = ./docs/doxygen-awesome-css/doxygen-awesome.css
|
||||
HTML_COLORSTYLE = LIGHT
|
||||
|
||||
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
|
||||
# other source files which should be copied to the HTML output directory. Note
|
||||
@ -1120,7 +1121,7 @@ HTML_EXTRA_STYLESHEET =
|
||||
# files will be copied as-is; there are no commands or markers available.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_EXTRA_FILES =
|
||||
HTML_EXTRA_FILES = ./docs/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js
|
||||
|
||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
|
||||
# will adjust the colors in the stylesheet and background images according to
|
||||
|
743
docs/Doxyfile.in
24
docs/FAQ.md
@ -1944,23 +1944,12 @@ Not at this time; it is required to instead build first one version, and then th
|
||||
How can I specify linking against a particular library? {#partlib}
|
||||
-------------------------------------------------------
|
||||
|
||||
It depends on the library. To specify a custom `ZLib`, for example, you would do the following:
|
||||
|
||||
$ cmake [Source Directory] -DZLIB_LIBRARY=/path/to/my/zlib.lib
|
||||
|
||||
|
||||
`HDF5` is more complex, since it requires both the `hdf5` and `hdf5_hl` libraries. You would specify custom `HDF5` libraries as follows:
|
||||
|
||||
$ cmake [Source Directory] -DHDF5_C_LIBRARY=/path/to/hdf5.lib \
|
||||
-DHDF5_HL_LIBRARY=/path/to/hdf5_hl.lib \
|
||||
-DHDF5_INCLUDE_DIR=/path/to/hdf5/include
|
||||
|
||||
|
||||
Alternatively, you may specify:
|
||||
For most libraries, you can specify `<library name>_ROOT`. To specify
|
||||
custom `ZLib` and `HDF5`, for example, you would do the following:
|
||||
|
||||
$ cmake [Source Directory] \
|
||||
-DHDF5_LIBRARIES="/path/to/hdf5.lib;/path/to/hdf5_hl.lib" \
|
||||
-DHDF5_INCLUDE_DIRS=/path/to/hdf5/include/
|
||||
-DZLIB_ROOT=/path/to/zlib/install \
|
||||
-DHDF5_ROOT=/path/to/hdf5/install
|
||||
|
||||
|
||||
What if I want to link against multiple libraries in a non-standard location {#nonstdloc}
|
||||
@ -1982,11 +1971,8 @@ How can I specify a Parallel Build using HDF5 {#parallelhdf}
|
||||
|
||||
If cmake is having problems finding the parallel `HDF5` install, you can specify the location manually:
|
||||
|
||||
|
||||
$ cmake [Source Directory] -DENABLE_PARALLEL=ON \
|
||||
-DHDF5_C_LIBRARY=/usr/lib64/openmpi/lib/libhdf5.so \
|
||||
-DHDF5_HL_LIBRARY=/usr/lib64/openmpi/lib/libhdf5.hl.so \
|
||||
-DHDF5_INCLUDE_DIR=/usr/include/openmpi-x86_64 \
|
||||
-DHDF5_ROOT=/usr/lib64/openmpi/lib/
|
||||
|
||||
You will, of course, need to use the location of the libraries specific to your development environment.
|
||||
|
||||
|
@ -14,7 +14,9 @@ notes.md install-fortran.md credits.md auth.md filters.md \
|
||||
obsolete/fan_utils.html indexing.dox inmemory.md FAQ.md \
|
||||
known_problems.md COPYRIGHT.md inmeminternal.dox testserver.dox \
|
||||
byterange.md nczarr.md quantize.md all-error-codes.md \
|
||||
quickstart_paths.md cloud.md
|
||||
quickstart_paths.md cloud.md header.html attribute_conventions.md \
|
||||
file_format_specifications.md quickstart_filters.md \
|
||||
doxygen-awesome-css netcdf-50x50.png
|
||||
|
||||
# Turn off parallel builds in this directory.
|
||||
.NOTPARALLEL:
|
||||
@ -54,8 +56,7 @@ endif
|
||||
# includes them in the documentation.
|
||||
|
||||
doxyfile.stamp:
|
||||
$(DOXYGEN) Doxyfile \
|
||||
cp auth.md obsolete/fan_utils.html html
|
||||
$(DOXYGEN) Doxyfile && cp $(top_srcdir)/docs/auth.md $(top_srcdir)/docs/obsolete/fan_utils.html html
|
||||
|
||||
CLEANFILES = doxyfile.stamp
|
||||
|
||||
|
@ -23,8 +23,8 @@ by Robert Pincus. Ed Hartnett updated and simplified the configure-based
|
||||
installation, enhanced Windows support, refactored the documentation
|
||||
while converting it into texinfo, and is the primary developer for
|
||||
netCDF-4. Dennis Heimbigner wrote the netCDF-4 version of ncgen, the C
|
||||
OPeNDAP client, the dispatch layer, and the implementation of diskless
|
||||
files. The nccopy utility was added by Russ Rew. Lynton Appel developed
|
||||
OPeNDAP client, the ncZarr interface, the dispatch layer, and the implementation
|
||||
of diskless files. The nccopy utility was added by Russ Rew. Lynton Appel developed
|
||||
the C++ implementation for netCDF-4. Ward Fisher overhauled netCDF release-engineering, developed a new build-and-test framework using CMake, virtualization, and container technologies, moved sources to GitHub, developed a Windows/Microsoft Visual Studio port, refactored documentation for improved web access, and merged all the documentation into the sources for maintaining with Markdown and Doxygen.
|
||||
|
||||
The following people have contributed related software, bug reports,
|
||||
|
90
docs/developer_header.html
Normal file
@ -0,0 +1,90 @@
|
||||
<!-- HTML header for doxygen 1.10.0-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="$langISO">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen $doxygenversion"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
|
||||
<!--BEGIN PROJECT_ICON-->
|
||||
<link rel="icon" href="$relpath^$projecticon" type="image/x-icon" />
|
||||
<!--END PROJECT_ICON-->
|
||||
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<script type="text/javascript">var page_layout=1;</script>
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||
<!--BEGIN COPY_CLIPBOARD-->
|
||||
<script type="text/javascript" src="$relpath^clipboard.js"></script>
|
||||
<!--END COPY_CLIPBOARD-->
|
||||
$treeview
|
||||
$search
|
||||
$mathjax
|
||||
$darkmode
|
||||
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
|
||||
$extrastylesheet
|
||||
<html>
|
||||
<head>
|
||||
<!-- ... other metadata & script includes ... -->
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeDarkModeToggle.init()
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
|
||||
<!--BEGIN TITLEAREA-->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<!--BEGIN PROJECT_LOGO-->
|
||||
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"$logosize/></td>
|
||||
<!--END PROJECT_LOGO-->
|
||||
<!--BEGIN PROJECT_NAME-->
|
||||
<td id="projectalign">
|
||||
<div id="projectname">$projectname<!--BEGIN PROJECT_NUMBER--><span id="projectnumber"> $projectnumber</span><!--END PROJECT_NUMBER-->
|
||||
</div>
|
||||
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
|
||||
</td>
|
||||
<!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME-->
|
||||
<!--BEGIN PROJECT_BRIEF-->
|
||||
<td>
|
||||
<div id="projectbrief">$projectbrief</div>
|
||||
</td>
|
||||
<!--END PROJECT_BRIEF-->
|
||||
<!--END !PROJECT_NAME-->
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN SEARCHENGINE-->
|
||||
<!--BEGIN !FULL_SIDEBAR-->
|
||||
<td>$searchbox</td>
|
||||
<!--END !FULL_SIDEBAR-->
|
||||
<!--END SEARCHENGINE-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
</tr>
|
||||
<!--BEGIN SEARCHENGINE-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<tr><td colspan="2">$searchbox</td></tr>
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END SEARCHENGINE-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--END TITLEAREA-->
|
||||
<!-- end header part -->
|
3
docs/doxygen-awesome-css/.npmignore
Normal file
@ -0,0 +1,3 @@
|
||||
*
|
||||
!doxygen-awesome*
|
||||
|
2793
docs/doxygen-awesome-css/Doxyfile
Normal file
21
docs/doxygen-awesome-css/LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 - 2023 jothepro
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
171
docs/doxygen-awesome-css/README.md
Normal file
@ -0,0 +1,171 @@
|
||||
# Doxygen Awesome
|
||||
|
||||
[](https://github.com/jothepro/doxygen-awesome-css/releases/latest)
|
||||
[](https://github.com/jothepro/doxygen-awesome-css/blob/main/LICENSE)
|
||||

|
||||
|
||||
<div class="title_screenshot">
|
||||
|
||||

|
||||
|
||||
</div>
|
||||
|
||||
**Doxygen Awesome** is a custom CSS theme for Doxygen HTML documentation with lots of customization parameters.
|
||||
|
||||
## Motivation
|
||||
|
||||
I really like how the Doxygen HTML documentation is structured! But IMHO it looks a bit outdated.
|
||||
|
||||
This theme is an attempt to update the visuals of Doxygen without changing its overall layout too much.
|
||||
|
||||
## Features
|
||||
|
||||
- 🌈 Clean, modern design
|
||||
- 🚀 Heavily customizable by adjusting CSS variables
|
||||
- 🧩 No changes to the HTML structure of Doxygen are required
|
||||
- 📱 Improved mobile usability
|
||||
- 🌘 Dark mode support!
|
||||
- 🥇 Works best with **doxygen 1.9.1** - **1.9.4** and **1.9.6** - **1.9.8**
|
||||
|
||||
## Examples
|
||||
|
||||
Some websites using this theme:
|
||||
|
||||
- [Documentation of this repository](https://jothepro.github.io/doxygen-awesome-css/)
|
||||
- [wxWidgets](https://docs.wxwidgets.org/3.2/)
|
||||
- [OpenCV 5.x](https://docs.opencv.org/5.x/)
|
||||
- [Zephyr](https://docs.zephyrproject.org/latest/doxygen/html/index.html)
|
||||
- [FELTOR](https://mwiesenberger.github.io/feltor/dg/html/modules.html)
|
||||
- [Spatial Audio Framework (SAF)](https://leomccormack.github.io/Spatial_Audio_Framework/index.html)
|
||||
- [libCloudSync](https://jothepro.github.io/libCloudSync/)
|
||||
- [libsl3](https://a4z.github.io/libsl3/)
|
||||
|
||||
## Installation
|
||||
|
||||
To use the theme when generating your documentation, bring the required CSS and JS files from this repository into your project.
|
||||
|
||||
This can be done in several ways:
|
||||
|
||||
- manually copying the files
|
||||
- adding the project as a Git submodule
|
||||
- adding the project as a npm/xpm dependency
|
||||
- installing the theme system-wide
|
||||
|
||||
All theme files are located in the root of this repository and start with the prefix `doxygen-awesome-`. You may not need all of them. Follow the install instructions to figure out what files are required for your setup.
|
||||
|
||||
### Git submodule
|
||||
For projects that use git, add the repository as a submodule and check out the desired release:
|
||||
|
||||
```sh
|
||||
git submodule add https://github.com/jothepro/doxygen-awesome-css.git
|
||||
cd doxygen-awesome-css
|
||||
git checkout v2.3.1
|
||||
```
|
||||
|
||||
### npm/xpm dependency
|
||||
|
||||
In the npm ecosystem, this project can be added as a development dependency
|
||||
to your project:
|
||||
|
||||
```sh
|
||||
cd your-project
|
||||
npm install https://github.com/jothepro/doxygen-awesome-css#v2.3.1 --save-dev
|
||||
|
||||
ls -l node_module/@jothepro/doxygen-awesome-css
|
||||
```
|
||||
|
||||
Similarly, in the [xPack](https://xpack.github.io) ecosystem, this project can be added
|
||||
as a development dependency to an [`xpm`](https://xpack.github.io/xpm/)
|
||||
managed project.
|
||||
|
||||
### System-wide
|
||||
|
||||
You can even install the theme system-wide by running `make install`.
|
||||
The files will be installed to `/usr/local/share/` by default,
|
||||
but you can customize the install location with `make PREFIX=/my/custom/path install`.
|
||||
|
||||
### Choosing a layout
|
||||
|
||||
There are two layout options. Choose one of them and configure Doxygen accordingly:
|
||||
|
||||
<div class="tabbed">
|
||||
|
||||
- <b class="tab-title">Base Theme</b><div class="darkmode_inverted_image">
|
||||

|
||||
</div>
|
||||
Comes with the typical Doxygen titlebar. Optionally the treeview in the sidebar can be enabled.
|
||||
|
||||
Required files: `doxygen-awesome.css`
|
||||
|
||||
Required `Doxyfile` configuration:
|
||||
```
|
||||
GENERATE_TREEVIEW = YES # optional. Also works without treeview
|
||||
DISABLE_INDEX = NO
|
||||
FULL_SIDEBAR = NO
|
||||
HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css
|
||||
HTML_COLORSTYLE = LIGHT # required with Doxygen >= 1.9.5
|
||||
```
|
||||
|
||||
- <b class="tab-title">Sidebar-Only Theme</b><div class="darkmode_inverted_image">
|
||||

|
||||
</div>
|
||||
Hides the top titlebar to give more space to the content. The treeview must be enabled in order for this theme to work.
|
||||
|
||||
Required files: `doxygen-awesome.css`, `doxygen-awesome-sidebar-only.css`
|
||||
|
||||
Required `Doxyfile` configuration:
|
||||
```
|
||||
|
||||
GENERATE_TREEVIEW = YES # required!
|
||||
DISABLE_INDEX = NO
|
||||
FULL_SIDEBAR = NO
|
||||
HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css \
|
||||
doxygen-awesome-css/doxygen-awesome-sidebar-only.css
|
||||
HTML_COLORSTYLE = LIGHT # required with Doxygen >= 1.9.5
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
@warning
|
||||
- This theme is not compatible with the `FULL_SIDEBAR = YES` option provided by Doxygen!
|
||||
- `HTML_COLORSTYLE` must be set to `LIGHT` since Doxygen 1.9.5!
|
||||
|
||||
### Further installation instructions
|
||||
|
||||
- [Installing extensions](docs/extensions.md)
|
||||
- [Customizing the theme (colors, spacing, border-radius, ...)](docs/customization.md)
|
||||
- [Tips and Tricks for further configuration](docs/tricks.md)
|
||||
|
||||
## Browser support
|
||||
|
||||
Tested with
|
||||
|
||||
- Chrome 119, Chrome 119 for Android, Chrome 119 for iOS
|
||||
- Safari 17, Safari for iOS 16
|
||||
- Firefox 118, Firefox 120 for Android, Firefox 119 for iOS
|
||||
- Edge 119
|
||||
|
||||
|
||||
The theme does not strive to be backward compatible with (significantly) older browser versions.
|
||||
|
||||
|
||||
## Credits
|
||||
|
||||
Thanks for all the bug reports and inspiring feedback on GitHub!
|
||||
|
||||
Special thanks to all the contributors:
|
||||
<br><br>
|
||||
<a href="https://github.com/jothepro/doxygen-awesome-css/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=jothepro/doxygen-awesome-css" />
|
||||
</a>
|
||||
|
||||
|
||||
<div class="section_buttons">
|
||||
|
||||
| Read Next |
|
||||
|---------------------------------:|
|
||||
| [Extensions](docs/extensions.md) |
|
||||
|
||||
</div>
|
119
docs/doxygen-awesome-css/docs/customization.md
Normal file
@ -0,0 +1,119 @@
|
||||
# Customization
|
||||
|
||||
[TOC]
|
||||
|
||||
|
||||
## CSS-Variables
|
||||
|
||||
This theme is highly customizable because a lot of things are parameterized with CSS variables.
|
||||
|
||||
Just to give you an idea of how flexible the styling is, click this button:
|
||||
|
||||
<div class="alter-theme-button" onclick="toggle_alternative_theme()" onkeypress="if (event.keyCode == 13) toggle_alternative_theme()" tabindex=0>Alter theme</div>
|
||||
|
||||
### Setup
|
||||
|
||||
It is recommended to add your own `custom.css` and overwrite the variables there:
|
||||
```
|
||||
HTML_EXTRA_STYLESHEET = doxygen-awesome.css custom.css
|
||||
```
|
||||
|
||||
Make sure to override the variables in the correct spot. All variables should be customized where they have been defined, in the `html` tag selector:
|
||||
|
||||
```css
|
||||
html {
|
||||
/* override light-mode variables here */
|
||||
}
|
||||
```
|
||||
|
||||
For dark-mode overrides, you have to choose where to put them, depending on whether the dark-mode toggle extension is installed or not:
|
||||
|
||||
<div class="tabbed">
|
||||
|
||||
- <b class="tab-title">dark-mode toggle is installed</b>
|
||||
```css
|
||||
html.dark-mode {
|
||||
/* define dark-mode variable overrides here if you DO use doxygen-awesome-darkmode-toggle.js */
|
||||
}
|
||||
```
|
||||
- <b class="tab-title">dark-mode toggle is **NOT** installed</b>
|
||||
The dark-mode is enabled automatically depending on the system preference:
|
||||
```css
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html:not(.light-mode) {
|
||||
/* define dark-mode variable overrides here if you DON'T use doxygen-awesome-darkmode-toggle.js */
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
### Available variables
|
||||
|
||||
The following list gives an overview of the variables defined in [`doxygen-awesome.css`](https://github.com/jothepro/doxygen-awesome-css/blob/main/doxygen-awesome.css).
|
||||
|
||||
The list is not complete. To explore all available variables, have a look at the CSS starting from [here](https://github.com/jothepro/doxygen-awesome-css/blob/main/doxygen-awesome.css#L30).
|
||||
All variables are defined at the beginning of the stylesheet.
|
||||
|
||||
| Parameter | Default (Light) | Default (Dark) |
|
||||
| :---------------------------------- | :---------------------------------------------------------- | :---------------------------------------------------------- |
|
||||
| **Color Scheme**:<br>primary theme colors. This will affect the entire websites color scheme: links, arrows, labels, ... |||
|
||||
| `--primary-color` | <code style="background:#1779c4;color:white">#1779c4</code> | <code style="background:#1982d2;color:white">#1982d2</code> |
|
||||
| `--primary-dark-color` | <code style="background:#335c80;color:white">#335c80</code> | <code style="background:#5ca8e2;color:black">#5ca8e2</code> |
|
||||
| `--primary-light-color` | <code style="background:#70b1e9;color:black">#70b1e9</code> | <code style="background:#4779ac;color:white">#4779ac</code> |
|
||||
| **Page Colors**:<br>background and foreground (text-color) of the documentation. |||
|
||||
| `--page-background-color` | <code style="background:#ffffff;color:black">#ffffff</code> | <code style="background:#1C1D1F;color:white">#1C1D1F</code> |
|
||||
| `--page-foreground-color` | <code style="background:#2f4153;color:white">#2f4153</code> | <code style="background:#d2dbde;color:black">#d2dbde</code> |
|
||||
| `--page-secondary-foreground-color` | <code style="background:#6f7e8e;color:white">#6f7e8e</code> | <code style="background:#859399;color:white">#859399</code> |
|
||||
| **Spacing:**<br>default spacings. Most ui components reference these values for spacing, to provide uniform spacing on the page. |||
|
||||
| `--spacing-small` | `5px` | |
|
||||
| `--spacing-medium` | `10px` | |
|
||||
| `--spacing-large` | `16px` | |
|
||||
| **Border Radius**:<br>border radius for all rounded ui components. Will affect many components, like dropdowns, memitems, codeblocks, ... |||
|
||||
| `--border-radius-small` | `4px` | |
|
||||
| `--border-radius-medium` | `6px` | |
|
||||
| `--border-radius-large` | `8px` | |
|
||||
| **Content Width**:<br>The content is centered and constrained in its width. To make the content fill the whole page, set the following variable to `auto`. |||
|
||||
| `--content-maxwidth` | `1000px` | |
|
||||
| **Code Fragment Colors**:<br>Color-Scheme of multiline codeblocks |||
|
||||
| `--fragment-background` | <code style="background:#F8F9FA;color:black">#F8F9FA</code> | <code style="background:#282c34;color:white">#282c34</code> |
|
||||
| `--fragment-foreground` | <code style="background:#37474F;color:white">#37474F</code> | <code style="background:#dbe4eb;color:black">#dbe4eb</code> |
|
||||
| **Arrow Opacity**:<br>By default the arrows in the sidebar are only visible on hover. You can override this behavior so they are visible all the time. |||
|
||||
| `--side-nav-arrow-opacity` | `0` | |
|
||||
| `--side-nav-arrow-hover-opacity` | `0.9` | |
|
||||
| ...and many more |||
|
||||
|
||||
|
||||
If you miss a configuration option or find a bug, please consider [opening an issue](https://github.com/jothepro/doxygen-awesome-css/issues)!
|
||||
|
||||
## Doxygen generator
|
||||
|
||||
The theme overrides most colors with the `--primary-color-*` variables.
|
||||
|
||||
But there are a few small images and graphics that the theme cannot adjust or replace. To make these blend in better with
|
||||
the rest, it is recommended to adjust the [doxygen color settings](https://www.doxygen.nl/manual/customize.html#minor_tweaks_colors)
|
||||
to something that matches the chosen color scheme.
|
||||
|
||||
For the default color scheme, these values work out quite well:
|
||||
|
||||
```
|
||||
# Doxyfile
|
||||
HTML_COLORSTYLE_HUE = 209
|
||||
HTML_COLORSTYLE_SAT = 255
|
||||
HTML_COLORSTYLE_GAMMA = 113
|
||||
```
|
||||
|
||||
## Share your customizations
|
||||
|
||||
If you have customized the theme with custom colors, spacings, font-sizes, etc. and you want to share your creation with others, you can do this [here](https://github.com/jothepro/doxygen-awesome-css/discussions/13).
|
||||
|
||||
I am always curious to learn about how you made the theme look even better!
|
||||
|
||||
|
||||
<div class="section_buttons">
|
||||
|
||||
| Previous | Next |
|
||||
|:----------------------------|---------------------------:|
|
||||
| [Extensions](extensions.md) | [Tips & Tricks](tricks.md) |
|
||||
|
||||
</div>
|
279
docs/doxygen-awesome-css/docs/extensions.md
Normal file
@ -0,0 +1,279 @@
|
||||
# Extensions
|
||||
|
||||
[TOC]
|
||||
|
||||
On top of the base theme provided by `doxygen-awesome.css`, this repository comes with Javascript extensions that require additional setup steps to get them running.
|
||||
|
||||
The extensions require customizations in the header HTML template.
|
||||
This is how you can create the default template with Doxygen:
|
||||
|
||||
1. Create default header template:
|
||||
```sh
|
||||
doxygen -w html header.html delete_me.html delete_me.css
|
||||
```
|
||||
|
||||
2. Reference the template in your `Doxyfile`:
|
||||
```
|
||||
HTML_HEADER = header.html
|
||||
```
|
||||
|
||||
[More details on header customization](https://www.doxygen.nl/manual/customize.html#minor_tweaks_header_css)
|
||||
|
||||
## Dark Mode Toggle {#extension-dark-mode-toggle}
|
||||
|
||||
Adds a button next to the search bar to enable and disable the dark theme variant manually:
|
||||
|
||||
<div class="darkmode_inverted_image bordered_image">
|
||||
|
||||
{width=250px}
|
||||
</div>
|
||||
|
||||
### Installation
|
||||
|
||||
1. Add the required resources in your `Doxyfile`:
|
||||
- **HTML_EXTRA_FILES:** `doxygen-awesome-darkmode-toggle.js`
|
||||
- **HTML_EXTRA_STYLESHEET:** `doxygen-awesome-sidebar-only-darkmode-toggle.css`
|
||||
<em>(ONLY required for the sidebar-only theme variant!)</em>
|
||||
2. In the `header.html` template, include `doxygen-awesome-darkmode-toggle.js` at the end of the `<head>` and then initialize it:
|
||||
```html
|
||||
<html>
|
||||
<head>
|
||||
<!-- ... other metadata & script includes ... -->
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeDarkModeToggle.init()
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
```
|
||||
|
||||
### Customizing
|
||||
|
||||
Changing the tooltip of the button:
|
||||
```js
|
||||
DoxygenAwesomeDarkModeToggle.title = "Zwischen hellem/dunklem Modus wechseln"
|
||||
```
|
||||
|
||||
Changing Icons. Both Emoji or SVG icons are supported:
|
||||
```js
|
||||
DoxygenAwesomeDarkModeToggle.lightModeIcon = '🌞'
|
||||
// icon from https://fonts.google.com/icons
|
||||
DoxygenAwesomeDarkModeToggle.darkModeIcon = `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#009793"><g><rect fill="none" height="24" width="24"/></g><g><g><path d="M8.1,14.15C9.77,14.63,11,16.17,11,18c0,0.68-0.19,1.31-0.48,1.87c0.48,0.09,0.97,0.14,1.48,0.14 c1.48,0,2.9-0.41,4.13-1.15c-2.62-0.92-5.23-2.82-6.8-5.86C7.74,9.94,7.78,7.09,8.29,4.9c-2.57,1.33-4.3,4.01-4.3,7.1c0,0,0,0,0,0 c0.01,0,0.01,0,0.02,0C5.66,12,7.18,12.83,8.1,14.15z" opacity=".3"/><path d="M19.78,17.51c-2.47,0-6.57-1.33-8.68-5.43C8.77,7.57,10.6,3.6,11.63,2.01C6.27,2.2,1.98,6.59,1.98,12 c0,0.14,0.02,0.28,0.02,0.42C2.61,12.16,3.28,12,3.98,12c0,0,0,0,0,0c0-3.09,1.73-5.77,4.3-7.1C7.78,7.09,7.74,9.94,9.32,13 c1.57,3.04,4.18,4.95,6.8,5.86c-1.23,0.74-2.65,1.15-4.13,1.15c-0.5,0-1-0.05-1.48-0.14c-0.37,0.7-0.94,1.27-1.64,1.64 c0.98,0.32,2.03,0.5,3.11,0.5c3.5,0,6.58-1.8,8.37-4.52C20.18,17.5,19.98,17.51,19.78,17.51z"/><path d="M7,16l-0.18,0C6.4,14.84,5.3,14,4,14c-1.66,0-3,1.34-3,3s1.34,3,3,3c0.62,0,2.49,0,3,0c1.1,0,2-0.9,2-2 C9,16.9,8.1,16,7,16z"/></g></g></svg>`
|
||||
```
|
||||
|
||||
All customizations must be applied before calling `DoxygenAwesomeDarkModeToggle.init()`!
|
||||
|
||||
|
||||
## Fragment Copy Button {#extension-copy-button}
|
||||
|
||||
Shows a copy button when the user hovers over a code fragment:
|
||||
|
||||
<div class="darkmode_inverted_image bordered_image">
|
||||
|
||||
{width=490}
|
||||
</div>
|
||||
|
||||
### Installation
|
||||
|
||||
1. Add the required resources in your `Doxyfile`:
|
||||
- **HTML_EXTRA_FILES:** `doxygen-awesome-fragment-copy-button.js`
|
||||
2. In the `header.html` template, include `doxygen-awesome-fragment-copy-button.js` at the end of the `<head>` and then initialize it:
|
||||
```html
|
||||
<html>
|
||||
<head>
|
||||
<!-- ... other metadata & script includes ... -->
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-fragment-copy-button.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeFragmentCopyButton.init()
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
```
|
||||
|
||||
### Customizing
|
||||
|
||||
The tooltip of the button can be changed:
|
||||
```js
|
||||
DoxygenAwesomeFragmentCopyButton.title = "In die Zwischenablage kopieren"
|
||||
```
|
||||
|
||||
The icon can be changed. It must be an SVG:
|
||||
```js
|
||||
DoxygenAwesomeFragmentCopyButton.copyIcon = `<svg ...>`
|
||||
DoxygenAwesomeFragmentCopyButton.successIcon = `<svg ...>`
|
||||
```
|
||||
|
||||
All customizations must be applied before calling `DoxygenAwesomeDarkModeToggle.init()`!
|
||||
|
||||
## Paragraph Linking {#extension-para}
|
||||
|
||||
Provides a button on hover behind every headline to allow easy creation of a permanent link to the headline:
|
||||
|
||||
<div class="darkmode_inverted_image bordered_image">
|
||||
|
||||
{width=220}
|
||||
</div>
|
||||
|
||||
Works for all headlines and for many documentation section titles.
|
||||
|
||||
### Installation
|
||||
|
||||
1. Add the required resources in your `Doxyfile`:
|
||||
- **HTML_EXTRA_FILES:** `doxygen-awesome-paragraph-link.js`
|
||||
2. In the `header.html` template, include `doxygen-awesome-paragraph-link.js` at the end of the `<head>` and then initialize it:
|
||||
```html
|
||||
<html>
|
||||
<head>
|
||||
<!-- ... other metadata & script includes ... -->
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-paragraph-link.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeParagraphLink.init()
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
```
|
||||
|
||||
### Customizing
|
||||
|
||||
The button tooltip can be changed:
|
||||
```js
|
||||
DoxygenAwesomeParagraphLink.title = "Abschnitt verknüpfen"
|
||||
```
|
||||
|
||||
The icon of the button can be changed. Both plain characters or SVG icons are supported:
|
||||
```js
|
||||
DoxygenAwesomeParagraphLink.icon = "¶"
|
||||
```
|
||||
|
||||
All customizations must be applied before calling `DoxygenAwesomeParagraphLink.init()`!
|
||||
|
||||
## Interactive TOC {#extension-toc}
|
||||
|
||||
On large screens, the Table of Contents (TOC) is anchored on the top right of the page. This extension visualizes the reading progress by dynamically highlighting the currently active section.
|
||||
|
||||
On small screens, the extension hides the TOC by default. The user can open it manually when needed:
|
||||
|
||||
|
||||
<div class="darkmode_inverted_image bordered_image">
|
||||
|
||||
{width=380}
|
||||
</div>
|
||||
|
||||
### Installation
|
||||
|
||||
1. Add the required resources in your `Doxyfile`:
|
||||
- **HTML_EXTRA_FILES:** `doxygen-awesome-interactive-toc.js`
|
||||
2. In the `header.html` template, include `doxygen-awesome-interactive-toc.js` at the end of the `<head>` and then initialize it:
|
||||
```html
|
||||
<html>
|
||||
<head>
|
||||
<!-- ... other metadata & script includes ... -->
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-interactive-toc.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeInteractiveToc.init()
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
```
|
||||
|
||||
### Customizing
|
||||
|
||||
The offset for when a headline is considered active can be changed. A smaller value means that the headline of the section must be closer to the top of the viewport before it is highlighted in the TOC:
|
||||
```js
|
||||
DoxygenAwesomeInteractiveToc.topOffset = 45
|
||||
```
|
||||
|
||||
Hiding the TOC on small screens can be disabled. It is still interactive and can be hidden by the user but will now be open by default:
|
||||
```js
|
||||
DoxygenAwesomeInteractiveToc.hideMobileMenu = false
|
||||
```
|
||||
|
||||
## Tabs {#extension-tabs}
|
||||
|
||||
@warning Experimental feature! Please report bugs [here](https://github.com/jothepro/doxygen-awesome-css/issues).
|
||||
|
||||
This extension allows to arrange list content in tabs:
|
||||
|
||||
<div class="tabbed">
|
||||
|
||||
- <b class="tab-title">Tab 1</b> This is the content of tab 1
|
||||
- <b class="tab-title">Tab 2</b> This is the content of tab 2
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
### Installation
|
||||
|
||||
1. Add the required resources in your `Doxyfile`:
|
||||
- **HTML_EXTRA_FILES:** `doxygen-awesome-tabs.js`
|
||||
2. In the `header.html` template, include `doxygen-awesome-tabs.js` at the end of the `<head>` and then initialize it:
|
||||
```html
|
||||
<html>
|
||||
<head>
|
||||
<!-- ... other metadata & script includes ... -->
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-tabs.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeTabs.init()
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
Each list that is supposed to be displayed as tabs has to be wrapped with the `tabbed` CSS class.
|
||||
Each item in the list must start with an element that has the class `tab-title`. It will then be used as tab title.
|
||||
|
||||
```md
|
||||
<div class="tabbed">
|
||||
|
||||
- <b class="tab-title">Tab 1</b> This is the content of tab 1
|
||||
- <b class="tab-title">Tab 2</b> This is the content of tab 2
|
||||
|
||||
</div>
|
||||
```
|
||||
|
||||
## Page Navigation {#extension-page-navigation}
|
||||
|
||||
@warning Experimental feature! Please report bugs [here](https://github.com/jothepro/doxygen-awesome-css/issues).
|
||||
|
||||
To allow the user to easily navigate from one document to another, "Next" and "Previous" buttons can be added at the end of a Markdown document.
|
||||
|
||||
### Installation
|
||||
|
||||
The feature is shipped inside the default `doxygen-awesome.css`. No additional stylesheets or scripts need to be added.
|
||||
|
||||
### Usage
|
||||
|
||||
The following conditions must be met for the feature to work properly:
|
||||
- The navigation must be inside a Markdown table with 1-2 columns.
|
||||
- The alignment of the column defines the alignment of the arrow on the navigation button.
|
||||
- the table must be wrapped inside a `<div>` with the class `section_buttons`.
|
||||
|
||||
<div class="tabbed">
|
||||
|
||||
- <span class="tab-title">Code</span>
|
||||
```md
|
||||
<div class="section_buttons">
|
||||
|
||||
| Previous | Next |
|
||||
|:------------------|----------------------------------:|
|
||||
| [Home](README.md) | [Customization](customization.md) |
|
||||
|
||||
</div>
|
||||
```
|
||||
- <span class="tab-title">Result</span>
|
||||
<div class="section_buttons">
|
||||
| Previous | Next |
|
||||
|:------------------|----------------------------------:|
|
||||
| [Home](README.md) | [Customization](customization.md) |
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section_buttons">
|
||||
|
||||
| Previous | Next |
|
||||
|:------------------|----------------------------------:|
|
||||
| [Home](README.md) | [Customization](customization.md) |
|
||||
</div>
|
BIN
docs/doxygen-awesome-css/docs/img/darkmode_toggle.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
docs/doxygen-awesome-css/docs/img/fancy_scrollbars_firefox.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
docs/doxygen-awesome-css/docs/img/fancy_scrollbars_webkit.gif
Normal file
After Width: | Height: | Size: 5.4 MiB |
BIN
docs/doxygen-awesome-css/docs/img/fragment_copy_button.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
docs/doxygen-awesome-css/docs/img/interactive_toc_mobile.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
docs/doxygen-awesome-css/docs/img/paragraph_link.png
Normal file
After Width: | Height: | Size: 12 KiB |
127
docs/doxygen-awesome-css/docs/tricks.md
Normal file
@ -0,0 +1,127 @@
|
||||
# Tips & Tricks
|
||||
|
||||
[TOC]
|
||||
|
||||
## Diagrams with Graphviz {#tricks-graphviz}
|
||||
|
||||
To get the best-looking class diagrams for your documentation, generate them with Graphviz as vector graphics with transparent background:
|
||||
|
||||
```
|
||||
# Doxyfile
|
||||
HAVE_DOT = YES
|
||||
DOT_IMAGE_FORMAT = svg
|
||||
DOT_TRANSPARENT = YES
|
||||
```
|
||||
|
||||
In case `INTERACTIVE_SVG = YES` is set in the Doxyfile, all user-defined dotgraphs must be wrapped with the `interactive_dotgraph` CSS class for them to be rendered correctly:
|
||||
|
||||
```md
|
||||
<div class="interactive_dotgraph">
|
||||
|
||||
\dotfile graph.dot
|
||||
|
||||
</div>
|
||||
```
|
||||
|
||||
@note Both the default overflow scrolling behavior in this theme and the interactive editor enabled by `INTERACTIVE_SVG` are unsatisfying workarounds IMHO. Consider designing your graphs to be narrow enough to fit the page to avoid scrolling.
|
||||
|
||||
## Disable Dark Mode {#tricks-darkmode}
|
||||
|
||||
If you don't want the theme to automatically switch to dark mode depending on the browser preference,
|
||||
you can disable dark mode by adding the `light-mode` class to the HTML tag in the header template:
|
||||
|
||||
```html
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" class="light-mode">
|
||||
```
|
||||
|
||||
The same can be done to always enable dark mode:
|
||||
|
||||
```html
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" class="dark-mode">
|
||||
```
|
||||
|
||||
|
||||
@warning This only works if you don't use the dark-mode toggle extension.
|
||||
|
||||
## Choosing Sidebar Width {#tricks-sidebar}
|
||||
|
||||
If you have enabled the sidebar-only theme variant, make sure to carefully choose a proper width for your sidebar.
|
||||
It should be wide enough to hold the icon, project title and version number. If the content is too wide, it will be
|
||||
cut off.
|
||||
|
||||
```css
|
||||
html {
|
||||
/* Make sure sidebar is wide enough to contain the page title (logo + title + version) */
|
||||
--side-nav-fixed-width: 335px;
|
||||
}
|
||||
```
|
||||
|
||||
The chosen width should also be set in the Doxyfile:
|
||||
|
||||
```
|
||||
# Doxyfile
|
||||
TREEVIEW_WIDTH = 335
|
||||
```
|
||||
|
||||
## Formatting Tables {#tricks-tables}
|
||||
|
||||
By default tables in this theme are left-aligned and as wide as required to fit their content.
|
||||
Those properties can be changed for individual tables.
|
||||
|
||||
### Centering
|
||||
|
||||
Tables can be centered by wrapping them in the `<center>` HTML tag.
|
||||
|
||||
<div class="tabbed">
|
||||
|
||||
- <span class="tab-title">Code</span>
|
||||
```md
|
||||
<center>
|
||||
| This table | is centered |
|
||||
|------------|----------------------|
|
||||
| test 1 | test 2 |
|
||||
</center>
|
||||
```
|
||||
- <span class="tab-title">Result</span>
|
||||
<center>
|
||||
| This table | is centered |
|
||||
|------------|----------------------|
|
||||
| test 1 | test 2 |
|
||||
</center>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
### Full Width
|
||||
|
||||
To make tables span the full width of the page, no matter how wide the content is, wrap the table in the `full_width_table` CSS class.
|
||||
|
||||
@warning Apply with caution! This breaks the overflow scrolling of the table. Content might be cut off on small screens!
|
||||
|
||||
<div class="tabbed">
|
||||
|
||||
- <span class="tab-title">Code</span>
|
||||
```md
|
||||
<div class="full_width_table">
|
||||
| This table | spans the full width |
|
||||
|------------|----------------------|
|
||||
| test 1 | test 2 |
|
||||
</div>
|
||||
```
|
||||
- <span class="tab-title">Result</span>
|
||||
<div class="full_width_table">
|
||||
| This table | spans the full width |
|
||||
|------------|----------------------|
|
||||
| test 1 | test 2 |
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section_buttons">
|
||||
|
||||
| Previous | Next |
|
||||
|:----------------------------------|---------------------------------------:|
|
||||
| [Customization](customization.md) | [Example](https://jothepro.github.io/doxygen-awesome-css/class_my_library_1_1_example.html) |
|
||||
|
||||
</div>
|
157
docs/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js
Normal file
@ -0,0 +1,157 @@
|
||||
/**
|
||||
|
||||
Doxygen Awesome
|
||||
https://github.com/jothepro/doxygen-awesome-css
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 - 2023 jothepro
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
class DoxygenAwesomeDarkModeToggle extends HTMLElement {
|
||||
// SVG icons from https://fonts.google.com/icons
|
||||
// Licensed under the Apache 2.0 license:
|
||||
// https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
static lightModeIcon = `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#FCBF00"><rect fill="none" height="24" width="24"/><circle cx="12" cy="12" opacity=".3" r="3"/><path d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"/></svg>`
|
||||
static darkModeIcon = `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#FE9700"><rect fill="none" height="24" width="24"/><path d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27 C17.45,17.19,14.93,19,12,19c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z" opacity=".3"/><path d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"/></svg>`
|
||||
static title = "Toggle Light/Dark Mode"
|
||||
|
||||
static prefersLightModeInDarkModeKey = "prefers-light-mode-in-dark-mode"
|
||||
static prefersDarkModeInLightModeKey = "prefers-dark-mode-in-light-mode"
|
||||
|
||||
static _staticConstructor = function() {
|
||||
DoxygenAwesomeDarkModeToggle.enableDarkMode(DoxygenAwesomeDarkModeToggle.userPreference)
|
||||
// Update the color scheme when the browsers preference changes
|
||||
// without user interaction on the website.
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
|
||||
DoxygenAwesomeDarkModeToggle.onSystemPreferenceChanged()
|
||||
})
|
||||
// Update the color scheme when the tab is made visible again.
|
||||
// It is possible that the appearance was changed in another tab
|
||||
// while this tab was in the background.
|
||||
document.addEventListener("visibilitychange", visibilityState => {
|
||||
if (document.visibilityState === 'visible') {
|
||||
DoxygenAwesomeDarkModeToggle.onSystemPreferenceChanged()
|
||||
}
|
||||
});
|
||||
}()
|
||||
|
||||
static init() {
|
||||
$(function() {
|
||||
$(document).ready(function() {
|
||||
const toggleButton = document.createElement('doxygen-awesome-dark-mode-toggle')
|
||||
toggleButton.title = DoxygenAwesomeDarkModeToggle.title
|
||||
toggleButton.updateIcon()
|
||||
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
|
||||
toggleButton.updateIcon()
|
||||
})
|
||||
document.addEventListener("visibilitychange", visibilityState => {
|
||||
if (document.visibilityState === 'visible') {
|
||||
toggleButton.updateIcon()
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
document.getElementById("MSearchBox").parentNode.appendChild(toggleButton)
|
||||
})
|
||||
$(window).resize(function(){
|
||||
document.getElementById("MSearchBox").parentNode.appendChild(toggleButton)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.onclick=this.toggleDarkMode
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns `true` for dark-mode, `false` for light-mode system preference
|
||||
*/
|
||||
static get systemPreference() {
|
||||
return window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns `true` for dark-mode, `false` for light-mode user preference
|
||||
*/
|
||||
static get userPreference() {
|
||||
return (!DoxygenAwesomeDarkModeToggle.systemPreference && localStorage.getItem(DoxygenAwesomeDarkModeToggle.prefersDarkModeInLightModeKey)) ||
|
||||
(DoxygenAwesomeDarkModeToggle.systemPreference && !localStorage.getItem(DoxygenAwesomeDarkModeToggle.prefersLightModeInDarkModeKey))
|
||||
}
|
||||
|
||||
static set userPreference(userPreference) {
|
||||
DoxygenAwesomeDarkModeToggle.darkModeEnabled = userPreference
|
||||
if(!userPreference) {
|
||||
if(DoxygenAwesomeDarkModeToggle.systemPreference) {
|
||||
localStorage.setItem(DoxygenAwesomeDarkModeToggle.prefersLightModeInDarkModeKey, true)
|
||||
} else {
|
||||
localStorage.removeItem(DoxygenAwesomeDarkModeToggle.prefersDarkModeInLightModeKey)
|
||||
}
|
||||
} else {
|
||||
if(!DoxygenAwesomeDarkModeToggle.systemPreference) {
|
||||
localStorage.setItem(DoxygenAwesomeDarkModeToggle.prefersDarkModeInLightModeKey, true)
|
||||
} else {
|
||||
localStorage.removeItem(DoxygenAwesomeDarkModeToggle.prefersLightModeInDarkModeKey)
|
||||
}
|
||||
}
|
||||
DoxygenAwesomeDarkModeToggle.onUserPreferenceChanged()
|
||||
}
|
||||
|
||||
static enableDarkMode(enable) {
|
||||
if(enable) {
|
||||
DoxygenAwesomeDarkModeToggle.darkModeEnabled = true
|
||||
document.documentElement.classList.add("dark-mode")
|
||||
document.documentElement.classList.remove("light-mode")
|
||||
} else {
|
||||
DoxygenAwesomeDarkModeToggle.darkModeEnabled = false
|
||||
document.documentElement.classList.remove("dark-mode")
|
||||
document.documentElement.classList.add("light-mode")
|
||||
}
|
||||
}
|
||||
|
||||
static onSystemPreferenceChanged() {
|
||||
DoxygenAwesomeDarkModeToggle.darkModeEnabled = DoxygenAwesomeDarkModeToggle.userPreference
|
||||
DoxygenAwesomeDarkModeToggle.enableDarkMode(DoxygenAwesomeDarkModeToggle.darkModeEnabled)
|
||||
}
|
||||
|
||||
static onUserPreferenceChanged() {
|
||||
DoxygenAwesomeDarkModeToggle.enableDarkMode(DoxygenAwesomeDarkModeToggle.darkModeEnabled)
|
||||
}
|
||||
|
||||
toggleDarkMode() {
|
||||
DoxygenAwesomeDarkModeToggle.userPreference = !DoxygenAwesomeDarkModeToggle.userPreference
|
||||
this.updateIcon()
|
||||
}
|
||||
|
||||
updateIcon() {
|
||||
if(DoxygenAwesomeDarkModeToggle.darkModeEnabled) {
|
||||
this.innerHTML = DoxygenAwesomeDarkModeToggle.darkModeIcon
|
||||
} else {
|
||||
this.innerHTML = DoxygenAwesomeDarkModeToggle.lightModeIcon
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("doxygen-awesome-dark-mode-toggle", DoxygenAwesomeDarkModeToggle);
|
@ -0,0 +1,85 @@
|
||||
/**
|
||||
|
||||
Doxygen Awesome
|
||||
https://github.com/jothepro/doxygen-awesome-css
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 - 2023 jothepro
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
class DoxygenAwesomeFragmentCopyButton extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
this.onclick=this.copyContent
|
||||
}
|
||||
static title = "Copy to clipboard"
|
||||
static copyIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>`
|
||||
static successIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>`
|
||||
static successDuration = 980
|
||||
static init() {
|
||||
$(function() {
|
||||
$(document).ready(function() {
|
||||
if(navigator.clipboard) {
|
||||
const fragments = document.getElementsByClassName("fragment")
|
||||
for(const fragment of fragments) {
|
||||
const fragmentWrapper = document.createElement("div")
|
||||
fragmentWrapper.className = "doxygen-awesome-fragment-wrapper"
|
||||
const fragmentCopyButton = document.createElement("doxygen-awesome-fragment-copy-button")
|
||||
fragmentCopyButton.innerHTML = DoxygenAwesomeFragmentCopyButton.copyIcon
|
||||
fragmentCopyButton.title = DoxygenAwesomeFragmentCopyButton.title
|
||||
|
||||
fragment.parentNode.replaceChild(fragmentWrapper, fragment)
|
||||
fragmentWrapper.appendChild(fragment)
|
||||
fragmentWrapper.appendChild(fragmentCopyButton)
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
copyContent() {
|
||||
const content = this.previousSibling.cloneNode(true)
|
||||
// filter out line number from file listings
|
||||
content.querySelectorAll(".lineno, .ttc").forEach((node) => {
|
||||
node.remove()
|
||||
})
|
||||
let textContent = content.textContent
|
||||
// remove trailing newlines that appear in file listings
|
||||
let numberOfTrailingNewlines = 0
|
||||
while(textContent.charAt(textContent.length - (numberOfTrailingNewlines + 1)) == '\n') {
|
||||
numberOfTrailingNewlines++;
|
||||
}
|
||||
textContent = textContent.substring(0, textContent.length - numberOfTrailingNewlines)
|
||||
navigator.clipboard.writeText(textContent);
|
||||
this.classList.add("success")
|
||||
this.innerHTML = DoxygenAwesomeFragmentCopyButton.successIcon
|
||||
window.setTimeout(() => {
|
||||
this.classList.remove("success")
|
||||
this.innerHTML = DoxygenAwesomeFragmentCopyButton.copyIcon
|
||||
}, DoxygenAwesomeFragmentCopyButton.successDuration);
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("doxygen-awesome-fragment-copy-button", DoxygenAwesomeFragmentCopyButton)
|
81
docs/doxygen-awesome-css/doxygen-awesome-interactive-toc.js
Normal file
@ -0,0 +1,81 @@
|
||||
/**
|
||||
|
||||
Doxygen Awesome
|
||||
https://github.com/jothepro/doxygen-awesome-css
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 - 2023 jothepro
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
class DoxygenAwesomeInteractiveToc {
|
||||
static topOffset = 38
|
||||
static hideMobileMenu = true
|
||||
static headers = []
|
||||
|
||||
static init() {
|
||||
window.addEventListener("load", () => {
|
||||
let toc = document.querySelector(".contents > .toc")
|
||||
if(toc) {
|
||||
toc.classList.add("interactive")
|
||||
if(!DoxygenAwesomeInteractiveToc.hideMobileMenu) {
|
||||
toc.classList.add("open")
|
||||
}
|
||||
document.querySelector(".contents > .toc > h3")?.addEventListener("click", () => {
|
||||
if(toc.classList.contains("open")) {
|
||||
toc.classList.remove("open")
|
||||
} else {
|
||||
toc.classList.add("open")
|
||||
}
|
||||
})
|
||||
|
||||
document.querySelectorAll(".contents > .toc > ul a").forEach((node) => {
|
||||
let id = node.getAttribute("href").substring(1)
|
||||
DoxygenAwesomeInteractiveToc.headers.push({
|
||||
node: node,
|
||||
headerNode: document.getElementById(id)
|
||||
})
|
||||
|
||||
document.getElementById("doc-content")?.addEventListener("scroll", () => {
|
||||
DoxygenAwesomeInteractiveToc.update()
|
||||
})
|
||||
})
|
||||
DoxygenAwesomeInteractiveToc.update()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
static update() {
|
||||
let active = DoxygenAwesomeInteractiveToc.headers[0]?.node
|
||||
DoxygenAwesomeInteractiveToc.headers.forEach((header) => {
|
||||
let position = header.headerNode.getBoundingClientRect().top
|
||||
header.node.classList.remove("active")
|
||||
header.node.classList.remove("aboveActive")
|
||||
if(position < DoxygenAwesomeInteractiveToc.topOffset) {
|
||||
active = header.node
|
||||
active?.classList.add("aboveActive")
|
||||
}
|
||||
})
|
||||
active?.classList.add("active")
|
||||
active?.classList.remove("aboveActive")
|
||||
}
|
||||
}
|
51
docs/doxygen-awesome-css/doxygen-awesome-paragraph-link.js
Normal file
@ -0,0 +1,51 @@
|
||||
/**
|
||||
|
||||
Doxygen Awesome
|
||||
https://github.com/jothepro/doxygen-awesome-css
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 - 2023 jothepro
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
class DoxygenAwesomeParagraphLink {
|
||||
// Icon from https://fonts.google.com/icons
|
||||
// Licensed under the Apache 2.0 license:
|
||||
// https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
static icon = `<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5zm-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-2zm-3-4h8v2H8z"/></svg>`
|
||||
static title = "Permanent Link"
|
||||
static init() {
|
||||
$(function() {
|
||||
$(document).ready(function() {
|
||||
document.querySelectorAll(".contents a.anchor[id], .contents .groupheader > a[id]").forEach((node) => {
|
||||
let anchorlink = document.createElement("a")
|
||||
anchorlink.setAttribute("href", `#${node.getAttribute("id")}`)
|
||||
anchorlink.setAttribute("title", DoxygenAwesomeParagraphLink.title)
|
||||
anchorlink.classList.add("anchorlink")
|
||||
node.classList.add("anchor")
|
||||
anchorlink.innerHTML = DoxygenAwesomeParagraphLink.icon
|
||||
node.parentElement.appendChild(anchorlink)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
|
||||
/**
|
||||
|
||||
Doxygen Awesome
|
||||
https://github.com/jothepro/doxygen-awesome-css
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 - 2023 jothepro
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
|
||||
#MSearchBox {
|
||||
width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)) - var(--searchbar-height) - 1px);
|
||||
}
|
||||
|
||||
#MSearchField {
|
||||
width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)) - 66px - var(--searchbar-height));
|
||||
}
|
||||
}
|
116
docs/doxygen-awesome-css/doxygen-awesome-sidebar-only.css
Normal file
@ -0,0 +1,116 @@
|
||||
/**
|
||||
|
||||
Doxygen Awesome
|
||||
https://github.com/jothepro/doxygen-awesome-css
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 - 2023 jothepro
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
html {
|
||||
/* side nav width. MUST be = `TREEVIEW_WIDTH`.
|
||||
* Make sure it is wide enough to contain the page title (logo + title + version)
|
||||
*/
|
||||
--side-nav-fixed-width: 335px;
|
||||
--menu-display: none;
|
||||
|
||||
--top-height: 120px;
|
||||
--toc-sticky-top: -25px;
|
||||
--toc-max-height: calc(100vh - 2 * var(--spacing-medium) - 25px);
|
||||
}
|
||||
|
||||
#projectname {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
html {
|
||||
--searchbar-background: var(--page-background-color);
|
||||
}
|
||||
|
||||
#side-nav {
|
||||
min-width: var(--side-nav-fixed-width);
|
||||
max-width: var(--side-nav-fixed-width);
|
||||
top: var(--top-height);
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
#nav-tree, #side-nav {
|
||||
height: calc(100vh - var(--top-height)) !important;
|
||||
}
|
||||
|
||||
#nav-tree {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#top {
|
||||
display: block;
|
||||
border-bottom: none;
|
||||
height: var(--top-height);
|
||||
margin-bottom: calc(0px - var(--top-height));
|
||||
max-width: var(--side-nav-fixed-width);
|
||||
overflow: hidden;
|
||||
background: var(--side-nav-background);
|
||||
}
|
||||
#main-nav {
|
||||
float: left;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.ui-resizable-handle {
|
||||
cursor: default;
|
||||
width: 1px !important;
|
||||
background: var(--separator-color);
|
||||
box-shadow: 0 calc(-2 * var(--top-height)) 0 0 var(--separator-color);
|
||||
}
|
||||
|
||||
#nav-path {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
left: var(--side-nav-fixed-width);
|
||||
bottom: 0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#doc-content {
|
||||
height: calc(100vh - 31px) !important;
|
||||
padding-bottom: calc(3 * var(--spacing-large));
|
||||
padding-top: calc(var(--top-height) - 80px);
|
||||
box-sizing: border-box;
|
||||
margin-left: var(--side-nav-fixed-width) !important;
|
||||
}
|
||||
|
||||
#MSearchBox {
|
||||
width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)));
|
||||
}
|
||||
|
||||
#MSearchField {
|
||||
width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)) - 65px);
|
||||
}
|
||||
|
||||
#MSearchResultsWindow {
|
||||
left: var(--spacing-medium) !important;
|
||||
right: auto;
|
||||
}
|
||||
}
|
90
docs/doxygen-awesome-css/doxygen-awesome-tabs.js
Normal file
@ -0,0 +1,90 @@
|
||||
/**
|
||||
|
||||
Doxygen Awesome
|
||||
https://github.com/jothepro/doxygen-awesome-css
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 jothepro
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
class DoxygenAwesomeTabs {
|
||||
|
||||
static init() {
|
||||
window.addEventListener("load", () => {
|
||||
document.querySelectorAll(".tabbed:not(:empty)").forEach((tabbed, tabbedIndex) => {
|
||||
let tabLinkList = []
|
||||
tabbed.querySelectorAll("li").forEach((tab, tabIndex) => {
|
||||
tab.id = "tab_" + tabbedIndex + "_" + tabIndex
|
||||
let header = tab.querySelector(".tab-title")
|
||||
let tabLink = document.createElement("button")
|
||||
tabLink.classList.add("tab-button")
|
||||
tabLink.appendChild(header)
|
||||
header.title = header.textContent
|
||||
tabLink.addEventListener("click", () => {
|
||||
tabbed.querySelectorAll("li").forEach((tab) => {
|
||||
tab.classList.remove("selected")
|
||||
})
|
||||
tabLinkList.forEach((tabLink) => {
|
||||
tabLink.classList.remove("active")
|
||||
})
|
||||
tab.classList.add("selected")
|
||||
tabLink.classList.add("active")
|
||||
})
|
||||
tabLinkList.push(tabLink)
|
||||
if(tabIndex == 0) {
|
||||
tab.classList.add("selected")
|
||||
tabLink.classList.add("active")
|
||||
}
|
||||
})
|
||||
let tabsOverview = document.createElement("div")
|
||||
tabsOverview.classList.add("tabs-overview")
|
||||
let tabsOverviewContainer = document.createElement("div")
|
||||
tabsOverviewContainer.classList.add("tabs-overview-container")
|
||||
tabLinkList.forEach((tabLink) => {
|
||||
tabsOverview.appendChild(tabLink)
|
||||
})
|
||||
tabsOverviewContainer.appendChild(tabsOverview)
|
||||
tabbed.before(tabsOverviewContainer)
|
||||
|
||||
function resize() {
|
||||
let maxTabHeight = 0
|
||||
tabbed.querySelectorAll("li").forEach((tab, tabIndex) => {
|
||||
let visibility = tab.style.display
|
||||
tab.style.display = "block"
|
||||
maxTabHeight = Math.max(tab.offsetHeight, maxTabHeight)
|
||||
tab.style.display = visibility
|
||||
})
|
||||
tabbed.style.height = `${maxTabHeight + 10}px`
|
||||
}
|
||||
|
||||
resize()
|
||||
new ResizeObserver(resize).observe(tabbed)
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
static resize(tabbed) {
|
||||
|
||||
}
|
||||
}
|
2669
docs/doxygen-awesome-css/doxygen-awesome.css
Normal file
@ -0,0 +1,54 @@
|
||||
html.alternative {
|
||||
/* primary theme color. This will affect the entire websites color scheme: links, arrows, labels, ... */
|
||||
--primary-color: #AF7FE4;
|
||||
--primary-dark-color: #9270E4;
|
||||
--primary-light-color: #7aabd6;
|
||||
--primary-lighter-color: #cae1f1;
|
||||
--primary-lightest-color: #e9f1f8;
|
||||
|
||||
/* page base colors */
|
||||
--page-background-color: white;
|
||||
--page-foreground-color: #2c3e50;
|
||||
--page-secondary-foreground-color: #67727e;
|
||||
|
||||
|
||||
--border-radius-large: 22px;
|
||||
--border-radius-small: 9px;
|
||||
--border-radius-medium: 14px;
|
||||
--spacing-small: 8px;
|
||||
--spacing-medium: 14px;
|
||||
--spacing-large: 19px;
|
||||
|
||||
--top-height: 125px;
|
||||
|
||||
--side-nav-background: #324067;
|
||||
--side-nav-foreground: #F1FDFF;
|
||||
--header-foreground: var(--side-nav-foreground);
|
||||
--searchbar-background: var(--side-nav-foreground);
|
||||
--searchbar-border-radius: var(--border-radius-medium);
|
||||
--header-background: var(--side-nav-background);
|
||||
--header-foreground: var(--side-nav-foreground);
|
||||
|
||||
--toc-background: rgb(243, 240, 252);
|
||||
--toc-foreground: var(--page-foreground-color);
|
||||
}
|
||||
|
||||
html.alternative.dark-mode {
|
||||
color-scheme: dark;
|
||||
|
||||
--primary-color: #AF7FE4;
|
||||
--primary-dark-color: #9270E4;
|
||||
--primary-light-color: #4779ac;
|
||||
--primary-lighter-color: #191e21;
|
||||
--primary-lightest-color: #191a1c;
|
||||
|
||||
--page-background-color: #1C1D1F;
|
||||
--page-foreground-color: #d2dbde;
|
||||
--page-secondary-foreground-color: #859399;
|
||||
--separator-color: #3a3246;
|
||||
--side-nav-background: #171D32;
|
||||
--side-nav-foreground: #F1FDFF;
|
||||
--toc-background: #20142C;
|
||||
--searchbar-background: var(--page-background-color);
|
||||
|
||||
}
|
57
docs/doxygen-awesome-css/doxygen-custom/custom.css
Normal file
@ -0,0 +1,57 @@
|
||||
.github-corner svg {
|
||||
fill: var(--primary-light-color);
|
||||
color: var(--page-background-color);
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
.github-corner svg {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
#projectnumber {
|
||||
margin-right: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
.alter-theme-button {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
background: var(--primary-color);
|
||||
color: var(--page-background-color) !important;
|
||||
border-radius: var(--border-radius-medium);
|
||||
padding: var(--spacing-small) var(--spacing-medium);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.alter-theme-button:hover {
|
||||
background: var(--primary-dark-color);
|
||||
}
|
||||
|
||||
html.dark-mode .darkmode_inverted_image img, /* < doxygen 1.9.3 */
|
||||
html.dark-mode .darkmode_inverted_image object[type="image/svg+xml"] /* doxygen 1.9.3 */ {
|
||||
filter: brightness(89%) hue-rotate(180deg) invert();
|
||||
}
|
||||
|
||||
.bordered_image {
|
||||
border-radius: var(--border-radius-small);
|
||||
border: 1px solid var(--separator-color);
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
html.dark-mode .bordered_image img, /* < doxygen 1.9.3 */
|
||||
html.dark-mode .bordered_image object[type="image/svg+xml"] /* doxygen 1.9.3 */ {
|
||||
border-radius: var(--border-radius-small);
|
||||
}
|
||||
|
||||
.title_screenshot {
|
||||
filter: drop-shadow(0px 3px 10px rgba(0,0,0,0.22));
|
||||
max-width: 500px;
|
||||
margin: var(--spacing-large) 0;
|
||||
}
|
||||
|
||||
.title_screenshot .caption {
|
||||
display: none;
|
||||
}
|
90
docs/doxygen-awesome-css/doxygen-custom/header.html
Normal file
@ -0,0 +1,90 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen $doxygenversion"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
|
||||
<!-- BEGIN opengraph metadata -->
|
||||
<meta property="og:title" content="Doxygen Awesome" />
|
||||
<meta property="og:image" content="https://repository-images.githubusercontent.com/348492097/4f16df80-88fb-11eb-9d31-4015ff22c452" />
|
||||
<meta property="og:description" content="Custom CSS theme for doxygen html-documentation with lots of customization parameters." />
|
||||
<meta property="og:url" content="https://jothepro.github.io/doxygen-awesome-css/" />
|
||||
<!-- END opengraph metadata -->
|
||||
|
||||
<!-- BEGIN twitter metadata -->
|
||||
<meta name="twitter:image:src" content="https://repository-images.githubusercontent.com/348492097/4f16df80-88fb-11eb-9d31-4015ff22c452" />
|
||||
<meta name="twitter:title" content="Doxygen Awesome" />
|
||||
<meta name="twitter:description" content="Custom CSS theme for doxygen html-documentation with lots of customization parameters." />
|
||||
<!-- END twitter metadata -->
|
||||
|
||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
|
||||
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link rel="icon" type="image/svg+xml" href="logo.drawio.svg"/>
|
||||
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-fragment-copy-button.js"></script>
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-paragraph-link.js"></script>
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-interactive-toc.js"></script>
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-tabs.js"></script>
|
||||
<script type="text/javascript" src="$relpath^toggle-alternative-theme.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeFragmentCopyButton.init()
|
||||
DoxygenAwesomeDarkModeToggle.init()
|
||||
DoxygenAwesomeParagraphLink.init()
|
||||
DoxygenAwesomeInteractiveToc.init()
|
||||
DoxygenAwesomeTabs.init()
|
||||
</script>
|
||||
$treeview
|
||||
$search
|
||||
$mathjax
|
||||
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
|
||||
$extrastylesheet
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- https://tholman.com/github-corners/ -->
|
||||
<a href="https://github.com/jothepro/doxygen-awesome-css" class="github-corner" title="View source on GitHub" target="_blank" rel="noopener noreferrer">
|
||||
<svg viewBox="0 0 250 250" width="40" height="40" style="position: absolute; top: 0; border: 0; right: 0; z-index: 99;" aria-hidden="true">
|
||||
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
|
||||
|
||||
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
|
||||
<!--BEGIN TITLEAREA-->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<!--BEGIN PROJECT_LOGO-->
|
||||
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
|
||||
<!--END PROJECT_LOGO-->
|
||||
<!--BEGIN PROJECT_NAME-->
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">$projectname
|
||||
<!--BEGIN PROJECT_NUMBER--> <span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
|
||||
</div>
|
||||
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
|
||||
</td>
|
||||
<!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME-->
|
||||
<!--BEGIN PROJECT_BRIEF-->
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectbrief">$projectbrief</div>
|
||||
</td>
|
||||
<!--END PROJECT_BRIEF-->
|
||||
<!--END !PROJECT_NAME-->
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN SEARCHENGINE-->
|
||||
<td>$searchbox</td>
|
||||
<!--END SEARCHENGINE-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--END TITLEAREA-->
|
||||
<!-- end header part -->
|
@ -0,0 +1,12 @@
|
||||
|
||||
let original_theme_active = true;
|
||||
|
||||
function toggle_alternative_theme() {
|
||||
if(original_theme_active) {
|
||||
document.documentElement.classList.add("alternative")
|
||||
original_theme_active = false;
|
||||
} else {
|
||||
document.documentElement.classList.remove("alternative")
|
||||
original_theme_active = true;
|
||||
}
|
||||
}
|
BIN
docs/doxygen-awesome-css/img/screenshot.png
Normal file
After Width: | Height: | Size: 211 KiB |
BIN
docs/doxygen-awesome-css/img/testimage.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
117
docs/doxygen-awesome-css/img/theme-variants-base.drawio.svg
Normal file
@ -0,0 +1,117 @@
|
||||
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="491px" height="261px" viewBox="-0.5 -0.5 491 261" content="<mxfile><diagram id="6E4AiNPWWr3a8GvC3Ypl" name="Page-1">xZfLrpswEIafBqndIIzBwLK5tZt2k0pd+wQHrBqcOs6tT98xmABxmrYiUUEK+Pd1vhkPjofn1fmjorvys8yZ8MIgP3t44YVhihL4NcKlFZIkbYVC8byVUC+s+U9mxcCqB56z/aihllJovhuLG1nXbKNHGlVKnsbNtlKMZ93RgjnCekOFq37juS6tWXHQ658YL8puZhTYmop2ja2wL2kuTwMJLz08V1Lq9q06z5kw7Doubb/Vb2qvC1Os1n/ToVvHkYqDNc4uTF86awslDzsPz+BR58x0DKBE1cY6JoWSO69dypEpzc73vELfugl6wyFgmKyYVhdod+rRRpldZznAGhIrUuvO4tq3txherNH3AZA/2z+2+1RyzdY7ujG1Jwhv0EpdwfgLBK97reR3NpdCqqY3JktzQ00h6H5vBwEEmvKaKVt28V0dc8vvP3GKHE5zsMEs97m4ls09FUlXm6V+jNteNtVEkZ/a7DPgBi19Qlx0KI19hKfTCx16X7kW7I0qUN99oUdeUM1l7RkbwfRgzWB/le+nwd1yIQZoF8vlYrV6GKMvjcMGPUqyqPudzhU7XNfwZXCwPpfjKjH36zg+jFQUEj/Br4vU2CG6go8Ra4DOFKP5Rh2q3X4i0deSg4wHu3lwZQ7GuwGKsY9HF5nOM3EjtNnaD/ihKfy2kJUHekjM/aR0ihPkJ2GEcJJhFOAoHmVWdLu9Qzd4A+R3naM0TOLsTiDf+I6k052Q3vnIE6EtruZI0hEjPw7m7DXr2Q0kUphnk7q7AWDqdoy2znEroNWPfFfLmt2kGCtRwYsaioJtzQjGTRyOoB+sXPE8N5PcDZXxZjQLtGe1cPJp43x1U5qROEZdQIT/Ggyw24ahkJL4JcEAxf443dQN/pPg5S8=</diagram></mxfile>">
|
||||
<defs/>
|
||||
<g>
|
||||
<rect x="0" y="0" width="490" height="260" fill="rgb(255, 255, 255)" stroke="#6e6e6e" pointer-events="none"/>
|
||||
<rect x="198.53" y="44.87" width="219.66" height="185.13" fill="rgb(255, 255, 255)" stroke="#e3e3e3" pointer-events="none"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 218px; height: 1px; padding-top: 137px; margin-left: 200px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
|
||||
Content
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="308" y="141" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Content
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="0" y="0" width="490" height="44.87" fill="#deedff" stroke="#6e6e6e" pointer-events="none"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 488px; height: 1px; padding-top: 22px; margin-left: 1px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
|
||||
Titlebar (Navigation + Search)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="245" y="26" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Titlebar (Navigation + Search)
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="0" y="44.87" width="126.73" height="185.13" fill="#f7f7f7" stroke="#6e6e6e" pointer-events="none"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 125px; height: 1px; padding-top: 137px; margin-left: 1px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
|
||||
Sidebar (Navigation)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="63" y="141" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Sidebar (Navigation)
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="0" y="226.67" width="490" height="33.33" fill="rgb(255, 255, 255)" stroke="#6e6e6e" pointer-events="none"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 488px; height: 1px; padding-top: 243px; margin-left: 1px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
|
||||
Footer (Breadcrumps)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="245" y="247" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Footer (Breadcrumps)
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="371.72" y="14.87" width="101.38" height="16.67" rx="2.5" ry="2.5" fill="rgb(255, 255, 255)" stroke="#6e6e6e" pointer-events="none"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 99px; height: 1px; padding-top: 23px; margin-left: 373px;">
|
||||
<div data-drawio-colors="color: #262626; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(38, 38, 38); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
|
||||
Search
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="422" y="27" fill="#262626" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Search
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 32px; height: 1px; padding-top: 23px; margin-left: 19px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
|
||||
<div style="display: inline-block; font-size: 20px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
|
||||
<font color="#262626">
|
||||
Title
|
||||
</font>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="19" y="29" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="20px">
|
||||
Tit...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
</g>
|
||||
<switch>
|
||||
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
|
||||
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
|
||||
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
|
||||
Text is not SVG - cannot display
|
||||
</text>
|
||||
</a>
|
||||
</switch>
|
||||
</svg>
|
After Width: | Height: | Size: 9.5 KiB |
@ -0,0 +1,102 @@
|
||||
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="491px" height="261px" viewBox="-0.5 -0.5 491 261" content="<mxfile><diagram id="6E4AiNPWWr3a8GvC3Ypl" name="Page-1">xZZNj5swEIZ/DdL2gjAGA8cmm7SX9pJKPTvBAasGU8f56q/vOJjFLOxqpbC7WIrMO/5gnhlP7OFldfmmaFP+kDkTXhjkFw8/emGYogR+jXBthSRJW6FQPG8l1Asb/o9ZMbDqkefsMBiopRSaN0NxJ+ua7fRAo0rJ83DYXorhrg0t2EjY7KgYq795rkvrVhz0+nfGi7LbGQXWUtFusBUOJc3l2ZHwysNLJaVue9VlyYRh13Fp561fsD59mGK1ftOErJ1xouJonbMfpq+dt4WSx2a8sN3rxJRmlynsdNut0HsGGcFkxbS6wrhzzy7KLJDS4RYSK1Ibr+Jpbu8SdKxX0x6+wUHwr86ZGR94eHEuuWabhu6M9Qz5C1qpK1j/EUH3oJX8w5ZSSHWbjcnKNLBMIMpeYPRJLLrz48BYylqb752XyerW7mXSWbPUj8Osf2z1sMUDEZ9YxYEIs3xCJjhi7GM8A0o0QrmBorSlyjPpTgTst9jCCylM7+EX14DWmIBJ8JOeeEE1l/WX+8jvuRAO93Vi2odkKQqJn4TvlajhiO4aaiIzcB8WitF8p45Vc7iT3jtRuriEIoSTDKMARzEe5C2Qggx1n1ESY4L9MIlTEgYkzUgcj3Hf0tl9yAz08Ti3GVW78hXa6B7aeyhCjh4S02aLApQHJwrpsHpEaBiEcSVBAfK7yVEK4cjGUUDPQ5nOEIVo4p+rrSuG1+1/tkNG/h7NjWHRw3OktgLZAtQuAHu3a7S2UVyBrX4teLWs2bPqYyUqeFHDq2B7s4KJE4eL01crVzzPzSaTuTI8u+YD7dUvDD4mGRCaDqN7JLHv5kJKJs7kDNkAr/0l8GZzbtJ49R8=</diagram></mxfile>">
|
||||
<defs/>
|
||||
<g>
|
||||
<rect x="0" y="0" width="490" height="260" fill="rgb(255, 255, 255)" stroke="#6e6e6e" pointer-events="none"/>
|
||||
<rect x="198.53" y="16.67" width="219.66" height="233.33" fill="rgb(255, 255, 255)" stroke="#e3e3e3" pointer-events="none"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 218px; height: 1px; padding-top: 133px; margin-left: 200px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
|
||||
Content
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="308" y="137" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Content
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="0" y="0" width="126.72" height="260" fill="#f7f7f7" stroke="#6e6e6e" pointer-events="none"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 125px; height: 1px; padding-top: 130px; margin-left: 1px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
|
||||
Sidebar
|
||||
<br/>
|
||||
(Title + Navigation)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="63" y="134" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Sidebar...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="126.72" y="226.67" width="363.28" height="33.33" fill="rgb(255, 255, 255)" stroke="#6e6e6e" pointer-events="none"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 361px; height: 1px; padding-top: 243px; margin-left: 128px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
|
||||
Footer (Breadcrumps)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="308" y="247" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Footer (Breadcrumps)
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="12.67" y="41.67" width="101.38" height="16.67" rx="2.5" ry="2.5" fill="rgb(255, 255, 255)" stroke="#6e6e6e" pointer-events="none"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 99px; height: 1px; padding-top: 50px; margin-left: 14px;">
|
||||
<div data-drawio-colors="color: #262626; " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(38, 38, 38); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
|
||||
Search
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="63" y="54" fill="#262626" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Search
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 32px; height: 1px; padding-top: 20px; margin-left: 15px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left;">
|
||||
<div style="display: inline-block; font-size: 20px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;">
|
||||
<font color="#262626">
|
||||
Title
|
||||
</font>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="15" y="26" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="20px">
|
||||
Tit...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
</g>
|
||||
<switch>
|
||||
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
|
||||
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
|
||||
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
|
||||
Text is not SVG - cannot display
|
||||
</text>
|
||||
</a>
|
||||
</switch>
|
||||
</svg>
|
After Width: | Height: | Size: 8.2 KiB |
169
docs/doxygen-awesome-css/include/MyLibrary/example.hpp
Normal file
@ -0,0 +1,169 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
namespace MyLibrary {
|
||||
|
||||
enum Color { red, green, blue };
|
||||
|
||||
/**
|
||||
* @brief Example class to demonstrate the features of the custom CSS.
|
||||
*
|
||||
* @author jothepro
|
||||
*
|
||||
*/
|
||||
class Example {
|
||||
public:
|
||||
/**
|
||||
* @brief brief summary
|
||||
*
|
||||
* doxygen test documentation
|
||||
*
|
||||
* @param test this is the only parameter of this test function. It does nothing!
|
||||
*
|
||||
* # Supported elements
|
||||
*
|
||||
* These elements have been tested with the custom CSS.
|
||||
*
|
||||
* ## Tables
|
||||
*
|
||||
* <div class="tabbed">
|
||||
*
|
||||
* - <b class="tab-title">Basic</b>
|
||||
* This theme supports normal markdown tables:<br>
|
||||
* | Item | Title | Description | More |
|
||||
* |-----:|-------|-----------------------|--------------------------------------------|
|
||||
* | 1 | Foo | A placeholder | Some lorem ipsum to make this table wider. |
|
||||
* | 2 | Bar | Also a placeholder | More lorem ipsum. |
|
||||
* | 3 | Baz | The third placeholder | More lorem ipsum. |
|
||||
* - <b class="tab-title">Centered</b>
|
||||
* <center>
|
||||
* A table can be centered with the `<center>` html tag:<br>
|
||||
* | Item | Title | Description | More |
|
||||
* |-----:|-------|-----------------------|--------------------------------------------|
|
||||
* | 1 | Foo | A placeholder | Some lorem ipsum to make this table wider. |
|
||||
* | 2 | Bar | Also a placeholder | More lorem ipsum. |
|
||||
* | 3 | Baz | The third placeholder | More lorem ipsum. |
|
||||
* </center>
|
||||
* - <b class="tab-title">Stretched</b>
|
||||
* A table wrapped in `<div class="full_width_table">` fills the full page width.
|
||||
* <div class="full_width_table">
|
||||
* | Item | Title | Description | More |
|
||||
* |-----:|-------|-----------------------|--------------------------------------------|
|
||||
* | 1 | Foo | A placeholder | Some lorem ipsum to make this table wider. |
|
||||
* | 2 | Bar | Also a placeholder | More lorem ipsum. |
|
||||
* | 3 | Baz | The third placeholder | More lorem ipsum. |
|
||||
* </div>
|
||||
* **Caution**: This will break the overflow scrolling support!
|
||||
* - <b class="tab-title">Complex</b>
|
||||
* Complex [Doxygen tables](https://www.doxygen.nl/manual/tables.html) are also supported as seen in @ref multi_row "this example":<br>
|
||||
* <table>
|
||||
* <caption id="multi_row">Complex table</caption>
|
||||
* <tr><th>Column 1 <th>Column 2 <th>Column 3
|
||||
* <tr><td rowspan="2">cell row=1+2,col=1<td>cell row=1,col=2<td>cell row=1,col=3
|
||||
* <tr><td rowspan="2">cell row=2+3,col=2 <td>cell row=2,col=3
|
||||
* <tr><td>cell row=3,col=1 <td>cell row=3,col=3
|
||||
* </table>
|
||||
* - <b class="tab-title">Overflow Scrolling</b> The table content is scrollable if the table gets too wide.<br>
|
||||
* | first_column | second_column | third_column | fourth_column | fifth_column | sixth_column | seventh_column | eighth_column | ninth_column |
|
||||
* |--------------|---------------|--------------|---------------|--------------|--------------|----------------|---------------|--------------|
|
||||
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|
||||
* - <b class="tab-title">Images</b>A table can contain images:<br>
|
||||
* | Column 1 | Column 2 |
|
||||
* |---------------------------|-------------------------------------------------|
|
||||
* |  | ← the image should not be inverted in dark-mode |
|
||||
*
|
||||
*
|
||||
* </div>
|
||||
*
|
||||
* ## Diagrams
|
||||
*
|
||||
* Graphviz diagrams support dark mode and can be scrolled once they get too wide:
|
||||
*
|
||||
* \dot Graphviz with a caption
|
||||
* digraph example {
|
||||
* node [fontsize="12"];
|
||||
* rankdir="LR"
|
||||
* a -> b -> c -> d -> e -> f -> g -> h -> i -> j -> k;
|
||||
* }
|
||||
* \enddot
|
||||
*
|
||||
* ## Lists
|
||||
*
|
||||
* - element 1
|
||||
* - element 2
|
||||
*
|
||||
* 1. element 1
|
||||
* ```
|
||||
* code in lists
|
||||
* ```
|
||||
* 2. element 2
|
||||
*
|
||||
* ## Quotes
|
||||
*
|
||||
* > Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
|
||||
* > ut labore et dolore magna aliqua. Vitae proin sagittis nisl rhoncus mattis rhoncus urna neque viverra.
|
||||
* > Velit sed ullamcorper morbi tincidunt ornare.
|
||||
* >
|
||||
* > Lorem ipsum dolor sit amet consectetur adipiscing elit duis.
|
||||
* *- jothepro*
|
||||
*
|
||||
* ## Code block
|
||||
*
|
||||
* ```cpp
|
||||
* auto x = "code within md fences";
|
||||
* ```
|
||||
*
|
||||
* @code{.cpp}
|
||||
* // code within @code block
|
||||
* while(true) {
|
||||
* auto example = std::make_shared<Example>(5);
|
||||
* example->test("test");
|
||||
* }
|
||||
* @endcode
|
||||
*
|
||||
* // code within indented code block
|
||||
* auto test = std::shared_ptr<Example(5);
|
||||
*
|
||||
*
|
||||
* Inline `code` elements in a text. *Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.* This also works within multiline text and does not break the `layout`.
|
||||
*
|
||||
*
|
||||
* ## Special hints
|
||||
*
|
||||
* @warning this is a warning only for demonstration purposes
|
||||
*
|
||||
* @note this is a note to show that notes work. They can also include `code`:
|
||||
* @code{.c}
|
||||
* void this_looks_awesome();
|
||||
* @endcode
|
||||
*
|
||||
* @bug example bug
|
||||
*
|
||||
* @deprecated None of this will be deprecated, because it's beautiful!
|
||||
*
|
||||
* @invariant This is an invariant
|
||||
*
|
||||
* @pre This is a precondition
|
||||
*
|
||||
* @post This is a postcondition
|
||||
*
|
||||
* @todo This theme is never finished!
|
||||
*
|
||||
* @remark This is awesome!
|
||||
*
|
||||
*/
|
||||
std::string test(const std::string& test);
|
||||
|
||||
virtual int virtualfunc() = 0;
|
||||
|
||||
static bool staticfunc();
|
||||
|
||||
|
||||
};
|
||||
|
||||
class SecondExample {
|
||||
std::string foo();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include "example.hpp"
|
||||
#include <iostream>
|
||||
|
||||
namespace MyLibrary {
|
||||
|
||||
/**
|
||||
* @brief some subclass
|
||||
*/
|
||||
template<typename TemplatedClass>
|
||||
class SubclassExample : public Example {
|
||||
public:
|
||||
|
||||
/**
|
||||
* @bug second bug
|
||||
* @return
|
||||
*/
|
||||
int virtualfunc() override;
|
||||
|
||||
/**
|
||||
* @brief Template function function
|
||||
*/
|
||||
template <typename T>
|
||||
std::shared_ptr<std::string> function_template_test(std::shared_ptr<T>& param);
|
||||
|
||||
/**
|
||||
* @brief Extra long function with lots of parameters and many template types.
|
||||
*
|
||||
* Also has a long return type.
|
||||
*
|
||||
* @param param1 first parameter
|
||||
* @param param2 second parameter
|
||||
* @param parameter3 third parameter
|
||||
*/
|
||||
template <typename T, typename Foo, typename Bar, typename Alice, typename Bob, typename Charlie, typename Hello, typename World>
|
||||
std::pair<std::string, std::string> long_function_with_many_parameters(std::shared_ptr<T>& param1, std::shared_ptr<std::string>& param2, bool parameter3, Alice paramater4 Bob parameter 5) {
|
||||
if(true) {
|
||||
std::cout << "this even has some code." << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
1
docs/doxygen-awesome-css/logo.drawio.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="61px" height="74px" viewBox="-0.5 -0.5 61 74" content="<mxfile host="drawio-plugin" modified="2021-03-16T23:58:23.462Z" agent="5.0 (Macintosh; Intel Mac OS X 10_16_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36" version="13.7.9" etag="JoeaGLJ54FcERO7YrWLQ" type="embed"><diagram id="JMB9aH8b_oZ7EWDuqJgx" name="Page-1">7VdNc5swEP01HDsjkGPDsSVJe+lMZnzoWYENaAwsI8ux6a+vCCtA4KSu62kmSS+M9LT7tB9P0uDxuDx8VaLOv2MKhRew9ODxay8Igigy3xZoCOC8AzIl0w7yB2AtfwKBjNCdTGHrGGrEQsvaBROsKki0gwmlcO+aPWDh7lqLDGbAOhHFHP0hU513aHjFBvwbyCy3O/uMVkphjQnY5iLF/QjiNx6PFaLuRuUhhqKtna1L53f7zGofmIJKn+RAcTyKYkfJUWC6sdlmCnc1mYHScDhWY3Fvzdk8Br/PzCgCsAStGmNCRJy2JDH4pIV8VMG+edS4rCcZcjMDSu+ZVP3fpwpV+rnVh5ndF5hsPP4l16VhvPbN8AErTWI0re7mMRaonpw5Y8tlHBvcsNzKwnpttVDaslZYgcXIhj3NFW56LS1bbrM44l6m4Wq5MLhxzEDfgZKmAKDWtUhklRFNgqVM7LYb0Enu8I9j9dkVC80KtgS6Lb3fGnYVgXSm/1Ez2fFu7oeTYA/CuIUWU1AILR9d/mN9pR3uUJqde7F88leOWhYLl2GLO5UAOY2FP+GxMm3c6CwNlXlKY9oompFZ3Rps59EOkuw8BoH2BTtNs8EfaZbUdYZkXQGuXhDgR9DYRBycXURj00D+UmMT2ktJLnr9B8HG0IzFcPkHYfUe3oPZqfOjMEiDs1+KEw5n9P/+/1f3f/gq1394lt7erqQ+0HVvpsPPRWc+/KHxm18=</diagram></mxfile>"><defs/><g><path d="M 13 57 L 13.01 57.01 L 15.87 50.14 L 18.37 43.14 L 20.91 36.15 L 23.67 29.25 L 26.4 22.33 Q 30 13 33.71 22.28 L 33.55 22.22 L 35.48 26.91 L 37.49 31.64 L 39.48 36.36 L 41.2 40.97 L 43.05 45.63" fill="none" stroke="#010508" stroke-opacity="0.1" stroke-width="6" stroke-linejoin="round" stroke-linecap="round" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 47.51 56.77 L 47.65 56.93 L 45.43 54.91 L 43.41 53.11 L 41.43 51.35 L 39.63 49.8 L 37.48 47.86 L 37.39 47.64 L 39.79 47.17 L 41.9 45.98 L 44.24 45.37 L 46.48 44.52 L 48.62 43.4 L 48.54 43.39 L 48.58 46.09 L 48.04 48.74 L 48.04 51.43 L 47.8 54.1 L 47.51 56.77 Z Z" fill-opacity="0.1" fill="#010508" stroke="#010508" stroke-opacity="0.1" stroke-width="6" stroke-linejoin="round" stroke-linecap="round" stroke-miterlimit="10" pointer-events="all"/><path d="M 10 43 L 9.94 42.88 L 12.16 41.98 L 14.31 40.96 L 16.51 40.01 L 18.62 38.89 L 20.88 38.1 Q 30 34 40 34 L 40 33.75 L 42 33.83 L 44 33.8 L 46 33.79 L 48 34.05 L 50 34" fill="none" stroke="#010508" stroke-opacity="0.1" stroke-width="7" stroke-linejoin="round" stroke-linecap="round" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 10 54 L 9.97 53.99 L 12.69 47.07 L 15.43 40.16 L 18.07 33.21 L 20.65 26.24 L 23.4 19.33 Q 27 10 30.71 19.28 L 30.66 19.26 L 32.46 23.91 L 34.55 28.66 L 36.26 33.27 L 38.35 38.03 L 40.05 42.63" fill="none" stroke="#1982d2" stroke-width="6" stroke-linejoin="round" stroke-linecap="round" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 44.51 53.77 L 44.56 53.83 L 42.48 51.97 L 40.5 50.21 L 38.48 48.41 L 36.41 46.56 L 34.48 44.86 L 34.55 45.02 L 36.72 44 L 39 43.24 L 41.21 42.28 L 43.48 41.51 L 45.62 40.4 L 45.78 40.42 L 45.51 43.09 L 45.01 45.74 L 44.87 48.42 L 44.94 51.12 L 44.51 53.77 Z Z" fill="#1982d2" stroke="#1982d2" stroke-width="6" stroke-linejoin="round" stroke-linecap="round" stroke-miterlimit="10" pointer-events="all"/><path d="M 7 40 L 7.02 40.05 L 9.28 39.25 L 11.33 38 L 13.48 36.96 L 15.73 36.14 L 17.88 35.1 Q 27 31 37 31 L 37 30.79 L 39 31.11 L 41 30.85 L 43 30.78 L 45 30.89 L 47 31" fill="none" stroke="#1982d2" stroke-width="8" stroke-linejoin="round" stroke-linecap="round" stroke-miterlimit="10" pointer-events="stroke"/></g></svg>
|
After Width: | Height: | Size: 3.5 KiB |
34
docs/doxygen-awesome-css/package.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "@jothepro/doxygen-awesome-css",
|
||||
"version": "2.3.1",
|
||||
"description": "Custom CSS theme for doxygen html-documentation with lots of customization parameters.",
|
||||
"main": "",
|
||||
"scripts": {
|
||||
"npm-pack": "npm pack",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jothepro/doxygen-awesome-css.git"
|
||||
},
|
||||
"homepage": "https://jothepro.github.io/doxygen-awesome-css/",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jothepro/doxygen-awesome-css/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"doxygen",
|
||||
"css",
|
||||
"theme",
|
||||
"awesome"
|
||||
],
|
||||
"author": {
|
||||
"name": "jothepro",
|
||||
"url": "https://github.com/jothepro",
|
||||
"git": "https://github.com/jothepro/doxygen-awesome-css"
|
||||
},
|
||||
"license": "MIT",
|
||||
"config": {},
|
||||
"dependencies": {},
|
||||
"devDependencies": {},
|
||||
"xpack": {}
|
||||
}
|
@ -1,12 +1,90 @@
|
||||
<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!-- HTML header for doxygen 1.10.0-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="$langISO">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<title>$title</title>
|
||||
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="$relpath$search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javaScript" src="$relpath$search/search.js"></script>
|
||||
<link href="$relpath$doxygen.css" rel="stylesheet" type="text/css"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen $doxygenversion"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
|
||||
<!--BEGIN PROJECT_ICON-->
|
||||
<link rel="icon" href="$relpath^$projecticon" type="image/x-icon" />
|
||||
<!--END PROJECT_ICON-->
|
||||
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<script type="text/javascript">var page_layout=1;</script>
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||
<!--BEGIN COPY_CLIPBOARD-->
|
||||
<script type="text/javascript" src="$relpath^clipboard.js"></script>
|
||||
<!--END COPY_CLIPBOARD-->
|
||||
$treeview
|
||||
$search
|
||||
$mathjax
|
||||
$darkmode
|
||||
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
|
||||
$extrastylesheet
|
||||
<html>
|
||||
<head>
|
||||
<!-- ... other metadata & script includes ... -->
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeDarkModeToggle.init()
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</head>
|
||||
<body onload='searchBox.OnSelectItem(0);'>
|
||||
<body>
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
|
||||
<!--BEGIN TITLEAREA-->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<!--BEGIN PROJECT_LOGO-->
|
||||
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"$logosize/></td>
|
||||
<!--END PROJECT_LOGO-->
|
||||
<!--BEGIN PROJECT_NAME-->
|
||||
<td id="projectalign">
|
||||
<div id="projectname">$projectname<!--BEGIN PROJECT_NUMBER--><span id="projectnumber"> $projectnumber</span><!--END PROJECT_NUMBER-->
|
||||
</div>
|
||||
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
|
||||
</td>
|
||||
<!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME-->
|
||||
<!--BEGIN PROJECT_BRIEF-->
|
||||
<td>
|
||||
<div id="projectbrief">$projectbrief</div>
|
||||
</td>
|
||||
<!--END PROJECT_BRIEF-->
|
||||
<!--END !PROJECT_NAME-->
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN SEARCHENGINE-->
|
||||
<!--BEGIN !FULL_SIDEBAR-->
|
||||
<td>$searchbox</td>
|
||||
<!--END !FULL_SIDEBAR-->
|
||||
<!--END SEARCHENGINE-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
</tr>
|
||||
<!--BEGIN SEARCHENGINE-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<tr><td colspan="2">$searchbox</td></tr>
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END SEARCHENGINE-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--END TITLEAREA-->
|
||||
<!-- end header part -->
|
||||
|
@ -20,19 +20,6 @@ You can find the documentation for netCDF-Fortran here:
|
||||
- \subpage RELEASE_NOTES
|
||||
- <A href="https://docs.unidata.ucar.edu/nug/current/getting_and_building_netcdf.html">Getting and Building NetCDF</A>
|
||||
|
||||
\subsection nightly_status The Latest NetCDF Build Status
|
||||
|
||||
\subsubsection NetCDF-C
|
||||
|
||||
- <A href="http://cdash.unidata.ucar.edu/index.php?project=netcdf-c">The netCDF-C Nightly and Continuous Integration Dashboard</A>
|
||||
- <A href="https://travis-ci.org/Unidata/netcdf-c">NetCDF-C at Travis-CI</A>
|
||||
|
||||
\subsubsection NetCDF-Fortran
|
||||
|
||||
|
||||
- <A href="http://cdash.unidata.ucar.edu/index.php?project=netcdf-fortran">The netCDF-Fortran Nightly and Continuous Integration Dashboard</A>
|
||||
- <A href="https://travis-ci.org/Unidata/netcdf-c">NetCDF-Fortran at Travis-CI</A>
|
||||
|
||||
\section learn-more Learn more about using NetCDF-C
|
||||
|
||||
- \ref sec_tut
|
||||
|
@ -9,7 +9,7 @@ This file is the same as nc_test4/test_filter.c
|
||||
/*! \file
|
||||
Example program for write then read of a variable using bzip2 compression.
|
||||
|
||||
\ingroup tutorial
|
||||
@ingroup tutorial
|
||||
|
||||
This is an example which
|
||||
creates a file with a variable that is compressed using bzip2.
|
||||
|
@ -2,7 +2,7 @@
|
||||
Research/Unidata. See COPYRIGHT file for conditions of use. */
|
||||
/**
|
||||
* @file
|
||||
* @ingroup tutorial
|
||||
* @defgroup tutorial Tutorial Examples
|
||||
* A more complex example of writing a netCDF file.
|
||||
*
|
||||
* This is an example program which writes some 4D pressure and
|
||||
|
@ -14,8 +14,7 @@ FOREACH(CTEST ${H5TESTS})
|
||||
ADD_EXECUTABLE(${CTEST} ${CTEST}.c)
|
||||
TARGET_LINK_LIBRARIES(${CTEST}
|
||||
netcdf
|
||||
${HDF5_HL_LIBRARIES}
|
||||
${HDF5_C_LIBRARIES}
|
||||
HDF5::HDF5 hdf5::hdf5_hl
|
||||
)
|
||||
ADD_TEST(${CTEST} ${EXECUTABLE_OUTPUT_PATH}/${CTEST})
|
||||
ENDFOREACH()
|
||||
|
@ -332,6 +332,13 @@ typedef struct NCglobalstate {
|
||||
struct GlobalZarr { /* Zarr specific parameters */
|
||||
char dimension_separator;
|
||||
} zarr;
|
||||
struct GlobalAWS { /* AWS S3 specific parameters/defaults */
|
||||
char* default_region;
|
||||
char* config_file;
|
||||
char* profile;
|
||||
char* access_key_id;
|
||||
char* secret_access_key;
|
||||
} aws;
|
||||
struct Alignment { /* H5Pset_alignment parameters */
|
||||
int defined; /* 1 => threshold and alignment explicitly set */
|
||||
int threshold;
|
||||
|
@ -15,20 +15,24 @@ and do the command:
|
||||
make makepluginjson
|
||||
*/
|
||||
|
||||
/* Inside libnetcdf and for plugins, export the json symbols */
|
||||
#ifndef DLLEXPORT
|
||||
#ifdef _WIN32
|
||||
#define DLLEXPORT __declspec(dllexport)
|
||||
#if defined(DLL_NETCDF) /* define when library is a DLL */
|
||||
# if defined(DLL_EXPORT) /* define when building the library */
|
||||
# define MSC_EXTRA __declspec(dllexport)
|
||||
# else
|
||||
# define MSC_EXTRA __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
#define DLLEXPORT
|
||||
#endif
|
||||
# define MSC_EXTRA
|
||||
#endif /* defined(DLL_NETCDF) */
|
||||
#ifndef EXTERNL
|
||||
# define EXTERNL MSC_EXTRA extern
|
||||
#endif
|
||||
|
||||
/* Override for plugins */
|
||||
#ifdef NETCDF_JSON_H
|
||||
#define OPTEXPORT static
|
||||
#else
|
||||
#define OPTEXPORT DLLEXPORT
|
||||
#define OPTEXPORT MSC_EXTRA
|
||||
#endif /*NETCDF_JSON_H*/
|
||||
|
||||
/**************************************************/
|
||||
|
@ -33,16 +33,6 @@ typedef struct NCRCentry {
|
||||
char* value;
|
||||
} NCRCentry;
|
||||
|
||||
struct AWSentry {
|
||||
char* key;
|
||||
char* value;
|
||||
};
|
||||
|
||||
struct AWSprofile {
|
||||
char* name;
|
||||
NClist* entries; /* NClist<struct AWSentry*> */
|
||||
};
|
||||
|
||||
/* collect all the relevant info around the rc file and AWS */
|
||||
typedef struct NCRCinfo {
|
||||
int ignore; /* if 1, then do not use any rc file */
|
||||
@ -88,16 +78,10 @@ EXTERNL char* NC_mktmp(const char* base);
|
||||
EXTERNL int NC_getmodelist(const char* modestr, NClist** modelistp);
|
||||
EXTERNL int NC_testmode(NCURI* uri, const char* tag);
|
||||
EXTERNL int NC_testpathmode(const char* path, const char* tag);
|
||||
EXTERNL int NC_addmodetag(NCURI* uri, const char* tag);
|
||||
EXTERNL int NC_split_delim(const char* path, char delim, NClist* segments);
|
||||
EXTERNL int NC_join(struct NClist* segments, char** pathp);
|
||||
|
||||
/* From ds3util.c */
|
||||
/* S3 profiles */
|
||||
EXTERNL int NC_getactives3profile(NCURI* uri, const char** profilep);
|
||||
EXTERNL int NC_s3profilelookup(const char* profile, const char* key, const char** valuep);
|
||||
EXTERNL int NC_authgets3profile(const char* profile, struct AWSprofile** profilep);
|
||||
EXTERNL int NC_iss3(NCURI* uri);
|
||||
EXTERNL int NC_s3urlrebuild(NCURI* url, struct NCS3INFO* s3, NCURI** newurlp);
|
||||
EXTERNL int NC_joinwith(NClist* segments, const char* sep, const char* prefix, const char* suffix, char** pathp);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
@ -9,6 +9,9 @@
|
||||
#define AWSHOST ".amazonaws.com"
|
||||
#define GOOGLEHOST "storage.googleapis.com"
|
||||
|
||||
/* Define the "global" default region to be used if no other region is specified */
|
||||
#define AWS_GLOBAL_DEFAULT_REGION "us-east-1"
|
||||
|
||||
/* Track the server type, if known */
|
||||
typedef enum NCS3SVC {NCS3UNK=0, /* unknown */
|
||||
NCS3=1, /* s3.amazon.aws */
|
||||
@ -24,6 +27,20 @@ typedef struct NCS3INFO {
|
||||
NCS3SVC svc;
|
||||
} NCS3INFO;
|
||||
|
||||
struct AWSentry {
|
||||
char* key;
|
||||
char* value;
|
||||
};
|
||||
|
||||
struct AWSprofile {
|
||||
char* name;
|
||||
struct NClist* entries; /* NClist<struct AWSentry*> */
|
||||
};
|
||||
|
||||
/* Opaque Types */
|
||||
struct NClist;
|
||||
struct NCglobalstate;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -41,13 +58,23 @@ EXTERNL int NC_s3sdkclose(void* s3client0, NCS3INFO* info, int deleteit, char**
|
||||
EXTERNL int NC_s3sdkgetkeys(void* s3client0, const char* bucket, const char* prefix, size_t* nkeysp, char*** keysp, char** errmsgp);
|
||||
EXTERNL int NC_s3sdksearch(void* s3client0, const char* bucket, const char* prefixkey0, size_t* nkeysp, char*** keysp, char** errmsgp);
|
||||
EXTERNL int NC_s3sdkdeletekey(void* client0, const char* bucket, const char* pathkey, char** errmsgp);
|
||||
EXTERNL const char* NC_s3dumps3info(NCS3INFO* info);
|
||||
|
||||
/* From ds3util.c */
|
||||
EXTERNL int NC_s3sdkinitialize(void);
|
||||
EXTERNL int NC_s3sdkfinalize(void);
|
||||
|
||||
EXTERNL int NC_getdefaults3region(NCURI* uri, const char** regionp);
|
||||
EXTERNL int NC_s3urlprocess(NCURI* url, NCS3INFO* s3, NCURI** newurlp);
|
||||
EXTERNL int NC_s3clear(NCS3INFO* s3);
|
||||
EXTERNL int NC_s3clone(NCS3INFO* s3, NCS3INFO** news3p);
|
||||
EXTERNL const char* NC_s3dumps3info(NCS3INFO* info);
|
||||
EXTERNL void NC_s3freeprofilelist(struct NClist* profiles);
|
||||
EXTERNL int NC_getactives3profile(NCURI* uri, const char** profilep);
|
||||
EXTERNL int NC_s3profilelookup(const char* profile, const char* key, const char** valuep);
|
||||
EXTERNL int NC_authgets3profile(const char* profile, struct AWSprofile** profilep);
|
||||
EXTERNL int NC_iss3(NCURI* uri, enum NCS3SVC*);
|
||||
EXTERNL int NC_s3urlrebuild(NCURI* url, struct NCS3INFO* s3, NCURI** newurlp);
|
||||
EXTERNL int NC_aws_load_credentials(struct NCglobalstate* gstate);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -15,20 +15,24 @@ and do the command:
|
||||
make makepluginjson
|
||||
*/
|
||||
|
||||
/* Inside libnetcdf and for plugins, export the json symbols */
|
||||
#ifndef DLLEXPORT
|
||||
#ifdef _WIN32
|
||||
#define DLLEXPORT __declspec(dllexport)
|
||||
#if defined(DLL_NETCDF) /* define when library is a DLL */
|
||||
# if defined(DLL_EXPORT) /* define when building the library */
|
||||
# define MSC_EXTRA __declspec(dllexport)
|
||||
# else
|
||||
# define MSC_EXTRA __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
#define DLLEXPORT
|
||||
#endif
|
||||
# define MSC_EXTRA
|
||||
#endif /* defined(DLL_NETCDF) */
|
||||
#ifndef EXTERNL
|
||||
# define EXTERNL MSC_EXTRA extern
|
||||
#endif
|
||||
|
||||
/* Override for plugins */
|
||||
#ifdef NETCDF_JSON_H
|
||||
#define OPTEXPORT static
|
||||
#else
|
||||
#define OPTEXPORT DLLEXPORT
|
||||
#define OPTEXPORT MSC_EXTRA
|
||||
#endif /*NETCDF_JSON_H*/
|
||||
|
||||
/**************************************************/
|
||||
@ -44,8 +48,6 @@ and do the command:
|
||||
|
||||
#define NCJ_NSORTS 8
|
||||
|
||||
/* No flags are currently defined, but the argument is a placeholder */
|
||||
|
||||
/* Define a struct to store primitive values as unquoted
|
||||
strings. The sort will provide more info. Do not bother with
|
||||
a union since the amount of saved space is minimal.
|
||||
@ -172,6 +174,8 @@ and do the command:
|
||||
|
||||
|
||||
#undef NCJDEBUG
|
||||
#define NCJTRACE
|
||||
|
||||
#ifdef NCJDEBUG
|
||||
/* Warning: do not evaluate err more than once */
|
||||
#define NCJTHROW(err) ncjbreakpoint(err)
|
||||
@ -210,6 +214,8 @@ typedef struct NCJparser {
|
||||
long long num;
|
||||
int tf;
|
||||
int status; /* NCJ_ERR|NCJ_OK */
|
||||
unsigned flags;
|
||||
# define NCJ_TRACE 1
|
||||
} NCJparser;
|
||||
|
||||
typedef struct NCJbuf {
|
||||
@ -233,7 +239,7 @@ typedef struct NCJbuf {
|
||||
#define nulldup(x) ((x)?strdup(x):(x))
|
||||
#endif
|
||||
|
||||
#ifdef NCJDEBUG
|
||||
#if defined NCJDEBUG || defined NCJTRACE
|
||||
static char* tokenname(int token);
|
||||
#endif
|
||||
|
||||
@ -295,6 +301,7 @@ NCJparsen(size_t len, const char* text, unsigned flags, NCjson** jsonp)
|
||||
parser = calloc(1,sizeof(NCJparser));
|
||||
if(parser == NULL)
|
||||
{stat = NCJTHROW(NCJ_ERR); goto done;}
|
||||
parser->flags = flags;
|
||||
parser->text = (char*)malloc(len+1+1);
|
||||
if(parser->text == NULL)
|
||||
{stat = NCJTHROW(NCJ_ERR); goto done;}
|
||||
@ -576,6 +583,16 @@ fprintf(stderr,"%s(%d): |%s|\n",tokenname(token),token,parser->yytext);
|
||||
done:
|
||||
if(parser->status == NCJ_ERR)
|
||||
token = NCJ_UNDEF;
|
||||
#ifdef NCJTRACE
|
||||
if(parser->flags & NCJ_TRACE) {
|
||||
const char* txt = NULL;
|
||||
switch(token) {
|
||||
case NCJ_STRING: case NCJ_INT: case NCJ_DOUBLE: case NCJ_BOOLEAN: txt = parser->yytext; break;
|
||||
default: break;
|
||||
}
|
||||
fprintf(stderr,">>>> token=%s:'%s'\n",tokenname(token),(txt?txt:""));
|
||||
}
|
||||
#endif
|
||||
return token;
|
||||
}
|
||||
|
||||
@ -808,7 +825,7 @@ unescape1(int c)
|
||||
return c;
|
||||
}
|
||||
|
||||
#ifdef NCJDEBUG
|
||||
#if defined NCJDEBUG || defined NCJTRACE
|
||||
static char*
|
||||
tokenname(int token)
|
||||
{
|
||||
@ -929,9 +946,9 @@ listappend(struct NCjlist* list, NCjson* json)
|
||||
list->contents[0] = json;
|
||||
list->len++;
|
||||
} else {
|
||||
if((newcontents = (NCjson**)calloc((2*list->len)+1,sizeof(NCjson*)))==NULL)
|
||||
if((newcontents = (NCjson**)calloc((size_t)(2*list->len)+1,sizeof(NCjson*)))==NULL)
|
||||
{stat = NCJTHROW(NCJ_ERR); goto done;}
|
||||
memcpy(newcontents,list->contents,list->len*sizeof(NCjson*));
|
||||
memcpy(newcontents,list->contents, (size_t)list->len*sizeof(NCjson*));
|
||||
newcontents[list->len] = json;
|
||||
list->len++;
|
||||
free(list->contents);
|
||||
|
@ -26,6 +26,18 @@ set_property(SOURCE ncd2dispatch.c
|
||||
|
||||
add_library(dap2 OBJECT ${dap2_SOURCES})
|
||||
|
||||
|
||||
target_link_libraries(dap2 PUBLIC ${CURL_LIBRARIES})
|
||||
target_include_directories(dap2 PUBLIC ${CURL_INCLUDE_DIRS})
|
||||
target_compile_options(dap2
|
||||
PRIVATE
|
||||
-DCURL_STATICLIB=1
|
||||
)
|
||||
|
||||
if (ENABLE_DLL)
|
||||
target_compile_definitions(dap2 PRIVATE DLL_NETCDF DLL_EXPORT)
|
||||
endif()
|
||||
|
||||
IF(STATUS_PARALLEL)
|
||||
target_link_libraries(dap2 PUBLIC MPI::MPI_C)
|
||||
ENDIF(STATUS_PARALLEL)
|
||||
|
@ -4,7 +4,7 @@
|
||||
# University Corporation for Atmospheric Research/Unidata.
|
||||
|
||||
# See netcdf-c/COPYRIGHT file for more info.
|
||||
SET(dap4_SOURCES d4curlfunctions.c d4fix.c d4data.c d4file.c d4parser.c d4meta.c d4varx.c d4dump.c d4swap.c d4chunk.c d4printer.c d4read.c d4http.c d4util.c d4odom.c d4cvt.c d4debug.c ncd4dispatch.c)
|
||||
set(dap4_SOURCES d4curlfunctions.c d4fix.c d4data.c d4file.c d4parser.c d4meta.c d4varx.c d4dump.c d4swap.c d4chunk.c d4printer.c d4read.c d4http.c d4util.c d4odom.c d4cvt.c d4debug.c ncd4dispatch.c)
|
||||
|
||||
##
|
||||
# Turn off inclusion of particular files when using the cmake-native
|
||||
@ -20,10 +20,20 @@ set_property(SOURCE d4meta.c
|
||||
SKIP_UNITY_BUILD_INCLUSION ON)
|
||||
|
||||
add_library(dap4 OBJECT ${dap4_SOURCES})
|
||||
target_link_libraries(dap4 PUBLIC ${CURL_LIBRARIES})
|
||||
target_include_directories(dap4 PUBLIC ${CURL_INCLUDE_DIRS})
|
||||
target_compile_options(dap4
|
||||
PRIVATE
|
||||
-DCURL_STATICLIB=1
|
||||
)
|
||||
|
||||
IF(STATUS_PARALLEL)
|
||||
if (ENABLE_DLL)
|
||||
target_compile_definitions(dap4 PRIVATE DLL_NETCDF DLL_EXPORT)
|
||||
endif()
|
||||
|
||||
if(STATUS_PARALLEL)
|
||||
target_link_libraries(dap4 PUBLIC MPI::MPI_C)
|
||||
ENDIF(STATUS_PARALLEL)
|
||||
endif(STATUS_PARALLEL)
|
||||
|
||||
###
|
||||
# Options related to the man page generation.
|
||||
@ -37,18 +47,18 @@ set(man_MANS netcdf.3)
|
||||
|
||||
set(ARGS_MANPAGE -DAPI=C)
|
||||
|
||||
IF (USE_HDF5)
|
||||
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DNETCDF4=TRUE)
|
||||
ENDIF(USE_HDF5)
|
||||
if (USE_HDF5)
|
||||
set(ARGS_MANPAGE ${ARGS_MANPAGE} -DNETCDF4=TRUE)
|
||||
endif(USE_HDF5)
|
||||
|
||||
IF (BUILD_DAP)
|
||||
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DDAP=TRUE)
|
||||
ENDIF(BUILD_DAP)
|
||||
if (BUILD_DAP)
|
||||
set(ARGS_MANPAGE ${ARGS_MANPAGE} -DDAP=TRUE)
|
||||
endif(BUILD_DAP)
|
||||
|
||||
IF (BUILD_PARALLEL)
|
||||
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DPARALLEL_IO=TRUE)
|
||||
ENDIF(BUILD_PARALLEL)
|
||||
if (BUILD_PARALLEL)
|
||||
set(ARGS_MANPAGE ${ARGS_MANPAGE} -DPARALLEL_IO=TRUE)
|
||||
endif(BUILD_PARALLEL)
|
||||
|
||||
FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.c ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
|
||||
SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} dce.y CMakeLists.txt Makefile.am)
|
||||
set(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} dce.y CMakeLists.txt Makefile.am)
|
||||
ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")
|
||||
|
@ -4,9 +4,18 @@
|
||||
# University Corporation for Atmospheric Research/Unidata.
|
||||
|
||||
# See netcdf-c/COPYRIGHT file for more info.
|
||||
SET(libdispatch_SOURCES dcopy.c dfile.c ddim.c datt.c dattinq.c dattput.c dattget.c derror.c dvar.c dvarget.c dvarput.c dvarinq.c ddispatch.c nclog.c dstring.c dutf8.c dinternal.c doffsets.c ncuri.c nclist.c ncbytes.c nchashmap.c nctime.c nc.c nclistmgr.c utf8proc.h utf8proc.c dpathmgr.c dutil.c drc.c dauth.c dreadonly.c dnotnc4.c dnotnc3.c dinfermodel.c
|
||||
daux.c dinstance.c dinstance_intern.c
|
||||
dcrc32.c dcrc32.h dcrc64.c ncexhash.c ncxcache.c ncjson.c ds3util.c dparallel.c dmissing.c)
|
||||
add_library(dispatch OBJECT)
|
||||
|
||||
target_sources(dispatch
|
||||
PRIVATE
|
||||
dcopy.c dfile.c ddim.c datt.c dattinq.c dattput.c dattget.c derror.c dvar.c dvarget.c dvarput.c dvarinq.c ddispatch.c nclog.c dstring.c dutf8.c dinternal.c doffsets.c ncuri.c nclist.c ncbytes.c nchashmap.c nctime.c nc.c nclistmgr.c utf8proc.h utf8proc.c dpathmgr.c dutil.c drc.c dauth.c dreadonly.c dnotnc4.c dnotnc3.c dinfermodel.c
|
||||
daux.c dinstance.c dinstance_intern.c
|
||||
dcrc32.c dcrc32.h dcrc64.c ncexhash.c ncxcache.c ncjson.c ds3util.c dparallel.c dmissing.c
|
||||
)
|
||||
|
||||
if (ENABLE_DLL)
|
||||
target_compile_definitions(dispatch PRIVATE DLL_NETCDF DLL_EXPORT)
|
||||
endif()
|
||||
|
||||
##
|
||||
# Turn off inclusion of particular files when using the cmake-native
|
||||
@ -22,32 +31,54 @@ set_property(SOURCE dinstance_intern.c dinstance.c dvarput.c
|
||||
SKIP_UNITY_BUILD_INCLUSION ON)
|
||||
|
||||
# Netcdf-4 only functions. Must be defined even if not used
|
||||
SET(libdispatch_SOURCES ${libdispatch_SOURCES} dgroup.c dvlen.c dcompound.c dtype.c denum.c dopaque.c dfilter.c)
|
||||
target_sources(dispatch
|
||||
PRIVATE
|
||||
dgroup.c dvlen.c dcompound.c dtype.c denum.c dopaque.c dfilter.c
|
||||
)
|
||||
|
||||
IF(BUILD_V2)
|
||||
SET(libdispatch_SOURCES ${libdispatch_SOURCES} dv2i.c)
|
||||
ENDIF(BUILD_V2)
|
||||
if(BUILD_V2)
|
||||
target_sources(dispatch
|
||||
PRIVATE
|
||||
dv2i.c
|
||||
)
|
||||
endif(BUILD_V2)
|
||||
|
||||
IF(ENABLE_BYTERANGE)
|
||||
SET(libdispatch_SOURCES ${libdispatch_SOURCES} dhttp.c)
|
||||
if(ENABLE_BYTERANGE)
|
||||
target_sources(dispatch
|
||||
PRIVATE
|
||||
dhttp.c
|
||||
)
|
||||
ENDIF(ENABLE_BYTERANGE)
|
||||
|
||||
IF(ENABLE_S3)
|
||||
IF(ENABLE_S3_INTERNAL)
|
||||
SET(libdispatch_SOURCES ${libdispatch_SOURCES} ncs3sdk_h5.c nch5s3comms.c nch5s3comms.h nccurl_sha256.c nccurl_sha256.h nccurl_hmac.c nccurl_hmac.h nccurl_setup.h)
|
||||
ELSE()
|
||||
SET(libdispatch_SOURCES ${libdispatch_SOURCES} ncs3sdk_aws.cpp awsincludes.h)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
if(ENABLE_S3_INTERNAL)
|
||||
target_sources(dispatch
|
||||
PRIVATE
|
||||
ncs3sdk_h5.c nch5s3comms.c nch5s3comms.h nccurl_sha256.c nccurl_sha256.h nccurl_hmac.c nccurl_hmac.h nccurl_setup.h
|
||||
)
|
||||
else()
|
||||
target_sources(dispatch
|
||||
PRIVATE
|
||||
ncs3sdk_aws.cpp awsincludes.h
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
IF(REGEDIT)
|
||||
SET(libdispatch_SOURCES ${libdispatch_SOURCES} dreg.c)
|
||||
ENDIF(REGEDIT)
|
||||
if(REGEDIT)
|
||||
target_sources(dispatch
|
||||
PRIVATE
|
||||
dreg.c
|
||||
)
|
||||
endif(REGEDIT)
|
||||
|
||||
add_library(dispatch OBJECT ${libdispatch_SOURCES})
|
||||
IF(STATUS_PARALLEL)
|
||||
|
||||
if (USE_HDF5)
|
||||
target_link_libraries(dispatch PRIVATE HDF5::HDF5)
|
||||
endif(USE_HDF5)
|
||||
|
||||
if(STATUS_PARALLEL)
|
||||
target_link_libraries(dispatch PUBLIC MPI::MPI_C)
|
||||
ENDIF(STATUS_PARALLEL)
|
||||
endif(STATUS_PARALLEL)
|
||||
|
||||
if (ENABLE_PNETCDF)
|
||||
target_link_libraries(dispatch PUBLIC PNETCDF::PNETCDF)
|
||||
@ -55,23 +86,23 @@ endif()
|
||||
|
||||
IF(ENABLE_NCZARR)
|
||||
target_include_directories(dispatch PUBLIC ../libnczarr)
|
||||
ENDIF(ENABLE_NCZARR)
|
||||
endif(ENABLE_NCZARR)
|
||||
|
||||
IF(ENABLE_S3)
|
||||
IF(ENABLE_S3_AWS)
|
||||
if(ENABLE_S3)
|
||||
if(ENABLE_S3_AWS)
|
||||
target_include_directories(dispatch PUBLIC ${AWSSDK_INCLUDE_DIRS})
|
||||
IF(NOT MSVC)
|
||||
if(NOT MSVC)
|
||||
target_compile_features(dispatch PUBLIC cxx_std_11)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
endif()
|
||||
else()
|
||||
target_include_directories(dispatch PUBLIC ../libncxml)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
IF(ENABLE_TESTS)
|
||||
if(ENABLE_TESTS)
|
||||
BUILD_BIN_TEST(ncrandom)
|
||||
ENDIF()
|
||||
endif()
|
||||
|
||||
FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
|
||||
SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am)
|
||||
file(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
|
||||
set(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am)
|
||||
ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")
|
||||
|
@ -17,9 +17,10 @@ See COPYRIGHT for license information.
|
||||
#include "netcdf.h"
|
||||
#include "ncbytes.h"
|
||||
#include "ncuri.h"
|
||||
#include "ncauth.h"
|
||||
#include "nclog.h"
|
||||
#include "ncpathmgr.h"
|
||||
#include "ncs3sdk.h"
|
||||
#include "ncauth.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <windows.h>
|
||||
|
@ -134,12 +134,12 @@ int
|
||||
NCDISPATCH_finalize(void)
|
||||
{
|
||||
int status = NC_NOERR;
|
||||
NC_freeglobalstate();
|
||||
#if defined(ENABLE_BYTERANGE) || defined(ENABLE_DAP) || defined(ENABLE_DAP4)
|
||||
curl_global_cleanup();
|
||||
#endif
|
||||
#if defined(ENABLE_DAP4)
|
||||
ncxml_finalize();
|
||||
#endif
|
||||
NC_freeglobalstate(); /* should be one of the last things done */
|
||||
return status;
|
||||
}
|
||||
|
@ -100,7 +100,11 @@ nc_http_open_verbose(const char* path, int verbose, NC_HTTP_STATE** statep)
|
||||
{stat = NCTHROW(NC_ENOMEM); goto done;}
|
||||
state->path = strdup(path);
|
||||
state->url = uri; uri = NULL;
|
||||
state->format = (NC_iss3(state->url)?HTTPS3:HTTPCURL);
|
||||
#ifdef ENABLE_S3
|
||||
state->format = (NC_iss3(state->url,NULL)?HTTPS3:HTTPCURL);
|
||||
#else
|
||||
state->format = HTTPCURL;
|
||||
#endif
|
||||
|
||||
switch (state->format) {
|
||||
case HTTPCURL: {
|
||||
|
@ -902,13 +902,16 @@ NC_infermodel(const char* path, int* omodep, int iscreate, int useparallel, void
|
||||
ncurisetfragments(uri,sfrag);
|
||||
nullfree(sfrag); sfrag = NULL;
|
||||
|
||||
#ifdef ENABLE_S3
|
||||
/* If s3, then rebuild the url */
|
||||
if(NC_iss3(uri)) {
|
||||
if(NC_iss3(uri,NULL)) {
|
||||
NCURI* newuri = NULL;
|
||||
if((stat = NC_s3urlrebuild(uri,NULL,&newuri))) goto done;
|
||||
ncurifree(uri);
|
||||
uri = newuri;
|
||||
} else if(strcmp(uri->protocol,"file")==0) {
|
||||
} else
|
||||
#endif
|
||||
if(strcmp(uri->protocol,"file")==0) {
|
||||
/* convert path to absolute */
|
||||
char* canon = NULL;
|
||||
abspath = NCpathabsolute(uri->path);
|
||||
|
@ -20,11 +20,11 @@ See COPYRIGHT for license information.
|
||||
#include "ncbytes.h"
|
||||
#include "ncuri.h"
|
||||
#include "ncrc.h"
|
||||
#include "ncs3sdk.h"
|
||||
#include "nclog.h"
|
||||
#include "ncauth.h"
|
||||
#include "ncpathmgr.h"
|
||||
#include "nc4internal.h"
|
||||
#include "ncs3sdk.h"
|
||||
#include "ncdispatch.h"
|
||||
|
||||
#undef NOREAD
|
||||
@ -32,7 +32,6 @@ See COPYRIGHT for license information.
|
||||
#undef DRCDEBUG
|
||||
#undef LEXDEBUG
|
||||
#undef PARSEDEBUG
|
||||
#undef AWSDEBUG
|
||||
|
||||
#define RTAG ']'
|
||||
#define LTAG '['
|
||||
@ -40,9 +39,6 @@ See COPYRIGHT for license information.
|
||||
#undef MEMCHECK
|
||||
#define MEMCHECK(x) if((x)==NULL) {goto nomem;} else {}
|
||||
|
||||
/* Alternate .aws directory location */
|
||||
#define NC_TEST_AWS_DIR "NC_TEST_AWS_DIR"
|
||||
|
||||
/* Forward */
|
||||
static int NC_rcload(void);
|
||||
static char* rcreadline(char** nextlinep);
|
||||
@ -58,16 +54,10 @@ static void rcfreeentry(NCRCentry* t);
|
||||
#ifdef DRCDEBUG
|
||||
static void storedump(char* msg, NClist* entrys);
|
||||
#endif
|
||||
static int aws_load_credentials(NCglobalstate*);
|
||||
static void freeprofile(struct AWSprofile* profile);
|
||||
static void freeprofilelist(NClist* profiles);
|
||||
|
||||
/* Define default rc files and aliases, also defines load order*/
|
||||
static const char* rcfilenames[] = {".ncrc", ".daprc", ".dodsrc", NULL};
|
||||
|
||||
/* Read these files in order and later overriding earlier */
|
||||
static const char* awsconfigfiles[] = {".aws/config",".aws/credentials",NULL};
|
||||
|
||||
static int NCRCinitialized = 0;
|
||||
|
||||
/**************************************************/
|
||||
@ -159,7 +149,7 @@ ncrc_initialize(void)
|
||||
nclog(NCLOGWARN,".rc loading failed");
|
||||
}
|
||||
/* Load .aws/config &/ credentials */
|
||||
if((stat = aws_load_credentials(ncg))) {
|
||||
if((stat = NC_aws_load_credentials(ncg))) {
|
||||
nclog(NCLOGWARN,"AWS config file not loaded");
|
||||
}
|
||||
#endif
|
||||
@ -188,7 +178,7 @@ NC_rcclear(NCRCinfo* info)
|
||||
nullfree(info->rcfile);
|
||||
nullfree(info->rchome);
|
||||
rcfreeentries(info->entries);
|
||||
freeprofilelist(info->s3profiles);
|
||||
NC_s3freeprofilelist(info->s3profiles);
|
||||
|
||||
}
|
||||
|
||||
@ -485,7 +475,7 @@ rccompile(const char* filepath)
|
||||
nclog(NCLOGERR, "Malformed [url] in %s entry: %s",filepath,line);
|
||||
continue;
|
||||
}
|
||||
if(NC_iss3(uri)) {
|
||||
if(NC_iss3(uri,NULL)) {
|
||||
NCURI* newuri = NULL;
|
||||
/* Rebuild the url to S3 "path" format */
|
||||
NC_s3clear(&s3);
|
||||
@ -756,499 +746,3 @@ storedump(char* msg, NClist* entries)
|
||||
fflush(stderr);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**************************************************/
|
||||
/*
|
||||
Get the current active profile. The priority order is as follows:
|
||||
1. aws.profile key in mode flags
|
||||
2. aws.profile in .rc entries
|
||||
4. "default"
|
||||
5. "no" -- meaning do not use any profile => no secret key
|
||||
|
||||
@param uri uri with mode flags, may be NULL
|
||||
@param profilep return profile name here or NULL if none found
|
||||
@return NC_NOERR if no error.
|
||||
@return NC_EINVAL if something else went wrong.
|
||||
*/
|
||||
|
||||
int
|
||||
NC_getactives3profile(NCURI* uri, const char** profilep)
|
||||
{
|
||||
int stat = NC_NOERR;
|
||||
const char* profile = NULL;
|
||||
struct AWSprofile* ap = NULL;
|
||||
|
||||
profile = ncurifragmentlookup(uri,"aws.profile");
|
||||
if(profile == NULL)
|
||||
profile = NC_rclookupx(uri,"AWS.PROFILE");
|
||||
|
||||
if(profile == NULL) {
|
||||
if((stat=NC_authgets3profile("default",&ap))) goto done;
|
||||
if(ap) profile = "default";
|
||||
}
|
||||
|
||||
if(profile == NULL) {
|
||||
if((stat=NC_authgets3profile("no",&ap))) goto done;
|
||||
if(ap) profile = "no";
|
||||
}
|
||||
|
||||
#ifdef AWSDEBUG
|
||||
fprintf(stderr,">>> activeprofile = %s\n",(profile?profile:"null"));
|
||||
#endif
|
||||
if(profilep) *profilep = profile;
|
||||
done:
|
||||
return stat;
|
||||
}
|
||||
|
||||
/*
|
||||
Get the current default region. The search order is as follows:
|
||||
1. aws.region key in mode flags
|
||||
2. aws.region in .rc entries
|
||||
3. aws_region key in current profile (only if profiles are being used)
|
||||
4. "us-east-1"
|
||||
|
||||
@param uri uri with mode flags, may be NULL
|
||||
@param regionp return region name here or NULL if none found
|
||||
@return NC_NOERR if no error.
|
||||
@return NC_EINVAL if something else went wrong.
|
||||
*/
|
||||
|
||||
int
|
||||
NC_getdefaults3region(NCURI* uri, const char** regionp)
|
||||
{
|
||||
int stat = NC_NOERR;
|
||||
const char* region = NULL;
|
||||
const char* profile = NULL;
|
||||
|
||||
region = ncurifragmentlookup(uri,"aws.region");
|
||||
if(region == NULL)
|
||||
region = NC_rclookupx(uri,"AWS.REGION");
|
||||
if(region == NULL) {/* See if we can find a profile */
|
||||
if(NC_getactives3profile(uri,&profile)==NC_NOERR) {
|
||||
if(profile)
|
||||
(void)NC_s3profilelookup(profile,"aws_region",®ion);
|
||||
}
|
||||
}
|
||||
if(region == NULL)
|
||||
region = "us-east-1";
|
||||
#ifdef AWSDEBUG
|
||||
fprintf(stderr,">>> activeregion = %s\n",(region?region:"null"));
|
||||
#endif
|
||||
if(regionp) *regionp = region;
|
||||
return stat;
|
||||
}
|
||||
|
||||
/**
|
||||
The .aws/config and .aws/credentials files
|
||||
are in INI format (https://en.wikipedia.org/wiki/INI_file).
|
||||
This format is not well defined, so the grammar used
|
||||
here is restrictive. Here, the term "profile" is the same
|
||||
as the INI term "section".
|
||||
|
||||
The grammar used is as follows:
|
||||
|
||||
Grammar:
|
||||
|
||||
inifile: profilelist ;
|
||||
profilelist: profile | profilelist profile ;
|
||||
profile: '[' profilename ']' EOL entries ;
|
||||
entries: empty | entries entry ;
|
||||
entry: WORD = WORD EOL ;
|
||||
profilename: WORD ;
|
||||
Lexical:
|
||||
WORD sequence of printable characters - [ \[\]=]+
|
||||
EOL '\n' | ';'
|
||||
|
||||
Note:
|
||||
1. The semicolon at beginning of a line signals a comment.
|
||||
2. # comments are not allowed
|
||||
3. Duplicate profiles or keys are ignored.
|
||||
4. Escape characters are not supported.
|
||||
*/
|
||||
|
||||
#define AWS_EOF (-1)
|
||||
#define AWS_ERR (0)
|
||||
#define AWS_WORD (0x10001)
|
||||
#define AWS_EOL (0x10002)
|
||||
|
||||
#ifdef LEXDEBUG
|
||||
static const char*
|
||||
tokenname(int token)
|
||||
{
|
||||
static char num[32];
|
||||
switch(token) {
|
||||
case AWS_EOF: return "EOF";
|
||||
case AWS_ERR: return "ERR";
|
||||
case AWS_WORD: return "WORD";
|
||||
default: snprintf(num,sizeof(num),"%d",token); return num;
|
||||
}
|
||||
return "UNKNOWN";
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef struct AWSparser {
|
||||
char* text;
|
||||
char* pos;
|
||||
size_t yylen; /* |yytext| */
|
||||
NCbytes* yytext;
|
||||
int token; /* last token found */
|
||||
int pushback; /* allow 1-token pushback */
|
||||
} AWSparser;
|
||||
|
||||
static int
|
||||
awslex(AWSparser* parser)
|
||||
{
|
||||
int c;
|
||||
int token = 0;
|
||||
char* start;
|
||||
size_t count;
|
||||
|
||||
parser->token = AWS_ERR;
|
||||
ncbytesclear(parser->yytext);
|
||||
ncbytesnull(parser->yytext);
|
||||
|
||||
if(parser->pushback != AWS_ERR) {
|
||||
token = parser->pushback;
|
||||
parser->pushback = AWS_ERR;
|
||||
goto done;
|
||||
}
|
||||
|
||||
while(token == 0) { /* avoid need to goto when retrying */
|
||||
c = *parser->pos;
|
||||
if(c == '\0') {
|
||||
token = AWS_EOF;
|
||||
} else if(c == '\n') {
|
||||
parser->pos++;
|
||||
token = AWS_EOL;
|
||||
} else if(c <= ' ' || c == '\177') {
|
||||
parser->pos++;
|
||||
continue; /* ignore whitespace */
|
||||
} else if(c == ';') {
|
||||
char* p = parser->pos - 1;
|
||||
if(*p == '\n') {
|
||||
/* Skip comment */
|
||||
do {p++;} while(*p != '\n' && *p != '\0');
|
||||
parser->pos = p;
|
||||
token = (*p == '\n'?AWS_EOL:AWS_EOF);
|
||||
} else {
|
||||
token = ';';
|
||||
ncbytesappend(parser->yytext,';');
|
||||
parser->pos++;
|
||||
}
|
||||
} else if(c == '[' || c == ']' || c == '=') {
|
||||
ncbytesappend(parser->yytext,c);
|
||||
ncbytesnull(parser->yytext);
|
||||
token = c;
|
||||
parser->pos++;
|
||||
} else { /*Assume a word*/
|
||||
start = parser->pos;
|
||||
for(;;) {
|
||||
c = *parser->pos++;
|
||||
if(c <= ' ' || c == '\177' || c == '[' || c == ']' || c == '=') break; /* end of word */
|
||||
}
|
||||
/* Pushback last char */
|
||||
parser->pos--;
|
||||
count = ((parser->pos) - start);
|
||||
ncbytesappendn(parser->yytext,start,count);
|
||||
ncbytesnull(parser->yytext);
|
||||
token = AWS_WORD;
|
||||
}
|
||||
#ifdef LEXDEBUG
|
||||
fprintf(stderr,"%s(%d): |%s|\n",tokenname(token),token,ncbytescontents(parser->yytext));
|
||||
#endif
|
||||
} /*for(;;)*/
|
||||
|
||||
done:
|
||||
parser->token = token;
|
||||
return token;
|
||||
}
|
||||
|
||||
/*
|
||||
@param text of the aws credentials file
|
||||
@param profiles list of form struct AWSprofile (see ncauth.h)
|
||||
*/
|
||||
|
||||
#define LBR '['
|
||||
#define RBR ']'
|
||||
|
||||
static int
|
||||
awsparse(const char* text, NClist* profiles)
|
||||
{
|
||||
size_t i;
|
||||
int stat = NC_NOERR;
|
||||
size_t len;
|
||||
AWSparser* parser = NULL;
|
||||
struct AWSprofile* profile = NULL;
|
||||
int token;
|
||||
char* key = NULL;
|
||||
char* value = NULL;
|
||||
|
||||
if(text == NULL) text = "";
|
||||
|
||||
parser = calloc(1,sizeof(AWSparser));
|
||||
if(parser == NULL)
|
||||
{stat = (NC_ENOMEM); goto done;}
|
||||
len = strlen(text);
|
||||
parser->text = (char*)malloc(len+1+1+1); /* double nul term plus leading EOL */
|
||||
if(parser->text == NULL)
|
||||
{stat = (NCTHROW(NC_EINVAL)); goto done;}
|
||||
parser->pos = parser->text;
|
||||
parser->pos[0] = '\n'; /* So we can test for comment unconditionally */
|
||||
parser->pos++;
|
||||
strcpy(parser->text+1,text);
|
||||
parser->pos += len;
|
||||
/* Double nul terminate */
|
||||
parser->pos[0] = '\0';
|
||||
parser->pos[1] = '\0';
|
||||
parser->pos = &parser->text[0]; /* reset */
|
||||
parser->yytext = ncbytesnew();
|
||||
parser->pushback = AWS_ERR;
|
||||
|
||||
/* Do not need recursion, use simple loops */
|
||||
for(;;) {
|
||||
token = awslex(parser); /* make token always be defined */
|
||||
if(token == AWS_EOF) break; /* finished */
|
||||
if(token == AWS_EOL) {continue;} /* blank line */
|
||||
if(token != LBR) {stat = NCTHROW(NC_EINVAL); goto done;}
|
||||
/* parse [profile name] */
|
||||
token = awslex(parser);
|
||||
if(token != AWS_WORD) {stat = NCTHROW(NC_EINVAL); goto done;}
|
||||
assert(profile == NULL);
|
||||
if((profile = (struct AWSprofile*)calloc(1,sizeof(struct AWSprofile)))==NULL)
|
||||
{stat = NC_ENOMEM; goto done;}
|
||||
profile->name = ncbytesextract(parser->yytext);
|
||||
profile->entries = nclistnew();
|
||||
token = awslex(parser);
|
||||
if(token != RBR) {stat = NCTHROW(NC_EINVAL); goto done;}
|
||||
#ifdef PARSEDEBUG
|
||||
fprintf(stderr,">>> parse: profile=%s\n",profile->name);
|
||||
#endif
|
||||
/* The fields can be in any order */
|
||||
for(;;) {
|
||||
struct AWSentry* entry = NULL;
|
||||
token = awslex(parser);
|
||||
if(token == AWS_EOL) {
|
||||
continue; /* ignore empty lines */
|
||||
} else if(token == AWS_EOF) {
|
||||
break;
|
||||
} else if(token == LBR) {/* start of next profile */
|
||||
parser->pushback = token;
|
||||
break;
|
||||
} else if(token == AWS_WORD) {
|
||||
key = ncbytesextract(parser->yytext);
|
||||
token = awslex(parser);
|
||||
if(token != '=') {stat = NCTHROW(NC_EINVAL); goto done;}
|
||||
token = awslex(parser);
|
||||
if(token != AWS_EOL && token != AWS_WORD) {stat = NCTHROW(NC_EINVAL); goto done;}
|
||||
value = ncbytesextract(parser->yytext);
|
||||
if((entry = (struct AWSentry*)calloc(1,sizeof(struct AWSentry)))==NULL)
|
||||
{stat = NC_ENOMEM; goto done;}
|
||||
entry->key = key; key = NULL;
|
||||
entry->value = value; value = NULL;
|
||||
#ifdef PARSEDEBUG
|
||||
fprintf(stderr,">>> parse: entry=(%s,%s)\n",entry->key,entry->value);
|
||||
#endif
|
||||
nclistpush(profile->entries,entry); entry = NULL;
|
||||
if(token == AWS_WORD) token = awslex(parser); /* finish the line */
|
||||
} else
|
||||
{stat = NCTHROW(NC_EINVAL); goto done;}
|
||||
}
|
||||
|
||||
/* If this profile already exists, then replace old one */
|
||||
for(i=0;i<nclistlength(profiles);i++) {
|
||||
struct AWSprofile* p = (struct AWSprofile*)nclistget(profiles,i);
|
||||
if(strcasecmp(p->name,profile->name)==0) {
|
||||
nclistset(profiles,i,profile);
|
||||
profile = NULL;
|
||||
/* reclaim old one */
|
||||
freeprofile(p);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(profile) nclistpush(profiles,profile);
|
||||
profile = NULL;
|
||||
}
|
||||
|
||||
done:
|
||||
if(profile) freeprofile(profile);
|
||||
nullfree(key);
|
||||
nullfree(value);
|
||||
if(parser != NULL) {
|
||||
nullfree(parser->text);
|
||||
ncbytesfree(parser->yytext);
|
||||
free(parser);
|
||||
}
|
||||
return (stat);
|
||||
}
|
||||
|
||||
static void
|
||||
freeentry(struct AWSentry* e)
|
||||
{
|
||||
if(e) {
|
||||
#ifdef AWSDEBUG
|
||||
fprintf(stderr,">>> freeentry: key=%p value=%p\n",e->key,e->value);
|
||||
#endif
|
||||
nullfree(e->key);
|
||||
nullfree(e->value);
|
||||
nullfree(e);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
freeprofile(struct AWSprofile* profile)
|
||||
{
|
||||
if(profile) {
|
||||
size_t i;
|
||||
#ifdef AWSDEBUG
|
||||
fprintf(stderr,">>> freeprofile: %s\n",profile->name);
|
||||
#endif
|
||||
for(i=0;i<nclistlength(profile->entries);i++) {
|
||||
struct AWSentry* e = (struct AWSentry*)nclistget(profile->entries,i);
|
||||
freeentry(e);
|
||||
}
|
||||
nclistfree(profile->entries);
|
||||
nullfree(profile->name);
|
||||
nullfree(profile);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
freeprofilelist(NClist* profiles)
|
||||
{
|
||||
if(profiles) {
|
||||
size_t i;
|
||||
for(i=0;i<nclistlength(profiles);i++) {
|
||||
struct AWSprofile* p = (struct AWSprofile*)nclistget(profiles,i);
|
||||
freeprofile(p);
|
||||
}
|
||||
nclistfree(profiles);
|
||||
}
|
||||
}
|
||||
|
||||
/* Find, load, and parse the aws config &/or credentials file */
|
||||
static int
|
||||
aws_load_credentials(NCglobalstate* gstate)
|
||||
{
|
||||
int stat = NC_NOERR;
|
||||
NClist* profiles = nclistnew();
|
||||
const char** awscfg = awsconfigfiles;
|
||||
const char* aws_root = getenv(NC_TEST_AWS_DIR);
|
||||
NCbytes* buf = ncbytesnew();
|
||||
char path[8192];
|
||||
|
||||
/* add a "no" credentials */
|
||||
{
|
||||
struct AWSprofile* noprof = (struct AWSprofile*)calloc(1,sizeof(struct AWSprofile));
|
||||
noprof->name = strdup("no");
|
||||
noprof->entries = nclistnew();
|
||||
nclistpush(profiles,noprof); noprof = NULL;
|
||||
}
|
||||
|
||||
for(;*awscfg;awscfg++) {
|
||||
/* Construct the path ${HOME}/<file> or Windows equivalent. */
|
||||
const char* cfg = *awscfg;
|
||||
|
||||
snprintf(path,sizeof(path),"%s%s%s",
|
||||
(aws_root?aws_root:gstate->home),
|
||||
(*cfg == '/'?"":"/"),
|
||||
cfg);
|
||||
ncbytesclear(buf);
|
||||
if((stat=NC_readfile(path,buf))) {
|
||||
nclog(NCLOGWARN, "Could not open file: %s",path);
|
||||
} else {
|
||||
/* Parse the credentials file */
|
||||
const char* text = ncbytescontents(buf);
|
||||
if((stat = awsparse(text,profiles))) goto done;
|
||||
}
|
||||
}
|
||||
|
||||
/* add a "none" credentials */
|
||||
{
|
||||
struct AWSprofile* noprof = (struct AWSprofile*)calloc(1,sizeof(struct AWSprofile));
|
||||
if(noprof == NULL) {stat = NC_ENOMEM; goto done;}
|
||||
noprof->name = strdup("none");
|
||||
noprof->entries = nclistnew();
|
||||
nclistpush(profiles,noprof); noprof = NULL;
|
||||
}
|
||||
|
||||
if(gstate->rcinfo->s3profiles)
|
||||
freeprofilelist(gstate->rcinfo->s3profiles);
|
||||
gstate->rcinfo->s3profiles = profiles; profiles = NULL;
|
||||
|
||||
#ifdef AWSDEBUG
|
||||
{int i,j;
|
||||
fprintf(stderr,">>> profiles:\n");
|
||||
for(i=0;i<nclistlength(gstate->rcinfo->s3profiles);i++) {
|
||||
struct AWSprofile* p = (struct AWSprofile*)nclistget(gstate->rcinfo->s3profiles,i);
|
||||
fprintf(stderr," [%s]",p->name);
|
||||
for(j=0;j<nclistlength(p->entries);j++) {
|
||||
struct AWSentry* e = (struct AWSentry*)nclistget(p->entries,j);
|
||||
if(strcmp(e->key,"aws_access_key_id")
|
||||
fprintf(stderr," %s=%d",e->key,(int)strlen(e->value));
|
||||
else if(strcmp(e->key,"aws_secret_access_key")
|
||||
fprintf(stderr," %s=%d",e->key,(int)strlen(e->value));
|
||||
else fprintf(stderr," %s=%s",e->key,e->value);
|
||||
}
|
||||
fprintf(stderr,"\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
done:
|
||||
ncbytesfree(buf);
|
||||
freeprofilelist(profiles);
|
||||
return stat;
|
||||
}
|
||||
|
||||
/* Lookup a profile by name;
|
||||
@param profilename to lookup
|
||||
@param profilep return the matching profile; null if profile not found
|
||||
@return NC_NOERR if no error
|
||||
@return other error
|
||||
*/
|
||||
|
||||
int
|
||||
NC_authgets3profile(const char* profilename, struct AWSprofile** profilep)
|
||||
{
|
||||
int stat = NC_NOERR;
|
||||
size_t i;
|
||||
NCglobalstate* gstate = NC_getglobalstate();
|
||||
|
||||
for(i=0;i<nclistlength(gstate->rcinfo->s3profiles);i++) {
|
||||
struct AWSprofile* profile = (struct AWSprofile*)nclistget(gstate->rcinfo->s3profiles,i);
|
||||
if(strcmp(profilename,profile->name)==0)
|
||||
{if(profilep) {*profilep = profile; goto done;}}
|
||||
}
|
||||
if(profilep) *profilep = NULL; /* not found */
|
||||
done:
|
||||
return stat;
|
||||
}
|
||||
|
||||
/**
|
||||
@param profile name of profile
|
||||
@param key key to search for in profile
|
||||
@param value place to store the value if key is found; NULL if not found
|
||||
@return NC_NOERR if key is found, Some other error otherwise.
|
||||
*/
|
||||
|
||||
int
|
||||
NC_s3profilelookup(const char* profile, const char* key, const char** valuep)
|
||||
{
|
||||
size_t i;
|
||||
int stat = NC_NOERR;
|
||||
struct AWSprofile* awsprof = NULL;
|
||||
const char* value = NULL;
|
||||
|
||||
if(profile == NULL) return NC_ES3;
|
||||
if((stat=NC_authgets3profile(profile,&awsprof))==NC_NOERR && awsprof != NULL) {
|
||||
for(i=0;i<nclistlength(awsprof->entries);i++) {
|
||||
struct AWSentry* entry = (struct AWSentry*)nclistget(awsprof->entries,i);
|
||||
if(strcasecmp(entry->key,key)==0) {
|
||||
value = entry->value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(valuep) *valuep = value;
|
||||
return stat;
|
||||
}
|
||||
|
@ -15,10 +15,21 @@
|
||||
#include <wchar.h>
|
||||
#include <locale.h>
|
||||
//#include <direct.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport)
|
||||
#if defined(DLL_NETCDF) /* define when library is a DLL */
|
||||
# if defined(DLL_EXPORT) /* define when building the library */
|
||||
# define MSC_EXTRA __declspec(dllexport)
|
||||
# else
|
||||
# define MSC_EXTRA __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# define MSC_EXTRA
|
||||
#endif /* defined(DLL_NETCDF) */
|
||||
#ifndef EXTERNL
|
||||
# define EXTERNL MSC_EXTRA extern
|
||||
#endif
|
||||
|
||||
|
||||
EXTERNL
|
||||
int
|
||||
getmountpoint(char* keyvalue, size_t size)
|
||||
{
|
||||
|
@ -22,20 +22,73 @@
|
||||
#endif
|
||||
|
||||
#include "netcdf.h"
|
||||
#include "nc4internal.h"
|
||||
#include "ncuri.h"
|
||||
#include "nclist.h"
|
||||
#include "ncrc.h"
|
||||
#include "nclog.h"
|
||||
#include "ncs3sdk.h"
|
||||
|
||||
#undef AWSDEBUG
|
||||
|
||||
/* Alternate .aws directory location */
|
||||
#define NC_TEST_AWS_DIR "NC_TEST_AWS_DIR"
|
||||
|
||||
#define AWSHOST ".amazonaws.com"
|
||||
#define GOOGLEHOST "storage.googleapis.com"
|
||||
|
||||
enum URLFORMAT {UF_NONE=0, UF_VIRTUAL=1, UF_PATH=2, UF_S3=3, UF_OTHER=4};
|
||||
|
||||
/* Read these files in order and later overriding earlier */
|
||||
static const char* awsconfigfiles[] = {".aws/config",".aws/credentials",NULL};
|
||||
#define NCONFIGFILES (sizeof(awsconfigfiles)/sizeof(char*))
|
||||
|
||||
static int ncs3_initialized = 0;
|
||||
static int ncs3_finalized = 0;
|
||||
|
||||
/**************************************************/
|
||||
/* Forward */
|
||||
|
||||
static int endswith(const char* s, const char* suffix);
|
||||
static void freeentry(struct AWSentry* e);
|
||||
static int awsparse(const char* text, NClist* profiles);
|
||||
|
||||
/**************************************************/
|
||||
/* Capture environmental Info */
|
||||
|
||||
EXTERNL int
|
||||
NC_s3sdkinitialize(void)
|
||||
{
|
||||
if(!ncs3_initialized) {
|
||||
ncs3_initialized = 1;
|
||||
ncs3_finalized = 0;
|
||||
}
|
||||
{
|
||||
/* Get various environment variables as defined by the AWS sdk */
|
||||
NCglobalstate* gs = NC_getglobalstate();
|
||||
if(getenv("AWS_REGION")!=NULL)
|
||||
gs->aws.default_region = nulldup(getenv("AWS_REGION"));
|
||||
else if(getenv("AWS_DEFAULT_REGION")!=NULL)
|
||||
gs->aws.default_region = nulldup(getenv("AWS_DEFAULT_REGION"));
|
||||
else if(gs->aws.default_region == NULL)
|
||||
gs->aws.default_region = nulldup(AWS_GLOBAL_DEFAULT_REGION);
|
||||
gs->aws.access_key_id = nulldup(getenv("AWS_ACCESS_KEY_ID"));
|
||||
gs->aws.config_file = nulldup(getenv("AWS_CONFIG_FILE"));
|
||||
gs->aws.profile = nulldup(getenv("AWS_PROFILE"));
|
||||
gs->aws.secret_access_key = nulldup(getenv("AWS_SECRET_ACCESS_KEY"));
|
||||
}
|
||||
return NC_NOERR;
|
||||
}
|
||||
|
||||
EXTERNL int
|
||||
NC_s3sdkfinalize(void)
|
||||
{
|
||||
if(!ncs3_finalized) {
|
||||
ncs3_initialized = 0;
|
||||
ncs3_finalized = 1;
|
||||
}
|
||||
return NC_NOERR;
|
||||
}
|
||||
|
||||
/**************************************************/
|
||||
/* Generic S3 Utilities */
|
||||
@ -43,7 +96,7 @@ static int endswith(const char* s, const char* suffix);
|
||||
/*
|
||||
Rebuild an S3 url into a canonical path-style url.
|
||||
If region is not in the host, then use specified region
|
||||
if provided, otherwise us-east-1.
|
||||
if provided, otherwise leave blank and let the S3 server deal with it.
|
||||
@param url (in) the current url
|
||||
@param s3 (in/out) NCS3INFO structure
|
||||
@param pathurlp (out) the resulting pathified url string
|
||||
@ -79,7 +132,7 @@ NC_s3urlrebuild(NCURI* url, NCS3INFO* s3, NCURI** newurlp)
|
||||
|
||||
/* Distinguish path-style from virtual-host style from s3: and from other.
|
||||
Virtual: https://<bucket-name>.s3.<region>.amazonaws.com/<path> (1)
|
||||
or: https://<bucket-name>.s3.amazonaws.com/<path> -- region defaults to us-east-1 (2)
|
||||
or: https://<bucket-name>.s3.amazonaws.com/<path> -- region defaults (to us-east-1) (2)
|
||||
Path: https://s3.<region>.amazonaws.com/<bucket-name>/<path> (3)
|
||||
or: https://s3.amazonaws.com/<bucket-name>/<path> -- region defaults to us-east-1 (4)
|
||||
S3: s3://<bucket-name>/<path> (5)
|
||||
@ -149,7 +202,7 @@ NC_s3urlrebuild(NCURI* url, NCS3INFO* s3, NCURI** newurlp)
|
||||
const char* region0 = NULL;
|
||||
/* Get default region */
|
||||
if((stat = NC_getdefaults3region(url,®ion0))) goto done;
|
||||
region = strdup(region0);
|
||||
region = nulldup(region0);
|
||||
}
|
||||
if(region == NULL) {stat = NC_ES3; goto done;}
|
||||
|
||||
@ -164,8 +217,10 @@ NC_s3urlrebuild(NCURI* url, NCS3INFO* s3, NCURI** newurlp)
|
||||
if(svc == NCS3) {
|
||||
/* Construct the revised host */
|
||||
ncbytesclear(buf);
|
||||
ncbytescat(buf,"s3.");
|
||||
ncbytescat(buf,region);
|
||||
ncbytescat(buf,"s3");
|
||||
assert(region != NULL);
|
||||
ncbytescat(buf,".");
|
||||
ncbytescat(buf,region);
|
||||
ncbytescat(buf,AWSHOST);
|
||||
nullfree(host);
|
||||
host = ncbytesextract(buf);
|
||||
@ -187,18 +242,24 @@ NC_s3urlrebuild(NCURI* url, NCS3INFO* s3, NCURI** newurlp)
|
||||
}
|
||||
path = ncbytesextract(buf);
|
||||
|
||||
/* complete the new url */
|
||||
/* clone the url so we can modify it*/
|
||||
if((newurl=ncuriclone(url))==NULL) {stat = NC_ENOMEM; goto done;}
|
||||
|
||||
/* Modify the URL to canonical form */
|
||||
ncurisetprotocol(newurl,"https");
|
||||
assert(host != NULL);
|
||||
ncurisethost(newurl,host);
|
||||
assert(path != NULL);
|
||||
ncurisetpath(newurl,path);
|
||||
|
||||
/* Add "s3" to the mode list */
|
||||
NC_addmodetag(newurl,"s3");
|
||||
|
||||
/* Rebuild the url->url */
|
||||
ncurirebuild(newurl);
|
||||
/* return various items */
|
||||
#ifdef AWSDEBUG
|
||||
fprintf(stderr,">>> NC_s3urlrebuild: final=%s bucket=%s region=%s\n",uri->uri,bucket,region);
|
||||
fprintf(stderr,">>> NC_s3urlrebuild: final=%s bucket=|%s| region=|%s|\n",uri->uri,bucket,region);
|
||||
#endif
|
||||
if(newurlp) {*newurlp = newurl; newurl = NULL;}
|
||||
if(s3 != NULL) {
|
||||
@ -304,22 +365,24 @@ Check if a url has indicators that signal an S3 or Google S3 url.
|
||||
*/
|
||||
|
||||
int
|
||||
NC_iss3(NCURI* uri)
|
||||
NC_iss3(NCURI* uri, enum NCS3SVC* svcp)
|
||||
{
|
||||
int iss3 = 0;
|
||||
NCS3SVC svc = NCS3UNK;
|
||||
|
||||
if(uri == NULL) goto done; /* not a uri */
|
||||
/* is the protocol "s3" or "gs3" ? */
|
||||
if(strcasecmp(uri->protocol,"s3")==0) {iss3 = 1; goto done;}
|
||||
if(strcasecmp(uri->protocol,"gs3")==0) {iss3 = 1; goto done;}
|
||||
if(strcasecmp(uri->protocol,"s3")==0) {iss3 = 1; svc = NCS3; goto done;}
|
||||
if(strcasecmp(uri->protocol,"gs3")==0) {iss3 = 1; svc = NCS3GS; goto done;}
|
||||
/* Is "s3" or "gs3" in the mode list? */
|
||||
if(NC_testmode(uri,"s3")) {iss3 = 1; goto done;}
|
||||
if(NC_testmode(uri,"gs3")) {iss3 = 1; goto done;}
|
||||
if(NC_testmode(uri,"s3")) {iss3 = 1; svc = NCS3; goto done;}
|
||||
if(NC_testmode(uri,"gs3")) {iss3 = 1; svc = NCS3GS; goto done;}
|
||||
/* Last chance; see if host looks s3'y */
|
||||
if(uri->host != NULL) {
|
||||
if(endswith(uri->host,AWSHOST)) {iss3 = 1; goto done;}
|
||||
if(strcasecmp(uri->host,GOOGLEHOST)==0) {iss3 = 1; goto done;}
|
||||
if(endswith(uri->host,AWSHOST)) {iss3 = 1; svc = NCS3; goto done;}
|
||||
if(strcasecmp(uri->host,GOOGLEHOST)==0) {iss3 = 1; svc = NCS3GS; goto done;}
|
||||
}
|
||||
if(svcp) *svcp = svc;
|
||||
done:
|
||||
return iss3;
|
||||
}
|
||||
@ -337,3 +400,532 @@ NC_s3dumps3info(NCS3INFO* info)
|
||||
return text;
|
||||
}
|
||||
|
||||
static void
|
||||
freeprofile(struct AWSprofile* profile)
|
||||
{
|
||||
if(profile) {
|
||||
int i;
|
||||
#ifdef AWSDEBUG
|
||||
fprintf(stderr,">>> freeprofile: %s\n",profile->name);
|
||||
#endif
|
||||
for(i=0;i<nclistlength(profile->entries);i++) {
|
||||
struct AWSentry* e = (struct AWSentry*)nclistget(profile->entries,i);
|
||||
freeentry(e);
|
||||
}
|
||||
nclistfree(profile->entries);
|
||||
nullfree(profile->name);
|
||||
nullfree(profile);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
NC_s3freeprofilelist(NClist* profiles)
|
||||
{
|
||||
if(profiles) {
|
||||
int i;
|
||||
for(i=0;i<nclistlength(profiles);i++) {
|
||||
struct AWSprofile* p = (struct AWSprofile*)nclistget(profiles,i);
|
||||
freeprofile(p);
|
||||
}
|
||||
nclistfree(profiles);
|
||||
}
|
||||
}
|
||||
|
||||
/* Find, load, and parse the aws config &/or credentials file */
|
||||
int
|
||||
NC_aws_load_credentials(NCglobalstate* gstate)
|
||||
{
|
||||
int stat = NC_NOERR;
|
||||
NClist* profiles = nclistnew();
|
||||
NCbytes* buf = ncbytesnew();
|
||||
char path[8192];
|
||||
const char* aws_root = getenv(NC_TEST_AWS_DIR);
|
||||
const char* awscfg_local[NCONFIGFILES + 1]; /* +1 for the env variable */
|
||||
const char** awscfg = NULL;
|
||||
|
||||
/* add a "no" credentials */
|
||||
{
|
||||
struct AWSprofile* noprof = (struct AWSprofile*)calloc(1,sizeof(struct AWSprofile));
|
||||
noprof->name = strdup("no");
|
||||
noprof->entries = nclistnew();
|
||||
nclistpush(profiles,noprof); noprof = NULL;
|
||||
}
|
||||
|
||||
awscfg = awsconfigfiles;
|
||||
if((awscfg_local[0] = NC_getglobalstate()->aws.config_file)!=NULL) {
|
||||
memcpy(&awscfg_local[1],awsconfigfiles,sizeof(char*)*NCONFIGFILES);
|
||||
awscfg = awscfg_local;
|
||||
}
|
||||
for(;*awscfg;awscfg++) {
|
||||
/* Construct the path ${HOME}/<file> or Windows equivalent. */
|
||||
const char* cfg = *awscfg;
|
||||
|
||||
snprintf(path,sizeof(path),"%s%s%s",
|
||||
(aws_root?aws_root:gstate->home),
|
||||
(*cfg == '/'?"":"/"),
|
||||
cfg);
|
||||
ncbytesclear(buf);
|
||||
if((stat=NC_readfile(path,buf))) {
|
||||
nclog(NCLOGWARN, "Could not open file: %s",path);
|
||||
} else {
|
||||
/* Parse the credentials file */
|
||||
const char* text = ncbytescontents(buf);
|
||||
if((stat = awsparse(text,profiles))) goto done;
|
||||
}
|
||||
}
|
||||
|
||||
/* If there is no default credentials, then try to synthesize one
|
||||
from various environment variables */
|
||||
{
|
||||
size_t i;
|
||||
struct AWSprofile* dfalt = NULL;
|
||||
struct AWSentry* entry = NULL;
|
||||
NCglobalstate* gs = NC_getglobalstate();
|
||||
/* Verify that we can build a default */
|
||||
if(gs->aws.access_key_id != NULL && gs->aws.secret_access_key != NULL) {
|
||||
/* Kill off any previous default profile */
|
||||
for(i=nclistlength(profiles)-1;i>=0;i--) {/* walk backward because we are removing entries */
|
||||
struct AWSprofile* prof = (struct AWSprofile*)nclistget(profiles,i);
|
||||
if(strcasecmp(prof->name,"default")==0) {
|
||||
nclistremove(profiles,i);
|
||||
freeprofile(prof);
|
||||
}
|
||||
}
|
||||
/* Build new default profile */
|
||||
if((dfalt = (struct AWSprofile*)calloc(1,sizeof(struct AWSprofile)))==NULL) {stat = NC_ENOMEM; goto done;}
|
||||
dfalt->name = strdup("default");
|
||||
dfalt->entries = nclistnew();
|
||||
/* Save the new default profile */
|
||||
nclistpush(profiles,dfalt); dfalt = NULL;
|
||||
/* Create the entries for default */
|
||||
if((entry = (struct AWSentry*)calloc(1,sizeof(struct AWSentry)))==NULL) {stat = NC_ENOMEM; goto done;}
|
||||
entry->key = strdup("aws_access_key_id");
|
||||
entry->value = strdup(gs->aws.access_key_id);
|
||||
nclistpush(dfalt->entries,entry); entry = NULL;
|
||||
if((entry = (struct AWSentry*)calloc(1,sizeof(struct AWSentry)))==NULL) {stat = NC_ENOMEM; goto done;}
|
||||
entry->key = strdup("aws_secret_access_key");
|
||||
entry->value = strdup(gs->aws.secret_access_key);
|
||||
nclistpush(dfalt->entries,entry); entry = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if(gstate->rcinfo->s3profiles)
|
||||
NC_s3freeprofilelist(gstate->rcinfo->s3profiles);
|
||||
gstate->rcinfo->s3profiles = profiles; profiles = NULL;
|
||||
|
||||
#ifdef AWSDEBUG
|
||||
{int i,j;
|
||||
fprintf(stderr,">>> profiles:\n");
|
||||
for(i=0;i<nclistlength(gstate->rcinfo->s3profiles);i++) {
|
||||
struct AWSprofile* p = (struct AWSprofile*)nclistget(gstate->rcinfo->s3profiles,i);
|
||||
fprintf(stderr," [%s]",p->name);
|
||||
for(j=0;j<nclistlength(p->entries);j++) {
|
||||
struct AWSentry* e = (struct AWSentry*)nclistget(p->entries,j);
|
||||
if(strcmp(e->key,"aws_access_key_id")
|
||||
fprintf(stderr," %s=%d",e->key,(int)strlen(e->value));
|
||||
else if(strcmp(e->key,"aws_secret_access_key")
|
||||
fprintf(stderr," %s=%d",e->key,(int)strlen(e->value));
|
||||
else fprintf(stderr," %s=%s",e->key,e->value);
|
||||
}
|
||||
fprintf(stderr,"\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
done:
|
||||
ncbytesfree(buf);
|
||||
NC_s3freeprofilelist(profiles);
|
||||
return stat;
|
||||
}
|
||||
|
||||
/* Lookup a profile by name;
|
||||
@param profilename to lookup
|
||||
@param profilep return the matching profile; null if profile not found
|
||||
@return NC_NOERR if no error
|
||||
@return other error
|
||||
*/
|
||||
|
||||
int
|
||||
NC_authgets3profile(const char* profilename, struct AWSprofile** profilep)
|
||||
{
|
||||
int stat = NC_NOERR;
|
||||
int i = -1;
|
||||
NCglobalstate* gstate = NC_getglobalstate();
|
||||
|
||||
for(i=0;i<nclistlength(gstate->rcinfo->s3profiles);i++) {
|
||||
struct AWSprofile* profile = (struct AWSprofile*)nclistget(gstate->rcinfo->s3profiles,i);
|
||||
if(strcmp(profilename,profile->name)==0)
|
||||
{if(profilep) {*profilep = profile; goto done;}}
|
||||
}
|
||||
if(profilep) *profilep = NULL; /* not found */
|
||||
done:
|
||||
return stat;
|
||||
}
|
||||
|
||||
/**
|
||||
@param profile name of profile
|
||||
@param key key to search for in profile
|
||||
@param value place to store the value if key is found; NULL if not found
|
||||
@return NC_NOERR if key is found, Some other error otherwise.
|
||||
*/
|
||||
|
||||
int
|
||||
NC_s3profilelookup(const char* profile, const char* key, const char** valuep)
|
||||
{
|
||||
int i,stat = NC_NOERR;
|
||||
struct AWSprofile* awsprof = NULL;
|
||||
const char* value = NULL;
|
||||
|
||||
if(profile == NULL) return NC_ES3;
|
||||
if((stat=NC_authgets3profile(profile,&awsprof))==NC_NOERR && awsprof != NULL) {
|
||||
for(i=0;i<nclistlength(awsprof->entries);i++) {
|
||||
struct AWSentry* entry = (struct AWSentry*)nclistget(awsprof->entries,i);
|
||||
if(strcasecmp(entry->key,key)==0) {
|
||||
value = entry->value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(valuep) *valuep = value;
|
||||
return stat;
|
||||
}
|
||||
|
||||
/**************************************************/
|
||||
/*
|
||||
Get the current active profile. The priority order is as follows:
|
||||
1. aws.profile key in mode flags
|
||||
2. aws.profile in .rc entries
|
||||
3. AWS_PROFILE env variable
|
||||
4. "default"
|
||||
5. "no" -- meaning do not use any profile => no secret key
|
||||
|
||||
@param uri uri with mode flags, may be NULL
|
||||
@param profilep return profile name here or NULL if none found
|
||||
@return NC_NOERR if no error.
|
||||
@return NC_EINVAL if something else went wrong.
|
||||
*/
|
||||
|
||||
int
|
||||
NC_getactives3profile(NCURI* uri, const char** profilep)
|
||||
{
|
||||
int stat = NC_NOERR;
|
||||
const char* profile = NULL;
|
||||
struct AWSprofile* ap = NULL;
|
||||
|
||||
profile = ncurifragmentlookup(uri,"aws.profile");
|
||||
if(profile == NULL)
|
||||
profile = NC_rclookupx(uri,"AWS.PROFILE");
|
||||
|
||||
if(profile == NULL)
|
||||
profile = NC_getglobalstate()->aws.profile;
|
||||
|
||||
if(profile == NULL) {
|
||||
if((stat=NC_authgets3profile("default",&ap))) goto done;
|
||||
if(ap) profile = "default";
|
||||
}
|
||||
|
||||
if(profile == NULL) {
|
||||
if((stat=NC_authgets3profile("no",&ap))) goto done;
|
||||
if(ap) profile = "no";
|
||||
}
|
||||
|
||||
#ifdef AWSDEBUG
|
||||
fprintf(stderr,">>> activeprofile = %s\n",(profile?profile:"null"));
|
||||
#endif
|
||||
if(profilep) *profilep = profile;
|
||||
done:
|
||||
return stat;
|
||||
}
|
||||
|
||||
/*
|
||||
Get the current default region. The search order is as follows:
|
||||
1. aws.region key in mode flags
|
||||
2. aws.region in .rc entries
|
||||
3. aws_region key in current profile (only if profiles are being used)
|
||||
4. NCglobalstate.aws.default_region
|
||||
|
||||
@param uri uri with mode flags, may be NULL
|
||||
@param regionp return region name here or NULL if none found
|
||||
@return NC_NOERR if no error.
|
||||
@return NC_EINVAL if something else went wrong.
|
||||
*/
|
||||
|
||||
int
|
||||
NC_getdefaults3region(NCURI* uri, const char** regionp)
|
||||
{
|
||||
int stat = NC_NOERR;
|
||||
const char* region = NULL;
|
||||
const char* profile = NULL;
|
||||
|
||||
region = ncurifragmentlookup(uri,"aws.region");
|
||||
if(region == NULL)
|
||||
region = NC_rclookupx(uri,"AWS.REGION");
|
||||
if(region == NULL) {/* See if we can find a profile */
|
||||
if(NC_getactives3profile(uri,&profile)==NC_NOERR) {
|
||||
if(profile)
|
||||
(void)NC_s3profilelookup(profile,"aws_region",®ion);
|
||||
}
|
||||
}
|
||||
if(region == NULL)
|
||||
region = NC_getglobalstate()->aws.default_region; /* Force use of the Amazon default */
|
||||
#ifdef AWSDEBUG
|
||||
fprintf(stderr,">>> activeregion = |%s|\n",region));
|
||||
#endif
|
||||
if(regionp) *regionp = region;
|
||||
return stat;
|
||||
}
|
||||
|
||||
/**
|
||||
The .aws/config and .aws/credentials files
|
||||
are in INI format (https://en.wikipedia.org/wiki/INI_file).
|
||||
This format is not well defined, so the grammar used
|
||||
here is restrictive. Here, the term "profile" is the same
|
||||
as the INI term "section".
|
||||
|
||||
The grammar used is as follows:
|
||||
|
||||
Grammar:
|
||||
|
||||
inifile: profilelist ;
|
||||
profilelist: profile | profilelist profile ;
|
||||
profile: '[' profilename ']' EOL entries ;
|
||||
entries: empty | entries entry ;
|
||||
entry: WORD = WORD EOL ;
|
||||
profilename: WORD ;
|
||||
Lexical:
|
||||
WORD sequence of printable characters - [ \[\]=]+
|
||||
EOL '\n' | ';'
|
||||
|
||||
Note:
|
||||
1. The semicolon at beginning of a line signals a comment.
|
||||
2. # comments are not allowed
|
||||
3. Duplicate profiles or keys are ignored.
|
||||
4. Escape characters are not supported.
|
||||
*/
|
||||
|
||||
#define AWS_EOF (-1)
|
||||
#define AWS_ERR (0)
|
||||
#define AWS_WORD (0x10001)
|
||||
#define AWS_EOL (0x10002)
|
||||
|
||||
#ifdef LEXDEBUG
|
||||
static const char*
|
||||
tokenname(int token)
|
||||
{
|
||||
static char num[32];
|
||||
switch(token) {
|
||||
case AWS_EOF: return "EOF";
|
||||
case AWS_ERR: return "ERR";
|
||||
case AWS_WORD: return "WORD";
|
||||
default: snprintf(num,sizeof(num),"%d",token); return num;
|
||||
}
|
||||
return "UNKNOWN";
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef struct AWSparser {
|
||||
char* text;
|
||||
char* pos;
|
||||
size_t yylen; /* |yytext| */
|
||||
NCbytes* yytext;
|
||||
int token; /* last token found */
|
||||
int pushback; /* allow 1-token pushback */
|
||||
} AWSparser;
|
||||
|
||||
static int
|
||||
awslex(AWSparser* parser)
|
||||
{
|
||||
int c;
|
||||
int token = 0;
|
||||
char* start;
|
||||
size_t count;
|
||||
|
||||
parser->token = AWS_ERR;
|
||||
ncbytesclear(parser->yytext);
|
||||
ncbytesnull(parser->yytext);
|
||||
|
||||
if(parser->pushback != AWS_ERR) {
|
||||
token = parser->pushback;
|
||||
parser->pushback = AWS_ERR;
|
||||
goto done;
|
||||
}
|
||||
|
||||
while(token == 0) { /* avoid need to goto when retrying */
|
||||
c = *parser->pos;
|
||||
if(c == '\0') {
|
||||
token = AWS_EOF;
|
||||
} else if(c == '\n') {
|
||||
parser->pos++;
|
||||
token = AWS_EOL;
|
||||
} else if(c <= ' ' || c == '\177') {
|
||||
parser->pos++;
|
||||
continue; /* ignore whitespace */
|
||||
} else if(c == ';') {
|
||||
char* p = parser->pos - 1;
|
||||
if(*p == '\n') {
|
||||
/* Skip comment */
|
||||
do {p++;} while(*p != '\n' && *p != '\0');
|
||||
parser->pos = p;
|
||||
token = (*p == '\n'?AWS_EOL:AWS_EOF);
|
||||
} else {
|
||||
token = ';';
|
||||
ncbytesappend(parser->yytext,';');
|
||||
parser->pos++;
|
||||
}
|
||||
} else if(c == '[' || c == ']' || c == '=') {
|
||||
ncbytesappend(parser->yytext,c);
|
||||
ncbytesnull(parser->yytext);
|
||||
token = c;
|
||||
parser->pos++;
|
||||
} else { /*Assume a word*/
|
||||
start = parser->pos;
|
||||
for(;;) {
|
||||
c = *parser->pos++;
|
||||
if(c <= ' ' || c == '\177' || c == '[' || c == ']' || c == '=') break; /* end of word */
|
||||
}
|
||||
/* Pushback last char */
|
||||
parser->pos--;
|
||||
count = ((parser->pos) - start);
|
||||
ncbytesappendn(parser->yytext,start,count);
|
||||
ncbytesnull(parser->yytext);
|
||||
token = AWS_WORD;
|
||||
}
|
||||
#ifdef LEXDEBUG
|
||||
fprintf(stderr,"%s(%d): |%s|\n",tokenname(token),token,ncbytescontents(parser->yytext));
|
||||
#endif
|
||||
} /*for(;;)*/
|
||||
|
||||
done:
|
||||
parser->token = token;
|
||||
return token;
|
||||
}
|
||||
|
||||
/*
|
||||
@param text of the aws credentials file
|
||||
@param profiles list of form struct AWSprofile (see ncauth.h)
|
||||
*/
|
||||
|
||||
#define LBR '['
|
||||
#define RBR ']'
|
||||
|
||||
static int
|
||||
awsparse(const char* text, NClist* profiles)
|
||||
{
|
||||
int i,stat = NC_NOERR;
|
||||
size_t len;
|
||||
AWSparser* parser = NULL;
|
||||
struct AWSprofile* profile = NULL;
|
||||
int token;
|
||||
char* key = NULL;
|
||||
char* value = NULL;
|
||||
|
||||
if(text == NULL) text = "";
|
||||
|
||||
parser = calloc(1,sizeof(AWSparser));
|
||||
if(parser == NULL)
|
||||
{stat = (NC_ENOMEM); goto done;}
|
||||
len = strlen(text);
|
||||
parser->text = (char*)malloc(len+1+1+1); /* double nul term plus leading EOL */
|
||||
if(parser->text == NULL)
|
||||
{stat = (NCTHROW(NC_EINVAL)); goto done;}
|
||||
parser->pos = parser->text;
|
||||
parser->pos[0] = '\n'; /* So we can test for comment unconditionally */
|
||||
parser->pos++;
|
||||
strcpy(parser->text+1,text);
|
||||
parser->pos += len;
|
||||
/* Double nul terminate */
|
||||
parser->pos[0] = '\0';
|
||||
parser->pos[1] = '\0';
|
||||
parser->pos = &parser->text[0]; /* reset */
|
||||
parser->yytext = ncbytesnew();
|
||||
parser->pushback = AWS_ERR;
|
||||
|
||||
/* Do not need recursion, use simple loops */
|
||||
for(;;) {
|
||||
token = awslex(parser); /* make token always be defined */
|
||||
if(token == AWS_EOF) break; /* finished */
|
||||
if(token == AWS_EOL) {continue;} /* blank line */
|
||||
if(token != LBR) {stat = NCTHROW(NC_EINVAL); goto done;}
|
||||
/* parse [profile name] */
|
||||
token = awslex(parser);
|
||||
if(token != AWS_WORD) {stat = NCTHROW(NC_EINVAL); goto done;}
|
||||
assert(profile == NULL);
|
||||
if((profile = (struct AWSprofile*)calloc(1,sizeof(struct AWSprofile)))==NULL)
|
||||
{stat = NC_ENOMEM; goto done;}
|
||||
profile->name = ncbytesextract(parser->yytext);
|
||||
profile->entries = nclistnew();
|
||||
token = awslex(parser);
|
||||
if(token != RBR) {stat = NCTHROW(NC_EINVAL); goto done;}
|
||||
#ifdef PARSEDEBUG
|
||||
fprintf(stderr,">>> parse: profile=%s\n",profile->name);
|
||||
#endif
|
||||
/* The fields can be in any order */
|
||||
for(;;) {
|
||||
struct AWSentry* entry = NULL;
|
||||
token = awslex(parser);
|
||||
if(token == AWS_EOL) {
|
||||
continue; /* ignore empty lines */
|
||||
} else if(token == AWS_EOF) {
|
||||
break;
|
||||
} else if(token == LBR) {/* start of next profile */
|
||||
parser->pushback = token;
|
||||
break;
|
||||
} else if(token == AWS_WORD) {
|
||||
key = ncbytesextract(parser->yytext);
|
||||
token = awslex(parser);
|
||||
if(token != '=') {stat = NCTHROW(NC_EINVAL); goto done;}
|
||||
token = awslex(parser);
|
||||
if(token != AWS_EOL && token != AWS_WORD) {stat = NCTHROW(NC_EINVAL); goto done;}
|
||||
value = ncbytesextract(parser->yytext);
|
||||
if((entry = (struct AWSentry*)calloc(1,sizeof(struct AWSentry)))==NULL)
|
||||
{stat = NC_ENOMEM; goto done;}
|
||||
entry->key = key; key = NULL;
|
||||
entry->value = value; value = NULL;
|
||||
#ifdef PARSEDEBUG
|
||||
fprintf(stderr,">>> parse: entry=(%s,%s)\n",entry->key,entry->value);
|
||||
#endif
|
||||
nclistpush(profile->entries,entry); entry = NULL;
|
||||
if(token == AWS_WORD) token = awslex(parser); /* finish the line */
|
||||
} else
|
||||
{stat = NCTHROW(NC_EINVAL); goto done;}
|
||||
}
|
||||
|
||||
/* If this profile already exists, then replace old one */
|
||||
for(i=0;i<nclistlength(profiles);i++) {
|
||||
struct AWSprofile* p = (struct AWSprofile*)nclistget(profiles,i);
|
||||
if(strcasecmp(p->name,profile->name)==0) {
|
||||
nclistset(profiles,i,profile);
|
||||
profile = NULL;
|
||||
/* reclaim old one */
|
||||
freeprofile(p);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(profile) nclistpush(profiles,profile);
|
||||
profile = NULL;
|
||||
}
|
||||
|
||||
done:
|
||||
if(profile) freeprofile(profile);
|
||||
nullfree(key);
|
||||
nullfree(value);
|
||||
if(parser != NULL) {
|
||||
nullfree(parser->text);
|
||||
ncbytesfree(parser->yytext);
|
||||
free(parser);
|
||||
}
|
||||
return (stat);
|
||||
}
|
||||
|
||||
static void
|
||||
freeentry(struct AWSentry* e)
|
||||
{
|
||||
if(e) {
|
||||
#ifdef AWSDEBUG
|
||||
fprintf(stderr,">>> freeentry: key=%p value=%p\n",e->key,e->value);
|
||||
#endif
|
||||
nullfree(e->key);
|
||||
nullfree(e->value);
|
||||
nullfree(e);
|
||||
}
|
||||
}
|
||||
|
@ -397,6 +397,43 @@ done:
|
||||
return found;
|
||||
}
|
||||
|
||||
/** \internal
|
||||
Add tag to fragment mode list unless already present.
|
||||
*/
|
||||
int
|
||||
NC_addmodetag(NCURI* uri, const char* tag)
|
||||
{
|
||||
int stat = NC_NOERR;
|
||||
int found = 0;
|
||||
int i;
|
||||
const char* modestr = NULL;
|
||||
char* modevalue = NULL;
|
||||
NClist* modelist = NULL;
|
||||
|
||||
modestr = ncurifragmentlookup(uri,"mode");
|
||||
if(modestr != NULL) {
|
||||
/* Parse mode str */
|
||||
if((stat = NC_getmodelist(modestr,&modelist))) goto done;
|
||||
} else
|
||||
modelist = nclistnew();
|
||||
/* Search for tag */
|
||||
for(i=0;i<nclistlength(modelist);i++) {
|
||||
const char* mode = (const char*)nclistget(modelist,i);
|
||||
if(strcasecmp(mode,tag)==0) {found = 1; break;}
|
||||
}
|
||||
/* If not found, then add to modelist */
|
||||
if(!found) nclistpush(modelist,strdup(tag));
|
||||
/* Convert modelist back to string */
|
||||
if((stat=NC_joinwith(modelist,",",NULL,NULL,&modevalue))) goto done;
|
||||
/* modify the url */
|
||||
if((stat=ncurisetfragmentkey(uri,"mode",modevalue))) goto done;
|
||||
|
||||
done:
|
||||
nclistfreeall(modelist);
|
||||
nullfree(modevalue);
|
||||
return stat;
|
||||
}
|
||||
|
||||
#if ! defined __INTEL_COMPILER
|
||||
#if defined __APPLE__
|
||||
/** \internal */
|
||||
@ -466,28 +503,40 @@ done:
|
||||
/** \internal concat the the segments with each segment preceded by '/' */
|
||||
int
|
||||
NC_join(NClist* segments, char** pathp)
|
||||
{
|
||||
return NC_joinwith(segments,"/","/",NULL,pathp);
|
||||
}
|
||||
|
||||
/** \internal
|
||||
Concat the the segments with separator.
|
||||
@param segments to join
|
||||
@param sep to use between segments
|
||||
@param prefix put at front of joined string: NULL => no prefix
|
||||
@param suffix put at end of joined string: NULL => no suffix
|
||||
@param pathp return the join in this
|
||||
*/
|
||||
int
|
||||
NC_joinwith(NClist* segments, const char* sep, const char* prefix, const char* suffix, char** pathp)
|
||||
{
|
||||
int stat = NC_NOERR;
|
||||
size_t i;
|
||||
NCbytes* buf = NULL;
|
||||
size_t seplen = nulllen(sep);
|
||||
|
||||
if(segments == NULL)
|
||||
{stat = NC_EINVAL; goto done;}
|
||||
if((buf = ncbytesnew())==NULL)
|
||||
{stat = NC_ENOMEM; goto done;}
|
||||
if(nclistlength(segments) == 0)
|
||||
ncbytescat(buf,"/");
|
||||
else for(i=0;i<nclistlength(segments);i++) {
|
||||
if(prefix) ncbytescat(buf,prefix);
|
||||
for(i=0;i<nclistlength(segments);i++) {
|
||||
const char* seg = nclistget(segments,i);
|
||||
if(seg[0] != '/')
|
||||
ncbytescat(buf,"/");
|
||||
if(i>0 && strncmp(seg,sep,seplen)!=0)
|
||||
ncbytescat(buf,sep);
|
||||
ncbytescat(buf,seg);
|
||||
}
|
||||
|
||||
if(suffix) ncbytescat(buf,suffix);
|
||||
if(pathp) *pathp = ncbytesextract(buf);
|
||||
done:
|
||||
if(!stat) {
|
||||
if(pathp) *pathp = ncbytesextract(buf);
|
||||
}
|
||||
ncbytesfree(buf);
|
||||
return stat;
|
||||
}
|
||||
|
@ -1073,6 +1073,7 @@ NCH5_s3comms_s3r_open(const char* root, NCS3SVC svc, const char *region, const c
|
||||
unsigned char *signing_key = NULL;
|
||||
char iso8601now[ISO8601_SIZE];
|
||||
struct tm *now = NULL;
|
||||
const char* signingregion = AWS_GLOBAL_DEFAULT_REGION;
|
||||
|
||||
TRACE(0,"root=%s region=%s access_id=%s access_key=%s",root,region,access_id,access_key);
|
||||
|
||||
@ -1142,15 +1143,16 @@ NCH5_s3comms_s3r_open(const char* root, NCS3SVC svc, const char *region, const c
|
||||
/* Do optional authentication */
|
||||
if(access_id != NULL && access_key != NULL) { /* We are authenticating */
|
||||
/* Need several pieces of info for authentication */
|
||||
if (nulllen(handle->region) == 0)
|
||||
HGOTO_ERROR(H5E_ARGS, NC_EAUTH, NULL, "region cannot be null.");
|
||||
if (nulllen(handle->region) > 0)
|
||||
signingregion = region;
|
||||
// HGOTO_ERROR(H5E_ARGS, NC_EAUTH, NULL, "region cannot be null.");
|
||||
if (nulllen(handle->accessid)==0)
|
||||
HGOTO_ERROR(H5E_ARGS, NC_EAUTH, NULL, "access id cannot be null.");
|
||||
if (nulllen(handle->accesskey)==0)
|
||||
HGOTO_ERROR(H5E_ARGS, NC_EAUTH, NULL, "signing key cannot be null.");
|
||||
|
||||
/* Compute the signing key */
|
||||
if (SUCCEED != NCH5_s3comms_signing_key(&signing_key, access_key, region, iso8601now))
|
||||
if (SUCCEED != NCH5_s3comms_signing_key(&signing_key, access_key, signingregion, iso8601now))
|
||||
HGOTO_ERROR(H5E_ARGS, NC_EINVAL, NULL, "problem in NCH5_s3comms_s3comms_signing_key.");
|
||||
if (signing_key == NULL)
|
||||
HGOTO_ERROR(H5E_ARGS, NC_EAUTH, NULL, "signing key cannot be null.");
|
||||
|
@ -82,9 +82,6 @@ struct LISTOBJECTSV2 {
|
||||
char* startafter;
|
||||
};
|
||||
|
||||
static int ncs3_initialized = 0;
|
||||
static int ncs3_finalized = 0;
|
||||
|
||||
/* Forward */
|
||||
static void s3client_destroy(NCS3CLIENT* s3client);
|
||||
static char* makes3rooturl(NCS3INFO* info);
|
||||
@ -141,28 +138,6 @@ dumps3client(void* s3client0, const char* tag)
|
||||
|
||||
/**************************************************/
|
||||
|
||||
EXTERNL int
|
||||
NC_s3sdkinitialize(void)
|
||||
{
|
||||
NCTRACE(11,NULL);
|
||||
if(!ncs3_initialized) {
|
||||
ncs3_initialized = 1;
|
||||
ncs3_finalized = 0;
|
||||
}
|
||||
return NCUNTRACE(NC_NOERR);
|
||||
}
|
||||
|
||||
EXTERNL int
|
||||
NC_s3sdkfinalize(void)
|
||||
{
|
||||
NCTRACE(11,NULL);
|
||||
if(!ncs3_finalized) {
|
||||
ncs3_initialized = 0;
|
||||
ncs3_finalized = 1;
|
||||
}
|
||||
return NCUNTRACE(NC_NOERR);
|
||||
}
|
||||
|
||||
EXTERNL void*
|
||||
NC_s3sdkcreateclient(NCS3INFO* info)
|
||||
{
|
||||
|
@ -542,7 +542,7 @@ ncurirebuild(NCURI* duri)
|
||||
|
||||
/* Replace a specific fragment key*/
|
||||
int
|
||||
ncurisetfragmentkey(NCURI* duri,const char* key, const char* value)
|
||||
ncurisetfragmentkey(NCURI* duri, const char* key, const char* value)
|
||||
{
|
||||
int ret = NC_NOERR;
|
||||
int pos = -1;
|
||||
@ -551,8 +551,8 @@ ncurisetfragmentkey(NCURI* duri,const char* key, const char* value)
|
||||
pos = ncfind(duri->fraglist, key);
|
||||
if(pos < 0) { /* does not exist */
|
||||
if(duri->fraglist == NULL) duri->fraglist = nclistnew();
|
||||
nclistpush(duri->fraglist,key);
|
||||
nclistpush(duri->fraglist,value);
|
||||
nclistpush(duri->fraglist,strdup(key));
|
||||
nclistpush(duri->fraglist,strdup(value));
|
||||
} else {
|
||||
nullfree(nclistget(duri->fraglist,(size_t)pos+1));
|
||||
nclistset(duri->fraglist,(size_t)pos+1,strdup(value));
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* -*- mode: c; c-basic-offset: 2; tab-width: 2; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2015 Steven G. Johnson, Jiahao Chen, Peter Colberg, Tony Kelman, Scott P. Jones, and other contributors.
|
||||
* Copyright (c) 2014-2021 Steven G. Johnson, Jiahao Chen, Peter Colberg, Tony Kelman, Scott P. Jones, and other contributors.
|
||||
* Copyright (c) 2009 Public Software Group e. V., Berlin, Germany
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@ -27,7 +27,7 @@
|
||||
* Unicode data files.
|
||||
*
|
||||
* The original data files are available at
|
||||
* http://www.unicode.org/Public/UNIDATA/
|
||||
* https://www.unicode.org/Public/UNIDATA/
|
||||
*
|
||||
* Please notice the copyright statement in the file "utf8proc_data.c".
|
||||
*/
|
||||
@ -42,13 +42,17 @@
|
||||
|
||||
|
||||
#include "utf8proc.h"
|
||||
|
||||
#ifndef SSIZE_MAX
|
||||
#define SSIZE_MAX ((size_t)SIZE_MAX/2)
|
||||
#endif
|
||||
#ifndef UINT16_MAX
|
||||
# define UINT16_MAX 65535U
|
||||
#endif
|
||||
|
||||
#include "utf8proc_data.c"
|
||||
|
||||
|
||||
/**
|
||||
* Array containing the byte lengths of a UTF-8 encoded codepoint based
|
||||
* on the first byte.
|
||||
*/
|
||||
const nc_utf8proc_int8_t nc_utf8proc_utf8class[256] = {
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
@ -96,7 +100,11 @@ const char *nc_utf8proc_version(void) {
|
||||
return STRINGIZE(UTF8PROC_VERSION_MAJOR) "." STRINGIZE(UTF8PROC_VERSION_MINOR) "." STRINGIZE(UTF8PROC_VERSION_PATCH) "";
|
||||
}
|
||||
|
||||
const char *nc_utf8proc_errmsg(nc_utf8proc_ssize_t errcode) {
|
||||
const char *nc_utf8proc_unicode_version(void) {
|
||||
return "15.1.0";
|
||||
}
|
||||
|
||||
const char *nc_utf8proc_errmsg(nc_utf8proc_ssize_t errcode) {
|
||||
switch (errcode) {
|
||||
case UTF8PROC_ERROR_NOMEM:
|
||||
return "Memory for processing UTF-8 data could not be allocated.";
|
||||
@ -117,7 +125,7 @@ const char *nc_utf8proc_version(void) {
|
||||
nc_utf8proc_ssize_t nc_utf8proc_iterate(
|
||||
const nc_utf8proc_uint8_t *str, nc_utf8proc_ssize_t strlen, nc_utf8proc_int32_t *dst
|
||||
) {
|
||||
nc_utf8proc_uint32_t uc;
|
||||
nc_utf8proc_int32_t uc;
|
||||
const nc_utf8proc_uint8_t *end;
|
||||
|
||||
*dst = -1;
|
||||
@ -128,18 +136,18 @@ nc_utf8proc_ssize_t nc_utf8proc_iterate(
|
||||
*dst = uc;
|
||||
return 1;
|
||||
}
|
||||
/* Must be between 0xc2 and 0xf4 inclusive to be valid */
|
||||
if ((uc - 0xc2) > (0xf4-0xc2)) return UTF8PROC_ERROR_INVALIDUTF8;
|
||||
if (uc < 0xe0) { /* 2-byte sequence */
|
||||
/* Must have valid continuation character */
|
||||
// Must be between 0xc2 and 0xf4 inclusive to be valid
|
||||
if ((nc_utf8proc_uint32_t)(uc - 0xc2) > (0xf4-0xc2)) return UTF8PROC_ERROR_INVALIDUTF8;
|
||||
if (uc < 0xe0) { // 2-byte sequence
|
||||
// Must have valid continuation character
|
||||
if (str >= end || !utf_cont(*str)) return UTF8PROC_ERROR_INVALIDUTF8;
|
||||
*dst = ((uc & 0x1f)<<6) | (*str & 0x3f);
|
||||
return 2;
|
||||
}
|
||||
if (uc < 0xf0) { /* 3-byte sequence */
|
||||
if (uc < 0xf0) { // 3-byte sequence
|
||||
if ((str + 1 >= end) || !utf_cont(*str) || !utf_cont(str[1]))
|
||||
return UTF8PROC_ERROR_INVALIDUTF8;
|
||||
/* Check for surrogate chars */
|
||||
// Check for surrogate chars
|
||||
if (uc == 0xed && *str > 0x9f)
|
||||
return UTF8PROC_ERROR_INVALIDUTF8;
|
||||
uc = ((uc & 0xf)<<12) | ((*str & 0x3f)<<6) | (str[1] & 0x3f);
|
||||
@ -148,11 +156,11 @@ nc_utf8proc_ssize_t nc_utf8proc_iterate(
|
||||
*dst = uc;
|
||||
return 3;
|
||||
}
|
||||
/* 4-byte sequence */
|
||||
/* Must have 3 valid continuation characters */
|
||||
// 4-byte sequence
|
||||
// Must have 3 valid continuation characters
|
||||
if ((str + 2 >= end) || !utf_cont(*str) || !utf_cont(str[1]) || !utf_cont(str[2]))
|
||||
return UTF8PROC_ERROR_INVALIDUTF8;
|
||||
/* Make sure in correct range (0x10000 - 0x10ffff) */
|
||||
// Make sure in correct range (0x10000 - 0x10ffff)
|
||||
if (uc == 0xf0) {
|
||||
if (*str < 0x90) return UTF8PROC_ERROR_INVALIDUTF8;
|
||||
} else if (uc == 0xf4) {
|
||||
@ -162,11 +170,11 @@ nc_utf8proc_ssize_t nc_utf8proc_iterate(
|
||||
return 4;
|
||||
}
|
||||
|
||||
nc_utf8proc_bool nc_utf8proc_codepoint_valid(nc_utf8proc_int32_t uc) {
|
||||
nc_utf8proc_bool nc_utf8proc_codepoint_valid(nc_utf8proc_int32_t uc) {
|
||||
return (((nc_utf8proc_uint32_t)uc)-0xd800 > 0x07ff) && ((nc_utf8proc_uint32_t)uc < 0x110000);
|
||||
}
|
||||
|
||||
nc_utf8proc_ssize_t nc_utf8proc_encode_char(nc_utf8proc_int32_t uc, nc_utf8proc_uint8_t *dst) {
|
||||
nc_utf8proc_ssize_t nc_utf8proc_encode_char(nc_utf8proc_int32_t uc, nc_utf8proc_uint8_t *dst) {
|
||||
if (uc < 0x00) {
|
||||
return 0;
|
||||
} else if (uc < 0x80) {
|
||||
@ -176,8 +184,8 @@ nc_utf8proc_ssize_t nc_utf8proc_iterate(
|
||||
dst[0] = (nc_utf8proc_uint8_t)(0xC0 + (uc >> 6));
|
||||
dst[1] = (nc_utf8proc_uint8_t)(0x80 + (uc & 0x3F));
|
||||
return 2;
|
||||
/* Note: we allow encoding 0xd800-0xdfff here, so as not to change */
|
||||
/* the API, however, these are actually invalid in UTF-8 */
|
||||
// Note: we allow encoding 0xd800-0xdfff here, so as not to change
|
||||
// the API, however, these are actually invalid in UTF-8
|
||||
} else if (uc < 0x10000) {
|
||||
dst[0] = (nc_utf8proc_uint8_t)(0xE0 + (uc >> 12));
|
||||
dst[1] = (nc_utf8proc_uint8_t)(0x80 + ((uc >> 6) & 0x3F));
|
||||
@ -192,9 +200,13 @@ nc_utf8proc_ssize_t nc_utf8proc_iterate(
|
||||
} else return 0;
|
||||
}
|
||||
|
||||
/* internal "unsafe" version that does not check whether uc is in range */
|
||||
static nc_utf8proc_ssize_t nc_unsafe_encode_char(nc_utf8proc_int32_t uc, nc_utf8proc_uint8_t *dst) {
|
||||
/* internal version used for inserting 0xff bytes between graphemes */
|
||||
static nc_utf8proc_ssize_t nc_charbound_encode_char(nc_utf8proc_int32_t uc, nc_utf8proc_uint8_t *dst) {
|
||||
if (uc < 0x00) {
|
||||
if (uc == -1) { /* internal value used for grapheme breaks */
|
||||
dst[0] = (nc_utf8proc_uint8_t)0xFF;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
} else if (uc < 0x80) {
|
||||
dst[0] = (nc_utf8proc_uint8_t)uc;
|
||||
@ -203,12 +215,6 @@ static nc_utf8proc_ssize_t nc_unsafe_encode_char(nc_utf8proc_int32_t uc, nc_utf8
|
||||
dst[0] = (nc_utf8proc_uint8_t)(0xC0 + (uc >> 6));
|
||||
dst[1] = (nc_utf8proc_uint8_t)(0x80 + (uc & 0x3F));
|
||||
return 2;
|
||||
} else if (uc == 0xFFFF) {
|
||||
dst[0] = (nc_utf8proc_uint8_t)0xFF;
|
||||
return 1;
|
||||
} else if (uc == 0xFFFE) {
|
||||
dst[0] = (nc_utf8proc_uint8_t)0xFE;
|
||||
return 1;
|
||||
} else if (uc < 0x10000) {
|
||||
dst[0] = (nc_utf8proc_uint8_t)(0xE0 + (uc >> 12));
|
||||
dst[1] = (nc_utf8proc_uint8_t)(0x80 + ((uc >> 6) & 0x3F));
|
||||
@ -233,7 +239,7 @@ static const nc_utf8proc_property_t *nc_unsafe_get_property(nc_utf8proc_int32_t
|
||||
);
|
||||
}
|
||||
|
||||
const nc_utf8proc_property_t *nc_utf8proc_get_property(nc_utf8proc_int32_t uc) {
|
||||
const nc_utf8proc_property_t *nc_utf8proc_get_property(nc_utf8proc_int32_t uc) {
|
||||
return uc < 0 || uc >= 0x110000 ? nc_utf8proc_properties : nc_unsafe_get_property(uc);
|
||||
}
|
||||
|
||||
@ -254,75 +260,102 @@ static const nc_utf8proc_property_t *nc_unsafe_get_property(nc_utf8proc_int32_t
|
||||
*/
|
||||
static nc_utf8proc_bool nc_grapheme_break_simple(int lbc, int tbc) {
|
||||
return
|
||||
(lbc == UTF8PROC_BOUNDCLASS_START) ? true : /* GB1 */
|
||||
(lbc == UTF8PROC_BOUNDCLASS_CR && /* GB3 */
|
||||
tbc == UTF8PROC_BOUNDCLASS_LF) ? false : /* --- */
|
||||
(lbc >= UTF8PROC_BOUNDCLASS_CR && lbc <= UTF8PROC_BOUNDCLASS_CONTROL) ? true : /* GB4 */
|
||||
(tbc >= UTF8PROC_BOUNDCLASS_CR && tbc <= UTF8PROC_BOUNDCLASS_CONTROL) ? true : /* GB5 */
|
||||
(lbc == UTF8PROC_BOUNDCLASS_L && /* GB6 */
|
||||
(tbc == UTF8PROC_BOUNDCLASS_L || /* --- */
|
||||
tbc == UTF8PROC_BOUNDCLASS_V || /* --- */
|
||||
tbc == UTF8PROC_BOUNDCLASS_LV || /* --- */
|
||||
tbc == UTF8PROC_BOUNDCLASS_LVT)) ? false : /* --- */
|
||||
((lbc == UTF8PROC_BOUNDCLASS_LV || /* GB7 */
|
||||
lbc == UTF8PROC_BOUNDCLASS_V) && /* --- */
|
||||
(tbc == UTF8PROC_BOUNDCLASS_V || /* --- */
|
||||
tbc == UTF8PROC_BOUNDCLASS_T)) ? false : /* --- */
|
||||
((lbc == UTF8PROC_BOUNDCLASS_LVT || /* GB8 */
|
||||
lbc == UTF8PROC_BOUNDCLASS_T) && /* --- */
|
||||
tbc == UTF8PROC_BOUNDCLASS_T) ? false : /* --- */
|
||||
(tbc == UTF8PROC_BOUNDCLASS_EXTEND || /* GB9 */
|
||||
tbc == UTF8PROC_BOUNDCLASS_ZWJ || /* --- */
|
||||
tbc == UTF8PROC_BOUNDCLASS_SPACINGMARK || /* GB9a */
|
||||
lbc == UTF8PROC_BOUNDCLASS_PREPEND) ? false : /* GB9b */
|
||||
((lbc == UTF8PROC_BOUNDCLASS_E_BASE || /* GB10 (requires additional handling below) */
|
||||
lbc == UTF8PROC_BOUNDCLASS_E_BASE_GAZ) && /* ---- */
|
||||
tbc == UTF8PROC_BOUNDCLASS_E_MODIFIER) ? false : /* ---- */
|
||||
(lbc == UTF8PROC_BOUNDCLASS_ZWJ && /* GB11 */
|
||||
(tbc == UTF8PROC_BOUNDCLASS_GLUE_AFTER_ZWJ || /* ---- */
|
||||
tbc == UTF8PROC_BOUNDCLASS_E_BASE_GAZ)) ? false : /* ---- */
|
||||
(lbc == UTF8PROC_BOUNDCLASS_REGIONAL_INDICATOR && /* GB12/13 (requires additional handling below) */
|
||||
tbc == UTF8PROC_BOUNDCLASS_REGIONAL_INDICATOR) ? false : /* ---- */
|
||||
true; /* GB999 */
|
||||
(lbc == UTF8PROC_BOUNDCLASS_START) ? true : // GB1
|
||||
(lbc == UTF8PROC_BOUNDCLASS_CR && // GB3
|
||||
tbc == UTF8PROC_BOUNDCLASS_LF) ? false : // ---
|
||||
(lbc >= UTF8PROC_BOUNDCLASS_CR && lbc <= UTF8PROC_BOUNDCLASS_CONTROL) ? true : // GB4
|
||||
(tbc >= UTF8PROC_BOUNDCLASS_CR && tbc <= UTF8PROC_BOUNDCLASS_CONTROL) ? true : // GB5
|
||||
(lbc == UTF8PROC_BOUNDCLASS_L && // GB6
|
||||
(tbc == UTF8PROC_BOUNDCLASS_L || // ---
|
||||
tbc == UTF8PROC_BOUNDCLASS_V || // ---
|
||||
tbc == UTF8PROC_BOUNDCLASS_LV || // ---
|
||||
tbc == UTF8PROC_BOUNDCLASS_LVT)) ? false : // ---
|
||||
((lbc == UTF8PROC_BOUNDCLASS_LV || // GB7
|
||||
lbc == UTF8PROC_BOUNDCLASS_V) && // ---
|
||||
(tbc == UTF8PROC_BOUNDCLASS_V || // ---
|
||||
tbc == UTF8PROC_BOUNDCLASS_T)) ? false : // ---
|
||||
((lbc == UTF8PROC_BOUNDCLASS_LVT || // GB8
|
||||
lbc == UTF8PROC_BOUNDCLASS_T) && // ---
|
||||
tbc == UTF8PROC_BOUNDCLASS_T) ? false : // ---
|
||||
(tbc == UTF8PROC_BOUNDCLASS_EXTEND || // GB9
|
||||
tbc == UTF8PROC_BOUNDCLASS_ZWJ || // ---
|
||||
tbc == UTF8PROC_BOUNDCLASS_SPACINGMARK || // GB9a
|
||||
lbc == UTF8PROC_BOUNDCLASS_PREPEND) ? false : // GB9b
|
||||
(lbc == UTF8PROC_BOUNDCLASS_E_ZWG && // GB11 (requires additional handling below)
|
||||
tbc == UTF8PROC_BOUNDCLASS_EXTENDED_PICTOGRAPHIC) ? false : // ----
|
||||
(lbc == UTF8PROC_BOUNDCLASS_REGIONAL_INDICATOR && // GB12/13 (requires additional handling below)
|
||||
tbc == UTF8PROC_BOUNDCLASS_REGIONAL_INDICATOR) ? false : // ----
|
||||
true; // GB999
|
||||
}
|
||||
|
||||
static nc_utf8proc_bool nc_grapheme_break_extended(int lbc, int tbc, nc_utf8proc_int32_t *state)
|
||||
static nc_utf8proc_bool nc_grapheme_break_extended(int lbc, int tbc, int licb, int ticb, nc_utf8proc_int32_t *state)
|
||||
{
|
||||
int lbc_override = lbc;
|
||||
nc_utf8proc_bool break_permitted;
|
||||
if (state && *state != UTF8PROC_BOUNDCLASS_START)
|
||||
lbc_override = *state;
|
||||
break_permitted = nc_grapheme_break_simple(lbc_override, tbc);
|
||||
if (state) {
|
||||
/* Special support for GB 12/13 made possible by GB999. After two RI */
|
||||
/* class codepoints we want to force a break. Do this by resetting the */
|
||||
/* second RI's bound class to UTF8PROC_BOUNDCLASS_OTHER, to force a break */
|
||||
/* after that character according to GB999 (unless of course such a break is */
|
||||
/* forbidden by a different rule such as GB9). */
|
||||
if (*state == tbc && tbc == UTF8PROC_BOUNDCLASS_REGIONAL_INDICATOR)
|
||||
*state = UTF8PROC_BOUNDCLASS_OTHER;
|
||||
/* Special support for GB10. Fold any EXTEND codepoints into the previous */
|
||||
/* boundclass if we're dealing with an emoji base boundclass. */
|
||||
else if ((*state == UTF8PROC_BOUNDCLASS_E_BASE ||
|
||||
*state == UTF8PROC_BOUNDCLASS_E_BASE_GAZ) &&
|
||||
tbc == UTF8PROC_BOUNDCLASS_EXTEND)
|
||||
*state = UTF8PROC_BOUNDCLASS_E_BASE;
|
||||
int state_bc, state_icb; /* boundclass and indic_conjunct_break state */
|
||||
if (*state == 0) { /* state initialization */
|
||||
state_bc = lbc;
|
||||
state_icb = licb == UTF8PROC_INDIC_CONJUNCT_BREAK_CONSONANT ? licb : UTF8PROC_INDIC_CONJUNCT_BREAK_NONE;
|
||||
}
|
||||
else { /* lbc and licb are already encoded in *state */
|
||||
state_bc = *state & 0xff; // 1st byte of state is bound class
|
||||
state_icb = *state >> 8; // 2nd byte of state is indic conjunct break
|
||||
}
|
||||
|
||||
nc_utf8proc_bool break_permitted = nc_grapheme_break_simple(state_bc, tbc) &&
|
||||
!(state_icb == UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER
|
||||
&& ticb == UTF8PROC_INDIC_CONJUNCT_BREAK_CONSONANT); // GB9c
|
||||
|
||||
// Special support for GB9c. Don't break between two consonants
|
||||
// separated 1+ linker characters and 0+ extend characters in any order.
|
||||
// After a consonant, we enter LINKER state after at least one linker.
|
||||
if (ticb == UTF8PROC_INDIC_CONJUNCT_BREAK_CONSONANT
|
||||
|| state_icb == UTF8PROC_INDIC_CONJUNCT_BREAK_CONSONANT
|
||||
|| state_icb == UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND)
|
||||
state_icb = ticb;
|
||||
else if (state_icb == UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER)
|
||||
state_icb = ticb == UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND ?
|
||||
UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER : ticb;
|
||||
|
||||
// Special support for GB 12/13 made possible by GB999. After two RI
|
||||
// class codepoints we want to force a break. Do this by resetting the
|
||||
// second RI's bound class to UTF8PROC_BOUNDCLASS_OTHER, to force a break
|
||||
// after that character according to GB999 (unless of course such a break is
|
||||
// forbidden by a different rule such as GB9).
|
||||
if (state_bc == tbc && tbc == UTF8PROC_BOUNDCLASS_REGIONAL_INDICATOR)
|
||||
state_bc = UTF8PROC_BOUNDCLASS_OTHER;
|
||||
// Special support for GB11 (emoji extend* zwj / emoji)
|
||||
else if (state_bc == UTF8PROC_BOUNDCLASS_EXTENDED_PICTOGRAPHIC) {
|
||||
if (tbc == UTF8PROC_BOUNDCLASS_EXTEND) // fold EXTEND codepoints into emoji
|
||||
state_bc = UTF8PROC_BOUNDCLASS_EXTENDED_PICTOGRAPHIC;
|
||||
else if (tbc == UTF8PROC_BOUNDCLASS_ZWJ)
|
||||
state_bc = UTF8PROC_BOUNDCLASS_E_ZWG; // state to record emoji+zwg combo
|
||||
else
|
||||
state_bc = tbc;
|
||||
}
|
||||
else
|
||||
*state = tbc;
|
||||
state_bc = tbc;
|
||||
|
||||
*state = state_bc + (state_icb << 8);
|
||||
return break_permitted;
|
||||
}
|
||||
return break_permitted;
|
||||
else
|
||||
return nc_grapheme_break_simple(lbc, tbc);
|
||||
}
|
||||
|
||||
nc_utf8proc_bool nc_utf8proc_grapheme_break_stateful(
|
||||
nc_utf8proc_bool nc_utf8proc_grapheme_break_stateful(
|
||||
nc_utf8proc_int32_t c1, nc_utf8proc_int32_t c2, nc_utf8proc_int32_t *state) {
|
||||
|
||||
return nc_grapheme_break_extended(nc_utf8proc_get_property(c1)->boundclass,
|
||||
nc_utf8proc_get_property(c2)->boundclass,
|
||||
const nc_utf8proc_property_t *p1 = nc_utf8proc_get_property(c1);
|
||||
const nc_utf8proc_property_t *p2 = nc_utf8proc_get_property(c2);
|
||||
return nc_grapheme_break_extended(p1->boundclass,
|
||||
p2->boundclass,
|
||||
p1->indic_conjunct_break,
|
||||
p2->indic_conjunct_break,
|
||||
state);
|
||||
}
|
||||
|
||||
|
||||
nc_utf8proc_bool nc_utf8proc_grapheme_break(
|
||||
nc_utf8proc_bool nc_utf8proc_grapheme_break(
|
||||
nc_utf8proc_int32_t c1, nc_utf8proc_int32_t c2) {
|
||||
return nc_utf8proc_grapheme_break_stateful(c1, c2, NULL);
|
||||
}
|
||||
@ -346,17 +379,16 @@ static nc_utf8proc_int32_t nc_seqindex_decode_index(const nc_utf8proc_uint32_t s
|
||||
|
||||
static nc_utf8proc_ssize_t nc_seqindex_write_char_decomposed(nc_utf8proc_uint16_t seqindex, nc_utf8proc_int32_t *dst, nc_utf8proc_ssize_t bufsize, nc_utf8proc_option_t options, int *last_boundclass) {
|
||||
nc_utf8proc_ssize_t written = 0;
|
||||
const nc_utf8proc_uint16_t *entry = &nc_utf8proc_sequences[seqindex & 0x1FFF];
|
||||
int len = seqindex >> 13;
|
||||
if (len >= 7) {
|
||||
const nc_utf8proc_uint16_t *entry = &nc_utf8proc_sequences[seqindex & 0x3FFF];
|
||||
int len = seqindex >> 14;
|
||||
if (len >= 3) {
|
||||
len = *entry;
|
||||
entry++;
|
||||
}
|
||||
for (; len >= 0; entry++, len--) {
|
||||
nc_utf8proc_int32_t entry_cp = nc_seqindex_decode_entry(&entry);
|
||||
|
||||
nc_utf8proc_int32_t *dest = dst ? (dst+written) : NULL;
|
||||
written += nc_utf8proc_decompose_char(entry_cp, dest,
|
||||
written += nc_utf8proc_decompose_char(entry_cp, dst+written,
|
||||
(bufsize > written) ? (bufsize - written) : 0, options,
|
||||
last_boundclass);
|
||||
if (written < 0) return UTF8PROC_ERROR_OVERFLOW;
|
||||
@ -364,44 +396,56 @@ static nc_utf8proc_ssize_t nc_seqindex_write_char_decomposed(nc_utf8proc_uint16_
|
||||
return written;
|
||||
}
|
||||
|
||||
nc_utf8proc_int32_t nc_utf8proc_tolower(nc_utf8proc_int32_t c)
|
||||
nc_utf8proc_int32_t nc_utf8proc_tolower(nc_utf8proc_int32_t c)
|
||||
{
|
||||
nc_utf8proc_int32_t cl = nc_utf8proc_get_property(c)->lowercase_seqindex;
|
||||
return cl != UINT16_MAX ? nc_seqindex_decode_index(cl) : c;
|
||||
return cl != UINT16_MAX ? nc_seqindex_decode_index((nc_utf8proc_uint32_t)cl) : c;
|
||||
}
|
||||
|
||||
nc_utf8proc_int32_t nc_utf8proc_toupper(nc_utf8proc_int32_t c)
|
||||
nc_utf8proc_int32_t nc_utf8proc_toupper(nc_utf8proc_int32_t c)
|
||||
{
|
||||
nc_utf8proc_int32_t cu = nc_utf8proc_get_property(c)->uppercase_seqindex;
|
||||
return cu != UINT16_MAX ? nc_seqindex_decode_index(cu) : c;
|
||||
return cu != UINT16_MAX ? nc_seqindex_decode_index((nc_utf8proc_uint32_t)cu) : c;
|
||||
}
|
||||
|
||||
nc_utf8proc_int32_t nc_utf8proc_totitle(nc_utf8proc_int32_t c)
|
||||
nc_utf8proc_int32_t nc_utf8proc_totitle(nc_utf8proc_int32_t c)
|
||||
{
|
||||
nc_utf8proc_int32_t cu = nc_utf8proc_get_property(c)->titlecase_seqindex;
|
||||
return cu != UINT16_MAX ? nc_seqindex_decode_index(cu) : c;
|
||||
return cu != UINT16_MAX ? nc_seqindex_decode_index((nc_utf8proc_uint32_t)cu) : c;
|
||||
}
|
||||
|
||||
int nc_utf8proc_islower(nc_utf8proc_int32_t c)
|
||||
{
|
||||
const nc_utf8proc_property_t *p = nc_utf8proc_get_property(c);
|
||||
return p->lowercase_seqindex != p->uppercase_seqindex && p->lowercase_seqindex == UINT16_MAX;
|
||||
}
|
||||
|
||||
int nc_utf8proc_isupper(nc_utf8proc_int32_t c)
|
||||
{
|
||||
const nc_utf8proc_property_t *p = nc_utf8proc_get_property(c);
|
||||
return p->lowercase_seqindex != p->uppercase_seqindex && p->uppercase_seqindex == UINT16_MAX && p->category != UTF8PROC_CATEGORY_LT;
|
||||
}
|
||||
|
||||
/* return a character width analogous to wcwidth (except portable and
|
||||
hopefully less buggy than most system wcwidth functions). */
|
||||
int nc_utf8proc_charwidth(nc_utf8proc_int32_t c) {
|
||||
int nc_utf8proc_charwidth(nc_utf8proc_int32_t c) {
|
||||
return nc_utf8proc_get_property(c)->charwidth;
|
||||
}
|
||||
|
||||
nc_utf8proc_category_t nc_utf8proc_category(nc_utf8proc_int32_t c) {
|
||||
return nc_utf8proc_get_property(c)->category;
|
||||
nc_utf8proc_category_t nc_utf8proc_category(nc_utf8proc_int32_t c) {
|
||||
return (nc_utf8proc_category_t) nc_utf8proc_get_property(c)->category;
|
||||
}
|
||||
|
||||
const char *nc_utf8proc_category_string(nc_utf8proc_int32_t c) {
|
||||
const char *nc_utf8proc_category_string(nc_utf8proc_int32_t c) {
|
||||
static const char s[][3] = {"Cn","Lu","Ll","Lt","Lm","Lo","Mn","Mc","Me","Nd","Nl","No","Pc","Pd","Ps","Pe","Pi","Pf","Po","Sm","Sc","Sk","So","Zs","Zl","Zp","Cc","Cf","Cs","Co"};
|
||||
return s[nc_utf8proc_category(c)];
|
||||
}
|
||||
|
||||
#define nc_utf8proc_decompose_lump(replacement_uc) \
|
||||
return nc_utf8proc_decompose_char((replacement_uc), dst, bufsize, \
|
||||
options & ~UTF8PROC_LUMP, last_boundclass)
|
||||
options & ~(unsigned int)UTF8PROC_LUMP, last_boundclass)
|
||||
|
||||
nc_utf8proc_ssize_t nc_utf8proc_decompose_char(nc_utf8proc_int32_t uc, nc_utf8proc_int32_t *dst, nc_utf8proc_ssize_t bufsize, nc_utf8proc_option_t options, int *last_boundclass) {
|
||||
nc_utf8proc_ssize_t nc_utf8proc_decompose_char(nc_utf8proc_int32_t uc, nc_utf8proc_int32_t *dst, nc_utf8proc_ssize_t bufsize, nc_utf8proc_option_t options, int *last_boundclass) {
|
||||
const nc_utf8proc_property_t *property;
|
||||
nc_utf8proc_propval_t category;
|
||||
nc_utf8proc_int32_t hangul_sindex;
|
||||
@ -430,6 +474,9 @@ static nc_utf8proc_ssize_t nc_seqindex_write_char_decomposed(nc_utf8proc_uint16_
|
||||
if (options & UTF8PROC_IGNORE) {
|
||||
if (property->ignorable) return 0;
|
||||
}
|
||||
if (options & UTF8PROC_STRIPNA) {
|
||||
if (!category) return 0;
|
||||
}
|
||||
if (options & UTF8PROC_LUMP) {
|
||||
if (category == UTF8PROC_CATEGORY_ZS) nc_utf8proc_decompose_lump(0x0020);
|
||||
if (uc == 0x2018 || uc == 0x2019 || uc == 0x02BC || uc == 0x02C8)
|
||||
@ -474,10 +521,10 @@ static nc_utf8proc_ssize_t nc_seqindex_write_char_decomposed(nc_utf8proc_uint16_
|
||||
}
|
||||
if (options & UTF8PROC_CHARBOUND) {
|
||||
nc_utf8proc_bool boundary;
|
||||
int tbc = property->boundclass;
|
||||
boundary = nc_grapheme_break_extended(*last_boundclass, tbc, last_boundclass);
|
||||
boundary = nc_grapheme_break_extended(0, property->boundclass, 0, property->indic_conjunct_break,
|
||||
last_boundclass);
|
||||
if (boundary) {
|
||||
if (bufsize >= 1) dst[0] = 0xFFFF;
|
||||
if (bufsize >= 1) dst[0] = -1; /* sentinel value for grapheme break */
|
||||
if (bufsize >= 2) dst[1] = uc;
|
||||
return 2;
|
||||
}
|
||||
@ -486,14 +533,14 @@ static nc_utf8proc_ssize_t nc_seqindex_write_char_decomposed(nc_utf8proc_uint16_
|
||||
return 1;
|
||||
}
|
||||
|
||||
nc_utf8proc_ssize_t nc_utf8proc_decompose(
|
||||
nc_utf8proc_ssize_t nc_utf8proc_decompose(
|
||||
const nc_utf8proc_uint8_t *str, nc_utf8proc_ssize_t strlen,
|
||||
nc_utf8proc_int32_t *buffer, nc_utf8proc_ssize_t bufsize, nc_utf8proc_option_t options
|
||||
) {
|
||||
return nc_utf8proc_decompose_custom(str, strlen, buffer, bufsize, options, NULL, NULL);
|
||||
}
|
||||
|
||||
nc_utf8proc_ssize_t nc_utf8proc_decompose_custom(
|
||||
nc_utf8proc_ssize_t nc_utf8proc_decompose_custom(
|
||||
const nc_utf8proc_uint8_t *str, nc_utf8proc_ssize_t strlen,
|
||||
nc_utf8proc_int32_t *buffer, nc_utf8proc_ssize_t bufsize, nc_utf8proc_option_t options,
|
||||
nc_utf8proc_custom_func custom_func, void *custom_data
|
||||
@ -526,10 +573,8 @@ static nc_utf8proc_ssize_t nc_seqindex_write_char_decomposed(nc_utf8proc_uint16_
|
||||
if (custom_func != NULL) {
|
||||
uc = custom_func(uc, custom_data); /* user-specified custom mapping */
|
||||
}
|
||||
nc_utf8proc_int32_t *dest = NULL;
|
||||
if (buffer) dest = buffer + wpos;
|
||||
decomp_result = nc_utf8proc_decompose_char(
|
||||
uc, dest, (bufsize > wpos) ? (bufsize - wpos) : 0, options,
|
||||
uc, buffer + wpos, (bufsize > wpos) ? (bufsize - wpos) : 0, options,
|
||||
&boundclass
|
||||
);
|
||||
if (decomp_result < 0) return decomp_result;
|
||||
@ -562,7 +607,7 @@ static nc_utf8proc_ssize_t nc_seqindex_write_char_decomposed(nc_utf8proc_uint16_
|
||||
return wpos;
|
||||
}
|
||||
|
||||
nc_utf8proc_ssize_t nc_utf8proc_normalize_utf32(nc_utf8proc_int32_t *buffer, nc_utf8proc_ssize_t length, nc_utf8proc_option_t options) {
|
||||
nc_utf8proc_ssize_t nc_utf8proc_normalize_utf32(nc_utf8proc_int32_t *buffer, nc_utf8proc_ssize_t length, nc_utf8proc_option_t options) {
|
||||
/* UTF8PROC_NULLTERM option will be ignored, 'length' is never ignored */
|
||||
if (options & (UTF8PROC_NLF2LS | UTF8PROC_NLF2PS | UTF8PROC_STRIPCC)) {
|
||||
nc_utf8proc_ssize_t rpos;
|
||||
@ -640,9 +685,9 @@ static nc_utf8proc_ssize_t nc_seqindex_write_char_decomposed(nc_utf8proc_uint16_
|
||||
current_property->comb_index != UINT16_MAX &&
|
||||
current_property->comb_index >= 0x8000) {
|
||||
int sidx = starter_property->comb_index;
|
||||
int idx = (current_property->comb_index & 0x3FFF) - nc_utf8proc_combinations[sidx];
|
||||
if (idx >= 0 && idx <= nc_utf8proc_combinations[sidx + 1] ) {
|
||||
idx += sidx + 2;
|
||||
int idx = current_property->comb_index & 0x3FFF;
|
||||
if (idx >= nc_utf8proc_combinations[sidx] && idx <= nc_utf8proc_combinations[sidx + 1] ) {
|
||||
idx += sidx + 2 - nc_utf8proc_combinations[sidx];
|
||||
if (current_property->comb_index & 0x4000) {
|
||||
composition = (nc_utf8proc_combinations[idx] << 16) | nc_utf8proc_combinations[idx+1];
|
||||
} else
|
||||
@ -674,7 +719,7 @@ static nc_utf8proc_ssize_t nc_seqindex_write_char_decomposed(nc_utf8proc_uint16_
|
||||
return length;
|
||||
}
|
||||
|
||||
nc_utf8proc_ssize_t nc_utf8proc_reencode(nc_utf8proc_int32_t *buffer, nc_utf8proc_ssize_t length, nc_utf8proc_option_t options) {
|
||||
nc_utf8proc_ssize_t nc_utf8proc_reencode(nc_utf8proc_int32_t *buffer, nc_utf8proc_ssize_t length, nc_utf8proc_option_t options) {
|
||||
/* UTF8PROC_NULLTERM option will be ignored, 'length' is never ignored
|
||||
ASSERT: 'buffer' has one spare byte of free space at the end! */
|
||||
length = nc_utf8proc_normalize_utf32(buffer, length, options);
|
||||
@ -685,7 +730,7 @@ static nc_utf8proc_ssize_t nc_seqindex_write_char_decomposed(nc_utf8proc_uint16_
|
||||
if (options & UTF8PROC_CHARBOUND) {
|
||||
for (rpos = 0; rpos < length; rpos++) {
|
||||
uc = buffer[rpos];
|
||||
wpos += nc_unsafe_encode_char(uc, ((nc_utf8proc_uint8_t *)buffer) + wpos);
|
||||
wpos += nc_charbound_encode_char(uc, ((nc_utf8proc_uint8_t *)buffer) + wpos);
|
||||
}
|
||||
} else {
|
||||
for (rpos = 0; rpos < length; rpos++) {
|
||||
@ -698,13 +743,13 @@ static nc_utf8proc_ssize_t nc_seqindex_write_char_decomposed(nc_utf8proc_uint16_
|
||||
}
|
||||
}
|
||||
|
||||
nc_utf8proc_ssize_t nc_utf8proc_map(
|
||||
nc_utf8proc_ssize_t nc_utf8proc_map(
|
||||
const nc_utf8proc_uint8_t *str, nc_utf8proc_ssize_t strlen, nc_utf8proc_uint8_t **dstptr, nc_utf8proc_option_t options
|
||||
) {
|
||||
return nc_utf8proc_map_custom(str, strlen, dstptr, options, NULL, NULL);
|
||||
}
|
||||
|
||||
nc_utf8proc_ssize_t nc_utf8proc_map_custom(
|
||||
nc_utf8proc_ssize_t nc_utf8proc_map_custom(
|
||||
const nc_utf8proc_uint8_t *str, nc_utf8proc_ssize_t strlen, nc_utf8proc_uint8_t **dstptr, nc_utf8proc_option_t options,
|
||||
nc_utf8proc_custom_func custom_func, void *custom_data
|
||||
) {
|
||||
@ -713,7 +758,7 @@ static nc_utf8proc_ssize_t nc_seqindex_write_char_decomposed(nc_utf8proc_uint16_
|
||||
*dstptr = NULL;
|
||||
result = nc_utf8proc_decompose_custom(str, strlen, NULL, 0, options, custom_func, custom_data);
|
||||
if (result < 0) return result;
|
||||
buffer = (nc_utf8proc_int32_t *) malloc((size_t)result * sizeof(nc_utf8proc_int32_t) + 1);
|
||||
buffer = (nc_utf8proc_int32_t *) malloc(((nc_utf8proc_size_t)result) * sizeof(nc_utf8proc_int32_t) + 1);
|
||||
if (!buffer) return UTF8PROC_ERROR_NOMEM;
|
||||
result = nc_utf8proc_decompose_custom(str, strlen, buffer, result, options, custom_func, custom_data);
|
||||
if (result < 0) {
|
||||
@ -734,30 +779,37 @@ static nc_utf8proc_ssize_t nc_seqindex_write_char_decomposed(nc_utf8proc_uint16_
|
||||
return result;
|
||||
}
|
||||
|
||||
nc_utf8proc_uint8_t *nc_utf8proc_NFD(const nc_utf8proc_uint8_t *str) {
|
||||
nc_utf8proc_uint8_t *nc_utf8proc_NFD(const nc_utf8proc_uint8_t *str) {
|
||||
nc_utf8proc_uint8_t *retval;
|
||||
nc_utf8proc_map(str, 0, &retval, UTF8PROC_NULLTERM | UTF8PROC_STABLE |
|
||||
UTF8PROC_DECOMPOSE);
|
||||
return retval;
|
||||
}
|
||||
|
||||
nc_utf8proc_uint8_t *nc_utf8proc_NFC(const nc_utf8proc_uint8_t *str) {
|
||||
nc_utf8proc_uint8_t *nc_utf8proc_NFC(const nc_utf8proc_uint8_t *str) {
|
||||
nc_utf8proc_uint8_t *retval;
|
||||
nc_utf8proc_map(str, 0, &retval, UTF8PROC_NULLTERM | UTF8PROC_STABLE |
|
||||
UTF8PROC_COMPOSE);
|
||||
return retval;
|
||||
}
|
||||
|
||||
nc_utf8proc_uint8_t *nc_utf8proc_NFKD(const nc_utf8proc_uint8_t *str) {
|
||||
nc_utf8proc_uint8_t *nc_utf8proc_NFKD(const nc_utf8proc_uint8_t *str) {
|
||||
nc_utf8proc_uint8_t *retval;
|
||||
nc_utf8proc_map(str, 0, &retval, UTF8PROC_NULLTERM | UTF8PROC_STABLE |
|
||||
UTF8PROC_DECOMPOSE | UTF8PROC_COMPAT);
|
||||
return retval;
|
||||
}
|
||||
|
||||
nc_utf8proc_uint8_t *nc_utf8proc_NFKC(const nc_utf8proc_uint8_t *str) {
|
||||
nc_utf8proc_uint8_t *nc_utf8proc_NFKC(const nc_utf8proc_uint8_t *str) {
|
||||
nc_utf8proc_uint8_t *retval;
|
||||
nc_utf8proc_map(str, 0, &retval, UTF8PROC_NULLTERM | UTF8PROC_STABLE |
|
||||
UTF8PROC_COMPOSE | UTF8PROC_COMPAT);
|
||||
return retval;
|
||||
}
|
||||
|
||||
nc_utf8proc_uint8_t *nc_utf8proc_NFKC_Casefold(const nc_utf8proc_uint8_t *str) {
|
||||
nc_utf8proc_uint8_t *retval;
|
||||
nc_utf8proc_map(str, 0, &retval, UTF8PROC_NULLTERM | UTF8PROC_STABLE |
|
||||
UTF8PROC_COMPOSE | UTF8PROC_COMPAT | UTF8PROC_CASEFOLD | UTF8PROC_IGNORE);
|
||||
return retval;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015 Steven G. Johnson, Jiahao Chen, Peter Colberg, Tony Kelman, Scott P. Jones, and other contributors.
|
||||
* Copyright (c) 2014-2021 Steven G. Johnson, Jiahao Chen, Peter Colberg, Tony Kelman, Scott P. Jones, and other contributors.
|
||||
* Copyright (c) 2009 Public Software Group e. V., Berlin, Germany
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@ -27,8 +27,8 @@
|
||||
*
|
||||
* utf8proc is a free/open-source (MIT/expat licensed) C library
|
||||
* providing Unicode normalization, case-folding, and other operations
|
||||
* for strings in the UTF-8 encoding, supporting Unicode version
|
||||
* 8.0.0. See the utf8proc home page (http://julialang.org/utf8proc/)
|
||||
* for strings in the UTF-8 encoding, supporting up-to-date Unicode versions.
|
||||
* See the utf8proc home page (http://julialang.org/utf8proc/)
|
||||
* for downloads and other information, or the source code on github
|
||||
* (https://github.com/JuliaLang/utf8proc).
|
||||
*
|
||||
@ -36,16 +36,16 @@
|
||||
*
|
||||
* The features of utf8proc include:
|
||||
*
|
||||
* - Transformation of strings (@ref utf8proc_map) to:
|
||||
* - Transformation of strings (utf8proc_map()) to:
|
||||
* - decompose (@ref UTF8PROC_DECOMPOSE) or compose (@ref UTF8PROC_COMPOSE) Unicode combining characters (http://en.wikipedia.org/wiki/Combining_character)
|
||||
* - canonicalize Unicode compatibility characters (@ref UTF8PROC_COMPAT)
|
||||
* - strip "ignorable" (@ref UTF8PROC_IGNORE) characters, control characters (@ref UTF8PROC_STRIPCC), or combining characters such as accents (@ref UTF8PROC_STRIPMARK)
|
||||
* - case-folding (@ref UTF8PROC_CASEFOLD)
|
||||
* - Unicode normalization: @ref utf8proc_NFD, @ref utf8proc_NFC, @ref utf8proc_NFKD, @ref utf8proc_NFKC
|
||||
* - Detecting grapheme boundaries (@ref utf8proc_grapheme_break and @ref UTF8PROC_CHARBOUND)
|
||||
* - Character-width computation: @ref utf8proc_charwidth
|
||||
* - Classification of characters by Unicode category: @ref utf8proc_category and @ref utf8proc_category_string
|
||||
* - Encode (@ref utf8proc_encode_char) and decode (@ref utf8proc_iterate) Unicode codepoints to/from UTF-8.
|
||||
* - Unicode normalization: utf8proc_NFD(), utf8proc_NFC(), utf8proc_NFKD(), utf8proc_NFKC()
|
||||
* - Detecting grapheme boundaries (utf8proc_grapheme_break() and @ref UTF8PROC_CHARBOUND)
|
||||
* - Character-width computation: utf8proc_charwidth()
|
||||
* - Classification of characters by Unicode category: utf8proc_category() and utf8proc_category_string()
|
||||
* - Encode (utf8proc_encode_char()) and decode (utf8proc_iterate()) Unicode codepoints to/from UTF-8.
|
||||
*/
|
||||
|
||||
/** @file */
|
||||
@ -59,7 +59,7 @@
|
||||
* semantic-versioning rules (http://semver.org) based on API
|
||||
* compatibility.
|
||||
*
|
||||
* This is also returned at runtime by @ref utf8proc_version; however, the
|
||||
* This is also returned at runtime by utf8proc_version(); however, the
|
||||
* runtime version may append a string like "-dev" to the version number
|
||||
* for prerelease versions.
|
||||
*
|
||||
@ -71,7 +71,7 @@
|
||||
/** The MAJOR version number (increased when backwards API compatibility is broken). */
|
||||
#define UTF8PROC_VERSION_MAJOR 2
|
||||
/** The MINOR version number (increased when new functionality is added in a backwards-compatible manner). */
|
||||
#define UTF8PROC_VERSION_MINOR 1
|
||||
#define UTF8PROC_VERSION_MINOR 9
|
||||
/** The PATCH version (increased for fixes that do not change the API). */
|
||||
#define UTF8PROC_VERSION_PATCH 0
|
||||
/** @} */
|
||||
@ -80,7 +80,7 @@
|
||||
#include "ncexternl.h"
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1800
|
||||
/* MSVC prior to 2013 lacked stdbool.h and inttypes.h */
|
||||
// MSVC prior to 2013 lacked stdbool.h and stdint.h
|
||||
typedef signed char nc_utf8proc_int8_t;
|
||||
typedef unsigned char nc_utf8proc_uint8_t;
|
||||
typedef short nc_utf8proc_int16_t;
|
||||
@ -95,7 +95,7 @@ typedef int nc_utf8proc_ssize_t;
|
||||
typedef unsigned int nc_utf8proc_size_t;
|
||||
# endif
|
||||
# ifndef __cplusplus
|
||||
/* emulate C99 bool */
|
||||
// emulate C99 bool
|
||||
typedef unsigned char nc_utf8proc_bool;
|
||||
# ifndef __bool_true_false_are_defined
|
||||
# define false 0
|
||||
@ -108,7 +108,7 @@ typedef bool nc_utf8proc_bool;
|
||||
#else
|
||||
# include <stddef.h>
|
||||
# include <stdbool.h>
|
||||
# include <inttypes.h>
|
||||
# include <stdint.h>
|
||||
typedef int8_t nc_utf8proc_int8_t;
|
||||
typedef uint8_t nc_utf8proc_uint8_t;
|
||||
typedef int16_t nc_utf8proc_int16_t;
|
||||
@ -125,14 +125,6 @@ typedef bool nc_utf8proc_bool;
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef SSIZE_MAX
|
||||
#define SSIZE_MAX ((size_t)SIZE_MAX/2)
|
||||
#endif
|
||||
|
||||
#ifndef UINT16_MAX
|
||||
# define UINT16_MAX 65535U
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Option flags used by several functions in the library.
|
||||
*/
|
||||
@ -198,6 +190,10 @@ typedef enum {
|
||||
* @ref UTF8PROC_DECOMPOSE
|
||||
*/
|
||||
UTF8PROC_STRIPMARK = (1<<13),
|
||||
/**
|
||||
* Strip unassigned codepoints.
|
||||
*/
|
||||
UTF8PROC_STRIPNA = (1<<14),
|
||||
} nc_utf8proc_option_t;
|
||||
|
||||
/** @name Error codes
|
||||
@ -225,18 +221,18 @@ typedef nc_utf8proc_int16_t nc_utf8proc_propval_t;
|
||||
typedef struct nc_utf8proc_property_struct {
|
||||
/**
|
||||
* Unicode category.
|
||||
* @see utf8proc_category_t.
|
||||
* @see nc_utf8proc_category_t.
|
||||
*/
|
||||
nc_utf8proc_propval_t category;
|
||||
nc_utf8proc_propval_t combining_class;
|
||||
/**
|
||||
* Bidirectional class.
|
||||
* @see utf8proc_bidi_class_t.
|
||||
* @see nc_utf8proc_bidi_class_t.
|
||||
*/
|
||||
nc_utf8proc_propval_t bidi_class;
|
||||
/**
|
||||
* @anchor Decomposition type.
|
||||
* @see utf8proc_decomp_type_t.
|
||||
* @see nc_utf8proc_decomp_type_t.
|
||||
*/
|
||||
nc_utf8proc_propval_t decomp_type;
|
||||
nc_utf8proc_uint16_t decomp_seqindex;
|
||||
@ -250,7 +246,7 @@ typedef struct nc_utf8proc_property_struct {
|
||||
/**
|
||||
* Can this codepoint be ignored?
|
||||
*
|
||||
* Used by @ref utf8proc_decompose_char when @ref UTF8PROC_IGNORE is
|
||||
* Used by nc_utf8proc_decompose_char() when @ref UTF8PROC_IGNORE is
|
||||
* passed as an option.
|
||||
*/
|
||||
unsigned ignorable:1;
|
||||
@ -260,9 +256,10 @@ typedef struct nc_utf8proc_property_struct {
|
||||
unsigned pad:2;
|
||||
/**
|
||||
* Boundclass.
|
||||
* @see utf8proc_boundclass_t.
|
||||
* @see nc_utf8proc_boundclass_t.
|
||||
*/
|
||||
unsigned boundclass:8;
|
||||
unsigned boundclass:6;
|
||||
unsigned indic_conjunct_break:2;
|
||||
} nc_utf8proc_property_t;
|
||||
|
||||
/** Unicode categories. */
|
||||
@ -363,15 +360,31 @@ typedef enum {
|
||||
UTF8PROC_BOUNDCLASS_SPACINGMARK = 12, /**< Spacingmark */
|
||||
UTF8PROC_BOUNDCLASS_PREPEND = 13, /**< Prepend */
|
||||
UTF8PROC_BOUNDCLASS_ZWJ = 14, /**< Zero Width Joiner */
|
||||
|
||||
/* the following are no longer used in Unicode 11, but we keep
|
||||
the constants here for backward compatibility */
|
||||
UTF8PROC_BOUNDCLASS_E_BASE = 15, /**< Emoji Base */
|
||||
UTF8PROC_BOUNDCLASS_E_MODIFIER = 16, /**< Emoji Modifier */
|
||||
UTF8PROC_BOUNDCLASS_GLUE_AFTER_ZWJ = 17, /**< Glue_After_ZWJ */
|
||||
UTF8PROC_BOUNDCLASS_E_BASE_GAZ = 18, /**< E_BASE + GLUE_AFTER_ZJW */
|
||||
|
||||
/* the Extended_Pictographic property is used in the Unicode 11
|
||||
grapheme-boundary rules, so we store it in the boundclass field */
|
||||
UTF8PROC_BOUNDCLASS_EXTENDED_PICTOGRAPHIC = 19,
|
||||
UTF8PROC_BOUNDCLASS_E_ZWG = 20, /* UTF8PROC_BOUNDCLASS_EXTENDED_PICTOGRAPHIC + ZWJ */
|
||||
} nc_utf8proc_boundclass_t;
|
||||
|
||||
/** Indic_Conjunct_Break property. (TR44) */
|
||||
typedef enum {
|
||||
UTF8PROC_INDIC_CONJUNCT_BREAK_NONE = 0,
|
||||
UTF8PROC_INDIC_CONJUNCT_BREAK_LINKER = 1,
|
||||
UTF8PROC_INDIC_CONJUNCT_BREAK_CONSONANT = 2,
|
||||
UTF8PROC_INDIC_CONJUNCT_BREAK_EXTEND = 3,
|
||||
} nc_utf8proc_indic_conjunct_break_t;
|
||||
|
||||
/**
|
||||
* Function pointer type passed to @ref utf8proc_map_custom and
|
||||
* @ref utf8proc_decompose_custom, which is used to specify a user-defined
|
||||
* Function pointer type passed to nc_utf8proc_map_custom() and
|
||||
* nc_utf8proc_decompose_custom(), which is used to specify a user-defined
|
||||
* mapping of codepoints to be applied in conjunction with other mappings.
|
||||
*/
|
||||
typedef nc_utf8proc_int32_t (*nc_utf8proc_custom_func)(nc_utf8proc_int32_t codepoint, void *data);
|
||||
@ -380,7 +393,7 @@ typedef nc_utf8proc_int32_t (*nc_utf8proc_custom_func)(nc_utf8proc_int32_t codep
|
||||
* Array containing the byte lengths of a UTF-8 encoded codepoint based
|
||||
* on the first byte.
|
||||
*/
|
||||
/*const nc_utf8proc_int8_t nc_utf8proc_utf8class[256];*/
|
||||
extern const nc_utf8proc_int8_t nc_utf8proc_utf8class[256];
|
||||
|
||||
/**
|
||||
* Returns the utf8proc API version as a string MAJOR.MINOR.PATCH
|
||||
@ -389,9 +402,14 @@ typedef nc_utf8proc_int32_t (*nc_utf8proc_custom_func)(nc_utf8proc_int32_t codep
|
||||
*/
|
||||
const char *nc_utf8proc_version(void);
|
||||
|
||||
/**
|
||||
* Returns the utf8proc supported Unicode version as a string MAJOR.MINOR.PATCH.
|
||||
*/
|
||||
const char *nc_utf8proc_unicode_version(void);
|
||||
|
||||
/**
|
||||
* Returns an informative error string for the given utf8proc error code
|
||||
* (e.g. the error codes returned by @ref utf8proc_map).
|
||||
* (e.g. the error codes returned by nc_utf8proc_map()).
|
||||
*/
|
||||
const char *nc_utf8proc_errmsg(nc_utf8proc_ssize_t errcode);
|
||||
|
||||
@ -454,14 +472,16 @@ const nc_utf8proc_property_t *nc_utf8proc_get_property(nc_utf8proc_int32_t codep
|
||||
* - @ref UTF8PROC_CHARBOUND - insert 0xFF bytes before each grapheme cluster
|
||||
* - @ref UTF8PROC_LUMP - lump certain different codepoints together
|
||||
* - @ref UTF8PROC_STRIPMARK - remove all character marks
|
||||
* - @ref UTF8PROC_STRIPNA - remove unassigned codepoints
|
||||
* @param last_boundclass
|
||||
* Pointer to an integer variable containing
|
||||
* the previous codepoint's boundary class if the @ref UTF8PROC_CHARBOUND
|
||||
* option is used. Otherwise, this parameter is ignored.
|
||||
* the previous codepoint's (boundclass + indic_conjunct_break << 1) if the @ref UTF8PROC_CHARBOUND
|
||||
* option is used. If the string is being processed in order, this can be initialized to 0 for
|
||||
* the beginning of the string, and is thereafter updated automatically. Otherwise, this parameter is ignored.
|
||||
*
|
||||
* @return
|
||||
* In case of success, the number of codepoints written is returned; in case
|
||||
* of an error, a negative error code is returned (@ref utf8proc_errmsg).
|
||||
* of an error, a negative error code is returned (nc_utf8proc_errmsg()).
|
||||
* @par
|
||||
* If the number of written codepoints would be bigger than `bufsize`, the
|
||||
* required buffer size is returned, while the buffer will be overwritten with
|
||||
@ -473,7 +493,7 @@ nc_utf8proc_ssize_t nc_utf8proc_decompose_char(
|
||||
);
|
||||
|
||||
/**
|
||||
* The same as @ref utf8proc_decompose_char, but acts on a whole UTF-8
|
||||
* The same as nc_utf8proc_decompose_char(), but acts on a whole UTF-8
|
||||
* string and orders the decomposed sequences correctly.
|
||||
*
|
||||
* If the @ref UTF8PROC_NULLTERM flag in `options` is set, processing
|
||||
@ -482,8 +502,8 @@ nc_utf8proc_ssize_t nc_utf8proc_decompose_char(
|
||||
* codepoints) is written into the buffer being pointed to by
|
||||
* `buffer` (which must contain at least `bufsize` entries). In case of
|
||||
* success, the number of codepoints written is returned; in case of an
|
||||
* error, a negative error code is returned (@ref utf8proc_errmsg).
|
||||
* See @ref utf8proc_decompose_custom to supply additional transformations.
|
||||
* error, a negative error code is returned (nc_utf8proc_errmsg()).
|
||||
* See nc_utf8proc_decompose_custom() to supply additional transformations.
|
||||
*
|
||||
* If the number of written codepoints would be bigger than `bufsize`, the
|
||||
* required buffer size is returned, while the buffer will be overwritten with
|
||||
@ -495,10 +515,10 @@ nc_utf8proc_ssize_t nc_utf8proc_decompose(
|
||||
);
|
||||
|
||||
/**
|
||||
* The same as @ref utf8proc_decompose, but also takes a `custom_func` mapping function
|
||||
* The same as nc_utf8proc_decompose(), but also takes a `custom_func` mapping function
|
||||
* that is called on each codepoint in `str` before any other transformations
|
||||
* (along with a `custom_data` pointer that is passed through to `custom_func`).
|
||||
* The `custom_func` argument is ignored if it is `NULL`. See also @ref utf8proc_map_custom.
|
||||
* The `custom_func` argument is ignored if it is `NULL`. See also nc_utf8proc_map_custom().
|
||||
*/
|
||||
nc_utf8proc_ssize_t nc_utf8proc_decompose_custom(
|
||||
const nc_utf8proc_uint8_t *str, nc_utf8proc_ssize_t strlen,
|
||||
@ -524,7 +544,7 @@ nc_utf8proc_ssize_t nc_utf8proc_decompose_custom(
|
||||
*
|
||||
* @return
|
||||
* In case of success, the length (in codepoints) of the normalized UTF-32 string is
|
||||
* returned; otherwise, a negative error code is returned (@ref utf8proc_errmsg).
|
||||
* returned; otherwise, a negative error code is returned (nc_utf8proc_errmsg()).
|
||||
*
|
||||
* @warning The entries of the array pointed to by `str` have to be in the
|
||||
* range `0x0000` to `0x10FFFF`. Otherwise, the program might crash!
|
||||
@ -552,7 +572,7 @@ nc_utf8proc_ssize_t nc_utf8proc_normalize_utf32(nc_utf8proc_int32_t *buffer, nc_
|
||||
* @return
|
||||
* In case of success, the length (in bytes) of the resulting nul-terminated
|
||||
* UTF-8 string is returned; otherwise, a negative error code is returned
|
||||
* (@ref utf8proc_errmsg).
|
||||
* (nc_utf8proc_errmsg()).
|
||||
*
|
||||
* @warning The amount of free space pointed to by `buffer` must
|
||||
* exceed the amount of the input data by one byte, and the
|
||||
@ -565,6 +585,8 @@ nc_utf8proc_ssize_t nc_utf8proc_reencode(nc_utf8proc_int32_t *buffer, nc_utf8pro
|
||||
* Given a pair of consecutive codepoints, return whether a grapheme break is
|
||||
* permitted between them (as defined by the extended grapheme clusters in UAX#29).
|
||||
*
|
||||
* @param codepoint1 The first codepoint.
|
||||
* @param codepoint2 The second codepoint, occurring consecutively after `codepoint1`.
|
||||
* @param state Beginning with Version 29 (Unicode 9.0.0), this algorithm requires
|
||||
* state to break graphemes. This state can be passed in as a pointer
|
||||
* in the `state` argument and should initially be set to 0. If the
|
||||
@ -572,14 +594,15 @@ nc_utf8proc_ssize_t nc_utf8proc_reencode(nc_utf8proc_int32_t *buffer, nc_utf8pro
|
||||
* GB10/12/13 which require this state will not be applied, essentially
|
||||
* matching the rules in Unicode 8.0.0.
|
||||
*
|
||||
* @warning If the state parameter is used, `utf8proc_grapheme_break_stateful` must
|
||||
* be called IN ORDER on ALL potential breaks in a string.
|
||||
* @warning If the state parameter is used, `nc_utf8proc_grapheme_break_stateful` must
|
||||
* be called IN ORDER on ALL potential breaks in a string. However, it
|
||||
* is safe to reset the state to zero after a grapheme break.
|
||||
*/
|
||||
nc_utf8proc_bool nc_utf8proc_grapheme_break_stateful(
|
||||
nc_utf8proc_int32_t codepoint1, nc_utf8proc_int32_t codepoint2, nc_utf8proc_int32_t *state);
|
||||
|
||||
/**
|
||||
* Same as @ref utf8proc_grapheme_break_stateful, except without support for the
|
||||
* Same as nc_utf8proc_grapheme_break_stateful(), except without support for the
|
||||
* Unicode 9 additions to the algorithm. Supported for legacy reasons.
|
||||
*/
|
||||
nc_utf8proc_bool nc_utf8proc_grapheme_break(
|
||||
@ -607,6 +630,18 @@ nc_utf8proc_int32_t nc_utf8proc_toupper(nc_utf8proc_int32_t c);
|
||||
*/
|
||||
nc_utf8proc_int32_t nc_utf8proc_totitle(nc_utf8proc_int32_t c);
|
||||
|
||||
/**
|
||||
* Given a codepoint `c`, return `1` if the codepoint corresponds to a lower-case character
|
||||
* and `0` otherwise.
|
||||
*/
|
||||
int nc_utf8proc_islower(nc_utf8proc_int32_t c);
|
||||
|
||||
/**
|
||||
* Given a codepoint `c`, return `1` if the codepoint corresponds to an upper-case character
|
||||
* and `0` otherwise.
|
||||
*/
|
||||
int nc_utf8proc_isupper(nc_utf8proc_int32_t c);
|
||||
|
||||
/**
|
||||
* Given a codepoint, return a character width analogous to `wcwidth(codepoint)`,
|
||||
* except that a width of 0 is returned for non-printable codepoints
|
||||
@ -614,12 +649,12 @@ nc_utf8proc_int32_t nc_utf8proc_totitle(nc_utf8proc_int32_t c);
|
||||
*
|
||||
* @note
|
||||
* If you want to check for particular types of non-printable characters,
|
||||
* (analogous to `isprint` or `iscntrl`), use @ref utf8proc_category. */
|
||||
* (analogous to `isprint` or `iscntrl`), use nc_utf8proc_category(). */
|
||||
int nc_utf8proc_charwidth(nc_utf8proc_int32_t codepoint);
|
||||
|
||||
/**
|
||||
* Return the Unicode category for the codepoint (one of the
|
||||
* @ref utf8proc_category_t constants.)
|
||||
* @ref nc_utf8proc_category_t constants.)
|
||||
*/
|
||||
nc_utf8proc_category_t nc_utf8proc_category(nc_utf8proc_int32_t codepoint);
|
||||
|
||||
@ -640,7 +675,7 @@ const char *nc_utf8proc_category_string(nc_utf8proc_int32_t codepoint);
|
||||
* contain NULL characters with the string if `str` contained NULL
|
||||
* characters). Other flags in the `options` field are passed to the
|
||||
* functions defined above, and regarded as described. See also
|
||||
* @ref utfproc_map_custom to supply a custom codepoint transformation.
|
||||
* nc_utf8proc_map_custom() to supply a custom codepoint transformation.
|
||||
*
|
||||
* In case of success the length of the new string is returned,
|
||||
* otherwise a negative error code is returned.
|
||||
@ -653,7 +688,7 @@ nc_utf8proc_ssize_t nc_utf8proc_map(
|
||||
);
|
||||
|
||||
/**
|
||||
* Like @ref utf8proc_map, but also takes a `custom_func` mapping function
|
||||
* Like nc_utf8proc_map(), but also takes a `custom_func` mapping function
|
||||
* that is called on each codepoint in `str` before any other transformations
|
||||
* (along with a `custom_data` pointer that is passed through to `custom_func`).
|
||||
* The `custom_func` argument is ignored if it is `NULL`.
|
||||
@ -665,20 +700,25 @@ nc_utf8proc_ssize_t nc_utf8proc_map_custom(
|
||||
|
||||
/** @name Unicode normalization
|
||||
*
|
||||
* Returns a pointer to newly allocated memory of a NFD, NFC, NFKD or NFKC
|
||||
* normalized version of the null-terminated string `str`. These
|
||||
* are shortcuts to calling @ref utf8proc_map with @ref UTF8PROC_NULLTERM
|
||||
* Returns a pointer to newly allocated memory of a NFD, NFC, NFKD, NFKC or
|
||||
* NFKC_Casefold normalized version of the null-terminated string `str`. These
|
||||
* are shortcuts to calling nc_utf8proc_map() with @ref UTF8PROC_NULLTERM
|
||||
* combined with @ref UTF8PROC_STABLE and flags indicating the normalization.
|
||||
*/
|
||||
/** @{ */
|
||||
/** NFD normalization (@ref UTF8PROC_DECOMPOSE). */
|
||||
EXTERNL nc_utf8proc_uint8_t *nc_utf8proc_NFD(const nc_utf8proc_uint8_t *str);
|
||||
nc_utf8proc_uint8_t *nc_utf8proc_NFD(const nc_utf8proc_uint8_t *str);
|
||||
/** NFC normalization (@ref UTF8PROC_COMPOSE). */
|
||||
EXTERNL nc_utf8proc_uint8_t *nc_utf8proc_NFC(const nc_utf8proc_uint8_t *str);
|
||||
nc_utf8proc_uint8_t *nc_utf8proc_NFC(const nc_utf8proc_uint8_t *str);
|
||||
/** NFKD normalization (@ref UTF8PROC_DECOMPOSE and @ref UTF8PROC_COMPAT). */
|
||||
EXTERNL nc_utf8proc_uint8_t *nc_utf8proc_NFKD(const nc_utf8proc_uint8_t *str);
|
||||
nc_utf8proc_uint8_t *nc_utf8proc_NFKD(const nc_utf8proc_uint8_t *str);
|
||||
/** NFKC normalization (@ref UTF8PROC_COMPOSE and @ref UTF8PROC_COMPAT). */
|
||||
EXTERNL nc_utf8proc_uint8_t *nc_utf8proc_NFKC(const nc_utf8proc_uint8_t *str);
|
||||
nc_utf8proc_uint8_t *nc_utf8proc_NFKC(const nc_utf8proc_uint8_t *str);
|
||||
/**
|
||||
* NFKC_Casefold normalization (@ref UTF8PROC_COMPOSE and @ref UTF8PROC_COMPAT
|
||||
* and @ref UTF8PROC_CASEFOLD and @ref UTF8PROC_IGNORE).
|
||||
**/
|
||||
nc_utf8proc_uint8_t *nc_utf8proc_NFKC_Casefold(const nc_utf8proc_uint8_t *str);
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -5,12 +5,22 @@
|
||||
#
|
||||
# Ed Hartnett
|
||||
|
||||
# The source files for the HDF4 dispatch layer.
|
||||
SET(libhdf4_SOURCES hdf4dispatch.c hdf4file.c hdf4func.c hdf4var.c)
|
||||
|
||||
# Build the HDF4 dispatch layer as a library that will be included in
|
||||
# the netCDF library.
|
||||
add_library(netcdfhdf4 OBJECT ${libhdf4_SOURCES})
|
||||
|
||||
target_sources(netcdfhdf4
|
||||
PRIVATE
|
||||
hdf4dispatch.c
|
||||
hdf4file.c
|
||||
hdf4func.c
|
||||
hdf4var.c
|
||||
)
|
||||
|
||||
if (ENABLE_DLL)
|
||||
target_compile_definitions(netcdfhdf4 PRIVATE DLL_NETCDF DLL_EXPORT)
|
||||
endif()
|
||||
|
||||
# Remember to package this file for CMake builds.
|
||||
ADD_EXTRA_DIST(${libhdf4_SOURCES} CMakeLists.txt)
|
||||
|
@ -485,7 +485,7 @@ hdf4_read_var(NC_FILE_INFO_T *h5, int v)
|
||||
int32 sdsid;
|
||||
int contiguous;
|
||||
int d, a;
|
||||
int flag;
|
||||
int32 flag;
|
||||
char name[NC_MAX_HDF4_NAME+1];
|
||||
int xtype;
|
||||
char type_name[NC_MAX_NAME + 1];
|
||||
|
@ -5,23 +5,34 @@
|
||||
#
|
||||
# Ed Hartnett
|
||||
|
||||
# The source files for the HDF5 dispatch layer.
|
||||
SET(libnchdf5_SOURCES nc4hdf.c nc4info.c hdf5file.c hdf5attr.c
|
||||
hdf5dim.c hdf5grp.c hdf5type.c hdf5internal.c hdf5create.c hdf5open.c
|
||||
hdf5var.c nc4mem.c nc4memcb.c hdf5dispatch.c hdf5filter.c
|
||||
hdf5set_format_compatibility.c hdf5debug.c)
|
||||
|
||||
IF(ENABLE_BYTERANGE)
|
||||
SET(libnchdf5_SOURCES ${libnchdf5_SOURCES} H5FDhttp.c)
|
||||
ENDIF()
|
||||
|
||||
# Build the HDF5 dispatch layer as a library that will be included in
|
||||
# the netCDF library.
|
||||
add_library(netcdfhdf5 OBJECT ${libnchdf5_SOURCES})
|
||||
add_library(netcdfhdf5 OBJECT)
|
||||
|
||||
IF(STATUS_PARALLEL)
|
||||
# The source files for the HDF5 dispatch layer.
|
||||
target_sources(netcdfhdf5 PRIVATE
|
||||
nc4hdf.c nc4info.c hdf5file.c hdf5attr.c
|
||||
hdf5dim.c hdf5grp.c hdf5type.c hdf5internal.c hdf5create.c hdf5open.c
|
||||
hdf5var.c nc4mem.c nc4memcb.c hdf5dispatch.c hdf5filter.c
|
||||
hdf5set_format_compatibility.c hdf5debug.c
|
||||
)
|
||||
|
||||
if (ENABLE_DLL)
|
||||
target_compile_definitions(netcdfhdf5 PRIVATE DLL_NETCDF DLL_EXPORT)
|
||||
endif()
|
||||
|
||||
if(ENABLE_BYTERANGE)
|
||||
target_sources(netcdfhdf5 PRIVATE
|
||||
H5FDhttp.c
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
if(STATUS_PARALLEL)
|
||||
target_link_libraries(netcdfhdf5 PUBLIC MPI::MPI_C)
|
||||
ENDIF(STATUS_PARALLEL)
|
||||
endif(STATUS_PARALLEL)
|
||||
|
||||
target_link_libraries(netcdfhdf5 PUBLIC HDF5::HDF5)
|
||||
|
||||
# Remember to package this file for CMake builds.
|
||||
ADD_EXTRA_DIST(${libnchdf5_SOURCES} CMakeLists.txt)
|
||||
add_extra_dist(${libnchdf5_SOURCES} CMakeLists.txt)
|
||||
|
@ -27,8 +27,6 @@
|
||||
#ifndef H5FDHTTP_H
|
||||
#define H5FDHTTP_H
|
||||
|
||||
#define S3_REGION_DEFAULT "us-east-1"
|
||||
|
||||
#include "H5Ipublic.h"
|
||||
|
||||
#if H5_VERSION_GE(1,13,2)
|
||||
|
@ -890,7 +890,7 @@ nc4_open_file(const char *path, int mode, void* parameters, int ncid)
|
||||
const char* awsaccessid0 = NULL;
|
||||
const char* awssecretkey0 = NULL;
|
||||
const char* profile0 = NULL;
|
||||
int iss3 = NC_iss3(h5->uri);
|
||||
int iss3 = NC_iss3(h5->uri,NULL);
|
||||
|
||||
fa.version = H5FD_CURR_ROS3_FAPL_T_VERSION;
|
||||
fa.authenticate = (hbool_t)0;
|
||||
@ -915,7 +915,7 @@ nc4_open_file(const char *path, int mode, void* parameters, int ncid)
|
||||
if((retval = NC_s3profilelookup(profile0,AWS_SECRET_ACCESS_KEY,&awssecretkey0)))
|
||||
BAIL(retval);
|
||||
if(s3.region == NULL)
|
||||
s3.region = strdup(S3_REGION_DEFAULT);
|
||||
s3.region = strdup(AWS_GLOBAL_DEFAULT_REGION);
|
||||
if(awsaccessid0 == NULL || awssecretkey0 == NULL ) {
|
||||
/* default, non-authenticating, "anonymous" fapl configuration */
|
||||
fa.authenticate = (hbool_t)0;
|
||||
|
@ -4,222 +4,213 @@
|
||||
# University Corporation for Atmospheric Research/Unidata.
|
||||
|
||||
# See netcdf-c/COPYRIGHT file for more info.
|
||||
SET(liblib_LIBS dispatch netcdf3)
|
||||
|
||||
#####
|
||||
# Add target objects/modules based on options.
|
||||
#####
|
||||
target_sources(netcdf
|
||||
PRIVATE
|
||||
$<TARGET_OBJECTS:netcdf3>
|
||||
$<TARGET_OBJECTS:dispatch>
|
||||
)
|
||||
|
||||
IF(USE_NETCDF4)
|
||||
SET(liblib_LIBS ${liblib_LIBS} netcdf4)
|
||||
ENDIF()
|
||||
IF(USE_HDF5)
|
||||
SET(liblib_LIBS ${liblib_LIBS} netcdfhdf5)
|
||||
ENDIF()
|
||||
if(USE_NETCDF4)
|
||||
target_sources(netcdf
|
||||
PRIVATE
|
||||
$<TARGET_OBJECTS:netcdf4>
|
||||
)
|
||||
endif()
|
||||
|
||||
IF(USE_PNETCDF)
|
||||
SET(liblib_LIBS ${liblib_LIBS} netcdfp)
|
||||
ENDIF()
|
||||
if(USE_HDF5)
|
||||
target_sources(netcdf
|
||||
PRIVATE
|
||||
$<TARGET_OBJECTS:netcdfhdf5>
|
||||
)
|
||||
endif()
|
||||
|
||||
IF(USE_HDF4)
|
||||
SET(liblib_LIBS ${liblib_LIBS} netcdfhdf4)
|
||||
ENDIF()
|
||||
if(USE_PNETCDF)
|
||||
target_sources(netcdf
|
||||
PRIVATE
|
||||
$<TARGET_OBJECTS:netcdfp>
|
||||
)
|
||||
endif()
|
||||
|
||||
IF(ENABLE_DAP2)
|
||||
SET(liblib_LIBS ${liblib_LIBS} oc2 dap2)
|
||||
ENDIF()
|
||||
if(USE_HDF4)
|
||||
target_sources(netcdf
|
||||
PRIVATE
|
||||
$<TARGET_OBJECTS:netcdfhdf4>
|
||||
)
|
||||
endif()
|
||||
|
||||
IF(ENABLE_DAP4)
|
||||
SET(liblib_LIBS ${liblib_LIBS} dap4)
|
||||
SET(liblib_LIBS ${liblib_LIBS} ncxml)
|
||||
ENDIF()
|
||||
if(ENABLE_DAP2)
|
||||
target_sources(netcdf
|
||||
PRIVATE
|
||||
$<TARGET_OBJECTS:oc2>
|
||||
$<TARGET_OBJECTS:dap2>
|
||||
)
|
||||
endif()
|
||||
|
||||
IF(ENABLE_NCZARR)
|
||||
SET(liblib_LIBS ${liblib_LIBS} nczarr)
|
||||
ENDIF()
|
||||
if(ENABLE_DAP4)
|
||||
target_sources(netcdf
|
||||
PRIVATE
|
||||
$<TARGET_OBJECTS:dap4>
|
||||
$<TARGET_OBJECTS:ncxml>
|
||||
)
|
||||
endif()
|
||||
|
||||
IF(ENABLE_S3_INTERNAL)
|
||||
SET(liblib_LIBS ${liblib_LIBS} ncxml)
|
||||
ENDIF()
|
||||
if(ENABLE_NCZARR)
|
||||
target_sources(netcdf
|
||||
PRIVATE
|
||||
$<TARGET_OBJECTS:nczarr>
|
||||
)
|
||||
endif()
|
||||
|
||||
IF(ENABLE_PLUGINS)
|
||||
SET(liblib_LIBS ${liblib_LIBS} ncpoco)
|
||||
ENDIF()
|
||||
if(ENABLE_S3_INTERNAL)
|
||||
target_sources(netcdf
|
||||
PRIVATE
|
||||
$<TARGET_OBJECTS:ncxml>
|
||||
)
|
||||
endif()
|
||||
|
||||
FOREACH(LIBS ${liblib_LIBS})
|
||||
SET(LARGS ${LARGS} $<TARGET_OBJECTS:${LIBS}>)
|
||||
ENDFOREACH()
|
||||
if(ENABLE_PLUGINS)
|
||||
target_sources(netcdf
|
||||
PRIVATE
|
||||
$<TARGET_OBJECTS:ncpoco>
|
||||
)
|
||||
endif()
|
||||
|
||||
ADD_LIBRARY(netcdf nc_initialize.c ${LARGS} )
|
||||
target_sources(netcdf
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nc_initialize.c
|
||||
)
|
||||
|
||||
IF(STATUS_PARALLEL)
|
||||
# TODO: Make PUBLIC when other dependencies have PUBLIC/PRIVATE specified
|
||||
target_link_libraries(netcdf MPI::MPI_C)
|
||||
ENDIF(STATUS_PARALLEL)
|
||||
if(STATUS_PARALLEL)
|
||||
target_link_libraries(netcdf PUBLIC MPI::MPI_C)
|
||||
endif(STATUS_PARALLEL)
|
||||
|
||||
IF(TARGET MPI::MPI_C)
|
||||
target_link_libraries(netcdf MPI::MPI_C)
|
||||
ENDIF(TARGET MPI::MPI_C)
|
||||
|
||||
IF(MOD_NETCDF_NAME)
|
||||
SET_TARGET_PROPERTIES(netcdf PROPERTIES LIBRARY_OUTPUT_NAME ${NETCDF_LIB_NAME})
|
||||
SET_TARGET_PROPERTIES(netcdf PROPERTIES ARCHIVE_OUTPUT_NAME ${NETCDF_LIB_NAME})
|
||||
SET_TARGET_PROPERTIES(netcdf PROPERTIES RUNTIME_OUTPUT_NAME ${NETCDF_LIB_NAME})
|
||||
ENDIF()
|
||||
if(MOD_NETCDF_NAME)
|
||||
set_target_properties(netcdf
|
||||
PROPERTIES
|
||||
OUTPUT_NAME ${NETCDF_LIB_NAME}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Make sure that netcdf.dll path does not include the build configuration
|
||||
IF(MSVC)
|
||||
SET_TARGET_PROPERTIES(netcdf PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
ENDIF()
|
||||
#if(MSVC)
|
||||
# set_target_properties(netcdf PROPERTIES
|
||||
# RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
# RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
|
||||
# RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
#endif()
|
||||
|
||||
#####
|
||||
# Add dependencies required for linking.
|
||||
#####
|
||||
|
||||
SET(TLL_LIBS "")
|
||||
set(TLL_LIBS "")
|
||||
|
||||
SET(TLL_LIBS ${TLL_LIBS} ${HAVE_LIBM} ${ZLIB_LIBRARY})
|
||||
set(TLL_LIBS ${TLL_LIBS} ${HAVE_LIBM} ${ZLIB_LIBRARY})
|
||||
|
||||
# Add extra dependencies specified via NC_EXTRA_DEPS
|
||||
SET(TLL_LIBS ${TLL_LIBS} ${EXTRA_DEPS})
|
||||
set(TLL_LIBS ${TLL_LIBS} ${EXTRA_DEPS})
|
||||
|
||||
IF(ENABLE_NCZARR_ZIP)
|
||||
SET(TLL_LIBS ${TLL_LIBS} ${Zip_LIBRARIES})
|
||||
ENDIF()
|
||||
if(ENABLE_NCZARR_ZIP)
|
||||
set(TLL_LIBS ${TLL_LIBS} ${Zip_LIBRARIES})
|
||||
endif()
|
||||
|
||||
IF(Blosc_FOUND)
|
||||
SET(TLL_LIBS ${TLL_LIBS} ${Blosc_LIBRARIES})
|
||||
ENDIF()
|
||||
IF(Zstd_FOUND)
|
||||
SET(TLL_LIBS ${TLL_LIBS} ${Zstd_LIBRARIES})
|
||||
ENDIF()
|
||||
IF(Bz2_FOUND)
|
||||
SET(TLL_LIBS ${TLL_LIBS} ${Bz2_LIBRARIES})
|
||||
ENDIF()
|
||||
IF(SZIP_FOUND)
|
||||
SET(TLL_LIBS ${TLL_LIBS} ${Szip_LIBRARY})
|
||||
ENDIF()
|
||||
if(Blosc_FOUND)
|
||||
set(TLL_LIBS ${TLL_LIBS} ${Blosc_LIBRARIES})
|
||||
endif()
|
||||
if(Zstd_FOUND)
|
||||
set(TLL_LIBS ${TLL_LIBS} ${Zstd_LIBRARIES})
|
||||
endif()
|
||||
if(Bz2_FOUND)
|
||||
set(TLL_LIBS ${TLL_LIBS} ${Bz2_LIBRARIES})
|
||||
endif()
|
||||
if(SZIP_FOUND)
|
||||
set(TLL_LIBS ${TLL_LIBS} ${Szip_LIBRARY})
|
||||
endif()
|
||||
|
||||
IF(HAVE_LIBDL)
|
||||
SET(TLL_LIBS ${LIBDL} ${TLL_LIBS})
|
||||
ENDIF()
|
||||
if(HAVE_LIBDL)
|
||||
set(TLL_LIBS ${LIBDL} ${TLL_LIBS})
|
||||
endif()
|
||||
|
||||
IF(ENABLE_NCZARR_ZIP)
|
||||
SET(TLL_LIBS ${TLL_LIBS} ${Zip_LIBRARIES})
|
||||
ENDIF()
|
||||
if(ENABLE_NCZARR_ZIP)
|
||||
set(TLL_LIBS ${TLL_LIBS} ${Zip_LIBRARIES})
|
||||
endif()
|
||||
|
||||
IF(USE_HDF5)
|
||||
IF(NOT MSVC)
|
||||
# Some version of cmake define HDF5_hdf5_LIBRARY instead of
|
||||
# HDF5_LIBRARY. Same with HDF5_HL_LIBRARIES
|
||||
IF(HDF5_hdf5_LIBRARY AND NOT HDF5_C_LIBRARIES)
|
||||
SET(HDF5_C_LIBRARIES ${HDF5_hdf5_LIBRARY})
|
||||
ENDIF()
|
||||
IF(HDF5_hdf5_hl_LIBRARY AND NOT HDF5_HL_LIBRARIES)
|
||||
SET(HDF5_HL_LIBRARIES ${HDF5_hdf5_hl_LIBRARY})
|
||||
ENDIF()
|
||||
# The order of the libraries is important here for static
|
||||
# builds:
|
||||
# Make sure that HDF5_C_LIBRARY appears *after*
|
||||
# HDF5_HL_LIBRARY.
|
||||
SET(TLL_LIBS ${HDF5_HL_LIBRARIES} ${HDF5_C_LIBRARIES} ${HDF5_LIBRARIES} ${TLL_LIBS} ${Szip_LIBRARY})
|
||||
ELSE() # Windows CMake defines HDF5_LIBRARIES.
|
||||
SET(TLL_LIBS ${HDF5_LIBRARIES} ${TLL_LIBS} ${Szip_LIBRARY})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
if(USE_HDF5)
|
||||
set(TLL_LIBS HDF5::HDF5 hdf5::hdf5_hl ${TLL_LIBS} ${Szip_LIBRARY})
|
||||
endif()
|
||||
|
||||
IF(FOUND_CURL)
|
||||
SET(TLL_LIBS ${TLL_LIBS} ${CURL_LIBRARIES})
|
||||
ENDIF()
|
||||
if(FOUND_CURL)
|
||||
set(TLL_LIBS ${TLL_LIBS} ${CURL_LIBRARIES})
|
||||
endif()
|
||||
|
||||
IF(USE_HDF4)
|
||||
SET(TLL_LIBS ${HDF4_MFHDF_LIB} ${HDF4_DF_LIB} ${TLL_LIBS})
|
||||
ENDIF()
|
||||
if(USE_HDF4)
|
||||
set(TLL_LIBS ${HDF4_LIBRARIES} ${TLL_LIBS})
|
||||
endif()
|
||||
|
||||
IF(ENABLE_PNETCDF)
|
||||
if(ENABLE_PNETCDF)
|
||||
SET(TLL_LIBS ${TLL_LIBS} PNETCDF::PNETCDF)
|
||||
ENDIF()
|
||||
endif()
|
||||
|
||||
IF(ENABLE_S3)
|
||||
IF(ENABLE_S3_AWS)
|
||||
TARGET_LINK_DIRECTORIES(netcdf PUBLIC ${AWSSDK_LIB_DIR})
|
||||
SET(TLL_LIBS ${AWSSDK_LINK_LIBRARIES} ${TLL_LIBS})
|
||||
ELSEIF(ENABLE_S3_INTERNAL)
|
||||
IF(OPENSSL_FOUND)
|
||||
SET(TLL_LIBS ${OPENSSL_SSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES} ${TLL_LIBS})
|
||||
ENDIF(OPENSSL_FOUND)
|
||||
ENDIF(ENABLE_S3_AWS)
|
||||
ENDIF(ENABLE_S3)
|
||||
|
||||
IF(HAVE_LIBXML2)
|
||||
SET(TLL_LIBS ${TLL_LIBS} ${LIBXML2_LIBRARIES})
|
||||
ENDIF()
|
||||
if(ENABLE_S3)
|
||||
if(ENABLE_S3_AWS)
|
||||
target_link_directories(netcdf PUBLIC ${AWSSDK_LIB_DIR})
|
||||
set(TLL_LIBS ${AWSSDK_LINK_LIBRARIES} ${TLL_LIBS})
|
||||
elseif(ENABLE_S3_INTERNAL)
|
||||
if(OPENSSL_FOUND)
|
||||
set(TLL_LIBS ${OPENSSL_SSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES} ${TLL_LIBS})
|
||||
endif(OPENSSL_FOUND)
|
||||
endif(ENABLE_S3_AWS)
|
||||
endif(ENABLE_S3)
|
||||
|
||||
IF(NOT WIN32)
|
||||
IF(NOT APPLE)
|
||||
IF(CMAKE_DL_LIBS)
|
||||
TARGET_LINK_LIBRARIES(netcdf ${CMAKE_DL_LIBS})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
if(HAVE_LIBXML2)
|
||||
set(TLL_LIBS ${TLL_LIBS} ${LIBXML2_LIBRARIES})
|
||||
endif()
|
||||
|
||||
IF(TLL_LIBS)
|
||||
LIST(REMOVE_DUPLICATES TLL_LIBS)
|
||||
ENDIF()
|
||||
if(NOT WIN32)
|
||||
if(NOT APPLE)
|
||||
if(CMAKE_DL_LIBS)
|
||||
target_link_libraries(netcdf PRIVATE ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
TARGET_LINK_LIBRARIES(netcdf ${TLL_LIBS})
|
||||
if(TLL_LIBS)
|
||||
list(REMOVE_DUPLICATES TLL_LIBS)
|
||||
endif()
|
||||
|
||||
target_link_libraries(netcdf PRIVATE ${TLL_LIBS})
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${TLL_LIBS})
|
||||
if(MSVC)
|
||||
set_target_properties(netcdf PROPERTIES
|
||||
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${TLL_LIBS})
|
||||
IF(MSVC)
|
||||
SET_TARGET_PROPERTIES(netcdf PROPERTIES
|
||||
LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
|
||||
)
|
||||
ENDIF()
|
||||
endif()
|
||||
|
||||
IF(NOT MSVC)
|
||||
IF(BUILD_SHARED_LIBS)
|
||||
SET_TARGET_PROPERTIES(netcdf PROPERTIES LINK_FLAGS -shared)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(ENABLE_SHARED_LIBRARY_VERSION)
|
||||
SET_TARGET_PROPERTIES(netcdf PROPERTIES
|
||||
if(ENABLE_SHARED_LIBRARY_VERSION)
|
||||
set_target_properties(netcdf PROPERTIES
|
||||
VERSION ${netCDF_LIB_VERSION}
|
||||
SOVERSION ${netCDF_SO_VERSION}
|
||||
)
|
||||
ENDIF(ENABLE_SHARED_LIBRARY_VERSION)
|
||||
endif(ENABLE_SHARED_LIBRARY_VERSION)
|
||||
|
||||
###
|
||||
# The INCLUDES directive was introduced in 2.8.12.
|
||||
# However, 2.8.11 is still the default on some
|
||||
# popular linux distributions. See
|
||||
# https://github.com/Unidata/netcdf-c/issues/135
|
||||
# for more information.
|
||||
###
|
||||
IF(${CMAKE_VERSION} VERSION_LESS 2.8.12)
|
||||
INSTALL(
|
||||
TARGETS netcdf EXPORT netCDFTargets
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
ELSE()
|
||||
INSTALL(
|
||||
TARGETS netcdf EXPORT netCDFTargets
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
ENDIF()
|
||||
install(
|
||||
TARGETS netcdf EXPORT netCDFTargets
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
||||
SET(ALL_TLL_LIBS ${TLL_LIBS} PARENT_SCOPE)
|
||||
SET(NC_LIBS ${NC_LIBS} PARENT_SCOPE)
|
||||
set(ALL_TLL_LIBS ${TLL_LIBS} PARENT_SCOPE)
|
||||
set(NC_LIBS ${NC_LIBS} PARENT_SCOPE)
|
||||
|
||||
FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
|
||||
SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am)
|
||||
file(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
|
||||
set(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am)
|
||||
ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")
|
||||
|
@ -1,8 +1,15 @@
|
||||
SET(libncpoco_SOURCES ncpoco.c ncpoco.h)
|
||||
IF(MSVC)
|
||||
SET(libncpoco_SOURCES ${libncpoco_SOURCES} cp_win32.c)
|
||||
ELSE()
|
||||
SET(libncpoco_SOURCES ${libncpoco_SOURCES} cp_unix.c)
|
||||
ENDIF()
|
||||
set(libncpoco_SOURCES ncpoco.c ncpoco.h)
|
||||
|
||||
if(MSVC)
|
||||
set(libncpoco_SOURCES ${libncpoco_SOURCES} cp_win32.c)
|
||||
else()
|
||||
set(libncpoco_SOURCES ${libncpoco_SOURCES} cp_unix.c)
|
||||
endif()
|
||||
|
||||
add_library(ncpoco OBJECT ${libncpoco_SOURCES})
|
||||
ADD_EXTRA_DIST(${libncpoco_SOURCES} CMakeLists.txt)
|
||||
|
||||
if (ENABLE_DLL)
|
||||
target_compile_definitions(ncpoco PRIVATE DLL_NETCDF DLL_EXPORT)
|
||||
endif()
|
||||
|
||||
add_extra_dist(${libncpoco_SOURCES} CMakeLists.txt)
|
||||
|
@ -1,14 +1,26 @@
|
||||
IF(HAVE_LIBXML2)
|
||||
SET(libncxml_SOURCES ncxml_xml2.c)
|
||||
ELSE()
|
||||
SET(libncxml_SOURCES ncxml_tinyxml2.cpp tinyxml2.cpp tinyxml2.h)
|
||||
ENDIF()
|
||||
if(HAVE_LIBXML2)
|
||||
set(libncxml_SOURCES ncxml_xml2.c)
|
||||
else()
|
||||
set(libncxml_SOURCES ncxml_tinyxml2.cpp tinyxml2.cpp tinyxml2.h)
|
||||
endif()
|
||||
|
||||
add_library(ncxml OBJECT ${libncxml_SOURCES})
|
||||
TARGET_INCLUDE_DIRECTORIES(ncxml PUBLIC ./include)
|
||||
if(HAVE_LIBXML2)
|
||||
target_include_directories(ncxml
|
||||
PUBLIC
|
||||
./include
|
||||
PRIVATE
|
||||
${LIBXML2_INCLUDE_DIRS}
|
||||
)
|
||||
else()
|
||||
target_include_directories(ncxml
|
||||
PUBLIC
|
||||
./include
|
||||
)
|
||||
endif(HAVE_LIBXML2)
|
||||
|
||||
#IF(NOT MSVC)
|
||||
#target_compile_features(ncxml PUBLIC cxx_std_11)
|
||||
#ENDIF()
|
||||
if (ENABLE_DLL)
|
||||
target_compile_definitions(ncxml PRIVATE DLL_NETCDF DLL_EXPORT)
|
||||
endif()
|
||||
|
||||
ADD_EXTRA_DIST(CMakeLists.txt license.txt)
|
||||
add_extra_dist(CMakeLists.txt license.txt)
|
||||
|
@ -8,7 +8,7 @@
|
||||
#add_compile_options("/showincludes")
|
||||
|
||||
# The source files for the HDF5 dispatch layer.
|
||||
SET(libnczarr_SOURCES
|
||||
set(libnczarr_SOURCES
|
||||
zarr.c
|
||||
zattr.c
|
||||
zxcache.c
|
||||
@ -46,24 +46,32 @@ zfilter.h
|
||||
zdebug.h
|
||||
)
|
||||
|
||||
IF(ENABLE_NCZARR_ZIP)
|
||||
SET(libnczarr_SOURCES ${libnczarr_SOURCES} zmap_zip.c)
|
||||
ENDIF()
|
||||
if(ENABLE_NCZARR_ZIP)
|
||||
set(libnczarr_SOURCES ${libnczarr_SOURCES} zmap_zip.c)
|
||||
endif()
|
||||
|
||||
IF(ENABLE_S3)
|
||||
SET(libnczarr_SOURCES ${libnczarr_SOURCES} zmap_s3sdk.c)
|
||||
ENDIF()
|
||||
if(ENABLE_S3)
|
||||
set(libnczarr_SOURCES ${libnczarr_SOURCES} zmap_s3sdk.c)
|
||||
endif()
|
||||
|
||||
# Build the Zarr dispatch layer as a library that will be included in
|
||||
# the netCDF library.
|
||||
|
||||
add_library(nczarr OBJECT ${libnczarr_SOURCES})
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(nczarr PUBLIC ../libncpoco)
|
||||
target_include_directories(nczarr PUBLIC ../libncpoco)
|
||||
|
||||
IF(STATUS_PARALLEL)
|
||||
if (USE_HDF5)
|
||||
target_link_libraries(nczarr PRIVATE HDF5::HDF5)
|
||||
endif(USE_HDF5)
|
||||
|
||||
if(STATUS_PARALLEL)
|
||||
target_link_libraries(nczarr PUBLIC MPI::MPI_C)
|
||||
ENDIF(STATUS_PARALLEL)
|
||||
endif(STATUS_PARALLEL)
|
||||
|
||||
if (ENABLE_DLL)
|
||||
target_compile_definitions(nczarr PRIVATE DLL_NETCDF DLL_EXPORT)
|
||||
endif()
|
||||
|
||||
# Remember to package this file for CMake builds.
|
||||
ADD_EXTRA_DIST(${libnczarr_SOURCES} CMakeLists.txt)
|
||||
|
@ -5,7 +5,7 @@
|
||||
#ifndef ZDEBUG_H
|
||||
#define ZDEBUG_H
|
||||
|
||||
#define ZCATCH /* Warning: significant performance impact */
|
||||
#undef ZCATCH /* Warning: significant performance impact */
|
||||
#undef ZTRACING /* Warning: significant performance impact */
|
||||
|
||||
#undef ZDEBUG /* general debug */
|
||||
|
@ -255,8 +255,8 @@ zs3truncate(const char *s3url)
|
||||
ncuriparse(s3url,&url);
|
||||
if(url == NULL) {stat = NC_EURL; goto done;}
|
||||
if((stat=NC_s3urlprocess(url,&info,&purl))) goto done;
|
||||
if((s3client = NC_s3sdkcreateclient(&info))) {stat = NC_ES3; goto done;}
|
||||
if((stat = s3clear(s3client,info.bucket,purl->path))) goto done;
|
||||
if((s3client = NC_s3sdkcreateclient(&info))==NULL) {stat = NC_ES3; goto done;}
|
||||
if((stat = s3clear(s3client,info.bucket,info.rootkey))) goto done;
|
||||
done:
|
||||
if(s3client) {stat=NC_s3sdkclose(s3client,&info,1,NULL);}
|
||||
ncurifree(url);
|
||||
|
@ -1,7 +1,7 @@
|
||||
## This is a CMake file, part of Unidata's netCDF package.
|
||||
# Copyright 2012-2018, see the COPYRIGHT file for more information.
|
||||
|
||||
SET(libsrc_SOURCES v1hpg.c putget.c attr.c nc3dispatch.c
|
||||
set(libsrc_SOURCES v1hpg.c putget.c attr.c nc3dispatch.c
|
||||
nc3internal.c var.c dim.c ncx.c lookup3.c ncio.c)
|
||||
|
||||
##
|
||||
@ -18,73 +18,84 @@ set_property(SOURCE httpio.c posixio.c mmapio.c
|
||||
SKIP_UNITY_BUILD_INCLUSION ON)
|
||||
|
||||
# Process these files with m4.
|
||||
SET(m4_SOURCES attr ncx putget)
|
||||
set(m4_SOURCES attr ncx putget)
|
||||
foreach (f ${m4_SOURCES})
|
||||
GEN_m4(${f} dest)
|
||||
LIST(APPEND libsrc_SOURCES ${dest})
|
||||
list(APPEND libsrc_SOURCES ${dest})
|
||||
endforeach(f)
|
||||
|
||||
LIST(APPEND libsrc_SOURCES pstdint.h ncio.h ncx.h)
|
||||
list(APPEND libsrc_SOURCES pstdint.h ncio.h ncx.h)
|
||||
|
||||
LIST(APPEND libsrc_SOURCES memio.c)
|
||||
list(APPEND libsrc_SOURCES memio.c)
|
||||
|
||||
IF (BUILD_MMAP)
|
||||
LIST(APPEND libsrc_SOURCES mmapio.c)
|
||||
ENDIF( BUILD_MMAP)
|
||||
if (BUILD_MMAP)
|
||||
list(APPEND libsrc_SOURCES mmapio.c)
|
||||
endif( BUILD_MMAP)
|
||||
|
||||
IF (USE_FFIO)
|
||||
LIST(APPEND libsrc_SOURCES ffio.c)
|
||||
ELSEIF (USE_STDIO)
|
||||
if (USE_FFIO)
|
||||
list(APPEND libsrc_SOURCES ffio.c)
|
||||
elseif (USE_STDIO)
|
||||
IST(APPEND libsrc_SOURCES ncstdio.c)
|
||||
ELSE (USE_FFIO)
|
||||
LIST(APPEND libsrc_SOURCES posixio.c)
|
||||
ENDIF (USE_FFIO)
|
||||
else (USE_FFIO)
|
||||
list(APPEND libsrc_SOURCES posixio.c)
|
||||
ENDif (USE_FFIO)
|
||||
|
||||
IF (ENABLE_BYTERANGE)
|
||||
LIST(APPEND libsrc_SOURCES httpio.c)
|
||||
IF (ENABLE_S3)
|
||||
LIST(APPEND libsrc_SOURCES s3io.c)
|
||||
ENDIF(ENABLE_S3)
|
||||
ENDIF(ENABLE_BYTERANGE)
|
||||
if (ENABLE_BYTERANGE)
|
||||
list(APPEND libsrc_SOURCES httpio.c)
|
||||
if (ENABLE_S3)
|
||||
list(APPEND libsrc_SOURCES s3io.c)
|
||||
endif(ENABLE_S3)
|
||||
endif(ENABLE_BYTERANGE)
|
||||
|
||||
add_library(netcdf3 OBJECT ${libsrc_SOURCES})
|
||||
|
||||
IF(STATUS_PARALLEL)
|
||||
if (ENABLE_DLL)
|
||||
target_compile_definitions(netcdf3 PRIVATE DLL_NETCDF DLL_EXPORT)
|
||||
endif()
|
||||
|
||||
if (ENABLE_BYTERANGE)
|
||||
target_include_directories(netcdf3 PUBLIC ${CURL_INCLUDE_DIRS})
|
||||
target_compile_options(netcdf3
|
||||
PRIVATE
|
||||
-DCURL_STATICLIB=1
|
||||
)
|
||||
endif (ENABLE_BYTERANGE)
|
||||
|
||||
if(STATUS_PARALLEL)
|
||||
target_link_libraries(netcdf3 PUBLIC MPI::MPI_C)
|
||||
ENDIF(STATUS_PARALLEL)
|
||||
endif(STATUS_PARALLEL)
|
||||
|
||||
# The C API man page.
|
||||
|
||||
SET(MAN_FILES netcdf.3)
|
||||
set(MAN_FILES netcdf.3)
|
||||
|
||||
set(ARGS_MANPAGE -DAPI=C)
|
||||
|
||||
IF (USE_HDF5)
|
||||
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DNETCDF4=TRUE)
|
||||
ENDIF(USE_HDF5)
|
||||
if (USE_HDF5)
|
||||
set(ARGS_MANPAGE ${ARGS_MANPAGE} -DNETCDF4=TRUE)
|
||||
endif(USE_HDF5)
|
||||
|
||||
IF (BUILD_DAP)
|
||||
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DDAP=TRUE)
|
||||
ENDIF(BUILD_DAP)
|
||||
if (BUILD_DAP)
|
||||
set(ARGS_MANPAGE ${ARGS_MANPAGE} -DDAP=TRUE)
|
||||
endif(BUILD_DAP)
|
||||
|
||||
IF (BUILD_PARALLEL)
|
||||
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DPARALLEL_IO=TRUE)
|
||||
ENDIF(BUILD_PARALLEL)
|
||||
if (BUILD_PARALLEL)
|
||||
set(ARGS_MANPAGE ${ARGS_MANPAGE} -DPARALLEL_IO=TRUE)
|
||||
endif(BUILD_PARALLEL)
|
||||
|
||||
# Generate the man page.
|
||||
IF(HAVE_M4)
|
||||
if(HAVE_M4)
|
||||
|
||||
FILE(GLOB libsrc_MANPAGE ${CMAKE_CURRENT_SOURCE_DIR}/../docs/netcdf.m4)
|
||||
FILE(COPY ${libsrc_MANPAGE} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
file(GLOB libsrc_MANPAGE ${CMAKE_CURRENT_SOURCE_DIR}/../docs/netcdf.m4)
|
||||
file(COPY ${libsrc_MANPAGE} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
IF(NOT MSVC)
|
||||
ADD_CUSTOM_TARGET(manpage ALL
|
||||
|
||||
COMMAND ${NC_M4} ${ARGS_MANPAGE} "${CMAKE_CURRENT_BINARY_DIR}/netcdf.m4" > "${CMAKE_CURRENT_BINARY_DIR}/netcdf.3"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
if(NOT MSVC)
|
||||
add_custom_target(manpage ALL
|
||||
COMMAND ${NC_M4} ${ARGS_MANPAGE} "${CMAKE_CURRENT_BINARY_DIR}/netcdf.m4" > "${CMAKE_CURRENT_BINARY_DIR}/netcdf.3"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
)
|
||||
|
||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/netcdf.3" DESTINATION "share/man/man3" COMPONENT documentation)
|
||||
ENDIF(NOT MSVC)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/netcdf.3" DESTINATION "share/man/man3" COMPONENT documentation)
|
||||
endif(NOT MSVC)
|
||||
|
||||
ENDIF()
|
||||
endif()
|
@ -46,7 +46,7 @@
|
||||
typedef struct NCHTTP {
|
||||
NC_HTTP_STATE* state;
|
||||
long long size; /* of the object */
|
||||
NCbytes* region;
|
||||
NCbytes* interval;
|
||||
} NCHTTP;
|
||||
|
||||
/* Forward */
|
||||
@ -100,8 +100,8 @@ done:
|
||||
|
||||
fail:
|
||||
if(http != NULL) {
|
||||
if(http->region)
|
||||
ncbytesfree(http->region);
|
||||
if(http->interval)
|
||||
ncbytesfree(http->interval);
|
||||
free(http);
|
||||
}
|
||||
if(nciop != NULL) {
|
||||
@ -237,7 +237,7 @@ httpio_close(ncio* nciop, int doUnlink)
|
||||
|
||||
/* do cleanup */
|
||||
if(http != NULL) {
|
||||
ncbytesfree(http->region);
|
||||
ncbytesfree(http->interval);
|
||||
free(http);
|
||||
}
|
||||
if(nciop->path != NULL) free((char*)nciop->path);
|
||||
@ -246,7 +246,7 @@ httpio_close(ncio* nciop, int doUnlink)
|
||||
}
|
||||
|
||||
/*
|
||||
* Request that the region (offset, extent)
|
||||
* Request that the interval (offset, extent)
|
||||
* be made available through *vpp.
|
||||
*/
|
||||
static int
|
||||
@ -258,13 +258,13 @@ httpio_get(ncio* const nciop, off_t offset, size_t extent, int rflags, void** co
|
||||
if(nciop == NULL || nciop->pvt == NULL) {status = NC_EINVAL; goto done;}
|
||||
http = (NCHTTP*)nciop->pvt;
|
||||
|
||||
assert(http->region == NULL);
|
||||
http->region = ncbytesnew();
|
||||
ncbytessetalloc(http->region,(unsigned long)extent);
|
||||
if((status = nc_http_read(http->state,offset,extent,http->region)))
|
||||
assert(http->interval == NULL);
|
||||
http->interval = ncbytesnew();
|
||||
ncbytessetalloc(http->interval,(unsigned long)extent);
|
||||
if((status = nc_http_read(http->state,offset,extent,http->interval)))
|
||||
goto done;
|
||||
assert(ncbyteslength(http->region) == extent);
|
||||
if(vpp) *vpp = ncbytescontents(http->region);
|
||||
assert(ncbyteslength(http->interval) == extent);
|
||||
if(vpp) *vpp = ncbytescontents(http->interval);
|
||||
done:
|
||||
return status;
|
||||
}
|
||||
@ -286,8 +286,8 @@ httpio_rel(ncio* const nciop, off_t offset, int rflags)
|
||||
|
||||
if(nciop == NULL || nciop->pvt == NULL) {status = NC_EINVAL; goto done;}
|
||||
http = (NCHTTP*)nciop->pvt;
|
||||
ncbytesfree(http->region);
|
||||
http->region = NULL;
|
||||
ncbytesfree(http->interval);
|
||||
http->interval = NULL;
|
||||
done:
|
||||
return status;
|
||||
}
|
||||
|
@ -6,18 +6,22 @@
|
||||
# See netcdf-c/COPYRIGHT file for more info.
|
||||
# Process these files with m4.
|
||||
|
||||
SET(libsrc4_SOURCES nc4dispatch.c nc4attr.c nc4dim.c nc4grp.c
|
||||
set(libsrc4_SOURCES nc4dispatch.c nc4attr.c nc4dim.c nc4grp.c
|
||||
nc4internal.c nc4type.c nc4var.c ncfunc.c ncindex.c nc4cache.c)
|
||||
|
||||
add_library(netcdf4 OBJECT ${libsrc4_SOURCES})
|
||||
|
||||
IF(STATUS_PARALLEL)
|
||||
target_link_libraries(netcdf4 PUBLIC MPI::MPI_C)
|
||||
ENDIF(STATUS_PARALLEL)
|
||||
if (ENABLE_DLL)
|
||||
target_compile_definitions(netcdf4 PRIVATE DLL_NETCDF DLL_EXPORT)
|
||||
endif()
|
||||
|
||||
if(STATUS_PARALLEL)
|
||||
target_link_libraries(netcdf4 PUBLIC MPI::MPI_C)
|
||||
endif(STATUS_PARALLEL)
|
||||
|
||||
# Files for make dist
|
||||
FILE(GLOB libsrc4_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
|
||||
SET(CUR_EXTRA_DIST CMakeLists.txt Makefile.am)
|
||||
file(GLOB libsrc4_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
|
||||
set(CUR_EXTRA_DIST CMakeLists.txt Makefile.am)
|
||||
ADD_EXTRA_DIST("${libsrc4_SOURCES}")
|
||||
ADD_EXTRA_DIST("${libsrc4_HEADERS}")
|
||||
ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")
|
||||
@ -34,14 +38,15 @@ set(man_MANS netcdf.3)
|
||||
|
||||
set(ARGS_MANPAGE -DAPI=C)
|
||||
|
||||
IF (USE_HDF5)
|
||||
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DNETCDF4=TRUE)
|
||||
ENDIF(USE_HDF5)
|
||||
if (USE_HDF5)
|
||||
set(ARGS_MANPAGE ${ARGS_MANPAGE} -DNETCDF4=TRUE)
|
||||
target_link_libraries(netcdf4 PRIVATE HDF5::HDF5)
|
||||
endif(USE_HDF5)
|
||||
|
||||
IF (BUILD_DAP)
|
||||
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DDAP=TRUE)
|
||||
ENDIF(BUILD_DAP)
|
||||
if (BUILD_DAP)
|
||||
set(ARGS_MANPAGE ${ARGS_MANPAGE} -DDAP=TRUE)
|
||||
endif(BUILD_DAP)
|
||||
|
||||
IF (BUILD_PARALLEL)
|
||||
SET(ARGS_MANPAGE ${ARGS_MANPAGE} -DPARALLEL_IO=TRUE)
|
||||
ENDIF(BUILD_PARALLEL)
|
||||
if (BUILD_PARALLEL)
|
||||
set(ARGS_MANPAGE ${ARGS_MANPAGE} -DPARALLEL_IO=TRUE)
|
||||
endif(BUILD_PARALLEL)
|
||||
|
@ -2109,8 +2109,15 @@ NC_freeglobalstate(void)
|
||||
nullfree(nc_globalstate->tempdir);
|
||||
nullfree(nc_globalstate->home);
|
||||
nullfree(nc_globalstate->cwd);
|
||||
NC_rcclear(nc_globalstate->rcinfo);
|
||||
free(nc_globalstate->rcinfo);
|
||||
nullfree(nc_globalstate->aws.default_region);
|
||||
nullfree(nc_globalstate->aws.config_file);
|
||||
nullfree(nc_globalstate->aws.profile);
|
||||
nullfree(nc_globalstate->aws.access_key_id);
|
||||
nullfree(nc_globalstate->aws.secret_access_key);
|
||||
if(nc_globalstate->rcinfo) {
|
||||
NC_rcclear(nc_globalstate->rcinfo);
|
||||
free(nc_globalstate->rcinfo);
|
||||
}
|
||||
free(nc_globalstate);
|
||||
nc_globalstate = NULL;
|
||||
}
|
||||
|
@ -5,9 +5,13 @@
|
||||
|
||||
# See netcdf-c/COPYRIGHT file for more info.
|
||||
|
||||
SET(libsrcp_SOURCES ncpdispatch.c)
|
||||
|
||||
add_library(netcdfp OBJECT ${libsrcp_SOURCES})
|
||||
target_link_libraries(netcdfp PUBLIC PNETCDF::PNETCDF)
|
||||
|
||||
ADD_EXTRA_DIST(${libsrcp_SOURCES} CMakeLists.txt)
|
||||
target_sources(netcdfp PRIVATE ncpdispatch.c)
|
||||
|
||||
if (ENABLE_DLL)
|
||||
target_compile_definitions(netcdfp PRIVATE DLL_NETCDF DLL_EXPORT)
|
||||
endif()
|
||||
|
||||
add_extra_dist(${libsrcp_SOURCES} CMakeLists.txt)
|
||||
|
@ -1,23 +1,23 @@
|
||||
netcdf OR_ABI-L1b-RadC-M3C13_G16_s20170590337505_e20170590340289_c20170590340316 {
|
||||
netcdf OR_ABI-L1b-RadF-M6C01_G16_s20220011800205_e20220011809513_c20220011809562 {
|
||||
dimensions:
|
||||
y = 1500 ;
|
||||
x = 2500 ;
|
||||
y = 10848 ;
|
||||
x = 10848 ;
|
||||
number_of_time_bounds = 2 ;
|
||||
band = 1 ;
|
||||
number_of_image_bounds = 2 ;
|
||||
num_star_looks = 24 ;
|
||||
variables:
|
||||
short Rad(y, x) ;
|
||||
Rad:_FillValue = 4095s ;
|
||||
Rad:_FillValue = 1023s ;
|
||||
Rad:long_name = "ABI L1b Radiances" ;
|
||||
Rad:standard_name = "toa_outgoing_radiance_per_unit_wavenumber" ;
|
||||
Rad:standard_name = "toa_outgoing_radiance_per_unit_wavelength" ;
|
||||
Rad:_Unsigned = "true" ;
|
||||
Rad:sensor_band_bit_depth = 12b ;
|
||||
Rad:valid_range = 0s, 4094s ;
|
||||
Rad:scale_factor = 0.04572892f ;
|
||||
Rad:add_offset = -1.6443f ;
|
||||
Rad:units = "mW m-2 sr-1 (cm-1)-1" ;
|
||||
Rad:resolution = "y: 0.000056 rad x: 0.000056 rad" ;
|
||||
Rad:sensor_band_bit_depth = 10b ;
|
||||
Rad:valid_range = 0s, 1022s ;
|
||||
Rad:scale_factor = 0.8121064f ;
|
||||
Rad:add_offset = -25.93665f ;
|
||||
Rad:units = "W m-2 sr-1 um-1" ;
|
||||
Rad:resolution = "y: 0.000028 rad x: 0.000028 rad" ;
|
||||
Rad:coordinates = "band_id band_wavelength t y x" ;
|
||||
Rad:grid_mapping = "goes_imager_projection" ;
|
||||
Rad:cell_methods = "t: point area: point" ;
|
||||
@ -27,18 +27,19 @@ variables:
|
||||
DQF:long_name = "ABI L1b Radiances data quality flags" ;
|
||||
DQF:standard_name = "status_flag" ;
|
||||
DQF:_Unsigned = "true" ;
|
||||
DQF:valid_range = 0b, 3b ;
|
||||
DQF:valid_range = 0b, 4b ;
|
||||
DQF:units = "1" ;
|
||||
DQF:coordinates = "band_id band_wavelength t y x" ;
|
||||
DQF:grid_mapping = "goes_imager_projection" ;
|
||||
DQF:cell_methods = "t: point area: point" ;
|
||||
DQF:flag_values = 0b, 1b, 2b, 3b ;
|
||||
DQF:flag_meanings = "good_pixel_qf conditionally_usable_pixel_qf out_of_range_pixel_qf no_value_pixel_qf" ;
|
||||
DQF:number_of_qf_values = 4b ;
|
||||
DQF:percent_good_pixel_qf = 1.f ;
|
||||
DQF:percent_conditionally_usable_pixel_qf = 0.f ;
|
||||
DQF:percent_out_of_range_pixel_qf = 0.f ;
|
||||
DQF:percent_no_value_pixel_qf = 0.f ;
|
||||
DQF:flag_values = 0b, 1b, 2b, 3b, 4b ;
|
||||
DQF:flag_meanings = "good_pixel_qf conditionally_usable_pixel_qf out_of_range_pixel_qf no_value_pixel_qf focal_plane_temperature_threshold_exceeded_qf" ;
|
||||
DQF:number_of_qf_values = 5b ;
|
||||
DQF:percent_good_pixel_qf = 0.998999f ;
|
||||
DQF:percent_conditionally_usable_pixel_qf = 5.e-07f ;
|
||||
DQF:percent_out_of_range_pixel_qf = 0.0009925f ;
|
||||
DQF:percent_no_value_pixel_qf = 8.e-06f ;
|
||||
DQF:percent_focal_plane_temperature_threshold_exceeded_qf = 0.f ;
|
||||
double t ;
|
||||
t:long_name = "J2000 epoch mid-point between the start and end image scan in seconds" ;
|
||||
t:standard_name = "time" ;
|
||||
@ -46,15 +47,15 @@ variables:
|
||||
t:axis = "T" ;
|
||||
t:bounds = "time_bounds" ;
|
||||
short y(y) ;
|
||||
y:scale_factor = -5.6e-05f ;
|
||||
y:add_offset = 0.126532f ;
|
||||
y:scale_factor = -2.8e-05f ;
|
||||
y:add_offset = 0.151858f ;
|
||||
y:units = "rad" ;
|
||||
y:axis = "Y" ;
|
||||
y:long_name = "GOES fixed grid projection y-coordinate" ;
|
||||
y:standard_name = "projection_y_coordinate" ;
|
||||
short x(x) ;
|
||||
x:scale_factor = 5.6e-05f ;
|
||||
x:add_offset = -0.075012f ;
|
||||
x:scale_factor = 2.8e-05f ;
|
||||
x:add_offset = -0.151858f ;
|
||||
x:units = "rad" ;
|
||||
x:axis = "X" ;
|
||||
x:long_name = "GOES fixed grid projection x-coordinate" ;
|
||||
@ -69,7 +70,7 @@ variables:
|
||||
goes_imager_projection:semi_minor_axis = 6356752.31414 ;
|
||||
goes_imager_projection:inverse_flattening = 298.2572221 ;
|
||||
goes_imager_projection:latitude_of_projection_origin = 0. ;
|
||||
goes_imager_projection:longitude_of_projection_origin = -89.5 ;
|
||||
goes_imager_projection:longitude_of_projection_origin = -75. ;
|
||||
goes_imager_projection:sweep_angle_axis = "x" ;
|
||||
float y_image ;
|
||||
y_image:long_name = "GOES-R fixed grid projection y-coordinate center of image" ;
|
||||
@ -78,6 +79,7 @@ variables:
|
||||
y_image:axis = "Y" ;
|
||||
float y_image_bounds(number_of_image_bounds) ;
|
||||
y_image_bounds:long_name = "GOES-R fixed grid projection y-coordinate north/south extent of image" ;
|
||||
y_image_bounds:units = "rad" ;
|
||||
float x_image ;
|
||||
x_image:long_name = "GOES-R fixed grid projection x-coordinate center of image" ;
|
||||
x_image:standard_name = "projection_x_coordinate" ;
|
||||
@ -85,6 +87,7 @@ variables:
|
||||
x_image:axis = "X" ;
|
||||
float x_image_bounds(number_of_image_bounds) ;
|
||||
x_image_bounds:long_name = "GOES-R fixed grid projection x-coordinate west/east extent of image" ;
|
||||
x_image_bounds:units = "rad" ;
|
||||
float nominal_satellite_subpoint_lat ;
|
||||
nominal_satellite_subpoint_lat:long_name = "nominal satellite subpoint latitude (platform latitude)" ;
|
||||
nominal_satellite_subpoint_lat:standard_name = "latitude" ;
|
||||
@ -102,14 +105,14 @@ variables:
|
||||
nominal_satellite_height:units = "km" ;
|
||||
float geospatial_lat_lon_extent ;
|
||||
geospatial_lat_lon_extent:long_name = "geospatial latitude and longitude references" ;
|
||||
geospatial_lat_lon_extent:geospatial_westbound_longitude = -140.6163f ;
|
||||
geospatial_lat_lon_extent:geospatial_northbound_latitude = 52.76771f ;
|
||||
geospatial_lat_lon_extent:geospatial_eastbound_longitude = -49.17929f ;
|
||||
geospatial_lat_lon_extent:geospatial_southbound_latitude = 14.00016f ;
|
||||
geospatial_lat_lon_extent:geospatial_lat_center = 29.294f ;
|
||||
geospatial_lat_lon_extent:geospatial_lon_center = -91.406f ;
|
||||
geospatial_lat_lon_extent:geospatial_westbound_longitude = -156.2995f ;
|
||||
geospatial_lat_lon_extent:geospatial_northbound_latitude = 81.3282f ;
|
||||
geospatial_lat_lon_extent:geospatial_eastbound_longitude = 6.2995f ;
|
||||
geospatial_lat_lon_extent:geospatial_southbound_latitude = -81.3282f ;
|
||||
geospatial_lat_lon_extent:geospatial_lat_center = 0.f ;
|
||||
geospatial_lat_lon_extent:geospatial_lon_center = -75.f ;
|
||||
geospatial_lat_lon_extent:geospatial_lat_nadir = 0.f ;
|
||||
geospatial_lat_lon_extent:geospatial_lon_nadir = -89.5f ;
|
||||
geospatial_lat_lon_extent:geospatial_lon_nadir = -75.f ;
|
||||
geospatial_lat_lon_extent:geospatial_lat_units = "degrees_north" ;
|
||||
geospatial_lat_lon_extent:geospatial_lon_units = "degrees_east" ;
|
||||
byte yaw_flip_flag ;
|
||||
@ -119,7 +122,7 @@ variables:
|
||||
yaw_flip_flag:valid_range = 0b, 1b ;
|
||||
yaw_flip_flag:units = "1" ;
|
||||
yaw_flip_flag:coordinates = "t" ;
|
||||
yaw_flip_flag:flag_values = "0 1" ;
|
||||
yaw_flip_flag:flag_values = 0b, 1b ;
|
||||
yaw_flip_flag:flag_meanings = "false true" ;
|
||||
byte band_id(band) ;
|
||||
band_id:long_name = "ABI band number" ;
|
||||
@ -168,63 +171,85 @@ variables:
|
||||
valid_pixel_count:units = "count" ;
|
||||
valid_pixel_count:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
valid_pixel_count:grid_mapping = "goes_imager_projection" ;
|
||||
valid_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000056 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
valid_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000028 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
int missing_pixel_count ;
|
||||
missing_pixel_count:long_name = "number of missing pixels" ;
|
||||
missing_pixel_count:_FillValue = -1 ;
|
||||
missing_pixel_count:units = "count" ;
|
||||
missing_pixel_count:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
missing_pixel_count:grid_mapping = "goes_imager_projection" ;
|
||||
missing_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000056 rad comment: missing ABI fixed grid pixels only)" ;
|
||||
missing_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000028 rad comment: missing ABI fixed grid pixels only)" ;
|
||||
int saturated_pixel_count ;
|
||||
saturated_pixel_count:long_name = "number of saturated pixels" ;
|
||||
saturated_pixel_count:_FillValue = -1 ;
|
||||
saturated_pixel_count:units = "count" ;
|
||||
saturated_pixel_count:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
saturated_pixel_count:grid_mapping = "goes_imager_projection" ;
|
||||
saturated_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000056 rad comment: radiometrically saturated geolocated/not missing pixels only)" ;
|
||||
saturated_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000028 rad comment: radiometrically saturated geolocated/not missing pixels only)" ;
|
||||
int undersaturated_pixel_count ;
|
||||
undersaturated_pixel_count:long_name = "number of undersaturated pixels" ;
|
||||
undersaturated_pixel_count:_FillValue = -1 ;
|
||||
undersaturated_pixel_count:units = "count" ;
|
||||
undersaturated_pixel_count:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
undersaturated_pixel_count:grid_mapping = "goes_imager_projection" ;
|
||||
undersaturated_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000056 rad comment: radiometrically undersaturated geolocated/not missing pixels only)" ;
|
||||
undersaturated_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000028 rad comment: radiometrically undersaturated geolocated/not missing pixels only)" ;
|
||||
int focal_plane_temperature_threshold_exceeded_count ;
|
||||
focal_plane_temperature_threshold_exceeded_count:long_name = "number of pixels whose temperatures exceeded the threshold" ;
|
||||
focal_plane_temperature_threshold_exceeded_count:_FillValue = -1 ;
|
||||
focal_plane_temperature_threshold_exceeded_count:units = "count" ;
|
||||
focal_plane_temperature_threshold_exceeded_count:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
focal_plane_temperature_threshold_exceeded_count:grid_mapping = "goes_imager_projection" ;
|
||||
focal_plane_temperature_threshold_exceeded_count:cell_methods = "t: sum area: sum (interval: 0.000028 rad comment: temperature exceeded pixels only)" ;
|
||||
float min_radiance_value_of_valid_pixels ;
|
||||
min_radiance_value_of_valid_pixels:long_name = "minimum radiance value of pixels" ;
|
||||
min_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavenumber" ;
|
||||
min_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavelength" ;
|
||||
min_radiance_value_of_valid_pixels:_FillValue = -999.f ;
|
||||
min_radiance_value_of_valid_pixels:valid_range = -1.6443f, 185.5699f ;
|
||||
min_radiance_value_of_valid_pixels:units = "mW m-2 sr-1 (cm-1)-1" ;
|
||||
min_radiance_value_of_valid_pixels:valid_range = -25.93665f, 804.0361f ;
|
||||
min_radiance_value_of_valid_pixels:units = "W m-2 sr-1 um-1" ;
|
||||
min_radiance_value_of_valid_pixels:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
min_radiance_value_of_valid_pixels:grid_mapping = "goes_imager_projection" ;
|
||||
min_radiance_value_of_valid_pixels:cell_methods = "t: sum area: minimum (interval: 0.000056 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
min_radiance_value_of_valid_pixels:cell_methods = "t: sum area: minimum (interval: 0.000028 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
float max_radiance_value_of_valid_pixels ;
|
||||
max_radiance_value_of_valid_pixels:long_name = "maximum radiance value of pixels" ;
|
||||
max_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavenumber" ;
|
||||
max_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavelength" ;
|
||||
max_radiance_value_of_valid_pixels:_FillValue = -999.f ;
|
||||
max_radiance_value_of_valid_pixels:valid_range = -1.6443f, 185.5699f ;
|
||||
max_radiance_value_of_valid_pixels:units = "mW m-2 sr-1 (cm-1)-1" ;
|
||||
max_radiance_value_of_valid_pixels:valid_range = -25.93665f, 804.0361f ;
|
||||
max_radiance_value_of_valid_pixels:units = "W m-2 sr-1 um-1" ;
|
||||
max_radiance_value_of_valid_pixels:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
max_radiance_value_of_valid_pixels:grid_mapping = "goes_imager_projection" ;
|
||||
max_radiance_value_of_valid_pixels:cell_methods = "t: sum area: maximum (interval: 0.000056 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
max_radiance_value_of_valid_pixels:cell_methods = "t: sum area: maximum (interval: 0.000028 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
float mean_radiance_value_of_valid_pixels ;
|
||||
mean_radiance_value_of_valid_pixels:long_name = "mean radiance value of pixels" ;
|
||||
mean_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavenumber" ;
|
||||
mean_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavelength" ;
|
||||
mean_radiance_value_of_valid_pixels:_FillValue = -999.f ;
|
||||
mean_radiance_value_of_valid_pixels:valid_range = -1.6443f, 185.5699f ;
|
||||
mean_radiance_value_of_valid_pixels:units = "mW m-2 sr-1 (cm-1)-1" ;
|
||||
mean_radiance_value_of_valid_pixels:valid_range = -25.93665f, 804.0361f ;
|
||||
mean_radiance_value_of_valid_pixels:units = "W m-2 sr-1 um-1" ;
|
||||
mean_radiance_value_of_valid_pixels:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
mean_radiance_value_of_valid_pixels:grid_mapping = "goes_imager_projection" ;
|
||||
mean_radiance_value_of_valid_pixels:cell_methods = "t: sum area: mean (interval: 0.000056 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
mean_radiance_value_of_valid_pixels:cell_methods = "t: sum area: mean (interval: 0.000028 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
float std_dev_radiance_value_of_valid_pixels ;
|
||||
std_dev_radiance_value_of_valid_pixels:long_name = "standard deviation of radiance values of pixels" ;
|
||||
std_dev_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavenumber" ;
|
||||
std_dev_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavelength" ;
|
||||
std_dev_radiance_value_of_valid_pixels:_FillValue = -999.f ;
|
||||
std_dev_radiance_value_of_valid_pixels:units = "mW m-2 sr-1 (cm-1)-1" ;
|
||||
std_dev_radiance_value_of_valid_pixels:units = "W m-2 sr-1 um-1" ;
|
||||
std_dev_radiance_value_of_valid_pixels:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
std_dev_radiance_value_of_valid_pixels:grid_mapping = "goes_imager_projection" ;
|
||||
std_dev_radiance_value_of_valid_pixels:cell_methods = "t: sum area: standard_deviation (interval: 0.000056 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
std_dev_radiance_value_of_valid_pixels:cell_methods = "t: sum area: standard_deviation (interval: 0.000028 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
float maximum_focal_plane_temperature ;
|
||||
maximum_focal_plane_temperature:long_name = "maximum focal plane temperature value" ;
|
||||
maximum_focal_plane_temperature:_FillValue = -999.f ;
|
||||
maximum_focal_plane_temperature:valid_range = 0.f, 999.f ;
|
||||
maximum_focal_plane_temperature:units = "K" ;
|
||||
float focal_plane_temperature_threshold_increasing ;
|
||||
focal_plane_temperature_threshold_increasing:long_name = "focal plane temperature threshold increasing bounds value" ;
|
||||
focal_plane_temperature_threshold_increasing:_FillValue = -999.f ;
|
||||
focal_plane_temperature_threshold_increasing:valid_range = 0.f, 999.f ;
|
||||
focal_plane_temperature_threshold_increasing:units = "K" ;
|
||||
float focal_plane_temperature_threshold_decreasing ;
|
||||
focal_plane_temperature_threshold_decreasing:long_name = "focal plane temperature threshold decreasing bounds value" ;
|
||||
focal_plane_temperature_threshold_decreasing:_FillValue = -999.f ;
|
||||
focal_plane_temperature_threshold_decreasing:valid_range = 0.f, 999.f ;
|
||||
focal_plane_temperature_threshold_decreasing:units = "K" ;
|
||||
float percent_uncorrectable_L0_errors ;
|
||||
percent_uncorrectable_L0_errors:long_name = "percent data lost due to uncorrectable L0 errors" ;
|
||||
percent_uncorrectable_L0_errors:_FillValue = -999.f ;
|
||||
@ -241,13 +266,13 @@ variables:
|
||||
earth_sun_distance_anomaly_in_AU:cell_methods = "t: mean" ;
|
||||
int algorithm_dynamic_input_data_container ;
|
||||
algorithm_dynamic_input_data_container:long_name = "container for filenames of dynamic algorithm input data" ;
|
||||
algorithm_dynamic_input_data_container:input_ABI_L0_data = "OR_ABI-L0-C-M3_G16_s20170590337505_e20170590340289_c*.nc" ;
|
||||
algorithm_dynamic_input_data_container:input_ABI_L0_data = "OR_ABI-L0-F-M6_G16_s20220011800205_e20220011809513_c*.nc" ;
|
||||
int processing_parm_version_container ;
|
||||
processing_parm_version_container:long_name = "container for processing parameter filenames" ;
|
||||
processing_parm_version_container:L1b_processing_parm_version = "ABI-L1b-PARM_G16_v01r00.zip" ;
|
||||
processing_parm_version_container:L1b_processing_parm_version = "OR-PARM-RAD_G16_v01r00.zip" ;
|
||||
int algorithm_product_version_container ;
|
||||
algorithm_product_version_container:long_name = "container for algorithm package filename and product version" ;
|
||||
algorithm_product_version_container:algorithm_version = "OR_ABI-L1b-ALG-COMMON_v01r00.zip" ;
|
||||
algorithm_product_version_container:algorithm_version = "OR_ABI-L1b-ALG-RAD_v01r00.zip" ;
|
||||
algorithm_product_version_container:product_version = "v01r00" ;
|
||||
double t_star_look(num_star_looks) ;
|
||||
t_star_look:long_name = "J2000 epoch time of star observed in seconds" ;
|
||||
@ -263,35 +288,44 @@ variables:
|
||||
star_id:_Unsigned = "true" ;
|
||||
star_id:_FillValue = -1s ;
|
||||
star_id:coordinates = "band_id band_wavelength_star_look t_star_look" ;
|
||||
int channel_integration_time ;
|
||||
channel_integration_time:long_name = "Channel-dependent Channel Integration Time, as defined in the VNIR or IR Channel Configuration Table Telemetry" ;
|
||||
channel_integration_time:_FillValue = -1 ;
|
||||
channel_integration_time:units = "count" ;
|
||||
int channel_gain_field ;
|
||||
channel_gain_field:long_name = "Channel-dependent Gain Field, as defined in the VNIR or IR Channel Configuration Table Telemetry" ;
|
||||
channel_gain_field:_FillValue = -1 ;
|
||||
channel_gain_field:units = "1" ;
|
||||
|
||||
// global attributes:
|
||||
:naming_authority = "gov.nesdis.noaa" ;
|
||||
:Conventions = "CF-1.7" ;
|
||||
:Metadata_Conventions = "Unidata Dataset Discovery v1.0" ;
|
||||
:standard_name_vocabulary = "CF Standard Name Table (v25, 05 July 2013)" ;
|
||||
:standard_name_vocabulary = "CF Standard Name Table (v35, 20 July 2016)" ;
|
||||
:institution = "DOC/NOAA/NESDIS > U.S. Department of Commerce, National Oceanic and Atmospheric Administration, National Environmental Satellite, Data, and Information Services" ;
|
||||
:project = "GOES" ;
|
||||
:production_site = "WCDAS" ;
|
||||
:production_environment = "OE" ;
|
||||
:spatial_resolution = "2km at nadir" ;
|
||||
:orbital_slot = "GOES-Test" ;
|
||||
:spatial_resolution = "1km at nadir" ;
|
||||
:Metadata_Conventions = "Unidata Dataset Discovery v1.0" ;
|
||||
:orbital_slot = "GOES-East" ;
|
||||
:platform_ID = "G16" ;
|
||||
:instrument_type = "GOES R Series Advanced Baseline Imager" ;
|
||||
:scene_id = "CONUS" ;
|
||||
:instrument_type = "GOES-R Series Advanced Baseline Imager (ABI)" ;
|
||||
:scene_id = "Full Disk" ;
|
||||
:instrument_ID = "FM1" ;
|
||||
:title = "ABI L1b Radiances" ;
|
||||
:summary = "Single emissive band ABI L1b Radiance Products are digital maps of outgoing radiance values at the top of the atmosphere for IR bands." ;
|
||||
:keywords = "SPECTRAL/ENGINEERING > INFRARED WAVELENGTHS > INFRARED RADIANCE" ;
|
||||
:summary = "Single reflective band ABI L1b Radiance Products are digital maps of outgoing radiance values at the top of the atmosphere for visible and near-IR bands." ;
|
||||
:keywords = "SPECTRAL/ENGINEERING > VISIBLE WAVELENGTHS > VISIBLE RADIANCE" ;
|
||||
:keywords_vocabulary = "NASA Global Change Master Directory (GCMD) Earth Science Keywords, Version 7.0.0.0.0" ;
|
||||
:iso_series_metadata_id = "a70be540-c38b-11e0-962b-0800200c9a66" ;
|
||||
:license = "Unclassified data. Access is restricted to approved users only." ;
|
||||
:processing_level = "L1b" ;
|
||||
:processing_level = "National Aeronautics and Space Administration (NASA) L1b" ;
|
||||
:cdm_data_type = "Image" ;
|
||||
:dataset_name = "OR_ABI-L1b-RadC-M3C13_G16_s20170590337505_e20170590340289_c20170590340316.nc" ;
|
||||
:dataset_name = "OR_ABI-L1b-RadF-M6C01_G16_s20220011800205_e20220011809513_c20220011809562.nc" ;
|
||||
:production_data_source = "Realtime" ;
|
||||
:timeline_id = "ABI Mode 3" ;
|
||||
:date_created = "2017-02-28T03:40:31.6Z" ;
|
||||
:time_coverage_start = "2017-02-28T03:37:50.5Z" ;
|
||||
:time_coverage_end = "2017-02-28T03:40:28.9Z" ;
|
||||
:id = "037d7688-bd22-4ffb-9727-45e0c2890a72" ;
|
||||
:timeline_id = "ABI Mode 6" ;
|
||||
:date_created = "2022-01-01T18:09:56.2Z" ;
|
||||
:time_coverage_start = "2022-01-01T18:00:20.5Z" ;
|
||||
:time_coverage_end = "2022-01-01T18:09:51.3Z" ;
|
||||
:LUT_Filenames = "SpaceLookParams(FM1A_CDRL79RevP_PR_09_00_02)-637827000.0.h5 QTableBand01(FM1A_CDRL79RevH_DO_07_00_00)-582860861.0.h5 CalTargetTimeIntervals(FM1A_CDRL79RevP_DO_08_00_01)-611906620.0.h5 BandSaturationLimits(FM1A_CDRL79RevH_DO_08_00_00)-600000000.0.h5 SolarSpaceLookParams(FM1A_CDRL79RevH_DO_09_00_00)-600765435.0.h5 DeadRowListParams(FM1A_CDRL79RevH_DO_08_00_00)-600000000.0.h5 Mirror_Record(FM1A_CDRL79RevG_DO_07_00_00)-582860861.0.h5 KalmanAstroConsts(FM1A_CDRL79RevH_DO_08_00_00)-600000000.0.xml KalmanFilterControls(FM1A_PR_09_08_02)-677650371.0.xml KalmanMeasMaxSensibles(FMAA_INT_ONLY_DO_09_01_00)-652936814.0.xml KalmanPreprocessorControls(FM1A_CDRL79RevJ_PR_09_06_02)-657795700.0.xml KalmanReferenceData(FM1A_CDRL79RevH_DO_08_00_00)-888.0.xml KalmanStarCatalogs(FM1A_CDRL79RevH_DO_08_00_00)-600000000.0.xml ABI_NavigationRDP_Band01(FM1A_CDRL79RevJ_DO_07_00_00)-582860861.0.xml ABI_NavigationParameters_Band01(FM1A_CDRL79RevH_DO_07_00_00)-582860861.0.xml ABI_ResamplingImplementation_Band01(FM1A_CDRL79RevH_DO_07_02_00)-602129336.0.xml ABI_ResamplingParameters_Band01(FM1A_CDRL79RevJ_DO_07_00_00)-582860861.0.xml StarLookParams(FM1A_CDRL79RevH_DO_08_00_00)-600000000.0.h5 StarDetectionParams(FM1A_CDRL79RevJ_DO_07_00_00)-582860861.0.xml ResamplingScaledConversion(FMAA_INT_ONLY_DO_08_00_00)-1111.0.xml BlockReleaseRegions(FMAA_INT_ONLY_DO_08_00_00)-2222.0.csv VNIR_RetrievalParameters(FM1A_CDRL79RevH_DO_08_00_00)-600000000.0.h5 SCT_Record(FM1A_CDRL79RevM_DO_09_00_00)-600765435.0.h5 ICM_ConversionConsts(FM1A_CDRL43-18_DO_09_01_00)-652936750.0.h5 ICM_SensorCoefficients(FM1A_TMABI_18_159_TMABI_18_533_DO_09_05_00)-676949608.0.h5" ;
|
||||
:id = "75de858d-c386-4159-a95e-bce8a0d3d61e" ;
|
||||
}
|
||||
|
@ -1,23 +1,23 @@
|
||||
netcdf OR_ABI-L1b-RadF-M6C01_G16_s20220011800205_e20220011809513_c20220011809562 {
|
||||
netcdf OR_ABI-L1b-RadC-M3C13_G16_s20170590337505_e20170590340289_c20170590340316 {
|
||||
dimensions:
|
||||
y = 10848 ;
|
||||
x = 10848 ;
|
||||
y = 1500 ;
|
||||
x = 2500 ;
|
||||
number_of_time_bounds = 2 ;
|
||||
band = 1 ;
|
||||
number_of_image_bounds = 2 ;
|
||||
num_star_looks = 24 ;
|
||||
variables:
|
||||
short Rad(y, x) ;
|
||||
Rad:_FillValue = 1023s ;
|
||||
Rad:_FillValue = 4095s ;
|
||||
Rad:long_name = "ABI L1b Radiances" ;
|
||||
Rad:standard_name = "toa_outgoing_radiance_per_unit_wavelength" ;
|
||||
Rad:standard_name = "toa_outgoing_radiance_per_unit_wavenumber" ;
|
||||
Rad:_Unsigned = "true" ;
|
||||
Rad:sensor_band_bit_depth = 10b ;
|
||||
Rad:valid_range = 0s, 1022s ;
|
||||
Rad:scale_factor = 0.8121064f ;
|
||||
Rad:add_offset = -25.93665f ;
|
||||
Rad:units = "W m-2 sr-1 um-1" ;
|
||||
Rad:resolution = "y: 0.000028 rad x: 0.000028 rad" ;
|
||||
Rad:sensor_band_bit_depth = 12b ;
|
||||
Rad:valid_range = 0s, 4094s ;
|
||||
Rad:scale_factor = 0.04572892f ;
|
||||
Rad:add_offset = -1.6443f ;
|
||||
Rad:units = "mW m-2 sr-1 (cm-1)-1" ;
|
||||
Rad:resolution = "y: 0.000056 rad x: 0.000056 rad" ;
|
||||
Rad:coordinates = "band_id band_wavelength t y x" ;
|
||||
Rad:grid_mapping = "goes_imager_projection" ;
|
||||
Rad:cell_methods = "t: point area: point" ;
|
||||
@ -27,19 +27,18 @@ variables:
|
||||
DQF:long_name = "ABI L1b Radiances data quality flags" ;
|
||||
DQF:standard_name = "status_flag" ;
|
||||
DQF:_Unsigned = "true" ;
|
||||
DQF:valid_range = 0b, 4b ;
|
||||
DQF:valid_range = 0b, 3b ;
|
||||
DQF:units = "1" ;
|
||||
DQF:coordinates = "band_id band_wavelength t y x" ;
|
||||
DQF:grid_mapping = "goes_imager_projection" ;
|
||||
DQF:cell_methods = "t: point area: point" ;
|
||||
DQF:flag_values = 0b, 1b, 2b, 3b, 4b ;
|
||||
DQF:flag_meanings = "good_pixel_qf conditionally_usable_pixel_qf out_of_range_pixel_qf no_value_pixel_qf focal_plane_temperature_threshold_exceeded_qf" ;
|
||||
DQF:number_of_qf_values = 5b ;
|
||||
DQF:percent_good_pixel_qf = 0.998999f ;
|
||||
DQF:percent_conditionally_usable_pixel_qf = 5.e-07f ;
|
||||
DQF:percent_out_of_range_pixel_qf = 0.0009925f ;
|
||||
DQF:percent_no_value_pixel_qf = 8.e-06f ;
|
||||
DQF:percent_focal_plane_temperature_threshold_exceeded_qf = 0.f ;
|
||||
DQF:flag_values = 0b, 1b, 2b, 3b ;
|
||||
DQF:flag_meanings = "good_pixel_qf conditionally_usable_pixel_qf out_of_range_pixel_qf no_value_pixel_qf" ;
|
||||
DQF:number_of_qf_values = 4b ;
|
||||
DQF:percent_good_pixel_qf = 1.f ;
|
||||
DQF:percent_conditionally_usable_pixel_qf = 0.f ;
|
||||
DQF:percent_out_of_range_pixel_qf = 0.f ;
|
||||
DQF:percent_no_value_pixel_qf = 0.f ;
|
||||
double t ;
|
||||
t:long_name = "J2000 epoch mid-point between the start and end image scan in seconds" ;
|
||||
t:standard_name = "time" ;
|
||||
@ -47,15 +46,15 @@ variables:
|
||||
t:axis = "T" ;
|
||||
t:bounds = "time_bounds" ;
|
||||
short y(y) ;
|
||||
y:scale_factor = -2.8e-05f ;
|
||||
y:add_offset = 0.151858f ;
|
||||
y:scale_factor = -5.6e-05f ;
|
||||
y:add_offset = 0.126532f ;
|
||||
y:units = "rad" ;
|
||||
y:axis = "Y" ;
|
||||
y:long_name = "GOES fixed grid projection y-coordinate" ;
|
||||
y:standard_name = "projection_y_coordinate" ;
|
||||
short x(x) ;
|
||||
x:scale_factor = 2.8e-05f ;
|
||||
x:add_offset = -0.151858f ;
|
||||
x:scale_factor = 5.6e-05f ;
|
||||
x:add_offset = -0.075012f ;
|
||||
x:units = "rad" ;
|
||||
x:axis = "X" ;
|
||||
x:long_name = "GOES fixed grid projection x-coordinate" ;
|
||||
@ -70,7 +69,7 @@ variables:
|
||||
goes_imager_projection:semi_minor_axis = 6356752.31414 ;
|
||||
goes_imager_projection:inverse_flattening = 298.2572221 ;
|
||||
goes_imager_projection:latitude_of_projection_origin = 0. ;
|
||||
goes_imager_projection:longitude_of_projection_origin = -75. ;
|
||||
goes_imager_projection:longitude_of_projection_origin = -89.5 ;
|
||||
goes_imager_projection:sweep_angle_axis = "x" ;
|
||||
float y_image ;
|
||||
y_image:long_name = "GOES-R fixed grid projection y-coordinate center of image" ;
|
||||
@ -79,7 +78,6 @@ variables:
|
||||
y_image:axis = "Y" ;
|
||||
float y_image_bounds(number_of_image_bounds) ;
|
||||
y_image_bounds:long_name = "GOES-R fixed grid projection y-coordinate north/south extent of image" ;
|
||||
y_image_bounds:units = "rad" ;
|
||||
float x_image ;
|
||||
x_image:long_name = "GOES-R fixed grid projection x-coordinate center of image" ;
|
||||
x_image:standard_name = "projection_x_coordinate" ;
|
||||
@ -87,7 +85,6 @@ variables:
|
||||
x_image:axis = "X" ;
|
||||
float x_image_bounds(number_of_image_bounds) ;
|
||||
x_image_bounds:long_name = "GOES-R fixed grid projection x-coordinate west/east extent of image" ;
|
||||
x_image_bounds:units = "rad" ;
|
||||
float nominal_satellite_subpoint_lat ;
|
||||
nominal_satellite_subpoint_lat:long_name = "nominal satellite subpoint latitude (platform latitude)" ;
|
||||
nominal_satellite_subpoint_lat:standard_name = "latitude" ;
|
||||
@ -105,14 +102,14 @@ variables:
|
||||
nominal_satellite_height:units = "km" ;
|
||||
float geospatial_lat_lon_extent ;
|
||||
geospatial_lat_lon_extent:long_name = "geospatial latitude and longitude references" ;
|
||||
geospatial_lat_lon_extent:geospatial_westbound_longitude = -156.2995f ;
|
||||
geospatial_lat_lon_extent:geospatial_northbound_latitude = 81.3282f ;
|
||||
geospatial_lat_lon_extent:geospatial_eastbound_longitude = 6.2995f ;
|
||||
geospatial_lat_lon_extent:geospatial_southbound_latitude = -81.3282f ;
|
||||
geospatial_lat_lon_extent:geospatial_lat_center = 0.f ;
|
||||
geospatial_lat_lon_extent:geospatial_lon_center = -75.f ;
|
||||
geospatial_lat_lon_extent:geospatial_westbound_longitude = -140.6163f ;
|
||||
geospatial_lat_lon_extent:geospatial_northbound_latitude = 52.76771f ;
|
||||
geospatial_lat_lon_extent:geospatial_eastbound_longitude = -49.17929f ;
|
||||
geospatial_lat_lon_extent:geospatial_southbound_latitude = 14.00016f ;
|
||||
geospatial_lat_lon_extent:geospatial_lat_center = 29.294f ;
|
||||
geospatial_lat_lon_extent:geospatial_lon_center = -91.406f ;
|
||||
geospatial_lat_lon_extent:geospatial_lat_nadir = 0.f ;
|
||||
geospatial_lat_lon_extent:geospatial_lon_nadir = -75.f ;
|
||||
geospatial_lat_lon_extent:geospatial_lon_nadir = -89.5f ;
|
||||
geospatial_lat_lon_extent:geospatial_lat_units = "degrees_north" ;
|
||||
geospatial_lat_lon_extent:geospatial_lon_units = "degrees_east" ;
|
||||
byte yaw_flip_flag ;
|
||||
@ -122,7 +119,7 @@ variables:
|
||||
yaw_flip_flag:valid_range = 0b, 1b ;
|
||||
yaw_flip_flag:units = "1" ;
|
||||
yaw_flip_flag:coordinates = "t" ;
|
||||
yaw_flip_flag:flag_values = 0b, 1b ;
|
||||
yaw_flip_flag:flag_values = "0 1" ;
|
||||
yaw_flip_flag:flag_meanings = "false true" ;
|
||||
byte band_id(band) ;
|
||||
band_id:long_name = "ABI band number" ;
|
||||
@ -171,85 +168,63 @@ variables:
|
||||
valid_pixel_count:units = "count" ;
|
||||
valid_pixel_count:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
valid_pixel_count:grid_mapping = "goes_imager_projection" ;
|
||||
valid_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000028 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
valid_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000056 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
int missing_pixel_count ;
|
||||
missing_pixel_count:long_name = "number of missing pixels" ;
|
||||
missing_pixel_count:_FillValue = -1 ;
|
||||
missing_pixel_count:units = "count" ;
|
||||
missing_pixel_count:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
missing_pixel_count:grid_mapping = "goes_imager_projection" ;
|
||||
missing_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000028 rad comment: missing ABI fixed grid pixels only)" ;
|
||||
missing_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000056 rad comment: missing ABI fixed grid pixels only)" ;
|
||||
int saturated_pixel_count ;
|
||||
saturated_pixel_count:long_name = "number of saturated pixels" ;
|
||||
saturated_pixel_count:_FillValue = -1 ;
|
||||
saturated_pixel_count:units = "count" ;
|
||||
saturated_pixel_count:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
saturated_pixel_count:grid_mapping = "goes_imager_projection" ;
|
||||
saturated_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000028 rad comment: radiometrically saturated geolocated/not missing pixels only)" ;
|
||||
saturated_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000056 rad comment: radiometrically saturated geolocated/not missing pixels only)" ;
|
||||
int undersaturated_pixel_count ;
|
||||
undersaturated_pixel_count:long_name = "number of undersaturated pixels" ;
|
||||
undersaturated_pixel_count:_FillValue = -1 ;
|
||||
undersaturated_pixel_count:units = "count" ;
|
||||
undersaturated_pixel_count:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
undersaturated_pixel_count:grid_mapping = "goes_imager_projection" ;
|
||||
undersaturated_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000028 rad comment: radiometrically undersaturated geolocated/not missing pixels only)" ;
|
||||
int focal_plane_temperature_threshold_exceeded_count ;
|
||||
focal_plane_temperature_threshold_exceeded_count:long_name = "number of pixels whose temperatures exceeded the threshold" ;
|
||||
focal_plane_temperature_threshold_exceeded_count:_FillValue = -1 ;
|
||||
focal_plane_temperature_threshold_exceeded_count:units = "count" ;
|
||||
focal_plane_temperature_threshold_exceeded_count:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
focal_plane_temperature_threshold_exceeded_count:grid_mapping = "goes_imager_projection" ;
|
||||
focal_plane_temperature_threshold_exceeded_count:cell_methods = "t: sum area: sum (interval: 0.000028 rad comment: temperature exceeded pixels only)" ;
|
||||
undersaturated_pixel_count:cell_methods = "t: sum area: sum (interval: 0.000056 rad comment: radiometrically undersaturated geolocated/not missing pixels only)" ;
|
||||
float min_radiance_value_of_valid_pixels ;
|
||||
min_radiance_value_of_valid_pixels:long_name = "minimum radiance value of pixels" ;
|
||||
min_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavelength" ;
|
||||
min_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavenumber" ;
|
||||
min_radiance_value_of_valid_pixels:_FillValue = -999.f ;
|
||||
min_radiance_value_of_valid_pixels:valid_range = -25.93665f, 804.0361f ;
|
||||
min_radiance_value_of_valid_pixels:units = "W m-2 sr-1 um-1" ;
|
||||
min_radiance_value_of_valid_pixels:valid_range = -1.6443f, 185.5699f ;
|
||||
min_radiance_value_of_valid_pixels:units = "mW m-2 sr-1 (cm-1)-1" ;
|
||||
min_radiance_value_of_valid_pixels:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
min_radiance_value_of_valid_pixels:grid_mapping = "goes_imager_projection" ;
|
||||
min_radiance_value_of_valid_pixels:cell_methods = "t: sum area: minimum (interval: 0.000028 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
min_radiance_value_of_valid_pixels:cell_methods = "t: sum area: minimum (interval: 0.000056 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
float max_radiance_value_of_valid_pixels ;
|
||||
max_radiance_value_of_valid_pixels:long_name = "maximum radiance value of pixels" ;
|
||||
max_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavelength" ;
|
||||
max_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavenumber" ;
|
||||
max_radiance_value_of_valid_pixels:_FillValue = -999.f ;
|
||||
max_radiance_value_of_valid_pixels:valid_range = -25.93665f, 804.0361f ;
|
||||
max_radiance_value_of_valid_pixels:units = "W m-2 sr-1 um-1" ;
|
||||
max_radiance_value_of_valid_pixels:valid_range = -1.6443f, 185.5699f ;
|
||||
max_radiance_value_of_valid_pixels:units = "mW m-2 sr-1 (cm-1)-1" ;
|
||||
max_radiance_value_of_valid_pixels:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
max_radiance_value_of_valid_pixels:grid_mapping = "goes_imager_projection" ;
|
||||
max_radiance_value_of_valid_pixels:cell_methods = "t: sum area: maximum (interval: 0.000028 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
max_radiance_value_of_valid_pixels:cell_methods = "t: sum area: maximum (interval: 0.000056 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
float mean_radiance_value_of_valid_pixels ;
|
||||
mean_radiance_value_of_valid_pixels:long_name = "mean radiance value of pixels" ;
|
||||
mean_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavelength" ;
|
||||
mean_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavenumber" ;
|
||||
mean_radiance_value_of_valid_pixels:_FillValue = -999.f ;
|
||||
mean_radiance_value_of_valid_pixels:valid_range = -25.93665f, 804.0361f ;
|
||||
mean_radiance_value_of_valid_pixels:units = "W m-2 sr-1 um-1" ;
|
||||
mean_radiance_value_of_valid_pixels:valid_range = -1.6443f, 185.5699f ;
|
||||
mean_radiance_value_of_valid_pixels:units = "mW m-2 sr-1 (cm-1)-1" ;
|
||||
mean_radiance_value_of_valid_pixels:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
mean_radiance_value_of_valid_pixels:grid_mapping = "goes_imager_projection" ;
|
||||
mean_radiance_value_of_valid_pixels:cell_methods = "t: sum area: mean (interval: 0.000028 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
mean_radiance_value_of_valid_pixels:cell_methods = "t: sum area: mean (interval: 0.000056 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
float std_dev_radiance_value_of_valid_pixels ;
|
||||
std_dev_radiance_value_of_valid_pixels:long_name = "standard deviation of radiance values of pixels" ;
|
||||
std_dev_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavelength" ;
|
||||
std_dev_radiance_value_of_valid_pixels:standard_name = "toa_outgoing_radiance_per_unit_wavenumber" ;
|
||||
std_dev_radiance_value_of_valid_pixels:_FillValue = -999.f ;
|
||||
std_dev_radiance_value_of_valid_pixels:units = "W m-2 sr-1 um-1" ;
|
||||
std_dev_radiance_value_of_valid_pixels:units = "mW m-2 sr-1 (cm-1)-1" ;
|
||||
std_dev_radiance_value_of_valid_pixels:coordinates = "band_id band_wavelength t y_image x_image" ;
|
||||
std_dev_radiance_value_of_valid_pixels:grid_mapping = "goes_imager_projection" ;
|
||||
std_dev_radiance_value_of_valid_pixels:cell_methods = "t: sum area: standard_deviation (interval: 0.000028 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
float maximum_focal_plane_temperature ;
|
||||
maximum_focal_plane_temperature:long_name = "maximum focal plane temperature value" ;
|
||||
maximum_focal_plane_temperature:_FillValue = -999.f ;
|
||||
maximum_focal_plane_temperature:valid_range = 0.f, 999.f ;
|
||||
maximum_focal_plane_temperature:units = "K" ;
|
||||
float focal_plane_temperature_threshold_increasing ;
|
||||
focal_plane_temperature_threshold_increasing:long_name = "focal plane temperature threshold increasing bounds value" ;
|
||||
focal_plane_temperature_threshold_increasing:_FillValue = -999.f ;
|
||||
focal_plane_temperature_threshold_increasing:valid_range = 0.f, 999.f ;
|
||||
focal_plane_temperature_threshold_increasing:units = "K" ;
|
||||
float focal_plane_temperature_threshold_decreasing ;
|
||||
focal_plane_temperature_threshold_decreasing:long_name = "focal plane temperature threshold decreasing bounds value" ;
|
||||
focal_plane_temperature_threshold_decreasing:_FillValue = -999.f ;
|
||||
focal_plane_temperature_threshold_decreasing:valid_range = 0.f, 999.f ;
|
||||
focal_plane_temperature_threshold_decreasing:units = "K" ;
|
||||
std_dev_radiance_value_of_valid_pixels:cell_methods = "t: sum area: standard_deviation (interval: 0.000056 rad comment: good and conditionally usable quality pixels only)" ;
|
||||
float percent_uncorrectable_L0_errors ;
|
||||
percent_uncorrectable_L0_errors:long_name = "percent data lost due to uncorrectable L0 errors" ;
|
||||
percent_uncorrectable_L0_errors:_FillValue = -999.f ;
|
||||
@ -266,13 +241,13 @@ variables:
|
||||
earth_sun_distance_anomaly_in_AU:cell_methods = "t: mean" ;
|
||||
int algorithm_dynamic_input_data_container ;
|
||||
algorithm_dynamic_input_data_container:long_name = "container for filenames of dynamic algorithm input data" ;
|
||||
algorithm_dynamic_input_data_container:input_ABI_L0_data = "OR_ABI-L0-F-M6_G16_s20220011800205_e20220011809513_c*.nc" ;
|
||||
algorithm_dynamic_input_data_container:input_ABI_L0_data = "OR_ABI-L0-C-M3_G16_s20170590337505_e20170590340289_c*.nc" ;
|
||||
int processing_parm_version_container ;
|
||||
processing_parm_version_container:long_name = "container for processing parameter filenames" ;
|
||||
processing_parm_version_container:L1b_processing_parm_version = "OR-PARM-RAD_G16_v01r00.zip" ;
|
||||
processing_parm_version_container:L1b_processing_parm_version = "ABI-L1b-PARM_G16_v01r00.zip" ;
|
||||
int algorithm_product_version_container ;
|
||||
algorithm_product_version_container:long_name = "container for algorithm package filename and product version" ;
|
||||
algorithm_product_version_container:algorithm_version = "OR_ABI-L1b-ALG-RAD_v01r00.zip" ;
|
||||
algorithm_product_version_container:algorithm_version = "OR_ABI-L1b-ALG-COMMON_v01r00.zip" ;
|
||||
algorithm_product_version_container:product_version = "v01r00" ;
|
||||
double t_star_look(num_star_looks) ;
|
||||
t_star_look:long_name = "J2000 epoch time of star observed in seconds" ;
|
||||
@ -288,44 +263,35 @@ variables:
|
||||
star_id:_Unsigned = "true" ;
|
||||
star_id:_FillValue = -1s ;
|
||||
star_id:coordinates = "band_id band_wavelength_star_look t_star_look" ;
|
||||
int channel_integration_time ;
|
||||
channel_integration_time:long_name = "Channel-dependent Channel Integration Time, as defined in the VNIR or IR Channel Configuration Table Telemetry" ;
|
||||
channel_integration_time:_FillValue = -1 ;
|
||||
channel_integration_time:units = "count" ;
|
||||
int channel_gain_field ;
|
||||
channel_gain_field:long_name = "Channel-dependent Gain Field, as defined in the VNIR or IR Channel Configuration Table Telemetry" ;
|
||||
channel_gain_field:_FillValue = -1 ;
|
||||
channel_gain_field:units = "1" ;
|
||||
|
||||
// global attributes:
|
||||
:naming_authority = "gov.nesdis.noaa" ;
|
||||
:Conventions = "CF-1.7" ;
|
||||
:standard_name_vocabulary = "CF Standard Name Table (v35, 20 July 2016)" ;
|
||||
:Metadata_Conventions = "Unidata Dataset Discovery v1.0" ;
|
||||
:standard_name_vocabulary = "CF Standard Name Table (v25, 05 July 2013)" ;
|
||||
:institution = "DOC/NOAA/NESDIS > U.S. Department of Commerce, National Oceanic and Atmospheric Administration, National Environmental Satellite, Data, and Information Services" ;
|
||||
:project = "GOES" ;
|
||||
:production_site = "WCDAS" ;
|
||||
:production_environment = "OE" ;
|
||||
:spatial_resolution = "1km at nadir" ;
|
||||
:Metadata_Conventions = "Unidata Dataset Discovery v1.0" ;
|
||||
:orbital_slot = "GOES-East" ;
|
||||
:spatial_resolution = "2km at nadir" ;
|
||||
:orbital_slot = "GOES-Test" ;
|
||||
:platform_ID = "G16" ;
|
||||
:instrument_type = "GOES-R Series Advanced Baseline Imager (ABI)" ;
|
||||
:scene_id = "Full Disk" ;
|
||||
:instrument_type = "GOES R Series Advanced Baseline Imager" ;
|
||||
:scene_id = "CONUS" ;
|
||||
:instrument_ID = "FM1" ;
|
||||
:title = "ABI L1b Radiances" ;
|
||||
:summary = "Single reflective band ABI L1b Radiance Products are digital maps of outgoing radiance values at the top of the atmosphere for visible and near-IR bands." ;
|
||||
:keywords = "SPECTRAL/ENGINEERING > VISIBLE WAVELENGTHS > VISIBLE RADIANCE" ;
|
||||
:summary = "Single emissive band ABI L1b Radiance Products are digital maps of outgoing radiance values at the top of the atmosphere for IR bands." ;
|
||||
:keywords = "SPECTRAL/ENGINEERING > INFRARED WAVELENGTHS > INFRARED RADIANCE" ;
|
||||
:keywords_vocabulary = "NASA Global Change Master Directory (GCMD) Earth Science Keywords, Version 7.0.0.0.0" ;
|
||||
:iso_series_metadata_id = "a70be540-c38b-11e0-962b-0800200c9a66" ;
|
||||
:license = "Unclassified data. Access is restricted to approved users only." ;
|
||||
:processing_level = "National Aeronautics and Space Administration (NASA) L1b" ;
|
||||
:processing_level = "L1b" ;
|
||||
:cdm_data_type = "Image" ;
|
||||
:dataset_name = "OR_ABI-L1b-RadF-M6C01_G16_s20220011800205_e20220011809513_c20220011809562.nc" ;
|
||||
:dataset_name = "OR_ABI-L1b-RadC-M3C13_G16_s20170590337505_e20170590340289_c20170590340316.nc" ;
|
||||
:production_data_source = "Realtime" ;
|
||||
:timeline_id = "ABI Mode 6" ;
|
||||
:date_created = "2022-01-01T18:09:56.2Z" ;
|
||||
:time_coverage_start = "2022-01-01T18:00:20.5Z" ;
|
||||
:time_coverage_end = "2022-01-01T18:09:51.3Z" ;
|
||||
:LUT_Filenames = "SpaceLookParams(FM1A_CDRL79RevP_PR_09_00_02)-637827000.0.h5 QTableBand01(FM1A_CDRL79RevH_DO_07_00_00)-582860861.0.h5 CalTargetTimeIntervals(FM1A_CDRL79RevP_DO_08_00_01)-611906620.0.h5 BandSaturationLimits(FM1A_CDRL79RevH_DO_08_00_00)-600000000.0.h5 SolarSpaceLookParams(FM1A_CDRL79RevH_DO_09_00_00)-600765435.0.h5 DeadRowListParams(FM1A_CDRL79RevH_DO_08_00_00)-600000000.0.h5 Mirror_Record(FM1A_CDRL79RevG_DO_07_00_00)-582860861.0.h5 KalmanAstroConsts(FM1A_CDRL79RevH_DO_08_00_00)-600000000.0.xml KalmanFilterControls(FM1A_PR_09_08_02)-677650371.0.xml KalmanMeasMaxSensibles(FMAA_INT_ONLY_DO_09_01_00)-652936814.0.xml KalmanPreprocessorControls(FM1A_CDRL79RevJ_PR_09_06_02)-657795700.0.xml KalmanReferenceData(FM1A_CDRL79RevH_DO_08_00_00)-888.0.xml KalmanStarCatalogs(FM1A_CDRL79RevH_DO_08_00_00)-600000000.0.xml ABI_NavigationRDP_Band01(FM1A_CDRL79RevJ_DO_07_00_00)-582860861.0.xml ABI_NavigationParameters_Band01(FM1A_CDRL79RevH_DO_07_00_00)-582860861.0.xml ABI_ResamplingImplementation_Band01(FM1A_CDRL79RevH_DO_07_02_00)-602129336.0.xml ABI_ResamplingParameters_Band01(FM1A_CDRL79RevJ_DO_07_00_00)-582860861.0.xml StarLookParams(FM1A_CDRL79RevH_DO_08_00_00)-600000000.0.h5 StarDetectionParams(FM1A_CDRL79RevJ_DO_07_00_00)-582860861.0.xml ResamplingScaledConversion(FMAA_INT_ONLY_DO_08_00_00)-1111.0.xml BlockReleaseRegions(FMAA_INT_ONLY_DO_08_00_00)-2222.0.csv VNIR_RetrievalParameters(FM1A_CDRL79RevH_DO_08_00_00)-600000000.0.h5 SCT_Record(FM1A_CDRL79RevM_DO_09_00_00)-600765435.0.h5 ICM_ConversionConsts(FM1A_CDRL43-18_DO_09_01_00)-652936750.0.h5 ICM_SensorCoefficients(FM1A_TMABI_18_159_TMABI_18_533_DO_09_05_00)-676949608.0.h5" ;
|
||||
:id = "75de858d-c386-4159-a95e-bce8a0d3d61e" ;
|
||||
:timeline_id = "ABI Mode 3" ;
|
||||
:date_created = "2017-02-28T03:40:31.6Z" ;
|
||||
:time_coverage_start = "2017-02-28T03:37:50.5Z" ;
|
||||
:time_coverage_end = "2017-02-28T03:40:28.9Z" ;
|
||||
:id = "037d7688-bd22-4ffb-9727-45e0c2890a72" ;
|
||||
}
|
||||
|
@ -14,9 +14,9 @@ URL4b="https://thredds-test.unidata.ucar.edu/thredds/fileServer/irma/metar/files
|
||||
fi
|
||||
if test "x$FEATURE_S3TESTS" != xno ; then
|
||||
URL4a="https://s3.us-east-1.amazonaws.com/noaa-goes16/ABI-L1b-RadC/2017/059/03/OR_ABI-L1b-RadC-M3C13_G16_s20170590337505_e20170590340289_c20170590340316.nc#mode=bytes"
|
||||
URL4c="s3://noaa-goes16/ABI-L1b-RadC/2017/059/03/OR_ABI-L1b-RadC-M3C13_G16_s20170590337505_e20170590340289_c20170590340316.nc#mode=bytes"
|
||||
# Test alternate URL with no specified region
|
||||
URL4e="http://noaa-goes16.s3.amazonaws.com/ABI-L1b-RadF/2022/001/18/OR_ABI-L1b-RadF-M6C01_G16_s20220011800205_e20220011809513_c20220011809562.nc#mode=bytes,s3"
|
||||
URL4c="https://noaa-goes16.s3.amazonaws.com/ABI-L1b-RadF/2022/001/18/OR_ABI-L1b-RadF-M6C01_G16_s20220011800205_e20220011809513_c20220011809562.nc#mode=bytes,s3"
|
||||
# Test alternate URL with no specified region and using s3 protocol
|
||||
URL4e="s3://noaa-goes16/ABI-L1b-RadC/2017/059/03/OR_ABI-L1b-RadC-M3C13_G16_s20170590337505_e20170590340289_c20170590340316.nc#mode=bytes"
|
||||
fi
|
||||
if test "x$FEATURE_S3TESTS" = xyes ; then
|
||||
# Requires auth
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_HDF5_H
|
||||
#ifdef USE_HDF5
|
||||
#include <hdf5.h>
|
||||
#endif
|
||||
#include "netcdf.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_HDF5_H
|
||||
#ifdef USE_HDF5
|
||||
#include <hdf5.h>
|
||||
#endif
|
||||
#include "netcdf.h"
|
||||
|