コード例 #1
0
ファイル: ztrie.c プロジェクト: chsticksel/ocamlczmq
//  --------------------------------------------------------------------------
//  Print properties of the ztrie object.
//
static void
s_ztrie_print_tree_line (ztrie_node_t *self, bool isEOL)
{
    if (self->parent) {
        s_ztrie_print_tree_line (self->parent, false);
        if (zlistx_tail (self->parent->children) == self) {
            if (isEOL)
                printf ("\u2514\u2500\u2500 ");
            else
                printf ("    ");
        }
        else {
            if (isEOL)
                printf ("\u251C\u2500\u2500 ");
            else
                printf ("\u2502   ");
        }
        if (isEOL) {
            char *isEndpoint = self->endpoint? "true": "false";
            printf ("%s (params: %zu, endpoint: %s, type: %d)\n",
                self->token, self->parameter_count, isEndpoint, self->token_type);
        }
    }
}
コード例 #2
0
ファイル: qzlistx.cpp プロジェクト: awakecoding/czmq
///
//  Return last item in the list, or null, leaves the cursor
void * QZlistx::tail ()
{
    void * rv = zlistx_tail (self);
    return rv;
}