mex spar.c