Commit Graph

589 Commits

Author SHA1 Message Date
Ward Fisher
c86a7209c7
Merge branch 'master' into big_var_on_32bit 2018-02-04 13:25:14 -07:00
Ward Fisher
27693ba4a3
Merge branch 'master' into nc3-per-var-fill-v2 2018-02-01 11:45:40 -07:00
Ward Fisher
47f61cf8b8
Merge branch 'master' into big_var_on_32bit 2018-01-31 10:42:05 -07:00
Ed Hartnett
06c1a027b5 doc changes only 2018-01-30 11:01:50 -07:00
Dennis Heimbigner
6633932fd4 re: GH Issue https://github.com/Unidata/netcdf-c/issues/806
Incorrect reference to byteswap8 in libdispatch/dfilter.c
Change byteswap8 -> NC_byteswap8.
2018-01-25 13:51:42 -07:00
Wei-keng Liao
cb7aafa805 fix issue 791: validate ncid for classic files 2018-01-25 00:03:19 -06:00
Ward Fisher
d0339c8902 Merge branch 'pr-catchup' into v4.6.0-release-branch 2018-01-24 15:51:24 -06:00
Dennis Heimbigner
3e47f5f300 Rebuilt the filter parameter handling code to use a common
parser everywhere.
2018-01-23 16:00:11 -07:00
Ed Hartnett
da928c1b83 merged 780 2018-01-20 06:05:34 -07:00
Ed Hartnett
ce7041d9a6 merged 765 2018-01-20 06:04:34 -07:00
Ed Hartnett
38c7cddf8f further test development, added documentation for uncommitted user-defined types, fixed check of return value 2018-01-18 06:47:50 -07:00
Dennis Heimbigner
99fccab359 1. Keep up to date by merging master
2. Fixed plugin building (nc_test4/hdf5plugins)
   to be done properly by cmake and automake.
4. Duplicated part of the nc_test4 filter test code
   in examples/C

An incomplete and untested set of hooks exist
for OS-X in nc_test4/findplugins.in. They need testing.
2018-01-16 11:00:09 -07:00
Greg Sjaardema
1b68ca28f7
Eliminate warning from clang compilers.
Eliminate this warning from clang:
```
TPL/netcdf/netcdf-c/libdispatch/ncuri.c:914:31: warning: for loop has empty body [-Wempty-body]
        for(p=sp,q=sp+1;(*p++=*q++););
                                     ^
TPL/netcdf/netcdf-c/libdispatch/ncuri.c:914:31: note: put the semicolon on a separate line to silence this warning
1 warning generated.
```
2018-01-11 10:31:13 -07:00
Greg Sjaardema
cdec707429
Eliminate potential buffer overflow
I realize strncat is being eliminated, but in case the elimination isn't done prior to release, this patch should be applied.
2018-01-11 10:28:18 -07:00
Wei-keng Liao
3278c63776 using NC_GLOBAL in nc_def_var_fill returns error NC_EGLOBAL 2017-12-23 11:33:41 -06:00
Wei-keng Liao
0f4a85b9f2 a clean commit for #383 2017-12-20 20:53:30 -06:00
Ward Fisher
39ce5e6058
Merge branch 'master' into big_var_on_32bit 2017-12-20 18:11:22 -07:00
Ed Hartnett
ea49cc1d3f merged ejh_notbuilt_errors 2017-12-04 13:23:31 -07:00
Ed Hartnett
1153f0f084 merged in branch ejh_cleanup 2017-12-04 13:20:42 -07:00
Ed Hartnett
652f3b1a9c more docs 2017-12-04 13:11:54 -07:00
Ed Hartnett
4de61e21f2 more docs, more cleaning 2017-12-04 12:21:14 -07:00
Ed Hartnett
3514ae9d08 more internal docs 2017-12-03 07:11:51 -07:00
Ed Hartnett
2066232dc0 more tests, more interanl documentation 2017-12-03 06:05:37 -07:00
Ed Hartnett
3e45557157 more docs, more tests, eliminated two unneeded functions 2017-12-01 10:02:40 -07:00
Ed Hartnett
5d11415b83 adding internal documentation 2017-12-01 08:18:49 -07:00
Ed Hartnett
857dda487f fixed two doxygen warnings 2017-11-30 08:45:53 -07:00
Ed Hartnett
46d3bca8f4 removed non-working BUILD_DLL target 2017-11-30 05:40:17 -07:00
Ed Hartnett
34c9248e6f
Merge branch 'master' into ejh_notbuilt_errors 2017-11-28 17:16:56 +00:00
Ward Fisher
7796ecb196
Merge branch 'master' into vc9 2017-11-27 15:03:02 -07:00
Nehal J Wani
1b91bd89d4
Fix build on pre-C99 compilers
- Make sure that the variables are declared at the top of the block.
 - Add fix to enable inline for various compilers
2017-11-26 01:47:54 +05:30
Nehal J Wani
f5e650a669
Use refactored variable names introduced by 773fe807 2017-11-26 01:47:46 +05:30
Dennis Heimbigner
4db4393e69 Begin changing over to use strlcat instead of strncat because
strlcat provides better protection against buffer overflows.

Code is taken from the FreeBSD project source code. Specifically:
https://github.com/freebsd/freebsd/blob/master/lib/libc/string/strlcat.c
License appears to be acceptable, but needs to be checked by e.g. Debian.

Step 1:
1. Add to netcdf-c/include/ncconfigure.h to use our version
   if not already available as determined by HAVE_STRLCAT in config.h.
2. Add the strlcat code to libdispatch/dstring.c
3. Turns out that strlcat was already defined in several places.
   So remove it from:
	ncgen3/genlib.c
	ncdump/dumplib.c
3. Define strlcat extern definition in ncconfigure.h.
4. Modify following directories to use strlcat:
	libdap2 libdap4 ncdap_test dap4_test
   Will do others in subsequent steps.
2017-11-23 10:55:24 -07:00
Ed Hartnett
d64550d3f0
Merge branch 'master' into ejh_notbuilt_errors 2017-11-22 17:14:24 +00:00
Ward Fisher
2ab3e56747 Added error message for new error NC_ENULLPAD. [skip ci] 2017-11-20 17:31:08 -07:00
Ed Hartnett
eecade6af9
Merge branch 'master' into ejh_notbuilt_errors 2017-11-18 21:24:11 +00:00
Ed Hartnett
a9ba19b43c merged in changes from master 2017-11-15 12:57:11 -07:00
Ed Hartnett
241127447c merged in ejh_docs_10 2017-11-15 04:51:10 -07:00
Ed Hartnett
de8ac2f6ee documentation fixes for dvarinq.c 2017-11-15 04:50:28 -07:00
Ed Hartnett
96bdc96831 merged changes from ejh_docs_9 2017-11-15 04:09:46 -07:00
Ed Hartnett
ca45c203c5 added return code documentation for dtype.c and datt.c 2017-11-15 04:08:58 -07:00
Ed Hartnett
3b82328902
Merge branch 'master' into ejh_more_warnings 2017-11-15 03:41:12 -07:00
Ed Hartnett
e928964e9e
Merge branch 'master' into ejh_notbuilt_errors 2017-11-15 03:38:49 -07:00
Ed Hartnett
230eb845c1
Merge branch 'master' into ejh_all_docs 2017-11-15 03:38:27 -07:00
Ed Hartnett
6aa9b38537 merging documentation fixes 2017-11-14 11:53:01 -07:00
Ed Hartnett
0113ddd3b2 merging documentation fixes 2017-11-14 11:49:16 -07:00
Ed Hartnett
ff0b1406fd merging documentation fixes 2017-11-14 11:48:49 -07:00
Ed Hartnett
de87247983 merging documentation fixes 2017-11-14 11:48:08 -07:00
Ed Hartnett
e540b18762 fixed doxygen warnings in dattinq.c 2017-11-14 11:22:48 -07:00
Ed Hartnett
a8d5323083 fixed leak in event of null paramter 2017-11-14 09:34:26 -07:00
Ed Hartnett
98fbd794f2 fixed doxygen warnings by adding docs 2017-11-14 06:48:38 -07:00
Ward Fisher
16d6f94f30 Merge branch 'master' into filters.dmh 2017-11-13 11:15:02 -07:00
Ed Hartnett
03753c0344 now return NC_ENOTBUILT for not built library features 2017-11-13 08:09:15 -07:00
Ed Hartnett
317e1e7ee6 fixed doxygen warnings for this file 2017-11-13 06:27:05 -07:00
Ed Hartnett
e7f4195888 documentation note of memory issues in nc_inq_var_fill() 2017-11-13 04:00:56 -07:00
Wei-keng Liao
e9d222c5d3 replace MPI_File_seek and MPI_File_read with MPI_File_read_at_all 2017-11-11 18:33:39 -06:00
Wei-keng Liao
28aec9e333 use off_t as type long is 4bytes on 32bit machines, and include unistd.h to call lseek() to get file size 2017-11-11 13:44:44 -06:00
Ed Hartnett
6d31b47543
Merge branch 'master' into ejh_more_warnings 2017-11-10 02:52:46 -07:00
Ed Hartnett
a416f3ebe5
Merge branch 'master' into ejh_more_docs_2 2017-11-10 02:42:37 -07:00
Ward Fisher
a9dde277d7 Merge branch 'ejh_enum_mem_fix' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into more_ejh_pulls 2017-11-09 16:11:17 -07:00
Ed Hartnett
93cb051b72 found a few more easy warnings 2017-11-09 06:39:43 -07:00
Ed Hartnett
0e0482bc05 fixed warnings 2017-11-09 06:24:18 -07:00
Ed Hartnett
fcef323154 fixed warning in dfile.c 2017-11-09 05:58:15 -07:00
Dennis Heimbigner
3074cc7824 re: esupport AVS-567793
Some parameters like stringlength actually affect a dimension
named maxStrlen.  So, add some aliasing so maxstrlen can be
specified as a parameter and as an alias for stringlength.

The affected parameters (case insensitive):
stringlength has alias maxstrlen
stringlength_<varname> has alias maxstrlen_<varname>

Also:
1. added a test case in ncdap_test/testurl.sh
2. added note to documentation
2017-11-08 19:02:13 -07:00
Ed Hartnett
6252d25866 add docs for nc_create_par() and other functions 2017-11-08 03:05:22 -07:00
Ed Hartnett
3f6f87cf0f
Merge branch 'master' into ejh_v2_docs 2017-11-07 18:35:29 -07:00
Ed Hartnett
a72d5b4d16
Merge branch 'master' into ejh_enum_mem_fix 2017-11-07 18:34:55 -07:00
Ward Fisher
0d604c856b Merge branch 'ejh_doc_fixes' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into more_ejh_pulls 2017-11-07 14:41:20 -07:00
Ed Hartnett
2bdd82d7e5
Merge branch 'master' into ejh_docs_2 2017-11-06 03:01:07 -07:00
Ed Hartnett
6cb26677ea
Merge branch 'master' into ejh_doc_fixes 2017-11-06 03:00:53 -07:00
Ed Hartnett
d50dec5cb6
Merge branch 'master' into ejh_enum_mem_fix 2017-11-06 03:00:22 -07:00
Ed Hartnett
48c6d544e9
Merge branch 'master' into ejh_docs_2 2017-11-05 10:09:27 -07:00
Ed Hartnett
f8fff013bf
Merge branch 'master' into ejh_doc_fixes 2017-11-05 10:08:55 -07:00
Ed Hartnett
eefff9cb12
Merge branch 'master' into ejh_v2_docs 2017-11-03 19:45:45 -06:00
Ed Hartnett
7872785cf0
Merge branch 'master' into ejh_enum_mem_fix 2017-11-03 19:44:40 -06:00
Ward Fisher
bb2505cf4e
Merge branch 'master' into newrc.dmh 2017-11-03 14:57:27 -06:00
Ward Fisher
f98635be1b Merge remote-tracking branch 'origin/h5offset.dmh' into dmh_multi_merge 2017-11-03 12:40:52 -06:00
Ed Hartnett
3fbbe847d8 added v2 documentation 2017-11-03 11:58:22 -06:00
Ed Hartnett
7c9a91d2d0 added missing documentation for public functions in dvars.c 2017-11-03 07:47:02 -06:00
Ed Hartnett
4165493ce4
Merge branch 'master' into ejh_doc_fixes 2017-11-03 06:29:20 -06:00
Ed Hartnett
b28aaab6d7 documentation for nc_par_var_access() and nc_open_par() 2017-11-02 12:57:16 -06:00
Ward Fisher
0b5503d8ac jMerge branch 'master' of https://github.com/gsjaardema/netcdf-c into multi-merge 2017-11-02 11:20:21 -06:00
Ed Hartnett
425ca7365c added error code message for NC_EMPI 2017-11-02 05:07:31 -06:00
Ed Hartnett
406e979fb4 fixed tst_enums memory issue 2017-11-01 04:31:12 -06:00
Ward Fisher
2987fb0bed
Merge branch 'master' into master 2017-10-31 14:01:08 -06:00
Ed Hartnett
44ded96029 fix for leaks in nc_create 2017-10-31 11:37:30 -06:00
Dennis Heimbigner
2d77e6451b Master merge 2017-10-28 14:06:39 -06:00
Dennis Heimbigner
9935d54fdf Merge master and resolve conflicts 2017-10-28 13:57:23 -06:00
Dennis Heimbigner
261ed4c99d Merge branch 'master' into h5offset.dmh 2017-10-27 12:33:17 -06:00
Ed Hartnett
36940e2ea4 fixed memory leaks in nc_open() 2017-10-26 14:19:48 -06:00
Dennis Heimbigner
9983b9d911 re e-support UBS-599337
re pull request https://github.com/Unidata/netcdf-c/pull/405
re pull request https://github.com/Unidata/netcdf-c/pull/446

Notes:
1. This branch is a cleanup of the magic.dmh branch.
2. magic.dmh was originally merged, but caused problems with parallel IO.
   It was re-issued as pull request https://github.com/Unidata/netcdf-c/pull/446.
3. This branch + pull request replace any previous pull requests and magic.dmh branch.

Given an otherwise valid netCDF file that has a corrupted header,
the netcdf library currently crashes. Instead, it should return
NC_ENOTNC.

Additionally, the NC_check_file_type code does not do the
forward search required by hdf5 files. It currently only looks
at file position 0 instead of 512, 1024, 2048,... Also, it turns
out that the HDF4 magic number is assumed to always be at the
beginning of the file (unlike HDF5).
The change is localized to libdispatch/dfile.c See
https://support.hdfgroup.org/release4/doc/DSpec_html/DS.pdf

Also, it turns out that the code in NC_check_file_type is duplicated
(mostly) in the function libsrc4/nc4file.c#nc_check_for_hdf.

This branch does the following.
1. Make NC_check_file_type return NC_ENOTNC instead of crashing.
2. Remove nc_check_for_hdf and centralize all file format checking
   NC_check_file_type.
3. Add proper forward search for HDF5 files (but not HDF4 files)
   to look for the magic number at offsets of 0, 512, 1024...
4. Add test tst_hdf5_offset.sh. This tests that hdf5 files with
   an offset are properly recognized. It does so by prefixing
   a legal file with some number of zero bytes: 512, 1024, etc.
5. Off-topic: Added -N flag to ncdump to force a specific output dataset name.
2017-10-24 16:25:09 -06:00
Ed Hartnett
a7d29db7b5 fixed memory leak in nc_open when cmode includes both NC_MPIIO and NC_MPIPOSIX 2017-10-24 09:46:08 -06:00
Dennis Heimbigner
440cf724ad Update by merging with master 2017-10-21 13:37:09 -06:00
Ward Fisher
98c169aa9a Merge branch 'patch-1' of https://github.com/gsjaardema/netcdf-c into par-hang-fix 2017-10-16 11:01:24 -06:00
Dennis Heimbigner
2f750fe5f0 Merge branch 'master' into filters.dmh 2017-10-10 16:37:41 -06:00
Dennis Heimbigner
111248e067 Changed to make little-endian the standard for 64-bit parameters 2017-10-10 11:21:01 -06:00
Ward Fisher
e8cd6958a9 Merge branch 'v4.5.0-release-branch' into cal366.dmh 2017-10-09 14:08:21 -06:00
Dennis Heimbigner
8fe67b79e6 forgot to add dfilter.c to git 2017-10-08 16:37:42 -06:00
Dennis Heimbigner
733da154c5 1. Keep up to date by merging master
2. Factored out the parameter string parsing for ncgen and nccopy
   int libdispatch/dfilter.c + include/ncfilter.h
3. Allow a parameter string to use constant types other than
   unsigned int. See docs/filters.md for details.
4. Moved the old content of  include/netcdf_filter.h into include/netcdf.h
   and removed include/netcdf_filter.h as no longer needed.
5. Force the test filter (bzip2) in nc_test4/filter_test to
   be built using BUILT_SOURCES.
2017-10-08 15:56:45 -06:00
Ward Fisher
5842ba1a95 Reverting global fillvalue behavior. 2017-10-05 18:15:27 -06:00
Dennis Heimbigner
c05c0a69e2 Update docs/internal.dox to
provide a more accurate description
of how to add a new dispatch table.
Also remove dispatch.dox as superfluous.
2017-10-04 13:41:38 -06:00
Ward Fisher
ef372357a0 Merge branch 'master' into cal366.dmh 2017-09-29 15:51:06 -06:00
Greg Sjaardema
9964cee7cd Merge branch 'master' into master 2017-09-26 11:06:04 -06:00
Ward Fisher
6fb871fe34 Merge branch 'master' into patch-1 2017-09-25 13:48:25 -06:00
Ward Fisher
67018ecabb Merge branch 'v4.5.0-release-branch' into netrc.dmh 2017-09-25 13:46:32 -06:00
Ward Fisher
1a56d3fdc8 Making cdf5 tests conditional on cdf5 support setting at configure time. 2017-09-14 14:18:56 -06:00
Ward Fisher
f82bcf9d15 Added USE_CDF5 to dfile.c 2017-09-14 12:38:48 -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
Dennis Heimbigner
3a99220789 Make branch compile under cmake 2017-08-31 15:32:41 -06:00
Dennis Heimbigner
a17fa2ed2a add dutil.c 2017-08-31 14:36:54 -06:00
Dennis Heimbigner
35b97e0454 add dauth.c 2017-08-31 14:36:04 -06:00
Dennis Heimbigner
8e2abdeed8 Initial version 2017-08-31 14:19:56 -06:00
Dennis Heimbigner
61d2b38c8e Final fixes 2017-08-30 19:13:52 -06:00
Dennis Heimbigner
7c592cfb2a 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.
2017-08-30 17:44:57 -06:00
Dennis Heimbigner
15db0f15ea Clarify rc documentation 2017-08-30 12:05:04 -06:00
Dennis Heimbigner
d8d4ed627a master merge 2017-08-29 18:05:46 -06:00
Dennis Heimbigner
80dbc7fb6c Undo DECODE_IDENTIFIER change 2017-08-29 18:01:26 -06:00
Dennis Heimbigner
bc9e41ae2b 1. Fix bug in ocrc.c#combinecredentials where a null user+pwd
generates garbage. This in turn interferes with using .netrc
because the garbage user+pwd can will override the
.netrc. Note that this may work ok sometimes
if the garbage happens to start with a nul character.

2. It turns out that the user:pwd combination needs to support
character escaping. One reason is the user may contain an '@' character.
The other is that modern password rules make it not unlikely that
the password will contain characters that interfere with url parsing.
So, the rule I have implemented is that all occurrences of the user:pwd
format must escape any dodgy characters. The escape format is URL escaping
of the form %XX. This applies both to user:pwd
embedded in a URL as well as the use of HTTP.CREDENTIALS.USERPASSWORD
in a .dodsrc/.daprc file. The user and password in .netrc must not
be escaped. This is now documented in docs/auth.md

The fix for #2 actually obviated #1. Now, internally, the user and pwd
are stored separately and not in the user:pwd format. They are combined
(and escaped) only when needed.
2017-08-29 14:11:15 -06:00
Dennis Heimbigner
ed44fd7306 Add szip support via libaec 2017-08-27 13:35:20 -06:00
Ward Fisher
cfb6549606 Corrected an issue reported by clang. 2017-08-15 12:03:15 -06:00
Dennis Heimbigner
86fc8745dc merge master and resolve conflicts 2017-08-12 15:50:31 -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
Greg Sjaardema
a07938194e Move nels==0 check instead of eliminating
The previous change where the `nels==0` check was removed caused problems with nc_test.  
If the check is moved after the `NC_put_vara` call, then it will avoid the parallel hang problem for stride=1, but will still pass all tests in `nc_test`.  Note that this is somewhat of a kluge since there will still be a parallel hang if nels==0 and stride is > 1 and the code falls into the odometer section.
2017-08-02 11:12:04 -06:00
Greg Sjaardema
6f38a0e7cb Fix problem with hangs in parallel collective output
See description in #447
2017-08-01 15:38:21 -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
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
Greg Sjaardema
1503013e33 Eliminate NC_MAX_VARS|DIMS|ATTRS limits 2017-07-20 09:32: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
Dennis Heimbigner
c834d4af12 merge from master 2017-05-10 12:33:03 -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
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
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