diff -ru htdig-3.1.3/htlib/String.cc htdig-3.1.3.patched/htlib/String.cc --- htdig-3.1.3/htlib/String.cc Sat Nov 20 20:12:55 1999 +++ htdig-3.1.3.patched/htlib/String.cc Sat Nov 20 20:38:12 1999 @@ -204,6 +204,7 @@ return result; left -= result; + wptr += result; } return left; } @@ -544,6 +545,35 @@ return o; } +istream &operator >> (istream &is, String &s) +{ + int w = is.width (0); + if (is.ipfx0 ()) + { + register streambuf *sb = is.rdbuf (); + s.Length = 0; + while (1) + { + int ch = sb->sbumpc (); + if (ch == EOF) + { + is.setstate (ios::eofbit); + break; + } + s << static_cast (ch); + if (ch == '\n') + break; + if (--w == 1) + break; + } + } + + is.isfx (); + if (s.length () == 0) + is.setstate (ios::failbit); + + return is; +} //------------------------------------------------------------------------ // Private Methods. //