Exemplo n.º 1
0
Arquivo: tok.c Projeto: 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);
}
Exemplo n.º 2
0
Arquivo: str.c Projeto: 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);
}
Exemplo n.º 3
0
Arquivo: str.c Projeto: 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);
}
Exemplo n.º 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));
}
Exemplo n.º 5
0
Arquivo: url.c Projeto: 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));
}