NCEPLIBS-g2c 1.9.0
|
This file reads the GRIB2 XML files. More...
Go to the source code of this file.
Functions | |
int | g2c_find_desc (char *title, int code, char *desc) |
Given a table title and an integer code, find a description. | |
int | g2c_find_desc_str (char *title, char *code, char *desc) |
Given a table title and a code, find a description. | |
G2C_CODE_ENTRY_T * | g2c_find_entry (char *desc, G2C_CODE_TABLE_T *table) |
Find an entry in a table given a description. | |
G2C_CODE_TABLE_T * | g2c_find_table (char *key) |
Find a table given a key. | |
void | g2c_free_tables () |
Free table memory. | |
void | g2c_print_tables () |
Print the table data. | |
int | g2c_xml_init () |
Init. | |
Variables | |
xmlDocPtr | doc |
Contains the parsed XML document. | |
G2C_CODE_TABLE_T * | g2c_table = NULL |
Pointer to the list of code tables. | |
int g2c_find_desc | ( | char * | title, |
int | code, | ||
char * | desc | ||
) |
Given a table title and an integer code, find a description.
title | Title of table. |
code | Code to search for as an int. |
desc | Pointer that gets a copy of the description. Must be allocated to G2C_MAX_GRIB_DESC_LEN + 1. |
Definition at line 132 of file g2cxml.c.
References g2c_find_desc_str(), and G2C_MAX_GRIB_CODE_LEN.
Referenced by g2c_log_section1().
int g2c_find_desc_str | ( | char * | title, |
char * | code, | ||
char * | desc | ||
) |
Given a table title and a code, find a description.
title | Title of table. |
code | Code to search for. |
desc | Pointer that gets a copy of the description. Must be allocated to G2C_MAX_GRIB_DESC_LEN + 1. |
Definition at line 84 of file g2cxml.c.
References G2C_EINVAL, G2C_ENOTFOUND, G2C_MAX_GRIB_CODE_LEN, G2C_MAX_GRIB_TITLE_LEN, G2C_NOERROR, and g2c_table.
Referenced by g2c_find_desc().
G2C_CODE_ENTRY_T * g2c_find_entry | ( | char * | desc, |
G2C_CODE_TABLE_T * | table | ||
) |
Find an entry in a table given a description.
desc | The description of the entry to find. |
table | A pointer to the table to search. |
Definition at line 170 of file g2cxml.c.
References G2C_MAX_GRIB_DESC_LEN.
G2C_CODE_TABLE_T * g2c_find_table | ( | char * | key | ) |
Find a table given a key.
key | The table title to find. |
Definition at line 149 of file g2cxml.c.
References G2C_MAX_GRIB_TITLE_LEN, and g2c_table.
Referenced by g2c_xml_init().
void g2c_free_tables | ( | ) |
Free table memory.
Definition at line 42 of file g2cxml.c.
References g2c_table.
Referenced by g2c_log_file().
void g2c_print_tables | ( | ) |
int g2c_xml_init | ( | ) |
Init.
Definition at line 190 of file g2cxml.c.
References doc, G2C_ENAMETOOLONG, G2C_ENOMEM, G2C_EXML, g2c_find_table(), G2C_MAX_GRIB_CODE_LEN, G2C_MAX_GRIB_DESC_LEN, G2C_MAX_GRIB_STATUS_LEN, G2C_MAX_GRIB_TITLE_LEN, G2C_NOERROR, and g2c_table.
Referenced by g2c_log_file(), and g2c_log_section1().
xmlDocPtr doc |
Contains the parsed XML document.
Definition at line 12 of file g2cxml.c.
Referenced by g2c_xml_init().
G2C_CODE_TABLE_T* g2c_table = NULL |
Pointer to the list of code tables.
Definition at line 15 of file g2cxml.c.
Referenced by g2c_find_desc_str(), g2c_find_table(), g2c_free_tables(), g2c_log_file(), g2c_print_tables(), and g2c_xml_init().