Skip to content

Commit

Permalink
Fixes in C comments to assist different versions of Doxygen.
Browse files Browse the repository at this point in the history
  • Loading branch information
cosinekitty committed Jan 27, 2025
1 parent e0cf670 commit 865d3da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions source/c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4602,7 +4602,7 @@ The [`astro_time_t`](#astro_time_t) type contains `ut` to represent Universal Ti

Both `tt` and `ut` are necessary for performing different astronomical calculations. Indeed, certain calculations (such as rise/set times) require both time scales. See the documentation for the `ut` and `tt` fields for more detailed information.

In cases where `[`astro_time_t`](#astro_time_t)` is included in a structure returned by a function that can fail, the `astro_status_t` field `status` will contain a value other than `ASTRO_SUCCESS`; in that case the `ut` and `tt` will hold `NAN` (not a number). In general, when there is an error code stored in a struct field `status`, the caller should ignore all other values in that structure, including the `ut` and `tt` inside `[`astro_time_t`](#astro_time_t)`.
In cases where [`astro_time_t`](#astro_time_t) is included in a structure returned by a function that can fail, the [`astro_status_t`](#astro_status_t) field `status` will contain a value other than `ASTRO_SUCCESS`; in that case the `ut` and `tt` will hold `NAN` (not a number). In general, when there is an error code stored in a struct field `status`, the caller should ignore all other values in that structure, including the `ut` and `tt` inside `[`astro_time_t`](#astro_time_t)`.

| Type | Member | Description |
| ---- | ------ | ----------- |
Expand Down Expand Up @@ -4730,6 +4730,6 @@ The function [`Astronomy_CorrectLightTravel`](#Astronomy_CorrectLightTravel) sol

The function [`Astronomy_Search`](#Astronomy_Search) numerically solves for the time that a given event occurs. An event is defined as the time when an arbitrary function transitions between having a negative value and a non-negative value. This transition is called an *ascending root*.

The type astro_search_func_t represents such a callback function that accepts a custom `context` pointer and an [`astro_time_t`](#astro_time_t) representing the time to probe. The function returns an [`astro_func_result_t`](#astro_func_result_t) that contains either a real number in `value` or an error code in `status` that aborts the search.
The type [`astro_search_func_t`](#astro_search_func_t) represents such a callback function that accepts a custom `context` pointer and an [`astro_time_t`](#astro_time_t) representing the time to probe. The function returns an [`astro_func_result_t`](#astro_func_result_t) that contains either a real number in `value` or an error code in `status` that aborts the search.

The `context` points to some data whose type varies depending on the callback function. It can contain any auxiliary parameters (other than time) needed to evaluate the function. For example, a function may pertain to a specific celestial body, in which case `context` may point to a value of type astro_body_t. The `context` parameter is supplied by the caller of [`Astronomy_Search`](#Astronomy_Search), which passes it along to every call to the callback function. If the caller of `Astronomy_Search` knows that the callback function does not need a context, it is safe to pass `NULL` as the context pointer.
The `context` points to some data whose type varies depending on the callback function. It can contain any auxiliary parameters (other than time) needed to evaluate the function. For example, a function may pertain to a specific celestial body, in which case `context` may point to a value of type [`astro_body_t`](#astro_body_t). The `context` parameter is supplied by the caller of [`Astronomy_Search`](#Astronomy_Search), which passes it along to every call to the callback function. If the caller of `Astronomy_Search` knows that the callback function does not need a context, it is safe to pass `NULL` as the context pointer.
8 changes: 4 additions & 4 deletions source/c/astronomy.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ astro_status_t;
* Indeed, certain calculations (such as rise/set times) require both time scales.
* See the documentation for the `ut` and `tt` fields for more detailed information.
*
* In cases where `astro_time_t` is included in a structure returned by
* a function that can fail, the `astro_status_t` field `status` will contain a value
* In cases where astro_time_t is included in a structure returned by
* a function that can fail, the #astro_status_t field `status` will contain a value
* other than `ASTRO_SUCCESS`; in that case the `ut` and `tt` will hold `NAN` (not a number).
* In general, when there is an error code stored in a struct field `status`, the
* caller should ignore all other values in that structure, including the `ut` and `tt`
Expand Down Expand Up @@ -613,15 +613,15 @@ astro_func_result_t;
* An event is defined as the time when an arbitrary function transitions between having
* a negative value and a non-negative value. This transition is called an *ascending root*.
*
* The type astro_search_func_t represents such a callback function that accepts a
* The type #astro_search_func_t represents such a callback function that accepts a
* custom `context` pointer and an astro_time_t representing the time to probe.
* The function returns an astro_func_result_t that contains either a real
* number in `value` or an error code in `status` that aborts the search.
*
* The `context` points to some data whose type varies depending on the callback function.
* It can contain any auxiliary parameters (other than time) needed to evaluate the function.
* For example, a function may pertain to a specific celestial body, in which case `context`
* may point to a value of type astro_body_t. The `context` parameter is supplied by
* may point to a value of type #astro_body_t. The `context` parameter is supplied by
* the caller of #Astronomy_Search, which passes it along to every call to the callback function.
* If the caller of `Astronomy_Search` knows that the callback function does not need a context,
* it is safe to pass `NULL` as the context pointer.
Expand Down

0 comments on commit 865d3da

Please sign in to comment.