Commit Graph

97 Commits

Author SHA1 Message Date
dmh
582410a407 [NCF-273]/HZY-708311
Add a new function called nc_inq_format_extended that
returns more detailed format information (vis-a-vis
nc_inq_format) about an open dataset.

Note that the netcdf API will present the file as if it had
the format specified by nc_inq_format.  The true file
format, however, may not even be a netcdf file; it might be
DAP, HDF4, or PNETCDF, for example. This function returns
that true file type.  It also returns the effective mode for
the file.

signature: nc_inq_format_extended(int ncid, int* formatp, int* modep)
where
* ncid is the NetCDF ID from a previous call to nc_open() or
  nc_create().
* formatp is a pointer to a location for returned true format.
* modep is a pointer to a location for returned mode flags.

Refer to the actual list in the file netcdf.h to see the
currently defined set.

Also added test cases (tst_formatx*).
2013-12-22 12:53:20 -07:00
Quincey Koziol
b3044de434 Refactored read_scale(), memio_new(), var_create_dataset() and makespecial()
to clean up resources properly on failure.

Refactored doubly-linked list code for objects in the libsrc4 directory,
    cleaning up the add/del routines, breaking out the common next/prev
    pointers into a struct and extracting the add/del operations on them,
    changed the list of dims to add new dims in the same order as the other
    types, made all add routines able to optionally return a pointer to the
    newly created object.

Removed some dead code (pg_var(), nc4_pg_var1(), nc4_pg_varm(), misc. small
    routines, etc)

Fixed fill value handling for string types in nc4_get_vara().

Changed many malloc()+strcpy() pairs into calls to strdup().

Cleaned up misc. other minor Coverity issues.
2013-12-08 03:29:26 -06:00
Ward Fisher
001d950548 Removed a debug statement. 2013-11-04 13:34:20 -07:00
Ward Fisher
bda59030cb Replaced call to fstat with call to filelength, on apropriate system. 2013-11-01 16:30:33 -06:00
Ward Fisher
78d19f69fd Updating for Windows Large File Support. 2013-10-16 16:44:11 -06:00
dmh
10b0ac536f [NCF-267]/SAI-630695
Add support for embedded NUL characters
in character arrays and added some test cases.

Note that embedded NULs in netcdf-4
string constants are still illegal. This is
because strings are not counted in the netcdf
API, so they are implicitly NUL terminated.
2013-09-23 17:11:59 -06:00
Ward Fisher
55eed7ffa1 Removed stray (but harmless) debugging info. Updated windows-binaries documentation to allow both latest stable release as well as latest release candidate. 2013-08-29 15:48:03 -06:00
Ward Fisher
a595c62d7f Updated RELEASE_NOTES with reference to LFS Jira ticket. Temporarily removed an LFS test on Windows. 2013-08-28 16:30:41 -06:00
Ward Fisher
e117af0ab7 Made H5_USE_16_API an option in CMakeLists.txt, added string to describe what it does. 2013-08-28 12:43:45 -06:00
Ward Fisher
8ae3105e32 Corrected invocation of a large file test in the CMake system, when large file tests are enabled. 2013-08-28 09:38:43 -06:00
Ward Fisher
b6e4715104 Added fixes to CMake-based system, when building pnetcdf. 2013-08-26 13:50:27 -06:00
Ward Fisher
33d3d06971 Added initial 'make dist', 'make distcheck' support to
CMake-based builds.
2013-06-03 16:42:04 +00:00
Russ Rew
946a7ab8b5 Fix contributed by Nath Gopalaswamy to large file problem reading
netCDF classic or 64-bit offset files that have a UINT32_MAX flag for
large last record size of a variable that has values larger than 1
byte.  This problem had previously been fixed for *writing* such data,
but was only tested with an ncbyte variable.  Fixed test to
demonstrate problem and the fix.

More updates to chunking documentation, cosmetic fixes for some
"--option=" documentation that doxygen turns into mdash.
2013-05-31 20:18:18 +00:00
Dennis Heimbigner
c583f91992 merge with trunk and fix conflicts 2013-05-10 17:04:28 +00:00
Dennis Heimbigner
f17e7324c1 Rebuilt the compose operation in dceconstraints.c. The
revisions are simpler, and I hope, clearer than the all
previous versions.  Part of the code taken from the
ucar.nc2.Range.compose function.  Modified to handle edge
cases not handled in the Range.compose function.
2013-04-19 19:55:43 +00:00
Dennis Heimbigner
4e41843740 1) fix some minor bugs when pnetcdf is enabled 2)Comment out some apparently unused procedures 2013-03-25 17:12:50 +00:00
Dennis Heimbigner
dea3c726c8 merge trunk into this branch 2013-03-15 20:31:07 +00:00
Ward Fisher
ddf3c31bb0 Corrected a handful of syntax issues in CMake config files,
probably introduced more.  

Added CMake-related files to Makefile.am files for inclusion
when creating a distribution package.
2013-02-20 23:28:28 +00:00
Ward Fisher
49b144143d CMake fixes for enabling MMAP tests. 2013-02-14 20:24:02 +00:00
Ward Fisher
51848614c3 Corrected parallel support in CMake, including
library checks and parallel IO tests.  Updated 
CMake-related documentation.
2013-02-12 22:22:54 +00:00
Russ Rew
3ef3b35a94 Refactor to share functions between ncdump and nccopy. Merge nccopy
enhancements, based on contributed code from Martin van Driel, to
support -v, -g, -V, and -G options for selecting groups and variables
in output.  Fix all clang warnings from nccopy and ncdump sources, as
well as a few other cleanup changes to testing code.
2013-01-23 17:45:29 +00:00
Ward Fisher
91188cea7a Merging CMake branch into trunk. Changes include:
CMake related changes in CMakeLists.txt files,
cmake_config.h.in. Other changes relate to 
Windows-specific issues, and changes made
when regenerating generated source files.
2013-01-15 22:43:09 +00:00
Ward Fisher
cf0d0b54f2 Merged latest changes from cmake branch. Fixed a test file, and changed a deallocation call to avoid throwing an error on Windows related to cross-dll memory-management. 2012-12-07 23:21:27 +00:00
Ward Fisher
81280c7878 Merge from latest netcdf-cmake branch.
- Fixes for Windows.
- CMake-based changes (functionality, tests).
- Smattering of coverity-informed bug-fixes.
2012-12-05 18:35:42 +00:00
Ward Fisher
d0a665f83f Including .c files generated from .m4 to accomodate
Windows users (who generally will lack m4).  This policy
can be re-evaluated if need be.
2012-10-02 16:45:27 +00:00
Ward Fisher
c271c81ac4 2012-09-14 21:35:25 +00:00
Ward Fisher
235fc6bb13 Merged latest trunk into branch 2012-08-22 19:52:24 +00:00
Ward Fisher
5ebda8c08f Correcting an arithmetic error present in nc_test under gcc on Windows. 2012-08-22 19:19:04 +00:00
Russ Rew
24a1cd0718 Fix test of H5Tget_size() return so it can actually detect an error.
Remove some dead code.  Fix declaration of X_INT_MIN in tests.h.
2012-08-22 14:57:30 +00:00
Ward Fisher
e8453be1e5 Merged from trunk into branch 2012-08-20 18:30:04 +00:00
Russ Rew
8d53da4826 Fixed bug "adding a bad _FillValue" bug (NCF-190). Fixed minor bugs
reported by static analysis, including memory leak in ncdump, missing
size_t cast for chunk cache.  Fixed various doc problems, including
byte vs. char issues, missing NC_UBYTE in type list, needed link to
"Building with Windows" page.
2012-08-16 18:31:48 +00:00
Ward Fisher
c8febf92ed Modified related to m4 file conversion macro. 2012-08-13 16:10:36 +00:00
Ward Fisher
14619ec4c4 2012-08-09 18:40:41 +00:00
Ward Fisher
0607b62375 Added coverage test flags to CMakeLists.txt files. 2012-08-09 17:07:41 +00:00
Ward Fisher
5e16f2c80c 2012-08-09 16:39:13 +00:00
Ward Fisher
0a964ad8b1 Updated CMake files, added a few changes to fix linux-based compile warnings. 2012-08-07 21:34:55 +00:00
Ward Fisher
02828e917a Integrated more tests, added additional CMake functionality 2012-08-06 23:07:40 +00:00
Ward Fisher
e2293a4368 Begin integrating CTest and CDash functionality. 2012-08-06 20:53:34 +00:00
Ward Fisher
59960fcc20 Minor fixes (dead code) to correct errors found by Coverity 2012-07-30 21:49:16 +00:00
Dennis Heimbigner
a6b932826b add NC_MMAP flag and tests 2012-06-23 19:25:49 +00:00
Russ Rew
79cde861ac Delete obsolete libdiskless directory, replaced by new diskless
implementation.  Deleted obsolete win32, soon to be replaced by Ward's
Windows 32- and 64-bit fixes for building with MSYS/MinGW.  Made
cosmetic cleanup to output of "make check" to make it easier for users
to interpret.  Fixed bug NCF-175: ncdump -t incorrectly interpreting
units attribute (such as "days") without a base time (such as "since
2007-01-01") as a time unit.

Changed name to 4.2.1-beta.
2012-06-12 21:50:02 +00:00
Russ Rew
d6d38094c2 Cleaned up tst_atts3.c test program. Fixed several bugs in detection
of NC_ERANGE errors, especially with unsigned types, resolving most
NCF-172 issues and confusion between long and long long types in
llibsrc/ncx.m4.  Eliminated some unnecessary tests, e.g. tests
for negative values for unsigned types.
2012-05-31 01:28:42 +00:00
Russ Rew
1f4eeafcb9 Fixed doxygen installation guide source file to preserve line breaks
in code and scripts.

Fixed bug NCF-171: error reading external int into longlong or writing
from longlong array to external int on 32-bit platforms and classic
format files.

Promoted test demonstrating NCF-171 bug from longlong array from
"extra test" to "test".
2012-05-29 15:50:15 +00:00
Russ Rew
dbaf62f5e6 Updated some links in Doxygen version of user guide. Fixed some
range_error checks in netCDF-4 type conversion code.  Made netCDF
attribute tests with type conversion more comprehensive and stringent,
fixing bugs identified with better tests.  Changed a test in
nc_test/tst_atts.c to use netCDF-3 file instead of netCDF-4 file,
because that directory is supposed to be for tests that work with
--disable-netcdf-4.  Added test demonstrating NCF-171 bug on 32-bit
platforms, only run when configured with --enable-extra-tests.
2012-05-24 16:29:22 +00:00
Dennis Heimbigner
5b2aee44a7 windows support fixes plus add --disable-diskless 2012-05-15 17:48:27 +00:00
Dennis Heimbigner
14c3dae49e more win32 fixes 2012-05-15 03:47:52 +00:00
Dennis Heimbigner
4f68d6c5f8 win32/mingw fixes 2012-05-15 03:13:08 +00:00
Russ Rew
c6f399c731 Fix non-portable test that depends on nonstandardized floating-point format using e+08, not e+008. Fixes for some problems reported in scan-build static analysis. 2012-04-23 23:59:24 +00:00
Dennis Heimbigner
00e50f5a44 1. changed from using port 8080 to 8081 for motherlode
2. Fixed Ward's IGNORE problem with oc
3. Mmap support now works.
4. Fix an uninitialized variable pointed out by Russ in dnclog.c
2012-04-22 20:34:21 +00:00
Russ Rew
85743d97f0 Fix ncopy so it actually uses -r option instead of ignoring it. Remove a large number of dead assignments found by clang in nc_test/tt_atts.c. 2012-04-13 02:52:30 +00:00