| 523 | } |
| 524 | |
| 525 | int |
| 526 | XmlFileStream::attr(const char *name, int value) |
| 527 | |
| 528 | { if (fileOpen == 0) |
| 529 | this->open(); |
| 530 | |
| 531 | // if (sendSelfCount == 0 ) { |
| 532 | |
| 533 | theFile << " " << name << "=\"" << value << "\""; |
| 534 | |
| 535 | /* } else { |
| 536 | |
| 537 | static char intRep[30]; |
| 538 | sprintf(intRep, "%d", value); |
| 539 | |
| 540 | int nextXmlStringLength = xmlStringLength + strlen(name) + strlen(intRep) + 5; |
| 541 | char *nextXmlString = new char [nextXmlStringLength]; |
| 542 | |
| 543 | if (xmlString != 0) { |
| 544 | strncpy(nextXmlString, xmlString, xmlStringLength); |
| 545 | delete [] xmlString; |
| 546 | } else |
| 547 | nextXmlString[0]='\0'; |
| 548 | |
| 549 | xmlString = nextXmlString; |
| 550 | xmlStringLength = nextXmlStringLength; |
| 551 | |
| 552 | strcat(xmlString, " "); |
| 553 | strcat(xmlString, name); |
| 554 | strcat(xmlString, "=\""); |
| 555 | strcat(xmlString, intRep); |
| 556 | strcat(xmlString, "\""); |
| 557 | |
| 558 | } |
| 559 | */ |
| 560 | return 0; |
| 561 | } |
| 562 | |
| 563 | int |
| 564 | XmlFileStream::attr(const char *name, double value) |