Commit Graph

8 Commits

Author SHA1 Message Date
Ward Fisher
157af11bc2 Refactoring tests to separate out error macros from tests, in support of fixing http://github.com/Unidata/netcdf-c/issues/321 2016-10-21 17:17:39 +00:00
Greg Sjaardema
e13d976e27 Replace NC_MAX_DIMS with correct NC_MAX_VAR_DIMS
The constant NC_MAX_DIMS is used to dimension the `dimids` arrays which are use to retrieve the dimension ids corresponding to the variables dimensions.  By definition, the maximum number of dimension ids is `NC_MAX_VAR_DIMS` as is documented in the `nc_inq_var` documentation:
http://www.unidata.ucar.edu/software/netcdf/netcdf-4/newdocs/netcdf-c/nc_005finq_005fvar.html

dimids   Returned vector of *ndimsp dimension IDs corresponding to the variable dimensions. The caller must allocate enough space for a vector of at least *ndimsp integers to be returned. The maximum possible number of dimensions for a variable is given by the predefined constant NC_MAX_VAR_DIMS. 

Although the default or standard values of NC_MAX_DIMS and NC_MAX_VAR_DIMS are the same, the correct value to be used here is NC_MAX_VAR_DIMS and not NC_MAX_DIMS.  Even though this currently works, it could fail if either NC_MAX_VAR_DIMS or NC_MAX_DIMS is changed and it can also provide an incorrect function usage example that may mislead developers trying to determine the correct usage of the function.
2016-01-22 20:54:52 -07:00
Ward Fisher
612b35a84c Merge branch 'master' into cdf-5, in preparation for merging the CDF-5 functionality into the master branch. This will be the key new feature for netcdf 4.4.0. 2015-11-05 13:40:35 -07:00
tbeu
e2820e4d8a Fix common typos
Detected by https://github.com/vlajos/misspell_fixer
2015-08-20 11:42:05 +02:00
dmh
859f105005 merge-squash 2015-08-15 16:26:35 -06:00
Dennis Heimbigner
99eef24bc2 - Fix NCF-158 to modify ncgen flag defaults.
- Fix NCF-157 to modify DAP code to support
  partial variable retrieval.
- Fix of NCF-154 to solve problem of ncgen
  improperly processing data lists for variables
  of size greater than 2**18 bytes.
- Fix ncgen processing of char variables that have
  multiple unlimited dimensions.
- Partly fix Jira issue: NCF-145 (vlen issues).
- Benchmark program nc_test4/tst_ar4_*) requires arguments
  and should only be invoked inside a shell
  script; fixed so that they terminate cleanly
  if invoked with no arguments.
- Fix the Doxygen processing so it will work
  with make distcheck.
- Begin switchover to using an alternative to ncio.
- Begin support for in-memory (diskless) files.
2012-03-14 23:26:48 +00:00
Ed Hartnett
7a2774c8d1 took out repeated definitions of timeval_subtract function 2011-08-15 11:37:45 +00:00
Ed Hartnett
18f4bca367 moving to trunk subdir 2010-06-03 13:24:43 +00:00