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

Function strip_address

lib_acl_cpp/src/mime/internal/tok822_parse.cpp:249–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247/* strip_address - strip non-address text from address expression */
248
249static void strip_address(ACL_VSTRING *vp, ssize_t start, TOK822 *addr)
250{
251 ACL_VSTRING *tmp;
252
253 /*
254 * Emit plain <address>. Discard any comments or phrases.
255 */
256 ACL_VSTRING_TERMINATE(vp);
257 acl_msg_warn("stripping too many comments from address: %.100s...",
258 acl_vstring_str(vp) + start);
259 //acl_printable(vstring_str(vp) + start, '?')); //zsx
260 acl_vstring_truncate(vp, start);
261 ACL_VSTRING_ADDCH(vp, '<');
262 if (addr) {
263 tmp = acl_vstring_alloc(100);
264 tok822_internalize(tmp, addr, TOK822_STR_TERM);
265 quote_822_local_flags(vp, acl_vstring_str(tmp),
266 QUOTE_FLAG_8BITCLEAN | QUOTE_FLAG_APPEND);
267 acl_vstring_free(tmp);
268 }
269 ACL_VSTRING_ADDCH(vp, '>');
270}
271
272/* tok822_externalize - token tree to string, external form */
273

Callers

nothing calls this directly

Calls 6

acl_msg_warnFunction · 0.85
acl_vstring_truncateFunction · 0.85
acl_vstring_allocFunction · 0.85
tok822_internalizeFunction · 0.85
quote_822_local_flagsFunction · 0.85
acl_vstring_freeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…