Commit Graph

551 Commits

Author SHA1 Message Date
Ward Fisher
fde8720fd3 Infile given absolute path. 2017-09-05 13:13:08 -06:00
Ward Fisher
eeeef6f2a6 Tweaking makefile.am 2017-09-05 13:05:01 -06:00
Dennis Heimbigner
a2e0f069ec This pr should probably be delayed until after Version 4.5.
Primary change is to cleanup code and remove duplicated code.

1. Unify the rc file reading into libdispatch/drc.c. Eventually extend
   if we need rc file for netcdf itself as opposed to the dap code.
2. Unify the extraction from the rc file of DAP authorization info.
3. Misc. other small unifications: make temp file, read file.
4. Avoid use of libcurl when reading file:// because
   there is some kind of problem with the Visual Studio version.
   Might be related to the winpath problem.
   In any case, do direct read instead.
5. Add new error code NC_ERCFILE for errors in reading RC file.
6. Complete documentation cleanup as indicated in this comment
   https://github.com/Unidata/netcdf-c/pull/472#issuecomment-325926426
7. Convert some occurrences of #ifdef _WIN32 to #ifdef _MSC_VER
2017-09-02 18:09:36 -06:00
Ward Fisher
1f7ea554a8 Added execute flag 2017-09-01 16:47:26 -06:00
Ward Fisher
62511cc634 Removed a stray line in makefile.am 2017-09-01 13:03:49 -06:00
Ward Fisher
0119b7f83b Merge branch 'v4.5.0-release-branch' into gh425 2017-09-01 12:02:35 -06:00
Ward Fisher
b6ebc0e77e Wired in new test to CMake-based build. 2017-09-01 11:58:37 -06:00
Ward Fisher
812a7b223d Wiring new test into autotools. 2017-09-01 11:57:28 -06:00
Ward Fisher
a5d9c2dbcd Adding a test to check for regressions when subsetting a netCDF3 file. 2017-09-01 11:47:42 -06:00
Ward Fisher
a95a7c18bb Corrected an issue with netcdf3 files that would prevent the -v and -V flags from working properly when using nccopy. See https://github.com/Unidata/netcdf-c/issues/425 and https://github.com/Unidata/netcdf-c/issues/463 for more information. 2017-08-31 16:16:21 -06:00
Dennis Heimbigner
8e2abdeed8 Initial version 2017-08-31 14:19:56 -06:00
Dennis Heimbigner
e9888829f0 Suppress debug output 2017-08-29 15:10:55 -06:00
Dennis Heimbigner
86fc8745dc merge master and resolve conflicts 2017-08-12 15:50:31 -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
Dennis Heimbigner
9e2d6faaf6 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-24 18:59:16 -06:00
Ward Fisher
7144cfb3e0 More debugging info. 2017-05-30 16:09:43 -06:00
Ward Fisher
fb457f2001 Moved error code to common shell. 2017-05-30 15:11:39 -06:00
Ward Fisher
310f1f8e33 Added flag to tst_dimsizes.sh to dump on error. 2017-05-30 14:29:21 -06:00
Ward Fisher
02a6585eae Corrected some typos. 2017-05-24 15:49:18 -06:00
Ward Fisher
7902b56a45 Added missing scripts. 2017-05-24 14:37:54 -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
Dennis Heimbigner
d37ac215e2 Add new capabilities to filter code:
1. Allow nccopy to apply filters, especially on the output file.
   This provides a third way to do this other than using ncgen or
   programatically
2. Make sure that even if the filter code is not available, it is
   possible to see the filter id and parameters for variables using
   e.g ncdump -hs.
3. Fix bug in nccopy so that the input file does
   not necessarily have to be netcdf-4.
4. At last minute decided to change to using a
   single "_Filter" attribute for ncgen
5. Added a test to tst_filter.sh to generate C code using ncgen.
2017-05-14 18:10:02 -06:00
Dennis Heimbigner
c834d4af12 merge from master 2017-05-10 12:33:03 -06:00
Dennis Heimbigner
7c3164577e Finalize the compression support.
This relies on the HDF5 capability to
dynamically load compression filters.
Note that a compression filter is just
a subcase of filters.

The primary user-visible changes are as follows:
1. Add a standard header "netcdf_filter.h" that defines
   the necessary API extensions
2. Modify ncgen to support two new special attributes
   "_Filter_ID" and "_Filter_Parameters" so that compression
   can be turned on when creating a file using ncgen.
4. Add a detailed description of filtering support
   to the user's guide; see the file filters.md
5. Add a test case directory for this: nc_test4/filter_test.
   It is fragile and a ./configure flags (-enable-filter-test)
   is defined (default disabled) to shut this off this test
   to avoid spurious 'make check' failures.

Note that the HDF5 documentation is not up-to-date, so
much of what is encoded here comes from examining the
actual code in the file H5PL.c in the HDF5 source code.
2017-04-27 13:01:59 -06:00
Ward Fisher
8dddd222a3 Merged master, DAP4 support into branch. 2017-04-19 09:29:35 -06:00
Dennis Heimbigner
32fe709615 ckp 2017-04-14 11:05:30 -06:00
Ward Fisher
8c48ac9828 Had to modify test_common.in so that it doesn't append the build type on Visual Studio. Otherwise it looks in the wrong location. Change the location of the utilities so that they are where test_common.sh expects to find them results in the breakage of most of the other shell scripts. 2017-04-06 14:55:11 -06:00
Dennis Heimbigner
6d8809100f Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh)
1. When running under windows (as opposed to cygwin)
   we need to make sure to not user /cygdrive/ file paths.
   This was ocurring in libdap4/d4read.c, but may occur
   elsewhere.
2. Shell scripts in the git repo are not being checked-out
   with the executable mode set. Had core.filemode set to false.
   Was a major hassle to fix.
2017-04-03 21:39:44 -06:00
Dennis Heimbigner
7d9a1107c9 Master merge to remove conflicts 2017-03-29 14:40:08 -06:00
Ward Fisher
156e6a8e39 Merged master into ghpull-375 2017-03-27 15:31:34 -06:00
Dennis Heimbigner
38bf48d2ca re: gihub issue https://github.com/Unidata/netcdf-c/issues/380
Re: esupport ticket support-netcdf : SKS-534087
Ncgen treats an integer with just a U/u suffix as uint64 instead of uint32.
Fix is in ncgen.l
2017-03-24 18:56:14 -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
Ward Fisher
3e5124996e Merged https://github.com/Unidata/netcdf-c/pull/319 to resolve some recently arisen conflicts, in preparation for larger merge. 2017-02-01 13:27:29 -07:00
Ward Fisher
fce06d5474 Merge branch 'master' into alias.dmh 2017-01-24 12:36:46 -07:00
Dennis Heimbigner
a53d0b092f re: e-support (XKJ-645277) and github issue #351.
A set of typecasts in the function
print_enum_type in ncdump/ncdump.c cause some
compilers to complain about type punning:
warning: dereferencing type-punned pointer will
break strict-aliasing rules

Fix is to cast to void* before casting to final
value.  There may be other occurrences in some
of the older netcdf-c code.
2017-01-23 21:23:30 -07:00
Dennis Heimbigner
a5ffa8abca We are now into the trial and error phase
trying to get travis to compile tst_fileinfo.
2017-01-19 09:59:17 -07:00
Dennis Heimbigner
7be9506aac Modified ncdap_test to allow a different method
to get TOPSRCDIR that avoids use of
TEST_ENVIRONMENT and makes automake and cmake
more consistent.

Basic assumption is that abs_top_srcdir (and
cmake equivalent) is known at 'make check' time,
so we can use -D flag to compile a program that
has the value of abs_top_srcdir embedded into it
as a constant.

We define two new files in ncdap_test:
1. t_srcdir.h -- provide a gettopsrcdir() function
   to return the topsrcdir value to the test program.
2. topsrcdir.c -- a program that calls gettopsrcdir()
   and prints its output (minus any newline) on stdout.
   This is used in .sh files to get topsrcdir.
2017-01-18 21:46:47 -07:00
Wei-keng Liao
ab73a57fca Merge branch 'master' into issue258 2016-11-25 10:49:03 -06:00
Ward Fisher
8dc53c4981 Wiring in more validation 2016-11-18 11:53:53 -07:00
Wei-keng Liao
06c1f744e8 silence gcc compile warnings when using -Wconversion 2016-10-30 00:44:28 -05:00
Wei-keng Liao
04e5ff4c74 sync with master branch 2016-10-28 11:54:25 -05:00
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
Wei-keng Liao
4b911c1435 add a rule to delete folder results 2016-10-06 00:44:50 -05:00
Greg Sjaardema
2d059f4580 Fix invalid array access
If an empty line is passed to this routine, then there is an invalid memory access at the cp[nn-1] line.  This becomes cp[-1] which is invalid.
2016-08-25 11:32:49 -06:00
Dennis Heimbigner
ddfb6d6279 Make sure that the _NcProperties attr is null terminated and stored as such 2016-08-08 21:54:23 -06:00
Dennis Heimbigner
f205989d59 Undo debug output because Travis won't show it 2016-08-08 11:23:14 -06:00
Dennis Heimbigner
7701bc932c travis failing; add debug output 2016-08-08 10:39:34 -06: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
Ward Fisher
2e71768c47 Fenceposted includes to nc4internal.h in support of https://github.com/Unidata/netcdf-c/issues/275 2016-06-08 11:26:37 -06:00
dmh
5bfdf54263 The name hash for hdf4 variables was
not being computed. Fix in nc4file.c.
Not sure how this ever worked for any variable.
What is also weird is that the dim hash is
apparently being computed.
2016-06-01 15:20:36 -06:00
Dennis Heimbigner
835511eaeb HDF5 is generating unnecessary error messages when netcdf4 logging is enabled
re: github netcdf-c issue #271

This occurs for several reasons, including:
1. using H5Aopen_name instead of H5Aexists to test if attribute exists.
2. using H5Eset_auto instead of H5Eset_auto2.
There are probably others that will have to be extinguished as encountered.
p.s Hope I did not overdo this and kill too much.
2016-05-27 10:08:01 -06:00
Dennis Heimbigner
4fa1470241 re: github issue https://github.com/Unidata/netcdf-c/issues/265
Charlie Zender noted that we forgot to define what happens for
various netcdf API attribute operations, notably nc_inq_att()
and nc_get_att().
So, I added a list of legal and illegal api calls for the provenance
attributes in docs/attribute_conventions.md.
I also added more test cases to ncdump/tst_fileinfo.c to verify
and fixed resultant errors.
2016-05-15 18:03:04 -06:00
Ward Fisher
fc0d7d0d80 Added a tweak to prevent problems with ncdump and hdf5 trying to correct for a lack of ssize_t. 2016-05-10 15:52:46 -06:00
Dennis Heimbigner
b4dc1dca19 More cmake fixes 2016-05-07 14:32:07 -06:00
Dennis Heimbigner
272e6f4022 Oops, forgot to test nc3 only.
Fixed some errors from that case.
2016-05-07 14:32:07 -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
Ward Fisher
3cbd45f539 Ensuring run_back_comp_tests.sh only runs if netcdf4 is enabled. 2016-04-28 14:41:42 -06:00
Dennis Heimbigner
5a1ca24fd6 Fix github issue: https://github.com/Unidata/netcdf-c/issues/236
If a char valued attribute contains embedded nul characters,
then illegal xml will be generated when using the -x (ncml) flag.

There is not good solution since we have a char value '\0' that
is legal in a netcdf-c char valued attribute, but is completely
illegal in ncml (i.e. xml).

So, implemented hack is to go ahead and generate '&#0;' entities
and then complain that we are generating illegal ncml.
2016-03-17 22:05:46 -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
5e4cbd2fec Forgot to check cmake build 2016-01-05 22:26:20 -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
Ward Fisher
ac9f02d01a Modified index passed for last row when printing with annotations, in support of fixing https://github.com/Unidata/netcdf-c/issues/181 2015-12-31 21:20:36 +00:00
Dennis Heimbigner
8e6beda671 NetCDF-c Github issue #178
NetCDF-c Github issue #178 / esupport BNL-694121

The ncgen man pages says:
> Note also that the words variable',dimension', data',group', and
> `types' are legal CDL names, but be careful that there is a space be-
> tween them and any following colon character when used as a variable
> name. This is mostly an issue with attribute declarations.

Ncdump does not obey this rule.
The fix is to modify ncdump/ncdump.c to check if a variable name is
a keyword.

Also added test case.
2015-12-26 18:19:04 -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
dmh
413e49d758 1. There were several bugs in ncdump/dumplib.c
that were not taking the CDF-5 format into account.

2. Had to update ncgen.1 man page to define the new
   k-flag rules to deal with cdf-5.

3. Had to fix some tests that use 'cmp' for comparison;
   this really should be deprecated.

3. There was a bug in configure.ac with respect
   to using the enable-netcdf-4 flag vs
   using disable-netcdf-4.
2015-11-06 17:03:28 -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
f551581ceb Modified 'in-memory' test to only run enhanced tests if netcdf-4 is enabled. 2015-11-06 13:12:09 -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
Ward Fisher
519a56019f Merge branch 'fix-typos' of https://github.com/tbeu/netcdf-c into tbeu-fix-typos 2015-10-16 14:16:09 -06:00
Dennis Heimbigner
cd7a06b193 pull request 2015-10-12 17:09:37 -06:00
Dennis Heimbigner
554034b712 1. Added temporary work-around for cygwin where
AC_CHECK_SIZEOF is not working because anti-virus
   will not allow very rapid creation/deletion of a
   file with same name.
2. modified some test baselines to attempt to fix
   Ward's issue
2015-10-09 10:33:40 -06:00
dmh
8fc86035b2 merge-squash 2015-10-09 10:22:00 -06:00
Dennis Heimbigner
dccbc87d24 1. Added temporary work-around for cygwin where
AC_CHECK_SIZEOF is not working because anti-virus
   will not allow very rapid creation/deletion of a
   file with same name.
2. modified some test baselines to attempt to fix
   Ward's issue
2015-10-09 10:14:45 -06:00
dmh
49597a64af merge-squash 2015-10-09 10:12:11 -06:00
Dennis Heimbigner
a1be2456eb 1. Added temporary work-around for cygwin where
AC_CHECK_SIZEOF is not working because anti-virus
   will not allow very rapid creation/deletion of a
   file with same name.
2. modified some test baselines to attempt to fix
   Ward's issue
2015-09-15 15:18:59 -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
tbeu
e2820e4d8a Fix common typos
Detected by https://github.com/vlajos/misspell_fixer
2015-08-20 11:42:05 +02: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
Ward Fisher
26be22c7db Made the sed statement more specific to avoid problems on non-windows systems. 2015-08-11 11:52:48 -06:00
Ward Fisher
f00b1e8f6f Added a touch of post-processing to make a shell script test work on Windows. 2015-08-11 11:48:49 -06:00
Russ Rew
a62c9d3059 Fix conflicts after merge 2015-08-02 17:29:36 -06:00
Russ Rew
2e029a3058 More cleanups from clang warnings. 2015-08-02 17:23:32 -06:00
Russ Rew
0687dfe5a2 Cleanup clang warnings. 2015-08-02 17:22:50 -06:00
Russ Rew
ec89eb5806 Fix ncdump clang warnings. Fix invalid encodings for some non-ascii strings in tests. 2015-08-02 16:09:47 -06:00
Russ Rew
3d5be0b3f0 Fix NCF-339, ncdump -x omits exponent char in XML double attribute value 2015-08-02 08:54:29 -06:00
Ward Fisher
f8e2d21663 Corrected a potential resource leak. Coverity ID: 1302447 2015-07-29 14:49:05 -06:00
Russ Rew
374a7550c4 Better fix for NCF-336 2015-07-14 10:00:40 -06:00
Ward Fisher
90ff3b728a Corrected a few things to work with MSVC. 2015-06-01 15:26:58 -06:00
Ward Fisher
5d15a332f0 Fixed a typo in the tst_inmemory script. From http://www.tldp.org/LDP/abs/html/io-redirection.html, '&>' redirects both stdout and stderr to filename, whereas '>&' is used with file descriptor handles, e.g. '1>&2'. 2015-06-01 13:07:16 -06:00
Ward Fisher
0cb9631b5c Added ncdump test tst_inmemory into CMake config file. 2015-06-01 12:26:40 -06:00
dmh
a763a5d71d add more debug info to ncdump 2015-05-29 16:04:22 -06:00
dmh
dbc7215063 1. fix nc_open_mem doxygen description
2. fix some bugs wrt to cygwin vs linux.
3. add to RELEASE_NOTES
4. try to fix tst_inmemory fd error by putting the first
   arg to dotest in quotes.
2015-05-28 19:23:33 -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
28908d9cfe Modified some tests to work on Windows when a bash shell is available. 2015-04-22 15:47:19 -06:00
Ward Fisher
c366bec8b3 Activated a couple new tests on MSVC builds when bash is available. 2015-04-20 16:06:20 -06:00
Ward Fisher
fa2818863a Changed how several tests are built/invoked. 2015-04-20 13:54:17 -06:00
Ward Fisher
1fe58bde2d Added tst_netcdf4, tst_h_rdc0 to CMake build system. 2015-04-20 13:18:24 -06:00
Ward Fisher
88a012651a Wired tst_nccopy4.sh into cmake. 2015-04-20 13:15:02 -06:00
Ward Fisher
c4511e2ed2 Wired fillbug into cmake. 2015-04-20 13:08:26 -06:00
dmh
f9edce92ed make testauth be under the enable-auth-tests 2015-03-03 21:01:43 -07:00
dmh
06a11e51df 1. Allow for the user specified rc file via the env variable
NCRCFILE.  Note that the value of this environment
   variable should be the absolute path of the rc file, not
   the path to its containing directory.
2015-03-03 20:17:27 -07:00
Ward Fisher
ae4d54bcc6 Added stray .nc file to CLEANFILES 2015-02-12 13:34:39 -07:00
Ward Fisher
e56c67a772 Added an assertion, although I'm not convinced it's strictly needed, it is for safety now. Will assess whether it can be reached (at a glance it's not reachable, but static analysis says it is) or not. Will update as needed. 2015-02-11 13:29:40 -07:00
Russ Rew
b56cd87284 fix array size in test program 2015-02-05 16:56:15 -07:00
Ward Fisher
3582812bf0 Added tst_bug324 to CMake-based builds, but it is failing for some reason. Will investigate shortly. 2015-02-04 14:11:20 -07:00
Ward Fisher
e2a56efa9c Merge branch 'NCF-324' of https://github.com/qkoziol/netcdf-c into qkoziol-NCF-324 2015-02-04 09:54:17 -07:00
Ward Fisher
01793b4098 Reversed an edit made when working on Visual Studio/bash compatibility. 2015-02-03 12:39:41 -07:00
Ward Fisher
fc97546113 Updated nc-config.cmake.in to work with Windows-style paths. Further changes to get shell scripts running in Windows, when bash is available. 2015-02-02 14:46:51 -07:00
Ward Fisher
2d72b7ca7f More work on getting the shell scripts working properly with cmake under MSYS. 2015-02-02 14:46:50 -07:00
Ward Fisher
f9d3718739 Updated shell script to work on Windows. 2015-02-02 14:46:50 -07:00
Ward Fisher
b1d3304bee Removed a shell test when using visual studio. The test script manually invokes the compiler gcc. 2015-02-02 14:46:50 -07:00
Ward Fisher
33ec07444f Removed non-portable byte-length checks. Left files being generated, as they may be required by other tests. 2015-02-02 14:46:50 -07:00
Ward Fisher
e3125a5ac9 Work progresses, but have encountered an issue. See https://github.com/Unidata/netcdf-c/issues/103. 2015-02-02 14:46:50 -07:00
Ward Fisher
fe1b96cdd9 Updated CMakelists to remove debug, release subdirectories on Windows. Updating shell scripts to work with MSYS paths. 2015-02-02 14:46:50 -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
0f17bc9792 Add test for fix of bug NCF-324, but don't wire it in to run yet 2015-01-30 14:04:50 -07:00
Bas Couwenberg
43fec3de42 Fix another hyphen-used-as-minus-sign issue in nccopy.1 man page.
Most of these issues were fixed in #101, but the patch included in the Debian
package was updated afterwards to include this remaining issue.
2015-01-25 19:20:00 +01:00
Nico Schlömer
6d2b61ddb7 hyphens used as minus signs 2015-01-16 13:12:11 +01: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
Russ Rew
e10bce8637 Fix bug ncf-321, requiring chunk size for unlimited dimension instead of providing default 2015-01-02 07:09:16 -07:00
Russ Rew
4eefcd4707 Typos and consistency fixes in docs 2014-12-29 14:22:26 -07:00
Russ Rew
9a60dc612f Use short "-k" codes instead of deprecated version numbers for ncgen and nccopy tests 2014-12-28 22:42:05 -07:00
Russ Rew
e157810c90 make nccopy.1 more consistent with ncgen.1 2014-12-28 21:18:37 -07:00
Russ Rew
abce64d32e Replace short format names to match new docs, fix comments 2014-12-17 09:56:16 -07:00
Russ Rew
40a7398b21 Added nccopy -kind_code documentation and deprecated -k format_number, need to do the same for ncgen 2014-12-13 19:50:21 -07:00
Russ Rew
d4ba81d6ff Documentation changes for ncdump numeric format code options 2014-12-10 10:49:37 -07:00
Russ Rew
eaf8ef61e0 resolved conflict 2014-12-09 13:31:20 -07:00
Russ Rew
7121a5dd73 Cleaned up deprecated -k n option messages and comments 2014-12-05 15:36:01 -07:00
Russ Rew
2640c0c9e3 Add numeric options (-3, -4, -6, -7) for output format, deprecating
equivalent -k N options.
2014-12-05 12:26:42 -07:00
dmh
31d15ec532 re: NCF-317
If the netCDF-C library is built with the
HDF5 library but without the HDF4 library and one attempts
to open an HDF4 file, an abort occurs rather than returning
a proper error code (NC_ENOTNC).
Fix is to modify dfile.c#NC_check_file_type to properly
#ifdef relevant tests.
2014-10-07 12:37:41 -06:00
Ward Fisher
85e8e7e945 Addressed man page syntax warnings reported in github issue 52, https://github.com/Unidata/netcdf-c/issues/52 2014-10-03 10:46:02 -06:00
Ward Fisher
21eaec9583 corrected an undefined value error identified by clang. 2014-10-02 12:43:27 -06:00
dmh
2e20b700af Forgot to update cmake wrt to directory name changes 2014-09-19 12:43:39 -06: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
Russ Rew
c5237736e4 For nccopy, added version info in usage printout. 2014-08-26 14:05:47 -06:00
Ward Fisher
b43813d821 When using the '-ansi' flag with gcc, netcdf would fail to build because of the use of '//' for one-line comments. I've addressed this by replacing instances of // with enclosing comment blocks. 2014-08-26 11:19:32 -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
6c071be031 Corrected issues where functions were not available in Windows. Specifically strndup. Also accomodated an included needed for getcwd. 2014-08-07 17:03:27 -06:00
Russ Rew
720e4ea82c Fixed bug NCF-310 (ncdump char vars with multiple unlimited dims).
Added associated tests and entry in RELEASE_NOTES.
2014-08-07 14:35:29 -06:00
dmh
cd2574ba7c Change assertion failure to a error 2014-07-23 11:25:49 -06:00
Ward Fisher
7f812b367e Manual merge of pull request https://github.com/Unidata/netcdf-c/pull/64 contributed by nschloe. Assorted CMake improvements. 2014-06-11 15:51:31 -06:00
Ward Fisher
d2e643429b Changed invocation of cmake from absolute to relative. 2014-06-06 13:57:02 -06:00
dmh
83ec39f5db [NCF-272]
re: e support ZCL-340681 and CPW-270700

HDF4 supports compression (and chunking)
but the chunking was not being recorded
for HDF4 files. So, I modified the necessary
files to support HDF4 chunking.
2014-06-02 13:04:28 -06:00
Ward Fisher
cd30a9e570 Corrected several static analysis errors related to uninitialized variables. 2014-04-22 16:11:37 -06:00
Ward Fisher
733f6257b0 Updating cmake shared_linker_flags as suggested by Nico Schlomer: https://github.com/Unidata/netcdf-c/issues/46
Fixed indentation.

Updated .gitignore.

Added a macro to make it easy to check to see if the linker supports a particular flag.  Debug builds now pass the -w1,--no-undefined if it is detected the linker supports it.
2014-04-02 15:54:05 -06:00
Ward Fisher
bb84fda8cf Removed a couple of clang-reported potential dereferences of null/undefined pointers. 2014-03-31 09:56:39 -06:00
Russ Rew
b22181768d Fix a few coverity warnings. 2014-03-28 22:03:10 -06:00
Russ Rew
9d86610739 Fix Jira ticket NCF-295, nccopy -d0 shuffle and chunking issues 2014-03-23 17:25:45 -06:00
Russ Rew
d774e23bc1 Fix -d0 option to not do unwanted chunking or associated shuffle.
Add -c '/' option to specify changing layout for all variables from chunked to contiguous.
Fix logic for chunking and compression depending on input and output formats.
2014-03-21 12:34:19 -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
dmh
a1f8d0a761 turn on tst_auth 2014-03-10 16:40:52 -06:00
dmh
1b941d342d 1. Attempted to reduce the number of conversion errors
when -Wconversion is set. Fixed libdispatch, but
   rest of netcdf remains to be done.
2014-03-09 15:51:45 -06:00
dmh
2bc36f2bc1 conflict resolution 2014-03-08 20:43:18 -07:00
dmh
a189b98b0b 1. Any test that references nctestserver/NC_findtestserver
should be under ENABLE_DAP_REMOTE_TESTS.
   Fixed to make sure that this is so.
   Also attempted to fix ncdap_test/CMakeLists.txt,
   but probably got it wrong.
   HT to Nico Schlomer.
2. Attempted to reduce the number of conversion errors
   when -Wconversion is set. Fixed oc2, but
   rest of netcdf remains to be done.
   HT to Nico Schlomer.
3. When doing #2, I discovered an error in ncgen.y
   that has remained hidden. This required some other
   test case fixes.
2014-03-08 20:41:30 -07:00
Russ Rew
cfae3cb196 Merge branch 'master' of https://github.com/Unidata/netcdf-c 2014-03-08 16:37:21 -07:00
Russ Rew
8bcd127084 Added execute bit to ncdump/tst_bom.sh script. 2014-03-08 16:35:43 -07:00
Ward Fisher
8f524289f8 Fixed issue in CMakeLists.txt related to how the 'bom' test executable was being built. 2014-03-08 16:06:13 -07:00
dmh
baade3e4fc [NCF-293]
Allow .cdl files to have a leading utf-8 BOM.
Also add test.
2014-03-07 22:52:40 -07:00
dmh
e3545bf88d 1. Allow files to be opened by name multiple
times, but returning the same ncid.
2. Separate out the dap auth tests
   and make them disabled by default.
3. turn of ncdap_test/test_varm3 until
   we can find a copy of coads_climatology.nc
2014-03-07 12:04:38 -07:00
Russ Rew
cb1e4471b5 Removed doxygen man page, since it now is in the User Guide. 2014-03-06 21:15:00 -07:00
Russ Rew
8e59dc3ce8 Merge branch 'master' of https://github.com/Unidata/netcdf-c
Conflicts:
	ncdump/nccopy.c
2014-03-06 21:12:48 -07:00
Russ Rew
dac98c89b5 Typo fixes in install doc. Document nccopy chunk threshold. 2014-03-04 15:03:49 -07:00
Ward Fisher
805a6f5b58 Removed a stray character that caused the build to fail. 2014-03-03 12:24:36 -07:00
Ward Fisher
700a0bf848 Reorganizing NetCDF User's guide document. 2014-03-03 11:29:46 -07:00
Ward Fisher
f6a969cfd5 Updated and consolidated some redundant documentation. 2014-02-25 17:08:04 -07:00
Quincey Koziol
4bfd9b27a0 Merge remote-tracking branch 'upstream/master'
Conflicts:
	libdap2/common34.c
	oc2/ocutil.c
2014-02-11 17:26:09 -06:00
Quincey Koziol
b2dfacbcfa Big clean up to type handling in libsrc4, which makes fill-values work
correctly for variables with string datatype, plus a few other minor changes.
2014-02-11 17:12:08 -06:00
Ward Fisher
9b0a98383a Added CMakeLists.txt to missing Makefile.am files, so that CMake-based builds can be used on source packages generated by make dist 2014-02-06 11:32:32 -07:00
dmh
0f4b72c53b [NCF-286]/e-support:JVN-123940
using cygwin64 causes a couple of bugs during make check.
Fixes are as follows:
1. in ncdump.c and nccopy.c change all occurrences of
   'return EXIT_FAILURE'
   and
   'return EXIT_SUCCESS'
   with
   exit(EXIT_FAILURE)
   and
   exit(EXIT_SUCCESS)
   respectively.
   I have no idea why this works.
2. in libdap2/ncdap3a.c#freeNCDAPCOMMON,
   remove the call to nc_abort, it is
   causing a loop; not sure why this
   is not caught under other operating systems.
2014-02-04 16:26:52 -07:00
Ward Fisher
0032af978b Added INQ_FORMAT_EXTENDED-related tests to the cmake build system (based on inclusion in autotools-based builds). 2014-01-16 13:14:49 -07:00
Quincey Koziol
cd71eb525c Corrected "BAIL" macros to avoid infinite loop when logging is disabled and an
error occurs after an "exit:" label.

Corrected a dozen Coverity errors (mainly allocation issues, along with a few
    other things):
        711711, 711802, 711803, 711905, 970825, 996123, 996124, 1025787,
        1047274, 1130013, 1130014, 1139538

Refactored internal fill-value code to correctly handle string types, and
    especially to allow NULL pointers and null strings (ie. "") to be
    distinguished.  The code now avoids partially aliasing the two together
    (which only happened on the 'write' side of things and wasn't reflected on
    the 'read' side, adding to the previous confusion).

    Probably still weak on handling fill-values of variable-length and compound
    datatypes.

Refactored the recursive metadata reads a bit more, to process HDF5 named
    datatypes and datasets immediately, avoiding chewing up memory for those
    types of objects, etc.

Finished uncommenting and updating the nc_test4/tst_fills2.c code (as I'm
    proceeding alphabetically through the nc_test4 code files).
2013-12-29 01:12:43 -06:00
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
dmh
ea7c0fc91b [NCF-280]/TLO-836022
Fix bug where leading backslash digit
in name was not being properly handled.
The reason was that I accidentally attemped to allow \x... and \0...
escapes in identifiers. This make identifiers
with leading escaped digits not work any more.
Also added test case.
2013-11-19 21:58:56 -07:00
dmh
cc95bd3d47 1. [NCF-276]/XXI-796914
Columbia server does not serve up proper
   opendap DDS replies. The Dataset {...} name
   changes depending on if the request has certain
   kinds of constraints.
   Code for a hack was not being used, so restore it.
   The fix is to effectively ignore differences in
   Dataset node names if the code is coming from
   columbia.edu.

2. [NCF-278]
   The ncgen code is improperly typing int64 integer constants
   as uint64.

3. [NCF-279]
   Empty string constants were not being properly
   filled when their target array is length 1 or more.
2013-11-17 14:26:14 -07:00
Russ Rew
3327a3c2c9 Add reference file for ncdump -bc test 2013-11-13 13:45:20 -07:00
Russ Rew
90933c7070 Add ncdump brief annotation test using -bc option 2013-11-13 13:44:03 -07:00
Russ Rew
911bdab962 Fix for bug NCF-275, ncdump -b annotation 2013-11-13 11:03:18 -07:00
Russ Rew
8e18ede2fe Fix full annotation bug described in NCF-275 2013-11-12 06:40:03 -07:00
dmh
850af2d435 [NCF-271]
Fix bug introduced by [NCF-267].
The bug was that octal constants that had
the highest bit set (e.g. '\200')
were not recognized as proper octal
constants. Fix was to keep as integer
until it was needed as an 8-bit byte.
2013-09-26 10:10:26 -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
dmh
a4d3f8306c add test cases 2013-09-23 17:11:24 -06:00
dmh
e7414e16d0 [NCF-265] again.
1. Updated the ncgen manual (ncgen.1)
   to discuss handling of ambiguous
   enumeration constant references.
2. Fixed the test case. It is currently
   XFAIL'd until such time as ncdump
   is modified to output properly
   disambiguated enumeration constant
   references.
2013-09-22 12:08:27 -06:00
dmh
06d91c3084 [NCF-265] again.
Added code to verify that enum constants
(and other constants) are consistent
with the type of the variable or
attribute to which they are assigned.
This addresses the ncdump failure.
2013-09-21 16:19:06 -06:00
dmh
c99058741a [NCF-265]
Ncgen is unable to resolve
ambiguous references to an enum
constant when two different enums
have same econstant name.

Solved by allowing more specific
forms for econstant references.
1. /.../enumname.enumconstname
2. enumname.enumconstname
3. enumconstname

Case 1 is resolved by using the econstant
in the specific enum definition. If none is
found, an error is reported.

Case 2 is resolved by
1. finding an enclosing group with an
   enum definition with the specified name
   and containing the specified econstant.
   If there are more than one, then an error is reported
2. finding all enum definitions in the dataset that have
   the specified enum name and contain the specified
   econstant. If more than one is found, then an error is reported.
If the above two methods fail, then report an error.

Case 3 is similar to case 2, but all enums, irrespective
of name are used if they contains the specified enum constant.

The ref_tst_econst.cdl test in ncdump is causing ncdump
to fail. So there may be yet some problem.
2013-09-20 20:43:09 -06:00
Ward Fisher
6a0978594c Updating CMakeLists.txt to address RPATH problem on OSX. 2013-08-22 11:15:12 -06:00
Ward Fisher
a3ff1206f5 Modified Makefile.am to not remove ctest.c, ctest64.c. This may be reverted by for now leaving ctest.c, ctest64.c in source repository. 2013-08-07 16:31:13 -06:00
Ward Fisher
7f8453c8f4 Updating generate documentation to reference GitHub. 2013-08-07 16:13:18 -06:00
Ward Fisher
a90b386e0a Refactored 'Constant' to 'NCConstant' in ncgen/ to avoid
reserved word collision on Windows.

Added tst_ncgen4_classic.sh to CMake-based builds.
2013-07-16 20:22:48 +00:00
Ward Fisher
07247f44b0 Fixed a couple of CMake related testing issues. 2013-07-11 16:50:51 +00:00
Russ Rew
f9dff9cee3 Fix make distcheck by getting right 2013-07-10 22:09:46 +00:00
Dennis Heimbigner
aa5e822273 added tst_h_scalar test 2013-07-10 21:19:05 +00:00
Russ Rew
758858e8b7 Forgot to add and commit yet another test program. 2013-07-10 21:07:53 +00:00
Russ Rew
e737bf33cb Forgot to add and commit new test program. 2013-07-10 21:06:12 +00:00
Russ Rew
0fd1f0dde1 Define macro for NIL string value in ncdump/dumplib.h 2013-07-10 20:56:24 +00:00
Dennis Heimbigner
98a469b17a Added NIL tests 2013-07-10 20:53:50 +00:00