mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-04 20:59:05 -04:00
Removed some std::ostringstream.
To be continued. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5109 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9aee68a2a9
commit
b71eeadf95
9 changed files with 1865 additions and 1925 deletions
libretroshare/src/serialiser
|
@ -34,32 +34,30 @@
|
|||
/* print out a packet */
|
||||
#include <stdlib.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <vector>
|
||||
|
||||
#include "serialiser/rstlvbase.h"
|
||||
#include "serialiser/rstlvtypes.h"
|
||||
#include "util/utest.h"
|
||||
#include "util/rsstring.h"
|
||||
|
||||
void displayRawPacket(std::ostream &out, void *data, uint32_t size)
|
||||
{
|
||||
uint32_t i;
|
||||
std::ostringstream sout;
|
||||
sout << "DisplayRawPacket: Size: " << size;
|
||||
sout << std::hex;
|
||||
std::string sout;
|
||||
rs_sprintf(sout, "DisplayRawPacket: Size: %ld", size);
|
||||
|
||||
for(i = 0; i < size; i++)
|
||||
{
|
||||
if (i % 16 == 0)
|
||||
{
|
||||
sout << std::endl;
|
||||
sout += "\n";
|
||||
}
|
||||
sout << std::setw(2) << std::setfill('0')
|
||||
<< (int) (((unsigned char *) data)[i]) << ":";
|
||||
rs_sprintf_append(sout, "%02x:", (int) (((unsigned char *) data)[i]));
|
||||
}
|
||||
sout << std::endl;
|
||||
|
||||
out << sout.str();
|
||||
out << sout << std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue