star-hitran

Load line-by-line data from the HITRAN database
git clone git://git.meso-star.fr/star-hitran.git
Log | Files | Refs | README | LICENSE

commit 1927228d69dbdc4165ddf1b0d7c14379946f85f8
parent 305037210df230770fb756be9b3ae93113b1c82d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 28 Jan 2026 17:25:05 +0100

Rename SHTR_MAX_MOLECULES_COUNT

Remove the 'S' from MOLECULE as it is a spelling mistake.

Diffstat:
Msrc/shtr.h | 6+++---
Msrc/shtr_isotope_metadata.c | 8++++----
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/shtr.h b/src/shtr.h @@ -59,11 +59,11 @@ enum shtr_molecule_id { SHTR_COCl2, SHTR_SO, SHTR_CH3F, SHTR_GeH4, SHTR_CS2, SHTR_CH3I, SHTR_NF3, - SHTR_MAX_MOLECULES_COUNT + SHTR_MAX_MOLECULE_COUNT }; /* Table that associates the molecule ID with its name */ -static const char* SHTR_MOLECULE_CSTR__[SHTR_MAX_MOLECULES_COUNT] = { +static const char* SHTR_MOLECULE_CSTR__[SHTR_MAX_MOLECULE_COUNT] = { NULL, /* SHTR_MOLECULE_ID_NULL__ */ "H2O", "CO2", "O3", "N2O", "CO", "CH4", @@ -81,7 +81,7 @@ static const char* SHTR_MOLECULE_CSTR__[SHTR_MAX_MOLECULES_COUNT] = { static INLINE const char* shtr_molecule_cstr(const enum shtr_molecule_id id) { - ASSERT(id < SHTR_MAX_MOLECULES_COUNT); + ASSERT(id < SHTR_MAX_MOLECULE_COUNT); return SHTR_MOLECULE_CSTR__[id]; } diff --git a/src/shtr_isotope_metadata.c b/src/shtr_isotope_metadata.c @@ -104,7 +104,7 @@ struct shtr_isotope_metadata { /* Map the global identifier of a molecule to its correspond local index into * the dynamic array into which it is registered */ - int molid2idx[SHTR_MAX_MOLECULES_COUNT]; + int molid2idx[SHTR_MAX_MOLECULE_COUNT]; struct shtr* shtr; ref_T ref; @@ -170,7 +170,7 @@ flush_molecule /* Fetch the index where the molecule is going to be store */ ientry = darray_molecule_size_get(&metadata->molecules); - CHK(ientry < SHTR_MAX_MOLECULES_COUNT); + CHK(ientry < SHTR_MAX_MOLECULE_COUNT); /* Store the molecule */ res = darray_molecule_push_back(&metadata->molecules, molecule); @@ -736,7 +736,7 @@ shtr_isotope_metadata_create_from_stream res = read_isotopes(metadata, FUNC_NAME, stream); if(res != RES_OK) goto error; - READ(metadata->molid2idx, SHTR_MAX_MOLECULES_COUNT); + READ(metadata->molid2idx, SHTR_MAX_MOLECULE_COUNT); #undef READ exit: @@ -877,7 +877,7 @@ shtr_isotope_metadata_write res = write_isotopes(metadata, FUNC_NAME, stream); if(res != RES_OK) goto error; - WRITE(metadata->molid2idx, SHTR_MAX_MOLECULES_COUNT); + WRITE(metadata->molid2idx, SHTR_MAX_MOLECULE_COUNT); #undef WRITE exit: