Exemple #1
0
/* =======================================================================
 *
 *  _X_PUSH_
 *
 *  See interface description.
 *
 * =======================================================================
 */
_X_LIST_TYPE_ *
_X_PUSH_(
  _X_LIST_LOCAL_BASE_TYPE_  x,
  _X_LIST_TYPE_            *list,
  MEM_POOL                 *pool
)
{
  _X_LIST_TYPE_ *result = TYPE_MEM_POOL_ALLOC(_X_LIST_TYPE_,pool);

  _X_first_(result) = x;
  _X_rest_(result) = list;
  return result;
}
Exemple #2
0
/* ====================================================================
 *
 *  TI_RES_RES_Alloc
 *
 *  See interface description
 *
 * ====================================================================
 */
TI_RES_RES *TI_RES_RES_Alloc(
  BOOL      cyclic,
  MEM_POOL *pool
)
{
  TI_RES_RES *res = TYPE_MEM_POOL_ALLOC(TI_RES_RES, pool);

  TI_RES_RES_pool(res) = pool;
  TI_RES_RES_cyclic(res) = cyclic;
  TI_RES_RES_bad_iis(res) = SI_BAD_II_SET_Empty();
  TI_RES_RES_length(res) = 0;
  TI_RES_RES_alloc_size(res) = 0;
  TI_RES_RES_min_rr_length(res) = UINT_MAX;

  if ( cyclic ) {
    TI_RES_RES_si_ids(res) = BS_Create_Empty(SI_ID_Count(), pool);
  }

  return res;
}