Commit Graph

193 Commits

Author SHA1 Message Date
Dennis Heimbigner
dc9e31df68 Fix for github issue https://github.com/Unidata/netcdf-c/issues/310.
The problem was that for opendap, it is possible to use keywords
as identifiers
 when there is no ambiguity. However, the DAP2
parser lost the case of the identifier used the lower case version.
Fix is to use the actual text of the symbol when it is used as an identifier.
Also added a test case for this (kwcase.*).

Additionally cleaned up some misc. dap2 testing problems.
1. ncdap_test/tst_ncdap3.sh was using an empty test set.
   restored the testing of datasets.
2. as a consequence of #1, some tests needed to be updated with minor
   tweeks.
3. fix dapmerge to handle multiple DODS_EXTRAS attributes.
4. modify buildattribute to suppress nul characters and terminate
   the name at the first nul.
5. clean up various test scripts to remove residual, unused
   references to obsolete netcdf-4 translation.
6. export e.g. NCDUMP from test_common.in so that non-top-level
   shell scripts can access it.
2017-06-28 13:51:01 -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
031ae14842 upgrade new oc files to nclist/ncbytes 2017-03-17 17:20:02 -06:00
Dennis Heimbigner
be6e1b65dc Fix conflicts with master 2017-03-17 14:58:38 -06:00
Dennis Heimbigner
3213705205 Re: github issue https://github.com/Unidata/netcdf-c/issues/373
Github issue https://github.com/Unidata/netcdf-c/issues/152
requested that "orphaned" DAS attributes be included in the netcdf
metadata as global variables. The term orphaned here meant that
they were not connected to any variable in the DDS.
This was done in pull request https://github.com/Unidata/netcdf-c/pull/164

However, some servers (e.g. Thredds) include attributes for variables not
specified in a constraint expression, but which exist in the full DDS.
So I was adding these to the set of global attributes, but in retrospect
this should not have been done: they should have been elided.

Solution: modify oc2 code to be more distriminatory about
which orphaned attributes to include.
2017-03-11 16:17:20 -07:00
Dennis Heimbigner
1aab7556cf ckp 2017-03-11 15:20:20 -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
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
Ward Fisher
ad201da5f1 Addressed coverity issue 1256385, potential resource leak. 2016-07-06 15:06:06 -06:00
Ward Fisher
d8e86219b5 Corrected coverity issue 1264401, buffer not null terminated. 2016-07-06 14:49:15 -06:00
Ward Fisher
78b43dbfdb Addressed a memory leak identified by Coverity. See Coverity #1256386 2016-03-11 11:03:01 -07:00
Ward Fisher
f12daedeb3 Corrected a coverity issue with a potential negative argument. Coverity 711780 2016-03-08 13:48:30 -07:00
Robert T. McGibbon
3303ccd519 Fix preprocessor for mingw 2015-12-07 18:08:13 -08: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
Bas Couwenberg
b8e4161baf Fix inconsistent return type. 2015-11-10 00:19:33 +01: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
dmh
0f59785f37 sync with base oc library 2015-10-22 15:34:56 -06:00
dmh
a5c8f7c7e3 synch with base oc 2015-10-21 14:53:30 -06:00
dmh
370bd15166 Github issue 134:
Their is an ambiguity in the DAP2 spec.  Section A.2 of the
dap2 spec says:
  "...The backslash character (.\.) MAY be used as
   a single-character quoting mechanism only within
   quoted-string and comment constructs.
      quoted-pair = "\" CHAR
   ..."
The underlying problem was to allow for " chars inside
strings by using \". However, this definition is overbroad.
It is not stated:
1. if the backslash is to be left in the string or not.
2. There is also an unstated, but related issue of what
   to do about e.g. '\n';convert to newline or not.

This change is to conform to libdap and it does the following:
1. The backslash is left in the string
2. Things like \n are left as is and it is assumed that
   higher level code will decide what to do with e.g. \n.
2015-10-20 15:44:26 -06:00
tbeu
e2820e4d8a Fix common typos
Detected by https://github.com/vlajos/misspell_fixer
2015-08-20 11:42:05 +02:00
dmh
859f105005 merge-squash 2015-08-15 16:26:35 -06:00
xantares
c1b56c3f3a fix mingw build
that code path is common to all win32 platforms: msvc & mingw/cygwin
2015-08-03 23:27:41 +02:00
dmh
29386aae47 Synch with base oc 2015-07-15 16:19:14 -06:00
Ward Fisher
7bb61718bf Corrected a couple of minor issues reported by static analysis. 2015-07-10 15:09:14 -06:00
dmh
830f82138a Merge branch 'master' of http://github.com/Unidata/netcdf-c 2015-07-05 19:26:27 -06:00
dmh
c5fe913d54 re: https://github.com/Unidata/netcdf-c/issues/117
It appears the problem is that synth9 was erroneously
included in testing. It involves a nested sequence which
is not translatable. Not sure why it was still there,
but fix is to suppress the test.
2015-07-05 19:26:01 -06:00
Ward Fisher
5721dd302b Corrected a potential null dereference caused by passing '0' to calloc. 2015-06-17 15:42:45 -06:00
Dennis Heimbigner
0d082d79ea synch oc 2015-05-29 17:31:42 -06:00
Ward Fisher
6ed4770e0a Added a typedef int pid_t for Windows platforms, solves a unix compatibility issue. 2015-05-28 10:14:45 -06:00
dmh
be5e3cd606 1. Allow for the user specified rc file via the env variable
DAPRCFILE.  Note that the value of this environment
   variable should be the absolute path of the rc file, not
   the path to its containing directory.
2. fixup testauth.sh and add some new tests
3. synch oc
2015-05-24 17:31:39 -06:00
Ward Fisher
3d9725f7df Corrected a libcurl issue as reported in https://github.com/Unidata/netcdf-c/issues/110 2015-03-17 12:42:14 -06: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
dmh
88f1ac820c 1. synch with oc lib
2. update to add docs/auth.md
2015-03-02 20:26:39 -07:00
Ward Fisher
e6faf3969c Coverity: 1265325, Pointer comparison with string literal. 2015-02-24 10:14:52 -07:00
Ward Fisher
cc260fc9aa Fixed a minor static-analysis reported warning. 2015-02-23 13:25:35 -07:00
Ward Fisher
473163c41a Corrected a couple of static analysis-detected warnings. 2015-02-10 13:04:37 -07:00
Ward Fisher
c659a0e353 Coverity 1264403, Explicit null dereferenced. 2015-01-20 12:44:28 -07:00
Ward Fisher
30149d5e6e Coverity 1264404, missing break in switch. Logically this appears to not be intentional, will revert if this turns out to be incorrect. 2015-01-20 12:40:25 -07:00
Ward Fisher
9cc5898931 Coverity 1264406; char array being compared against NULL. Replaced with a strlen check for the value. 2015-01-20 12:37:57 -07:00
Ward Fisher
f1dcdde045 Coverity 1264401, Buffer not null terminated. 2015-01-20 11:18:27 -07:00
Ward Fisher
35df3d3c95 Coverity 1264407, out-of-bounds access. 2015-01-20 11:12:51 -07:00
Ward Fisher
75c6670416 Resource Leak, Coverity 1264408 2015-01-20 11:09:03 -07:00
Ward Fisher
cb0cb6f674 Resource leak, Coverity 1264409 2015-01-20 11:04:58 -07:00
Ward Fisher
59f8cf19f1 Corrected resource leak, Coverity 1264412 2015-01-20 10:53:42 -07:00
Ward Fisher
69b6935ca5 Removed OCASSERT sizeof(void*) == sizeof(off_t), to see what repercussions are for other tests on 32-bit machines. 2015-01-16 09:18:39 -07:00
dmh
65f78d6a8b 1. synch with oc
2. replace all occurrences of
   'template' with 'pattern'
   since template is reserved in windows.
2015-01-15 14:19:51 -07:00
Ward Fisher
393db0018e Addressed an issue causing MSVC-based builds to fail. See https://github.com/Unidata/netcdf-c/issues/96 2015-01-13 12:44:28 -07:00
Ward Fisher
8487f28277 Removed a stale (potentially) assertion on Dennis' advice to debug an issue. 2015-01-12 12:09:34 -07:00
Ward Fisher
4ecbbe64d5 Fixed a few issues preventing the build from working on MSVC. 2015-01-12 11:05:45 -07:00