Merge branch 'main' into awsdfalt.dmh
175
.github/workflows/run_tests_osx.yml
vendored
@ -49,10 +49,9 @@ jobs:
|
||||
make install -j
|
||||
popd
|
||||
|
||||
|
||||
nc-autotools-osx:
|
||||
|
||||
needs: [ nc-cmake-tests-oneoff-osx, nc-ac-tests-oneoff-osx ]
|
||||
needs: [ nc-cmake-tests-oneoff-osx-shared, nc-cmake-tests-oneoff-osx-static, nc-ac-tests-oneoff-osx ]
|
||||
runs-on: macos-11
|
||||
|
||||
strategy:
|
||||
@ -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,7 +157,7 @@ jobs:
|
||||
|
||||
nc-cmake-osx:
|
||||
|
||||
needs: [ nc-cmake-tests-oneoff-osx, nc-ac-tests-oneoff-osx ]
|
||||
needs: [ nc-cmake-tests-oneoff-osx-shared, nc-cmake-tests-oneoff-osx-static, nc-ac-tests-oneoff-osx ]
|
||||
runs-on: macos-11
|
||||
|
||||
strategy:
|
||||
@ -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,10 +247,9 @@ 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
|
||||
@ -264,18 +262,18 @@ 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
|
||||
- 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,11 +327,11 @@ 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
|
||||
@ -346,16 +344,16 @@ 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
|
||||
|
||||
###
|
||||
# Fetch Cache
|
||||
###
|
||||
###
|
||||
# Fetch Cache
|
||||
###
|
||||
|
||||
- name: Fetch HDF Cache
|
||||
id: cache-hdf5-osx
|
||||
@ -368,9 +366,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}
|
||||
@ -405,3 +403,78 @@ jobs:
|
||||
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-11
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hdf5: [ 1.12.2, 1.14.0 ]
|
||||
|
||||
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_XML2=FALSE -DBUILD_SHARED_LIBS=OFF -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() }}
|
||||
|
190
.github/workflows/run_tests_ubuntu.yml
vendored
@ -119,9 +119,9 @@ 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
|
||||
@ -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
|
||||
##
|
||||
@ -294,9 +390,9 @@ 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
|
||||
@ -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.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
|
||||
|
||||
###
|
||||
# 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_XML2=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
|
||||
##
|
||||
@ -455,7 +633,7 @@ 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:
|
||||
@ -619,7 +797,7 @@ 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:
|
||||
|
1
.gitignore
vendored
@ -35,6 +35,7 @@ test-driver
|
||||
#####
|
||||
|
||||
### 'Normal' gitignore files.
|
||||
docs/auth.html
|
||||
.vscode
|
||||
nug.tag
|
||||
netcdf-c.tag
|
||||
|
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.
|
@ -10,13 +10,13 @@
|
||||
# build binary installers.
|
||||
#####
|
||||
|
||||
SET(CPACK_PACKAGE_VENDOR "Unidata")
|
||||
set(CPACK_PACKAGE_VENDOR "Unidata")
|
||||
|
||||
##
|
||||
# Declare exclusions list used when building a source file.
|
||||
# NOTE!! This list uses regular expressions, NOT wildcards!!
|
||||
##
|
||||
SET(CPACK_SOURCE_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}"
|
||||
set(CPACK_SOURCE_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}"
|
||||
"/expecttds3/"
|
||||
"/nocacheremote3/"
|
||||
"/nocacheremote4/"
|
||||
@ -46,21 +46,21 @@ SET(CPACK_SOURCE_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}"
|
||||
# Nullsoft Installation System (NSIS)
|
||||
###
|
||||
|
||||
SET(CPACK_PACKAGE_CONTACT "NetCDF Support <support-netcdf@unidata.ucar.edu>")
|
||||
set(CPACK_PACKAGE_CONTACT "NetCDF Support <support-netcdf@unidata.ucar.edu>")
|
||||
|
||||
IF(WIN32)
|
||||
SET(CPACK_NSIS_MODIFY_PATH ON)
|
||||
SET(CPACK_NSIS_DISPLAY_NAME "NetCDF ${netCDF_VERSION}")
|
||||
SET(CPACK_NSIS_PACKAGE_NAME "NetCDF ${netCDF_VERSION}")
|
||||
SET(CPACK_NSIS_HELP_LINK "https://www.unidata.ucar.edu/netcdf")
|
||||
SET(CPACK_NSIS_URL_INFO_ABOUT "https://www.unidata.ucar.edu/netcdf")
|
||||
SET(CPACK_NSIS_CONTACT "support-netcdf@unidata.ucar.edu")
|
||||
SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
|
||||
SET(CPACK_NSIS_MENU_LINKS
|
||||
if(WIN32)
|
||||
set(CPACK_NSIS_MODIFY_PATH ON)
|
||||
set(CPACK_NSIS_DISPLAY_NAME "NetCDF ${netCDF_VERSION}")
|
||||
set(CPACK_NSIS_PACKAGE_NAME "NetCDF ${netCDF_VERSION}")
|
||||
set(CPACK_NSIS_HELP_LINK "https://www.unidata.ucar.edu/netcdf")
|
||||
set(CPACK_NSIS_URL_INFO_ABOUT "https://www.unidata.ucar.edu/netcdf")
|
||||
set(CPACK_NSIS_CONTACT "support-netcdf@unidata.ucar.edu")
|
||||
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
|
||||
set(CPACK_NSIS_MENU_LINKS
|
||||
"https://www.unidata.ucar.edu/software/netcdf" "Unidata Website"
|
||||
"https://docs.unidata.ucar.edu/netcdf-c" "NetCDF Stable Documentation")
|
||||
|
||||
ENDIF()
|
||||
endif()
|
||||
|
||||
###
|
||||
# Set debian-specific options used when
|
||||
@ -70,52 +70,48 @@ ENDIF()
|
||||
###
|
||||
|
||||
# This should be set using the output of dpkg --print-architecture.
|
||||
FIND_PROGRAM(NC_DPKG NAMES dpkg)
|
||||
IF(NC_DPKG)
|
||||
if(NC_DPKG)
|
||||
# Define a macro for getting the dpkg architecture.
|
||||
MACRO(getdpkg_arch arch)
|
||||
execute_process(COMMAND "${NC_DPKG}" "--print-architecture" OUTPUT_VARIABLE "${arch}" OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
ENDMACRO(getdpkg_arch)
|
||||
getdpkg_arch(dpkg_arch)
|
||||
|
||||
SET(CPACK_DEBIAN_PACKAGE_NAME "netcdf4-dev")
|
||||
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${dpkg_arch}")
|
||||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "zlib1g (>= 1:1.2.3.4), libhdf5-7 (>= 1.8.11), libcurl4-openssl-dev (>= 7.22.0)")
|
||||
ENDIF()
|
||||
set(CPACK_DEBIAN_PACKAGE_NAME "netcdf4-dev")
|
||||
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${dpkg_arch}")
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "zlib1g (>= 1:1.2.3.4), libhdf5-7 (>= 1.8.11), libcurl4-openssl-dev (>= 7.22.0)")
|
||||
endif()
|
||||
|
||||
|
||||
##
|
||||
# Set Copyright, License info for CPack.
|
||||
##
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT
|
||||
${CMAKE_CURRENT_BINARY_DIR}/COPYRIGHT.txt
|
||||
@ONLY
|
||||
)
|
||||
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYRIGHT.txt")
|
||||
IF(NOT CPACK_PACK_VERSION)
|
||||
SET(CPACK_PACKAGE_VERSION ${VERSION})
|
||||
ENDIF()
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYRIGHT.txt")
|
||||
if(NOT CPACK_PACK_VERSION)
|
||||
set(CPACK_PACKAGE_VERSION ${VERSION})
|
||||
endif()
|
||||
|
||||
IF(UNIX)
|
||||
SET(CPACK_GENERATOR "STGZ" "TBZ2" "DEB" "ZIP")
|
||||
ENDIF()
|
||||
if(UNIX)
|
||||
set(CPACK_GENERATOR "STGZ" "TBZ2" "DEB" "ZIP")
|
||||
endif()
|
||||
|
||||
IF(APPLE)
|
||||
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
SET(CPACK_GENERATOR "productbuild" "STGZ" "TBZ2" "TGZ" "ZIP")
|
||||
ENDIF()
|
||||
if(APPLE)
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
set(CPACK_GENERATOR "productbuild" "STGZ" "TBZ2" "TGZ" "ZIP")
|
||||
endif()
|
||||
|
||||
##
|
||||
# Create an 'uninstall' target.
|
||||
##
|
||||
CONFIGURE_FILE(
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
|
||||
|
||||
ADD_CUSTOM_TARGET(uninstall
|
||||
add_custom_target(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
||||
|
||||
##
|
||||
@ -133,4 +129,4 @@ set(CPACK_COMPONENT_DEPENDENCIES_DESCRIPTION
|
||||
set(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION
|
||||
"The NetCDF-C user documentation.")
|
||||
|
||||
INCLUDE(CPack)
|
||||
include(CPack)
|
2813
CMakeLists.txt
@ -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
|
||||
|
@ -1 +1 @@
|
||||
EXECUTE_PROCESS(COMMAND sh -c "${CMAKE_BINARY_DIR}/postinstall.sh -t cmake")
|
||||
execute_process(COMMAND sh -c "${CMAKE_BINARY_DIR}/postinstall.sh -t cmake")
|
@ -8,6 +8,10 @@ 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).
|
||||
* Improve the speed and data quantity for DAP4 queries. See [Github #2765](https://github.com/Unidata/netcdf-c/pull/2765).
|
||||
* Remove the use of execinfo to programmatically dump the stack; it never worked. See [Github #2789](https://github.com/Unidata/netcdf-c/pull/2789).
|
||||
* Update the internal copy of tinyxml2 to latest code. See [Github #2771](https://github.com/Unidata/netcdf-c/pull/2771).
|
||||
|
55
cmake/check_hdf5.cmake
Normal file
@ -0,0 +1,55 @@
|
||||
# Work out which HDF5 config header we can safely include
|
||||
#
|
||||
# We'd like to just use H5public.h, but if HDF5 was built against MPI, this
|
||||
# might require us to have found MPI already. The next best file is H5pubconf.h,
|
||||
# which actually has all the feature macros we want to check, but some
|
||||
# distributions rename this for multiarch, so we've got to check some different
|
||||
# names.
|
||||
#
|
||||
# HDF5_INCLUDE_DIR should already be set before calling this
|
||||
function(check_hdf5_feature_header)
|
||||
if (_H5_FEATURE_HEADER)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(CheckIncludeFile)
|
||||
|
||||
set(CMAKE_REQUIRED_INCLUDES ${HDF5_INCLUDE_DIR})
|
||||
|
||||
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${_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()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
message(FATAL_ERROR "Could not include any HDF5 config headers")
|
||||
endfunction()
|
||||
|
||||
|
||||
# Check for an HDF5 feature macro named FEATURE and store the result in VAR
|
||||
#
|
||||
# This just wraps `check_c_source_compiles` but ensures we use the correct header
|
||||
function(check_hdf5_feature VAR FEATURE)
|
||||
if (NOT _H5_FEATURE_HEADER)
|
||||
check_hdf5_feature_header()
|
||||
endif()
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${HDF5_INCLUDE_DIR})
|
||||
|
||||
message(STATUS "Checking for ${FEATURE}")
|
||||
check_c_source_compiles("
|
||||
#include <${_H5_FEATURE_HEADER}>
|
||||
#if !${FEATURE}
|
||||
#error
|
||||
#endif
|
||||
int main() {}"
|
||||
_has_${FEATURE})
|
||||
|
||||
set(${VAR} ${_has_${FEATURE}} PARENT_SCOPE)
|
||||
endfunction()
|
650
cmake/dependencies.cmake
Normal file
@ -0,0 +1,650 @@
|
||||
################################
|
||||
# PkgConfig
|
||||
################################
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
################################
|
||||
# MakeDist
|
||||
################################
|
||||
# Enable 'dist and distcheck'.
|
||||
# File adapted from http://ensc.de/cmake/FindMakeDist.cmake
|
||||
find_package(MakeDist)
|
||||
# End 'enable dist and distcheck'
|
||||
|
||||
################################
|
||||
# HDF4
|
||||
################################
|
||||
if(ENABLE_HDF4)
|
||||
set(USE_HDF4 ON )
|
||||
# Check for include files, libraries.
|
||||
|
||||
find_path(MFHDF_H_INCLUDE_DIR mfhdf.h)
|
||||
if(NOT MFHDF_H_INCLUDE_DIR)
|
||||
message(FATAL_ERROR "HDF4 Support specified, cannot find file mfhdf.h")
|
||||
else()
|
||||
include_directories(${MFHDF_H_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
find_library(HDF4_DF_LIB NAMES df libdf hdf)
|
||||
if(NOT HDF4_DF_LIB)
|
||||
message(FATAL_ERROR "Can't find or link to the hdf4 df library.")
|
||||
endif()
|
||||
|
||||
find_library(HDF4_MFHDF_LIB NAMES mfhdf libmfhdf)
|
||||
if(NOT HDF4_MFHDF_LIB)
|
||||
message(FATAL_ERROR "Can't find or link to the hdf4 mfhdf library.")
|
||||
endif()
|
||||
|
||||
set(HAVE_LIBMFHDF TRUE )
|
||||
|
||||
set(HDF4_LIBRARIES ${HDF4_DF_LIB} ${HDF4_MFHDF_LIB} )
|
||||
# End include files, libraries.
|
||||
message(STATUS "HDF4 libraries: ${HDF4_DF_LIB}, ${HDF4_MFHDF_LIB}")
|
||||
|
||||
message(STATUS "Seeking HDF4 jpeg dependency.")
|
||||
|
||||
# Look for the jpeglib.h header file.
|
||||
find_path(JPEGLIB_H_INCLUDE_DIR jpeglib.h)
|
||||
if(NOT JPEGLIB_H_INCLUDE_DIR)
|
||||
message(FATAL_ERROR "HDF4 Support enabled but cannot find jpeglib.h")
|
||||
else()
|
||||
set(HAVE_JPEGLIB_H ON CACHE BOOL "")
|
||||
set(HAVE_LIBJPEG TRUE )
|
||||
include_directories(${JPEGLIB_H_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
find_library(JPEG_LIB NAMES jpeg libjpeg)
|
||||
if(NOT JPEG_LIB)
|
||||
message(FATAL_ERROR "HDF4 Support enabled but cannot find libjpeg")
|
||||
endif()
|
||||
set(HDF4_LIBRARIES ${JPEG_LIB} ${HDF4_LIBRARIES} )
|
||||
message(STATUS "Found JPEG libraries: ${JPEG_LIB}")
|
||||
|
||||
# Option to enable HDF4 file tests.
|
||||
option(ENABLE_HDF4_FILE_TESTS "Run HDF4 file tests. This fetches sample HDF4 files from the Unidata ftp site to test with (requires curl)." ON)
|
||||
if(ENABLE_HDF4_FILE_TESTS)
|
||||
find_program(PROG_CURL NAMES curl)
|
||||
if(PROG_CURL)
|
||||
set(USE_HDF4_FILE_TESTS ON )
|
||||
else()
|
||||
message(STATUS "Unable to locate 'curl'. Disabling hdf4 file tests.")
|
||||
set(USE_HDF4_FILE_TESTS OFF )
|
||||
endif()
|
||||
set(USE_HDF4_FILE_TESTS ${USE_HDF4_FILE_TESTS} )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
################################
|
||||
# HDF5
|
||||
################################
|
||||
##
|
||||
# Option to Enable HDF5
|
||||
#
|
||||
# The HDF5 cmake variables differ between platform (linux/osx and Windows),
|
||||
# as well as between HDF5 versions. As a result, this section is a bit convoluted.
|
||||
#
|
||||
# Note that the behavior seems much more stable across HDF5 versions under linux,
|
||||
# so we do not have to do as much version-based tweaking.
|
||||
#
|
||||
# At the end of it, we should have the following defined:
|
||||
#
|
||||
# * HDF5_C_LIBRARY
|
||||
# * HDF5_HL_LIBRARY
|
||||
# * HDF5_LIBRARIES
|
||||
# * HDF5_INCLUDE_DIR
|
||||
# *
|
||||
##
|
||||
if(USE_HDF5)
|
||||
|
||||
##
|
||||
# Assert HDF5 version meets minimum required version.
|
||||
##
|
||||
set(HDF5_VERSION_REQUIRED 1.8.10)
|
||||
|
||||
|
||||
##
|
||||
# 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()
|
||||
|
||||
###
|
||||
# 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()
|
||||
|
||||
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)
|
||||
|
||||
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)
|
||||
|
||||
# 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.
|
||||
|
||||
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.")
|
||||
else()
|
||||
# If user has specified the `ZLIB_LIBRARY`, use it; otherwise try to find...
|
||||
if(NOT ZLIB_LIBRARY)
|
||||
find_package(ZLIB)
|
||||
if(ZLIB_FOUND)
|
||||
set(ZLIB_LIBRARY ${ZLIB_LIBRARIES} )
|
||||
else()
|
||||
message(FATAL_ERROR "HDF5 Requires ZLIB, but cannot find libz.")
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARY} ${CMAKE_REQUIRED_LIBRARIES} )
|
||||
message(STATUS "HDF5 has zlib.")
|
||||
endif()
|
||||
|
||||
|
||||
# Check to see if H5Z_SZIP exists in HDF5_Libraries. If so, we must use szip library.
|
||||
check_hdf5_feature(HAVE_H5Z_SZIP H5_HAVE_FILTER_SZIP)
|
||||
|
||||
|
||||
####
|
||||
# Check to see if HDF5 library is 1.10.6 or greater.
|
||||
# Used to control path name conversion
|
||||
####
|
||||
if(${HDF5_VERSION} VERSION_GREATER "1.10.5")
|
||||
set(HDF5_UTF8_PATHS ON )
|
||||
else()
|
||||
set(HDF5_UTF8_PATHS OFF )
|
||||
endif()
|
||||
|
||||
message("-- 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}.
|
||||
|
||||
# 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} )
|
||||
|
||||
#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 to see if H5Dread_chunk is available
|
||||
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Dread_chunk "" 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 to see if this is hdf5-1.10.3 or later.
|
||||
if(HAS_READCHUNKS)
|
||||
set(HDF5_SUPPORTS_PAR_FILTERS ON )
|
||||
set(ENABLE_NCDUMPCHUNKS ON )
|
||||
endif()
|
||||
|
||||
# Record if ROS3 Driver is available
|
||||
if(HAS_HDF5_ROS3)
|
||||
set(ENABLE_HDF5_ROS3 ON )
|
||||
endif()
|
||||
|
||||
IF (HDF5_SUPPORTS_PAR_FILTERS)
|
||||
set(HDF5_HAS_PAR_FILTERS TRUE CACHE BOOL "" )
|
||||
set(HAS_PAR_FILTERS yes CACHE STRING "" )
|
||||
else()
|
||||
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)
|
||||
|
||||
################################
|
||||
# Curl
|
||||
################################
|
||||
# See if we have libcurl
|
||||
find_package(CURL)
|
||||
ADD_DEFINITIONS(-DCURL_STATICLIB=1)
|
||||
include_directories(${CURL_INCLUDE_DIRS})
|
||||
|
||||
# Define a test flag for have curl library
|
||||
if(CURL_LIBRARIES OR CURL_LIBRARY)
|
||||
set(FOUND_CURL TRUE)
|
||||
else()
|
||||
set(FOUND_CURL FALSE)
|
||||
endif()
|
||||
set(FOUND_CURL ${FOUND_CURL} TRUE )
|
||||
|
||||
# Start disabling if curl not found
|
||||
if(NOT FOUND_CURL)
|
||||
message(WARNING "ENABLE_REMOTE_FUNCTIONALITY requires libcurl; disabling")
|
||||
set(ENABLE_REMOTE_FUNCTIONALITY OFF CACHE BOOL "ENABLE_REMOTE_FUNCTIONALITY requires libcurl; disabling" FORCE )
|
||||
endif()
|
||||
|
||||
set (CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
|
||||
# Check to see if we have libcurl 7.66 or later
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#include <curl/curl.h>
|
||||
int main() {
|
||||
#if LIBCURL_VERSION_NUM < 0x074200
|
||||
choke me;
|
||||
#endif
|
||||
}" HAVE_LIBCURL_766)
|
||||
|
||||
IF (HAVE_LIBCURL_766)
|
||||
# If libcurl version is >= 7.66, then can skip tests
|
||||
# for these symbols which were added in an earlier version
|
||||
set(HAVE_CURLOPT_USERNAME TRUE)
|
||||
set(HAVE_CURLOPT_PASSWORD TRUE)
|
||||
set(HAVE_CURLOPT_KEYPASSWD TRUE)
|
||||
set(HAVE_CURLINFO_RESPONSE_CODE TRUE)
|
||||
set(HAVE_CURLINFO_HTTP_CONNECTCODE TRUE)
|
||||
set(HAVE_CURLOPT_BUFFERSIZE TRUE)
|
||||
set(HAVE_CURLOPT_KEEPALIVE TRUE)
|
||||
else()
|
||||
# Check to see if CURLOPT_USERNAME is defined.
|
||||
# It is present starting version 7.19.1.
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#include <curl/curl.h>
|
||||
int main() {int x = CURLOPT_USERNAME;}" HAVE_CURLOPT_USERNAME)
|
||||
|
||||
# Check to see if CURLOPT_PASSWORD is defined.
|
||||
# It is present starting version 7.19.1.
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#include <curl/curl.h>
|
||||
int main() {int x = CURLOPT_PASSWORD;}" HAVE_CURLOPT_PASSWORD)
|
||||
|
||||
# Check to see if CURLOPT_KEYPASSWD is defined.
|
||||
# It is present starting version 7.16.4.
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#include <curl/curl.h>
|
||||
int main() {int x = CURLOPT_KEYPASSWD;}" HAVE_CURLOPT_KEYPASSWD)
|
||||
|
||||
# Check to see if CURLINFO_RESPONSE_CODE is defined.
|
||||
# It showed up in curl 7.10.7.
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#include <curl/curl.h>
|
||||
int main() {int x = CURLINFO_RESPONSE_CODE;}" HAVE_CURLINFO_RESPONSE_CODE)
|
||||
|
||||
# Check to see if CURLINFO_HTTP_CONNECTCODE is defined.
|
||||
# It showed up in curl 7.10.7.
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#include <curl/curl.h>
|
||||
int main() {int x = CURLINFO_HTTP_CONNECTCODE;}" HAVE_CURLINFO_HTTP_CONNECTCODE)
|
||||
|
||||
# Check to see if CURLOPT_BUFFERSIZE is defined.
|
||||
# It is present starting version 7.59
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#include <curl/curl.h>
|
||||
int main() {int x = CURLOPT_BUFFERSIZE;}" HAVE_CURLOPT_BUFFERSIZE)
|
||||
|
||||
# Check to see if CURLOPT_TCP_KEEPALIVE is defined.
|
||||
# It is present starting version 7.25
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#include <curl/curl.h>
|
||||
int main() {int x = CURLOPT_TCP_KEEPALIVE;}" HAVE_CURLOPT_KEEPALIVE)
|
||||
endif()
|
||||
|
||||
################################
|
||||
# Math
|
||||
################################
|
||||
# Check for the math library so it can be explicitly linked.
|
||||
if(NOT WIN32)
|
||||
find_library(HAVE_LIBM NAMES math m libm)
|
||||
if(NOT HAVE_LIBM)
|
||||
CHECK_FUNCTION_EXISTS(exp HAVE_LIBM_FUNC)
|
||||
if(NOT HAVE_LIBM_FUNC)
|
||||
message(FATAL_ERROR "Unable to find the math library.")
|
||||
else(NOT HAVE_LIBM_FUNC)
|
||||
set(HAVE_LIBM "")
|
||||
endif()
|
||||
else(NOT HAVE_LIBM)
|
||||
message(STATUS "Found Math library: ${HAVE_LIBM}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
################################
|
||||
# zlib
|
||||
################################
|
||||
# See if we have zlib
|
||||
find_package(ZLIB)
|
||||
|
||||
# Define a test flag for have zlib library
|
||||
if(ZLIB_FOUND)
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
set(ENABLE_ZLIB TRUE)
|
||||
else()
|
||||
set(ENABLE_ZLIB FALSE)
|
||||
endif()
|
||||
|
||||
################################
|
||||
# Zips
|
||||
################################
|
||||
IF (ENABLE_FILTER_SZIP)
|
||||
find_package(Szip)
|
||||
elseif(ENABLE_NCZARR)
|
||||
find_package(Szip)
|
||||
endif()
|
||||
IF (ENABLE_FILTER_BZ2)
|
||||
find_package(Bz2)
|
||||
endif()
|
||||
IF (ENABLE_FILTER_BLOSC)
|
||||
find_package(Blosc)
|
||||
endif()
|
||||
IF (ENABLE_FILTER_ZSTD)
|
||||
find_package(Zstd)
|
||||
endif()
|
||||
|
||||
# Accumulate standard filters
|
||||
set(STD_FILTERS "deflate") # Always have deflate*/
|
||||
set_std_filter(Szip)
|
||||
set(HAVE_SZ ${Szip_FOUND})
|
||||
set(USE_SZIP ${HAVE_SZ})
|
||||
set_std_filter(Blosc)
|
||||
if(Zstd_FOUND)
|
||||
set_std_filter(Zstd)
|
||||
set(HAVE_ZSTD ON)
|
||||
endif()
|
||||
if(Bz2_FOUND)
|
||||
set_std_filter(Bz2)
|
||||
else()
|
||||
# The reason we use a local version is to support a more comples test case
|
||||
message("libbz2 not found using built-in version")
|
||||
set(HAVE_LOCAL_BZ2 ON)
|
||||
set(HAVE_BZ2 ON CACHE BOOL "")
|
||||
set(STD_FILTERS "${STD_FILTERS} bz2")
|
||||
endif()
|
||||
|
||||
IF (ENABLE_NCZARR_ZIP)
|
||||
find_package(Zip REQUIRED)
|
||||
include_directories(${Zip_INCLUDE_DIRS})
|
||||
endif ()
|
||||
|
||||
################################
|
||||
# S3
|
||||
################################
|
||||
# Note we check for the library after checking for enable_s3
|
||||
# because for some reason this screws up if we unconditionally test for sdk
|
||||
# and it is not available. Fix someday
|
||||
if(ENABLE_S3)
|
||||
if(NOT ENABLE_S3_INTERNAL)
|
||||
# See if aws-s3-sdk is available
|
||||
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})
|
||||
else(AWSSDK_FOUND)
|
||||
set(ENABLE_S3_AWS OFF CACHE BOOL "S3 AWS" FORCE)
|
||||
endif(AWSSDK_FOUND)
|
||||
else(NOT ENABLE_S3_INTERNAL)
|
||||
# Find crypto libraries required with testing with the internal s3 api.
|
||||
#find_library(SSL_LIB NAMES ssl openssl)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
if(NOT OpenSSL_FOUND)
|
||||
message(FATAL_ERROR "Can't find an ssl library, required by S3_INTERNAL")
|
||||
endif(NOT OpenSSL_FOUND)
|
||||
|
||||
#find_package(Crypto REQUIRED)
|
||||
#if(NOT CRYPTO_LIB)
|
||||
# message(FATAL_ERROR "Can't find a crypto library, required by S3_INTERNAL")
|
||||
#endif(NOT CRYPTO_LIB)
|
||||
|
||||
endif(NOT ENABLE_S3_INTERNAL)
|
||||
else()
|
||||
set(ENABLE_S3_AWS OFF CACHE BOOL "S3 AWS" FORCE)
|
||||
endif()
|
||||
|
||||
################################
|
||||
# LibXML
|
||||
################################
|
||||
# see if we have libxml2
|
||||
if(ENABLE_LIBXML2)
|
||||
find_package(LibXml2)
|
||||
if(LibXml2_FOUND)
|
||||
set(HAVE_LIBXML2 TRUE)
|
||||
include_directories(${LIBXML2_INCLUDE_DIRS})
|
||||
set(XMLPARSER "libxml2")
|
||||
else()
|
||||
set(HAVE_LIBXML2 FALSE)
|
||||
endif()
|
||||
endif(ENABLE_LIBXML2)
|
||||
|
||||
################################
|
||||
# MPI
|
||||
################################
|
||||
if(ENABLE_PARALLEL4 OR HDF5_PARALLEL)
|
||||
find_package(MPI REQUIRED)
|
||||
endif()
|
||||
|
||||
################################
|
||||
# parallel IO
|
||||
################################
|
||||
if(ENABLE_PNETCDF)
|
||||
find_library(PNETCDF NAMES pnetcdf)
|
||||
find_path(PNETCDF_INCLUDE_DIR pnetcdf.h)
|
||||
if(NOT PNETCDF)
|
||||
message(STATUS "Cannot find PnetCDF library. Disabling PnetCDF support.")
|
||||
set(USE_PNETCDF OFF CACHE BOOL "")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
################################
|
||||
# Doxygen
|
||||
################################
|
||||
|
||||
if(ENABLE_DOXYGEN)
|
||||
find_package(Doxygen REQUIRED)
|
||||
endif()
|
||||
|
||||
################################
|
||||
# NC_DPKG
|
||||
################################
|
||||
if (NETCDF_PACKAGE)
|
||||
find_program(NC_DPKG NAMES dpkg)
|
||||
endif()
|
0
cmake/modules/FindBlosc.cmake
Executable file → Normal file
@ -2,7 +2,10 @@
|
||||
#
|
||||
# Szip_FOUND Set to true to indicate the szip library was found
|
||||
# Szip_INCLUDE_DIRS The directory containing the header file szip/szip.h
|
||||
# Szip_LIBRARIES The libraries needed to use the szip library
|
||||
# Szip_LIBRARIES The libraries needed to use the szip library with the word "debug" and "optimized" when both are found
|
||||
# Szip_RELEASE_LIBRARY The path to the Szip release library if available
|
||||
# Szip_DEBUG_LIBRARY The path to the Szip debug library if available
|
||||
# Szip_LIBRARY The path to a Szip library, preferentially release but fallback to debug
|
||||
#
|
||||
# To specify an additional directory to search, set Szip_ROOT.
|
||||
#
|
||||
@ -38,13 +41,17 @@ IF(Szip_INCLUDE_DIRS)
|
||||
PATH_SUFFIXES Release ${CMAKE_LIBRARY_ARCHITECTURE} ${CMAKE_LIBRARY_ARCHITECTURE}/Release
|
||||
PATHS ${Szip_LIBRARY_DIRS} NO_DEFAULT_PATH)
|
||||
|
||||
SET(Szip_LIBRARIES )
|
||||
SET(Szip_LIBRARIES)
|
||||
SET(Szip_LIBRARY)
|
||||
IF(Szip_DEBUG_LIBRARY AND Szip_RELEASE_LIBRARY)
|
||||
SET(Szip_LIBRARIES debug ${Szip_DEBUG_LIBRARY} optimized ${Szip_RELEASE_LIBRARY})
|
||||
SET(Szip_LIBRARY ${Szip_RELEASE_LIBRARY})
|
||||
ELSEIF(Szip_DEBUG_LIBRARY)
|
||||
SET(Szip_LIBRARIES ${Szip_DEBUG_LIBRARY})
|
||||
SET(Szip_LIBRARY ${Szip_DEBUG_LIBRARY})
|
||||
ELSEIF(Szip_RELEASE_LIBRARY)
|
||||
SET(Szip_LIBRARIES ${Szip_RELEASE_LIBRARY})
|
||||
SET(Szip_LIBRARY ${Szip_RELEASE_LIBRARY})
|
||||
ENDIF(Szip_DEBUG_LIBRARY AND Szip_RELEASE_LIBRARY)
|
||||
|
||||
IF(Szip_LIBRARIES)
|
||||
|
0
cmake/modules/FindZip.cmake
Executable file → Normal file
329
cmake/netcdf_functions_macros.cmake
Normal file
@ -0,0 +1,329 @@
|
||||
################################
|
||||
# Macros
|
||||
################################
|
||||
|
||||
macro(set_std_filter filter)
|
||||
# Upper case the filter name
|
||||
string(TOUPPER "${filter}" upfilter)
|
||||
string(TOLOWER "${filter}" downfilter)
|
||||
if(ENABLE_FILTER_${upfilter})
|
||||
# Define a test flag for filter
|
||||
if(${filter}_FOUND)
|
||||
include_directories(${${filter}_INCLUDE_DIRS})
|
||||
set(ENABLE_${upfilter} TRUE)
|
||||
set(HAVE_${upfilter} ON)
|
||||
set(STD_FILTERS "${STD_FILTERS} ${downfilter}")
|
||||
message(">>> Standard Filter: ${downfilter}")
|
||||
else()
|
||||
set(ENABLE_${upfilter} FALSE)
|
||||
set(HAVE_${upfilter} OFF)
|
||||
endif()
|
||||
else()
|
||||
set(HAVE_${upfilter} OFF)
|
||||
endif()
|
||||
endmacro(set_std_filter)
|
||||
|
||||
macro(getuname name flag)
|
||||
execute_process(COMMAND "${UNAME}" "${flag}" OUTPUT_VARIABLE "${name}" OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endmacro(getuname)
|
||||
|
||||
# A macro to check if a C linker supports a particular flag.
|
||||
macro(CHECK_C_LINKER_FLAG M_FLAG M_RESULT)
|
||||
set(T_REQ_FLAG "${CMAKE_REQUIRED_FLAGS}")
|
||||
set(CMAKE_REQUIRED_FLAGS "${M_FLAG}")
|
||||
CHECK_C_SOURCE_COMPILES("int main() {return 0;}" ${M_RESULT})
|
||||
set(CMAKE_REQUIRED_FLAGS "${T_REQ_FLAG}")
|
||||
endmacro()
|
||||
|
||||
# Macro for replacing '/MD' with '/MT'.
|
||||
# Used only on Windows, /MD tells VS to use the shared
|
||||
# CRT libs, MT tells VS to use the static CRT libs.
|
||||
#
|
||||
# Taken From:
|
||||
# http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_build_my_MSVC_application_with_a_static_runtime.3F
|
||||
#
|
||||
macro(specify_static_crt_flag)
|
||||
set(vars
|
||||
CMAKE_C_FLAGS
|
||||
CMAKE_C_FLAGS_DEBUG
|
||||
CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_MINSIZEREL
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO)
|
||||
|
||||
foreach(flag_var ${vars})
|
||||
if(${flag_var} MATCHES "/MD")
|
||||
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(flag_var ${vars})
|
||||
message(STATUS " '${flag_var}': ${${flag_var}}")
|
||||
endforeach()
|
||||
message(STATUS "")
|
||||
endmacro()
|
||||
|
||||
# Macro to append files to the EXTRA_DIST files.
|
||||
# Note: can only be used in subdirectories because of the use of PARENT_SCOPE
|
||||
set(EXTRA_DIST "")
|
||||
macro(ADD_EXTRA_DIST files)
|
||||
foreach(F ${files})
|
||||
set(EXTRA_DIST ${EXTRA_DIST} ${CMAKE_CURRENT_SOURCE_DIR}/${F})
|
||||
set(EXTRA_DIST ${EXTRA_DIST} PARENT_SCOPE)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
macro(GEN_m4 filename)
|
||||
|
||||
set(fallbackdest "${CMAKE_CURRENT_SOURCE_DIR}/${filename}.c")
|
||||
set(dest "${CMAKE_CURRENT_BINARY_DIR}/${filename}.c")
|
||||
|
||||
# If m4 isn't present, and the generated file doesn't exist,
|
||||
# it cannot be generated and an error should be thrown.
|
||||
if(NOT HAVE_M4)
|
||||
if(NOT EXISTS ${fallbackdest})
|
||||
message(FATAL_ERROR "m4 is required to generate ${filename}.c. Please install m4 so that it is on the PATH and try again.")
|
||||
else()
|
||||
set(dest ${fallbackdest})
|
||||
endif()
|
||||
else()
|
||||
add_custom_command(
|
||||
OUTPUT ${dest}
|
||||
COMMAND ${NC_M4}
|
||||
ARGS ${M4FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/${filename}.m4 > ${dest}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
endif()
|
||||
endmacro(GEN_m4)
|
||||
|
||||
# Binary tests, but ones which depend on value of 'TEMP_LARGE' being defined.
|
||||
macro(add_bin_env_temp_large_test prefix F)
|
||||
add_executable(${prefix}_${F} ${F}.c)
|
||||
target_link_libraries(${prefix}_${F} netcdf)
|
||||
IF(MSVC)
|
||||
set_target_properties(${prefix}_${F}
|
||||
PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
|
||||
)
|
||||
endif()
|
||||
|
||||
add_test(${prefix}_${F} bash "-c" "TEMP_LARGE=${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${prefix}_${F}")
|
||||
if(MSVC)
|
||||
set_property(TARGET ${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_RELWITHDEBINFO
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Tests which are binary, but depend on a particular environmental variable.
|
||||
macro(add_bin_env_test prefix F)
|
||||
add_executable(${prefix}_${F} ${F}.c)
|
||||
target_link_libraries(${prefix}_${F} netcdf)
|
||||
if(MSVC)
|
||||
set_target_properties(${prefix}_${F}
|
||||
PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
|
||||
)
|
||||
endif()
|
||||
|
||||
add_test(${prefix}_${F} bash "-c" "TOPSRCDIR=${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${prefix}_${F}")
|
||||
if(MSVC)
|
||||
set_property(TARGET ${prefix}_${F} PROPERTY FOLDER "tests")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Build a binary used by a script, but don't make a test out of it.
|
||||
macro(build_bin_test F)
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${F}.c")
|
||||
add_executable(${F} "${CMAKE_CURRENT_SOURCE_DIR}/${F}.c" ${ARGN})
|
||||
else()
|
||||
# File should have been copied to the binary directory
|
||||
add_executable(${F} "${CMAKE_CURRENT_BINARY_DIR}/${F}.c" ${ARGN})
|
||||
endif()
|
||||
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})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Binary tests which are used by a script looking for a specific name.
|
||||
macro(add_bin_test_no_prefix F)
|
||||
build_bin_test(${F} ${ARGN})
|
||||
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})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Binary tests which are used by a script looking for a specific name.
|
||||
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})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Build a test and add it to the test list.
|
||||
macro(add_bin_test prefix F)
|
||||
add_executable(${prefix}_${F} ${F}.c ${ARGN})
|
||||
target_link_libraries(${prefix}_${F}
|
||||
${ALL_TLL_LIBS}
|
||||
netcdf
|
||||
)
|
||||
if(MSVC)
|
||||
set_target_properties(${prefix}_${F}
|
||||
PROPERTIES LINK_FLAGS_DEBUG " /NODEFAULTLIB:MSVCRT"
|
||||
)
|
||||
endif()
|
||||
add_test(${prefix}_${F}
|
||||
${EXECUTABLE_OUTPUT_PATH}/${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})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# A cmake script to print out information at the end of the configuration step.
|
||||
macro(print_conf_summary)
|
||||
message("")
|
||||
message("")
|
||||
message("Configuration Summary:")
|
||||
message("")
|
||||
message(STATUS "Building Shared Libraries: ${BUILD_SHARED_LIBS}")
|
||||
message(STATUS "Building netCDF-4: ${ENABLE_NETCDF_4}")
|
||||
message(STATUS "Building DAP2 Support: ${ENABLE_DAP2}")
|
||||
message(STATUS "Building DAP4 Support: ${ENABLE_DAP4}")
|
||||
message(STATUS "Building Byte-range Support: ${ENABLE_BYTERANGE}")
|
||||
message(STATUS "Building Utilities: ${BUILD_UTILITIES}")
|
||||
if(CMAKE_PREFIX_PATH)
|
||||
message(STATUS "CMake Prefix Path: ${CMAKE_PREFIX_PATH}")
|
||||
endif()
|
||||
message("")
|
||||
|
||||
if(${STATUS_PNETCDF} OR ${STATUS_PARALLEL})
|
||||
message("Building Parallel NetCDF")
|
||||
message(STATUS "Using PnetCDF: ${STATUS_PNETCDF}")
|
||||
message(STATUS "Using Parallel IO: ${STATUS_PARALLEL}")
|
||||
message("")
|
||||
endif()
|
||||
|
||||
message("Tests Enabled: ${ENABLE_TESTS}")
|
||||
if(ENABLE_TESTS)
|
||||
message(STATUS "DAP Remote Tests: ${ENABLE_DAP_REMOTE_TESTS}")
|
||||
message(STATUS "Extra Tests: ${ENABLE_EXTRA_TESTS}")
|
||||
message(STATUS "Coverage Tests: ${ENABLE_COVERAGE_TESTS}")
|
||||
message(STATUS "Parallel Tests: ${ENABLE_PARALLEL_TESTS}")
|
||||
message(STATUS "Large File Tests: ${ENABLE_LARGE_FILE_TESTS}")
|
||||
message(STATUS "Extreme Numbers: ${ENABLE_EXTREME_NUMBERS}")
|
||||
message(STATUS "Unit Tests: ${ENABLE_UNIT_TESTS}")
|
||||
endif()
|
||||
|
||||
message("")
|
||||
message("Compiler:")
|
||||
message("")
|
||||
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
|
||||
message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}")
|
||||
message(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}")
|
||||
if("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
|
||||
message(STATUS "CMAKE_C_FLAGS_DEBUG: ${CMAKE_C_FLAGS_DEBUG}")
|
||||
endif()
|
||||
if("${CMAKE_BUILD_TYPE}" STREQUAL "RELEASE")
|
||||
message(STATUS "CMAKE_C_FLAGS_RELEASE: ${CMAKE_C_FLAGS_RELEASE}")
|
||||
endif()
|
||||
|
||||
message(STATUS "Linking against: ${ALL_TLL_LIBS}")
|
||||
|
||||
message("")
|
||||
endmacro()
|
||||
|
||||
macro(add_sh_test prefix F)
|
||||
if(HAVE_BASH)
|
||||
add_test(${prefix}_${F} bash "-c" "export srcdir=${CMAKE_CURRENT_SOURCE_DIR};export TOPSRCDIR=${CMAKE_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR}/${F}.sh ${ARGN}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(getdpkg_arch arch)
|
||||
execute_process(COMMAND "${NC_DPKG}" "--print-architecture" OUTPUT_VARIABLE "${arch}" OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endmacro(getdpkg_arch)
|
||||
|
||||
################################
|
||||
# Functions
|
||||
################################
|
||||
|
||||
function(booleanize VALUE RETVAR)
|
||||
# force case
|
||||
string(TOLOWER "${VALUE}" LCVALUE)
|
||||
# Now do all the comparisons
|
||||
if(LCVALUE IN_LIST TRUELIST OR LCVALUE GREATER 0)
|
||||
set(${RETVAR} TRUE PARENT_SCOPE)
|
||||
elseif(LCVALUE IN_LIST FALSELIST OR LCVALUE MATCHES ".*-notfound" OR LCVALUE STREQUAL "")
|
||||
set(${RETVAR} FALSE PARENT_SCOPE)
|
||||
else()
|
||||
set(${RETVAR} NOTFOUND PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
# A function used to create autotools-style 'yes/no' definitions.
|
||||
# If a variable is set, it 'yes' is returned. Otherwise, 'no' is
|
||||
# returned.
|
||||
#
|
||||
# Also creates a version of the ret_val prepended with 'NC',
|
||||
# when feature is true, which is used to generate netcdf_meta.h.
|
||||
function(is_enabled feature ret_val)
|
||||
if(${feature})
|
||||
set(${ret_val} "yes" PARENT_SCOPE)
|
||||
set("NC_${ret_val}" 1 PARENT_SCOPE)
|
||||
else()
|
||||
set(${ret_val} "no" PARENT_SCOPE)
|
||||
set("NC_${ret_val}" 0 PARENT_SCOPE)
|
||||
endif(${feature})
|
||||
endfunction()
|
||||
|
||||
# A function used to create autotools-style 'yes/no' definitions.
|
||||
# If a variable is set, it 'yes' is returned. Otherwise, 'no' is
|
||||
# returned.
|
||||
#
|
||||
# Also creates a version of the ret_val prepended with 'NC',
|
||||
# when feature is true, which is used to generate netcdf_meta.h.
|
||||
function(is_disabled feature ret_val)
|
||||
if(${feature})
|
||||
set(${ret_val} "no" PARENT_SCOPE)
|
||||
else()
|
||||
set(${ret_val} "yes" PARENT_SCOPE)
|
||||
set("NC_${ret_val}" 1 PARENT_SCOPE)
|
||||
endif(${feature})
|
||||
endfunction()
|
@ -118,6 +118,12 @@ are set when opening a binary file on Windows. */
|
||||
/* if true, build byte-range Client */
|
||||
#cmakedefine ENABLE_BYTERANGE 1
|
||||
|
||||
/* if true, enable ERANGE fill */
|
||||
#cmakedefine ENABLE_ERANGE_FILL 1
|
||||
#ifdef ENABLE_ERANGE_FILL
|
||||
#define ERANGE_FILL 1
|
||||
#endif
|
||||
|
||||
/* if true, use hdf5 S3 virtual file reader */
|
||||
#cmakedefine ENABLE_HDF5_ROS3 1
|
||||
|
||||
|
@ -19,9 +19,9 @@ AC_INIT([netCDF],[4.9.3-development],[support-netcdf@unidata.ucar.edu],[netcdf-c
|
||||
##
|
||||
: ${CFLAGS=""}
|
||||
|
||||
AC_SUBST([NC_VERSION_MAJOR]) NC_VERSION_MAJOR=4
|
||||
AC_SUBST([NC_VERSION_MINOR]) NC_VERSION_MINOR=9
|
||||
AC_SUBST([NC_VERSION_PATCH]) NC_VERSION_PATCH=3
|
||||
AC_SUBST([netCDF_VERSION_MAJOR]) netCDF_VERSION_MAJOR=4
|
||||
AC_SUBST([netCDF_VERSION_MINOR]) netCDF_VERSION_MINOR=9
|
||||
AC_SUBST([netCDF_VERSION_PATCH]) netCDF_VERSION_PATCH=3
|
||||
AC_SUBST([NC_VERSION_NOTE]) NC_VERSION_NOTE="-development"
|
||||
|
||||
##
|
||||
|
@ -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
|
||||
|
760
docs/Doxyfile.in
@ -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
|
||||
|
||||
|
@ -67,9 +67,9 @@ https://thredds-test.unidata.ucar.edu/thredds/fileServer/irma/metar/files/METAR_
|
||||
|
||||
# References {#nccloud_bib}
|
||||
|
||||
<a name="ref_aws">[1]</a> [Amazon Simple Storage Service Documentation](https://docs.aws.amazon.com/s3/index.html)<br>
|
||||
<a name="ref_awssdk">[2]</a> [Amazon Simple Storage Service Library](https://github.com/aws/aws-sdk-cpp)<br>
|
||||
<a name="ref_awssdk_conda">[11]</a> [Conda-forge / packages / aws-sdk-cpp](https://anaconda.org/conda-forge/aws-sdk-cpp)<br>
|
||||
<a name="cloud_ref_aws">[1]</a> [Amazon Simple Storage Service Documentation](https://docs.aws.amazon.com/s3/index.html)<br>
|
||||
<a name="cloud_ref_awssdk">[2]</a> [Amazon Simple Storage Service Library](https://github.com/aws/aws-sdk-cpp)<br>
|
||||
<a name="cloud_ref_awssdk_conda">[11]</a> [Conda-forge / packages / aws-sdk-cpp](https://anaconda.org/conda-forge/aws-sdk-cpp)<br>
|
||||
|
||||
# Appendix A. S3 Build Support {#nccloud_s3build}
|
||||
|
||||
|
@ -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 -->
|
@ -520,7 +520,7 @@ Modifying the dispatch version requires two steps:
|
||||
|
||||
The two should agree in value.
|
||||
|
||||
### NC_DISPATCH_VERSION Incompatibility
|
||||
## NC_DISPATCH_VERSION Incompatibility
|
||||
|
||||
When dynamically adding a dispatch table
|
||||
-- in nc_def_user_format (see libdispatch/dfile.c) --
|
||||
|
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": {}
|
||||
}
|
118
docs/filters.md
@ -65,6 +65,28 @@ The concept of a variable-sized type is defined as follows:
|
||||
then that compound type is variable-sized.
|
||||
4. All other types are fixed-size.
|
||||
|
||||
## A Warning on Backward Compatibility {#filters_compatibility}
|
||||
|
||||
The API defined in this document should accurately reflect the
|
||||
current state of filters in the netCDF-c library. Be aware that
|
||||
there was a short period in which the filter code was undergoing
|
||||
some revision and extension. Those extensions have largely been
|
||||
reverted. Unfortunately, some users may experience some
|
||||
compilation problems for previously working code because of
|
||||
these reversions. In that case, please revise your code to
|
||||
adhere to this document. Apologies are extended for any
|
||||
inconvenience.
|
||||
|
||||
A user may encounter an incompatibility if any of the following appears in user code.
|
||||
|
||||
* The function *\_nc\_inq\_var\_filter* was returning the error value NC\_ENOFILTER if a variable had no associated filters.
|
||||
It has been reverted to the previous case where it returns NC\_NOERR and the returned filter id was set to zero if the variable had no filters.
|
||||
* The function *nc\_inq\_var\_filterids* was renamed to *nc\_inq\_var\_filter\_ids*.
|
||||
* Some auxilliary functions for parsing textual filter specifications have been moved to the file *netcdf\_aux.h*. See [Appendix A](#filters_appendixa).
|
||||
* All of the "filterx" functions have been removed. This is unlikely to cause problems because they had limited visibility.
|
||||
|
||||
For additional information, see [Appendix B](#filters_appendixb).
|
||||
|
||||
## Enabling A HDF5 Compression Filter {#filters_enable}
|
||||
|
||||
HDF5 supports dynamic loading of compression filters using the
|
||||
@ -611,7 +633,99 @@ As part of its testing, the NetCDF build process creates a number of shared libr
|
||||
If you need a filter from that set, you may be able to set *HDF5\_PLUGIN\_PATH*
|
||||
to point to that directory or you may be able to copy the shared libraries out of that directory to your own location.
|
||||
|
||||
## Debugging {#filters_debug}
|
||||
# Lossy One-Way Filters
|
||||
|
||||
As of NetCDF version 4.8.2, the netcdf-c library supports
|
||||
bit-grooming filters.
|
||||
````
|
||||
Bit-grooming is a lossy compression algorithm that removes the
|
||||
bloat due to false-precision, those bits and bytes beyond the
|
||||
meaningful precision of the data. Bit Grooming is statistically
|
||||
unbiased, applies to all floating point numbers, and is easy to
|
||||
use. Bit-Grooming reduces data storage requirements by
|
||||
25-80%. Unlike its best-known competitor Linear Packing, Bit
|
||||
Grooming imposes no software overhead on users, and guarantees
|
||||
its precision throughout the whole floating point range
|
||||
[https://doi.org/10.5194/gmd-9-3199-2016].
|
||||
````
|
||||
The generic term "quantize" is used to refer collectively to the various
|
||||
precision-trimming algorithms. The key thing to note about quantization is that
|
||||
it occurs at the point of writing of data only. Since its output is
|
||||
legal data, it does not need to be "de-quantized" when the data is read.
|
||||
Because of this, quantization is not part of the standard filter
|
||||
mechanism and has a separate API.
|
||||
|
||||
The API for bit-groom is currently as follows.
|
||||
````
|
||||
int nc_def_var_quantize(int ncid, int varid, int quantize_mode, int nsd);
|
||||
int nc_inq_var_quantize(int ncid, int varid, int *quantize_modep, int *nsdp);
|
||||
````
|
||||
The *quantize_mode* argument specifies the particular algorithm.
|
||||
Currently, three are supported: NC_QUANTIZE_BITGROOM, NC_QUANTIZE_GRANULARBR,
|
||||
and NC_QUANTIZE_BITROUND. In addition quantization can be disabled using
|
||||
the value NC_NOQUANTIZE.
|
||||
|
||||
The input to ncgen or the output from ncdump supports special attributes
|
||||
to indicate if quantization was applied to a given variable.
|
||||
These attributes have the following form.
|
||||
````
|
||||
_QuantizeBitGroomNumberOfSignificantDigits = <NSD>
|
||||
or
|
||||
_QuantizeGranularBitRoundNumberOfSignificantDigits = <NSD>
|
||||
or
|
||||
_QuantizeBitRoundNumberOfSignificantBits = <NSB>
|
||||
````
|
||||
The value NSD is the number of significant (decimal) digits to keep.
|
||||
The value NSB is the number of bits to keep in the fraction part of an
|
||||
IEEE754 floating-point number. Note that NSB of QuantizeBitRound is the same as
|
||||
"number of explicit mantissa bits" (https://doi.org/10.5194/gmd-9-3199-2016) and same as
|
||||
the number of "keep-bits" (https://doi.org/10.5194/gmd-14-377-2021), but is not
|
||||
one less than the number of significant bunary figures:
|
||||
`_QuantizeBitRoundNumberOfSignificantBits = 0` means one significant binary figure,
|
||||
`_QuantizeBitRoundNumberOfSignificantBits = 1` means two significant binary figures etc.
|
||||
|
||||
## Distortions introduced by lossy filters
|
||||
|
||||
Any lossy filter introduces distortions to data.
|
||||
The lossy filters implemented in netcdf-c introduce a distortoin
|
||||
that can be quantified in terms of a _relative_ error. The magnitude of
|
||||
distortion introduced to every single value V is guaranteed to be within
|
||||
a certain fraction of V, expressed as 0.5 * V * 2**{-NSB}:
|
||||
i.e. it is 0.5V for NSB=0, 0.25V for NSB=1, 0.125V for NSB=2 etc.
|
||||
|
||||
|
||||
Two other methods use different definitions of _decimal precision_, though both
|
||||
are guaranteed to reproduce NSD decimals when printed.
|
||||
The margin for a relative error introduced by the methods are summarised in the table
|
||||
|
||||
```
|
||||
NSD 1 2 3 4 5 6 7
|
||||
|
||||
BitGroom
|
||||
Error Margin 3.1e-2 3.9e-3 4.9e-4 3.1e-5 3.8e-6 4.7e-7 -
|
||||
|
||||
GranularBitRound
|
||||
Error Margin 1.4e-1 1.9e-2 2.2e-3 1.4e-4 1.8e-5 2.2e-6 -
|
||||
|
||||
```
|
||||
|
||||
|
||||
If one defines decimal precision as in BitGroom, i.e. the introduced relative
|
||||
error must not exceed half of the unit at the decimal place NSD in the
|
||||
worst-case scenario, the following values of NSB should be used for BitRound:
|
||||
|
||||
```
|
||||
NSD 1 2 3 4 5 6 7
|
||||
NSB 3 6 9 13 16 19 23
|
||||
```
|
||||
|
||||
The resulting application of BitRound is as fast as BitGroom, and is free from
|
||||
artifacts in multipoint statistics introduced by BitGroom
|
||||
(see https://doi.org/10.5194/gmd-14-377-2021).
|
||||
|
||||
|
||||
# Debugging {#filters_debug}
|
||||
|
||||
|
||||
Depending on the debugger one uses, debugging plugins can be very difficult.
|
||||
It may be necessary to use the old printf approach for debugging the filter itself.
|
||||
@ -625,7 +739,7 @@ This can be accomplished using this command.
|
||||
Since ncdump is not being asked to access the data (the -h flag), it can obtain the filter information without failures.
|
||||
Then it can print out the filter id and the parameters as well as the Codecs (via the -s flag).
|
||||
|
||||
### Test Cases {#filters_TestCase}
|
||||
## Test Cases {#filters_TestCase}
|
||||
|
||||
Within the netcdf-c source tree, the directory two directories contain test cases for testing dynamic filter operation.
|
||||
|
||||
|
@ -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 -->
|
||||
|
@ -8,13 +8,13 @@ This document attempts to record important information about
|
||||
the internal architecture and operation of the netcdf-c library.
|
||||
It covers the following issues.
|
||||
|
||||
* [Including C++ Code in the netcdf-c Library](#intern_c++)
|
||||
* [Including C++ Code in the netcdf-c Library](#intern_cpp)
|
||||
* [Managing instances of variable-length data types](#intern_vlens)
|
||||
* [Inferring File Types](#intern_infer)
|
||||
* [Adding a Standard Filter](#intern_filters)
|
||||
* [Test Interference](#intern_isolation)
|
||||
|
||||
# 1. Including C++ Code in the netcdf-c Library {#intern_c++}
|
||||
# 1. Including C++ Code in the netcdf-c Library {#intern_cpp}
|
||||
|
||||
The state of C compiler technology has reached the point where
|
||||
it is possible to include C++ code into the netcdf-c library
|
||||
|
@ -13,26 +13,13 @@ The NetCDF homepage may be found at <a href="https://www.unidata.ucar.edu/softwa
|
||||
|
||||
You can find the documentation for netCDF-Fortran here:
|
||||
|
||||
- <a href="https://www.unidata.ucar.edu/software/netcdf/fortran/docs"> The NetCDF-Fortran Developer's Guide</a>
|
||||
- <a href="https://docs.unidata.ucar.edu/netcdf-fortran/current/"> The NetCDF-Fortran Developer's Guide</a>
|
||||
|
||||
\section this_release Learn more about the current NetCDF-C Release
|
||||
|
||||
- \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
|
||||
|
@ -417,7 +417,7 @@ In order to accomodate existing implementations, certain mode tags are provided
|
||||
|
||||
## XArray
|
||||
|
||||
The Xarray <a href="#ref_xarray">[7]</a> Zarr implementation uses its own mechanism for specifying shared dimensions.
|
||||
The Xarray [XArray Zarr Encoding Specification](http://xarray.pydata.org/en/latest/internals.html#zarr-encoding-specification) Zarr implementation uses its own mechanism for specifying shared dimensions.
|
||||
It uses a special attribute named ''_ARRAY_DIMENSIONS''.
|
||||
The value of this attribute is a list of dimension names (strings).
|
||||
An example might be ````["time", "lon", "lat"]````.
|
||||
@ -449,16 +449,16 @@ Here are a couple of examples using the _ncgen_ and _ncdump_ utilities.
|
||||
```
|
||||
4. Create an nczarr file using S3 as storage and keeping to the pure zarr format.
|
||||
```
|
||||
ncgen -4 -lb -o "s3://s3.uswest-1.amazonaws.com/datasetbucket#mode=zarr" dataset.cdl
|
||||
ncgen -4 -lb -o 's3://s3.uswest-1.amazonaws.com/datasetbucket\#mode=zarr dataset.cdl
|
||||
```
|
||||
5. Create an nczarr file using the s3 protocol with a specific profile
|
||||
```
|
||||
ncgen -4 -lb -o "s3://datasetbucket/rootkey#mode=nczarr,awsprofile=unidata" dataset.cdl
|
||||
ncgen -4 -lb -o 's3://datasetbucket/rootkey\#mode=nczarr,awsprofile=unidata' dataset.cdl
|
||||
```
|
||||
Note that the URL is internally translated to this
|
||||
````
|
||||
https://s2.<region>.amazonaws.com/datasetbucket/rootkey#mode=nczarr,awsprofile=unidata" dataset.cdl
|
||||
````
|
||||
```
|
||||
'https://s2.<region>.amazonaws.com/datasetbucket/rootkey#mode=nczarr,awsprofile=unidata' dataset.cdl
|
||||
```
|
||||
|
||||
# References {#nczarr_bib}
|
||||
|
||||
@ -473,7 +473,7 @@ collections — High-performance dataset datatypes](https://docs.python.org/2/li
|
||||
<a name="dynamic_filter_loading">[8]</a> [Dynamic Filter Loading](https://support.hdfgroup.org/HDF5/doc/Advanced/DynamicallyLoadedFilters/HDF5DynamicallyLoadedFilters.pdf)<br>
|
||||
<a name="official_hdf5_filters">[9]</a> [Officially Registered Custom HDF5 Filters](https://portal.hdfgroup.org/display/support/Registered+Filter+Plugins)<br>
|
||||
<a name="blosc-c-impl">[10]</a> [C-Blosc Compressor Implementation](https://github.com/Blosc/c-blosc)<br>
|
||||
<a name="ref_awssdk_conda">[11]</a> [Conda-forge / packages / aws-sdk-cpp](https://anaconda.org/conda-forge/aws-sdk-cpp)<br>
|
||||
<a name="ref_awssdk_conda">[11]</a> [Conda-forge packages / aws-sdk-cpp](https://anaconda.org/conda-forge/aws-sdk-cpp)<br>
|
||||
<a name="ref_gdal">[12]</a> [GDAL Zarr](https://gdal.org/drivers/raster/zarr.html)<br>
|
||||
|
||||
# Appendix A. Building NCZarr Support {#nczarr_build}
|
||||
@ -539,7 +539,7 @@ PATH="$PATH:${AWSSDKBIN}"
|
||||
Then the following options must be specified for cmake.
|
||||
````
|
||||
-DAWSSDK_ROOT_DIR=${AWSSDK_ROOT_DIR}
|
||||
-DAWSSDK_DIR=${AWSSDK_ROOT_DIR}/lib/cmake/AWSSDK"
|
||||
-DAWSSDK_DIR=${AWSSDK_ROOT_DIR}/lib/cmake/AWSSDK
|
||||
````
|
||||
# Appendix B. Amazon S3 Imposed Limits {#nczarr_s3limits}
|
||||
|
||||
@ -578,7 +578,7 @@ can in fact be any legal JSON expression.
|
||||
This "convention" is currently used routinely to help support various
|
||||
attributes created by other packages where the attribute is a
|
||||
complex JSON expression. An example is the GDAL Driver
|
||||
convention <a href="#ref_gdal">[12]</a>, where the value is a complex
|
||||
convention <a href='#ref_gdal'>[12]</a>, where the value is a complex
|
||||
JSON dictionary.
|
||||
|
||||
In order for NCZarr to be as consistent as possible with Zarr Version 2,
|
||||
|
0
docs/testserver.dox
Executable file → Normal file
@ -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
|
||||
|
@ -452,7 +452,7 @@ main()
|
||||
hr_data_out[i].starfleet_id = i;
|
||||
hr_data_out[i].svc_rec.i1 = 95;
|
||||
hr_data_out[i].svc_rec.i2 = 90;
|
||||
if (sprintf(hr_data_out[i].name, "alien_%d", i) < 0) ERR;
|
||||
if (snprintf(hr_data_out[i].name, sizeof(hr_data_out[i].name), "alien_%d", i) < 0) ERR;
|
||||
hr_data_out[i].max_temp = 99.99f;
|
||||
hr_data_out[i].min_temp = -9.99f;
|
||||
hr_data_out[i].percent_transporter_errosion = .1;
|
||||
@ -557,7 +557,7 @@ main()
|
||||
hr_data_out[i].starfleet_id = i;
|
||||
hr_data_out[i].svc_rec.i1 = 95;
|
||||
hr_data_out[i].svc_rec.i2 = 90;
|
||||
if (sprintf(hr_data_out[i].name, "alien_%d", i) < 0) ERR;
|
||||
if (snprintf(hr_data_out[i].name, sizeof(hr_data_out[i].name), "alien_%d", i) < 0) ERR;
|
||||
hr_data_out[i].max_temp = 99.99f;
|
||||
hr_data_out[i].min_temp = -9.99f;
|
||||
hr_data_out[i].percent_transporter_errosion = .1;
|
||||
@ -665,7 +665,7 @@ main()
|
||||
hr_data_out[i].starfleet_id = i;
|
||||
hr_data_out[i].svc_rec.i1 = 95;
|
||||
hr_data_out[i].svc_rec.i2 = 90;
|
||||
if (sprintf(hr_data_out[i].name, "alien_%d", i) < 0) ERR;
|
||||
if (snprintf(hr_data_out[i].name, sizeof(hr_data_out[i].name), "alien_%d", i) < 0) ERR;
|
||||
hr_data_out[i].max_temp = 99.99f;
|
||||
hr_data_out[i].min_temp = -9.99f;
|
||||
hr_data_out[i].percent_transporter_errosion = .1;
|
||||
@ -756,7 +756,7 @@ main()
|
||||
/* Create some phony data. */
|
||||
for (i = 0; i < DIM1_LEN; i++)
|
||||
{
|
||||
if (sprintf(hr_data_out[i].name, "alien_%d", i) < 0) ERR;
|
||||
if (snprintf(hr_data_out[i].name, sizeof(hr_data_out[i].name), "alien_%d", i) < 0) ERR;
|
||||
hr_data_out[i].max_temp = 99.99f;
|
||||
}
|
||||
|
||||
@ -841,7 +841,7 @@ main()
|
||||
/* Create some phony data. */
|
||||
for (i = 0; i < DIM2_LEN; i++)
|
||||
{
|
||||
if (sprintf(hr_data_out[i].name, "alien_%d", i) < 0) ERR;
|
||||
if (snprintf(hr_data_out[i].name, sizeof(hr_data_out[i].name), "alien_%d", i) < 0) ERR;
|
||||
hr_data_out[i].max_temp = 99.99f;
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,7 @@ main()
|
||||
if ((var1_spaceid = H5Screate_simple(1, dims, dims)) < 0) ERR;
|
||||
for (v = 0; v < NUM_DATASETS; v++)
|
||||
{
|
||||
sprintf(var_name, "var_%d", v);
|
||||
snprintf(var_name, sizeof(var_name), "var_%d", v);
|
||||
if ((var1_datasetid[v] = H5Dcreate1(grpid, var_name, H5T_NATIVE_INT,
|
||||
var1_spaceid, H5P_DEFAULT)) < 0) ERR;
|
||||
if (H5DSattach_scale(var1_datasetid[v], dimscaleid, 0) < 0) ERR;
|
||||
|
@ -633,6 +633,7 @@ main()
|
||||
hsize_t h5dimlen[DIMS2], h5dimlenmax[DIMS2], xtend_size[DIMS2] = {1, NUM_VALS};
|
||||
hsize_t start[DIMS2] = {0, 0};
|
||||
hsize_t count[DIMS2] = {1, NUM_VALS};
|
||||
hsize_t ones[DIMS2] = {1, 1};
|
||||
double value[NUM_VALS];
|
||||
int dataset_ndims;
|
||||
int i;
|
||||
@ -661,7 +662,7 @@ main()
|
||||
|
||||
/* Set up the file and memory spaces. */
|
||||
if (H5Sselect_hyperslab(file_spaceid, H5S_SELECT_SET,
|
||||
start, NULL, count, NULL) < 0) ERR;
|
||||
start, NULL, ones, count) < 0) ERR;
|
||||
if ((mem_spaceid = H5Screate_simple(DIMS2, count, NULL)) < 0) ERR;
|
||||
|
||||
/* Write a slice of data. */
|
||||
@ -683,7 +684,7 @@ main()
|
||||
/* Set up the file and memory spaces for a second slice. */
|
||||
start[0]++;
|
||||
if (H5Sselect_hyperslab(file_spaceid, H5S_SELECT_SET,
|
||||
start, NULL, count, NULL) < 0) ERR;
|
||||
start, NULL, ones, count) < 0) ERR;
|
||||
if ((mem_spaceid = H5Screate_simple(DIMS2, count, NULL)) < 0) ERR;
|
||||
|
||||
/* Write a second slice of data. */
|
||||
|
@ -93,7 +93,7 @@ main()
|
||||
spaceid, create_propid)) < 0) ERR;
|
||||
if (H5Sclose(spaceid) < 0) ERR;
|
||||
if (H5Pclose(create_propid) < 0) ERR;
|
||||
sprintf(dimscale_wo_var, "%s%10d", DIM_WITHOUT_VARIABLE, DIM_LEN);
|
||||
snprintf(dimscale_wo_var, sizeof(dimscale_wo_var), "%s%10d", DIM_WITHOUT_VARIABLE, DIM_LEN);
|
||||
if (H5DSset_scale(dimscaleid, dimscale_wo_var) < 0) ERR;
|
||||
|
||||
/* Create a variable that uses this dimension scale. */
|
||||
|
@ -154,7 +154,7 @@ main()
|
||||
char lang[NUM_LANG][STR_LEN + 1] = {"C", "Fortran", "C++", "MISSING"};
|
||||
enum langs {CLANG=0, Fortran=1, CPP=2, MISSING=255};
|
||||
short the_value, fill_value = MISSING, data_point = CLANG;
|
||||
hsize_t start[1] = {1}, count[1] = {1};
|
||||
hsize_t start[1] = {1}, count[1] = {1}, one[1] = {1};
|
||||
int num_members;
|
||||
size_t size;
|
||||
hid_t base_hdf_typeid;
|
||||
@ -197,7 +197,7 @@ main()
|
||||
if ((mem_spaceid = H5Screate(H5S_SCALAR)) < 0) ERR;
|
||||
if ((file_spaceid = H5Screate_simple(1, dims, NULL)) < 0) ERR;
|
||||
if (H5Sselect_hyperslab(file_spaceid, H5S_SELECT_SET,
|
||||
start, NULL, count, NULL) < 0) ERR;
|
||||
start, NULL, one, count) < 0) ERR;
|
||||
if (H5Dwrite(datasetid, typeid, mem_spaceid, file_spaceid,
|
||||
H5P_DEFAULT, &data_point) < 0) ERR;
|
||||
|
||||
|
@ -174,7 +174,7 @@ main()
|
||||
#define MILLION 1000000
|
||||
|
||||
hid_t fileid, write_spaceid, datasetid, mem_spaceid;
|
||||
hsize_t start[NDIMS], count[NDIMS];
|
||||
hsize_t start[NDIMS], count[NDIMS], ones[NDIMS];
|
||||
hsize_t dims[1];
|
||||
int *data;
|
||||
int num_steps;
|
||||
@ -210,8 +210,9 @@ main()
|
||||
{
|
||||
/* Select hyperslab for write of one slice. */
|
||||
start[0] = s * SC;
|
||||
ones[0] = 1;
|
||||
if (H5Sselect_hyperslab(write_spaceid, H5S_SELECT_SET,
|
||||
start, NULL, count, NULL) < 0) ERR;
|
||||
start, NULL, ones, count) < 0) ERR;
|
||||
|
||||
if (H5Dwrite(datasetid, H5T_NATIVE_INT, mem_spaceid, write_spaceid,
|
||||
H5P_DEFAULT, data) < 0) ERR;
|
||||
@ -242,13 +243,13 @@ main()
|
||||
hid_t mem_spaceid, xfer_plistid, native_typeid;
|
||||
hsize_t *chunksize, dims[1], maxdims[1], *dimsize, *maxdimsize;
|
||||
hsize_t fdims[MAX_DIMS], fmaxdims[MAX_DIMS];
|
||||
hsize_t start[MAX_DIMS], count[MAX_DIMS];
|
||||
hsize_t start[MAX_DIMS], count[MAX_DIMS], ones[MAX_DIMS];
|
||||
char file_name[STR_LEN + 1];
|
||||
char dimscale_wo_var[STR_LEN];
|
||||
void *bufr;
|
||||
void *fillp = NULL;
|
||||
|
||||
sprintf(file_name, "%s/%s", TEMP_LARGE, FILE_NAME);
|
||||
snprintf(file_name, sizeof(file_name), "%s/%s", TEMP_LARGE, FILE_NAME);
|
||||
|
||||
/* Create file access and create property lists. */
|
||||
if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) ERR;
|
||||
@ -285,7 +286,7 @@ main()
|
||||
spaceid, plistid)) < 0) ERR;
|
||||
if (H5Sclose(spaceid) < 0) ERR;
|
||||
if (H5Pclose(plistid) < 0) ERR;
|
||||
sprintf(dimscale_wo_var, "%s%10d", DIM_WITHOUT_VARIABLE, DIM1);
|
||||
snprintf(dimscale_wo_var, sizeof(dimscale_wo_var), "%s%10d", DIM_WITHOUT_VARIABLE, DIM1);
|
||||
if (H5DSset_scale(dim1_dimscaleid, dimscale_wo_var) < 0) ERR;
|
||||
|
||||
/* Create the dim2 dimscale. */
|
||||
@ -299,7 +300,7 @@ main()
|
||||
spaceid, plistid)) < 0) ERR;
|
||||
if (H5Sclose(spaceid) < 0) ERR;
|
||||
if (H5Pclose(plistid) < 0) ERR;
|
||||
sprintf(dimscale_wo_var, "%s%10d", DIM_WITHOUT_VARIABLE, DIM2);
|
||||
snprintf(dimscale_wo_var, sizeof(dimscale_wo_var), "%s%10d", DIM_WITHOUT_VARIABLE, DIM2);
|
||||
if (H5DSset_scale(dim2_dimscaleid, dimscale_wo_var) < 0) ERR;
|
||||
|
||||
/* Now create the 2D dataset. */
|
||||
@ -342,7 +343,8 @@ main()
|
||||
start[1] = 0;
|
||||
count[0] = 1;
|
||||
count[1] = 2097153;
|
||||
if (H5Sselect_hyperslab(file_spaceid, H5S_SELECT_SET, start, NULL, count, NULL) < 0) ERR;
|
||||
ones[0] = ones[1] = 1;
|
||||
if (H5Sselect_hyperslab(file_spaceid, H5S_SELECT_SET, start, NULL, ones, count) < 0) ERR;
|
||||
if ((mem_spaceid = H5Screate_simple(NDIMS2, count, NULL)) < 0) ERR;
|
||||
if ((xfer_plistid = H5Pcreate(H5P_DATASET_XFER)) < 0) ERR;
|
||||
if ((native_typeid = H5Tget_native_type(H5T_NATIVE_SCHAR, H5T_DIR_DEFAULT)) < 0) ERR;
|
||||
|
@ -67,7 +67,7 @@ main()
|
||||
/* Create the variables. */
|
||||
for (v = 0; v < NUM_DATASETS; v++)
|
||||
{
|
||||
sprintf(var_name, "var_%d", v);
|
||||
snprintf(var_name, sizeof(var_name), "var_%d", v);
|
||||
/* printf("creating var %s\n", var_name);*/
|
||||
if ((datasetid[v] = H5Dcreate1(grpid, var_name, H5T_NATIVE_INT,
|
||||
spaceid, plistid)) < 0) ERR_RET;
|
||||
|
@ -66,7 +66,7 @@ main(int argc, char **argv)
|
||||
printf("*** Creating file for parallel I/O read, and rereading it...");
|
||||
{
|
||||
hid_t fapl_id, fileid, whole_spaceid, dsid, slice_spaceid, whole_spaceid1, xferid;
|
||||
hsize_t start[NDIMS], count[NDIMS];
|
||||
hsize_t start[NDIMS], count[NDIMS], ones[NDIMS];
|
||||
hsize_t dims[1];
|
||||
int data[SC1], data_in[SC1];
|
||||
int num_steps;
|
||||
@ -126,8 +126,9 @@ main(int argc, char **argv)
|
||||
/* Select hyperslab for write of one slice. */
|
||||
start[0] = s * SC1 * p + my_rank * SC1;
|
||||
count[0] = SC1;
|
||||
ones[0] = 1;
|
||||
if (H5Sselect_hyperslab(whole_spaceid, H5S_SELECT_SET,
|
||||
start, NULL, count, NULL) < 0) ERR;
|
||||
start, NULL, ones, count) < 0) ERR;
|
||||
|
||||
if (H5Dwrite(dsid, H5T_NATIVE_INT, slice_spaceid, whole_spaceid,
|
||||
xferid, data) < 0) ERR;
|
||||
@ -185,8 +186,9 @@ main(int argc, char **argv)
|
||||
/* Select hyperslab for read of one slice. */
|
||||
start[0] = s * SC1 * p + my_rank * SC1;
|
||||
count[0] = SC1;
|
||||
ones[0] = 1;
|
||||
if (H5Sselect_hyperslab(whole_spaceid1, H5S_SELECT_SET,
|
||||
start, NULL, count, NULL) < 0)
|
||||
start, NULL, ones, count) < 0)
|
||||
{
|
||||
ERR;
|
||||
return 2;
|
||||
|
@ -51,7 +51,7 @@ main(int argc, char **argv)
|
||||
{
|
||||
hid_t fapl_id, fileid, whole_spaceid, dsid, slice_spaceid, whole_spaceid1, xferid;
|
||||
hid_t plistid;
|
||||
hsize_t start[NDIMS], count[NDIMS];
|
||||
hsize_t start[NDIMS], count[NDIMS], ones[NDIMS];
|
||||
hsize_t dims[1], chunksize = SC1;
|
||||
int data[SC1], data_in[SC1];
|
||||
int num_steps;
|
||||
@ -120,8 +120,9 @@ main(int argc, char **argv)
|
||||
/* Select hyperslab for write of one slice. */
|
||||
start[0] = s * SC1 * p + my_rank * SC1;
|
||||
count[0] = SC1;
|
||||
ones[0] = 1;
|
||||
if (H5Sselect_hyperslab(whole_spaceid, H5S_SELECT_SET,
|
||||
start, NULL, count, NULL) < 0) ERR;
|
||||
start, NULL, ones, count) < 0) ERR;
|
||||
|
||||
if (H5Dwrite(dsid, H5T_NATIVE_INT, slice_spaceid, whole_spaceid,
|
||||
xferid, data) < 0) ERR;
|
||||
@ -160,8 +161,9 @@ main(int argc, char **argv)
|
||||
/* Select hyperslab for read of one slice. */
|
||||
start[0] = s * SC1 * p + my_rank * SC1;
|
||||
count[0] = SC1;
|
||||
ones[0] = 1;
|
||||
if (H5Sselect_hyperslab(whole_spaceid1, H5S_SELECT_SET,
|
||||
start, NULL, count, NULL) < 0)
|
||||
start, NULL, ones, count) < 0)
|
||||
{
|
||||
ERR;
|
||||
return 2;
|
||||
|
@ -30,6 +30,7 @@ main()
|
||||
hid_t file_spaceid, mem_spaceid;
|
||||
hsize_t dims[1] = {0}, max_dims[1] = {H5S_UNLIMITED}, chunk_dims[1] = {1};
|
||||
hsize_t xtend_size[NDIMS] = {2}, start[NDIMS] = {1}, count[NDIMS] = {1};
|
||||
hsize_t ones[NDIMS] = {1};
|
||||
/* void *fillp;*/
|
||||
char *data = "A man who carries a cat by the tail learns "
|
||||
"something he can learn in no other way.";
|
||||
@ -91,7 +92,7 @@ main()
|
||||
/* Select space in file to write a record. */
|
||||
if ((file_spaceid = H5Dget_space(datasetid)) < 0) ERR;
|
||||
if (H5Sselect_hyperslab(file_spaceid, H5S_SELECT_SET,
|
||||
start, NULL, count, NULL) < 0) ERR;
|
||||
start, NULL, ones, count) < 0) ERR;
|
||||
|
||||
/* Select space in memory to read from. */
|
||||
if ((mem_spaceid = H5Screate_simple(NDIMS, count, NULL)) < 0) ERR;
|
||||
@ -126,7 +127,7 @@ main()
|
||||
hid_t typeid, datasetid, plistid;
|
||||
hid_t file_spaceid, mem_spaceid;
|
||||
hsize_t dims[1] = {2}, chunk_dims[1] = {1};
|
||||
hsize_t start[NDIMS] = {1}, count[NDIMS] = {1};
|
||||
hsize_t start[NDIMS] = {1}, count[NDIMS] = {1}, ones[NDIMS] = {1};
|
||||
/* void *fillp;*/
|
||||
char *data = "A man who carries a cat by the tail learns "
|
||||
"something he can learn in no other way.";
|
||||
@ -179,7 +180,7 @@ To be good is noble; but to show others how to be good is nobler and no trouble.
|
||||
/* Select space in file to write a record. */
|
||||
if ((file_spaceid = H5Dget_space(datasetid)) < 0) ERR;
|
||||
if (H5Sselect_hyperslab(file_spaceid, H5S_SELECT_SET,
|
||||
start, NULL, count, NULL) < 0) ERR;
|
||||
start, NULL, ones, count) < 0) ERR;
|
||||
|
||||
/* Select space in memory to read from. */
|
||||
if ((mem_spaceid = H5Screate_simple(NDIMS, count, NULL)) < 0)
|
||||
|
@ -69,7 +69,7 @@ main()
|
||||
float float_data_out[LAT_LEN][LON_LEN];
|
||||
hsize_t dims[NDIMS], max_dims[NDIMS];
|
||||
hsize_t dims_in[NDIMS], max_dims_in[NDIMS];
|
||||
hsize_t start[MAX_DIMS], count[MAX_DIMS];
|
||||
hsize_t start[MAX_DIMS], count[MAX_DIMS], ones[MAX_DIMS];
|
||||
int lat, lon;
|
||||
|
||||
/* Set up some phoney data, 1 record's worth. In C, first
|
||||
@ -153,8 +153,9 @@ main()
|
||||
start[0] = 1;
|
||||
start[1] = 0;
|
||||
start[2] = 0;
|
||||
ones[0] = ones[1] = ones[2] = 1;
|
||||
if (H5Sselect_hyperslab(write_spaceid, H5S_SELECT_SET,
|
||||
start, NULL, count, NULL) < 0) ERR;
|
||||
start, NULL, ones, count) < 0) ERR;
|
||||
|
||||
/* Write second record of data to each dataset. */
|
||||
if (H5Dwrite(pres_dsid, H5T_IEEE_F32LE, mem_spaceid, write_spaceid,
|
||||
@ -517,7 +518,7 @@ main()
|
||||
"szip_and_zlib"};
|
||||
|
||||
/* Open file and create group. */
|
||||
sprintf(file_name, "%s_%s.h5", TEST_NAME, desc[f]);
|
||||
snprintf(file_name, sizeof(file_name), "%s_%s.h5", TEST_NAME, desc[f]);
|
||||
if ((fileid = H5Fcreate(file_name, H5F_ACC_TRUNC, H5P_DEFAULT,
|
||||
H5P_DEFAULT)) < 0) ERR;
|
||||
if ((grpid = H5Gcreate1(fileid, GRP_NAME, 0)) < 0) ERR;
|
||||
|
@ -478,7 +478,7 @@ main()
|
||||
/* Create the variables. */
|
||||
for (v = 0; v < NUM_DATASETS; v++)
|
||||
{
|
||||
sprintf(var_name, "var_%d", v);
|
||||
snprintf(var_name, sizeof(var_name), "var_%d", v);
|
||||
/* printf("creating var %s\n", var_name);*/
|
||||
if ((datasetid[v] = H5Dcreate1(grpid, var_name, H5T_NATIVE_INT,
|
||||
spaceid, plistid)) < 0) ERR_RET;
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include "h5_err_macros.h"
|
||||
#include <hdf5.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define FILE_NAME "tst_h_vl.h5"
|
||||
#define DIM1_LEN 3
|
||||
@ -23,7 +24,7 @@ main()
|
||||
hsize_t dims[1] = {DIM1_LEN};
|
||||
hvl_t data[DIM1_LEN], data_in[DIM1_LEN];
|
||||
int *phoney;
|
||||
int i, j;
|
||||
size_t i, j;
|
||||
size_t size;
|
||||
|
||||
/* Create some phoney data, an array of struct s1, which holds a
|
||||
|
@ -141,7 +141,7 @@ main(int argc, char **argv)
|
||||
/* Create some HDF4 datasets. */
|
||||
for (t = 0; t < NUM_TYPES; t++)
|
||||
{
|
||||
sprintf(tmp_name, "hdf4_dataset_type_%d", t);
|
||||
snprintf(tmp_name, sizeof(tmp_name), "hdf4_dataset_type_%d", t);
|
||||
if ((sds_id = SDcreate(sd_id, tmp_name, hdf4_type[t],
|
||||
DIMS_3, dim_size)) == FAIL) ERR;
|
||||
/* Set up dimensions. By giving them the same names for each
|
||||
|
@ -131,7 +131,7 @@ typedef struct NC_OBJ
|
||||
{
|
||||
NC_SORT sort; /**< Type of object. */
|
||||
char* name; /**< Name, assumed to be null terminated. */
|
||||
size_t id; /**< This objects ID. */
|
||||
int id; /**< This objects ID. */
|
||||
} NC_OBJ;
|
||||
|
||||
/**
|
||||
|
@ -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*/
|
||||
|
||||
/**************************************************/
|
||||
|
@ -4,6 +4,7 @@
|
||||
#define NCLIST_H 1
|
||||
|
||||
#include "ncexternl.h"
|
||||
#include <stddef.h>
|
||||
|
||||
/* Define the type of the elements in the list*/
|
||||
|
||||
|
@ -52,7 +52,7 @@ parseServers(const char* remotetestservers)
|
||||
|
||||
/* Keep LGTM quiet */
|
||||
if(rtslen > MAXREMOTETESTSERVERS) goto done;
|
||||
list = (char**)malloc(sizeof(char*) * (int)(rtslen/2));
|
||||
list = (char**)malloc(sizeof(char*) * (rtslen/2));
|
||||
if(list == NULL) return NULL;
|
||||
rts = strdup(remotetestservers);
|
||||
if(rts == NULL) goto done;
|
||||
|
@ -150,14 +150,14 @@ typedef struct timeinfo_t {
|
||||
# define MSC_NCTIME_EXTRA __declspec(dllimport)
|
||||
# endif
|
||||
|
||||
MSC_NCTIME_EXTRA extern void cdRel2Iso(cdCalenType timetype, char* relunits, int separator, double reltime, char* chartime);
|
||||
MSC_NCTIME_EXTRA extern void cdRel2Iso(cdCalenType timetype, char* relunits, int separator, double reltime, char* chartime, size_t chartime_size);
|
||||
MSC_NCTIME_EXTRA extern void cdChar2Comp(cdCalenType timetype, char* chartime, cdCompTime* comptime);
|
||||
MSC_NCTIME_EXTRA extern void Cdh2e(CdTime *htime, double *etime);
|
||||
MSC_NCTIME_EXTRA extern void Cde2h(double etime, CdTimeType timeType, long baseYear, CdTime *htime);
|
||||
MSC_NCTIME_EXTRA extern int cdParseRelunits(cdCalenType timetype, char* relunits, cdUnitTime* unit, cdCompTime* base_comptime);
|
||||
MSC_NCTIME_EXTRA extern int cdSetErrOpts(int opts);
|
||||
#else
|
||||
extern void cdRel2Iso(cdCalenType timetype, char* relunits, int separator, double reltime, char* chartime);
|
||||
extern void cdRel2Iso(cdCalenType timetype, char* relunits, int separator, double reltime, char* chartime, size_t chartime_size);
|
||||
extern void cdChar2Comp(cdCalenType timetype, char* chartime, cdCompTime* comptime);
|
||||
extern void Cdh2e(CdTime *htime, double *etime);
|
||||
extern void Cde2h(double etime, CdTimeType timeType, long baseYear, CdTime *htime);
|
||||
|
@ -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);
|
||||
|
@ -23,9 +23,9 @@
|
||||
#ifndef NETCDF_META_H
|
||||
#define NETCDF_META_H
|
||||
|
||||
#define NC_VERSION_MAJOR @NC_VERSION_MAJOR@ /*!< netcdf-c major version. */
|
||||
#define NC_VERSION_MINOR @NC_VERSION_MINOR@ /*!< netcdf-c minor version. */
|
||||
#define NC_VERSION_PATCH @NC_VERSION_PATCH@ /*!< netcdf-c patch version. */
|
||||
#define NC_VERSION_MAJOR @netCDF_VERSION_MAJOR@ /*!< netcdf-c major version. */
|
||||
#define NC_VERSION_MINOR @netCDF_VERSION_MINOR@ /*!< netcdf-c minor version. */
|
||||
#define NC_VERSION_PATCH @netCDF_VERSION_PATCH@ /*!< netcdf-c patch version. */
|
||||
#define NC_VERSION_NOTE "@NC_VERSION_NOTE@" /*!< netcdf-c note. May be blank. */
|
||||
|
||||
/*! netcdf-c version string.
|
||||
|
@ -6,6 +6,24 @@
|
||||
# See netcdf-c/COPYRIGHT file for more info.
|
||||
SET(dap2_SOURCES constraints.c dapcvt.c dapodom.c daputil.c ncdaperr.c cdf.c cache.c dapdump.c dapdebug.c dapattr.c ncd2dispatch.c getvara.c dceconstraints.c dcetab.c dceparse.c dcelex.c)
|
||||
|
||||
##
|
||||
# Turn off inclusion of particular files when using the cmake-native
|
||||
# option to turn on Unity Builds.
|
||||
#
|
||||
# For more information, see:
|
||||
# * https://github.com/Unidata/netcdf-c/pull/2839/
|
||||
# * https://cmake.org/cmake/help/latest/prop_tgt/UNITY_BUILD.html
|
||||
# * https://cmake.org/cmake/help/latest/prop_tgt/UNITY_BUILD_MODE.html#prop_tgt:UNITY_BUILD_MODE
|
||||
##
|
||||
set_property(SOURCE ncd2dispatch.c
|
||||
PROPERTY
|
||||
SKIP_UNITY_BUILD_INCLUSION ON)
|
||||
|
||||
|
||||
set_property(SOURCE ncd2dispatch.c
|
||||
PROPERTY
|
||||
SKIP_UNITY_BUILD_INCLUSION ON)
|
||||
|
||||
add_library(dap2 OBJECT ${dap2_SOURCES})
|
||||
|
||||
IF(STATUS_PARALLEL)
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "dapincludes.h"
|
||||
#include "dapdump.h"
|
||||
#include <stddef.h>
|
||||
|
||||
/*
|
||||
Grads servers always require a constraint,
|
||||
@ -24,7 +25,9 @@ static int iscacheableconstraint(DCEconstraint* con);
|
||||
int
|
||||
iscached(NCDAPCOMMON* nccomm, CDFnode* target, NCcachenode** cachenodep)
|
||||
{
|
||||
int i,j,found,index;
|
||||
int i, found;
|
||||
size_t j;
|
||||
size_t index;
|
||||
NCcache* cache;
|
||||
NCcachenode* cachenode;
|
||||
|
||||
@ -92,7 +95,7 @@ else
|
||||
NCerror
|
||||
prefetchdata(NCDAPCOMMON* nccomm)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
NCFLAGS flags;
|
||||
NCerror ncstat = NC_NOERR;
|
||||
NClist* allvars = nccomm->cdf.ddsroot->tree->varnodes;
|
||||
@ -341,7 +344,7 @@ fprintf(stderr,"freecachenode: %s\n",
|
||||
void
|
||||
freenccache(NCDAPCOMMON* nccomm, NCcache* cache)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
if(cache == NULL) return;
|
||||
freenccachenode(nccomm,cache->prefetch);
|
||||
for(i=0;i<nclistlength(cache->nodes);i++) {
|
||||
@ -367,7 +370,8 @@ createnccache(void)
|
||||
static int
|
||||
iscacheableprojection(DCEprojection* proj)
|
||||
{
|
||||
int i,cacheable;
|
||||
size_t i;
|
||||
int cacheable;
|
||||
if(proj->discrim != CES_VAR) return 0;
|
||||
cacheable = 1; /* assume so */
|
||||
for(i=0;i<nclistlength(proj->var->segments);i++) {
|
||||
@ -380,7 +384,7 @@ iscacheableprojection(DCEprojection* proj)
|
||||
static int
|
||||
iscacheableconstraint(DCEconstraint* con)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
if(con == NULL) return 1;
|
||||
if(con->selections != NULL && nclistlength(con->selections) > 0)
|
||||
return 0; /* can't deal with selections */
|
||||
@ -400,7 +404,7 @@ A variable is prefetchable if
|
||||
NCerror
|
||||
markprefetch(NCDAPCOMMON* nccomm)
|
||||
{
|
||||
int i,j;
|
||||
size_t i,j;
|
||||
NClist* allvars = nccomm->cdf.fullddsroot->tree->varnodes;
|
||||
assert(allvars != NULL);
|
||||
/* mark those variables of sufficiently small size */
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "dapincludes.h"
|
||||
#include "daputil.h"
|
||||
#include "dapdump.h"
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef DAPDEBUG
|
||||
extern char* ocfqn(OCddsnode);
|
||||
@ -70,7 +71,7 @@ computecdfnodesets(NCDAPCOMMON* nccomm, CDFtree* tree)
|
||||
NCerror
|
||||
computevarnodes(NCDAPCOMMON* nccomm, NClist* allnodes, NClist* varnodes)
|
||||
{
|
||||
unsigned int i,len;
|
||||
size_t i, len;
|
||||
NClist* allvarnodes = nclistnew();
|
||||
for(i=0;i<nclistlength(allnodes);i++) {
|
||||
CDFnode* node = (CDFnode*)nclistget(allnodes,i);
|
||||
@ -433,7 +434,7 @@ we expected a grid.
|
||||
static int
|
||||
restructr(NCDAPCOMMON* ncc, CDFnode* dxdparent, CDFnode* patternparent, NClist* repairlist)
|
||||
{
|
||||
int index, i, j, match;
|
||||
size_t index, i, j, match;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr,"restruct: matched: %s -> %s\n",
|
||||
@ -501,7 +502,7 @@ static NCerror
|
||||
repairgrids(NCDAPCOMMON* ncc, NClist* repairlist)
|
||||
{
|
||||
NCerror ncstat = NC_NOERR;
|
||||
int i;
|
||||
size_t i;
|
||||
assert(nclistlength(repairlist) % 2 == 0);
|
||||
for(i=0;i<nclistlength(repairlist);i+=2) {
|
||||
CDFnode* node = (CDFnode*)nclistget(repairlist,i);
|
||||
@ -541,7 +542,7 @@ structwrap(NCDAPCOMMON* ncc, CDFnode* node, CDFnode* parent, int parentindex,
|
||||
static int
|
||||
findin(CDFnode* parent, CDFnode* child)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
NClist* subnodes = parent->subnodes;
|
||||
for(i=0;i<nclistlength(subnodes);i++) {
|
||||
if(nclistget(subnodes,i) == child)
|
||||
@ -674,13 +675,13 @@ dimimprint(NCDAPCOMMON* nccomm)
|
||||
{
|
||||
NCerror ncstat = NC_NOERR;
|
||||
NClist* allnodes;
|
||||
int i,j;
|
||||
size_t i,j;
|
||||
CDFnode* basenode;
|
||||
|
||||
allnodes = nccomm->cdf.ddsroot->tree->nodes;
|
||||
for(i=0;i<nclistlength(allnodes);i++) {
|
||||
CDFnode* node = (CDFnode*)nclistget(allnodes,i);
|
||||
int noderank, baserank;
|
||||
size_t noderank, baserank;
|
||||
/* Do dimension imprinting */
|
||||
basenode = node->basenode;
|
||||
if(basenode == NULL) continue;
|
||||
@ -689,7 +690,7 @@ dimimprint(NCDAPCOMMON* nccomm)
|
||||
if(noderank == 0) continue;
|
||||
ASSERT(noderank == baserank);
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr,"dimimprint %s/%d -> %s/%d\n",
|
||||
fprintf(stderr,"dimimprint %s/%zu -> %s/%zu\n",
|
||||
makecdfpathstring(basenode,"."),
|
||||
noderank,
|
||||
makecdfpathstring(node,"."),
|
||||
@ -725,7 +726,7 @@ static NClist*
|
||||
clonedimset(NCDAPCOMMON* nccomm, NClist* dimset, CDFnode* var)
|
||||
{
|
||||
NClist* result = NULL;
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for(i=0;i<nclistlength(dimset);i++) {
|
||||
CDFnode *dim = NULL;
|
||||
@ -768,7 +769,7 @@ definedimsetplus(NCDAPCOMMON* nccomm/*notused*/, CDFnode* node)
|
||||
static NCerror
|
||||
definedimsetall(NCDAPCOMMON* nccomm/*notused*/, CDFnode* node)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
int ncstat = NC_NOERR;
|
||||
NClist* dimsetall = NULL;
|
||||
|
||||
@ -795,7 +796,7 @@ fprintf(stderr,"dimsetall: |%s|=%d\n",node->ocname,(int)nclistlength(dimsetall))
|
||||
static NCerror
|
||||
definetransdimset(NCDAPCOMMON* nccomm/*notused*/, CDFnode* node)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
int ncstat = NC_NOERR;
|
||||
NClist* dimsettrans = NULL;
|
||||
|
||||
@ -842,7 +843,7 @@ Recursive helper for definedimsettrans3
|
||||
static NCerror
|
||||
definedimsettransR(NCDAPCOMMON* nccomm, CDFnode* node)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
int ncstat = NC_NOERR;
|
||||
|
||||
definetransdimset(nccomm,node);
|
||||
@ -882,7 +883,7 @@ Recursive helper
|
||||
static NCerror
|
||||
definedimsetsR(NCDAPCOMMON* nccomm, CDFnode* node)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
int ncstat = NC_NOERR;
|
||||
|
||||
definedimsetplus(nccomm,node);
|
||||
@ -1057,7 +1058,7 @@ buildcdftreer(NCDAPCOMMON* nccomm, OCddsnode ocnode, CDFnode* container,
|
||||
void
|
||||
freecdfroot(CDFnode* root)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
CDFtree* tree;
|
||||
NCDAPCOMMON* nccomm;
|
||||
if(root == NULL) return;
|
||||
@ -1187,7 +1188,7 @@ fix1node(NCDAPCOMMON* nccomm, CDFnode* node)
|
||||
static NCerror
|
||||
fixnodes(NCDAPCOMMON* nccomm, NClist* cdfnodes)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for(i=0;i<nclistlength(cdfnodes);i++) {
|
||||
CDFnode* node = (CDFnode*)nclistget(cdfnodes,i);
|
||||
NCerror err = fix1node(nccomm,node);
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "dceparselex.h"
|
||||
#include "dceconstraints.h"
|
||||
#include "dapdump.h"
|
||||
#include <stddef.h>
|
||||
|
||||
static void completesegments(NClist* fullpath, NClist* segments);
|
||||
static NCerror qualifyprojectionnames(DCEprojection* proj);
|
||||
@ -295,7 +296,7 @@ matchnode->ncfullname,dumpsegments(segments));
|
||||
break;
|
||||
default: {
|
||||
CDFnode* minnode = NULL;
|
||||
int minpath = 0;
|
||||
size_t minpath = 0;
|
||||
int nmin = 0; /* to catch multiple ones with same short path */
|
||||
/* ok, see if one of the matches has a path that is shorter
|
||||
then all the others */
|
||||
@ -338,7 +339,8 @@ done:
|
||||
static int
|
||||
matchsuffix(NClist* matchpath, NClist* segments)
|
||||
{
|
||||
int i,pathstart;
|
||||
size_t i;
|
||||
int pathstart;
|
||||
int nsegs = nclistlength(segments);
|
||||
int pathlen = nclistlength(matchpath);
|
||||
int segmatch;
|
||||
@ -356,7 +358,7 @@ matchsuffix(NClist* matchpath, NClist* segments)
|
||||
matching as we go
|
||||
*/
|
||||
for(i=0;i<nsegs;i++) {
|
||||
CDFnode* node = (CDFnode*)nclistget(matchpath,pathstart+i);
|
||||
CDFnode* node = (CDFnode*)nclistget(matchpath, (size_t)pathstart+i);
|
||||
DCEsegment* seg = (DCEsegment*)nclistget(segments,i);
|
||||
int rank = seg->rank;
|
||||
segmatch = 1; /* until proven otherwise */
|
||||
@ -386,12 +388,12 @@ dapbuildvaraprojection(CDFnode* var,
|
||||
const size_t* startp, const size_t* countp, const ptrdiff_t* stridep,
|
||||
DCEprojection** projectionp)
|
||||
{
|
||||
int i,j;
|
||||
size_t i,j;
|
||||
NCerror ncstat = NC_NOERR;
|
||||
DCEprojection* projection = NULL;
|
||||
NClist* path = nclistnew();
|
||||
NClist* segments = NULL;
|
||||
int dimindex;
|
||||
size_t dimindex;
|
||||
|
||||
/* Build a skeleton projection that has 1 segment for
|
||||
every cdfnode from root to the variable of interest.
|
||||
@ -463,9 +465,10 @@ dapiswholeslice(DCEslice* slice, CDFnode* dim)
|
||||
int
|
||||
dapiswholesegment(DCEsegment* seg)
|
||||
{
|
||||
int i,whole;
|
||||
size_t i;
|
||||
int whole;
|
||||
NClist* dimset = NULL;
|
||||
unsigned int rank;
|
||||
size_t rank;
|
||||
|
||||
if(seg->rank == 0) return 1;
|
||||
if(!seg->slicesdefined) return 0;
|
||||
@ -483,7 +486,8 @@ dapiswholesegment(DCEsegment* seg)
|
||||
int
|
||||
dapiswholeprojection(DCEprojection* proj)
|
||||
{
|
||||
int i,whole;
|
||||
size_t i;
|
||||
int whole;
|
||||
|
||||
ASSERT((proj->discrim == CES_VAR));
|
||||
|
||||
@ -498,7 +502,7 @@ dapiswholeprojection(DCEprojection* proj)
|
||||
int
|
||||
dapiswholeconstraint(DCEconstraint* con)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
if(con == NULL) return 1;
|
||||
if(con->projections != NULL) {
|
||||
for(i=0;i<nclistlength(con->projections);i++) {
|
||||
@ -528,7 +532,7 @@ The term "expanded" means
|
||||
NCerror
|
||||
dapfixprojections(NClist* list)
|
||||
{
|
||||
int i,j,k;
|
||||
size_t i,j,k;
|
||||
NCerror ncstat = NC_NOERR;
|
||||
NClist* tmp = nclistnew(); /* misc. uses */
|
||||
|
||||
@ -619,12 +623,12 @@ next: continue;
|
||||
} /*for(;;)*/
|
||||
|
||||
/* remove all NULL elements */
|
||||
for(i=nclistlength(list)-1;i>=0;i--) {
|
||||
DCEprojection* target = (DCEprojection*)nclistget(list,i);
|
||||
int n;
|
||||
for(n=nclistlength(list)-1;n>=0;n--) {
|
||||
DCEprojection* target = (DCEprojection*)nclistget(list,n);
|
||||
if(target == NULL)
|
||||
nclistremove(list,i);
|
||||
nclistremove(list,n);
|
||||
}
|
||||
|
||||
done:
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr,"fixprojection: exploded = %s\n",dumpprojections(list));
|
||||
@ -661,7 +665,7 @@ projectify(CDFnode* field, DCEprojection* container)
|
||||
static int
|
||||
slicematch(NClist* seglist1, NClist* seglist2)
|
||||
{
|
||||
int i,j;
|
||||
size_t i,j;
|
||||
if((seglist1 == NULL || seglist2 == NULL) && seglist1 != seglist2)
|
||||
return 0;
|
||||
if(nclistlength(seglist1) != nclistlength(seglist2))
|
||||
@ -691,7 +695,7 @@ slicematch(NClist* seglist1, NClist* seglist2)
|
||||
int
|
||||
dapvar2projection(CDFnode* var, DCEprojection** projectionp)
|
||||
{
|
||||
int i,j;
|
||||
size_t i,j;
|
||||
int ncstat = NC_NOERR;
|
||||
NClist* path = nclistnew();
|
||||
NClist* segments;
|
||||
@ -707,7 +711,7 @@ dapvar2projection(CDFnode* var, DCEprojection** projectionp)
|
||||
for(i=0;i<nclistlength(path);i++) {
|
||||
DCEsegment* segment = (DCEsegment*)dcecreate(CES_SEGMENT);
|
||||
CDFnode* n = (CDFnode*)nclistget(path,i);
|
||||
int localrank;
|
||||
size_t localrank;
|
||||
NClist* dimset;
|
||||
|
||||
segment->annotation = (void*)n;
|
||||
@ -757,7 +761,7 @@ int
|
||||
daprestrictprojection(NClist* projections, DCEprojection* var, DCEprojection** resultp)
|
||||
{
|
||||
int ncstat = NC_NOERR;
|
||||
int i;
|
||||
size_t i;
|
||||
DCEprojection* result = NULL;
|
||||
#ifdef DEBUG1
|
||||
fprintf(stderr,"restrictprojection.before: constraints=|%s| vara=|%s|\n",
|
||||
@ -817,7 +821,7 @@ int
|
||||
dapshiftprojection(DCEprojection* projection)
|
||||
{
|
||||
int ncstat = NC_NOERR;
|
||||
int i,j;
|
||||
size_t i,j;
|
||||
NClist* segments;
|
||||
|
||||
#ifdef DEBUG1
|
||||
@ -849,7 +853,7 @@ dapcomputeprojectedvars(NCDAPCOMMON* dapcomm, DCEconstraint* constraint)
|
||||
{
|
||||
NCerror ncstat = NC_NOERR;
|
||||
NClist* vars = NULL;
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
vars = nclistnew();
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include "dapincludes.h"
|
||||
#include <stddef.h>
|
||||
|
||||
#define OCCHECK(exp) if((ocstat = (exp))) {THROWCHK(ocstat); goto done;}
|
||||
|
||||
@ -18,7 +19,7 @@ and stuff from DODS_EXTRA.
|
||||
int
|
||||
dapmerge(NCDAPCOMMON* nccomm, CDFnode* ddsroot, OCddsnode dasroot)
|
||||
{
|
||||
int i,j;
|
||||
size_t i,j;
|
||||
NCerror ncstat = NC_NOERR;
|
||||
OCerror ocstat = OC_NOERR;
|
||||
NClist* allnodes;
|
||||
|
@ -4,6 +4,7 @@
|
||||
*********************************************************************/
|
||||
#include "config.h"
|
||||
#include "dapincludes.h"
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <crtdbg.h>
|
||||
@ -215,10 +216,10 @@ If we need an int and the string value is out of range, return NC_ERANGE.
|
||||
NCerror
|
||||
dapcvtattrval(nc_type etype, void* dst, NClist* src, NCattribute* att)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
NCerror ncstat = NC_NOERR;
|
||||
unsigned int memsize = nctypesizeof(etype);
|
||||
unsigned int nvalues = nclistlength(src);
|
||||
size_t memsize = nctypesizeof(etype);
|
||||
size_t nvalues = nclistlength(src);
|
||||
char* dstmem = (char*)dst;
|
||||
|
||||
for(i=0;i<nvalues;i++) {
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "netcdf.h"
|
||||
#include <stddef.h>
|
||||
#ifdef USE_PARALLEL
|
||||
#include "netcdf_par.h"
|
||||
#endif
|
||||
@ -38,7 +39,7 @@ dumpmetadata(int ncid, NChdr** hdrp)
|
||||
fprintf(stdout,"ncid=%d ngatts=%d ndims=%d nvars=%d unlimid=%d\n",
|
||||
hdr->ncid,hdr->ngatts,hdr->ndims,hdr->nvars,hdr->unlimid);
|
||||
#endif
|
||||
hdr->gatts = (NCattribute*)calloc(1,hdr->ngatts*sizeof(NCattribute));
|
||||
hdr->gatts = (NCattribute*)calloc(1, (size_t)hdr->ngatts*sizeof(NCattribute));
|
||||
MEMCHECK(hdr->gatts,NC_ENOMEM);
|
||||
if(hdr->ngatts > 0)
|
||||
fprintf(stdout,"global attributes:\n");
|
||||
@ -81,7 +82,7 @@ dumpmetadata(int ncid, NChdr** hdrp)
|
||||
fprintf(stdout,"\n");
|
||||
}
|
||||
|
||||
hdr->dims = (Dim*)malloc(hdr->ndims*sizeof(Dim));
|
||||
hdr->dims = (Dim*)malloc((size_t)hdr->ndims*sizeof(Dim));
|
||||
MEMCHECK(hdr->dims,NC_ENOMEM);
|
||||
for(i=0;i<hdr->ndims;i++) {
|
||||
hdr->dims[i].dimid = i;
|
||||
@ -93,7 +94,7 @@ dumpmetadata(int ncid, NChdr** hdrp)
|
||||
fprintf(stdout,"dim[%d]: name=%s size=%lu\n",
|
||||
i,hdr->dims[i].name,(unsigned long)hdr->dims[i].size);
|
||||
}
|
||||
hdr->vars = (Var*)malloc(hdr->nvars*sizeof(Var));
|
||||
hdr->vars = (Var*)malloc((size_t)hdr->nvars*sizeof(Var));
|
||||
MEMCHECK(hdr->vars,NC_ENOMEM);
|
||||
for(i=0;i<hdr->nvars;i++) {
|
||||
Var* var = &hdr->vars[i];
|
||||
@ -118,7 +119,7 @@ dumpmetadata(int ncid, NChdr** hdrp)
|
||||
fprintf(stdout," %d",var->dimids[j]);
|
||||
}
|
||||
fprintf(stdout,"}\n");
|
||||
var->atts = (NCattribute*)malloc(var->natts*sizeof(NCattribute));
|
||||
var->atts = (NCattribute*)malloc((size_t)var->natts*sizeof(NCattribute));
|
||||
MEMCHECK(var->atts,NC_ENOMEM);
|
||||
for(j=0;j<var->natts;j++) {
|
||||
NCattribute* att = &var->atts[j];
|
||||
@ -247,7 +248,7 @@ dumppath(CDFnode* leaf)
|
||||
NClist* path = nclistnew();
|
||||
NCbytes* buf = ncbytesnew();
|
||||
char* result;
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
if(leaf == NULL) return nulldup("");
|
||||
collectnodepath(leaf,path,!WITHDATASET);
|
||||
@ -272,7 +273,7 @@ dumpindent(int indent, NCbytes* buf)
|
||||
static void
|
||||
dumptreer1(CDFnode* root, NCbytes* buf, int indent, char* tag, int visible)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
dumpindent(indent,buf);
|
||||
ncbytescat(buf,tag);
|
||||
ncbytescat(buf," {\n");
|
||||
@ -300,7 +301,7 @@ dumptreer1(CDFnode* root, NCbytes* buf, int indent, char* tag, int visible)
|
||||
static void
|
||||
dumptreer(CDFnode* root, NCbytes* buf, int indent, int visible)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
char* primtype = NULL;
|
||||
NClist* dimset = NULL;
|
||||
|
||||
@ -389,7 +390,7 @@ dumpnode(CDFnode* node)
|
||||
{
|
||||
NCbytes* buf = ncbytesnew();
|
||||
char* result;
|
||||
int i;
|
||||
size_t i;
|
||||
char* nctype = NULL;
|
||||
char* primtype = NULL;
|
||||
char tmp[1024];
|
||||
@ -456,7 +457,7 @@ dumpnode(CDFnode* node)
|
||||
ncbytescat(buf,tmp);
|
||||
for(i=0;i<nclistlength(node->array.dimset0);i++) {
|
||||
CDFnode* dim = (CDFnode*)nclistget(node->array.dimset0,i);
|
||||
snprintf(tmp,sizeof(tmp),"dims[%d]={\n",i);
|
||||
snprintf(tmp,sizeof(tmp),"dims[%zu]={\n",i);
|
||||
ncbytescat(buf,tmp);
|
||||
snprintf(tmp,sizeof(tmp)," ocname=%s\n",dim->ocname);
|
||||
ncbytescat(buf,tmp);
|
||||
@ -497,7 +498,7 @@ dumpcachenode(NCcachenode* node)
|
||||
{
|
||||
char* result = NULL;
|
||||
char tmp[8192];
|
||||
int i;
|
||||
size_t i;
|
||||
NCbytes* buf;
|
||||
|
||||
if(node == NULL) return strdup("cachenode{null}");
|
||||
@ -527,7 +528,7 @@ dumpcache(NCcache* cache)
|
||||
{
|
||||
char* result = NULL;
|
||||
char tmp[8192];
|
||||
int i;
|
||||
size_t i;
|
||||
NCbytes* buf;
|
||||
|
||||
if(cache == NULL) return strdup("cache{null}");
|
||||
@ -619,10 +620,10 @@ dumplistraw(NClist* l)
|
||||
void
|
||||
dumpstringlist(NClist* l)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for(i=0;i<nclistlength(l);i++) {
|
||||
const char* s = (const char*)nclistget(l,i);
|
||||
fprintf(stderr,"[%d]: |%s|\n",i,s);
|
||||
fprintf(stderr,"[%zu]: |%s|\n",i,s);
|
||||
}
|
||||
fflush(stderr);
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ dapodom_print(Dapodometer* odom)
|
||||
if(odom->rank == 0) {
|
||||
strlcat(line,"[]",sizeof(line));
|
||||
} else for(i=0;i<odom->rank;i++) {
|
||||
sprintf(tmp,"[%lu/%lu:%lu:%lu]",
|
||||
snprintf(tmp,sizeof(tmp),"[%lu/%lu:%lu:%lu]",
|
||||
(size_t)odom->index[i],
|
||||
(size_t)odom->start[i],
|
||||
(size_t)odom->stride[i],
|
||||
|
@ -4,6 +4,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
@ -254,7 +255,8 @@ nclistconcat(NClist* l1, NClist* l2)
|
||||
int
|
||||
nclistminus(NClist* l1, NClist* l2)
|
||||
{
|
||||
unsigned int i,len,found;
|
||||
size_t i, len;
|
||||
int found;
|
||||
len = nclistlength(l2);
|
||||
found = 0;
|
||||
for(i=0;i<len;i++) {
|
||||
@ -312,7 +314,7 @@ collectocpath(OClink conn, OCddsnode node, NClist* path)
|
||||
char*
|
||||
makeocpathstring(OClink conn, OCddsnode node, const char* sep)
|
||||
{
|
||||
int i,len,first;
|
||||
size_t i,len,first;
|
||||
char* result;
|
||||
char* name;
|
||||
OCtype octype;
|
||||
@ -353,7 +355,7 @@ makeocpathstring(OClink conn, OCddsnode node, const char* sep)
|
||||
char*
|
||||
makepathstring(NClist* path, const char* separator, int flags)
|
||||
{
|
||||
int i,len,first;
|
||||
size_t i,len,first;
|
||||
NCbytes* pathname = NULL;
|
||||
char* result;
|
||||
CDFnode* node;
|
||||
@ -412,7 +414,7 @@ clonenodenamepath(CDFnode* node, NClist* path, int withdataset)
|
||||
char*
|
||||
simplepathstring(NClist* names, char* separator)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
size_t len;
|
||||
char* result;
|
||||
if(nclistlength(names) == 0) return nulldup("");
|
||||
@ -763,7 +765,7 @@ repairname(const char* name, const char* badchars)
|
||||
const char *p;
|
||||
char *q;
|
||||
int c;
|
||||
int nnlen = 0;
|
||||
size_t nnlen = 0;
|
||||
|
||||
if(name == NULL) return NULL;
|
||||
nnlen = (3*strlen(name)); /* max needed */
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -218,7 +219,7 @@ Dst will be modified.
|
||||
int
|
||||
dcemergeprojectionlists(NClist* dst, NClist* src)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
NClist* cat = nclistnew();
|
||||
int ncstat = NC_NOERR;
|
||||
|
||||
@ -272,7 +273,7 @@ int
|
||||
dcemergeprojections(DCEprojection* merged, DCEprojection* addition)
|
||||
{
|
||||
int ncstat = NC_NOERR;
|
||||
int i,j;
|
||||
size_t i,j;
|
||||
|
||||
ASSERT((merged->discrim == CES_VAR && addition->discrim == CES_VAR));
|
||||
ASSERT((nclistlength(merged->var->segments) == nclistlength(addition->var->segments)));
|
||||
@ -432,7 +433,7 @@ done:
|
||||
NClist*
|
||||
dceclonelist(NClist* list)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
NClist* clone;
|
||||
if(list == NULL) return NULL;
|
||||
clone = nclistnew();
|
||||
@ -519,7 +520,7 @@ dcefree(DCEnode* node)
|
||||
void
|
||||
dcefreelist(NClist* list)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
if(list == NULL) return;
|
||||
for(i=0;i<nclistlength(list);i++) {
|
||||
DCEnode* node = (DCEnode*)nclistget(list,i);
|
||||
@ -717,7 +718,7 @@ dcelisttostring(NClist* list, char* sep)
|
||||
void
|
||||
dcelisttobuffer(NClist* list, NCbytes* buf, char* sep)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
if(list == NULL || buf == NULL) return;
|
||||
if(sep == NULL) sep = ",";
|
||||
for(i=0;i<nclistlength(list);i++) {
|
||||
@ -741,7 +742,7 @@ dceallnodes(DCEnode* node, CEsort which)
|
||||
static void
|
||||
ceallnodesr(DCEnode* node, NClist* allnodes, CEsort which)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
if(node == NULL) return;
|
||||
if(nclistcontains(allnodes,(void*)node)) return;
|
||||
if(which == CES_NIL || node->sort == which)
|
||||
@ -920,8 +921,8 @@ dcemakewholeprojection(DCEprojection* p)
|
||||
int
|
||||
dcesamepath(NClist* list1, NClist* list2)
|
||||
{
|
||||
int i;
|
||||
int len = nclistlength(list1);
|
||||
size_t i;
|
||||
size_t len = nclistlength(list1);
|
||||
if(len != nclistlength(list2)) return 0;
|
||||
for(i=0;i<len;i++) {
|
||||
DCEsegment* s1 = (DCEsegment*)nclistget(list1,i);
|
||||
@ -1162,7 +1163,7 @@ dcedumpraw(DCEnode* node, NCbytes* buf)
|
||||
static void
|
||||
dcedumprawlist(NClist* list, NCbytes* buf)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
if(list == NULL || buf == NULL) return;
|
||||
ncbytescat(buf,"(");
|
||||
for(i=0;i<nclistlength(list);i++) {
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -91,7 +92,7 @@ segmentlist(DCEparsestate* state, Object var0, Object decl)
|
||||
Object
|
||||
segment(DCEparsestate* state, Object name, Object slices0)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
DCEsegment* segment = (DCEsegment*)dcecreate(CES_SEGMENT);
|
||||
NClist* slices = (NClist*)slices0;
|
||||
segment->name = strdup((char*)name);
|
||||
@ -222,7 +223,7 @@ array_indices(DCEparsestate* state, Object list0, Object indexno)
|
||||
Object
|
||||
indexer(DCEparsestate* state, Object name, Object indices)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
NClist* list = (NClist*)indices;
|
||||
DCEsegment* seg = (DCEsegment*)dcecreate(CES_SEGMENT);
|
||||
seg->name = strdup((char*)name);
|
||||
|
@ -978,7 +978,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Avoid sprintf, as that infringes on the user's name space.
|
||||
/* Avoid snprintf, as that infringes on the user's name space.
|
||||
Don't have undefined behavior even if the translation
|
||||
produced a string with the wrong number of "%s"s. */
|
||||
{
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "dapdump.h"
|
||||
#include "ncd2dispatch.h"
|
||||
#include "ocx.h"
|
||||
#include <stddef.h>
|
||||
|
||||
#define NEWVARM
|
||||
|
||||
@ -95,7 +96,7 @@ nc3d_getvarx(int ncid, int varid,
|
||||
{
|
||||
NCerror ncstat = NC_NOERR;
|
||||
OCerror ocstat = OC_NOERR;
|
||||
int i;
|
||||
size_t i;
|
||||
NC* drno;
|
||||
NC* substrate;
|
||||
NCDAPCOMMON* dapcomm;
|
||||
@ -426,7 +427,7 @@ fail:
|
||||
static NCerror
|
||||
removepseudodims(DCEprojection* proj)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
#ifdef DEBUG1
|
||||
fprintf(stderr,"removesequencedims.before: %s\n",dumpprojection(proj));
|
||||
#endif
|
||||
@ -935,7 +936,7 @@ extractstring(
|
||||
{
|
||||
NCerror ncstat = NC_NOERR;
|
||||
OCerror ocstat = OC_NOERR;
|
||||
int i;
|
||||
size_t i;
|
||||
size_t rank0;
|
||||
NClist* strings = NULL;
|
||||
Dapodometer* odom = NULL;
|
||||
@ -1056,9 +1057,9 @@ It is assumed that both trees have been re-struct'ed if necessary.
|
||||
*/
|
||||
|
||||
static NCerror
|
||||
attachr(CDFnode* xnode, NClist* patternpath, int depth)
|
||||
attachr(CDFnode* xnode, NClist* patternpath, size_t depth)
|
||||
{
|
||||
unsigned int i,plen,lastnode,gridable;
|
||||
size_t i,plen,lastnode,gridable;
|
||||
NCerror ncstat = NC_NOERR;
|
||||
CDFnode* patternpathnode;
|
||||
CDFnode* patternpathnext;
|
||||
@ -1129,7 +1130,7 @@ attachsubsetr(CDFnode* target, CDFnode* pattern)
|
||||
{
|
||||
unsigned int i;
|
||||
NCerror ncstat = NC_NOERR;
|
||||
int fieldindex;
|
||||
size_t fieldindex;
|
||||
|
||||
#ifdef DEBUG2
|
||||
fprintf(stderr,"attachsubsetr: attach: target=%s pattern=%s\n",
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "ncrc.h"
|
||||
#include "ncoffsets.h"
|
||||
#include "netcdf_dispatch.h"
|
||||
#include <stddef.h>
|
||||
#ifdef DEBUG2
|
||||
#include "dapdump.h"
|
||||
#endif
|
||||
@ -728,7 +729,7 @@ done:
|
||||
static NCerror
|
||||
buildvars(NCDAPCOMMON* dapcomm)
|
||||
{
|
||||
int i,j;
|
||||
size_t i,j;
|
||||
NCerror ncstat = NC_NOERR;
|
||||
int varid;
|
||||
NClist* varnodes = dapcomm->cdf.ddsroot->tree->varnodes;
|
||||
@ -738,7 +739,7 @@ buildvars(NCDAPCOMMON* dapcomm)
|
||||
for(i=0;i<nclistlength(varnodes);i++) {
|
||||
CDFnode* var = (CDFnode*)nclistget(varnodes,i);
|
||||
int dimids[NC_MAX_VAR_DIMS];
|
||||
unsigned int ncrank;
|
||||
size_t ncrank;
|
||||
NClist* vardims = NULL;
|
||||
|
||||
if(var->invisible) continue;
|
||||
@ -773,7 +774,7 @@ fprintf(stderr,"\n");
|
||||
ncstat = nc_def_var(dapcomm->substrate.nc3id,
|
||||
definename,
|
||||
var->externaltype,
|
||||
ncrank,
|
||||
(int)ncrank,
|
||||
(ncrank==0?NULL:dimids),
|
||||
&varid);
|
||||
nullfree(definename);
|
||||
@ -849,7 +850,7 @@ done:
|
||||
static NCerror
|
||||
buildglobalattrs(NCDAPCOMMON* dapcomm, CDFnode* root)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
NCerror ncstat = NC_NOERR;
|
||||
const char* txt;
|
||||
char *nltxt, *p;
|
||||
@ -930,9 +931,9 @@ done:
|
||||
static NCerror
|
||||
buildattribute(NCDAPCOMMON* dapcomm, CDFnode* var, NCattribute* att)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
NCerror ncstat = NC_NOERR;
|
||||
unsigned int nvalues = nclistlength(att->values);
|
||||
size_t nvalues = nclistlength(att->values);
|
||||
int varid = (var == NULL ? NC_GLOBAL : var->ncid);
|
||||
void* mem = NULL;
|
||||
|
||||
@ -966,7 +967,7 @@ buildattribute(NCDAPCOMMON* dapcomm, CDFnode* var, NCattribute* att)
|
||||
if(ncstat) goto done;
|
||||
} else {
|
||||
nc_type atype;
|
||||
unsigned int typesize;
|
||||
size_t typesize;
|
||||
atype = nctypeconvert(dapcomm,att->etype);
|
||||
typesize = nctypesizeof(atype);
|
||||
if (nvalues > 0) {
|
||||
@ -1040,7 +1041,7 @@ NCD2_inq_format_extended(int ncid, int* formatp, int* modep)
|
||||
NCerror
|
||||
computecdfdimnames(NCDAPCOMMON* nccomm)
|
||||
{
|
||||
int i,j;
|
||||
size_t i,j;
|
||||
char tmp[NC_MAX_NAME*2];
|
||||
NClist* conflicts = nclistnew();
|
||||
NClist* varnodes = nccomm->cdf.ddsroot->tree->varnodes;
|
||||
@ -1116,7 +1117,7 @@ fprintf(stderr,"conflict: %s[%lu] %s[%lu]\n",
|
||||
/* Give all the conflicting dimensions an index */
|
||||
for(j=0;j<nclistlength(conflicts);j++) {
|
||||
CDFnode* dim = (CDFnode*)nclistget(conflicts,j);
|
||||
dim->dim.index1 = j+1;
|
||||
dim->dim.index1 = (int)j+1;
|
||||
}
|
||||
}
|
||||
nclistfree(conflicts);
|
||||
@ -1240,7 +1241,8 @@ paramlookup(NCDAPCOMMON* state, const char* key)
|
||||
static NCerror
|
||||
applyclientparams(NCDAPCOMMON* nccomm)
|
||||
{
|
||||
int i,len;
|
||||
size_t i;
|
||||
int len;
|
||||
int dfaltstrlen = DEFAULTSTRINGLENGTH;
|
||||
int dfaltseqlim = DEFAULTSEQLIMIT;
|
||||
const char* value;
|
||||
@ -1364,12 +1366,12 @@ applyclientparams(NCDAPCOMMON* nccomm)
|
||||
static void
|
||||
computedimindexanon(CDFnode* dim, CDFnode* var)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
NClist* dimset = var->array.dimsetall;
|
||||
for(i=0;i<nclistlength(dimset);i++) {
|
||||
CDFnode* candidate = (CDFnode*)nclistget(dimset,i);
|
||||
if(dim == candidate) {
|
||||
dim->dim.index1=i+1;
|
||||
dim->dim.index1 = (int)i+1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1379,7 +1381,7 @@ computedimindexanon(CDFnode* dim, CDFnode* var)
|
||||
static void
|
||||
replacedims(NClist* dims)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for(i=0;i<nclistlength(dims);i++) {
|
||||
CDFnode* dim = (CDFnode*)nclistget(dims,i);
|
||||
CDFnode* basedim = dim->dim.basedim;
|
||||
@ -1407,7 +1409,7 @@ equivalentdim(CDFnode* basedim, CDFnode* dupdim)
|
||||
static void
|
||||
getalldimsa(NClist* dimset, NClist* alldims)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for(i=0;i<nclistlength(dimset);i++) {
|
||||
CDFnode* dim = (CDFnode*)nclistget(dimset,i);
|
||||
if(!nclistcontains(alldims,(void*)dim)) {
|
||||
@ -1426,7 +1428,7 @@ fprintf(stderr,"getalldims: %s[%lu]\n",
|
||||
NClist*
|
||||
getalldims(NCDAPCOMMON* nccomm, int visibleonly)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
NClist* alldims = nclistnew();
|
||||
NClist* varnodes = nccomm->cdf.ddsroot->tree->varnodes;
|
||||
|
||||
@ -1450,7 +1452,7 @@ addstringdims(NCDAPCOMMON* dapcomm)
|
||||
in DODS{...} attribute set or defaulting to the variable name.
|
||||
All such dimensions are global.
|
||||
*/
|
||||
int i;
|
||||
size_t i;
|
||||
NClist* varnodes = dapcomm->cdf.ddsroot->tree->varnodes;
|
||||
CDFnode* globalsdim = NULL;
|
||||
char dimname[4096];
|
||||
@ -1514,7 +1516,7 @@ addstringdims(NCDAPCOMMON* dapcomm)
|
||||
static NCerror
|
||||
defrecorddim(NCDAPCOMMON* dapcomm)
|
||||
{
|
||||
unsigned int i;
|
||||
size_t i;
|
||||
NCerror ncstat = NC_NOERR;
|
||||
NClist* basedims;
|
||||
|
||||
@ -1590,7 +1592,7 @@ fail:
|
||||
static NCerror
|
||||
showprojection(NCDAPCOMMON* dapcomm, CDFnode* var)
|
||||
{
|
||||
int i,rank;
|
||||
size_t i,rank;
|
||||
NCerror ncstat = NC_NOERR;
|
||||
NCbytes* projection = ncbytesnew();
|
||||
NClist* path = nclistnew();
|
||||
@ -1848,7 +1850,7 @@ make sure we always have a constraint.
|
||||
static NCerror
|
||||
computeseqcountconstraints(NCDAPCOMMON* dapcomm, CDFnode* seq, NCbytes* seqcountconstraints)
|
||||
{
|
||||
int i,j;
|
||||
size_t i,j;
|
||||
NClist* path = NULL;
|
||||
CDFnode* var = NULL;
|
||||
|
||||
@ -1875,7 +1877,7 @@ computeseqcountconstraints(NCDAPCOMMON* dapcomm, CDFnode* seq, NCbytes* seqcount
|
||||
ncbytescat(seqcountconstraints,tmp);
|
||||
}
|
||||
} else if(nclistlength(node->array.dimset0) > 0) {
|
||||
int ndims = nclistlength(node->array.dimset0);
|
||||
size_t ndims = nclistlength(node->array.dimset0);
|
||||
for(j=0;j<ndims;j++) {
|
||||
CDFnode* dim = (CDFnode*)nclistget(node->array.dimset0,j);
|
||||
if(DIMFLAG(dim,CDFDIMSTRING)) {
|
||||
@ -1986,8 +1988,8 @@ cdftotalsize(NClist* dimensions)
|
||||
static void
|
||||
estimatevarsizes(NCDAPCOMMON* dapcomm)
|
||||
{
|
||||
int ivar;
|
||||
unsigned int rank;
|
||||
size_t ivar;
|
||||
size_t rank;
|
||||
size_t totalsize = 0;
|
||||
|
||||
for(ivar=0;ivar<nclistlength(dapcomm->cdf.ddsroot->tree->varnodes);ivar++) {
|
||||
@ -2183,7 +2185,7 @@ make them invisible.
|
||||
static NCerror
|
||||
fixzerodims(NCDAPCOMMON* dapcomm)
|
||||
{
|
||||
int i,j;
|
||||
size_t i,j;
|
||||
for(i=0;i<nclistlength(dapcomm->cdf.ddsroot->tree->varnodes);i++) {
|
||||
CDFnode* var = (CDFnode*)nclistget(dapcomm->cdf.ddsroot->tree->varnodes,i);
|
||||
NClist* ncdims = var->array.dimsetplus;
|
||||
@ -2249,7 +2251,7 @@ applyclientparamcontrols(NCDAPCOMMON* dapcomm)
|
||||
CLRFLAG(dapcomm->controls,NCF_FILLMISMATCH);
|
||||
|
||||
if((value=dapparamvalue(dapcomm,"encode")) != NULL) {
|
||||
int i;
|
||||
size_t i;
|
||||
NClist* encode = nclistnew();
|
||||
if(dapparamparselist(value,',',encode))
|
||||
nclog(NCLOGERR,"Malformed encode parameter: %s",value);
|
||||
|