1414 } |
1414 } |
1415 |
1415 |
1416 /* |
1416 /* |
1417 * If there is no alias name, create it. |
1417 * If there is no alias name, create it. |
1418 */ |
1418 */ |
1419 if (unit->alias == NULL) { |
1419 // if (unit->alias == NULL) { |
1420 char an[128]; |
1420 // char an[128]; |
1421 sprintf(an, "unit%d", number); |
1421 // sprintf(an, "unit%d", number); |
1422 unit->alias = xstrcpy(an); |
1422 // unit->alias = xstrcpy(an); |
1423 } |
1423 // } |
1424 |
1424 |
1425 if (Config.units == NULL) { |
1425 if (Config.units == NULL) { |
1426 Config.units = unit; |
1426 Config.units = unit; |
1427 } else { |
1427 } else { |
1428 for (tmp = Config.units; tmp; tmp = tmp->next) { |
1428 for (tmp = Config.units; tmp; tmp = tmp->next) { |
1441 int parseFermenters(xmlDocPtr doc, xmlNodePtr cur) |
1441 int parseFermenters(xmlDocPtr doc, xmlNodePtr cur) |
1442 { |
1442 { |
1443 cur = cur->xmlChildrenNode; |
1443 cur = cur->xmlChildrenNode; |
1444 while (cur != NULL) { |
1444 while (cur != NULL) { |
1445 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UNIT"))) { |
1445 if ((!xmlStrcmp(cur->name, (const xmlChar *)"UNIT"))) { |
1446 parseUnit(doc, cur, Config.next_unit); |
1446 parseUnit(doc, cur/* , Config.next_unit*/); |
1447 Config.next_unit++; |
1447 // Config.next_unit++; |
1448 } |
1448 } |
1449 cur = cur->next; |
1449 cur = cur->next; |
1450 } |
1450 } |
1451 return 0; |
1451 return 0; |
1452 } |
1452 } |