Skip to content

Commit

Permalink
updating some comments and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AlysonStahl-NOAA committed Aug 8, 2024
1 parent 0d24850 commit bce0d0f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/g2ccsv.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ g2c_find_entry(char *desc, G2C_CODE_TABLE_T *table)
}

/**
* Init.
* Initialize tables from "CodeFlag.txt".
*
* @return
* - ::G2C_NOERROR No error.
Expand Down Expand Up @@ -210,6 +210,8 @@ g2c_csv_init()
/* Skip header line */
fgets(line,max_line_size,doc);

/* Go through the document and save table data.
* Each line is a table of codes. */
while((fgets(line,max_line_size,doc)) != NULL)
{
buf = strdup(line);
Expand All @@ -231,6 +233,7 @@ g2c_csv_init()
key = strdup((const char*)tmp);
}

/* Title_en */
if (i==0)
{
if (strlen(key) > G2C_MAX_GRIB_TITLE_LEN)
Expand All @@ -246,6 +249,7 @@ g2c_csv_init()

if (my_table)
{
/* CodeFlag */
if (i==2)
{
G2C_CODE_ENTRY_T *e;
Expand All @@ -265,6 +269,7 @@ g2c_csv_init()
else
my_table->entry = new_entry;
}
/* MeaningParameterDescription */
if (i==4)
{
if (strlen(key) > G2C_MAX_GRIB_DESC_LEN)
Expand All @@ -273,6 +278,7 @@ g2c_csv_init()
return G2C_ECSV;
strncpy(new_entry->desc,key,G2C_MAX_GRIB_LEVEL_DESC_LEN);
}
/* Status */
if (i==8)
{
if (strlen(key) > G2C_MAX_GRIB_STATUS_LEN)
Expand Down

0 comments on commit bce0d0f

Please sign in to comment.