back out update to Append(int,radix) until I can find ltoa() on linux
git-svn-id: svn://10.0.0.236/trunk@48325 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -953,6 +953,8 @@ nsCString& nsCString::Append(char aChar) {
|
||||
* @return
|
||||
*/
|
||||
nsCString& nsCString::Append(PRInt32 aInteger,PRInt32 aRadix) {
|
||||
|
||||
#if 0
|
||||
char buf[128]={0,0};
|
||||
char* buffer=buf;
|
||||
|
||||
@@ -974,6 +976,19 @@ nsCString& nsCString::Append(PRInt32 aInteger,PRInt32 aRadix) {
|
||||
buf[len] = "0123456789abcdefghijklmnopqrstuvwxyz"[(int)r.rem];
|
||||
buf[len+1] =0;
|
||||
|
||||
#endif
|
||||
|
||||
char* fmt = "%d";
|
||||
if (8 == aRadix) {
|
||||
fmt = "%o";
|
||||
} else if (16 == aRadix) {
|
||||
fmt = "%x";
|
||||
}
|
||||
char buf[40];
|
||||
// *** XX UNCOMMENT THIS LINE
|
||||
//PR_snprintf(buf, sizeof(buf), fmt, aInteger);
|
||||
sprintf(buf,fmt,aInteger);
|
||||
|
||||
return Append(buf);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user