Skip to content

Commit

Permalink
improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Jan 15, 2024
1 parent d0d45e0 commit 76d466d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/g2_free.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/**
* @file
* @brief Free up memory that was allocated for struct gribfield.
* @brief Free up memory that was allocated for struct ::gribfield.
* @author Stephen Gilbeert @date 2002-10-28
*/

#include <stdlib.h>
#include "grib2_int.h"

/**
* Free memory that was allocated for struct gribfield.
* Free memory that was allocated for struct ::gribfield.
*
* @param gfld pointer to gribfield structure (defined in include file
* @param gfld pointer to ::gribfield structure (defined in include file
* grib2.h) returned from routine g2_getfld().
*
* @note This routine must be called to free up memory used by the
Expand Down
11 changes: 6 additions & 5 deletions src/g2_getfld.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
* Return all the metadata, template values, bit-map
* (if applicable), and the unpacked data for a data field.
*
* All of the information returned is stored in a gribfield structure,
* which is defined in file grib2.h. Users of this routine will need
* to include grib2.h in their source code that calls this routine.
* All of the information returned is stored in a ::gribfield
* structure, which is defined in file grib2.h. Users of this routine
* will need to include grib2.h in their source code that calls this
* routine.
*
* Since there can be multiple data fields packed into a GRIB2
* message, the calling routine indicates which field is being
Expand All @@ -40,7 +41,7 @@
* at gridpoints that are bitmapped out. (SEE REMARKS2)
* - 0 do not expand data field, leaving it an array of consecutive
* data points for each "1" in the bitmap.
* @param gfld pointer to structure gribfield containing all decoded
* @param gfld pointer to structure ::gribfield containing all decoded
* data for the data field.
*
* @return
Expand All @@ -62,7 +63,7 @@
* - ::G2_GETFLD_BAD_SEC7 Error unpacking Section 7.
* - ::G2_GETFLD_NO_BITMAP Previous bitmap specified, yet none exists.
*
* @note Struct gribfield is allocated by this routine and it also
* @note Struct ::gribfield is allocated by this routine and it also
* contains pointers to many arrays of data that were allocated during
* decoding. Users are encouraged to free up this memory, when it is
* no longer needed, by an explicit call to routine g2_free().
Expand Down
2 changes: 1 addition & 1 deletion src/g2_miss.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* missing value management is used, and return the missing value(s)
* in the data field.
*
* @param gfld pointer to gribfield structure.
* @param gfld pointer to ::gribfield structure.
* @param rmiss List of the missing values used.
* @param nmiss NUmber of the missing values included in the
* field. rmiss must be allocated in the calling program with enough
Expand Down
2 changes: 1 addition & 1 deletion src/grib2.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ typedef uint64_t g2intu;
typedef float g2float;

/**
* Struct for GRIB field.
* Struct for GRIB2 field.
*/
struct gribfield
{
Expand Down

0 comments on commit 76d466d

Please sign in to comment.