Added output streamers for int and unsigned int.

This commit is contained in:
mcmullen%netscape.com 1999-03-10 20:56:38 +00:00
Родитель aaad99ca98
Коммит 21ca81038c
4 изменённых файлов: 86 добавлений и 6 удалений

Просмотреть файл

@ -249,6 +249,8 @@ public:
nsOutputStream& operator << (unsigned short val);
nsOutputStream& operator << (long val);
nsOutputStream& operator << (unsigned long val);
nsOutputStream& operator << (int val);
nsOutputStream& operator << (unsigned int val);
// Support manipulators
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
@ -513,6 +515,10 @@ public:
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }
@ -545,6 +551,10 @@ public:
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }
@ -593,6 +603,10 @@ public:
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }
@ -633,6 +647,10 @@ public:
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }
@ -697,6 +715,10 @@ public:
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }

Просмотреть файл

@ -136,7 +136,7 @@ nsOutputStream& nsOutputStream::operator << (short val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%d", val);
sprintf(buf, "%hd", val);
return (*this << buf);
}
@ -145,7 +145,7 @@ nsOutputStream& nsOutputStream::operator << (unsigned short val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%ud", val);
sprintf(buf, "%hu", val);
return (*this << buf);
}
@ -163,7 +163,25 @@ nsOutputStream& nsOutputStream::operator << (unsigned long val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%uld", val);
sprintf(buf, "%lu", val);
return (*this << buf);
}
//----------------------------------------------------------------------------------------
nsOutputStream& nsOutputStream::operator << (int val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%d", val);
return (*this << buf);
}
//----------------------------------------------------------------------------------------
nsOutputStream& nsOutputStream::operator << (unsigned int val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%u", val);
return (*this << buf);
}

Просмотреть файл

@ -136,7 +136,7 @@ nsOutputStream& nsOutputStream::operator << (short val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%d", val);
sprintf(buf, "%hd", val);
return (*this << buf);
}
@ -145,7 +145,7 @@ nsOutputStream& nsOutputStream::operator << (unsigned short val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%ud", val);
sprintf(buf, "%hu", val);
return (*this << buf);
}
@ -163,7 +163,25 @@ nsOutputStream& nsOutputStream::operator << (unsigned long val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%uld", val);
sprintf(buf, "%lu", val);
return (*this << buf);
}
//----------------------------------------------------------------------------------------
nsOutputStream& nsOutputStream::operator << (int val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%d", val);
return (*this << buf);
}
//----------------------------------------------------------------------------------------
nsOutputStream& nsOutputStream::operator << (unsigned int val)
//----------------------------------------------------------------------------------------
{
char buf[30];
sprintf(buf, "%u", val);
return (*this << buf);
}

Просмотреть файл

@ -249,6 +249,8 @@ public:
nsOutputStream& operator << (unsigned short val);
nsOutputStream& operator << (long val);
nsOutputStream& operator << (unsigned long val);
nsOutputStream& operator << (int val);
nsOutputStream& operator << (unsigned int val);
// Support manipulators
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
@ -513,6 +515,10 @@ public:
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }
@ -545,6 +551,10 @@ public:
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }
@ -593,6 +603,10 @@ public:
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }
@ -633,6 +647,10 @@ public:
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }
@ -697,6 +715,10 @@ public:
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned long val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (unsigned int val)
{ return nsOutputStream::operator << (val); }
nsOutputStream& operator << (nsOutputStream& (*pf)(nsOutputStream&))
{ return nsOutputStream::operator << (pf); }