Skip to content

documentation issues in liblib and examples #3275

@edhartnett

Description

@edhartnett

Several doxygen documentation issues were found and fixed in liblib/nc_initialize.c and the C example programs under examples/C/.

liblib/nc_initialize.c

  • Missing @file doxygen block — doxygen couldn't associate the file with its contents.
  • nc_initialize() and nc_finalize() doc comments were internal-facing maintenance notes ("if you modify the format of NC_Dispatch, then you need to fix it everywhere") rather than user-facing API documentation. Replaced with descriptions of what the functions do, @return, and @see cross-references.
  • Added a comment explaining the relationship between NETCDF_ENABLE_DAP, NETCDF_ENABLE_DAP2, and NETCDF_ENABLE_DAP4 macros, since the extern declarations and call sites use different guards.

examples/C — old-style doxygen headers

Six files used the old /*! \file doxygen syntax with bare copyright blocks and no @author tags. These were modernized to the /** @file style with descriptions and @author tags:

  • simple_xy_wr.c
  • simple.c
  • file.c
  • large_files.c
  • met4D.c
  • filter_example.c

examples/C — broken \ref copyright references

Four files referenced \ref copyright, which produces a doxygen warning unless a matching anchor exists. Replaced with plain text "See COPYRIGHT file for conditions of use":

  • simple.c
  • file.c
  • large_files.c
  • met4D.c

examples/C — missing @file block

  • parallel_vara.c had no doxygen block at all. Added @file with description and @author.

examples/C — wrong description

  • simple_xy_rd.c described itself as "Write a file demonstrating some of the features of netCDF-4" but it actually reads a simple classic netCDF file. Fixed to "Read a simple 2D netCDF file."

examples/C — duplicate #define UNITS

  • pres_temp_4D_wr.c and pres_temp_4D_rd.c both had #define UNITS "units" defined twice (lines 38 and 49 in the writer, lines 41 and 52 in the reader). Removed the duplicates.

examples/C — @defgroup tutorial missing description

  • pres_temp_4D_wr.c had @defgroup tutorial Tutorial Examples with the group description running into the file description. Added a blank line to separate them.

examples/C — typo

  • filter_example.c line 124: "Storate" → "Storage".

examples/C — @author name

  • All files attributed to Ed Hartnett were updated to use the full name "Edward Hartnett".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions