"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/be13_api/bulk_extractor_i.h" between
tcpflow-1.5.0.tar.gz and tcpflow-1.6.1.tar.gz

About: tcpflow is a TCP/IP packet demultiplexer that captures data transmitted as part of TCP connections (flows), and stores the data in a way that is convenient for protocol analysis and debugging.

bulk_extractor_i.h  (tcpflow-1.5.0):bulk_extractor_i.h  (tcpflow-1.6.1)
skipping to change at line 875 skipping to change at line 875
inline std::string itos(int i){ std::stringstream ss; ss << i;return ss.str();} inline std::string itos(int i){ std::stringstream ss; ss << i;return ss.str();}
inline std::string dtos(double d){ std::stringstream ss; ss << d;return ss.str() ;} inline std::string dtos(double d){ std::stringstream ss; ss << d;return ss.str() ;}
inline std::string utos(unsigned int i){ std::stringstream ss; ss << i;return ss .str();} inline std::string utos(unsigned int i){ std::stringstream ss; ss << i;return ss .str();}
inline std::string utos(uint64_t i){ std::stringstream ss; ss << i;return ss.str ();} inline std::string utos(uint64_t i){ std::stringstream ss; ss << i;return ss.str ();}
inline std::string utos(uint16_t i){ std::stringstream ss; ss << i;return ss.str ();} inline std::string utos(uint16_t i){ std::stringstream ss; ss << i;return ss.str ();}
inline std::string safe_utf16to8(std::wstring s){ // needs to be cleaned up inline std::string safe_utf16to8(std::wstring s){ // needs to be cleaned up
std::string utf8_line; std::string utf8_line;
try { try {
utf8::utf16to8(s.begin(),s.end(),back_inserter(utf8_line)); utf8::utf16to8(s.begin(),s.end(),back_inserter(utf8_line));
} catch(utf8::invalid_utf16){ } catch(utf8::invalid_utf16 const &){
/* Exception thrown: bad UTF16 encoding */ /* Exception thrown: bad UTF16 encoding */
utf8_line = ""; utf8_line = "";
} }
return utf8_line; return utf8_line;
} }
inline std::wstring safe_utf8to16(std::string s){ // needs to be cleaned up inline std::wstring safe_utf8to16(std::string s){ // needs to be cleaned up
std::wstring utf16_line; std::wstring utf16_line;
try { try {
utf8::utf8to16(s.begin(),s.end(),back_inserter(utf16_line)); utf8::utf8to16(s.begin(),s.end(),back_inserter(utf16_line));
} catch(utf8::invalid_utf8){ } catch(utf8::invalid_utf8 const &){
/* Exception thrown: bad UTF16 encoding */ /* Exception thrown: bad UTF16 encoding */
utf16_line = L""; utf16_line = L"";
} }
return utf16_line; return utf16_line;
} }
// truncate string at the matching char // truncate string at the matching char
inline void truncate_at(std::string &line, char ch) { inline void truncate_at(std::string &line, char ch) {
size_t pos = line.find(ch); size_t pos = line.find(ch);
if(pos != std::string::npos) line.resize(pos); if(pos != std::string::npos) line.resize(pos);
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)