int
saf_target_topo_relation(SAF_RelTarget *target, /* [OUT] Relation targeting information to be initialized by this
* function. */
SAF_Set *range_set, /* Optional set. */
SAF_Cat *range_cat, /* Together the RANGE_SET this identifies the target collection to be
* used to glue the pieces together. Currently both of these
* parameters are ignored. */
SAF_Cat *decomp, /* The optional target decomposition. */
SAF_RelRep *trtype, /* The optional target relation types. Currently this parameter is
* ignored. */
hid_t data_type /* The optional target data type. */
)
{
SAF_ENTER(saf_target_topo_relation, SAF_PRECONDITION_ERROR);
SAF_REQUIRE(target, SAF_LOW_CHK_COST, SAF_PRECONDITION_ERROR,
_saf_errmsg("must pass non-null target information"));
SAF_REQUIRE(SS_CAT(decomp), SAF_LOW_CHK_COST, SAF_PRECONDITION_ERROR,
_saf_errmsg("DECOMP must be either NOT_SET, SELF_DECOMP or a valid cat handle"));
target->is_set = TRUE;
/*
Sun compiler had a problem with the following three lines. noconst: vs. const
target->range_set = range_set ? *range_set : SS_SET_NULL;
target->range_cat = range_cat ? *range_cat : SS_CAT_NULL;
target->decomp = decomp ? *decomp : SS_CAT_NULL;
*/
target->range_set = SS_SET_NULL;
if (range_set)
target->range_set = SS_SET_NULL;
target->range_cat = SS_CAT_NULL;
if (range_cat)
target->range_cat = *range_cat;
target->decomp = SS_CAT_NULL;
if (decomp)
target->decomp = *decomp;
target->data_type = data_type;
#ifdef SSLIB_SUPPORT_PENDING /* This shouldn't be necessary since we have the type in the SAF_RelTarget struct*/
Ptrel->abuf_type = targ_data_type;
Ptrel->bbuf_type = targ_data_type;
#endif /*SSLIB_SUPPORT_PENDING*/
SAF_LEAVE(SAF_SUCCESS);
}