brewco/rdrecipes.c

changeset 460
0b2ea0ec165c
parent 459
1f88be70f253
child 463
a1da58215b65
equal deleted inserted replaced
459:1f88be70f253 460:0b2ea0ec165c
364 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); 364 key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
365 if (sscanf((const char *)key, "%d", &ival) == 1) 365 if (sscanf((const char *)key, "%d", &ival) == 1)
366 recipe->endtime = (time_t)ival; 366 recipe->endtime = (time_t)ival;
367 xmlFree(key); 367 xmlFree(key);
368 } 368 }
369 fprintf(stdout, "cur %s\n", cur->name);
370 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MASHSTEPS"))) { 369 if ((!xmlStrcmp(cur->name, (const xmlChar *)"MASHSTEPS"))) {
371 s1cur = cur->xmlChildrenNode; 370 s1cur = cur->xmlChildrenNode;
372 i = 0; 371 i = 0;
373 while (s1cur != NULL) { 372 while (s1cur != NULL) {
374 fprintf(stdout, " s1cur %s\n", s1cur->name);
375
376 if ((!xmlStrcmp(s1cur->name, (const xmlChar *)"MASHSTEP"))) { 373 if ((!xmlStrcmp(s1cur->name, (const xmlChar *)"MASHSTEP"))) {
377 s2cur = s1cur->xmlChildrenNode; 374 s2cur = s1cur->xmlChildrenNode;
378 while (s2cur != NULL) { 375 while (s2cur != NULL) {
379 fprintf(stdout, " s2cur %s\n", s2cur->name);
380 if ((!xmlStrcmp(s2cur->name, (const xmlChar *)"NAME"))) { 376 if ((!xmlStrcmp(s2cur->name, (const xmlChar *)"NAME"))) {
381 recipe->mash[i].name = (char *)xmlNodeListGetString(doc, s2cur->xmlChildrenNode, 1); 377 recipe->mash[i].name = (char *)xmlNodeListGetString(doc, s2cur->xmlChildrenNode, 1);
382 } 378 }
383 if ((!xmlStrcmp(s2cur->name, (const xmlChar *)"MIN"))) { 379 if ((!xmlStrcmp(s2cur->name, (const xmlChar *)"MIN"))) {
384 key = xmlNodeListGetString(doc, s2cur->xmlChildrenNode, 1); 380 key = xmlNodeListGetString(doc, s2cur->xmlChildrenNode, 1);
434 430
435 if ((!xmlStrcmp(cur->name, (const xmlChar *)"HOPADDITIONS"))) { 431 if ((!xmlStrcmp(cur->name, (const xmlChar *)"HOPADDITIONS"))) {
436 s1cur = cur->xmlChildrenNode; 432 s1cur = cur->xmlChildrenNode;
437 i = 0; 433 i = 0;
438 while (s1cur != NULL) { 434 while (s1cur != NULL) {
439 fprintf(stdout, " s1cur %s\n", s1cur->name);
440
441 if ((!xmlStrcmp(s1cur->name, (const xmlChar *)"HOPADDITION"))) { 435 if ((!xmlStrcmp(s1cur->name, (const xmlChar *)"HOPADDITION"))) {
442 s2cur = s1cur->xmlChildrenNode; 436 s2cur = s1cur->xmlChildrenNode;
443 while (s2cur != NULL) { 437 while (s2cur != NULL) {
444 fprintf(stdout, " s2cur %s\n", s2cur->name);
445 if ((!xmlStrcmp(s2cur->name, (const xmlChar *)"NAME"))) { 438 if ((!xmlStrcmp(s2cur->name, (const xmlChar *)"NAME"))) {
446 recipe->hops[i].name = (char *)xmlNodeListGetString(doc, s2cur->xmlChildrenNode, 1); 439 recipe->hops[i].name = (char *)xmlNodeListGetString(doc, s2cur->xmlChildrenNode, 1);
447 } 440 }
448 if ((!xmlStrcmp(s2cur->name, (const xmlChar *)"BOILTIME"))) { 441 if ((!xmlStrcmp(s2cur->name, (const xmlChar *)"BOILTIME"))) {
449 key = xmlNodeListGetString(doc, s2cur->xmlChildrenNode, 1); 442 key = xmlNodeListGetString(doc, s2cur->xmlChildrenNode, 1);
461 454
462 if ((!xmlStrcmp(cur->name, (const xmlChar *)"HOPSTANDS"))) { 455 if ((!xmlStrcmp(cur->name, (const xmlChar *)"HOPSTANDS"))) {
463 s1cur = cur->xmlChildrenNode; 456 s1cur = cur->xmlChildrenNode;
464 i = 0; 457 i = 0;
465 while (s1cur != NULL) { 458 while (s1cur != NULL) {
466 fprintf(stdout, " s1cur %s\n", s1cur->name);
467
468 if ((!xmlStrcmp(s1cur->name, (const xmlChar *)"HOPSTAND"))) { 459 if ((!xmlStrcmp(s1cur->name, (const xmlChar *)"HOPSTAND"))) {
469 s2cur = s1cur->xmlChildrenNode; 460 s2cur = s1cur->xmlChildrenNode;
470 while (s2cur != NULL) { 461 while (s2cur != NULL) {
471 fprintf(stdout, " s2cur %s\n", s2cur->name);
472 if ((!xmlStrcmp(s2cur->name, (const xmlChar *)"NAME"))) { 462 if ((!xmlStrcmp(s2cur->name, (const xmlChar *)"NAME"))) {
473 recipe->hopstand[i].name = (char *)xmlNodeListGetString(doc, s2cur->xmlChildrenNode, 1); 463 recipe->hopstand[i].name = (char *)xmlNodeListGetString(doc, s2cur->xmlChildrenNode, 1);
474 } 464 }
475 if ((!xmlStrcmp(s2cur->name, (const xmlChar *)"MIN"))) { 465 if ((!xmlStrcmp(s2cur->name, (const xmlChar *)"MIN"))) {
476 key = xmlNodeListGetString(doc, s2cur->xmlChildrenNode, 1); 466 key = xmlNodeListGetString(doc, s2cur->xmlChildrenNode, 1);

mercurial