lib/src/diet.c
static inline struct ival *
make_ival(const uint64_t n, const uint8_t c, const ev_tstamp t)
{
    struct ival * const i = calloc(1, sizeof(*i));
    ensure(i, "could not calloc");
    i->lo = i->hi = n;
    i->c = c;
    i->t = t;
    splay_left(i, node) = splay_right(i, node) = 0;
    return i;
}
/// Helper function to create a zero-width interval containing (only) @p n.
///
/// @param[in]  n     Integer.
/// @param[in]  c     Class.
/// @param[in]  t     Timestamp.
///
/// @return     Newly allocated ival struct [n..n] of type @p t.
///
Helper function to create a zero-width interval containing (only) @p n.
Helper function to create a zero - width interval containing ( only ) @p n .
static inline struct ival *
make_ival(const uint64_t n, const uint8_t c, const ev_tstamp t)
{
    struct ival * const i = calloc(1, sizeof(*i));
    ensure(i, "could not calloc");
    i->lo = i->hi = n;
    i->c = c;
    i->t = t;
    splay_left(i, node) = splay_right(i, node) = 0;
    return i;
}
static inline struct ival * make_ival ( const uint64_t n , const uint8_t c , const ev_tstamp t ) { struct ival * const i = calloc ( 1 , sizeof ( * i ) ) ; ensure ( i , " " ) ; i -> lo = i -> hi = n ; i -> c = c ; i -> t = t ; splay_left ( i , node ) = splay_right ( i , node ) = 0 ; return i ; }
Helper function to create a zero-width interval containing (only) @p n.
Helper function to create a zero - width interval containing ( only ) @p n .