MCPcopy Create free account
hub / github.com/acl-dev/acl / gets

Method gets

lib_acl_cpp/src/stream/istream.cpp:121–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121bool istream::gets(void* buf, size_t* size, bool nonl /* = true */)
122{
123 int ret;
124 if (nonl) {
125 ret = acl_vstream_gets_nonl(stream_, buf, *size);
126 } else {
127 ret = acl_vstream_gets(stream_, buf, *size);
128 }
129 if (ret == ACL_VSTREAM_EOF) {
130 CHECK_ERROR(errno);
131 *size = 0;
132 return false;
133 }
134
135 *size = ret;
136 if ((stream_->flag & ACL_VSTREAM_FLAG_TAGYES)) {
137 return true;
138 }
139 return false;
140}
141
142bool istream::gets(string& s, bool nonl /* = true */, size_t max /* = 0 */)
143{

Callers 15

do_echoFunction · 0.80
mainFunction · 0.80
client_echoFunction · 0.80
client_echoFunction · 0.80
read_callbackMethod · 0.80
user_loginMethod · 0.80
test_fileFunction · 0.80
client_loginFunction · 0.80
fiber_readerFunction · 0.80
client_loginFunction · 0.80
fiber_readerFunction · 0.80
client_loginFunction · 0.80

Calls 5

acl_vstream_gets_nonlFunction · 0.85
acl_vstream_getsFunction · 0.85
getsFunction · 0.50
clearMethod · 0.45
appendMethod · 0.45

Tested by 4

test_fileFunction · 0.64
test_stdioFunction · 0.64
test_mime_headerFunction · 0.64
mainFunction · 0.64