Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
The patch looks good so far and just needs a little more work
before I apply it:
-y is fine for now.
Add some comments to var_copy() describing how it differs
from var_dup() and describing when its use is appropriate.
Use memcpy() in var_copy()
make all the minmax stuff work with a new enumerated type
so we see descriptive labels instead of 0,1,2...
}; /* end enum */
and change "minmax" to op_typ or something more inclusive
of other types of operations than min and max.
Add this comment to var_min() and var_max() because without
it I always get confused:
/* NB: it is not neccessary to un-typecast pointers to values after access
because we have only operated on local copies of them. */
This following snippet looks like it may be duplicated between ncra and ncea:
case 0: /* averages */
case 1: /* minimum */
/* on the first loop simply copy variables from var_prc to var_prc_out */
if (idx_fl == 0 && idx == 0) (void)var_copy(var_prc[idx]->type,var_prc[idx]->sz,var_prc[idx]->val,var_prc_out[idx]->val); else
} /* end switch */
I did not check carefully if it is actually slightly different, in which case
your patch is fine. If they are the same it would sure be nice to move this
switch() statement to its own function because ncra.c is already fairly
messy and we don't want to duplicate code if we can make a common function.