static int __cmp(struct dt_dt_s stream, struct dt_dt_s cell) { /* special promoting/demoting version of dt_dtcmp() * if CELL is d-only or t-only, demote STREAM */ if (dt_sandwich_only_d_p(cell)) { return dt_dcmp(stream.d, cell.d); } else if (dt_sandwich_only_t_p(cell)) { return dt_tcmp(stream.t, cell.t); } return dt_dtcmp(stream, cell); }
static int __get_dir(struct dt_dt_s d, const struct dseq_clo_s *clo) { if (!dt_sandwich_only_t_p(d)) { /* trial addition to to see where it goes */ struct dt_dt_s tmp = __seq_next(d, clo); return dt_dtcmp(tmp, d); } if (clo->ite->dv > 0) { return 1; } else if (clo->ite->dv < 0) { return -1; } return 0; }