OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
get_product_table.h File Reference
#include <stdint.h>
Include dependency graph for get_product_table.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  product_table_str
 

Functions

product_table_t * get_product_table (char *file_name, int32_t *num_entries)
 
void free_product_table (product_table_t *table, int32_t num_entries)
 
int32_t search_product_table (product_table_t *table, int32_t num_entries, char *name)
 

Detailed Description

functions used to deal with the product table file.

Definition in file get_product_table.h.

Function Documentation

◆ free_product_table()

void free_product_table ( product_table_t *  table,
int32_t  num_entries 
)

free the product table memory.

Parameters
tablepointer to product table array
num_entriesnumber of entries in the product table

Definition at line 88 of file get_product_table.c.

◆ get_product_table()

product_table_t* get_product_table ( char *  file_name,
int32_t *  num_entries 
)

read the product table file. This routine allocates enough memory to hold the product table and returns a pointer to an array of product_table_t structures to the caller. It is the callers responsibility to free the memory. If there was an error reading the file NULL is returned and *num_entries is set to 0.

Parameters
file_namefull file name of the product table file
num_entriesretuns the numbers of entries read from the file
Returns
pointer to product table array, NULL if error

Definition at line 11 of file get_product_table.c.

◆ search_product_table()

int32_t search_product_table ( product_table_t *  table,
int32_t  num_entries,
char *  name 
)

find the product table entry for name.

Parameters
tablepointer to product table array
num_entriesnumber of entries in the product table
nameproduct entry to search for
Returns
index for the entry, or -1 if not found

Definition at line 104 of file get_product_table.c.