--- cdrdao-1.1.5/trackdb/CdTextItem.cc.foo Fri Dec 21 11:50:23 2001 +++ cdrdao-1.1.5/trackdb/CdTextItem.cc Fri Dec 21 12:09:16 2001 @@ -21,6 +21,7 @@ #include #include #include +#include #include "CdTextItem.h" @@ -128,8 +129,19 @@ out << "\\\""; else if (isprint(data_[i])) out << data_[i]; - else - out.form("\\%03o", (unsigned int)data_[i]); + else { + char s[4]; + char s1[4]; + std::strstream ss(s, 4); + ss << std::oct << data_[i] << std::ends; + strcpy(s1, s); + int i=1; + while(strlen(s1)<3) { + strcpy(s1+(i++), s); + *s1='0'; + } + out << "\\" << s1; + } } out << "\""; @@ -140,7 +152,10 @@ out << " {"; for (i = 0; i < dataLen_; i++) { if (i == 0) { - out.form("%2d", (unsigned int)data_[i]); + if(data_[i]<10) + out << "0" << std::dec << data_[i]; + else + out << std::dec << data_[i]; } else { if (i % 12 == 0) @@ -148,7 +163,10 @@ else out << ", "; - out.form("%2d", (unsigned int)data_[i]); + if(data_[i]<10) + out << "0" << std::dec << (unsigned int)data_[i]; + else + out << std::dec << (unsigned int)data_[i]; } } --- cdrdao-1.1.5/utils/toc2cue.cc.foo Fri Dec 21 12:11:50 2001 +++ cdrdao-1.1.5/utils/toc2cue.cc Fri Dec 21 12:14:21 2001 @@ -291,7 +291,10 @@ trun != NULL; trun = titr.next(start, end), trackNr++) { out << " TRACK "; - out.form("%02d ", trackNr); + if(trackNr < 10) + out << "0" << trackNr << " "; + else + out << trackNr << " "; switch (trun->type()) { case TrackData::AUDIO: