Commit Graph

144 Commits

Author SHA1 Message Date
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