示例#1
0
文件: tok.c 项目: Limsik/e17
spif_cmp_t
spif_tok_comp(spif_tok_t self, spif_tok_t other)
{
    SPIF_OBJ_COMP_CHECK_NULL(self, other);
    SPIF_OBJ_COMP_CHECK_NULL(self->src, other->src);
    return spif_str_cmp(self->src, other->src);
}
示例#2
0
文件: str.c 项目: mej/libast
spif_cmp_t
spif_str_ncmp_with_ptr(spif_str_t self, spif_charptr_t other, spif_stridx_t cnt)
{
    int c;

    SPIF_OBJ_COMP_CHECK_NULL(self, other);
    c = strncmp((char *) SPIF_STR_STR(self), (char *) other, cnt);
    return SPIF_CMP_FROM_INT(c);
}
示例#3
0
文件: str.c 项目: mej/libast
spif_cmp_t
spif_str_cmp(spif_str_t self, spif_str_t other)
{
    int c;

    SPIF_OBJ_COMP_CHECK_NULL(self, other);
    c = strcmp((char *) SPIF_STR_STR(self), (char *) SPIF_STR_STR(other));
    return SPIF_CMP_FROM_INT(c);
}
示例#4
0
spif_cmp_t
spif_eterm_action_comp(spif_eterm_action_t self, spif_eterm_action_t other)
{
    spif_cmp_t c;

    SPIF_OBJ_COMP_CHECK_NULL(self, other);
    c = SPIF_CMP_FROM_INT((int) (self->type) - (int) (other->type));

    if (!SPIF_CMP_IS_EQUAL(c)) {
        return c;
    }
    c = SPIF_CMP_FROM_INT((int) (self->button) - (int) (other->button));

    if (!SPIF_CMP_IS_EQUAL(c)) {
        return c;
    }
    c = SPIF_CMP_FROM_INT((int) (self->keysym) - (int) (other->keysym));

    if (!SPIF_CMP_IS_EQUAL(c)) {
        return c;
    }
    return SPIF_CMP_FROM_INT((int) (self->modifiers) - (int) (other->modifiers));
}
示例#5
0
文件: url.c 项目: Limsik/e17
spif_cmp_t
spif_url_comp(spif_url_t self, spif_url_t other)
{
    SPIF_OBJ_COMP_CHECK_NULL(self, other);
    return spif_str_comp(SPIF_STR(self), SPIF_STR(other));
}