Commit Graph

99 Commits

Author SHA1 Message Date
Ed Hartnett
8d583f94a0 removed last use of EXTRA_TESTS, also unneeded setting for tst_h_rdc0.c 2017-11-12 06:57:37 -07:00
Ed Hartnett
e9df3fad55 working on cmake build 2017-11-12 05:42:24 -07:00
Ed Hartnett
05d251bfb5 different attempt to deal with ncdump dependencies 2017-11-11 17:33:51 -07:00
Ed Hartnett
8df5c84f31 fixed makefile.am 2017-11-11 16:51:10 -07:00
Ed Hartnett
b17059e750 fixed makefile.am 2017-11-11 16:49:52 -07:00
Ed Hartnett
f709a7b107 another attempt at reducing ncdump dependencies 2017-11-11 16:45:03 -07: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
Ward Fisher
1ca5f8c993 Updated SO version, other little issue with ncdump Makefile.am. 2017-10-17 14:56:22 -06:00
Ward Fisher
e8cd6958a9 Merge branch 'v4.5.0-release-branch' into cal366.dmh 2017-10-09 14:08:21 -06:00
Ward Fisher
ef372357a0 Merge branch 'master' into cal366.dmh 2017-09-29 15:51:06 -06:00
Ward Fisher
37f89515b2 Updatec cleanfiles in makefile.am 2017-09-21 09:58:33 -06:00
Ward Fisher
11f235f86e Fixing more make distcheck errors. 2017-09-20 16:28:28 -06:00
Ward Fisher
10a9d6c4f8 Corrected another error. 2017-09-20 16:03:16 -06:00
Ward Fisher
05ddb3a953 Cleaning up 'make distcheck' 2017-09-20 15:59:24 -06:00
Ward Fisher
2151dbbd44 Giving test output netcdf files unique names. 2017-09-20 11:17:33 -06:00
Ward Fisher
e70fcc9865 Revert a previous change. 2017-09-15 16:29:11 -06:00
Ward Fisher
d048ccf583 Moved tst_inttags4.sh to only run if CDF5 is enabled. 2017-09-15 11:18:42 -06:00
Ward Fisher
eeeef6f2a6 Tweaking makefile.am 2017-09-05 13:05:01 -06:00
Ward Fisher
62511cc634 Removed a stray line in makefile.am 2017-09-01 13:03:49 -06:00
Ward Fisher
812a7b223d Wiring new test into autotools. 2017-09-01 11:57:28 -06:00
Dennis Heimbigner
0ccece70e8 Solve issue https://github.com/Unidata/netcdf-c/issues/359
from e-support OYW-455599.

Problem was that in nctime.c#CDMonthDay, it was setting up
the month -> #days table correctly, but it did not use it
because it forgot to check for Cd366, it only checked for Cd365.
2017-07-25 11:58:34 -06:00
Ward Fisher
02a6585eae Corrected some typos. 2017-05-24 15:49:18 -06:00
Ward Fisher
59ded4a82c Moving some tests around so that 'make check' works properly, in support of https://github.com/Unidata/netcdf-c/issues/339 2017-05-24 14:25:22 -06:00
Ward Fisher
8dddd222a3 Merged master, DAP4 support into branch. 2017-04-19 09:29:35 -06:00
Dennis Heimbigner
3db4f013bf Primary change: add dap4 support
Specific changes:
1. Add dap4 code: libdap4 and dap4_test.
   Note that until the d4ts server problem is solved, dap4 is turned off.
2. Modify various files to support dap4 flags:
	configure.ac, Makefile.am, CMakeLists.txt, etc.
3. Add nc_test/test_common.sh. This centralizes
   the handling of the locations of various
   things in the build tree: e.g. where is
   ncgen.exe located. See nc_test/test_common.sh
   for details.
4. Modify .sh files to use test_common.sh
5. Obsolete separate oc2 by moving it to be part of
   netcdf-c. This means replacing code with netcdf-c
   equivalents.
5. Add --with-testserver to configure.ac to allow
   override of the servers to be used for --enable-dap-remote-tests.
6. There were multiple versions of nctypealignment code. Try to
   centralize in libdispatch/doffset.c and include/ncoffsets.h
7. Add a unit test for the ncuri code because of its complexity.
8. Move the findserver code out of libdispatch and into
   a separate, self contained program in ncdap_test and dap4_test.
9. Move the dispatch header files (nc{3,4}dispatch.h) to
   .../include because they are now shared by modules.
10. Revamp the handling of TOPSRCDIR and TOPBUILDDIR for shell scripts.
11. Make use of MREMAP if available
12. Misc. minor changes e.g.
	- #include <config.h> -> #include "config.h"
	- Add some no-install headers to /include
	- extern -> EXTERNL and vice versa as needed
	- misc header cleanup
	- clean up checking for misc. unix vs microsoft functions
13. Change copyright decls in some files to point to LICENSE file.
14. Add notes to RELEASENOTES.md
2017-03-08 17:01:10 -07:00
Wei-keng Liao
06c1f744e8 silence gcc compile warnings when using -Wconversion 2016-10-30 00:44:28 -05:00
Wei-keng Liao
4b911c1435 add a rule to delete folder results 2016-10-06 00:44:50 -05:00
Dennis Heimbigner
0cf1e2c49f re: Github issue netcdf-c 300
Modified provenance code to allocate the minimal space
needed for _NCProperties attribute in file.  Basically
required using malloc in the provenance code and in ncdump.
Otherwise should cause no externally visible effects.
Also removed the ENABLE_FILEINFO from configure.ac since
the provenance code is no longer optional.
2016-08-08 09:24:19 -06:00
Dennis Heimbigner
11a259ad86 Add provenance info for netcdf-4 files.
This consists of a persistent attribute named
_NCProperties plus two computed attributes
_IsNetcdf4 and _SuperblockVersion.
See the 'Provenance Attributes' section
of docs/attribute_conventions.md for details.
2016-05-07 14:32:07 -06:00
Dennis Heimbigner
39e9cd0ffe Fix issues with Github pull request 187
(https://github.com/Unidata/netcdf-c/pull/187)
Primary problem was cmake build errors.
2016-01-08 12:55:11 -07:00
Dennis Heimbigner
d15f277252 The max dimension sizes do not take CDF-5 format into account.
NetCDF-c Github issue #185

The code in libsrc/dim.c has not been upgraded to support
CDF-5 format.

Rule we are implementing sets the max dimension sizes as follows:

Classic:	CDF-1	NC_MAX_INT - 3    = 2147483647 - 3
64 bit Offset:	CDF-2	NC_MAX_UINT - 3	  =  4294967295 - 3
64 bit Data:	CDF-5	NC_MAX_UINT64 - 3 = 18446744073709551615 - 3

The -3 is to handle rounding.
2016-01-05 21:26:25 -07:00
dmh
47e10591b4 ckp 2015-11-19 13:44:55 -07:00
Ward Fisher
c1210f4020 Merge branch 'master' into cdf5-sync-master 2015-11-09 13:45:11 -07:00
Ward Fisher
996ef87cd1 More refactoring to fix an issue where an nc4 test was being run when nc4 was disabled. 2015-11-06 13:20:10 -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
dmh
7480d7d97d - clean up the dfile.c confusion about NC_64_BIT_OFFSET
- sync oc2 with  master for https://DennisHeimbigner@github.com/Unidata/oc.git
- Cleanup auth.html documentation.
- Cleanup obsolete documentation.
2015-10-24 21:45:13 -06:00
Ward Fisher
c825d612c2 Tweaked some tests so that everything would pass when netcdf4 was disabled. 2015-10-22 14:09:19 -06:00
Dennis Heimbigner
cd7a06b193 pull request 2015-10-12 17:09:37 -06:00
dmh
49597a64af merge-squash 2015-10-09 10:12:11 -06:00
dmh
0a7ff043a2 re: Jira NCF-320
Partially resolve by making
string variables and attributes use
UTF-8 encoding.
Normalization is not necessarily fixed,
however.
2015-08-20 15:53:48 -06:00
Russ Rew
495fea71b9 Fix builddir vs srdir problem for ncdump/ctest.c and ctest64.c 2015-08-18 16:10:18 -06:00
dmh
859f105005 merge-squash 2015-08-15 16:26:35 -06:00
dmh
3dd807a155 The original mem branch somehow got
hosed, so I rebuilt it as a new mem2 branch.
2015-05-28 15:10:10 -06:00
Ward Fisher
ae4d54bcc6 Added stray .nc file to CLEANFILES 2015-02-12 13:34:39 -07:00
Quincey Koziol
4f8898719a NCF-324: Make similar change to get_vara code, and add in test to Makefile.am 2015-02-02 08:51:00 -06:00
Russ Rew
f16790b718 Add test CDL file and tst_nccopy4.sh test for fix of NCF-321 2015-01-03 17:18:14 -07:00
dmh
7e582ad3f2 re: Jira NCF-309
The code for handling character constants
in datalists in ncgen has some problems.
1. It failed on large constants
2. It did not handle e.g. var = 'a', 'b', ...
   in the same way that ncgen3 did.
3. The code for generate.c and genchar.c needed
   some refactoring to make it a little simpler
   (but not simple).
2014-09-18 18:26:06 -06:00
Ward Fisher
3af9240acb More cleaning up for release. 2014-08-25 16:39:45 -06:00
Ward Fisher
df8caaf1d5 Corrected an error with a missing reference file. 2014-08-25 14:32:05 -06:00
Ward Fisher
8d5d592a18 Added tst_bom.sh to EXTRA_DIST, fixing a failure in 'make dist'. 2014-03-13 10:33:03 -06:00