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

Function acl_buffer_gets

lib_acl/src/stdlib/acl_vstring.c:1005–1028  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1003}
1004
1005const ACL_VSTRING *acl_buffer_gets(ACL_VSTRING *vp, const char **src, size_t dlen)
1006{
1007 const char *myname = "acl_buffer_gets";
1008 const char *ptr;
1009
1010 if (dlen <= 0) {
1011 acl_msg_warn("%s(%d): dlen(%d) invalid",
1012 myname, __LINE__, (int) dlen);
1013 return NULL;
1014 }
1015
1016 ptr = memchr(*src, '\n', dlen);
1017 if (ptr == NULL) {
1018 acl_vstring_memcat(vp, *src, dlen);
1019 ACL_VSTRING_TERMINATE(vp);
1020 *src += dlen;
1021 return NULL;
1022 }
1023
1024 acl_vstring_memcat(vp, *src, ptr - *src + 1);
1025 ACL_VSTRING_TERMINATE(vp);
1026 *src = ptr + 1; /* �޸� *src ָ��λ�� */
1027 return vp;
1028}

Callers 2

UpdateSvnMethod · 0.85
test_buffer_getsFunction · 0.85

Calls 2

acl_msg_warnFunction · 0.85
acl_vstring_memcatFunction · 0.85

Tested by 1

test_buffer_getsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…