Commit Graph

480 Commits

Author SHA1 Message Date
Dennis Heimbigner
32fe709615 ckp 2017-04-14 11:05:30 -06:00
Dennis Heimbigner
6a4ba35565 Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh)
1. Cleanup test_common.sh to expunge (mostly) the use of the VS
   path value. This has the effect of being unable to use the
   Visual Studio C compiler for shell tests.
2. There is a missing case in CMakeLists.txt so add
   defaulting for HDF5_C_LIBRARY_hdf5 using HDF5_C_LIBRARY.
   Ward should probably examine this to get it fixed correctly.
3. Put back ref to esg.md in docs/Doxyfile.in
4. Fix minor warning in dut8proc.h
2017-04-10 09:26:57 -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
80390b94e5 keep up-to-date with master 2017-03-27 12:16:24 -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
Ward Fisher
eeb673bf8c Merge branch 'master' into ghpull-375 2017-03-22 11:24:56 -06:00
Dennis Heimbigner
24414335f3 debug cmake failures 2017-03-20 14:40:00 -06:00
Dennis Heimbigner
8e290f2aec CMake fixes 2017-03-20 14:28:38 -06:00
Dennis Heimbigner
44e52e0515 More distcheck cleanup 2017-03-20 13:50:44 -06:00
Dennis Heimbigner
a763bb51d4 Add the intermediate file to be cleaned up 2017-03-18 18:47:19 -06:00
Dennis Heimbigner
cb473bf6ff Apparently we have no .cdl test cases that have
a global attribute whose type is an enum.

Turns out this case fails because of an
oversight in ncgen.

This pr fixes that problem (in semantics.c).
Also added test case .cdl file: tst_gattenum.cdl
2017-03-18 17:57:48 -06:00
Ward Fisher
53c018a3f6 Attempting to fix visual studio errors in support of https://github.com/Unidata/netcdf-c/pull/375 2017-03-13 15:12:47 -06:00
Ward Fisher
287374aee4 Regenerated parser files on ARM. 2017-03-09 13:23:30 -07:00
Ward Fisher
8e3790f7ce Merged master. 2017-03-09 12:53:28 -07: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
78c0f34c82 Merging master into branch. 2017-02-27 11:00:24 -07:00
Dennis Heimbigner
ba429bcc56 Add comment to explain change of OPAQUE to OPAQUE_ 2017-02-23 22:51:32 -07:00
Dennis Heimbigner
0415300fbc It appears that the token OPAQUE in ncgen.y
is somehow in interference with something
in the HDF4 code. So, I changed
the OPAQUE -> OPAQUE_ and that appears
to fix the problem with bison when HDF4
is enabled.

ps. when Visual Studio complained about token
'constant' it turn out that it mean token type,
not the actual token named 'constant'. Instead
the actual token that was causing the problem
was 'OPAQUE'.
2017-02-23 22:34:11 -07:00
Ward Fisher
1cdde8bbd2 Invoked makeparser from OSX. 2017-02-23 12:22:44 -07:00
Dennis Heimbigner
d0fb4a472a 1. Added a restriction note on ncgen/Makefile.am.makeparser task.
2. invoked makeparser using bison 3.0.4 and flex 2.5.35
2017-02-22 15:56:29 -07:00
Ward Fisher
4208a875c4 Updated generated ncgen files. 2017-02-22 13:22:50 -07:00
Dennis Heimbigner
f71b695530 Followon to
re: https://github.com/Unidata/netcdf-c/issues/365

1. Added to RELEASENOTES.md
2. Add a range check to more closely
   mimic unix sscanf
3. locate and fix same sscanf problems in ncgen/cvt.c

Still need a stable url for a test case.
2017-02-20 13:19:25 -07:00
Dennis Heimbigner
47daf33074 Resolves Github issue https://github.com/Unidata/netcdf-c/issues/349.
Update utf8proc.[ch] to use the version now
maintained by the Julia Language project
(https://github.com/JuliaLang/utf8proc/blob/master/LICENSE.md).
The license for the previous version was
unacceptable for the Debian and Ubuntu release
systems. The new version both updates the code
and addresses the license issue.

It turns out that the utf8proc software we are using
was turned over to the Julia Language developers
and the license terms changed to allow modification.
(https://github.com/JuliaLang/utf8proc/blob/master/LICENSE.md).

So the fix here is as follows:
1. Wrap the library with a fixed interface: libdispatch/dutf8.c
   and include/ncutf8.h.
2. Replace the existing utf8proc code with the new version
   from https://github.com/JuliaLang/utf8proc.
3. Add a couple more test cases: nc_test/tst_utf8_validate.c
   and nc_test_utf8_phrases.c.  If/when I can find a usable
   normalization test, I will incorporate that later.
2017-02-16 14:27:54 -07:00
Ward Fisher
20721cc46b Additional work in trying to diagnose failures in nc_test. 2017-02-07 15:16:32 -07:00
Ward Fisher
870b6c534f Working out an error with unistd.h in windows. 2017-01-30 14:54:00 -07:00
Ward Fisher
34161aab69 Added fixes for Visual Studio 10 2017-01-10 13:54:09 -07:00
Ward Fisher
3632e07b19 Updated ncgen script to work with MSVC. 2016-11-18 15:03:52 -07:00
Ward Fisher
ecddeca4ec Added some files to distclean 2016-11-18 14:09:01 -07:00
Ward Fisher
88fd875741 Corrected typo causing problems. 2016-11-18 13:59:57 -07:00
Ward Fisher
0b06be2ecd Removed debug files. 2016-11-18 13:18:44 -07:00
Ward Fisher
8dc53c4981 Wiring in more validation 2016-11-18 11:53:53 -07:00
Ward Fisher
637f649555 Migrated test validation to run_tests.sh 2016-11-18 11:11:53 -07:00
Ward Fisher
c3ae660730 Tweaking cdl files so that we can compare against them. 2016-11-18 11:07:20 -07:00
Dennis Heimbigner
001598ddb6 support fixes for Github issue 323
Fixed issue 323 by properly adding padding
when generating the binary data for use
with nc_put_var/vara.
Also added second testcase.
2016-11-17 15:29:32 -07:00
Ward Fisher
c87c40d195 Re-added diagnostic file for the time being. 2016-11-16 15:26:51 -07:00
Ward Fisher
ff9bf7b548 Extended test script. 2016-11-16 14:40:06 -07:00
Ward Fisher
129de9500a Imported the modifications made to offsets.c in branch issue323.dmh. 2016-11-16 11:19:45 -07:00
Ward Fisher
bc6fc8ac14 Updating ncgen run_nc4_tests.sh script to ensure that results are tested in addition to whether or not ncgen exited successfully. 2016-11-16 11:09:14 -07:00
Ward Fisher
a845b92394 Reformated source cdl to allow for a diff test. 2016-11-16 10:57:36 -07:00
Ward Fisher
609e368f8d Cleaning up diagnostic stuff 2016-11-15 15:11:25 -07:00
Ward Fisher
2fa4229bb6 Added a file to be cleaned up 2016-11-15 14:39:59 -07:00
Ward Fisher
da48bc61e8 Renamed file added in support of https://github.com/Unidata/netcdf-c/issues/323 2016-11-15 14:27:21 -07:00
Ward Fisher
40b6dee9da Added some comments to the CDL file, removed older files. 2016-11-15 14:25:48 -07:00
Ward Fisher
915d6ec9be Another temporary cdl file added. 2016-11-15 13:48:58 -07:00
Ward Fisher
e879a3c78b Added some temporary debugging files. 2016-11-15 13:48:44 -07:00
Ward Fisher
6c6bccfd9c *possible* fix for https://github.com/Unidata/netcdf-c/issues/323 but further investigation required. 2016-11-15 13:48:20 -07:00
Ward Fisher
505e5ba140 Some modifications to alignment test, offsets. 2016-11-15 11:22:52 -07:00
Ward Fisher
4f21078fe5 Added initial debug stuff to gdb script. 2016-11-15 10:22:15 -07:00
Ward Fisher
0c83a5960b Added a test file for https://github.com/Unidata/netcdf-c/issues/323 2016-10-31 10:54:06 -06:00
DennisHeimbigner
4984536a60 Merge branch 'master' into issue314.dmh 2016-09-02 14:18:41 -06:00
Dennis Heimbigner
e2967bb622 Fix for Github issue 314.
Problem was in oc2/dap.y.
In definition of errormsg:, change WORD_WORD to WORD_STRING
since the msg field of an opendap error response is a quoted
string.

Also took the opportunity to modify ncgen to
transfer the logging level (-L flag) into the c-code
generated using -lc.
2016-09-01 22:06:07 -06:00
Bas Couwenberg
988b4ff868 Fix spelling errors.
* characers -> characters
 * varaible  -> variable
2016-08-28 15:45:36 +02:00
Ward Fisher
6d5a924354 Addressed coverity issue 719941, missing varargs cleanup. 2016-07-06 15:41:49 -06:00
Ward Fisher
8507d923b7 Fixed a typo in 'makeparser' ncgen/ target. 2016-07-06 15:32:53 -06:00
Ward Fisher
bb96050e66 Addressed a UNIX API issue reported by clang. 2016-06-20 15:19:18 -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
Ward Fisher
a7b7d216b2 Corrected an issue on Linux, jumping back over to Windows to see if the issue persists. 2016-05-11 15:38:45 -06:00
Ward Fisher
ef2c6f9bc4 Things are working? 2016-05-11 15:31:17 -06:00
Ward Fisher
8373de2f12 Corrected an issue with compiling under Visual Studio. 2016-05-11 12:44:25 -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
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
Bas Couwenberg
eb2561aaab Fix 'atttributes' typo, replace with 'attributes'. 2016-01-15 02:17:29 +01: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
cbb6df3232 Github issue 152: https://github.com/Unidata/netcdf-c/issues/152
User request to have all orphaned DAP2 attributes kept as netcdf
global attributes. This is primarily a change in the oc code
nplus testcase dataset changes.

Result may be inconsistent with netcdf-Java output.
2015-11-29 20:38:12 -07:00
Ward Fisher
fce30a0d32 Updated ncgenl.c 2015-11-26 17:47:30 -06:00
Ward Fisher
04de3d3fa2 Merge branch 'NCF-345' into github156 2015-11-24 17:20:07 -06:00
Ward Fisher
dd2201621e Addressed an API-related usage of strncmp. 2015-11-24 17:19:36 -06:00
Ward Fisher
8ebbd2a9c5 Updated makeparser target. 2015-11-24 16:16:23 -06:00
dmh
47e10591b4 ckp 2015-11-19 13:44:55 -07:00
Ward Fisher
3766923ecf Added test for [NCF-345] 2015-11-13 10:33:19 -07:00
Ward Fisher
21601f669b Applied a patch to fix a bug on cygwin64. The patch was contributed by Marco Atzeri. 2015-11-11 15:36:02 -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
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
Ward Fisher
3bb62c3314 Corrected a logic error preventing ncgen from creating cdf-5 files. 2015-11-02 16:11:29 -07:00
Ward Fisher
991d127158 Tweaked ncgen test script to actually *check* to see if the file it says it's creating was created. 2015-11-02 13:58:55 -07:00
Ward Fisher
a359cb6a53 Reverted some of the spelling corrections. Some misspellings were intentional 2015-10-16 14:36:17 -06:00
dmh
8fc86035b2 merge-squash 2015-10-09 10:22:00 -06:00
dmh
087ae58ffd cleanup and squash changes vav master 2015-10-09 10:12:11 -06:00
dmh
49597a64af merge-squash 2015-10-09 10:12:11 -06:00
tbeu
e2820e4d8a Fix common typos
Detected by https://github.com/vlajos/misspell_fixer
2015-08-20 11:42:05 +02:00
dmh
fab66699d1 Moved libsrc5 to libsrcp
because pnetcdf is used for
more than CDF-5 files.
2015-08-14 20:39:56 -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
Ward Fisher
679048ee2a Corrected a potential use of a pointer after it had been freed. See Coverity Issue: 1265731 2015-07-29 14:55:20 -06:00
Ward Fisher
83692b10d6 Addressed a potential null dereference reported by clang. 2015-06-18 14:41:09 -06:00
Ward Fisher
39c9d10ede Removed a stray debugging message. 2015-06-18 14:37:31 -06:00
Ward Fisher
66dc490e8a Addressed UNIX API issues reported by clang. 2015-06-18 14:31:10 -06:00
Ward Fisher
af81e0cb24 Fixed a unix API error reported by clang. 2015-03-31 11:19:49 -06: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
Ward Fisher
80bf9a0aa2 Resolved conflict. 2015-01-16 09:28:07 -07:00
Nico Schlömer
6d2b61ddb7 hyphens used as minus signs 2015-01-16 13:12:11 +01:00
Nico Schlömer
a9f4ea96c1 Update ncgen.1 2015-01-16 10:02:00 +01:00
Russ Rew
4eefcd4707 Typos and consistency fixes in docs 2014-12-29 14:22:26 -07:00
Russ Rew
db83a3be4c Jira issue NCF-314, "Provide replacement for using numeric values of -k
option on nccopy and ncgen".
2014-12-29 13:07:28 -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
dmh
3a559d3f1d Fix occurlflags bug 2014-12-28 15:54:02 -07:00
Russ Rew
6ca14d8a78 Update ncgen code and docs to use nco-type format codes and deprecate use of confusing format version numbers 2014-12-28 10:44:21 -07:00
Peter Jansen
7aa25f4e7b Fix java generation for nan values, use Float.NaN and Double.NaN 2014-11-08 10:11:53 -03:00
Peter Jansen
ba5d3ca50a fix infinite loop seg fault, where codify called jcodify called codify, should have been jcodify calling ccodify 2014-11-07 14:46:04 -03:00
dmh
7c7db22bc7 Removed some useless code 2014-10-11 12:27:17 -06:00
dmh
b76d1ee722 re: NCF-318
Fixed bug in ncgen. When classic format was in force (k=1 or
k=4), the "long" datatype should be treated as int32. Was
returning an error.
2014-10-10 15:00:40 -06:00
dmh
1739c50622 Modified a number of tests
to make use of remotetest.unidata.ucar.edu
optional. Purpose is purely for testing
new dts and thredds servers.
2014-10-04 15:59:16 -06:00
Ward Fisher
a8009ba312 Coverity: 1229128 corrected. 2014-10-03 12:38:32 -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
3fde3da0a7 Fixed a potential null dereference in ncgen. 2014-10-02 11:28:07 -06:00
Ward Fisher
a451f546da Fixed a malloc issue on some systems. 2014-10-01 16:42:27 -06:00
Ward Fisher
cad531a487 Corrected a clang-reported issue where NULL might be passed to emalloc(). 2014-09-30 11:42:44 -06:00
dmh
8074e0fdec 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-22 14:50:59 -06:00
dmh
84c1af3b0a fix valgrind discovered problem 2014-09-22 14:31:19 -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
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
Russ Rew
1205960b0e Document that ncgen input can come from stdin 2014-08-24 16:58:26 -06:00
dmh
46063247cb conflict resolution 2014-08-17 12:52:53 -06:00
dmh
18eb1c1126 Coverity fixing 2014-08-17 12:03:23 -06:00
Ward Fisher
56a0f8620f Coverity: 711940 2014-08-15 15:50:49 -06:00
Ward Fisher
dc93496654 Coverity: 711707 2014-08-15 15:42:13 -06:00
Dennis Heimbigner
f2e2a2c266 Fix coverity errors CID 1230781
and 1230782,
2014-08-11 16:12:14 -06:00
Ward Fisher
421b999a0e Coverity 711857 2014-08-11 13:21:01 -06:00
Ward Fisher
773024aa4f Addressed Coverity issue 711896 2014-07-29 11:00:44 -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
9d6eb045ad Corrected static analysis issue 2014-04-22 15:54:47 -06:00
Ward Fisher
52b2edab9b Cleaned up clang-reported issue: dead assignment. 2014-04-21 10:56:57 -06:00
Ward Fisher
18f23a0e47 Fixed clang-reported issue: Dead assignment. 2014-04-21 10:30:43 -06:00
Ward Fisher
d94af8cc89 Fixed clang-reported error: calling strlen on null pointer. 2014-04-19 14:18:53 -06:00
dmh
389d2ea394 fix some coverity complaints 2014-04-07 13:00:47 -06:00
Dennis Heimbigner
464d5fc8bb 1. Add then remove some debugging info
for testing jna
2. add some personal scripts (*jna)
   to support creating jna dlls.
2014-04-03 15:46:12 -06: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
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
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
8fbb4a68d5 Merge branch 'master' of https://github.com/Unidata/netcdf-c
Rebasing
2013-12-19 09:36:05 -07:00
dmh
564a9d56a4 Merge branch 'master' of https://github.com/Unidata/netcdf-c 2013-12-10 11:23:10 -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
dmh
c6cbfb57f5 Removed old code from NCF213 2013-12-07 20:19:53 -07:00
Quincey Koziol
4a894dc154 Correct minor unmerged change. 2013-12-01 00:09:27 -06:00
Quincey Koziol
5ccb8a24b5 Merge branch 'master' into ncf-177 2013-11-30 23:40:26 -06:00
Quincey Koziol
e1fc13b215 Many changes to address NCF-177 (renaming dimensions and variables). Also
many cleanups to fix compiler warnings, streamline iteration over objects
in HDF5 file when opening the file, and generally straightening out the code
to be cleaner and simpler.

Tested on Mac OS/X with gcc 4.8 and OpenMPI (which uses clang).
2013-11-30 23:20:28 -06:00
Ward Fisher
906f2a7513 Corrected a garbage-value error reported by Clang. 2013-11-22 13:48:30 -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
dmh
2bc308432d sync with oc2.0 2013-11-14 15:13:20 -07:00
dmh
7d03c2e34e Added stripped grammar to ncgen man page (ncgen.1). 2013-11-04 10:43:45 -07:00
Ward Fisher
93a3897dab Corrected an issue in genlib.c where a strcpy was used with overlapping buffers. 2013-10-30 16:04:35 -06:00
dmh
18dca3eb66 Merge branch 'master' of http://github.com/Unidata/netcdf-c 2013-10-07 16:46:46 -06:00
Ward Fisher
23cf133b39 Addressed Coverity issues 711911, 1102823 2013-10-07 16:25:30 -06:00
dmh
8e6250c246 fix some coverity bugs 2013-10-07 16:21:45 -06: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
1aa2f695a0 overwrote 2013-09-23 17:11:24 -06:00
Ward Fisher
f0dddd75db Fixed an issue building with netcdf-4 disabled. 2013-09-23 16:21:35 -06:00
Ward Fisher
3e82887ab9 Corrected Windows-related issue. 2013-09-23 12:04:39 -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
e21426d1b6 Addressed an issue which manifested with Visual Studio when compiling getfill.c. 2013-08-19 12:28:21 -06:00
Ward Fisher
b1d395ab4f Addressed Coverity issue 711922, 'Uninitialized scalar variable'. 2013-08-14 11:07:26 -06:00
Ward Fisher
3245398d86 Addressed Coverity issue 711923, 'Uninitialized scalar variable'. 2013-08-14 11:06:16 -06:00
Ward Fisher
4980b9f4e1 Addressed some instances of Coverity issue 711927, uninitialized scalar variable.
Modified 'makeparser' target in CMake build system.
2013-08-14 10:12:49 -06:00
Dennis Heimbigner
b85d3568ec Added the necessary code to support
group renaming. The primary API
is 'nc_rename_grp(int grpid, const char* name)'.
No test cases provided yet.
This also required adding a rename_grp entry
to the dispatch tables.
2013-07-19 21:48:37 +00:00
Ward Fisher
1c23ec06b8 Merging latest from netcdf-cmake branch. Includes a handful
of fixes for coverity-identified errors.
2013-07-19 21:32:27 +00: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
Dennis Heimbigner
98a469b17a Added NIL tests 2013-07-10 20:53:50 +00:00
Dennis Heimbigner
483cbf94fe Added code to support NIL
values for strings in ncgen.
Needs test cases.
2013-07-10 20:00:48 +00:00
Dennis Heimbigner
628aed80d9 1. synch changes with oc2.0
2. Fix a bug in ncgen to
   catch a special case of a malformed
   datalist.
2013-06-26 18:55:30 +00:00
Ward Fisher
33d3d06971 Added initial 'make dist', 'make distcheck' support to
CMake-based builds.
2013-06-03 16:42:04 +00:00
Dennis Heimbigner
254c0e7c96 Historically
ncgen3 and ncgen
have treated 
uppercase atomic types
the same as lower case.
Change so upper case are no
longer allowed.

Also, synch oc.
2013-05-15 17:37:04 +00:00
Ward Fisher
b113f6f8b6 Merged a handful of changes from netcdf-cmake branch.
Addressed the following coverity issues:

711762
711763
711766
711788
711933
711934
711935
2013-04-16 23:02:54 +00:00
Ward Fisher
4a274b9870 Merged latest changes from cmake development branch.
Addressed a number of memory-related problems
reported by Coverity.
2013-04-02 22:09:31 +00:00
Ward Fisher
405f8bf827 2013-04-01 23:05:45 +00:00
Ward Fisher
f26a4a559a Merged latest from netcdf-cmake branch.
Addressed several cmake-related issues, in terms of
building on Windows.  Also added XGetopt.c to 
EXTRA_dist in Makefile.am files.
2013-03-19 22:40:15 +00:00
Ward Fisher
6096f6b43b Merged changes from CMake branch.
Addressed a handful of memory leaks
reported by Coverity.
2013-03-14 22:49:21 +00:00
Dennis Heimbigner
841f7c7148 Move onstack.h from libsrc
to include because it is used
both in libsrc and libdispatch
2013-03-08 18:08:11 +00:00
Ward Fisher
38a3f2ef5f Changed CMakeLists.txt to look for nc_iter.c instead of nciter.c 2013-02-28 21:03:02 +00:00
Dennis Heimbigner
0fc1e99269 Forgot to check-in ncgen/nc_iter.c 2013-02-28 19:16:10 +00:00
Dennis Heimbigner
c50b8c29e2 Fix Jira NCF-233.
Rename nciter.[ch] to nc_iter.[ch] to avoid
potential build issues.
2013-02-28 17:51:09 +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
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
Dennis Heimbigner
c0a7749cf5 1) fix out of date ncgentab/ncgenyy files 2)fix Jira-ncf213 bug and add test case 2013-01-03 20:45:34 +00:00
Ward Fisher
21523c8582 Merged changes from cmake branch. oc2 changes are just
'file property' changes, not sure what exactly.
2012-12-20 21:50:45 +00:00
Ward Fisher
7b91248723 Merged changes from netcdf-branch.
o Changed variable names 'typeid' to 'typeid1' to avoid a namespace conflict
in visual studio.
o Cleaned up a handful of warnings in Visual Studio.
o Addressed a few Coverity-discovered issuesl
o Made changes to CMake-based builds.
2012-12-13 22:09:41 +00:00
Ward Fisher
85382f21bc Fixed a handful of issues identified by Coverity. 2012-12-06 00:06:32 +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
ff631c8156 Merged latest changes from cmake branch.
o Improved CMake support.
o Cmake module compatibility (netcdf-config*.cmake.in).
2012-11-19 21:43:12 +00:00
Ward Fisher
afa67452f6 Took some time to address a handful of errors identified by Coverity.
Primarily focused on memory errors falling into a couple different types:

1) Static overrun errors.
2) Dereference uninitialized memory errors.

make distcheck works after applying these fixes, and coverity no longer sees an issue, so hopefully they are properly resolved.
2012-11-14 18:24:45 +00:00
Ward Fisher
45f77090a1 Addressed a handful of minor 'fixed-length buffer overrun'
errors identified by Coverity.  The fixes involved replacing calls
to strcpy, strcat with strncpy, strncat.
2012-10-31 21:31:47 +00:00
Dennis Heimbigner
d22134376c Fix bug NCF-199 2012-10-31 20:07:11 +00:00
Ward Fisher
057701e1fa Added man pages to 'make install' 2012-10-17 21:14:30 +00:00
Dennis Heimbigner
076e78e91c Fix Jira bug NC-198 2012-10-02 14:54:19 +00:00
Ward Fisher
7a226dd3f1 Merging the win_netcdf branch into the trunk. 2012-09-27 22:50:41 +00:00
Ward Fisher
98675a8047 Merged with latest trunk. 2012-09-26 17:08:23 +00:00
Dennis Heimbigner
578f182968 added check for unlimited dim data being enclosed in {} 2012-09-21 17:56:33 +00:00
Ward Fisher
8e1d238610 2012-09-20 23:26:02 +00:00
Ward Fisher
6e2d236b02 2012-09-19 21:32:28 +00:00
Ward Fisher
59af056da6 2012-09-14 16:15:18 +00:00
Ward Fisher
a1fda0f885 2012-09-13 22:07:35 +00:00
Ward Fisher
8ee802170d 2012-09-11 20:58:47 +00:00
Ward Fisher
a900a4a399 2012-09-11 20:17:24 +00:00
Ward Fisher
d6c7112481 2012-09-11 19:53:47 +00:00
Ward Fisher
e55d002dbc Merged Dennis' changes from trunk. 2012-09-06 21:15:37 +00:00
Dennis Heimbigner
880b5c3f7e fix perf bug in bytebuffer code where setlength was always realloc'ing even when enough space was available 2012-08-30 16:43:34 +00:00
Ward Fisher
9bb179bba1 2012-08-27 21:49:09 +00:00
Ward Fisher
04e61d5894 Added MSVC-compatibility items. 2012-08-27 21:19:25 +00:00
Ward Fisher
8f9120e3a9 Modified to work on Windows 2012-08-20 22:49:53 +00:00
Ward Fisher
e8453be1e5 Merged from trunk into branch 2012-08-20 18:30:04 +00:00
Dennis Heimbigner
5380aa5b67 update utilities: list,byte,hash,uri,log 2012-08-19 21:54:30 +00:00
Ward Fisher
9b3d24cbc0 2012-08-10 21:44:00 +00:00
Ward Fisher
85f6c4cc08 Additional changes in support of CMake, CTest 2012-08-09 22:54:19 +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
1085abab25 Updated ctest-related arguments to explicitely invoke a shell. 2012-08-08 16:25:37 +00:00
Ward Fisher
db0f2425db Added additional tests 2012-08-07 22:42:42 +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
751c41928a Additional CMake changes. 2012-08-03 22:24:29 +00:00
Dennis Heimbigner
faa1c81671 fix a cosmetic issue with config.h 2012-08-01 17:18:58 +00:00
Dennis Heimbigner
42999f4c7c move from oc1.0 to oc2.0; create new dir oc2 2012-07-31 20:34:13 +00:00
Russ Rew
46736d24ab Updated documentation of CDL byte constants to lessen confusion
with char constants.  Update version to 4.2.1.  Make minor changes to
RELEASE_NOTES.
2012-07-17 20:00:14 +00:00
Ward Fisher
d1b159bfa1 Modified Makefile.am scripts to run tests when working with
Windows DLLs.
2012-05-23 20:27:34 +00:00
Dennis Heimbigner
b47d95b121 fix valgrind error 2012-05-07 16:41:01 +00:00
Dennis Heimbigner
e42d7d7f61 fix bug in opaque parsing 2012-05-05 22:31:24 +00:00
Dennis Heimbigner
766b45b459 fix discovered bug in opaque data handling 2012-05-04 19:22:30 +00:00
Dennis Heimbigner
c39c006039 fix fill bug (re: WJF-305473) 2012-05-04 17:32:14 +00:00
Russ Rew
b569613737 Fixed // style comments, for IBM XL C/C++ for AIX V10.1 compiler. 2012-04-25 16:29:59 +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
f5bd3bf525 cleanup and remove unused code 2012-04-01 20:15:06 +00:00
Dennis Heimbigner
7e27052f87 - Implemented diskless files for both netcdf classic and extended.
The in-memory files can be made persistent if nc_create is called with
  NC_DISKLESS|NC_WRITE flags set. Initial test case also included.
- Modified ncio mechanism to support
  multiple ncio packages; this is so we
  can have posixio and memio operating
  at the same time.
- cleanup up a bunch of lint issues (unused variables, etc).
2012-03-26 01:34:32 +00: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
Russ Rew
486509242f Fix ncgen -b documentation to match implemented behavior 2012-03-12 18:21:32 +00:00
Dennis Heimbigner
2349c62d18 close Jira NCF-154 2012-03-07 23:38:51 +00:00
Dennis Heimbigner
629f712c77 fix bug in ncgen -lc handling of single character vars 2012-02-29 18:54:11 +00:00
Dennis Heimbigner
4f06e22b9a draft attempt at fixing the fill problem 2012-02-17 18:51:02 +00:00
Dennis Heimbigner
a62c00b4bf draft attempt at fixing the fill problem 2012-02-17 18:50:25 +00:00
Dennis Heimbigner
7e63849e03 added some notes about attributes 2012-02-15 22:33:28 +00:00
Dennis Heimbigner
ea1af11655 Resolve Lynton's vlen problems (partially) re: jira NCF-145 2012-02-14 00:25:32 +00:00
Dennis Heimbigner
aebd11348a 1)Integrate the oc with improved performance 2012-01-29 18:56:29 +00:00
Dennis Heimbigner
702dfea21c make note about ISO-8859-1 in ncgen.l 2012-01-27 03:17:03 +00:00
Dennis Heimbigner
b3edfbc2d0 typo in ncgen.y 2012-01-16 01:29:19 +00:00
Dennis Heimbigner
599f35d2e6 fix appel problems with data lists 2012-01-09 18:39:37 +00:00
Dennis Heimbigner
b7f74c9cb4 Moved Jira release notes into RELEASE_NOTES 2011-12-12 23:49:27 +00:00
Dennis Heimbigner
efd9808b0a completely rewritten constraint system 2011-11-14 04:20:19 +00:00
Ed Hartnett
9e30d5d3be some windows changes 2011-10-26 19:18:09 +00:00
Ed Hartnett
7b47adf3a1 removed executable permissions from all code files 2011-10-04 16:05:11 +00:00
Dennis Heimbigner
12d4f46668 2011-09-18 20:57:51 +00:00
Dennis Heimbigner
d7790e7e7e 2011-09-16 18:36:08 +00:00
Dennis Heimbigner
16dee702b7 fix NCF-120 2011-09-15 16:57:16 +00:00