/* 1 -1 sum of the defined cells */ #define SUM_SUM d[0] static void rf_sum_callback( Data *d) { if( debug) fprintf( out, "sum += %g\n", d->list_val); d->SUM_SUM += d->list_val; } double rf_sum(const Node *n, const Cell *c) { Data d; d.SUM_SUM = 0; ss_traverse_list( Right(n), c, rf_sum_callback, &d); return d.SUM_SUM; }