├── .gitignore ├── .indent.pro.in ├── CHANGES ├── CMakeLists.txt ├── CMakeModules ├── FindHDF4.cmake ├── FindHDF5.cmake ├── FindIDL.cmake ├── FindJPEG.cmake ├── FindSZIP.cmake └── FindZLIB.cmake ├── COPYING ├── DEVELOPER ├── FAQ ├── INSTALL ├── LICENSES ├── Makefile.am ├── README ├── bootstrap ├── codadef.sh ├── config.h.cmake.in ├── configure.ac ├── cpack_wix_patch.xml ├── doc └── html │ ├── codacheck │ └── index.html │ ├── codacmp │ └── index.html │ ├── codadd │ └── index.html │ ├── codadef │ ├── codadef-cdf.html │ ├── codadef-expressions.html │ ├── codadef-format.html │ ├── codadef-grib.html │ ├── codadef-hdf4.html │ ├── codadef-hdf5.html │ ├── codadef-netcdf.html │ ├── codadef-rinex.html │ ├── codadef-sp3.html │ └── codadef-xml.html │ ├── codadump │ └── index.html │ ├── codaeval │ └── index.html │ ├── codafind │ └── index.html │ ├── css │ ├── codadef.css │ └── codadoc.css │ ├── fortran │ └── index.html │ ├── idl │ └── index.html │ ├── images │ └── coda-large.png │ ├── index.html │ ├── java │ ├── annotated.html │ ├── class_array_ordering_enum.html │ ├── class_format_enum.html │ ├── class_native_type_enum.html │ ├── class_special_type_enum.html │ ├── class_type_class_enum.html │ ├── classes.html │ ├── classnl_1_1stcorp_1_1coda_1_1_coda-members.html │ ├── classnl_1_1stcorp_1_1coda_1_1_coda.html │ ├── classnl_1_1stcorp_1_1coda_1_1_coda_exception-members.html │ ├── classnl_1_1stcorp_1_1coda_1_1_coda_exception.html │ ├── classnl_1_1stcorp_1_1coda_1_1_cursor-members.html │ ├── classnl_1_1stcorp_1_1coda_1_1_cursor.html │ ├── classnl_1_1stcorp_1_1coda_1_1_expression-members.html │ ├── classnl_1_1stcorp_1_1coda_1_1_expression.html │ ├── classnl_1_1stcorp_1_1coda_1_1_product-members.html │ ├── classnl_1_1stcorp_1_1coda_1_1_product.html │ ├── classnl_1_1stcorp_1_1coda_1_1_type-members.html │ ├── classnl_1_1stcorp_1_1coda_1_1_type.html │ ├── clipboard.js │ ├── doc.svg │ ├── docd.svg │ ├── doxygen_crawl.html │ ├── dynsections.js │ ├── folderclosed.svg │ ├── folderclosedd.svg │ ├── folderopen.svg │ ├── folderopend.svg │ ├── functions.html │ ├── functions_func.html │ ├── index.html │ ├── jquery.js │ ├── minus.svg │ ├── minusd.svg │ ├── plus.svg │ └── plusd.svg │ ├── libcoda │ ├── clipboard.js │ ├── doc.svg │ ├── docd.svg │ ├── doxygen_crawl.html │ ├── dynsections.js │ ├── folderclosed.svg │ ├── folderclosedd.svg │ ├── folderopen.svg │ ├── folderopend.svg │ ├── group__coda__cursor.html │ ├── group__coda__error.html │ ├── group__coda__expression.html │ ├── group__coda__general.html │ ├── group__coda__product.html │ ├── group__coda__time.html │ ├── group__coda__types.html │ ├── index.html │ ├── jquery.js │ ├── minus.svg │ ├── minusd.svg │ ├── plus.svg │ ├── plusd.svg │ └── topics.html │ ├── matlab │ └── index.html │ └── python │ └── index.html ├── docjava.mk ├── doclibcoda.mk ├── findtypedef.l ├── fortran ├── Makefile.in ├── checkf77.sh ├── coda.inc ├── coda_fortran.c └── example.f ├── idl ├── coda_idl.c ├── coda_idl.def └── coda_idl.dlm.in ├── java ├── CodaExample.java ├── build.xml.in ├── coda_ignore.i ├── coda_jni.c ├── coda_rename.i ├── codac.i ├── doc │ ├── Doxyfile.in │ ├── extrapages.txt │ ├── footer.html │ └── header.html └── nl │ └── stcorp │ └── coda │ ├── ArrayOrderingEnum.java │ ├── Coda.java │ ├── CodaException.java │ ├── Cursor.java │ ├── Expression.java │ ├── ExpressionTypeEnum.java │ ├── FilefilterStatusEnum.java │ ├── FormatEnum.java │ ├── NativeTypeEnum.java │ ├── Product.java │ ├── SWIGTYPE_p_coda_cursor_struct.java │ ├── SWIGTYPE_p_coda_expression_struct.java │ ├── SWIGTYPE_p_coda_product_struct.java │ ├── SWIGTYPE_p_coda_type_struct.java │ ├── SpecialTypeEnum.java │ ├── Type.java │ ├── TypeClassEnum.java │ ├── codac.java │ ├── codacConstants.java │ └── codacJNI.java ├── libcoda ├── coda-ascbin-cursor.c ├── coda-ascbin.h ├── coda-ascii-cursor.c ├── coda-ascii-internal.h ├── coda-ascii.c ├── coda-ascii.h ├── coda-bin-cursor.c ├── coda-bin-internal.h ├── coda-bin.c ├── coda-bin.h ├── coda-cdf-cursor.c ├── coda-cdf-internal.h ├── coda-cdf-type.c ├── coda-cdf.c ├── coda-cdf.h ├── coda-check.c ├── coda-cursor-read.c ├── coda-cursor.c ├── coda-definition-parse.c ├── coda-definition.c ├── coda-definition.h ├── coda-detection.c ├── coda-errno.c ├── coda-expr-parser.y ├── coda-expr-tokenizer.l ├── coda-expr.c ├── coda-expr.h ├── coda-filefilter.c ├── coda-filefilter.h ├── coda-grib-cursor.c ├── coda-grib-internal.h ├── coda-grib-type.c ├── coda-grib.c ├── coda-grib.h ├── coda-hdf4-cursor.c ├── coda-hdf4-internal.h ├── coda-hdf4-type.c ├── coda-hdf4.c ├── coda-hdf4.h ├── coda-hdf5-cursor.c ├── coda-hdf5-internal.h ├── coda-hdf5-type.c ├── coda-hdf5.c ├── coda-hdf5.h ├── coda-internal.h ├── coda-mem-cursor.c ├── coda-mem-internal.h ├── coda-mem-type.c ├── coda-mem.c ├── coda-mem.h ├── coda-netcdf-cursor.c ├── coda-netcdf-internal.h ├── coda-netcdf-type.c ├── coda-netcdf.c ├── coda-netcdf.h ├── coda-path.h ├── coda-product.c ├── coda-read-array.h ├── coda-read-bits.h ├── coda-read-bytes-in-bounds.h ├── coda-read-bytes.h ├── coda-read-partial-array.h ├── coda-rinex.c ├── coda-rinex.h ├── coda-sp3.c ├── coda-sp3.h ├── coda-swap2.h ├── coda-swap4.h ├── coda-swap8.h ├── coda-time.c ├── coda-transpose-array.h ├── coda-tree.c ├── coda-tree.h ├── coda-type.c ├── coda-type.h ├── coda-utils.c ├── coda-xml-internal.h ├── coda-xml-parser.c ├── coda-xml.c ├── coda-xml.h ├── coda.c ├── coda.h.cmake.in ├── coda.h.in ├── doc │ ├── Doxyfile.in │ ├── extrapages.txt │ ├── footer.html │ └── header.html ├── expat │ ├── COPYING │ ├── README │ ├── ascii.h │ ├── asciitab.h │ ├── coda_expat_mangle.h │ ├── expat.h │ ├── expat_external.h │ ├── iasciitab.h │ ├── internal.h │ ├── latin1tab.h │ ├── nametab.h │ ├── siphash.h │ ├── utf8tab.h │ ├── xmlparse.c │ ├── xmlrole.c │ ├── xmlrole.h │ ├── xmltok.c │ ├── xmltok.h │ ├── xmltok_impl.c │ ├── xmltok_impl.h │ └── xmltok_ns.c ├── hashtable.c ├── hashtable.h ├── ipow.h ├── pcre2 │ ├── LICENCE │ ├── README │ ├── coda_pcre2_config.h │ ├── coda_pcre2_mangle.h │ ├── pcre2.h │ ├── pcre2_auto_possess.c │ ├── pcre2_chartables.c │ ├── pcre2_chkdint.c │ ├── pcre2_compile.c │ ├── pcre2_config.c │ ├── pcre2_context.c │ ├── pcre2_dfa_match.c │ ├── pcre2_error.c │ ├── pcre2_extuni.c │ ├── pcre2_find_bracket.c │ ├── pcre2_internal.h │ ├── pcre2_intmodedep.h │ ├── pcre2_maketables.c │ ├── pcre2_match.c │ ├── pcre2_match_data.c │ ├── pcre2_newline.c │ ├── pcre2_ord2utf.c │ ├── pcre2_pattern_info.c │ ├── pcre2_script_run.c │ ├── pcre2_string_utils.c │ ├── pcre2_study.c │ ├── pcre2_substitute.c │ ├── pcre2_substring.c │ ├── pcre2_tables.c │ ├── pcre2_ucd.c │ ├── pcre2_ucp.h │ ├── pcre2_valid_utf.c │ └── pcre2_xclass.c ├── ziparchive.c ├── ziparchive.h └── zlib │ ├── LICENSE │ ├── README │ ├── adler32.c │ ├── coda_zlib_mangle.h │ ├── crc32.c │ ├── crc32.h │ ├── gzguts.h │ ├── inffast.c │ ├── inffast.h │ ├── inffixed.h │ ├── inflate.c │ ├── inflate.h │ ├── inftrees.c │ ├── inftrees.h │ ├── zconf.h │ ├── zlib.h │ ├── zutil.c │ └── zutil.h ├── m4 ├── boxed_text.m4 ├── ccopt.m4 ├── hdf4.m4 ├── hdf5.m4 ├── idl.m4 ├── java.m4 ├── libjpeg.m4 ├── libsz.m4 ├── libz.m4 ├── mathlib.m4 ├── matlab.m4 ├── python.m4 ├── tls.m4 ├── warnings.m4 └── wrapfortran.m4 ├── malloc.c ├── matlab ├── coda-matlab-getdata.c ├── coda-matlab-traverse.c ├── coda-matlab.h ├── coda_attributes.m ├── coda_class.m ├── coda_clearall.m ├── coda_close.m ├── coda_description.m ├── coda_eval.m ├── coda_fetch.m ├── coda_fieldavailable.m ├── coda_fieldcount.m ├── coda_fieldnames.m ├── coda_getopt.m ├── coda_matlab.c ├── coda_matlab.def ├── coda_open.m ├── coda_open_as.m ├── coda_options.m ├── coda_param.m ├── coda_product_class.m ├── coda_product_type.m ├── coda_product_version.m ├── coda_setopt.m ├── coda_size.m ├── coda_time_to_string.m ├── coda_unit.m └── coda_version.m ├── python ├── __init__.py ├── _codac.py └── build.py ├── realloc.c ├── strcasecmp.c ├── strdup.c ├── strncasecmp.c ├── tools ├── codacheck │ └── codacheck.c ├── codacmp │ └── codacmp.c ├── codadd │ ├── codadd-definition.c │ ├── codadd-detect.c │ ├── codadd-doc.c │ ├── codadd-list.c │ ├── codadd-xmlschema.c │ └── codadd.c ├── codadump │ ├── codadump-ascii.c │ ├── codadump-debug.c │ ├── codadump-dim.c │ ├── codadump-filter.c │ ├── codadump-filter.h │ ├── codadump-hdf4.c │ ├── codadump-json.c │ ├── codadump-traverse.c │ ├── codadump-yaml.c │ ├── codadump.c │ └── codadump.h ├── codaeval │ └── codaeval.c └── codafind │ └── codafind.c └── vsnprintf.c /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.lo 3 | *.la 4 | *.class 5 | .deps 6 | .dirstamp 7 | .libs 8 | stamp-* 9 | /.indent.pro 10 | /Makefile 11 | /Makefile.in 12 | /aclocal.m4 13 | /ar-lib 14 | /autom4te.cache/ 15 | /classnoinst.stamp 16 | /coda.h 17 | /codacheck 18 | /codacmp 19 | /codadd 20 | /codadump 21 | /codaeval 22 | /codafind 23 | /compile 24 | /config.guess 25 | /config.h 26 | /config.h.in 27 | /config.log 28 | /config.status 29 | /config.sub 30 | /configure 31 | /depcomp 32 | /findtypedef 33 | /findtypedef.c 34 | /fortran/Makefile 35 | /idl/coda_idl.dlm 36 | /install-sh 37 | /java/build.xml 38 | /java/coda.jar 39 | /java/doc/Doxyfile 40 | /libcoda/coda-expr-parser.c 41 | /libcoda/coda-expr-parser.h 42 | /libcoda/coda-expr-tokenizer.c 43 | /libcoda/doc/Doxyfile 44 | /libtool 45 | /ltmain.sh 46 | /m4/depend.am 47 | /m4/libtool.m4 48 | /m4/ltoptions.m4 49 | /m4/ltsugar.m4 50 | /m4/ltversion.m4 51 | /m4/lt~obsolete.m4 52 | /missing 53 | /py-compile 54 | /ylwrap 55 | -------------------------------------------------------------------------------- /.indent.pro.in: -------------------------------------------------------------------------------- 1 | -bad 2 | -bap 3 | -bl 4 | -bli0 5 | -bls 6 | -c0 7 | -cbi4 8 | -cd0 9 | -cdw 10 | -ci0 11 | -cli4 12 | -cp0 13 | -hnl 14 | -i4 15 | -l120 16 | -lp 17 | -nbbo 18 | -nbbb 19 | -nbc 20 | -nbfda 21 | -nce 22 | -ncs 23 | -nfca 24 | -npcs 25 | -npro 26 | -nprs 27 | -npsl 28 | -nsob 29 | -nut 30 | -nv 31 | -pi0 32 | -saf 33 | -sai 34 | -saw 35 | -sbi0 36 | -ss 37 | -ts8 38 | -T FILE 39 | -T LPTSTR 40 | -T size_t 41 | -T off_t 42 | -T int8_t 43 | -T int16_t 44 | -T int32_t 45 | -T int64_t 46 | -T uint8_t 47 | -T uint16_t 48 | -T uint32_t 49 | -T uint64_t 50 | -T read_function 51 | -T read_basic_type_function 52 | -T free_data_handler 53 | -T int32 54 | -T uint8 55 | -T uint16 56 | -T hid_t 57 | -T H5E_error_t 58 | -T hsize_t 59 | -T UCHAR 60 | -T IDL_FUN_RET 61 | -T IDL_LONG 62 | -T IDL_LONG64 63 | -T IDL_MEMINT 64 | -T IDL_STRING 65 | -T IDL_STRUCT_TAG_DEF 66 | -T IDL_StructDefPtr 67 | -T IDL_SYSRTN_GENERIC 68 | -T IDL_UINT 69 | -T IDL_ULONG 70 | -T IDL_ULONG64 71 | -T IDL_VPTR 72 | -T mxArray 73 | -T mxClassID 74 | -T mxComplexity 75 | -T PyObject 76 | -T PCRE2_SPTR8 77 | -T PCRE2_UCHAR 78 | -T XML_Parser 79 | -T Bytef 80 | -------------------------------------------------------------------------------- /CMakeModules/FindHDF4.cmake: -------------------------------------------------------------------------------- 1 | # Find the HDF4 library 2 | # 3 | # This module defines 4 | # HDF4_INCLUDE_DIR, where to find hdfi.h, etc. 5 | # HDF4_LIBRARIES, the hdf libraries to link against to use HDF4. 6 | # HDF4_FOUND, If false, do not try to use HDF4. 7 | # 8 | # The user may specify HDF4_INCLUDE_DIR and HDF4_LIBRARY_DIR variables 9 | # to locate include and library files 10 | # 11 | include(CheckLibraryExists) 12 | include(CheckIncludeFile) 13 | 14 | set(HDF4_INCLUDE_DIR CACHE STRING "Location of HDF4 include files") 15 | set(HDF4_LIBRARY_DIR CACHE STRING "Location of HDF4 library files") 16 | 17 | find_package(JPEG) 18 | find_package(ZLIB) 19 | find_package(SZIP) 20 | 21 | if(HDF4_INCLUDE_DIR) 22 | set(CMAKE_REQUIRED_INCLUDES ${HDF4_INCLUDE_DIR}) 23 | endif(HDF4_INCLUDE_DIR) 24 | 25 | check_include_file(hdf.h HAVE_HDF_H) 26 | check_include_file(mfhdf.h HAVE_MFHDF_H) 27 | 28 | find_library(DF_LIBRARY NAMES hdf libhdf df PATHS ${HDF4_LIBRARY_DIR}) 29 | if(DF_LIBRARY) 30 | set(CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${SZIP_LIBRARIES}) 31 | check_library_exists(${DF_LIBRARY} Hopen "" HAVE_DF_LIBRARY) 32 | endif(DF_LIBRARY) 33 | 34 | find_library(MFHDF_LIBRARY NAMES mfhdf libmfhdf PATHS ${HDF4_LIBRARY_DIR}) 35 | if(MFHDF_LIBRARY) 36 | set(CMAKE_REQUIRED_LIBRARIES ${DF_LIBRARY} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${SZIP_LIBRARIES}) 37 | check_library_exists(${MFHDF_LIBRARY} SDstart "" HAVE_MFHDF_LIBRARY) 38 | endif(MFHDF_LIBRARY) 39 | 40 | if(HAVE_DF_LIBRARY AND HAVE_MFHDF_LIBRARY) 41 | set(HDF4_LIBRARIES ${MFHDF_LIBRARY} ${DF_LIBRARY} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${SZIP_LIBRARIES}) 42 | endif(HAVE_DF_LIBRARY AND HAVE_MFHDF_LIBRARY) 43 | 44 | if(WIN32 AND HAVE_DF_LIBRARY AND HAVE_MFHDF_LIBRARY) 45 | get_filename_component(DF_LIBRARY_NAME ${DF_LIBRARY} NAME_WE) 46 | find_file(DF_DLL NAMES ${DF_LIBRARY_NAME}.dll PATHS ${HDF4_LIBRARY_DIR} ${HDF4_LIBRARY_DIR}/../bin) 47 | get_filename_component(MFHDF_LIBRARY_NAME ${MFHDF_LIBRARY} NAME_WE) 48 | find_file(MFHDF_DLL NAMES ${MFHDF_LIBRARY_NAME}.dll PATHS ${HDF4_LIBRARY_DIR} ${HDF4_LIBRARY_DIR}/../bin) 49 | find_file(XDR_DLL NAMES xdr.dll PATHS ${HDF4_LIBRARY_DIR} ${HDF4_LIBRARY_DIR}/../bin) 50 | if(XDR_DLL STREQUAL "XDR_DLL-NOTFOUND") 51 | set(XDR_DLL "") 52 | endif() 53 | if(DF_DLL AND MFHDF_DLL) 54 | set(HDF4_DLLS ${DF_DLL} ${MFHDF_DLL} ${XDR_DLL} ${ZLIB_DLLS} ${JPEG_DLLS} ${SZIP_DLLS}) 55 | endif(DF_DLL AND MFHDF_DLL) 56 | endif(WIN32 AND HAVE_DF_LIBRARY AND HAVE_MFHDF_LIBRARY) 57 | 58 | include(FindPackageHandleStandardArgs) 59 | find_package_handle_standard_args(HDF4 DEFAULT_MSG HAVE_DF_LIBRARY HAVE_MFHDF_LIBRARY HAVE_HDF_H HAVE_MFHDF_H) 60 | -------------------------------------------------------------------------------- /CMakeModules/FindHDF5.cmake: -------------------------------------------------------------------------------- 1 | # Find the HDF5 library 2 | # 3 | # This module defines 4 | # HDF5_INCLUDE_DIR, where to find hdf5.h, etc. 5 | # HDF5_LIBRARIES, the hdf5 libraries to link against to use HDF5. 6 | # HDF5_FOUND, If false, do not try to use HDF5. 7 | # 8 | # The user may specify HDF5_INCLUDE_DIR and HDF5_LIBRARY_DIR variables 9 | # to locate include and library files 10 | # 11 | include(CheckLibraryExists) 12 | include(CheckIncludeFile) 13 | 14 | set(HDF5_INCLUDE_DIR CACHE STRING "Location of HDF5 include files") 15 | set(HDF5_LIBRARY_DIR CACHE STRING "Location of HDF5 library files") 16 | 17 | find_package(ZLIB) 18 | find_package(SZIP) 19 | 20 | if(HDF5_INCLUDE_DIR) 21 | set(CMAKE_REQUIRED_INCLUDES ${HDF5_INCLUDE_DIR}) 22 | endif(HDF5_INCLUDE_DIR) 23 | 24 | check_include_file(hdf5.h HAVE_HDF5_H) 25 | 26 | find_library(HDF5_LIBRARY NAMES hdf5 libhdf5 PATHS ${HDF5_LIBRARY_DIR}) 27 | if(HDF5_LIBRARY) 28 | set(CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARIES} ${SZIP_LIBRARIES}) 29 | check_library_exists(${HDF5_LIBRARY} H5Fopen "" HAVE_HDF5_LIBRARY) 30 | endif(HDF5_LIBRARY) 31 | 32 | if(HAVE_HDF5_LIBRARY) 33 | set(HDF5_LIBRARIES ${HDF5_LIBRARY} ${ZLIB_LIBRARIES} ${SZIP_LIBRARIES}) 34 | endif(HAVE_HDF5_LIBRARY) 35 | 36 | if(WIN32 AND HAVE_HDF5_LIBRARY) 37 | get_filename_component(HDF5_LIBRARY_NAME ${HDF5_LIBRARY} NAME_WE) 38 | find_file(HDF5_DLL NAMES ${HDF5_LIBRARY_NAME}.dll PATHS ${HDF5_LIBRARY_DIR} ${HDF5_LIBRARY_DIR}/../bin) 39 | if(HDF5_DLL) 40 | set(HDF5_DLLS ${HDF5_DLL} ${ZLIB_DLLS} ${SZIP_DLLS}) 41 | endif(HDF5_DLL) 42 | endif(WIN32 AND HAVE_HDF5_LIBRARY) 43 | 44 | include(FindPackageHandleStandardArgs) 45 | find_package_handle_standard_args(HDF5 DEFAULT_MSG HAVE_HDF5_LIBRARY HAVE_HDF5_H) 46 | -------------------------------------------------------------------------------- /CMakeModules/FindJPEG.cmake: -------------------------------------------------------------------------------- 1 | # Find the Jpeg library 2 | # 3 | # This module defines 4 | # JPEG_INCLUDE_DIR, where to find jpeglib.h 5 | # JPEG_LIBRARIES, the libraries to link against to use JPEG. 6 | # JPEG_FOUND, If false, do not try to use JPEG 7 | # 8 | # The user may specify JPEG_INCLUDE_DIR and JPEG_LIBRARY_DIR variables 9 | # to locate include and library files 10 | # 11 | include(CheckLibraryExists) 12 | include(CheckIncludeFiles) 13 | 14 | set(JPEG_INCLUDE_DIR CACHE STRING "Location of JPEG include files") 15 | set(JPEG_LIBRARY_DIR CACHE STRING "Location of JPEG library files") 16 | 17 | if(JPEG_INCLUDE_DIR) 18 | set(CMAKE_REQUIRED_INCLUDES ${JPEG_INCLUDE_DIR}) 19 | endif(JPEG_INCLUDE_DIR) 20 | 21 | check_include_files("stdio.h;jpeglib.h" HAVE_JPEGLIB_H) 22 | 23 | find_library(JPEG_LIBRARY NAMES jpeg libjpeg PATHS ${JPEG_LIBRARY_DIR}) 24 | if(JPEG_LIBRARY) 25 | check_library_exists(${JPEG_LIBRARY} jpeg_start_compress "" HAVE_JPEG_LIBRARY) 26 | endif(JPEG_LIBRARY) 27 | if(HAVE_JPEG_LIBRARY) 28 | set(JPEG_LIBRARIES ${JPEG_LIBRARY}) 29 | endif(HAVE_JPEG_LIBRARY) 30 | 31 | if(WIN32 AND HAVE_JPEG_LIBRARY) 32 | get_filename_component(JPEG_LIBRARY_NAME ${JPEG_LIBRARY} NAME_WE) 33 | if(NOT JPEG_LIBRARY_DIR) 34 | get_filename_component(JPEG_LIBRARY_DIR ${JPEG_LIBRARY} DIRECTORY) 35 | endif(NOT JPEG_LIBRARY_DIR) 36 | file(GLOB JPEG_DLL ${JPEG_LIBRARY_DIR}/../bin/${JPEG_LIBRARY_NAME}*.dll) 37 | if(JPEG_DLL) 38 | set(JPEG_DLLS ${JPEG_DLL}) 39 | endif(JPEG_DLL) 40 | endif(WIN32 AND HAVE_JPEG_LIBRARY) 41 | 42 | include(FindPackageHandleStandardArgs) 43 | find_package_handle_standard_args(JPEG DEFAULT_MSG HAVE_JPEG_LIBRARY HAVE_JPEGLIB_H) 44 | -------------------------------------------------------------------------------- /CMakeModules/FindSZIP.cmake: -------------------------------------------------------------------------------- 1 | # Find the SZIP library 2 | # 3 | # This module defines 4 | # SZIP_INCLUDE_DIR, where to find szip.h 5 | # SZIP_LIBRARIES, the libraries to link against to use SZIP. 6 | # SZIP_FOUND, If false, do not try to use SZIP 7 | # 8 | # The user may specify SZIP_INCLUDE_DIR and SZIP_LIBRARY_DIR variables 9 | # to locate include and library files 10 | # 11 | include(CheckLibraryExists) 12 | include(CheckIncludeFile) 13 | 14 | set(SZIP_INCLUDE_DIR CACHE STRING "Location of SZIP include files") 15 | set(SZIP_LIBRARY_DIR CACHE STRING "Location of SZIP library files") 16 | 17 | if(SZIP_INCLUDE_DIR) 18 | set(CMAKE_REQUIRED_INCLUDES ${SZIP_INCLUDE_DIR}) 19 | endif(SZIP_INCLUDE_DIR) 20 | 21 | check_include_file(szlib.h HAVE_SZIP_H) 22 | 23 | find_library(SZIP_LIBRARY NAMES sz szip libszip PATHS ${SZIP_LIBRARY_DIR}) 24 | if(SZIP_LIBRARY) 25 | check_library_exists(${SZIP_LIBRARY} SZ_Compress "" HAVE_SZIP_LIBRARY) 26 | endif(SZIP_LIBRARY) 27 | if(HAVE_SZIP_LIBRARY) 28 | set(SZIP_LIBRARIES ${SZIP_LIBRARY}) 29 | endif(HAVE_SZIP_LIBRARY) 30 | 31 | if(WIN32 AND HAVE_SZIP_LIBRARY) 32 | get_filename_component(SZIP_LIBRARY_NAME ${SZIP_LIBRARY} NAME_WE) 33 | find_file(SZIP_DLL NAMES ${SZIP_LIBRARY_NAME}.dll PATHS ${SZIP_LIBRARY_DIR} ${SZIP_LIBRARY_DIR}/../bin) 34 | if(SZIP_DLL) 35 | set(SZIP_DLLS ${SZIP_DLL}) 36 | endif(SZIP_DLL) 37 | endif(WIN32 AND HAVE_SZIP_LIBRARY) 38 | 39 | include(FindPackageHandleStandardArgs) 40 | find_package_handle_standard_args(SZIP DEFAULT_MSG HAVE_SZIP_LIBRARY HAVE_SZIP_H) 41 | -------------------------------------------------------------------------------- /CMakeModules/FindZLIB.cmake: -------------------------------------------------------------------------------- 1 | # Find the Zlib library 2 | # 3 | # This module defines 4 | # ZLIB_INCLUDE_DIR, where to find zlib.h 5 | # ZLIB_LIBRARIES, the libraries to link against to use Zlib. 6 | # ZLIB_FOUND, If false, do not try to use Zlib 7 | # 8 | # The user may specify ZLIB_INCLUDE_DIR and ZLIB_LIBRARY_DIR variables 9 | # to locate include and library files 10 | # 11 | include(CheckLibraryExists) 12 | include(CheckIncludeFile) 13 | 14 | set(ZLIB_INCLUDE_DIR CACHE STRING "Location of ZLIB include files") 15 | set(ZLIB_LIBRARY_DIR CACHE STRING "Location of ZLIB library files") 16 | 17 | if(ZLIB_INCLUDE_DIR) 18 | set(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR}) 19 | endif(ZLIB_INCLUDE_DIR) 20 | 21 | check_include_file(zlib.h HAVE_ZLIB_H) 22 | 23 | find_library(ZLIB_LIBRARY NAMES zlibdll zlib z PATHS ${ZLIB_LIBRARY_DIR}) 24 | if(ZLIB_LIBRARY) 25 | check_library_exists(${ZLIB_LIBRARY} deflate "" HAVE_ZLIB_LIBRARY) 26 | endif(ZLIB_LIBRARY) 27 | if(HAVE_ZLIB_LIBRARY) 28 | set(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) 29 | endif(HAVE_ZLIB_LIBRARY) 30 | 31 | if(WIN32 AND HAVE_ZLIB_LIBRARY) 32 | get_filename_component(ZLIB_LIBRARY_NAME ${ZLIB_LIBRARY} NAME_WE) 33 | find_file(ZLIB_DLL NAMES ${ZLIB_LIBRARY_NAME}.dll PATHS ${ZLIB_LIBRARY_DIR} ${ZLIB_LIBRARY_DIR}/../bin) 34 | if(ZLIB_DLL) 35 | set(ZLIB_DLLS ${ZLIB_DLL}) 36 | endif(ZLIB_DLL) 37 | endif(WIN32 AND HAVE_ZLIB_LIBRARY) 38 | 39 | include(FindPackageHandleStandardArgs) 40 | find_package_handle_standard_args(ZLIB DEFAULT_MSG HAVE_ZLIB_LIBRARY HAVE_ZLIB_H) 41 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2007-2024 S[&]T, The Netherlands. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /DEVELOPER: -------------------------------------------------------------------------------- 1 | Developer Documentation 2 | ======================= 3 | 4 | This document contains specific instructions for CODA developers. 5 | 6 | Commit steps 7 | ------------ 8 | If your changes impact any of the autogenerated parts, make sure these 9 | get regenerated (all using the autotools build system): 10 | 11 | Run 'make doc' to regenerate the documentation with doxygen 1.10.0. 12 | 13 | Run 'make dist' to have config.h.cmake.in and coda.h.cmake.in updated to be 14 | in line with config.h.in and coda.h.in. 15 | 16 | If any interface in the C library has changed check Fortran, IDL, MATLAB, 17 | Python and Java interfaces for consistency. Use SWIG 4.1.1 to regenerate 18 | Java bindings. 19 | 20 | Run 'make indent' using GNU indent (2.2.11) to update the indentation of the C 21 | code. You may have to run it twice to work around flipping indentation choices 22 | of GNU indent. 23 | 24 | Release checklist 25 | ----------------- 26 | - make sure we have the latest versions embedded for expat, pcre, and zlib 27 | - make sure all 'commit steps' (see above) have been performed 28 | - ensure automake and CMake builds are consistent 29 | - check compiler warnings 30 | - increase CODA version number in configure.ac + CMakeLists.txt 31 | format version is x.y(.z). 32 | Increase x for big backward compatibility breaking changes. 33 | Otherwise, increase y if any features were introduced. 34 | Only add/increase z for bug fix releases. 35 | - update version number of shared libcoda library (both in configure.ac and 36 | CMakeLists.txt) 37 | - make sure all documentation is updated accordingly 38 | - update INSTALL and LICENSES 39 | - update README (version number!) 40 | - update CHANGES 41 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Copyright (C) 2007-2024 S[&]T, The Netherlands 2 | 3 | CODA 2.25.6 Release Notes 4 | 5 | 6 | CODA is the Common Data Access framework that allows reading of scientific data 7 | from various data formats, including structured ascii, structured binary, XML, 8 | netCDF, CDF, HDF4, HDF5, GRIB, RINEX and SP3. It provides a single consistent 9 | hierarchical view on data independent of the underlying storage format. 10 | 11 | CODA is used as a core component in various ESA software among which the ESA 12 | Atmospheric Toolbox and the Broadview Radar Altimetry Toolbox (BRAT). 13 | 14 | The CODA software package comes with interfaces for C, Fortran, IDL, MATLAB, 15 | Python, and Java and several useful command-line tools. 16 | 17 | In order to make use of the data reading facilities of CODA, you will need to 18 | have the CODA product format definition files (.codadef files) for the data 19 | products that you want to access. It is important to note that the CODA 20 | software package does not come with any product format definition files itself! 21 | The get access to .codadef files have a look at the software packages that make 22 | use of CODA. 23 | 24 | For files in netCDF, CDF, HDF4, HDF5, GRIB, RINEX, or SP3 format you can use 25 | CODA without any .codadef files, since for these formats CODA either comes with 26 | a built in definition of the format or CODA determines the format from the file 27 | itself. 28 | 29 | 30 | Changes 31 | ======= 32 | 33 | An overview of the changes in this release can be found in the CHANGES file. 34 | 35 | 36 | Installation 37 | ============ 38 | 39 | Installation instructions can be found in the INSTALL file. 40 | 41 | 42 | Documentation 43 | ============= 44 | 45 | Full documentation in HTML is included with the CODA software. 46 | 47 | A version matching the latest development status on GitHub can be viewed at: 48 | 49 | http://stcorp.github.io/coda/doc/html/index.html 50 | 51 | 52 | Download 53 | ======== 54 | 55 | The latest release of CODA can be downloaded from the CODA GitHub website: 56 | 57 | https://github.com/stcorp/coda/releases 58 | 59 | If you encounter any issues with CODA or if you would like to see certain 60 | functionality added then create a topic on the Atmospheric Toolbox Forum: 61 | 62 | https://forum.atmospherictoolbox.org/ 63 | 64 | 65 | CODA Developers 66 | S[&]T, The Netherlands 67 | -------------------------------------------------------------------------------- /bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "---removing generated files---" 4 | # products from ./configure and make 5 | if test -f Makefile ; then 6 | # touch all automatically generated targets that we do not want to rebuild 7 | touch aclocal.m4 8 | touch configure 9 | touch Makefile.in 10 | touch config.status 11 | touch Makefile 12 | # make maintainer-clean 13 | make -k maintainer-clean 14 | fi 15 | 16 | # products from autoreconf 17 | rm -Rf autom4te.cache 18 | rm -f Makefile.in config.h.in aclocal.m4 compile config.guess config.sub \ 19 | configure depcomp install-sh ltmain.sh missing py-compile ylwrap 20 | 21 | if test "$1" != "clean" ; then 22 | # bootstrap 23 | echo "---autoreconf---" 24 | autoreconf -v -i -f 25 | fi 26 | -------------------------------------------------------------------------------- /codadef.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # create .codadef file from a directory containg xml definition files 3 | # and write them to an (optional) output directory. The default output 4 | # directory is the current directory 5 | 6 | # It is recommended to run the following command inside the directory 7 | # to align the format of .xml files before creating the .codadef file. 8 | # $ find . -name "*.xml" -type f -exec xmllint --output '{}' --format '{}' \; 9 | 10 | if test $# -eq 0 -o $# -gt 2 ; then 11 | echo "Usage: $0 [--date] []" 12 | exit 1 13 | fi 14 | 15 | dateonly=no 16 | if test ${1} = "--date" ; then 17 | dateonly=yes 18 | shift 19 | fi 20 | 21 | inputdir=${1} 22 | targetdir=`pwd` 23 | 24 | if test $# -eq 2 ; then 25 | # make targetdir an absolute path (because it will be referenced after 26 | # a cd to the input directory 27 | firstchar=`echo ${2} | sed -e 's:^\(.\).*$:\1:'` 28 | if test "X${firstchar}" = "X/" ; then 29 | targetdir=${2} 30 | else 31 | targetdir=${targetdir}/${2} 32 | fi 33 | fi 34 | 35 | # check for existence of the input 36 | if test ! -d ${inputdir} ; then 37 | echo "Input Directory ${inputdir} does not exist." 38 | exit 1 39 | fi 40 | 41 | # check for existence of the output (or create it) 42 | if test -e ${targetdir} ; then 43 | # something exists 44 | if test ! -d ${targetdir} ; then 45 | echo "Output location exists and is not a directory." 46 | exit 1 47 | fi 48 | else 49 | # does not exist - create it 50 | mkdir -p ${targetdir} 51 | if test $? -ne 0 ; then 52 | echo "Failed to create output directory ${targetdir}." 53 | exit 1 54 | fi 55 | fi 56 | 57 | class=`grep " VERSION 74 | zip -q ${targetdir}/${class}-${date}.codadef VERSION *.xml types/*.xml products/*.xml 75 | status=$? 76 | rm -f VERSION 77 | 78 | exit $status 79 | -------------------------------------------------------------------------------- /cpack_wix_patch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/html/codacheck/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | codacheck 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |

codacheck

16 | 17 |

This documentation describes the functionality of the codacheck tool which is part of CODA.

18 | 19 |

General description

20 | 21 |

The product format definitions in CODA should be of sufficient quality that whenever problems are detected while reading product files, it is usually the product files that are at fault. The codacheck program was written with this in mind. It uses CODA as an active product file problem-detection tool. It takes as arguments one or more product files. CODA will try to open each of these files and will actively look for any problems in these files. Any errors are reported in a user-readable way.

22 | 23 |
24 |     codacheck [-D definitionpath] [<options>] <files>
25 |         Provide a basic sanity check on product files supported by CODA
26 |         Options:
27 |             -d, --definition
28 |                     require products to have a definition in a codadef file,
29 |                     return an error and abort verification otherwise
30 |                     (affects products using formats such as xml/netcdf/hdf)
31 |             -q, --quick
32 |                     only perform a quick check of the product
33 |                     (do not traverse the full product)
34 |             -V, --verbose
35 |                     show more information while performing the check
36 | 
37 |             --no-mmap
38 |                     disable the use of mmap when opening files
39 | 
40 |         If you pass a '-' for the <files> section then the list of files will
41 |         be read from stdin.
42 | 
43 |     codacheck -h, --help
44 |         Show help (this text)
45 | 
46 |     codacheck -v, --version
47 |         Print the version number of CODA and exit
48 | 
49 |     CODA will look for .codadef files using a definition path, which is a ':'
50 |     separated (';' on Windows) list of paths to .codadef files and/or to
51 |     directories containing .codadef files.
52 |     By default the definition path is set to a single directory relative to
53 |     the tool location. A different definition path can be set via the
54 |     CODA_DEFINITION environment variable or via the -D option.
55 |     (the -D option overrides the environment variable setting).
56 | 
57 | 58 | 62 | 63 |
64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /doc/html/codacmp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | codacmp 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |

codacmp

16 | 17 |

This documentation describes the functionality of the codacmp tool which is part of CODA.

18 | 19 |

General description

20 | 21 |

With codacmp one can compare two product files. The tool is primarily intended for verification purposes.

22 | 23 |
24 |     codacmp [-D definitionpath] [<options>] file1 file2
25 |         Compare contents of file1 and file2
26 |         Options:
27 |             -d, --disable_conversions
28 |                     do not perform unit/value conversions
29 |             -p, --path <path>
30 |                     path (in the form of a CODA node expression) to the
31 |                     location in the product where the comparison should begin.
32 |                     This path should be available in both products. If this
33 |                     parameter is not provided the full products are compared.
34 |             -k, --key <path_to_array> <key_string_expr>
35 |                     for the given array in the product use the string
36 |                     expression as a unique key to line up the array elements in
37 |                     the two products. The array elements will then be compared
38 |                     as if it were record fields where the 'key' is used as the
39 |                     field name. This option can be provided multiple times (for
40 |                     different paths).
41 |             -V, --verbose
42 |                     show more information while performing the comparison
43 | 
44 |     codacmp -h, --help
45 |         Show help (this text)
46 | 
47 |     codacmp -v, --version
48 |         Print the version number of CODA and exit
49 | 
50 |     CODA will look for .codadef files using a definition path, which is a ':'
51 |     separated (';' on Windows) list of paths to .codadef files and/or to
52 |     directories containing .codadef files.
53 |     By default the definition path is set to a single directory relative to
54 |     the tool location. A different definition path can be set via the
55 |     CODA_DEFINITION environment variable or via the -D option.
56 |     (the -D option overrides the environment variable setting).
57 | 
58 | 59 | 63 | 64 |
65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /doc/html/codaeval/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | codaeval 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |

codaeval

16 | 17 |

This documentation describes the functionality of the codaeval tool which is part of CODA.

18 | 19 |

General description

20 | 21 |

CODA contains an expression language that can be used to perform calculations on parameters inside a data product. The codaeval tool can be used to evaluate such an expression, either with on one or more product files or without (in case it is a constant expression). Alternatively, using the -c option, the tool will just verify if the expression is syntactically and grammatically correct.

22 | 23 |
24 | Usage:
25 |     codaeval [-D definitionpath] [<options>] expression [<files|directories>]
26 |         Evaluate a CODA expression on a series of files and/or recursively on
27 |         all contents of directories
28 |         If no files or directories are provided then codaeval should be a
29 |         'constant' expression (i.e. it may not contain node expressions or
30 |         functions that rely on product content)
31 | 
32 |         Options:
33 |             -c, --check
34 |                     only check the syntax of the expression, without evaluating
35 |                     it; any remaining options (including files) will be ignored
36 |             -d, --disable_conversions
37 |                     do not perform unit/value conversions
38 |             -p '<path>'
39 |                     a path (in the form of a CODA node expression) to the
40 |                     location in the product where the expression should be
41 |                     evaluated
42 |                     if no path is provided the expression will be evaluated
43 |                     at the root of the product
44 | 
45 |     A description of the syntax of CODA expression language can be found in the
46 |     CODA documentation
47 | 
48 |     codaeval h, --help
49 |         Show help (this text)
50 | 
51 |     codaeval -v, --version
52 |         Print the version number of CODA and exit
53 | 
54 |     CODA will look for .codadef files using a definition path, which is a ':'
55 |     separated (';' on Windows) list of paths to .codadef files and/or to
56 |     directories containing .codadef files.
57 |     By default the definition path is set to a single directory relative to
58 |     the tool location. A different definition path can be set via the
59 |     CODA_DEFINITION environment variable or via the -D option.
60 |     (the -D option overrides the environment variable setting).
61 | 
62 | 63 | 67 | 68 |
69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /doc/html/css/codadef.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: #000000; 3 | background-color: #ffffff; 4 | font-family: Verdana, Helvetica, sans-serif; 5 | font-size: 9pt; 6 | margin-left: 25px; 7 | margin-top: 20px; 8 | margin-bottom: 20px; 9 | width: 600px; 10 | } 11 | 12 | a { text-decoration: none; } 13 | a:link { color: #882222; background-color: inherit; } 14 | a:hover { color: #BB2222; background-color: inherit; } 15 | a:visited { color: #550000; background-color: inherit; } 16 | a:visited:hover { color: #880000; background-color: inherit; } 17 | 18 | a.header:link { color: #EEEEEE; background-color: inherit; } 19 | a.header:hover { color: #999999; background-color: inherit; } 20 | a.header:visited { color: #CCCCCC; background-color: inherit; } 21 | a.header:visited:hover { color: #999999; background-color: inherit; } 22 | 23 | h1 { color: #552222; font-size: 3.6ex; } 24 | h2 { color: #333333; font-size: 3.0ex; } 25 | h3 { color: #000000; font-size: 2.1ex; } 26 | 27 | .attr_key { font-style: italic; } 28 | .attr_value { } 29 | 30 | table { 31 | border-color: #cccccc; 32 | border-style: solid; 33 | border-width: 1px; 34 | border-spacing: 0px; 35 | width: 100%; 36 | } 37 | table.top { 38 | width : 600px; 39 | } 40 | table tr th, table tr td { 41 | font-size: 9pt; 42 | border-color: #bbbbbb; 43 | border-style: solid; 44 | border-width: 1px; 45 | border-spacing: 0px; 46 | padding: 2px; 47 | } 48 | table tr th { 49 | color: #eeeeee; 50 | background: #552222; 51 | } 52 | table tr th.subhdr { 53 | font-weight: normal; 54 | color: #000000; 55 | background: #eeeeee; 56 | } 57 | -------------------------------------------------------------------------------- /doc/html/images/coda-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stcorp/coda/7120cb6278ae263cb5f909abccb8c363b2ee361c/doc/html/images/coda-large.png -------------------------------------------------------------------------------- /doc/html/java/class_array_ordering_enum.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | ArrayOrderingEnum Class Reference 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | Main Page   12 | Classes   13 |
14 |
15 | 16 |
17 |
18 |
ArrayOrderingEnum Class Reference
19 |
20 |
21 |

Detailed Description

22 |

Ordering of elements within arrays (C or Fortran variant).

23 |
24 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /doc/html/java/class_format_enum.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | FormatEnum Class Reference 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | Main Page   12 | Classes   13 |
14 |
15 | 16 |
17 |
18 |
FormatEnum Class Reference
19 |
20 |
21 |

Detailed Description

22 |

The data storage formats that are supported by CODA.

23 |
24 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /doc/html/java/class_native_type_enum.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | NativeTypeEnum Class Reference 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | Main Page   12 | Classes   13 |
14 |
15 | 16 |
17 |
18 |
NativeTypeEnum Class Reference
19 |
20 |
21 |

Detailed Description

22 |

Machine specific data types.

23 |
24 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /doc/html/java/class_special_type_enum.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | SpecialTypeEnum Class Reference 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | Main Page   12 | Classes   13 |
14 |
15 | 16 |
17 |
18 |
SpecialTypeEnum Class Reference
19 |
20 |
21 |

Detailed Description

22 |

The special data types.

23 |
24 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /doc/html/java/class_type_class_enum.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TypeClassEnum Class Reference 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | Main Page   12 | Classes   13 |
14 |
15 | 16 |
17 |
18 |
TypeClassEnum Class Reference
19 |
20 |
21 |

Detailed Description

22 |

CODA Type classes.

23 |
24 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /doc/html/java/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Class Index 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | Main Page   12 | Classes   13 |
14 |
15 | 16 |
17 |
18 |
Class Index
19 |
20 |
21 |
A | C | E | F | N | P | S | T
22 |
23 |
24 |
A
25 |
ArrayOrderingEnum
26 |
27 |
C
28 |
Coda (nl.stcorp.coda)
CodaException (nl.stcorp.coda)
Cursor (nl.stcorp.coda)
29 |
30 |
E
31 |
Expression (nl.stcorp.coda)
32 |
33 |
F
34 |
FormatEnum
35 |
36 |
N
37 |
NativeTypeEnum
38 |
39 |
P
40 |
Product (nl.stcorp.coda)
41 |
42 |
S
43 |
SpecialTypeEnum
44 |
45 |
T
46 |
Type (nl.stcorp.coda)
TypeClassEnum
47 |
48 |
49 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /doc/html/java/classnl_1_1stcorp_1_1coda_1_1_coda_exception-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Member List 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | Main Page   12 | Classes   13 |
14 |
15 | 16 | 20 |
21 |
22 |
CodaException Member List
23 |
24 |
25 | 26 |

This is the complete list of members for CodaException, including all inherited members.

27 | 28 | 29 |
CodaException(String msg)CodaException
30 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /doc/html/java/classnl_1_1stcorp_1_1coda_1_1_coda_exception.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodaException Class Reference 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | Main Page   12 | Classes   13 |
14 |
15 | 16 | 20 |
21 |
22 | 25 |
CodaException Class Reference
26 |
27 |
28 | 29 |

Inherits Exception.

30 | 31 | 33 | 34 | 35 |

32 | Public Member Functions

 CodaException (String msg)
 
36 |

Detailed Description

37 |

Exception indicating that an error occurred in the underlying CODA C Library.

38 |

Constructor & Destructor Documentation

39 | 40 |

◆ CodaException()

41 | 42 |
43 |
44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
CodaException (String msg)
52 |
53 |
Parameters
54 | 55 | 56 |
msgAn error message describing a CODA error.
57 |
58 |
59 | 60 |
61 |
62 |
63 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /doc/html/java/clipboard.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | The code below is based on the Doxygen Awesome project, see 4 | https://github.com/jothepro/doxygen-awesome-css 5 | 6 | MIT License 7 | 8 | Copyright (c) 2021 - 2022 jothepro 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | */ 29 | 30 | let clipboard_title = "Copy to clipboard" 31 | let clipboard_icon = `` 32 | let clipboard_successIcon = `` 33 | let clipboard_successDuration = 1000 34 | 35 | $(function() { 36 | if(navigator.clipboard) { 37 | const fragments = document.getElementsByClassName("fragment") 38 | for(const fragment of fragments) { 39 | const clipboard_div = document.createElement("div") 40 | clipboard_div.classList.add("clipboard") 41 | clipboard_div.innerHTML = clipboard_icon 42 | clipboard_div.title = clipboard_title 43 | $(clipboard_div).click(function() { 44 | const content = this.parentNode.cloneNode(true) 45 | // filter out line number and folded fragments from file listings 46 | content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) 47 | let text = content.textContent 48 | // remove trailing newlines and trailing spaces from empty lines 49 | text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'') 50 | navigator.clipboard.writeText(text); 51 | this.classList.add("success") 52 | this.innerHTML = clipboard_successIcon 53 | window.setTimeout(() => { // switch back to normal icon after timeout 54 | this.classList.remove("success") 55 | this.innerHTML = clipboard_icon 56 | }, clipboard_successDuration); 57 | }) 58 | fragment.insertBefore(clipboard_div, fragment.firstChild) 59 | } 60 | } 61 | }) 62 | -------------------------------------------------------------------------------- /doc/html/java/doc.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /doc/html/java/docd.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /doc/html/java/doxygen_crawl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Validator / crawler helper 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /doc/html/java/folderclosed.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /doc/html/java/folderclosedd.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /doc/html/java/folderopen.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 10 | 11 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /doc/html/java/folderopend.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /doc/html/java/minus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /doc/html/java/minusd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /doc/html/java/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /doc/html/java/plusd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /doc/html/libcoda/clipboard.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | The code below is based on the Doxygen Awesome project, see 4 | https://github.com/jothepro/doxygen-awesome-css 5 | 6 | MIT License 7 | 8 | Copyright (c) 2021 - 2022 jothepro 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | */ 29 | 30 | let clipboard_title = "Copy to clipboard" 31 | let clipboard_icon = `` 32 | let clipboard_successIcon = `` 33 | let clipboard_successDuration = 1000 34 | 35 | $(function() { 36 | if(navigator.clipboard) { 37 | const fragments = document.getElementsByClassName("fragment") 38 | for(const fragment of fragments) { 39 | const clipboard_div = document.createElement("div") 40 | clipboard_div.classList.add("clipboard") 41 | clipboard_div.innerHTML = clipboard_icon 42 | clipboard_div.title = clipboard_title 43 | $(clipboard_div).click(function() { 44 | const content = this.parentNode.cloneNode(true) 45 | // filter out line number and folded fragments from file listings 46 | content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) 47 | let text = content.textContent 48 | // remove trailing newlines and trailing spaces from empty lines 49 | text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'') 50 | navigator.clipboard.writeText(text); 51 | this.classList.add("success") 52 | this.innerHTML = clipboard_successIcon 53 | window.setTimeout(() => { // switch back to normal icon after timeout 54 | this.classList.remove("success") 55 | this.innerHTML = clipboard_icon 56 | }, clipboard_successDuration); 57 | }) 58 | fragment.insertBefore(clipboard_div, fragment.firstChild) 59 | } 60 | } 61 | }) 62 | -------------------------------------------------------------------------------- /doc/html/libcoda/doc.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /doc/html/libcoda/docd.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /doc/html/libcoda/doxygen_crawl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Validator / crawler helper 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /doc/html/libcoda/folderclosed.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /doc/html/libcoda/folderclosedd.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /doc/html/libcoda/folderopen.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 10 | 11 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /doc/html/libcoda/folderopend.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /doc/html/libcoda/minus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /doc/html/libcoda/minusd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /doc/html/libcoda/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /doc/html/libcoda/plusd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /doc/html/libcoda/topics.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Topics 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | Main Page   12 | Modules   13 |
14 |
15 | 16 |
17 |
18 |
Topics
19 |
20 |
21 |
Here is a list of all topics with brief descriptions:
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
 CODA Cursor
 CODA Error
 CODA Expression
 CODA Product
 CODA Time
 CODA Types
 CODA General
31 |
32 |
33 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /doclibcoda.mk: -------------------------------------------------------------------------------- 1 | LIBCODA_DOCFILES = \ 2 | doc/html/libcoda/clipboard.js \ 3 | doc/html/libcoda/doc.svg \ 4 | doc/html/libcoda/docd.svg \ 5 | doc/html/libcoda/doxygen_crawl.html \ 6 | doc/html/libcoda/dynsections.js \ 7 | doc/html/libcoda/folderclosed.svg \ 8 | doc/html/libcoda/folderclosedd.svg \ 9 | doc/html/libcoda/folderopen.svg \ 10 | doc/html/libcoda/folderopend.svg \ 11 | doc/html/libcoda/group__coda__cursor.html \ 12 | doc/html/libcoda/group__coda__error.html \ 13 | doc/html/libcoda/group__coda__expression.html \ 14 | doc/html/libcoda/group__coda__general.html \ 15 | doc/html/libcoda/group__coda__product.html \ 16 | doc/html/libcoda/group__coda__time.html \ 17 | doc/html/libcoda/group__coda__types.html \ 18 | doc/html/libcoda/index.html \ 19 | doc/html/libcoda/jquery.js \ 20 | doc/html/libcoda/minus.svg \ 21 | doc/html/libcoda/minusd.svg \ 22 | doc/html/libcoda/plus.svg \ 23 | doc/html/libcoda/plusd.svg \ 24 | doc/html/libcoda/topics.html 25 | doc/html/libcoda/clipboard.js: 26 | $(MAKE) libcoda_doc 27 | doc/html/libcoda/doc.svg: 28 | $(MAKE) libcoda_doc 29 | doc/html/libcoda/docd.svg: 30 | $(MAKE) libcoda_doc 31 | doc/html/libcoda/doxygen_crawl.html: 32 | $(MAKE) libcoda_doc 33 | doc/html/libcoda/dynsections.js: 34 | $(MAKE) libcoda_doc 35 | doc/html/libcoda/folderclosed.svg: 36 | $(MAKE) libcoda_doc 37 | doc/html/libcoda/folderclosedd.svg: 38 | $(MAKE) libcoda_doc 39 | doc/html/libcoda/folderopen.svg: 40 | $(MAKE) libcoda_doc 41 | doc/html/libcoda/folderopend.svg: 42 | $(MAKE) libcoda_doc 43 | doc/html/libcoda/group__coda__cursor.html: 44 | $(MAKE) libcoda_doc 45 | doc/html/libcoda/group__coda__error.html: 46 | $(MAKE) libcoda_doc 47 | doc/html/libcoda/group__coda__expression.html: 48 | $(MAKE) libcoda_doc 49 | doc/html/libcoda/group__coda__general.html: 50 | $(MAKE) libcoda_doc 51 | doc/html/libcoda/group__coda__product.html: 52 | $(MAKE) libcoda_doc 53 | doc/html/libcoda/group__coda__time.html: 54 | $(MAKE) libcoda_doc 55 | doc/html/libcoda/group__coda__types.html: 56 | $(MAKE) libcoda_doc 57 | doc/html/libcoda/index.html: 58 | $(MAKE) libcoda_doc 59 | doc/html/libcoda/jquery.js: 60 | $(MAKE) libcoda_doc 61 | doc/html/libcoda/minus.svg: 62 | $(MAKE) libcoda_doc 63 | doc/html/libcoda/minusd.svg: 64 | $(MAKE) libcoda_doc 65 | doc/html/libcoda/plus.svg: 66 | $(MAKE) libcoda_doc 67 | doc/html/libcoda/plusd.svg: 68 | $(MAKE) libcoda_doc 69 | doc/html/libcoda/topics.html: 70 | $(MAKE) libcoda_doc 71 | -------------------------------------------------------------------------------- /findtypedef.l: -------------------------------------------------------------------------------- 1 | %option noyywrap 2 | %option always-interactive 3 | %option noinput 4 | %option nounput 5 | 6 | %x COMMENT 7 | %x STRING 8 | %x TYPEDEF 9 | 10 | %{ 11 | #ifdef HAVE_CONFIG_H 12 | #include "config.h" 13 | #endif 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | int depth; 21 | %} 22 | 23 | ID [a-zA-Z][a-zA-Z0-9_]* 24 | %% 25 | 26 | "/*" BEGIN(COMMENT); 27 | "*/" BEGIN(INITIAL); 28 | "\"" BEGIN(STRING); 29 | "\\\"" /* eat escaped double quotes */ 30 | "\"" BEGIN(INITIAL); 31 | {ID} { 32 | if (strcmp(yytext,"typedef") == 0) 33 | { 34 | depth = 0; 35 | BEGIN(TYPEDEF); 36 | } 37 | } 38 | "{" depth++; 39 | "}" depth--; 40 | {ID}("["[0-9, ]+"]")*[ \t\n]*";" { 41 | if (depth == 0) 42 | { 43 | int n; 44 | n = 0; 45 | while (yytext[n] != ';' && 46 | yytext[n] != '[' && 47 | !isspace(yytext[n])) 48 | { 49 | n++; 50 | } 51 | yytext[n] = '\0'; 52 | fprintf(yyout, "%s\n", yytext); 53 | BEGIN(INITIAL); 54 | } 55 | } 56 | <*>.|"\n" /* eat up characters */ 57 | 58 | %% 59 | 60 | int main(int argc, char *argv[]) 61 | { 62 | if (argc > 1) 63 | { 64 | yyin = fopen(argv[1], "r"); 65 | if (yyin == NULL) 66 | { 67 | fprintf(stderr, "ERROR: could not open file\n"); 68 | exit(1); 69 | } 70 | } 71 | else 72 | { 73 | yyin = stdin; 74 | } 75 | yyout = stdout; 76 | 77 | yylex(); 78 | 79 | return 0; 80 | } 81 | -------------------------------------------------------------------------------- /fortran/Makefile.in: -------------------------------------------------------------------------------- 1 | # Make sure to set the CODA_DEFINITION environment variable to point to your 2 | # directory with the CODA .codadef files before running the example program 3 | 4 | 5 | CC = @CC@ 6 | F77 = @F77@ 7 | LD = @F77@ @FFLAGS@ 8 | 9 | # The possible wrapping flags are: 10 | # -DWRAPFORTRAN_USE_UPPERCASE_IDENTIFIERS=1 11 | # -DWRAPFORTRAN_USE_ADDITIONAL_UNDERSCORE=1 12 | WRAPFORTRAN_FLAGS = @WRAPFORTRAN_FLAGS@ 13 | 14 | prefix = @prefix@ 15 | exec_prefix = @exec_prefix@ 16 | includedir = @includedir@ 17 | libdir = @libdir@ 18 | 19 | CPPFLAGS = -I. -I$(includedir) $(WRAPFORTRAN_FLAGS) 20 | CFLAGS = @CFLAGS@ 21 | FFLAGS = @FFLAGS@ 22 | LDFLAGS = @LDFLAGS@ 23 | 24 | LIBS = @LIBS@ 25 | HDF4LIBS = @HDF4LIBS@ 26 | HDF5LIBS = @HDF5LIBS@ 27 | 28 | all: example 29 | 30 | coda_fortran.o: coda_fortran.c 31 | $(CC) $(CPPFLAGS) $(CFLAGS) -c coda_fortran.c 32 | 33 | example.o: example.f coda.inc 34 | $(F77) $(FFLAGS) -c example.f 35 | 36 | example: example.o coda_fortran.o 37 | $(LD) $(LDFLAGS) -o example example.o coda_fortran.o $(libdir)/libcoda.a $(HDF4LIBS) $(HDF5LIBS) $(LIBS) 38 | 39 | clean: 40 | -rm -f *.o $(DEMOS) 41 | -------------------------------------------------------------------------------- /fortran/checkf77.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test -z "$1" ; then 4 | echo "Usage: checkf77.sh " 5 | exit 6 | fi 7 | F77=$1 8 | 9 | echo "Using compiler :" $F77 10 | echo "Checking which precompiler settings should be provided:" 11 | 12 | echo " SUBROUTINE FOO_1" > foo.f 13 | echo " END" >> foo.f 14 | $F77 -c foo.f 15 | 16 | # Test whether the fortran compiler generates capital are small-caps identifiers 17 | echo -n " WRAPFORTRAN_USE_UPPERCASE_IDENTIFIERS : " 18 | use_uppercase_identifiers=no 19 | capitalname=`nm foo.o | grep FOO` 20 | if test ! -z "$capitalname" ; then 21 | echo "yes" 22 | use_uppercase_identifiers=yes 23 | fi 24 | echo $use_uppercase_identifiers 25 | 26 | # Test whether the fortran compiler adds an additional '_' for identifiers 27 | # that already contain a '_'. 28 | echo -n " WRAPFORTRAN_USE_ADDITIONAL_UNDERSCORE : " 29 | use_additional_underscore=no 30 | if test $use_uppercase_identifiers = yes ; then 31 | extraunderscore=`nm foo.o | grep FOO_1__`; 32 | else 33 | extraunderscore=`nm foo.o | grep foo_1__`; 34 | fi 35 | if test ! -z "$extraunderscore" ; then 36 | use_additional_underscore=yes 37 | fi 38 | echo $use_additional_underscore 39 | 40 | rm -f foo.o foo.f 41 | -------------------------------------------------------------------------------- /fortran/example.f: -------------------------------------------------------------------------------- 1 | program example 2 | 3 | implicit none 4 | 5 | C make sure to modify coda.inc when using 32-bit (see comments inside coda.inc) 6 | include "coda.inc" 7 | 8 | character*1024 filename 9 | character*32 product_class 10 | character*32 product_type 11 | character*32 root_type 12 | C use 'integer pf' for 32-bit 13 | integer*8 pf 14 | C use 'integer cursor' for 32-bit 15 | integer*8 cursor 16 | integer type_class 17 | integer result 18 | integer i 19 | 20 | write(*,*) 'Name of the product file:' 21 | read(*,'(A1024)') filename 22 | 23 | result = coda_init() 24 | if (result .ne. 0) then 25 | call handle_coda_error() 26 | end if 27 | 28 | result = coda_open(filename, pf) 29 | if (result .ne. 0) then 30 | call handle_coda_error() 31 | end if 32 | 33 | result = coda_get_product_class(pf, product_class) 34 | if (result .ne. 0) then 35 | call handle_coda_error() 36 | end if 37 | write(*,*) 'Product class = ' // product_class 38 | 39 | result = coda_get_product_type(pf, product_type) 40 | if (result .ne. 0) then 41 | call handle_coda_error() 42 | end if 43 | write(*,*) 'Product type = ' // product_type 44 | 45 | cursor = coda_cursor_new() 46 | 47 | result = coda_cursor_set_product(cursor, pf) 48 | if (result .ne. 0) then 49 | call handle_coda_error() 50 | end if 51 | 52 | result = coda_cursor_get_type_class(cursor, type_class) 53 | if (result .ne. 0) then 54 | call handle_coda_error() 55 | end if 56 | 57 | call coda_type_get_class_name(type_class, root_type) 58 | write(*,*) 'Root type = ' // root_type 59 | 60 | call coda_cursor_delete(cursor) 61 | 62 | result = coda_close(pf) 63 | if (result .ne. 0) then 64 | call handle_coda_error() 65 | end if 66 | 67 | call coda_done() 68 | 69 | end program 70 | 71 | 72 | subroutine handle_coda_error 73 | 74 | implicit none 75 | 76 | include "coda.inc" 77 | 78 | integer err 79 | character*75 errstr 80 | 81 | err = coda_get_errno() 82 | call coda_errno_to_string(err, errstr) 83 | write(*,*) 'Error: ' // errstr 84 | stop 85 | 86 | end subroutine 87 | -------------------------------------------------------------------------------- /idl/coda_idl.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | IDL_Load @1 3 | -------------------------------------------------------------------------------- /idl/coda_idl.dlm.in: -------------------------------------------------------------------------------- 1 | MODULE coda_idl 2 | DESCRIPTION CODA 3 | VERSION @VERSION@ 4 | SOURCE S[&]T 5 | 6 | FUNCTION CODA_ATTRIBUTES 1 IDL_MAXPARAMS 7 | FUNCTION CODA_CLOSE 1 1 8 | FUNCTION CODA_DESCRIPTION 1 IDL_MAXPARAMS 9 | FUNCTION CODA_EVAL 1 IDL_MAXPARAMS 10 | FUNCTION CODA_FETCH 1 IDL_MAXPARAMS 11 | FUNCTION CODA_FETCH_DATAHANDLE 1 IDL_MAXPARAMS 12 | FUNCTION CODA_FIELDAVAILABLE 2 IDL_MAXPARAMS 13 | FUNCTION CODA_FIELDCOUNT 1 IDL_MAXPARAMS 14 | FUNCTION CODA_FIELDNAMES 1 IDL_MAXPARAMS 15 | FUNCTION CODA_GETOPT 1 1 16 | FUNCTION CODA_IS_NO_DATA 1 1 17 | FUNCTION CODA_IS_ERROR 1 1 18 | FUNCTION CODA_OPEN 1 1 19 | FUNCTION CODA_OPEN_AS 4 4 20 | FUNCTION CODA_PRODUCT_CLASS 1 1 21 | FUNCTION CODA_PRODUCT_TYPE 1 1 22 | FUNCTION CODA_PRODUCT_VERSION 1 1 23 | FUNCTION CODA_SETOPT 2 2 24 | FUNCTION CODA_SIZE 1 IDL_MAXPARAMS 25 | FUNCTION CODA_TIME_TO_STRING 1 1 26 | FUNCTION CODA_UNIT 1 IDL_MAXPARAMS 27 | FUNCTION CODA_VERSION 0 0 28 | 29 | PROCEDURE CODA_UNLOAD 0 0 30 | 31 | STRUCTURE CODA_DATAHANDLE 32 | STRUCTURE CODA_ERROR 33 | STRUCTURE CODA_NO_DATA 34 | -------------------------------------------------------------------------------- /java/coda_ignore.i: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | %ignore CODA_H; 33 | %ignore HAVE_INTTYPES_H; 34 | %ignore HAVE_STDINT_H; 35 | %ignore HAVE_SYS_TYPES_H; 36 | %ignore CODA_SUCCESS; 37 | %ignore CODA_ERROR_OUT_OF_MEMORY; 38 | %ignore CODA_ERROR_HDF4; 39 | %ignore CODA_ERROR_NO_HDF4_SUPPORT; 40 | %ignore CODA_ERROR_HDF5; 41 | %ignore CODA_ERROR_NO_HDF5_SUPPORT; 42 | %ignore CODA_ERROR_XML; 43 | %ignore CODA_ERROR_FILE_NOT_FOUND; 44 | %ignore CODA_ERROR_FILE_OPEN; 45 | %ignore CODA_ERROR_FILE_READ; 46 | %ignore CODA_ERROR_FILE_WRITE; 47 | %ignore CODA_ERROR_INVALID_ARGUMENT; 48 | %ignore CODA_ERROR_INVALID_INDEX; 49 | %ignore CODA_ERROR_INVALID_NAME; 50 | %ignore CODA_ERROR_INVALID_FORMAT; 51 | %ignore CODA_ERROR_INVALID_DATETIME; 52 | %ignore CODA_ERROR_INVALID_TYPE; 53 | %ignore CODA_ERROR_ARRAY_NUM_DIMS_MISMATCH; 54 | %ignore CODA_ERROR_ARRAY_OUT_OF_BOUNDS; 55 | %ignore CODA_ERROR_NO_PARENT; 56 | %ignore CODA_ERROR_UNSUPPORTED_PRODUCT; 57 | %ignore CODA_ERROR_PRODUCT; 58 | %ignore CODA_ERROR_OUT_OF_BOUNDS_READ; 59 | %ignore CODA_ERROR_DATA_DEFINITION; 60 | %ignore CODA_ERROR_EXPRESSION; 61 | %ignore CODA_PRIVATE_FIELD(name); 62 | %ignore CODA_CURSOR_MAXDEPTH; 63 | 64 | %ignore coda_free; 65 | %ignore coda_str64; 66 | %ignore coda_str64u; 67 | %ignore coda_strfl; 68 | 69 | %ignore coda_cursor_print_path; 70 | %ignore coda_expression_print; 71 | -------------------------------------------------------------------------------- /java/doc/Doxyfile.in: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = CODA_Java 2 | PROJECT_NUMBER = @VERSION@ 3 | OUTPUT_DIRECTORY = @top_builddir@/doc 4 | FULL_PATH_NAMES = NO 5 | EXTRACT_STATIC = YES 6 | HIDE_UNDOC_CLASSES = YES 7 | HIDE_UNDOC_MEMBERS = YES 8 | INTERNAL_DOCS = NO 9 | VERBATIM_HEADERS = NO 10 | HIDE_SCOPE_NAMES = YES 11 | INLINE_INFO = YES 12 | SHOW_USED_FILES = NO 13 | SHOW_FILES = NO 14 | OPTIMIZE_OUTPUT_JAVA = YES 15 | DISTRIBUTE_GROUP_DOC = YES 16 | QUIET = YES 17 | WARN_IF_UNDOCUMENTED = NO 18 | INPUT = @srcdir@/extrapages.txt @srcdir@/../nl/stcorp/coda 19 | STRIP_FROM_PATH = @srcdir@ @srcdir@/.. 20 | REFERENCED_BY_RELATION = NO 21 | HTML_OUTPUT = html/java 22 | HTML_FOOTER = @srcdir@/footer.html 23 | HTML_HEADER = @srcdir@/header.html 24 | SEARCHENGINE = NO 25 | DISABLE_INDEX = YES 26 | GENERATE_LATEX = NO 27 | CASE_SENSE_NAMES = NO 28 | -------------------------------------------------------------------------------- /java/doc/footer.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /java/doc/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | $title 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | Main Page   12 | Classes   13 |
14 |
15 | -------------------------------------------------------------------------------- /java/nl/stcorp/coda/ArrayOrderingEnum.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (https://www.swig.org). 3 | * Version 4.1.1 4 | * 5 | * Do not make changes to this file unless you know what you are doing - modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package nl.stcorp.coda; 10 | 11 | public enum ArrayOrderingEnum { 12 | coda_array_ordering_c, 13 | coda_array_ordering_fortran; 14 | 15 | public final int swigValue() { 16 | return swigValue; 17 | } 18 | 19 | public static ArrayOrderingEnum swigToEnum(int swigValue) { 20 | ArrayOrderingEnum[] swigValues = ArrayOrderingEnum.class.getEnumConstants(); 21 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 22 | return swigValues[swigValue]; 23 | for (ArrayOrderingEnum swigEnum : swigValues) 24 | if (swigEnum.swigValue == swigValue) 25 | return swigEnum; 26 | throw new IllegalArgumentException("No enum " + ArrayOrderingEnum.class + " with value " + swigValue); 27 | } 28 | 29 | @SuppressWarnings("unused") 30 | private ArrayOrderingEnum() { 31 | this.swigValue = SwigNext.next++; 32 | } 33 | 34 | @SuppressWarnings("unused") 35 | private ArrayOrderingEnum(int swigValue) { 36 | this.swigValue = swigValue; 37 | SwigNext.next = swigValue+1; 38 | } 39 | 40 | @SuppressWarnings("unused") 41 | private ArrayOrderingEnum(ArrayOrderingEnum swigEnum) { 42 | this.swigValue = swigEnum.swigValue; 43 | SwigNext.next = this.swigValue+1; 44 | } 45 | 46 | private final int swigValue; 47 | 48 | private static class SwigNext { 49 | private static int next = 0; 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /java/nl/stcorp/coda/CodaException.java: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2007-2024 S[&]T, The Netherlands. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are met: 6 | // 7 | // 1. Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // 10 | // 2. Redistributions in binary form must reproduce the above copyright 11 | // notice, this list of conditions and the following disclaimer in the 12 | // documentation and/or other materials provided with the distribution. 13 | // 14 | // 3. Neither the name of the copyright holder nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | // POSSIBILITY OF SUCH DAMAGE. 29 | 30 | package nl.stcorp.coda; 31 | 32 | /** 33 | * Exception indicating that an error occurred in the underlying CODA C Library. 34 | * 35 | */ 36 | public class CodaException extends Exception 37 | { 38 | /** 39 | * @param msg 40 | * An error message describing a CODA error. 41 | */ 42 | public CodaException(String msg) 43 | { 44 | super(msg); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /java/nl/stcorp/coda/ExpressionTypeEnum.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (https://www.swig.org). 3 | * Version 4.1.1 4 | * 5 | * Do not make changes to this file unless you know what you are doing - modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package nl.stcorp.coda; 10 | 11 | public enum ExpressionTypeEnum { 12 | coda_expression_boolean, 13 | coda_expression_integer, 14 | coda_expression_float, 15 | coda_expression_string, 16 | coda_expression_node, 17 | coda_expression_void; 18 | 19 | public final int swigValue() { 20 | return swigValue; 21 | } 22 | 23 | public static ExpressionTypeEnum swigToEnum(int swigValue) { 24 | ExpressionTypeEnum[] swigValues = ExpressionTypeEnum.class.getEnumConstants(); 25 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 26 | return swigValues[swigValue]; 27 | for (ExpressionTypeEnum swigEnum : swigValues) 28 | if (swigEnum.swigValue == swigValue) 29 | return swigEnum; 30 | throw new IllegalArgumentException("No enum " + ExpressionTypeEnum.class + " with value " + swigValue); 31 | } 32 | 33 | @SuppressWarnings("unused") 34 | private ExpressionTypeEnum() { 35 | this.swigValue = SwigNext.next++; 36 | } 37 | 38 | @SuppressWarnings("unused") 39 | private ExpressionTypeEnum(int swigValue) { 40 | this.swigValue = swigValue; 41 | SwigNext.next = swigValue+1; 42 | } 43 | 44 | @SuppressWarnings("unused") 45 | private ExpressionTypeEnum(ExpressionTypeEnum swigEnum) { 46 | this.swigValue = swigEnum.swigValue; 47 | SwigNext.next = this.swigValue+1; 48 | } 49 | 50 | private final int swigValue; 51 | 52 | private static class SwigNext { 53 | private static int next = 0; 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /java/nl/stcorp/coda/FilefilterStatusEnum.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (https://www.swig.org). 3 | * Version 4.1.1 4 | * 5 | * Do not make changes to this file unless you know what you are doing - modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package nl.stcorp.coda; 10 | 11 | public enum FilefilterStatusEnum { 12 | coda_ffs_error, 13 | coda_ffs_could_not_open_file, 14 | coda_ffs_could_not_access_directory, 15 | coda_ffs_unsupported_file, 16 | coda_ffs_match, 17 | coda_ffs_no_match; 18 | 19 | public final int swigValue() { 20 | return swigValue; 21 | } 22 | 23 | public static FilefilterStatusEnum swigToEnum(int swigValue) { 24 | FilefilterStatusEnum[] swigValues = FilefilterStatusEnum.class.getEnumConstants(); 25 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 26 | return swigValues[swigValue]; 27 | for (FilefilterStatusEnum swigEnum : swigValues) 28 | if (swigEnum.swigValue == swigValue) 29 | return swigEnum; 30 | throw new IllegalArgumentException("No enum " + FilefilterStatusEnum.class + " with value " + swigValue); 31 | } 32 | 33 | @SuppressWarnings("unused") 34 | private FilefilterStatusEnum() { 35 | this.swigValue = SwigNext.next++; 36 | } 37 | 38 | @SuppressWarnings("unused") 39 | private FilefilterStatusEnum(int swigValue) { 40 | this.swigValue = swigValue; 41 | SwigNext.next = swigValue+1; 42 | } 43 | 44 | @SuppressWarnings("unused") 45 | private FilefilterStatusEnum(FilefilterStatusEnum swigEnum) { 46 | this.swigValue = swigEnum.swigValue; 47 | SwigNext.next = this.swigValue+1; 48 | } 49 | 50 | private final int swigValue; 51 | 52 | private static class SwigNext { 53 | private static int next = 0; 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /java/nl/stcorp/coda/FormatEnum.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (https://www.swig.org). 3 | * Version 4.1.1 4 | * 5 | * Do not make changes to this file unless you know what you are doing - modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package nl.stcorp.coda; 10 | 11 | public enum FormatEnum { 12 | coda_format_ascii, 13 | coda_format_binary, 14 | coda_format_xml, 15 | coda_format_hdf4, 16 | coda_format_hdf5, 17 | coda_format_cdf, 18 | coda_format_netcdf, 19 | coda_format_grib, 20 | coda_format_rinex, 21 | coda_format_sp3; 22 | 23 | public final int swigValue() { 24 | return swigValue; 25 | } 26 | 27 | public static FormatEnum swigToEnum(int swigValue) { 28 | FormatEnum[] swigValues = FormatEnum.class.getEnumConstants(); 29 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 30 | return swigValues[swigValue]; 31 | for (FormatEnum swigEnum : swigValues) 32 | if (swigEnum.swigValue == swigValue) 33 | return swigEnum; 34 | throw new IllegalArgumentException("No enum " + FormatEnum.class + " with value " + swigValue); 35 | } 36 | 37 | @SuppressWarnings("unused") 38 | private FormatEnum() { 39 | this.swigValue = SwigNext.next++; 40 | } 41 | 42 | @SuppressWarnings("unused") 43 | private FormatEnum(int swigValue) { 44 | this.swigValue = swigValue; 45 | SwigNext.next = swigValue+1; 46 | } 47 | 48 | @SuppressWarnings("unused") 49 | private FormatEnum(FormatEnum swigEnum) { 50 | this.swigValue = swigEnum.swigValue; 51 | SwigNext.next = this.swigValue+1; 52 | } 53 | 54 | private final int swigValue; 55 | 56 | private static class SwigNext { 57 | private static int next = 0; 58 | } 59 | } 60 | 61 | -------------------------------------------------------------------------------- /java/nl/stcorp/coda/NativeTypeEnum.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (https://www.swig.org). 3 | * Version 4.1.1 4 | * 5 | * Do not make changes to this file unless you know what you are doing - modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package nl.stcorp.coda; 10 | 11 | public enum NativeTypeEnum { 12 | coda_native_type_not_available(-1), 13 | coda_native_type_int8, 14 | coda_native_type_uint8, 15 | coda_native_type_int16, 16 | coda_native_type_uint16, 17 | coda_native_type_int32, 18 | coda_native_type_uint32, 19 | coda_native_type_int64, 20 | coda_native_type_uint64, 21 | coda_native_type_float, 22 | coda_native_type_double, 23 | coda_native_type_char, 24 | coda_native_type_string, 25 | coda_native_type_bytes; 26 | 27 | public final int swigValue() { 28 | return swigValue; 29 | } 30 | 31 | public static NativeTypeEnum swigToEnum(int swigValue) { 32 | NativeTypeEnum[] swigValues = NativeTypeEnum.class.getEnumConstants(); 33 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 34 | return swigValues[swigValue]; 35 | for (NativeTypeEnum swigEnum : swigValues) 36 | if (swigEnum.swigValue == swigValue) 37 | return swigEnum; 38 | throw new IllegalArgumentException("No enum " + NativeTypeEnum.class + " with value " + swigValue); 39 | } 40 | 41 | @SuppressWarnings("unused") 42 | private NativeTypeEnum() { 43 | this.swigValue = SwigNext.next++; 44 | } 45 | 46 | @SuppressWarnings("unused") 47 | private NativeTypeEnum(int swigValue) { 48 | this.swigValue = swigValue; 49 | SwigNext.next = swigValue+1; 50 | } 51 | 52 | @SuppressWarnings("unused") 53 | private NativeTypeEnum(NativeTypeEnum swigEnum) { 54 | this.swigValue = swigEnum.swigValue; 55 | SwigNext.next = this.swigValue+1; 56 | } 57 | 58 | private final int swigValue; 59 | 60 | private static class SwigNext { 61 | private static int next = 0; 62 | } 63 | } 64 | 65 | -------------------------------------------------------------------------------- /java/nl/stcorp/coda/SWIGTYPE_p_coda_cursor_struct.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (https://www.swig.org). 3 | * Version 4.1.1 4 | * 5 | * Do not make changes to this file unless you know what you are doing - modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package nl.stcorp.coda; 10 | 11 | public class SWIGTYPE_p_coda_cursor_struct { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_coda_cursor_struct(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_coda_cursor_struct() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_coda_cursor_struct obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | 26 | protected static long swigRelease(SWIGTYPE_p_coda_cursor_struct obj) { 27 | return (obj == null) ? 0 : obj.swigCPtr; 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /java/nl/stcorp/coda/SWIGTYPE_p_coda_expression_struct.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (https://www.swig.org). 3 | * Version 4.1.1 4 | * 5 | * Do not make changes to this file unless you know what you are doing - modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package nl.stcorp.coda; 10 | 11 | public class SWIGTYPE_p_coda_expression_struct { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_coda_expression_struct(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_coda_expression_struct() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_coda_expression_struct obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | 26 | protected static long swigRelease(SWIGTYPE_p_coda_expression_struct obj) { 27 | return (obj == null) ? 0 : obj.swigCPtr; 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /java/nl/stcorp/coda/SWIGTYPE_p_coda_product_struct.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (https://www.swig.org). 3 | * Version 4.1.1 4 | * 5 | * Do not make changes to this file unless you know what you are doing - modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package nl.stcorp.coda; 10 | 11 | public class SWIGTYPE_p_coda_product_struct { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_coda_product_struct(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_coda_product_struct() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_coda_product_struct obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | 26 | protected static long swigRelease(SWIGTYPE_p_coda_product_struct obj) { 27 | return (obj == null) ? 0 : obj.swigCPtr; 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /java/nl/stcorp/coda/SWIGTYPE_p_coda_type_struct.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (https://www.swig.org). 3 | * Version 4.1.1 4 | * 5 | * Do not make changes to this file unless you know what you are doing - modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package nl.stcorp.coda; 10 | 11 | public class SWIGTYPE_p_coda_type_struct { 12 | private transient long swigCPtr; 13 | 14 | protected SWIGTYPE_p_coda_type_struct(long cPtr, @SuppressWarnings("unused") boolean futureUse) { 15 | swigCPtr = cPtr; 16 | } 17 | 18 | protected SWIGTYPE_p_coda_type_struct() { 19 | swigCPtr = 0; 20 | } 21 | 22 | protected static long getCPtr(SWIGTYPE_p_coda_type_struct obj) { 23 | return (obj == null) ? 0 : obj.swigCPtr; 24 | } 25 | 26 | protected static long swigRelease(SWIGTYPE_p_coda_type_struct obj) { 27 | return (obj == null) ? 0 : obj.swigCPtr; 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /java/nl/stcorp/coda/SpecialTypeEnum.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (https://www.swig.org). 3 | * Version 4.1.1 4 | * 5 | * Do not make changes to this file unless you know what you are doing - modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package nl.stcorp.coda; 10 | 11 | public enum SpecialTypeEnum { 12 | coda_special_no_data, 13 | coda_special_vsf_integer, 14 | coda_special_time, 15 | coda_special_complex; 16 | 17 | public final int swigValue() { 18 | return swigValue; 19 | } 20 | 21 | public static SpecialTypeEnum swigToEnum(int swigValue) { 22 | SpecialTypeEnum[] swigValues = SpecialTypeEnum.class.getEnumConstants(); 23 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 24 | return swigValues[swigValue]; 25 | for (SpecialTypeEnum swigEnum : swigValues) 26 | if (swigEnum.swigValue == swigValue) 27 | return swigEnum; 28 | throw new IllegalArgumentException("No enum " + SpecialTypeEnum.class + " with value " + swigValue); 29 | } 30 | 31 | @SuppressWarnings("unused") 32 | private SpecialTypeEnum() { 33 | this.swigValue = SwigNext.next++; 34 | } 35 | 36 | @SuppressWarnings("unused") 37 | private SpecialTypeEnum(int swigValue) { 38 | this.swigValue = swigValue; 39 | SwigNext.next = swigValue+1; 40 | } 41 | 42 | @SuppressWarnings("unused") 43 | private SpecialTypeEnum(SpecialTypeEnum swigEnum) { 44 | this.swigValue = swigEnum.swigValue; 45 | SwigNext.next = this.swigValue+1; 46 | } 47 | 48 | private final int swigValue; 49 | 50 | private static class SwigNext { 51 | private static int next = 0; 52 | } 53 | } 54 | 55 | -------------------------------------------------------------------------------- /java/nl/stcorp/coda/TypeClassEnum.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (https://www.swig.org). 3 | * Version 4.1.1 4 | * 5 | * Do not make changes to this file unless you know what you are doing - modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package nl.stcorp.coda; 10 | 11 | public enum TypeClassEnum { 12 | coda_record_class, 13 | coda_array_class, 14 | coda_integer_class, 15 | coda_real_class, 16 | coda_text_class, 17 | coda_raw_class, 18 | coda_special_class; 19 | 20 | public final int swigValue() { 21 | return swigValue; 22 | } 23 | 24 | public static TypeClassEnum swigToEnum(int swigValue) { 25 | TypeClassEnum[] swigValues = TypeClassEnum.class.getEnumConstants(); 26 | if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 27 | return swigValues[swigValue]; 28 | for (TypeClassEnum swigEnum : swigValues) 29 | if (swigEnum.swigValue == swigValue) 30 | return swigEnum; 31 | throw new IllegalArgumentException("No enum " + TypeClassEnum.class + " with value " + swigValue); 32 | } 33 | 34 | @SuppressWarnings("unused") 35 | private TypeClassEnum() { 36 | this.swigValue = SwigNext.next++; 37 | } 38 | 39 | @SuppressWarnings("unused") 40 | private TypeClassEnum(int swigValue) { 41 | this.swigValue = swigValue; 42 | SwigNext.next = swigValue+1; 43 | } 44 | 45 | @SuppressWarnings("unused") 46 | private TypeClassEnum(TypeClassEnum swigEnum) { 47 | this.swigValue = swigEnum.swigValue; 48 | SwigNext.next = this.swigValue+1; 49 | } 50 | 51 | private final int swigValue; 52 | 53 | private static class SwigNext { 54 | private static int next = 0; 55 | } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /java/nl/stcorp/coda/codacConstants.java: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * This file was automatically generated by SWIG (https://www.swig.org). 3 | * Version 4.1.1 4 | * 5 | * Do not make changes to this file unless you know what you are doing - modify 6 | * the SWIG interface file instead. 7 | * ----------------------------------------------------------------------------- */ 8 | 9 | package nl.stcorp.coda; 10 | 11 | public interface codacConstants { 12 | public final static int CODA_MAX_NUM_DIMS = 8; 13 | } 14 | -------------------------------------------------------------------------------- /libcoda/coda-ascbin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef CODA_ASCBIN_H 33 | #define CODA_ASCBIN_H 34 | 35 | #include "coda-internal.h" 36 | 37 | int coda_ascbin_cursor_set_product(coda_cursor *cursor, coda_product *product); 38 | int coda_ascbin_cursor_goto_record_field_by_index(coda_cursor *cursor, long index); 39 | int coda_ascbin_cursor_goto_next_record_field(coda_cursor *cursor); 40 | int coda_ascbin_cursor_goto_available_union_field(coda_cursor *cursor); 41 | int coda_ascbin_cursor_goto_array_element(coda_cursor *cursor, int num_subs, const long subs[]); 42 | int coda_ascbin_cursor_goto_array_element_by_index(coda_cursor *cursor, long index); 43 | int coda_ascbin_cursor_goto_next_array_element(coda_cursor *cursor); 44 | int coda_ascbin_cursor_goto_attributes(coda_cursor *cursor); 45 | int coda_ascbin_cursor_use_base_type_of_special_type(coda_cursor *cursor); 46 | int coda_ascbin_cursor_get_bit_size(const coda_cursor *cursor, int64_t *bit_size); 47 | int coda_ascbin_cursor_get_num_elements(const coda_cursor *cursor, long *num_elements); 48 | int coda_ascbin_cursor_get_record_field_available_status(const coda_cursor *cursor, long index, int *available); 49 | int coda_ascbin_cursor_get_available_union_field_index(const coda_cursor *cursor, long *index); 50 | int coda_ascbin_cursor_get_array_dim(const coda_cursor *cursor, int *num_dims, long dim[]); 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /libcoda/coda-ascii-internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef CODA_ASCII_INTERNAL_H 33 | #define CODA_ASCII_INTERNAL_H 34 | 35 | #include "coda-ascii.h" 36 | 37 | typedef enum eol_type_enum 38 | { 39 | eol_unknown, 40 | eol_lf, 41 | eol_cr, 42 | eol_crlf 43 | } eol_type; 44 | 45 | struct coda_ascii_product_struct 46 | { 47 | /* general fields (shared between all supported product types) */ 48 | char *filename; 49 | int64_t file_size; 50 | coda_format format; 51 | coda_dynamic_type *root_type; 52 | const coda_product_definition *product_definition; 53 | long *product_variable_size; 54 | int64_t **product_variable; 55 | int64_t mem_size; 56 | const uint8_t *mem_ptr; 57 | 58 | /* fields shared with 'bin' product */ 59 | int use_mmap; /* indicates whether to use mem_ptr (or the file descriptor 'fd') */ 60 | int fd; /* file handle when not using mem_ptr */ 61 | #ifdef WIN32 62 | HANDLE file; 63 | HANDLE file_mapping; 64 | #endif 65 | 66 | /* 'ascii' product specific fields */ 67 | eol_type end_of_line; 68 | long num_asciilines; 69 | long *asciiline_end_offset; /* byte offset of the termination of the line (eol or eof) */ 70 | eol_type lastline_ending; 71 | coda_type *asciilines; 72 | }; 73 | typedef struct coda_ascii_product_struct coda_ascii_product; 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /libcoda/coda-bin-internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef CODA_BIN_INTERNAL_H 33 | #define CODA_BIN_INTERNAL_H 34 | 35 | #include "coda-bin.h" 36 | 37 | struct coda_bin_product_struct 38 | { 39 | /* general fields (shared between all supported product types) */ 40 | char *filename; 41 | int64_t file_size; 42 | coda_format format; 43 | coda_dynamic_type *root_type; 44 | const coda_product_definition *product_definition; 45 | long *product_variable_size; 46 | int64_t **product_variable; 47 | int64_t mem_size; 48 | const uint8_t *mem_ptr; 49 | 50 | /* 'bin' product specific fields */ 51 | int use_mmap; /* indicates whether to use mem_ptr (or the file descriptor 'fd') */ 52 | int fd; /* file handle when not using mem_ptr */ 53 | #ifdef WIN32 54 | HANDLE file; 55 | HANDLE file_mapping; 56 | #endif 57 | }; 58 | typedef struct coda_bin_product_struct coda_bin_product; 59 | 60 | int coda_bin_product_open(coda_bin_product *product); 61 | int coda_bin_product_close(coda_bin_product *product); 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /libcoda/coda-grib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef CODA_GRIB_H 33 | #define CODA_GRIB_H 34 | 35 | #include "coda-internal.h" 36 | 37 | void coda_grib_done(void); 38 | 39 | int coda_grib_reopen(coda_product **product); 40 | int coda_grib_close(coda_product *product); 41 | 42 | void coda_grib_type_delete(coda_dynamic_type *type); 43 | 44 | int coda_grib_cursor_set_product(coda_cursor *cursor, coda_product *product); 45 | int coda_grib_cursor_goto_array_element(coda_cursor *cursor, int num_subs, const long subs[]); 46 | int coda_grib_cursor_goto_array_element_by_index(coda_cursor *cursor, long index); 47 | int coda_grib_cursor_goto_next_array_element(coda_cursor *cursor); 48 | int coda_grib_cursor_goto_attributes(coda_cursor *cursor); 49 | int coda_grib_cursor_get_num_elements(const coda_cursor *cursor, long *num_elements); 50 | int coda_grib_cursor_get_array_dim(const coda_cursor *cursor, int *num_dims, long dim[]); 51 | int coda_grib_cursor_read_float(const coda_cursor *cursor, float *dst); 52 | int coda_grib_cursor_read_float_array(const coda_cursor *cursor, float *dst); 53 | int coda_grib_cursor_read_float_partial_array(const coda_cursor *cursor, long offset, long length, float *dst); 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /libcoda/coda-read-partial-array.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef CODA_READ_PARTIAL_ARRAY_H 33 | #define CODA_READ_PARTIAL_ARRAY_H 34 | 35 | #include "coda.h" 36 | 37 | #ifndef CODA_READ_FUNC_TYPE_DEF 38 | #define CODA_READ_FUNC_TYPE_DEF 39 | typedef int (*read_function)(const coda_cursor *, void *); 40 | #endif 41 | 42 | static int read_partial_array(const coda_cursor *cursor, read_function read_basic_type_function, long offset, 43 | long length, uint8_t *dst, int basic_type_size) 44 | { 45 | coda_cursor array_cursor; 46 | int i; 47 | 48 | array_cursor = *cursor; 49 | 50 | if (length > 0) 51 | { 52 | if (coda_cursor_goto_array_element_by_index(&array_cursor, offset) != 0) 53 | { 54 | return -1; 55 | } 56 | for (i = 0; i < length; i++) 57 | { 58 | if ((*read_basic_type_function)(&array_cursor, &dst[i * basic_type_size]) != 0) 59 | { 60 | return -1; 61 | } 62 | if (i < length - 1) 63 | { 64 | if (coda_cursor_goto_next_array_element(&array_cursor) != 0) 65 | { 66 | return -1; 67 | } 68 | } 69 | } 70 | } 71 | 72 | return 0; 73 | } 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /libcoda/coda-rinex.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef CODA_RINEX_H 33 | #define CODA_RINEX_H 34 | 35 | #include "coda-internal.h" 36 | 37 | int coda_rinex_init(void); 38 | void coda_rinex_done(void); 39 | 40 | int coda_rinex_reopen(coda_product **product); 41 | int coda_rinex_close(coda_product *product); 42 | int coda_rinex_cursor_set_product(coda_cursor *cursor, coda_product *product); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /libcoda/coda-sp3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef CODA_SP3_H 33 | #define CODA_SP3_H 34 | 35 | #include "coda-internal.h" 36 | 37 | void coda_sp3_done(void); 38 | 39 | int coda_sp3_reopen(coda_product **product); 40 | int coda_sp3_close(coda_product *product); 41 | int coda_sp3_cursor_set_product(coda_cursor *cursor, coda_product *product); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /libcoda/coda-swap2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef CODA_SWAP2_H 33 | #define CODA_SWAP2_H 34 | 35 | static void swap2(void *value) 36 | { 37 | unsigned char *v = (unsigned char *)value; 38 | 39 | /* use XOR swap algorithm to swap bytes 0/1 */ 40 | v[0] = v[0] ^ v[1]; 41 | v[1] = v[0] ^ v[1]; 42 | v[0] = v[0] ^ v[1]; 43 | } 44 | 45 | #define swap_int16 swap2 46 | #define swap_uint16 swap2 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /libcoda/coda-swap4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef CODA_SWAP4_H 33 | #define CODA_SWAP4_H 34 | 35 | static void swap4(void *value) 36 | { 37 | unsigned char *v = (unsigned char *)value; 38 | 39 | /* use XOR swap algorithm to swap bytes 0/3 and 1/2 */ 40 | v[0] = v[0] ^ v[3]; 41 | v[3] = v[0] ^ v[3]; 42 | v[0] = v[0] ^ v[3]; 43 | v[1] = v[1] ^ v[2]; 44 | v[2] = v[1] ^ v[2]; 45 | v[1] = v[1] ^ v[2]; 46 | } 47 | 48 | #define swap_int32 swap4 49 | #define swap_uint32 swap4 50 | #define swap_float swap4 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /libcoda/coda-swap8.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef CODA_SWAP8_H 33 | #define CODA_SWAP8_H 34 | 35 | static void swap8(void *value) 36 | { 37 | unsigned char *v = (unsigned char *)value; 38 | 39 | /* use XOR swap algorithm to swap bytes 0/7, 1/6, 2/5, and 3/4 */ 40 | v[0] = v[0] ^ v[7]; 41 | v[7] = v[0] ^ v[7]; 42 | v[0] = v[0] ^ v[7]; 43 | v[1] = v[1] ^ v[6]; 44 | v[6] = v[1] ^ v[6]; 45 | v[1] = v[1] ^ v[6]; 46 | v[2] = v[2] ^ v[5]; 47 | v[5] = v[2] ^ v[5]; 48 | v[2] = v[2] ^ v[5]; 49 | v[3] = v[3] ^ v[4]; 50 | v[4] = v[3] ^ v[4]; 51 | v[3] = v[3] ^ v[4]; 52 | } 53 | 54 | #define swap_int64 swap8 55 | #define swap_uint64 swap8 56 | #define swap_double swap8 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /libcoda/coda-tree.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #include "coda.h" 33 | 34 | typedef struct coda_tree_node_struct coda_tree_node; 35 | struct coda_tree_node_struct 36 | { 37 | const coda_type *type; 38 | int num_items; 39 | void **item; 40 | coda_tree_node *all_children; /* node that contains items that are applicable for all indices */ 41 | int num_indexed_children; 42 | long *index; /* can be '-1' for attributes */ 43 | coda_tree_node **indexed_child; 44 | }; 45 | 46 | coda_tree_node *coda_tree_node_new(const coda_type *type); 47 | void coda_tree_node_delete(coda_tree_node *node, void (*free_item)(void *)); 48 | int coda_tree_node_add_item_for_path(coda_tree_node *node, const char *path, void *item, int leaf_only); 49 | int coda_tree_node_get_item_for_cursor(coda_tree_node *node, coda_cursor *cursor, void **item); 50 | -------------------------------------------------------------------------------- /libcoda/coda-xml.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef CODA_XML_H 33 | #define CODA_XML_H 34 | 35 | #include "coda-internal.h" 36 | 37 | void coda_xml_type_delete(coda_dynamic_type *type); 38 | int coda_xml_type_update(coda_dynamic_type **type, coda_type *definition); 39 | 40 | int coda_xml_reopen(coda_product **product); 41 | int coda_xml_reopen_with_definition(coda_product **product, const coda_product_definition *definition); 42 | int coda_xml_close(coda_product *product); 43 | int coda_xml_cursor_set_product(coda_cursor *cursor, coda_product *product); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /libcoda/doc/Doxyfile.in: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = coda 2 | PROJECT_NUMBER = @VERSION@ 3 | OUTPUT_DIRECTORY = @top_builddir@/doc 4 | FULL_PATH_NAMES = NO 5 | EXTRACT_STATIC = YES 6 | HIDE_UNDOC_CLASSES = YES 7 | HIDE_UNDOC_MEMBERS = YES 8 | INTERNAL_DOCS = NO 9 | VERBATIM_HEADERS = NO 10 | HIDE_SCOPE_NAMES = YES 11 | SHOW_INCLUDE_FILES = NO 12 | SHOW_USED_FILES = NO 13 | SHOW_FILES = NO 14 | INLINE_INFO = YES 15 | OPTIMIZE_OUTPUT_FOR_C = YES 16 | DISTRIBUTE_GROUP_DOC = YES 17 | QUIET = YES 18 | WARN_IF_UNDOCUMENTED = NO 19 | INPUT = @srcdir@/extrapages.txt @top_srcdir@/libcoda @top_builddir@/coda.h 20 | STRIP_FROM_PATH = @srcdir@ @top_srcdir@/libcoda @top_builddir@ 21 | REFERENCED_BY_RELATION = NO 22 | HTML_OUTPUT = html/libcoda 23 | HTML_FOOTER = @srcdir@/footer.html 24 | HTML_HEADER = @srcdir@/header.html 25 | CASE_SENSE_NAMES = NO 26 | SEARCHENGINE = NO 27 | ENUM_VALUES_PER_LINE = 1 28 | DISABLE_INDEX = YES 29 | GENERATE_LATEX = NO 30 | MACRO_EXPANSION = YES 31 | EXPAND_ONLY_PREDEF = YES 32 | PREDEFINED = LIBCODA_API= HAVE_HDF4= HAVE_HDF5= 33 | -------------------------------------------------------------------------------- /libcoda/doc/extrapages.txt: -------------------------------------------------------------------------------- 1 | /** \mainpage CODA C interface 2 | * 3 | * \section intro Introduction 4 | * 5 | * This is the documentation that describes the Application Programmers Interface (API) for the CODA C Library. 6 | * It contains a full description for each of the functions in the API and a general description for each of the modules 7 | * mentioned below. 8 | * 9 | * \section codadef CODA definition path 10 | * 11 | * Note that in order to access products whose formats are defined using .codadef files, you should let CODA know 12 | * where these .codadef files are stored. You can do this by using the coda_set_definition_path() or 13 | * coda_set_definition_path_conditional() functions, or you can set the CODA_DEFINITION environment variable. 14 | * This environment variable should be a ':' separated (';' on Windows) list of absolute paths to directories containing 15 | * .codadef files or absolute paths to .codadef files themselves (or a mix of those). 16 | * 17 | * \section intro_modules Modules 18 | * Each module has a separate section that contains its general description together with descriptions for all types, 19 | * variables, functions, etc. that are part of this module. 20 | * - \link coda_general CODA General\endlink 21 | * - \link coda_product CODA Product\endlink 22 | * - \link coda_types CODA Types\endlink 23 | * - \link coda_cursor CODA Cursor\endlink 24 | * - \link coda_expression CODA Expression\endlink 25 | * - \link coda_time CODA Time\endlink 26 | * - \link coda_error CODA Error\endlink 27 | * 28 | * \section performance Performance considerations 29 | * The following are some things to try that may help to improve the performance of reading data with CODA 30 | * - Disable boundary checks with coda_set_option_perform_boundary_checks(). 31 | * This can be a huge speed improvement, but only disable this once you have fully tested your program 32 | * and are sure that all coda cursor navigation and reading function calls return successfully 33 | * (i.e. return value equals 0). 34 | * - Disable special types with coda_set_option_bypass_special_types() and use the base type of the data. 35 | * This can particularly increase performance for variable scale factor integers (::coda_special_vsf_integer). 36 | * Note that this option can be enabled/disabled at will, so you might disable it when reading one field, 37 | * but leave it enabled for reading others. 38 | * - Disable conversions with coda_set_option_perform_conversions() and use the data in its native format. 39 | * - For a single CODA cursor, read data as much as possible in sequence and use 40 | * coda_cursor_goto_next_record_field() and coda_cursor_goto_next_array_element() 41 | * when iterating over records and arrays. 42 | */ 43 | -------------------------------------------------------------------------------- /libcoda/doc/footer.html: -------------------------------------------------------------------------------- 1 | 5 |
6 | 7 | 8 | -------------------------------------------------------------------------------- /libcoda/doc/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | $title 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | Main Page   12 | Modules   13 |
14 |
15 | -------------------------------------------------------------------------------- /libcoda/expat/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper 2 | Copyright (c) 2001-2022 Expat maintainers 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included 13 | in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /libcoda/expat/README: -------------------------------------------------------------------------------- 1 | 2 | These files are taken from Expat, Release 2.6.4. 3 | 4 | The source files have been slightly modified in order to fit them into this 5 | build system. The changes that were made are: 6 | 7 | - Source files now only include config.h (instead of a choice of 8 | expat_config.h, winconfig.h, etc.). 9 | 10 | - expat_external.h includes coda_expat_mangle.h to name mangle all 11 | public symbols. 12 | 13 | - Add '#undef' for uint8_t/uint32_t/uint64_t in siphash.h to prevent 14 | compilation problems on Windows. 15 | 16 | - internal.h includes windows.h 17 | -------------------------------------------------------------------------------- /libcoda/hashtable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef HASHTABLE_H 33 | #define HASHTABLE_H 34 | 35 | /* *INDENT-OFF* */ 36 | #ifdef __cplusplus 37 | extern "C" 38 | { 39 | #endif 40 | /* *INDENT-ON* */ 41 | 42 | /* This hashtable is a special hash table in which 'name' is the key and 'index' is the value. 43 | * The index is the 0-based index that represents the order in which the names were added to the hash table. 44 | * In other words, the first name that gets added to the hashtable will have index value 0, the second name will 45 | * have index value 1, etc. 46 | * Mind that the hashtable does not create a copy of the 'name' string, so you should keep a reference of this 47 | * string active until after you have called delete_hashtable(). 48 | */ 49 | 50 | #define hashtable_add_name coda_hashtable_add_name 51 | #define hashtable_delete coda_hashtable_delete 52 | #define hashtable_get_index_from_name coda_hashtable_get_index_from_name 53 | #define hashtable_get_index_from_name_n coda_hashtable_get_index_from_name_n 54 | #define hashtable_insert_name coda_hashtable_insert_name 55 | #define hashtable_new coda_hashtable_new 56 | 57 | typedef struct hashtable_struct hashtable; 58 | 59 | hashtable *hashtable_new(int case_sensitive); 60 | int hashtable_add_name(hashtable *table, const char *name); 61 | int hashtable_insert_name(hashtable *table, long index, const char *name); 62 | long hashtable_get_index_from_name(hashtable *table, const char *name); 63 | long hashtable_get_index_from_name_n(hashtable *table, const char *name, int name_length); 64 | void hashtable_delete(hashtable *table); 65 | 66 | /* *INDENT-OFF* */ 67 | #ifdef __cplusplus 68 | } 69 | #endif 70 | 71 | #endif 72 | /* *INDENT-ON* */ 73 | -------------------------------------------------------------------------------- /libcoda/ipow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef IPOW_H 33 | #define IPOW_H 34 | 35 | /* Gives a ^ b where b is a small integer */ 36 | static double ipow(double a, int b) 37 | { 38 | double val = 1.0; 39 | 40 | if (b < 0) 41 | { 42 | while (b++) 43 | { 44 | val *= a; 45 | } 46 | val = 1.0 / val; 47 | } 48 | else 49 | { 50 | while (b--) 51 | { 52 | val *= a; 53 | } 54 | } 55 | return val; 56 | } 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /libcoda/pcre2/README: -------------------------------------------------------------------------------- 1 | 2 | These files are taken from PCRE2, Version 10.44. 3 | 4 | The source files have been slightly modified in order to fit them into this 5 | build system. The changes that were made are: 6 | 7 | - pcre2.h includes coda_pcre2_mangle.h to name mangle public symbols. 8 | 9 | - pcre2_internal.h and pcre2_config.c include coda_pcre2_config.h with CODA 10 | specific settings for PCRE2 (which would otherwise have been located in 11 | config.h). 12 | -------------------------------------------------------------------------------- /libcoda/pcre2/coda_pcre2_config.h: -------------------------------------------------------------------------------- 1 | #ifndef CODA_PCRE2_CONFIG_H 2 | #define CODA_PCRE2_CONFIG_H 3 | 4 | #define PCRE2_EXPORT 5 | #define PCRE2_CODE_UNIT_WIDTH 8 6 | 7 | #define HEAP_LIMIT 20000000 8 | #define LINK_SIZE 2 9 | #define MATCH_LIMIT 10000000 10 | #define MATCH_LIMIT_DEPTH MATCH_LIMIT 11 | #define MAX_NAME_COUNT 10000 12 | #define MAX_NAME_SIZE 32 13 | #define MAX_VARLOOKBEHIND 255 14 | #define NEWLINE_DEFAULT 2 15 | #define PARENS_NEST_LIMIT 250 16 | #define PCRE2GREP_BUFSIZE 20480 17 | #define PCRE2GREP_MAX_BUFSIZE 1048576 18 | #define PCRE2_STATIC 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /libcoda/ziparchive.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef ZIPARCHIVE_H 33 | #define ZIPARCHIVE_H 34 | 35 | #define za_open coda_za_open 36 | #define za_get_filename coda_za_get_filename 37 | #define za_get_num_entries coda_za_get_num_entries 38 | #define za_get_entry_by_index coda_za_get_entry_by_index 39 | #define za_get_entry_by_name coda_za_get_entry_by_name 40 | #define za_get_entry_size coda_za_get_entry_size 41 | #define za_get_entry_name coda_za_get_entry_name 42 | #define za_read_entry coda_za_read_entry 43 | #define za_close coda_za_close 44 | 45 | typedef struct za_entry_struct za_entry; 46 | typedef struct za_file_struct za_file; 47 | 48 | za_file *za_open(const char *filename, void (*error_handler)(const char *, ...)); 49 | 50 | const char *za_get_filename(za_file *zf); 51 | long za_get_num_entries(za_file *zf); 52 | za_entry *za_get_entry_by_index(za_file *zf, long index); 53 | za_entry *za_get_entry_by_name(za_file *zf, const char *name); 54 | 55 | long za_get_entry_size(za_entry *entry); 56 | const char *za_get_entry_name(za_entry *entry); 57 | int za_read_entry(za_entry *entry, char *buffer); 58 | 59 | void za_close(za_file *zf); 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /libcoda/zlib/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright notice: 2 | 3 | (C) 1995-2022 Jean-loup Gailly and Mark Adler 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | Jean-loup Gailly Mark Adler 22 | jloup@gzip.org madler@alumni.caltech.edu 23 | -------------------------------------------------------------------------------- /libcoda/zlib/README: -------------------------------------------------------------------------------- 1 | 2 | These files are taken from libz, version 1.3.1 3 | 4 | Only the source files that are needed to perform an inflate have been 5 | included. 6 | 7 | The zconf.h file has been modified to include a coda_expat_mangle.h that 8 | performs a name mangling (i.e. prefix with 'coda_') of all exported 9 | symbols. 10 | -------------------------------------------------------------------------------- /libcoda/zlib/coda_zlib_mangle.h: -------------------------------------------------------------------------------- 1 | #ifndef CODA_ZLIB_MANGLE_H 2 | #define CODA_ZLIB_MANGLE_H 3 | 4 | /* 5 | * This header file mangles symbols exported from the zlib library. 6 | * This is needed on some platforms because of nameresolving conflicts when 7 | * CODA is used as a module in an application that has its own version of zlib. 8 | * (this problem was seen with the CODA IDL interface on Linux). 9 | * Even though name mangling is not needed for every platform or CODA 10 | * interface, we always perform the mangling for consitency reasons. 11 | */ 12 | 13 | #define adler32 coda_adler32 14 | #define adler32_combine64 coda_adler32_combine64 15 | #define adler32_z coda_adler32_z 16 | #define crc32 coda_crc32 17 | #define crc32_combine_gen coda_crc32_combine_gen 18 | #define crc32_combine_gen64 coda_crc32_combine_gen64 19 | #define crc32_combine_op coda_crc32_combine_op 20 | #define crc32_combine64 coda_crc32_combine64 21 | #define crc32_z coda_crc32_z 22 | #define get_crc_table coda_get_crc_table 23 | #define inflate coda_inflate 24 | #define inflate_copyright coda_inflate_copyright 25 | #define inflate_fast coda_inflate_fast 26 | #define inflate_table coda_inflate_table 27 | #define inflateCodesUsed coda_inflateCodesUsed 28 | #define inflateCopy coda_inflateCopy 29 | #define inflateEnd coda_inflateEnd 30 | #define inflateGetDictionary coda_inflateGetDictionary 31 | #define inflateGetHeader coda_inflateGetHeader 32 | #define inflateInit_ coda_inflateInit_ 33 | #define inflateInit2_ coda_inflateInit2_ 34 | #define inflateMark coda_inflateMark 35 | #define inflatePrime coda_inflatePrime 36 | #define inflateReset coda_inflateReset 37 | #define inflateReset2 coda_inflateReset2 38 | #define inflateResetKeep coda_inflateResetKeep 39 | #define inflateSetDictionary coda_inflateSetDictionary 40 | #define inflateSync coda_inflateSync 41 | #define inflateSyncPoint coda_inflateSyncPoint 42 | #define inflateUndermine coda_inflateUndermine 43 | #define inflateValidate coda_inflateValidate 44 | #define z_errmsg coda_z_errmsg 45 | #define zcalloc coda_zcalloc 46 | #define zcfree coda_zcfree 47 | #define zError coda_zError 48 | #define zlibCompileFlags coda_zlibCompileFlags 49 | #define zlibVersion coda_zlibVersion 50 | 51 | #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 52 | #else 53 | /* only perform our own defines if these functions are not already mapped to their 64-bit variants by zlib.h */ 54 | #define adler32_combine coda_adler32_combine 55 | #define crc32_combine coda_crc32_combine 56 | #endif 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /libcoda/zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start); 12 | -------------------------------------------------------------------------------- /libcoda/zlib/inftrees.h: -------------------------------------------------------------------------------- 1 | /* inftrees.h -- header to use inftrees.c 2 | * Copyright (C) 1995-2005, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | /* Structure for decoding tables. Each entry provides either the 12 | information needed to do the operation requested by the code that 13 | indexed that table entry, or it provides a pointer to another 14 | table that indexes more bits of the code. op indicates whether 15 | the entry is a pointer to another table, a literal, a length or 16 | distance, an end-of-block, or an invalid code. For a table 17 | pointer, the low four bits of op is the number of index bits of 18 | that table. For a length or distance, the low four bits of op 19 | is the number of extra bits to get after the code. bits is 20 | the number of bits in this code or part of the code to drop off 21 | of the bit buffer. val is the actual byte to output in the case 22 | of a literal, the base length or distance, or the offset from 23 | the current table to the next table. Each entry is four bytes. */ 24 | typedef struct { 25 | unsigned char op; /* operation, extra bits, table bits */ 26 | unsigned char bits; /* bits in this part of the code */ 27 | unsigned short val; /* offset in table or code value */ 28 | } code; 29 | 30 | /* op values as set by inflate_table(): 31 | 00000000 - literal 32 | 0000tttt - table link, tttt != 0 is the number of table index bits 33 | 0001eeee - length or distance, eeee is the number of extra bits 34 | 01100000 - end of block 35 | 01000000 - invalid code 36 | */ 37 | 38 | /* Maximum size of the dynamic table. The maximum number of code structures is 39 | 1444, which is the sum of 852 for literal/length codes and 592 for distance 40 | codes. These values were found by exhaustive searches using the program 41 | examples/enough.c found in the zlib distribution. The arguments to that 42 | program are the number of symbols, the initial root table size, and the 43 | maximum bit length of a code. "enough 286 9 15" for literal/length codes 44 | returns 852, and "enough 30 6 15" for distance codes returns 592. The 45 | initial root table size (9 or 6) is found in the fifth argument of the 46 | inflate_table() calls in inflate.c and infback.c. If the root table size is 47 | changed, then these maximum sizes would be need to be recalculated and 48 | updated. */ 49 | #define ENOUGH_LENS 852 50 | #define ENOUGH_DISTS 592 51 | #define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) 52 | 53 | /* Type of code to build for inflate_table() */ 54 | typedef enum { 55 | CODES, 56 | LENS, 57 | DISTS 58 | } codetype; 59 | 60 | int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, 61 | unsigned codes, code FAR * FAR *table, 62 | unsigned FAR *bits, unsigned short FAR *work); 63 | -------------------------------------------------------------------------------- /m4/boxed_text.m4: -------------------------------------------------------------------------------- 1 | # BOXED_TEXT(TEXT) 2 | # ---------------- 3 | # Output a piece of text between an upper and lower *-line 4 | AC_DEFUN([BOXED_TEXT], 5 | [ 6 | ******************************************************************************** 7 | 8 | $1 9 | 10 | ********************************************************************************])# BOXED_TEXT 11 | -------------------------------------------------------------------------------- /m4/ccopt.m4: -------------------------------------------------------------------------------- 1 | # ST_PROG_CC_OPT(OPTION, VARIABLE) 2 | # -------------------------------- 3 | # Check whether the C compiler supports a certain option 4 | AC_DEFUN([ST_PROG_CC_OPT], 5 | [AC_REQUIRE([AC_PROG_CC])[]dnl 6 | AC_CACHE_CHECK([whether $CC accepts $1], [$2], 7 | [echo 'void f(){}' > conftest.c 8 | if test -z "`$CC $1 conftest.c 2>&1`"; then 9 | $2="$1" 10 | else 11 | $2="" 12 | fi 13 | rm -f conftest*]) 14 | AC_SUBST([$2]) 15 | ])# ST_CHECK_CC_OPT 16 | -------------------------------------------------------------------------------- /m4/hdf4.m4: -------------------------------------------------------------------------------- 1 | # ST_CHECK_HDF4 2 | # ------------- 3 | # Check for the availability of the HDF4 libraries and include files 4 | AC_DEFUN([ST_CHECK_HDF4], 5 | [AC_ARG_VAR([HDF4_LIB],[The HDF4 library directory. If not specified no extra LDFLAGS are set]) 6 | AC_ARG_VAR([HDF4_INCLUDE],[The HDF4 include directory. If not specified no extra CPPFLAGS are set]) 7 | AC_REQUIRE([ST_CHECK_LIBZ]) 8 | AC_REQUIRE([ST_CHECK_LIBJPEG]) 9 | AC_REQUIRE([ST_CHECK_LIBSZ]) 10 | old_CPPFLAGS=$CPPFLAGS 11 | old_LDFLAGS=$LDFLAGS 12 | if test "$HDF4_LIB" != "" ; then 13 | LDFLAGS="-L$HDF4_LIB $LDFLAGS" 14 | fi 15 | if test "$HDF4_INCLUDE" != "" ; then 16 | CPPFLAGS="-I$HDF4_INCLUDE $CPPFLAGS" 17 | fi 18 | AC_CHECK_HEADERS(hdf.h) 19 | AC_CHECK_HEADERS(netcdf.h) 20 | AC_CHECK_HEADERS(mfhdf.h) 21 | HDF4DFLIB=-ldf 22 | AC_CHECK_LIB(df, Hopen, ac_cv_lib_df=yes, ac_cv_lib_df=no, [ $ZLIB $JPEGLIB $SZLIB]) 23 | if test $ac_cv_lib_df = no ; then 24 | AC_CHECK_LIB(hdf, Hopen, ac_cv_lib_hdf=yes, ac_cv_lib_hdf=no, [ $ZLIB $JPEGLIB $SZLIB]) 25 | if test $ac_cv_lib_hdf = yes ; then 26 | HDF4DFLIB=-lhdf 27 | fi 28 | fi 29 | AC_CHECK_LIB(mfhdf, SDstart, ac_cv_lib_mfhdf=yes, ac_cv_lib_mfhdf=no, [ $HDF4DFLIB $ZLIB $JPEGLIB $SZLIB]) 30 | if test $ac_cv_header_hdf_h = no || test $ac_cv_header_mfhdf_h = no || 31 | (test $ac_cv_lib_df = no && test $ac_cv_lib_hdf = no) || test $ac_cv_lib_mfhdf = no ; then 32 | st_cv_have_hdf4=no 33 | CPPFLAGS=$old_CPPFLAGS 34 | LDFLAGS=$old_LDFLAGS 35 | else 36 | st_cv_have_hdf4=yes 37 | HDF4LIBS="-lmfhdf $HDF4DFLIB $ZLIB $JPEGLIB $SZLIB" 38 | fi 39 | AC_MSG_CHECKING(for HDF4 installation) 40 | AC_MSG_RESULT($st_cv_have_hdf4) 41 | if test $st_cv_have_hdf4 = yes ; then 42 | AC_DEFINE(HAVE_HDF4, 1, [Define to 1 if HDF4 is available.]) 43 | fi 44 | ])# ST_CHECK_HDF4 45 | -------------------------------------------------------------------------------- /m4/hdf5.m4: -------------------------------------------------------------------------------- 1 | # ST_CHECK_HDF5 2 | # ------------- 3 | # Check for the availability of the HDF5 library and include files 4 | AC_DEFUN([ST_CHECK_HDF5], 5 | [AC_ARG_VAR(HDF5_LIB,[The HDF5 library directory. If not specified no extra LDFLAGS are set]) 6 | AC_ARG_VAR(HDF5_INCLUDE,[The HDF5 include directory. If not specified no extra CPPFLAGS are set]) 7 | AC_REQUIRE([ST_CHECK_LIBZ]) 8 | AC_REQUIRE([ST_CHECK_LIBSZ]) 9 | old_CPPFLAGS=$CPPFLAGS 10 | old_LDFLAGS=$LDFLAGS 11 | if test "$HDF5_LIB" != "" ; then 12 | LDFLAGS="-L$HDF5_LIB $LDFLAGS" 13 | fi 14 | if test "$HDF5_INCLUDE" != "" ; then 15 | CPPFLAGS="-I$HDF5_INCLUDE $CPPFLAGS" 16 | fi 17 | AC_CHECK_HEADERS(hdf5.h) 18 | AC_CHECK_LIB(hdf5, H5Fopen, ac_cv_lib_hdf5=yes, ac_cv_lib_hdf5=no, [ $ZLIB $SZLIB]) 19 | if test $ac_cv_header_hdf5_h = no || test $ac_cv_lib_hdf5 = no ; then 20 | st_cv_have_hdf5=no 21 | CPPFLAGS=$old_CPPFLAGS 22 | LDFLAGS=$old_LDFLAGS 23 | else 24 | st_cv_have_hdf5=yes 25 | HDF5LIBS="-lhdf5 $ZLIB $SZLIB" 26 | fi 27 | AC_MSG_CHECKING(for HDF5 installation) 28 | AC_MSG_RESULT($st_cv_have_hdf5) 29 | if test $st_cv_have_hdf5 = yes ; then 30 | AC_DEFINE(HAVE_HDF5, 1, [Define to 1 if HDF5 is available.]) 31 | fi 32 | ])# ST_CHECK_HDF5 33 | -------------------------------------------------------------------------------- /m4/idl.m4: -------------------------------------------------------------------------------- 1 | # ST_CHECK_IDL 2 | # ------------- 3 | # Check for the availability of IDL 4 | AC_DEFUN([ST_CHECK_IDL], 5 | [AC_ARG_VAR(IDL, [The IDL root directory. If not specified '/usr/local/harris/idl' is assumed]) 6 | if test "$IDL" = "" ; then 7 | IDL=/usr/local/harris/idl 8 | fi 9 | AC_PATH_PROG(idl, idl, no, [$IDL/bin]) 10 | old_CPPFLAGS=$CPPFLAGS 11 | CPPFLAGS="-I$IDL/external/include $CPPFLAGS" 12 | AC_CHECK_HEADERS(idl_export.h) 13 | AC_MSG_CHECKING(for IDL installation) 14 | if test $ac_cv_path_idl = no || test $ac_cv_header_idl_export_h = no ; then 15 | st_cv_have_idl=no 16 | CPPFLAGS=$old_CPPFLAGS 17 | else 18 | st_cv_have_idl=yes 19 | fi 20 | AC_MSG_RESULT($st_cv_have_idl) 21 | ])# ST_CHECK_IDL 22 | -------------------------------------------------------------------------------- /m4/java.m4: -------------------------------------------------------------------------------- 1 | # ST_CHECK_JAVA 2 | # ------------- 3 | # Check for the availability of Java 4 | AC_DEFUN([ST_CHECK_JAVA], 5 | [AC_ARG_VAR(JAVA,[The java executable]) 6 | AC_PATH_PROG([JAVA], [java]) 7 | AC_ARG_VAR(JAVAC,[The javac executable]) 8 | AC_PATH_PROG([JAVAC], [javac]) 9 | AC_ARG_VAR(JAR,[The jar executable]) 10 | AC_PATH_PROG([JAR], [jar]) 11 | AC_ARG_VAR(JAVA_HOME,[The Java Home directory]) 12 | if test "$JAVA_HOME" = "" ; then 13 | if test "$JAVA" != "" ; then 14 | AC_MSG_CHECKING([for JAVA_HOME]) 15 | [cat > conftest.java <<_ACEOF 16 | public class conftest { 17 | public static void main(String[] args) { 18 | if (args != null && args.length > 0) { 19 | System.out.println(System.getProperty(args[0])); 20 | } 21 | } 22 | } 23 | _ACEOF] 24 | if { (eval echo "$as_me:$LINENO: \"$JAVAC conftest.java\"") >&5 25 | (eval $JAVAC conftest.java >&5) 2>conftest.er1 26 | ac_status=$? 27 | grep -v '^ *+' conftest.er1 >conftest.err 28 | rm -f conftest.er1 29 | cat conftest.err >&5 30 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 31 | (exit $ac_status); } >/dev/null; then 32 | if { (eval echo "$as_me:$LINENO: \"$JAVA -classpath . conftest\"") >&5 33 | (eval $JAVA -classpath . conftest java.home >conftest.out) 2>conftest.er1 34 | ac_status=$? 35 | grep -v '^ *+' conftest.er1 >conftest.err 36 | rm -f conftest.er1 37 | cat conftest.err >&5 38 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 39 | (exit $ac_status); } >/dev/null; then 40 | JAVA_HOME=`cat conftest.out` 41 | AC_MSG_RESULT([$JAVA_HOME]) 42 | else 43 | AC_MSG_RESULT([failed]) 44 | fi 45 | else 46 | AC_MSG_RESULT([failed]) 47 | fi 48 | 49 | fi 50 | fi 51 | AC_MSG_CHECKING(for JAVA installation) 52 | if test "$JAVA" = "" || test "$JAVAC" = "" || test "$JAR" = "" || 53 | test "$JAVA_HOME" = "" ; then 54 | st_cv_have_java=no 55 | else 56 | st_cv_have_java=yes 57 | fi 58 | AC_MSG_RESULT($st_cv_have_java) 59 | ])# ST_CHECK_JAVA 60 | -------------------------------------------------------------------------------- /m4/libjpeg.m4: -------------------------------------------------------------------------------- 1 | # ST_CHECK_LIBJPEG 2 | # ---------------- 3 | # Check for the availability of the libjpeg library 4 | AC_DEFUN([ST_CHECK_LIBJPEG], 5 | [JPEGLIB= 6 | AC_CHECK_LIB(jpeg, jpeg_start_compress, ac_cv_lib_jpeg=yes, ac_cv_lib_jpeg=no) 7 | if test $ac_cv_lib_jpeg = yes ; then 8 | JPEGLIB="-ljpeg" 9 | fi 10 | ])# ST_CHECK_LIBJPEG 11 | -------------------------------------------------------------------------------- /m4/libsz.m4: -------------------------------------------------------------------------------- 1 | # ST_CHECK_LIBSZ 2 | # -------------- 3 | # Check for the availability of the libsz library 4 | AC_DEFUN([ST_CHECK_LIBSZ], 5 | [SZLIB= 6 | AC_CHECK_LIB(sz, SZ_Compress, ac_cv_lib_sz=yes, ac_cv_lib_sz=no) 7 | if test $ac_cv_lib_sz = yes ; then 8 | SZLIB="-lsz" 9 | fi 10 | ])# ST_CHECK_LIBSZ 11 | -------------------------------------------------------------------------------- /m4/libz.m4: -------------------------------------------------------------------------------- 1 | # ST_CHECK_LIBZ 2 | # ------------- 3 | # Check for the availability of the libz library 4 | AC_DEFUN([ST_CHECK_LIBZ], 5 | [ZLIB= 6 | AC_CHECK_LIB(z, compress, ac_cv_lib_z=yes, ac_cv_lib_z=no) 7 | if test $ac_cv_lib_z = yes ; then 8 | ZLIB="-lz" 9 | fi 10 | ])# ST_CHECK_LIBZ 11 | -------------------------------------------------------------------------------- /m4/mathlib.m4: -------------------------------------------------------------------------------- 1 | # ST_CHECK_LIB_M 2 | # -------------- 3 | # Check whether we need to explicitly link with the math library (-lm) 4 | AC_DEFUN([ST_CHECK_LIB_M], 5 | [AC_MSG_CHECKING([whether explicit linking with math library is needed]) 6 | AC_TRY_LINK([char sqrt();], [sqrt();], st_need_math_lib=no, st_need_math_lib=yes) 7 | AC_MSG_RESULT([$st_need_math_lib]) 8 | if test $st_need_math_lib = yes ; then 9 | AC_CHECK_LIB([m], [sqrt]) 10 | fi 11 | ])# ST_CHECK_LIB 12 | -------------------------------------------------------------------------------- /m4/matlab.m4: -------------------------------------------------------------------------------- 1 | # ST_CHECK_MATLAB 2 | # --------------- 3 | # Check for the availability of MATLAB 4 | AC_DEFUN([ST_CHECK_MATLAB], 5 | [AC_ARG_VAR(MATLAB,[The MATLAB root directory. If not specified '/usr/local/matlab' is assumed]) 6 | if test "$MATLAB" = "" ; then 7 | MATLAB=/usr/local/matlab 8 | fi 9 | AC_PATH_PROG(matlab, matlab, no, [$MATLAB/bin]) 10 | old_CPPFLAGS=$CPPFLAGS 11 | CPPFLAGS="-I$MATLAB/extern/include $CPPFLAGS" 12 | AC_CHECK_HEADERS(mex.h) 13 | ST_CHECK_MEX_EXTENSION 14 | AC_MSG_CHECKING(for MATLAB installation) 15 | if test $ac_cv_path_matlab = no || test $ac_cv_header_mex_h = no || test "$MEXEXT" = "" ; then 16 | st_cv_have_matlab=no 17 | CPPFLAGS=$old_CPPFLAGS 18 | else 19 | st_cv_have_matlab=yes 20 | fi 21 | AC_MSG_RESULT($st_cv_have_matlab) 22 | ])# ST_CHECK_MATLAB 23 | 24 | 25 | # ST_CHECK_MEX_EXTENSION 26 | # ---------------------- 27 | # Determine the extension that is used for MATLAB MEX modules 28 | AC_DEFUN([ST_CHECK_MEX_EXTENSION], 29 | [AC_MSG_CHECKING([for mex extension]) 30 | AC_CANONICAL_HOST 31 | case $host in 32 | x86_64-*-linux-*) 33 | MEXEXT=.mexa64 34 | ;; 35 | i*86-*-linux-*) 36 | MEXEXT=.mexglx 37 | ;; 38 | i386-apple-darwin*) 39 | MEXEXT=.mexmaci 40 | ;; 41 | x86_64-apple-darwin*) 42 | MEXEXT=.mexmaci64 43 | ;; 44 | *-pc-mingw32) 45 | MEXEXT=.mexw32 46 | ;; 47 | *-pc-mingw64) 48 | MEXEXT=.mexw64 49 | ;; 50 | *) 51 | MEXEXT= 52 | esac 53 | if test "$MEXEXT" != "" ; then 54 | AC_MSG_RESULT([$MEXEXT]) 55 | else 56 | AC_MSG_RESULT([not found]) 57 | fi 58 | AC_SUBST(MEXEXT) 59 | ])# ST_CHECK_MEX_EXTENSION 60 | -------------------------------------------------------------------------------- /m4/python.m4: -------------------------------------------------------------------------------- 1 | # ST_PATH_PYTHON_INCLUDE 2 | # ---------------------- 3 | # Check for the location of the Python.h include file 4 | AC_DEFUN([ST_PATH_PYTHON_INCLUDE], 5 | [AC_REQUIRE([AM_PATH_PYTHON]) 6 | AC_ARG_VAR(PYTHON_INCLUDE,[The Python include directory]) 7 | AC_MSG_CHECKING([for python include directory]) 8 | if test "$PYTHON_INCLUDE" = "" ; then 9 | PYTHON_INCLUDE=`($PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_inc())") 2>/dev/null` 10 | if test ! -r "$PYTHON_INCLUDE/Python.h" ; then 11 | PYTHON_INCLUDE= 12 | fi 13 | fi 14 | AC_MSG_RESULT($PYTHON_INCLUDE) 15 | if test "$PYTHON_INCLUDE" != "" ; then 16 | CPPFLAGS="-I$PYTHON_INCLUDE $CPPFLAGS" 17 | fi 18 | AC_SUBST([PYTHON_INCLUDE]) 19 | ])# ST_PATH_PYTHON_INCLUDE 20 | -------------------------------------------------------------------------------- /m4/tls.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([ST_THREAD_LOCAL_STORAGE], [ 2 | AC_MSG_CHECKING([for thread local storage (TLS) keyword]) 3 | AC_CACHE_VAL([ac_cv_tls], 4 | [for st_tls_keyword in thread_local _Thread_local __thread '__declspec(thread)' none; do 5 | AS_CASE([$st_tls_keyword], [none], [ac_cv_tls=none ; break], 6 | [AC_TRY_COMPILE([void f(void) { static ] $st_tls_keyword [ int bar; }], 7 | [], [ac_cv_tls=$st_tls_keyword ; break], ac_cv_tls=none)]) 8 | done]) 9 | AC_MSG_RESULT([$ac_cv_tls]) 10 | AS_IF([test "$ac_cv_tls" != "none"], 11 | [AC_DEFINE_UNQUOTED([THREAD_LOCAL],[$ac_cv_tls],[thread local storage (TLS) keyword])]) 12 | ]) 13 | -------------------------------------------------------------------------------- /malloc.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | 5 | #undef malloc 6 | 7 | #include 8 | 9 | void *malloc (); 10 | 11 | /* Allocate an N-byte block of memory from the heap. If N is zero, allocate a 1-byte block. */ 12 | 13 | void * rpl_malloc (size_t n) { if (n == 0) n = 1; return malloc (n); } 14 | -------------------------------------------------------------------------------- /matlab/coda_attributes.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_attributes(varargin) 2 | % CODA_ATTRIBUTES Return object attributes. 3 | % 4 | % C = CODA_ATTRIBUTES(CODA_FILE_ID, ) returns a struct 5 | % containing all attributes that are associated with the specified data 6 | % element. If no attributes are available an empty struct will be 7 | % returned. 8 | % 9 | % The coda_file_id parameter must be a valid CODA file handle that was 10 | % retrieved with coda_open. The format for the data specification 11 | % argument list is described in the help page for 12 | % coda_param. 13 | % 14 | % See also CODA_FETCH, CODA_OPEN, CODA_PARAM 15 | % 16 | 17 | % Call CODA_MATLAB.MEX to do the actual work. 18 | [varargout{1:max(1,nargout)}] = coda_matlab('ATTRIBUTES',varargin{:}); 19 | -------------------------------------------------------------------------------- /matlab/coda_class.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_class(varargin) 2 | % CODA_CLASS Return object class. 3 | % 4 | % C = CODA_CLASS(CODA_FILE_ID, ) returns the MATLAB 5 | % class of the specified data element. With coda_class you can check 6 | % what the class of a data element will be without the need to 7 | % retrieve it via coda_fetch. The returned class is identical to what 8 | % would be returned by class(coda_fetch(...)) if coda_class and 9 | % coda_fetch had identical parameters. 10 | % 11 | % The coda_file_id parameter must be a valid CODA file handle that was 12 | % retrieved with coda_open. The format for the data specification 13 | % argument list is described in the help page for 14 | % coda_param. 15 | % 16 | % See also CODA_FETCH, CODA_OPEN, CODA_PARAM 17 | % 18 | 19 | % Call CODA_MATLAB.MEX to do the actual work. 20 | [varargout{1:max(1,nargout)}] = coda_matlab('CLASS',varargin{:}); 21 | -------------------------------------------------------------------------------- /matlab/coda_clearall.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_clearall(varargin) 2 | % CODA_CLEARALL Close all open product files and remove data dictionary 3 | % from memory. 4 | % 5 | % CODA_CLEARALL will close all currently open product files (similar 6 | % to calling coda_close for all open product files). This can be 7 | % especially helpful to close files for which you have lost the file 8 | % handle (something that can occur if you were running an M file that 9 | % opened a product file, but terminated halfway and thus left the file 10 | % open). 11 | % 12 | % This function will also free all product format definitions from 13 | % memory. When coda_open is called, CODA will read the product format 14 | % definition for the opened file and keeps this cached in memory. 15 | % A call to coda_clearall will remove all cached definitions. 16 | % 17 | % See also CODA_OPEN, CODA_CLOSE 18 | % 19 | 20 | % Call CODA_MATLAB.MEX to do the actual work. 21 | coda_matlab('CLEARALL',varargin{:}); 22 | -------------------------------------------------------------------------------- /matlab/coda_close.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_close(varargin) 2 | % CODA_CLOSE Close an open product file. 3 | % 4 | % CODA_CLOSE(CODA_FILE_ID) closes the product file which is associated 5 | % with the coda_file_id file handle. 6 | % 7 | % The coda_file_id parameter must be a valid CODA file handle that was 8 | % retrieved with coda_open. 9 | % 10 | % See also CODA_OPEN, CODA_CLEARALL 11 | % 12 | 13 | % Call CODA_MATLAB.MEX to do the actual work. 14 | coda_matlab('CLOSE',varargin{:}); 15 | -------------------------------------------------------------------------------- /matlab/coda_description.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_description(varargin) 2 | % CODA_DESCRIPTION Retrieve field description. 3 | % 4 | % DESC = CODA_DESCRIPTION(CODA_FILE_ID, ) returns a 5 | % string containing the description in the product format definition of 6 | % the specified data element. If the last item of the data specifier 7 | % argument list equals a fieldname then you will get the description 8 | % from the product format definition for this field. 9 | % 10 | % The coda_file_id parameter must be a valid CODA file handle that was 11 | % retrieved with coda_open. The format for the data specification 12 | % argument list is described in the help page for 13 | % coda_param. 14 | % 15 | % See also CODA_FETCH, CODA_OPEN, CODA_PARAM 16 | % 17 | 18 | % Call CODA_MATLAB.MEX to do the actual work. 19 | [varargout{1:max(1,nargout)}] = coda_matlab('DESCRIPTION',varargin{:}); 20 | -------------------------------------------------------------------------------- /matlab/coda_eval.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_eval(varargin) 2 | % CODA_EVAL Evaluate a CODA expression. 3 | % 4 | % RESULT = CODA_EVAL(CODA_EXPRESSION, [CODA_FILE_ID, ]) 5 | % returns the evaluated CODA expression at the given product location. 6 | % The coda_expression parameter should be a string with a valid CODA 7 | % expression. The syntax for the CODA expression language can be found in the 8 | % CODA Expressions documentation. 9 | % 10 | % If the CODA expression can be evaluated statically, then coda_file_id and 11 | % are not required, otherwise these arguments are mandatory. 12 | % The coda_file_id parameter must be a valid CODA file handle that was 13 | % retrieved with coda_open. The format for the data specification 14 | % argument list is described in the help page for 15 | % coda_param. 16 | % 17 | % Note that evaluation of 'void' expressions is not supported. 18 | % 19 | % See also CODA_FETCH, CODA_OPEN, CODA_PARAM 20 | % 21 | 22 | % Call CODA_MATLAB.MEX to do the actual work. 23 | [varargout{1:max(1,nargout)}] = coda_matlab('EVAL',varargin{:}); 24 | -------------------------------------------------------------------------------- /matlab/coda_fetch.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_fetch(varargin) 2 | % CODA_FETCH Retrieve data from a product file. 3 | % 4 | % DATA = CODA_FETCH(CODA_FILE_ID, ) reads the 5 | % specified data element from the product file. Instead of just 6 | % reading individual values, like strings, integers, doubles, etc. it 7 | % is also possible to read complete arrays or records of data. For 8 | % instance if 'pf' is a valid file handle, then you can read the 9 | % complete product by simply omitting the data specification argument: 10 | % 11 | % mph = coda_fetch(pf) 12 | % 13 | % which gives you a MATLAB struct containing all the full product 14 | % content. 15 | % 16 | % The coda_file_id parameter must be a valid CODA file handle that was 17 | % retrieved with coda_open. The format for the data specification 18 | % argument list is described in the help page for 19 | % coda_param. 20 | % 21 | % See also CODA_OPEN, CODA_PARAM 22 | % 23 | 24 | % Call CODA_MATLAB.MEX to do the actual work. 25 | [varargout{1:max(1,nargout)}] = coda_matlab('FETCH',varargin{:}); 26 | -------------------------------------------------------------------------------- /matlab/coda_fieldavailable.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_fieldavailable(varargin) 2 | % CODA_FIELDAVAILABLE Find out whether a dynamically available record field 3 | % is available or not. 4 | % 5 | % IS_AVAILABLE = CODA_FIELDAVAILABLE(CODA_FILE_ID, ) 6 | % returns 1 if the record field is available and 0 if it is not. The last 7 | % item of the data specifier argument should point to a record field. 8 | % 9 | % The coda_file_id parameter must be a valid CODA file handle that was 10 | % retrieved with coda_open. The format for the data specification 11 | % argument list is described in the help page for 12 | % coda_param. 13 | % 14 | % See also CODA_FETCH, CODA_OPEN, CODA_PARAM 15 | % 16 | 17 | % Call CODA_MATLAB.MEX to do the actual work. 18 | [varargout{1:max(1,nargout)}] = coda_matlab('FIELDAVAILABLE',varargin{:}); 19 | -------------------------------------------------------------------------------- /matlab/coda_fieldcount.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_fieldcount(varargin) 2 | % CODA_FIELDCOUNT Retrieve the number of fields for a record in a 3 | % product file. 4 | % 5 | % N = CODA_FIELDCOUNT(CODA_FILE_ID, ) returns the 6 | % number of fields for the struct that would be returned if coda_fetch 7 | % would have been called with the same arguments. The last item of the 8 | % data specifier argument should point to a record. 9 | % 10 | % The coda_file_id parameter must be a valid CODA file handle that was 11 | % retrieved with coda_open. The format for the data specification 12 | % argument list is described in the help page for 13 | % coda_param. 14 | % 15 | % See also CODA_FETCH, CODA_OPEN, CODA_PARAM 16 | % 17 | 18 | % Call CODA_MATLAB.MEX to do the actual work. 19 | [varargout{1:max(1,nargout)}] = coda_matlab('FIELDCOUNT',varargin{:}); 20 | -------------------------------------------------------------------------------- /matlab/coda_fieldnames.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_fieldnames(varargin) 2 | % CODA_FIELDNAMES Retrieve a list of fieldnames for a record in a 3 | % product file. 4 | % 5 | % FIELDNAMES = CODA_FIELDNAMES(CODA_FILE_ID, ) returns 6 | % a cellarray of strings of fieldnames for the struct that would be 7 | % returned if coda_fetch would have been called with the same 8 | % arguments. The last item of the data specifier argument should point 9 | % to a record. 10 | % 11 | % The coda_file_id parameter must be a valid CODA file handle that was 12 | % retrieved with coda_open. The format for the data specification 13 | % argument list is described in the help page for 14 | % coda_param. 15 | % 16 | % See also CODA_FETCH, CODA_OPEN, CODA_PARAM 17 | % 18 | 19 | % Call CODA_MATLAB.MEX to do the actual work. 20 | [varargout{1:max(1,nargout)}] = coda_matlab('FIELDNAMES',varargin{:}); 21 | -------------------------------------------------------------------------------- /matlab/coda_getopt.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_getopt(varargin) 2 | % CODA_GETOPT Retrieve CODA MATLAB interface options. 3 | % 4 | % OPTIONS = CODA_GETOPT returns a record with all available CODA MATLAB 5 | % interface options and their current values. 6 | % 7 | % VALUE = CODA_GETOPT(OPTION_NAME) will return the value of the 8 | % specified option. 9 | % 10 | % See also CODA_SETOPT, CODA_OPTIONS 11 | % 12 | 13 | % Call CODA_MATLAB.MEX to do the actual work. 14 | [varargout{1:max(1,nargout)}] = coda_matlab('GETOPT',varargin{:}); 15 | -------------------------------------------------------------------------------- /matlab/coda_matlab.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | mexFunction 3 | -------------------------------------------------------------------------------- /matlab/coda_open.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_open(varargin) 2 | % CODA_OPEN Open a product file. 3 | % 4 | % CODA_FILE_ID = CODA_OPEN(FILEPATH) opens the product file pointed to 5 | % by filepath. Upon successful opening the function returns a file 6 | % handle that should be passed to other CODA MATLAB interface functions 7 | % that need to read data/information from this product file. 8 | % 9 | % The filepath parameter must be a string containing the full path (or 10 | % relative path with respect to the current working directory) of the 11 | % product file. 12 | % 13 | % See also CODA_CLOSE, CODA_OPEN_AS, CODA_CLEARALL 14 | % 15 | 16 | % Call CODA_MATLAB.MEX to do the actual work. 17 | [varargout{1:max(1,nargout)}] = coda_matlab('OPEN',varargin{:}); 18 | -------------------------------------------------------------------------------- /matlab/coda_open_as.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_open_as(varargin) 2 | % CODA_OPEN_AS Open a product file using a specific format definition. 3 | % 4 | % CODA_FILE_ID = CODA_OPEN_AS(FILEPATH, PRODUCT_CLASS, PRODUCT_TYPE, VERSION) 5 | % will try to open the specified file for reading similar to CODA_OPEN, but 6 | % instead of trying to automatically recognise the applicable product 7 | % class/type/version as CODA_OPEN does, this function will impose the format 8 | % definition that is associated with the given product_class, product_type, 9 | % and version parameters. 10 | % 11 | % Note that you normally won't need this function as CODA will be able to 12 | % recognize which format definition to use automatically. However, for the 13 | % rare occasions where CODA_OPEN is not sufficient, you can use this function 14 | % to force the use of a specific format definition. 15 | % 16 | % You can specify -1 for the version to request the latest available version 17 | % of the format definition. 18 | % 19 | % See also CODA_OPEN, CODA_CLOSE, CODA_CLEARALL 20 | % 21 | 22 | % Call CODA_MATLAB.MEX to do the actual work. 23 | [varargout{1:max(1,nargout)}] = coda_matlab('OPEN_AS',varargin{:}); 24 | -------------------------------------------------------------------------------- /matlab/coda_param.m: -------------------------------------------------------------------------------- 1 | % CODA_PARAM A description of the data specification argument list 2 | % 3 | % Several functions from the CODA MATLAB interface take a data 4 | % specification argument list to specify a certain data element in a 5 | % product file. This argument list is a comma separated list of names 6 | % and identifiers that allow you to walk to a certain point in a 7 | % product. The list can be left empty if you want to point to the 8 | % root of the product. There are two types of arguments you can use 9 | % in the list of arguments: 10 | % 11 | % - Array index: You need to provide an array index that has the 12 | % same number of elements as there are dimensions in the array 13 | % that you are referring to. So if the array is two dimensional you 14 | % have to pass indices for both dimensions like [4 5]. If the 15 | % array is one dimensional (like the datasets) you can just 16 | % provide a single index value (without the '[]') to get to the 17 | % k-th element. You can use coda_size to check the number of 18 | % dimensions of an array and the size of each dimension. 19 | % - Field name: To go to a certain field inside the record that you 20 | % are pointing to, you can provide the field name as a string 21 | % (which is case sensitive, so you should make sure that the name 22 | % is exactly the same as is returned by coda_fieldnames). 23 | % 24 | % Note that all indices inside the data specification argument list 25 | % go from 1..N (and not from 0..(N-1)). 26 | % 27 | % For the coda_fetch function there is an additional 28 | % feature. If you provide a -1 for one or more of the dimensions of an 29 | % array you will fetch all elements in the specified dimension(s). 30 | % For example, with coda_fetch(pf,'datasetname',-1,'dsr_time') you can 31 | % fetch all dsr_time values for all measurements into a single array. 32 | % 33 | % See also CODA_CLASS, CODA_EVAL, CODA_FETCH, CODA_FIELDNAMES, CODA_SIZE 34 | % 35 | -------------------------------------------------------------------------------- /matlab/coda_product_class.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_product_class(varargin) 2 | % CODA_PRODUCT_CLASS Retrieve product class of a product file. 3 | % 4 | % PRODUCT_CLASS = CODA_PRODUCT_CLASS(CODA_FILE_ID) returns a string 5 | % containing the product class of the product. 6 | % 7 | % The coda_file_id parameter must be a valid CODA file handle that was 8 | % retrieved with coda_open. 9 | % 10 | % See also CODA_OPEN 11 | % 12 | 13 | % Call CODA_MATLAB.MEX to do the actual work. 14 | [varargout{1:max(1,nargout)}] = coda_matlab('PRODUCT_CLASS',varargin{:}); 15 | -------------------------------------------------------------------------------- /matlab/coda_product_type.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_product_type(varargin) 2 | % CODA_PRODUCT_TYPE Retrieve product type of a product file. 3 | % 4 | % PRODUCT_TYPE = CODA_PRODUCT_TYPE(CODA_FILE_ID) returns a string 5 | % containing the product type of the product. 6 | % 7 | % The coda_file_id parameter must be a valid CODA file handle that was 8 | % retrieved with coda_open. 9 | % 10 | % See also CODA_OPEN 11 | % 12 | 13 | % Call CODA_MATLAB.MEX to do the actual work. 14 | [varargout{1:max(1,nargout)}] = coda_matlab('PRODUCT_TYPE',varargin{:}); 15 | -------------------------------------------------------------------------------- /matlab/coda_product_version.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_product_version(varargin) 2 | % CODA_PRODUCT_VERSION Retrieve product version for a product file. 3 | % 4 | % PRODUCT_VERSION = CODA_PRODUCT_VERSION(CODA_FILE_ID) returns an integer 5 | % denoting the product version, maintained by CODA to be able to 6 | % distinguish between different versions of product specifications. 7 | % 8 | % The coda_file_id parameter must be a valid CODA file handle that was 9 | % retrieved with coda_open. 10 | % 11 | % See also CODA_OPEN 12 | % 13 | 14 | % Call CODA_MATLAB.MEX to do the actual work. 15 | [varargout{1:max(1,nargout)}] = coda_matlab('PRODUCT_VERSION',varargin{:}); 16 | -------------------------------------------------------------------------------- /matlab/coda_setopt.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_setopt(varargin) 2 | % CODA_SETOPT Set CODA-MATLAB options. 3 | % 4 | % CODA_SETOPT(OPTION_NAME, VALUE) assigns VALUE to the option specified 5 | % by OPTION_NAME. 6 | % 7 | % See also CODA_GETOPT, CODA_OPTIONS 8 | % 9 | 10 | % Call CODA_MATLAB.MEX to do the actual work. 11 | coda_matlab('SETOPT',varargin{:}); 12 | -------------------------------------------------------------------------------- /matlab/coda_size.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_size(varargin) 2 | % CODA_SIZE Retrieve the dimensions for an array in a product file. 3 | % 4 | % DIMS = CODA_SIZE(CODA_FILE_ID, ) returns the 5 | % dimensions of the specified array. With coda_size you can check what 6 | % the dimensions of an array will be without the need to retrieve it 7 | % via coda_fetch. The returned dimension information is identical to 8 | % what would be returned by size(coda_fetch(...)) if coda_size and 9 | % coda_fetch had identical parameters. The last item of the data 10 | % specifier argument should point to an array. 11 | % 12 | % The coda_file_id parameter must be a valid CODA file handle that was 13 | % retrieved with coda_open. The format for the data specification 14 | % argument list is described in the help page for 15 | % coda_param. 16 | % 17 | % See also CODA_FETCH, CODA_OPEN, CODA_PARAM 18 | % 19 | 20 | % Call CODA_MATLAB.MEX to do the actual work. 21 | [varargout{1:max(1,nargout)}] = coda_matlab('SIZE',varargin{:}); 22 | -------------------------------------------------------------------------------- /matlab/coda_time_to_string.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_time_to_string(varargin) 2 | % CODA_TIME_TO_STRING Convert a number of seconds since 1-1-2000 to a 3 | % human-readable string format. 4 | % 5 | % STR = CODA_TIME_TO_STRING(N_SECONDS_SINCE_2000) turns the double 6 | % value containing the amount of seconds since 1-1-2000 into a string 7 | % containing the date and time in a human readable string of the form 8 | % '2000-01-01 00:00:00.000000'. 9 | % 10 | 11 | % Call CODA_MATLAB.MEX to do the actual work. 12 | [varargout{1:max(1,nargout)}] = coda_matlab('TIME_TO_STRING',varargin{:}); 13 | -------------------------------------------------------------------------------- /matlab/coda_unit.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_unit(varargin) 2 | % CODA_UNIT Retrieve unit information. 3 | % 4 | % UNIT = CODA_UNIT(CODA_FILE_ID, ) returns a string 5 | % containing the unit information which is stored in the data 6 | % dictionary for the specified data element. 7 | % 8 | % The coda_file_id parameter must be a valid CODA file handle that was 9 | % retrieved with coda_open. The format for the data specification 10 | % argument list is described in the help page for 11 | % coda_param. 12 | % 13 | % See also CODA_FETCH, CODA_OPEN, CODA_PARAM 14 | % 15 | 16 | % Call CODA_MATLAB.MEX to do the actual work. 17 | [varargout{1:max(1,nargout)}] = coda_matlab('UNIT',varargin{:}); 18 | -------------------------------------------------------------------------------- /matlab/coda_version.m: -------------------------------------------------------------------------------- 1 | function varargout = coda_version(varargin) 2 | % CODA_VERSION Get version number of CODA. 3 | % 4 | % VERSION = CODA_VERSION returns the version number of CODA. 5 | % 6 | 7 | % Call CODA_MATLAB.MEX to do the actual work. 8 | [varargout{1:max(1,nargout)}] = coda_matlab('VERSION',varargin{:}); 9 | -------------------------------------------------------------------------------- /realloc.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | 5 | #undef realloc 6 | 7 | #include 8 | 9 | void *realloc (); 10 | 11 | /* Reallocate an N-byte block of memory from the heap. If N is zero, allocate a 1-byte block. */ 12 | 13 | void * rpl_realloc (void *ptr, size_t n) { if (n == 0) n = 1; return realloc (ptr, n); } 14 | -------------------------------------------------------------------------------- /strcasecmp.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | 5 | #include 6 | #include 7 | 8 | int strcasecmp(const char *s1, const char *s2) 9 | { 10 | unsigned char us1; 11 | unsigned char us2; 12 | size_t index; 13 | 14 | us1 = tolower(*s1); 15 | us2 = tolower(*s2); 16 | 17 | index = 0; 18 | while (us1 != '\0' && us1 == us2) 19 | { 20 | index++; 21 | us1 = tolower(s1[index]); 22 | us2 = tolower(s2[index]); 23 | } 24 | 25 | return us1 - us2; 26 | } 27 | -------------------------------------------------------------------------------- /strdup.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | 5 | #include 6 | #include 7 | 8 | char *strdup(const char *str) 9 | { 10 | char *new_str; 11 | size_t length; 12 | 13 | if (str == NULL) 14 | { 15 | return NULL; 16 | } 17 | length = strlen(str); 18 | new_str = malloc(length + 1); 19 | if (new_str == NULL) 20 | { 21 | return NULL; 22 | } 23 | memcpy(new_str, str, length); 24 | new_str[length] = '\0'; 25 | 26 | return new_str; 27 | } 28 | -------------------------------------------------------------------------------- /strncasecmp.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | 5 | #include 6 | #include 7 | 8 | int strncasecmp(const char *s1, const char *s2, size_t len) 9 | { 10 | unsigned char us1; 11 | unsigned char us2; 12 | size_t index; 13 | 14 | if (len <= 0) 15 | { 16 | return 0; 17 | } 18 | 19 | us1 = tolower(*s1); 20 | us2 = tolower(*s2); 21 | 22 | index = 0; 23 | while (index < len && us1 != '\0' && us1 == us2) 24 | { 25 | index++; 26 | us1 = tolower(s1[index]); 27 | us2 = tolower(s2[index]); 28 | } 29 | 30 | if (index == len) 31 | { 32 | return 0; 33 | } 34 | 35 | return us1 - us2; 36 | } 37 | -------------------------------------------------------------------------------- /tools/codadump/codadump-filter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2024 S[&]T, The Netherlands. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * 3. Neither the name of the copyright holder nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #ifndef PDSDUMP_FILTER_H 33 | #define PDSDUMP_FILTER_H 34 | 35 | #ifdef HAVE_CONFIG_H 36 | #include "config.h" 37 | #endif 38 | 39 | #include "coda.h" 40 | 41 | typedef struct codadump_filter 42 | { 43 | char *fieldname; 44 | 45 | struct codadump_filter *subfilter; 46 | struct codadump_filter *next; 47 | } codadump_filter; 48 | 49 | codadump_filter *codadump_filter_create(const char *filter_expr); 50 | void codadump_filter_remove(codadump_filter **filter); 51 | const char *codadump_filter_get_fieldname(codadump_filter *filter); 52 | codadump_filter *codadump_filter_get_subfilter(codadump_filter *filter); 53 | codadump_filter *codadump_filter_get_next_filter(codadump_filter *filter); 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /vsnprintf.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | 5 | #include 6 | #include 7 | 8 | int vsnprintf(const *str, size_t size, const char *format, va_list ap) 9 | { 10 | /* For systems that don't support the safe vsnprintf we just use the 11 | * unsafe variant. 12 | * A clean alternative is unfortunately not easy to realize. 13 | */ 14 | return vsprintf(str, format, ap); 15 | } 16 | --------------------------------------------------------------------------------