95 for (t =
g2c_table; !found && t; t = t->next)
97 if (!strncmp(title, t->title, strlen(title)))
102 for (e = t->entry; e; e = e->next)
104 if (!strncmp(code, e->code, strlen(code)))
106 strcpy(desc, e->desc);
203 if (!(
doc = xmlReadFile(
"CodeFlag.xml", NULL, 0)))
207 cur = xmlDocGetRootElement(
doc)->xmlChildrenNode;
210 xmlNode *child = cur->xmlChildrenNode;
217 if ((!xmlStrcmp(child->name, (
const xmlChar *)
"Title_en")))
219 key = xmlNodeListGetString(
doc, child->xmlChildrenNode, 1);
228 my_table = new_table;
235 if ((!xmlStrcmp(child->name, (
const xmlChar *)
"CodeFlag")))
241 if (child->xmlChildrenNode)
243 key = xmlNodeListGetString(
doc, child->xmlChildrenNode, 1);
254 for (e = my_table->entry; e->next; e = e->next)
259 my_table->entry = new_entry;
261 if ((!xmlStrcmp(child->name, (
const xmlChar *)
"MeaningParameterDescription_en")))
263 key = xmlNodeListGetString(
doc, child->xmlChildrenNode, 1);
272 if ((!xmlStrcmp(child->name, (
const xmlChar *)
"Status")))
274 key = xmlNodeListGetString(
doc, child->xmlChildrenNode, 1);
300 for (; g->next; g = g->next)
int g2c_find_desc_str(char *title, char *code, char *desc)
Given a table title and a code, find a description.
int g2c_find_desc(char *title, int code, char *desc)
Given a table title and an integer code, find a description.
An entry in a GRIB2 code table.