Skip to content

Commit ba366c1

Browse files
authored
Merge pull request #3268 from edhartnett/ejh_more_docs
fix docs in libhdf4, libhdf5, and libsrcp
2 parents 68c36e8 + aea6964 commit ba366c1

File tree

16 files changed

+814
-89
lines changed

16 files changed

+814
-89
lines changed

libdispatch/dvar.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* @file
55
* Functions for defining and inquiring about variables. @note The
66
* order of functions in this file affects the doxygen documentation.
7+
*
8+
* @author Dennis Heimbigner, Edward Hartnett
79
*/
810

911
#include "config.h"
@@ -739,7 +741,7 @@ nc_def_var_chunking(int ncid, int varid, int storage, const size_t *chunksizesp)
739741
/**
740742
Define endianness of a variable.
741743
742-
With this function the endianness (i.e. order of bits in integers) can
744+
With this function the endianness (i.e. order of bytes in integers) can
743745
be changed on a per-variable basis. By default, the endianness is the
744746
same as the default endianness of the platform. But with
745747
nc_def_var_endianness the endianness can be explicitly set for a

libhdf4/hdf4file.c

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ hdf4_rec_grp_del(NC_GRP_INFO_T *grp)
8282
* See http://www.hdfgroup.org/training/HDFtraining/UsersGuide/Fundmtls.fm3.html
8383
* for more information re: HDF4 types.
8484
*
85-
* @param h5 Pointer to HDF5 file info struct.
85+
* @param h5 Pointer to file info struct.
8686
* @param hdf4_typeid Type ID for hdf4 datatype.
8787
* @param xtype Pointer that gets netcdf type. Ignored if NULL.
88-
* @param endniannessp Pointer that gets endianness. Ignored if NULL.
88+
* @param endiannessp Pointer that gets endianness. Ignored if NULL.
8989
* @param type_sizep Pointer that gets type size. Ignored if NULL.
9090
* @param type_name Pointer that gets the type name. Ignored if NULL.
9191
*
@@ -251,9 +251,9 @@ nc4_set_var_type(nc_type xtype, int endianness, size_t type_size, char *type_nam
251251
}
252252

253253
/**
254-
* @internal Read an attribute from a HDF4 file.
254+
* @internal Read an attribute from an HDF4 file.
255255
*
256-
* @param h5 Pointer to the file metadata struct.
256+
* @param h5 Pointer to the file info struct.
257257
* @param var Pointer to variable metadata struct or NULL for global
258258
* attributes.
259259
* @param a Index of attribute to read.
@@ -327,12 +327,11 @@ hdf4_read_att(NC_FILE_INFO_T *h5, NC_VAR_INFO_T *var, int a)
327327
}
328328

329329
/**
330-
* @internal Read a HDF4 dimension. As new dimensions are found, add
330+
* @internal Read an HDF4 dimension. As new dimensions are found, add
331331
* them to the metadata list of dimensions.
332332
*
333-
* @param h5 Pointer to the file metadata struct.
334-
* @param var Pointer to variable metadata struct or NULL for global
335-
* attributes.
333+
* @param h5 Pointer to the file info struct.
334+
* @param var Pointer to variable metadata struct.
336335
* @param rec_dim_len Actual length of first dim for this SD.
337336
* @param d Dimension index for this SD.
338337
*
@@ -391,11 +390,18 @@ hdf4_read_dim(NC_FILE_INFO_T *h5, NC_VAR_INFO_T *var, int rec_dim_len, int d)
391390
}
392391

393392
/**
394-
* @internal Create a new variable and insert int relevant lists
393+
* @internal Create a new variable and insert into relevant lists.
395394
*
396-
* @param grp the containing group
397-
* @param name the name for the new variable
398-
* @param ndims the rank of the new variable
395+
* @param grp The containing group.
396+
* @param name The name for the new variable.
397+
* @param ndims The rank of the new variable.
398+
* @param xtype The netCDF type of the variable.
399+
* @param endianness The endianness of the data.
400+
* @param type_size The size in bytes of one element of this type.
401+
* @param type_name A name for the type.
402+
* @param fill_value Pointer to fill value, or NULL.
403+
* @param contiguous Non-zero for contiguous storage, zero for chunked.
404+
* @param chunksizes Array of chunk sizes, or NULL.
399405
* @param format_var_info Pointer to format-specific var info struct.
400406
* @param var Pointer in which to return a pointer to the new var.
401407
*
@@ -424,7 +430,7 @@ nc4_var_list_add_full(NC_GRP_INFO_T* grp, const char* name, int ndims, nc_type x
424430
if ((retval = nc4_set_var_type(xtype, endianness, type_size, type_name,
425431
&(*var)->type_info)))
426432
return retval;
427-
/* Propate the endianness to the variable */
433+
/* Propagate the endianness to the variable */
428434
(*var)->endianness = (*var)->type_info->endianness;
429435

430436
(*var)->type_info->rc++;
@@ -456,10 +462,10 @@ nc4_var_list_add_full(NC_GRP_INFO_T* grp, const char* name, int ndims, nc_type x
456462
}
457463

458464
/**
459-
* @internal Read a HDF4 variable, including its associated dimensions
465+
* @internal Read an HDF4 variable, including its associated dimensions
460466
* and attributes.
461467
*
462-
* @param h5 Pointer to the file metadata struct.
468+
* @param h5 Pointer to the file info struct.
463469
* @param v Index of variable to read.
464470
*
465471
* @return ::NC_NOERR No error.
@@ -594,8 +600,8 @@ hdf4_read_var(NC_FILE_INFO_T *h5, int v)
594600
* @param parameters pointer to struct holding extra data (e.g. for
595601
* parallel I/O) layer. Ignored if NULL. Ignored by this function.
596602
* @param dispatch Pointer to the dispatch table for this file.
597-
* @param nc_file Pointer to an instance of NC. The ncid has already
598-
* been assigned, and is in nc_file->ext_ncid.
603+
* Ignored by this function.
604+
* @param ncid The already-assigned ncid for this file.
599605
*
600606
* @return ::NC_NOERR No error.
601607
* @return ::NC_EINVAL Invalid input.

libhdf4/hdf4func.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/* Copyright 2018, UCAR/Unidata See netcdf/COPYRIGHT file for copying
22
* and redistribution conditions.*/
33
/**
4-
* @file @internal HDF4 functions.
4+
* @file
5+
* @internal HDF4 functions.
56
*
67
* @author Ed Hartnett
78
*/

libhdf4/hdf4var.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/* Copyright 2018, UCAR/Unidata See netcdf/COPYRIGHT file for copying
22
* and redistribution conditions.*/
33
/**
4-
* @file @internal This file handles the variable functions for the
4+
* @file
5+
* @internal This file handles the variable functions for the
56
* HDF4 dispatch layer.
67
*
78
* @author Ed Hartnett
@@ -14,8 +15,8 @@
1415
#include <mfhdf.h>
1516

1617
/**
17-
* Read an array of values. This is called by nc_get_vara() for
18-
* netCDF-4 files, as well as all the other nc_get_vara_*
18+
* @internal Read an array of values. This is called by nc_get_vara()
19+
* for netCDF-4 files, as well as all the other nc_get_vara_*
1920
* functions. HDF4 files are handled as a special case.
2021
*
2122
* @param ncid File ID.

libhdf5/hdf5attr.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @internal Get the attribute list for either a varid or NC_GLOBAL
1616
*
1717
* @param grp Group
18-
* @param varid Variable ID | NC_BLOGAL
18+
* @param varid Variable ID | NC_GLOBAL
1919
* @param varp Pointer that gets pointer to NC_VAR_INFO_T
2020
* instance. Ignored if NULL.
2121
* @param attlist Pointer that gets pointer to attribute list.
@@ -129,8 +129,7 @@ nc4_get_att_special(NC_FILE_INFO_T* h5, const char* name,
129129
}
130130

131131
/**
132-
* @internal I think all atts should be named the exact same thing, to
133-
* avoid confusion!
132+
* @internal Rename an attribute in a netCDF-4/HDF5 file.
134133
*
135134
* @param ncid File and group ID.
136135
* @param varid Variable ID.

libhdf5/hdf5dim.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
* Research. See the COPYRIGHT file for copying and redistribution
33
* conditions. */
44
/**
5-
* @file @internal This file is part of netcdf-4, a netCDF-like
6-
* interface for HDF5, or a HDF5 backend for netCDF, depending on your
7-
* point of view.
5+
* @file
6+
* @internal This file is part of netcdf-4, a netCDF-like interface
7+
* for HDF5, or a HDF5 backend for netCDF, depending on your point of
8+
* view.
89
*
910
* This file includes the HDF5 code to deal with dimensions.
1011
*
@@ -71,7 +72,7 @@ HDF5_def_dim(int ncid, const char *name, size_t len, int *idp)
7172
return NC_EUNLIMIT;
7273
}
7374
}
74-
/* Must be in define mode for stict nc3. */
75+
/* Must be in define mode for strict nc3. */
7576
if (!(h5->flags & NC_INDEF))
7677
return NC_ENOTINDEFINE;
7778
}
@@ -117,7 +118,7 @@ HDF5_def_dim(int ncid, const char *name, size_t len, int *idp)
117118
/**
118119
* @internal Find out name and len of a dim. For an unlimited
119120
* dimension, the length is the largest length so far written. If the
120-
* name of lenp pointers are NULL, they will be ignored.
121+
* name or lenp pointers are NULL, they will be ignored.
121122
*
122123
* @param ncid File and group ID.
123124
* @param dimid Dimension ID.

libhdf5/hdf5dispatch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Research/Unidata. */
33
/**
44
* @file
5-
* @internal This header file contains prototypes and initialization
6-
* for the HDF5 dispatch layer.
5+
* @internal This file contains the initialization for the HDF5
6+
* dispatch layer.
77
*
88
* @author Ed Hartnett, Dennis Heimbigner
99
*/

libhdf5/hdf5file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ sync_netcdf4_file(NC_FILE_INFO_T *h5)
128128
assert(h5 && h5->format_file_info);
129129
LOG((3, "%s", __func__));
130130

131-
/* End depend mode if needed. (Error checking for classic mode has
131+
/* End define mode if needed. (Error checking for classic mode has
132132
* already happened). */
133133
if (h5->flags & NC_INDEF)
134134
{
@@ -644,7 +644,7 @@ NC4_close(int ncid, void* params)
644644
* @param nvarsp Pointer that gets number of variables.
645645
* @param nattsp Pointer that gets number of global attributes.
646646
* @param unlimdimidp Pointer that gets first unlimited dimension ID,
647-
* or -1 if there are no unlimied dimensions.
647+
* or -1 if there are no unlimited dimensions.
648648
*
649649
* @return ::NC_NOERR No error.
650650
* @author Ed Hartnett

libhdf5/hdf5filter.c

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
* conditions.
44
*/
55
/**
6-
* @file @internal Internal netcdf-4 functions for filters
6+
* @file
7+
* @internal Internal netcdf-4 functions for filters.
78
*
89
* This file contains functions internal to the netcdf4 library. None of
9-
* the functions in this file are exposed in the exetnal API. These
10+
* the functions in this file are exposed in the external API. These
1011
* functions all relate to the manipulation of netcdf-4 filters
1112
*
1213
* @author Dennis Heimbigner
@@ -30,17 +31,7 @@
3031
static int NC4_hdf5_filter_free(struct NC_HDF5_Filter* spec);
3132

3233
/**************************************************/
33-
/**
34-
* @file
35-
* @internal
36-
* Internal netcdf hdf5 filter functions.
37-
*
38-
* This file contains functions internal to the libhdf5 library.
39-
* None of the functions in this file are exposed in the exetnal API. These
40-
* functions all relate to the manipulation of netcdf-4's var->filters list.
41-
*
42-
* @author Dennis Heimbigner
43-
*/
34+
/* Internal netcdf hdf5 filter functions for the var->filters list. */
4435
#ifdef TFILTERS
4536
static void
4637
printfilter1(struct NC_HDF5_Filter* nfs)
@@ -402,7 +393,7 @@ NC4_hdf5_def_var_filter(int ncid, int varid, unsigned int id, size_t nparams,
402393
goto done;
403394
#ifdef USE_PARALLEL
404395
#ifdef HDF5_SUPPORTS_PAR_FILTERS
405-
/* Switch to collective access. HDF5 requires collevtive access
396+
/* Switch to collective access. HDF5 requires collective access
406397
* for filter use with parallel I/O. */
407398
if (h5->parallel)
408399
var->parallel_access = NC_COLLECTIVE;

libhdf5/hdf5grp.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
* Research. See COPYRIGHT file for copying and redistribution
33
* conditions. */
44
/**
5-
* @file @internal This file is part of netcdf-4, a netCDF-like
6-
* interface for HDF5, or a HDF5 backend for netCDF, depending on your
7-
* point of view.
5+
* @file
6+
* @internal This file is part of netcdf-4, a netCDF-like interface
7+
* for HDF5, or a HDF5 backend for netCDF, depending on your point of
8+
* view.
89
*
910
* This file handles HDF5 groups.
1011
*

0 commit comments

Comments
 (0)