MCPcopy Create free account
hub / github.com/bytedance/dplm / xsputn

Method xsputn

analysis/TMscore.cpp:1982–1999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1980 */
1981 template <typename C, typename T>
1982 std::streamsize
1983 basic_pstreambuf<C,T>::xsputn(const char_type* s, std::streamsize n)
1984 {
1985 std::streamsize done = 0;
1986 while (done < n)
1987 {
1988 if (std::streamsize nbuf = this->epptr() - this->pptr())
1989 {
1990 nbuf = std::min(nbuf, n - done);
1991 traits_type::copy(this->pptr(), s + done, nbuf);
1992 this->pbump(nbuf);
1993 done += nbuf;
1994 }
1995 else if (!empty_buffer())
1996 break;
1997 }
1998 return done;
1999 }
2000
2001 /**
2002 * @return true if the buffer was emptied, false otherwise.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected