Commit Graph

398 Commits

Author SHA1 Message Date
Ward Fisher
3ccce81190 Accomodating special characters in path name. 2018-02-28 12:18:20 -07:00
Ward Fisher
faf1470887 Commented out the code, rather than just adding a comment block. 2018-02-27 15:20:58 -07:00
Ward Fisher
6ce110e362 Updated libsrc/attr.m4 in support of https://github.com/Unidata/netcdf-c/issues/843 2018-02-27 15:15:43 -07:00
Ward Fisher
f9f27c5ab7
Merge branch 'master' into newhash0.dmh 2018-02-21 14:19:43 -07:00
Ben Boeckel
b432a527c4 c: remove __CHAR_UNSIGNED__
In C, `char`, `signed char`, and `unsigned char` are three separate,
distinct types, so just because `char` happens to be signed does not
mean it is interchangeable with `signed char`.
2018-02-14 17:24:49 -05:00
Dennis Heimbigner
727b613459 This is the initial step in moving to the new higher performance
(I hope) metadata mechanism. This mostly just adds new pieces of
code (e.g. nclistmap) and does some minor fixes.

It should be transparent to everything else.
The next set of changes will be the big step.
2018-02-08 19:53:40 -07:00
Ward Fisher
9e926410ee Added the fix suggested by @mathstuf in support of https://github.com/unidata/netcdf-c/issues/845 2018-02-07 11:23:54 -07:00
Ward Fisher
0d420fcfbb
Merge branch 'master' into cdf5_var_len 2018-02-02 10:31:46 -07:00
Ward Fisher
27693ba4a3
Merge branch 'master' into nc3-per-var-fill-v2 2018-02-01 11:45:40 -07:00
Ward Fisher
8487a0a954
Merge branch 'master' into cdf5_var_len 2018-01-25 16:30:58 -07:00
Ed Hartnett
2197d9849b merged 466 2018-01-20 06:04:08 -07:00
Wei-keng Liao
0f4a85b9f2 a clean commit for #383 2017-12-20 20:53:30 -06:00
Ed Hartnett
46d3bca8f4 removed non-working BUILD_DLL target 2017-11-30 05:40:17 -07:00
Ed Hartnett
bcfce160fb fixed warning 2017-11-30 04:56:46 -07:00
Ed Hartnett
3c5404ccf7
Merge branch 'master' into ejh_ncfunc_testing 2017-11-28 00:04:38 +00:00
Nehal J Wani
1b91bd89d4
Fix build on pre-C99 compilers
- Make sure that the variables are declared at the top of the block.
 - Add fix to enable inline for various compilers
2017-11-26 01:47:54 +05:30
Ed Hartnett
845355e91b added hdf4 test for inq_format calls 2017-11-22 08:21:24 -07:00
Ed Hartnett
d4495e8e86 more testing 2017-11-22 07:46:03 -07:00
Ed Hartnett
70c739858b fixed SEGFAULT for NULL parameter for nc_inq_format(), added testing, improved documentation 2017-11-22 06:53:23 -07:00
Ward Fisher
e97911a592 Updated v1hpg.c to make header padding with null byte checks optional. 2017-11-20 16:08:06 -07:00
Ward Fisher
5e5dfc6f7b
Merge branch 'master' into O3_bug 2017-11-16 09:16:23 -07:00
Wei-keng Liao
9b511b4e0f fix codes might break strict-aliasing rules 2017-11-16 00:01:01 -06:00
Ed Hartnett
3b82328902
Merge branch 'master' into ejh_more_warnings 2017-11-15 03:41:12 -07:00
Ward Fisher
16d6f94f30 Merge branch 'master' into filters.dmh 2017-11-13 11:15:02 -07:00
Ed Hartnett
cfa773d29d used cast to int instead of %ul printf format, because some compilers are a little out of step 2017-11-09 10:44:46 -07:00
Ed Hartnett
0e0482bc05 fixed warnings 2017-11-09 06:24:18 -07:00
Ward Fisher
f98635be1b Merge remote-tracking branch 'origin/h5offset.dmh' into dmh_multi_merge 2017-11-03 12:40:52 -06:00
Ward Fisher
91865a3cbc Merge branch 'NC_MAX_VAR_DIMS' of https://github.com/wkliao/netcdf-c into multi-merge 2017-11-02 11:20:54 -06:00
Ward Fisher
d7f0919c12
Merge branch 'master' into NC_MAX_VAR_DIMS 2017-10-31 14:06:41 -06:00
Ward Fisher
2987fb0bed
Merge branch 'master' into master 2017-10-31 14:01:08 -06:00
Ward Fisher
178ed4aa98 Merge branch 'typedef_schar' of https://github.com/wkliao/netcdf-c into ejh_more_merges 2017-10-26 14:35:57 -06:00
Ward Fisher
bacdef88fe Merge branch 'master' into NC_MAX_VAR_DIMS 2017-10-26 14:31:22 -06:00
Ed Hartnett
ca9a5d4133 fixed warning 2017-10-25 06:30:47 -06:00
Dennis Heimbigner
9983b9d911 re e-support UBS-599337
re pull request https://github.com/Unidata/netcdf-c/pull/405
re pull request https://github.com/Unidata/netcdf-c/pull/446

Notes:
1. This branch is a cleanup of the magic.dmh branch.
2. magic.dmh was originally merged, but caused problems with parallel IO.
   It was re-issued as pull request https://github.com/Unidata/netcdf-c/pull/446.
3. This branch + pull request replace any previous pull requests and magic.dmh branch.

Given an otherwise valid netCDF file that has a corrupted header,
the netcdf library currently crashes. Instead, it should return
NC_ENOTNC.

Additionally, the NC_check_file_type code does not do the
forward search required by hdf5 files. It currently only looks
at file position 0 instead of 512, 1024, 2048,... Also, it turns
out that the HDF4 magic number is assumed to always be at the
beginning of the file (unlike HDF5).
The change is localized to libdispatch/dfile.c See
https://support.hdfgroup.org/release4/doc/DSpec_html/DS.pdf

Also, it turns out that the code in NC_check_file_type is duplicated
(mostly) in the function libsrc4/nc4file.c#nc_check_for_hdf.

This branch does the following.
1. Make NC_check_file_type return NC_ENOTNC instead of crashing.
2. Remove nc_check_for_hdf and centralize all file format checking
   NC_check_file_type.
3. Add proper forward search for HDF5 files (but not HDF4 files)
   to look for the magic number at offsets of 0, 512, 1024...
4. Add test tst_hdf5_offset.sh. This tests that hdf5 files with
   an offset are properly recognized. It does so by prefixing
   a legal file with some number of zero bytes: 512, 1024, etc.
5. Off-topic: Added -N flag to ncdump to force a specific output dataset name.
2017-10-24 16:25:09 -06:00
Dennis Heimbigner
733da154c5 1. Keep up to date by merging master
2. Factored out the parameter string parsing for ncgen and nccopy
   int libdispatch/dfilter.c + include/ncfilter.h
3. Allow a parameter string to use constant types other than
   unsigned int. See docs/filters.md for details.
4. Moved the old content of  include/netcdf_filter.h into include/netcdf.h
   and removed include/netcdf_filter.h as no longer needed.
5. Force the test filter (bzip2) in nc_test4/filter_test to
   be built using BUILT_SOURCES.
2017-10-08 15:56:45 -06:00
Greg Sjaardema
9964cee7cd Merge branch 'master' into master 2017-09-26 11:06:04 -06:00
Wei-keng Liao
2cc30c16be check against NC_MAX_VAR_DIMS (but using NC_EMAXDIMS, maybe a new error code NC_EMAXVARDIMS is needed) 2017-09-21 12:37:33 -05:00
Ward Fisher
d2cdc4cb5a Working on getting cdf5 tests running. 2017-09-15 18:00:28 -06:00
Wei-keng Liao
294c734f64 add NC_check_voffs() to check whether the file starting offsets (begin) of all variables follows the same increasing order as they were defined. 2017-09-15 14:48:53 -05:00
Wei-keng Liao
b07d9701a9 move detection of NC_EVARSIZE from nc_enddef to nc_def_var 2017-09-13 11:57:19 -05:00
Wei-keng Liao
a414fc9af8 For record variables: throw NC_EVARSIZE when detecting a variable larger then X_INT64_MAX - 3 for CDF-5 files 2017-09-13 11:39:38 -05:00
Wei-keng Liao
8b3d32ca1e throw NC_EVARSIZE when detecting a variable larger then X_INT64_MAX - 3 for CDF-5 files 2017-09-13 00:41:04 -05:00
Wei-keng Liao
49226bb76b remove checking against UINT32_MAX 2017-09-11 19:13:13 -05:00
Wei-keng Liao
752f31a3d3 add handling for writing vsize to header for large variable sizes, following the CDF format specification 2017-09-07 16:56:42 -05:00
Wei-keng Liao
8c5956946a fix the setting of the member len of NC_var object, related to issue 463 2017-09-06 19:49:59 -05:00
Dennis Heimbigner
d8d4ed627a master merge 2017-08-29 18:05:46 -06:00
Dennis Heimbigner
ed44fd7306 Add szip support via libaec 2017-08-27 13:35:20 -06:00
Wei-keng Liao
8b6d131cbe Because ncx.c and putget.c are to be released with the package in case users do not have m4, the generation of the two C files cannot depend on the configure option of --enable-erange-fill. This commit fixes this problem by replacing m4 conditional define with C conditional preprocess. 2017-08-20 14:32:57 -05:00
Wei-keng Liao
64af659fae fix vpath build for regenerating c files from m4 files 2017-08-20 13:53:25 -05:00
Wei-keng Liao
2a68d58433 avoid calling NC3_inq_var_fill when ERANGE_FILL is enabled 2017-08-20 02:04:29 -05:00