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

Function tok822_print

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

Source from the content-addressed store, hash-verified

667/* tok822_print - display token */
668
669static void tok822_print(TOK822 *list, int indent)
670{
671 TOK822 *tp;
672
673 for (tp = list; tp; tp = tp->next) {
674 if (tp->type < TOK822_MINTOK) {
675 vstream_printf("%*s %s \"%c\"\n", indent, "", "OP", tp->type);
676 } else if (tp->type == TOK822_ADDR) {
677 vstream_printf("%*s %s\n", indent, "", "address");
678 tok822_print(tp->head, indent + 2);
679 } else if (tp->type == TOK822_STARTGRP) {
680 vstream_printf("%*s %s\n", indent, "", "group \":\"");
681 } else {
682 vstream_printf("%*s %s \"%s\"\n", indent, "",
683 tp->type == TOK822_COMMENT ? "comment" :
684 tp->type == TOK822_ATOM ? "atom" :
685 tp->type == TOK822_QSTRING ? "quoted string" :
686 tp->type == TOK822_DOMLIT ? "domain literal" :
687 tp->type == TOK822_ADDR ? "address" :
688 "unknown\n", vstring_str(tp->vstr));
689 }
690 }
691}
692
693int main(int unused_argc, char **unused_argv)
694{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…