Commit Graph

364 Commits

Author SHA1 Message Date
Ward Fisher
cfb6549606 Corrected an issue reported by clang. 2017-08-15 12:03:15 -06:00
Ward Fisher
8ab714f1d8 Corrected a missing endif. 2017-08-07 10:23:15 -06:00
Ward Fisher
05d3d7e9f5 Merge remote-tracking branch 'origin/d4tempfile.dmh' into v4.5.0-release-branch 2017-08-07 10:12:36 -06:00
Dennis Heimbigner
4d8fbbf501 If DAP (2 or 4) is enabled, but diskless is disabled, then the
dap code will create a real temporary file in which to store the
converted metadata for the DAP .dds or .dmr.

It was assumed that the nc_close code would reclaim the
temporary file. For DAP2, reclamation occurs in the ncio
code. For DAP4, it was assumed that the libsrc4 code would do
the reclamation, but for whatever reason, this is not happening.
Thus, in this situation, a temporary file is left in the file
system. Aside from being irritating to users, this screws up
'make distcheck'.

So the DAP4 code is fixed to ensure that the temporary file is
properly reclaimed independent of the libsrc4 code.
2017-08-05 22:41:31 -06:00
Ward Fisher
9e7a902dcf Merge branch 'issue435.dmh' into multi-pull 2017-07-27 12:20:11 -06:00
Dennis Heimbigner
07d67e737a 1. Cleaned up some holdover debug code.
2. modified ncdap_tests to remove <cr>
   from generated output before comparison
   to expected. This is a hack because
   my other attempts to force windows to use
   binary mode have not worked.
2017-07-25 14:58:29 -06:00
Dennis Heimbigner
75c551f53d bug fix in dwinpath 2017-07-15 13:03:35 -06:00
Dennis Heimbigner
1b138ecf64 more debug info 2017-07-14 19:37: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
d1544b8ad9 Error in ncuri in handling user:pwd@ in url 2017-07-05 14:39:23 -06:00
Dennis Heimbigner
9cde91687a re: pull request https://github.com/Unidata/netcdf-c/pull/364
This is a follow-on in that the old utf8 code was still being
used in ncgen to convert utf8->utf16 when converting cdl to Java
(see genj.c).

The new code apparently has no utf16 support, but it does have
utf32 support. Converting utf32 -> utf16 can be approximated by
truncating the 32bits to 16 bits, unless the top 16 bits are
not zero. This latter condition is unlikely to be common because
it implies use of some rather obscure characters.

So solution is to convert to utf32 and truncate to 16 bits to
get utf16. An error is reported if the high-order truncated 16
bits are not zero. If we get complaints, then I will figure out
how to convert full utf32 to a utf16 pair.

Other changes:
1. removed the old code from ncgen.
2. changed UTF8PROC_DLLEXPORT (in utf8proc) to EXTERNL
   and added appropriate includes. This should fix
   issue https://github.com/Unidata/netcdf-c/issues/404,
   but since we cannot duplicate the failure, I am not quite
   sure.
2017-06-18 21:06:19 -06:00
Dennis Heimbigner
8f2f9b74e3 re: pull request https://github.com/Unidata/netcdf-c/pull/364
This is a follow-on in that the old utf8 code was still being
used in ncgen to convert utf8->utf16 when converting cdl to Java
(see genj.c).

The new code apparently has no utf16 support, but it does have
utf32 support. Converting utf32 -> utf16 can be approximated by
truncating the 32bits to 16 bits, unless the top 16 bits are
not zero. This latter condition is unlikely to be common because
it implies use of some rather obscure characters.

So solution is to convert to utf32 and truncate to 16 bits to
get utf16. An error is reported if the high-order truncated 16
bits are not zero. If we get complaints, then I will figure out
how to convert full utf32 to a utf16 pair.

Also removed the old code from ncgen.
2017-06-06 15:23:59 -06:00
Ward Fisher
68f5e3a2d6 No idea how this was possibly working, previously. 2017-05-23 16:55:29 -06:00
Ward Fisher
42ba263377 Corrected an else statement. 2017-05-12 15:49:41 -06:00
Alexander Mohr
23c14bd667 Merge branch 'master' into nc_open_mem_fix 2017-05-01 16:12:13 -07:00
Alexander Mohr
90609f60ab fix typo 2017-04-27 22:38:18 -07:00
Alexander Mohr
674d212e6b fix nc_open_mem 2017-04-27 22:26:19 -07: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
Dennis Heimbigner
d98769a98f ckp 2017-04-11 17:09:58 -06:00
Dennis Heimbigner
83a4c42bc0 ckp 2017-04-11 16:16:29 -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
Ward Fisher
b5b99cbebb Merge branch 'master' into ghpull-375 2017-04-05 16:24:55 -06:00
Ward Fisher
6627d7299d Merge branch 'master' into dap4.dmh 2017-04-05 15:38:23 -06:00
Ward Fisher
6bf5a38d90 Corrected an issue with autotools and OSX and utf8. 2017-04-05 11:14:42 -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
5f15c9e777 1) master merge 2)fix uname -o problem 2017-03-30 16:21:31 -06:00
Wei-keng Liao
f7f8a0ff90 change error code from NC_EINVAL to NC_EGLOBAL when trying to set global _FillValue 2017-03-25 14:47:25 -05:00
Wei-keng Liao
0ff3616b01 NC_EINVAL should be returned when trying to set attribute _FillValue for global variable 2017-03-25 13:59:39 -05:00
Wei-keng Liao
08aef9af5d remove special treatments for arm architecture 2017-03-11 13:33:58 -06: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
6ebfea6730 Refactored additional constants. 2017-02-28 11:15:51 -07:00
Ward Fisher
aca2589061 Updated utf8proc_data.c 2017-02-28 11:14:08 -07:00
Ward Fisher
773fe80727 Refactored some data types due to collision. 2017-02-28 11:12:00 -07:00
Ward Fisher
5883b6587f Additional utf8 refactoring to avoid name collisions. 2017-02-28 11:05:45 -07:00
Ward Fisher
2def20ccfd More refactoring 2017-02-28 10:46:15 -07:00
Ward Fisher
f20228def5 Refactoring utf8 2017-02-28 10:36:46 -07:00
Ward Fisher
da28564469 Updated for Visual Studio support, in support of https://github.com/Unidata/netcdf-c/pulls/364 2017-02-17 15:38:55 -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
7edb08977a Added platform checks for ARM. 2017-02-03 11:19:39 -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
f19f1cc6c1 Tweaked fix. 2017-01-09 11:57:23 -07:00
Ward Fisher
7d75fd3731 Updated code, location of variable declarations in support of https://github.com/Unidata/netcdf-c/issues/304 2017-01-09 11:37:35 -07:00
Wei-keng Liao
2081ae7099 add configure option --enable-relax-coord-bound for issue #243 2016-11-12 23:58:09 -06:00
Wei-keng Liao
dbb9be59d2 temporally disable __arm__ for testing 2016-10-09 22:21:32 -05:00
Ward Fisher
327c19499c Removed reference to an obsolete error code. 2016-10-03 12:36:15 -06:00
Ward Fisher
60399ede49 Added an example for nc_inq_var_chunking 2016-10-03 11:20:35 -06:00
Ward Fisher
ba21beb3b5 Brought over rest of old documentation for nc_def_var_chunking in support of https://github.com/Unidata/netcdf-c/issues/318 2016-09-30 16:35:16 -06:00
Ward Fisher
5b8756d0b2 Updating documentation for nc_def_var_chunking, in support of https://github.com/Unidata/netcdf-c/issues/318 2016-09-30 15:55:43 -06:00