Commit Graph

23 Commits

Author SHA1 Message Date
Dennis Heimbigner
75c551f53d bug fix in dwinpath 2017-07-15 13:03:35 -06:00
Dennis Heimbigner
715a6fe5eb The files libdispatch/dwinpath.c and include/ncwinpath.h
were added to provide a path name converter from e.g. cygwin
paths to e.g. windows paths. This is necessary because
the shell scripts may produce cygwin paths, but the code
may have been compiled with Visual Studio. Similar issues
arise with Mingw.

At appropriate places, and if using Visual Studio or Mingw,
I added calls to the path conversion code.
Apparently I forgot to find all the places where this
conversion was needed. So this pr does the following:
1. Push the calls to the converter to the various libXXX
   directories and out of libdispatch/dfile.c.
2. Add conversion calls to other parts of the code like oc2.

I also turns out that conversion code in dapcvt.c
had a bug when handling DAP Byte type under visual studio.

Notes:
1. there may still be places I missed that need to do path conversion.
2. need to make sure that calls to e.g. H5open also use converted path.
2017-07-13 10:40:07 -06:00
Dennis Heimbigner
30846cfff1 Cmake 2017-06-06 16:21:04 -06:00
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
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
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
96bd037560 re: https://github.com/Unidata/netcdf-c/issues/365
Following command fails under visual studio.
    ncdump -h http://thredds.ucar.edu/thredds/dodsC/nexrad/composite/gini/n0r/1km/20170216/Level3_Composite_n0r_1km_20170216_1635.gini

The problem is that sscanf for windows does not appear to support
scanning 8bit integers: it appears to only allow scanning of characters.

Solution:
Scan the input as an integer (for type Byte) or unsigned int (for type UByte)
and then recast the result as a char or unsigned char.

Primary code fix is in libdap2/dapcvt.c#dapcvtattrval
2017-02-19 21:41:51 -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
Dennis Heimbigner
b4dc1dca19 More cmake fixes 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
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
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
dmh
47e10591b4 ckp 2015-11-19 13:44:55 -07: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
859f105005 merge-squash 2015-08-15 16:26:35 -06:00
dmh
d2a832163b Make cmake run testauth.sh 2014-12-31 22:53:03 -07:00
dmh
20720199c8 1. synch with oc
2. fix ocuri parameter handling
3. add ncdap_test/testuri.sh to test parameter handling.
2014-12-27 20:42:01 -07: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