00001
00002
00003
00004
00005
00006
00007
00008
00012 #include <iostream>
00013
00014
00015 #include "zypp/base/IOStream.h"
00016
00017 using std::endl;
00018
00020 namespace zypp
00021 {
00022
00023 namespace iostr
00024 {
00025
00026
00027
00028
00029
00030
00031 std::string getline( std::istream & str )
00032 {
00033 static const unsigned tmpBuffLen = 1024;
00034 static char tmpBuff[tmpBuffLen];
00035 std::string ret;
00036 do {
00037 str.clear();
00038 str.getline( tmpBuff, tmpBuffLen );
00039 ret += tmpBuff;
00040 } while( str.rdstate() == std::ios::failbit );
00041
00042 return ret;
00043 }
00044
00046 }
00049 }