|
From: <kin...@us...> - 2024-07-17 17:54:48
|
Revision: 7217
http://sourceforge.net/p/teem/code/7217
Author: kindlmann
Date: 2024-07-17 17:54:47 +0000 (Wed, 17 Jul 2024)
Log Message:
-----------
fixing uses of AIR_STRLEN_x plus clang-format
Modified Paths:
--------------
teem/trunk/Testing/gage/probeMulti.c
teem/trunk/Testing/gage/probeScl.c
teem/trunk/Testing/gage/tsbp.c
Modified: teem/trunk/Testing/gage/probeMulti.c
===================================================================
--- teem/trunk/Testing/gage/probeMulti.c 2024-07-17 17:53:02 UTC (rev 7216)
+++ teem/trunk/Testing/gage/probeMulti.c 2024-07-17 17:54:47 UTC (rev 7217)
@@ -30,21 +30,17 @@
*/
#define KERN_SIZE_MAX 10
-#define PROBE_NUM 300
+#define PROBE_NUM 300
static void
-errPrefix(char *dst,
- int typi, unsigned int supi, unsigned int prbi,
- unsigned int probePass, double dxi, double dyi, double dzi,
- unsigned int xi, unsigned int yi, unsigned int zi) {
- sprintf(dst, "%s[%s][%u] #%u pp %u: (%g,%g,%g)->(%u,%u,%u): ",
- "probeMulti",
- airEnumStr(nrrdType, typi), supi, prbi, probePass,
- dxi, dyi, dzi, xi, yi, zi);
+errPrefix(char *dst, int typi, unsigned int supi, unsigned int prbi,
+ unsigned int probePass, double dxi, double dyi, double dzi, unsigned int xi,
+ unsigned int yi, unsigned int zi) {
+ sprintf(dst, "%s[%s][%u] #%u pp %u: (%g,%g,%g)->(%u,%u,%u): ", "probeMulti",
+ airEnumStr(nrrdType, typi), supi, prbi, probePass, dxi, dyi, dzi, xi, yi, zi);
return;
}
-
int
main() {
airArray *mop, *submop;
@@ -51,29 +47,24 @@
char *err;
int typi;
- unsigned int supi, probePass, cti /* context copy index */,
- pvlIdx[NRRD_TYPE_MAX+1], sx, sy, sz, subnum;
- size_t sizes[3] = {42,61,50} /* one of these must be even */,
- ii, nn;
- Nrrd *norigScl, *nucharScl, *nunquant, *nqdiff,
- *nconvScl[NRRD_TYPE_MAX+1];
+ unsigned int supi, probePass, cti /* context copy index */, pvlIdx[NRRD_TYPE_MAX + 1],
+ sx, sy, sz, subnum;
+ size_t sizes[3] = {42, 61, 50} /* one of these must be even */, ii, nn;
+ Nrrd *norigScl, *nucharScl, *nunquant, *nqdiff, *nconvScl[NRRD_TYPE_MAX + 1];
unsigned char *ucharScl;
- gageContext *gctx[2][KERN_SIZE_MAX+1];
- gagePerVolume *gpvl[2][NRRD_TYPE_MAX+1][KERN_SIZE_MAX+1];
- const double *vansScl[2][NRRD_TYPE_MAX+1][KERN_SIZE_MAX+1],
- *gansScl[2][NRRD_TYPE_MAX+1][KERN_SIZE_MAX+1],
- *hansScl[2][NRRD_TYPE_MAX+1][KERN_SIZE_MAX+1];
- double *origScl, omin, omax, dsx, dsy, dsz,
+ gageContext *gctx[2][KERN_SIZE_MAX + 1];
+ gagePerVolume *gpvl[2][NRRD_TYPE_MAX + 1][KERN_SIZE_MAX + 1];
+ const double *vansScl[2][NRRD_TYPE_MAX + 1][KERN_SIZE_MAX + 1],
+ *gansScl[2][NRRD_TYPE_MAX + 1][KERN_SIZE_MAX + 1],
+ *hansScl[2][NRRD_TYPE_MAX + 1][KERN_SIZE_MAX + 1];
+ double *origScl, omin, omax, dsx, dsy, dsz,
spcOrig[NRRD_SPACE_DIM_MAX] = {0.0, 0.0, 0.0},
- spcVec[3][NRRD_SPACE_DIM_MAX] = {
- {1.1, 0.0, 0.0},
- {0.0, 2.2, 0.0},
- {0.0, 0.0, 3.3}};
+ spcVec[3][NRRD_SPACE_DIM_MAX] = {{1.1, 0.0, 0.0}, {0.0, 2.2, 0.0}, {0.0, 0.0, 3.3}};
mop = airMopNew();
-#define NRRD_NEW(name, mop) \
- (name) = nrrdNew(); \
+#define NRRD_NEW(name, mop) \
+ (name) = nrrdNew(); \
airMopAdd((mop), (name), (airMopper)nrrdNuke, airMopAlways)
/* --------------------------------------------------------------- */
@@ -82,17 +73,18 @@
if (nrrdMaybeAlloc_nva(norigScl, nrrdTypeDouble, 3, sizes)) {
airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
fprintf(stderr, "trouble allocating:\n%s", err);
- airMopError(mop); return 1;
+ airMopError(mop);
+ return 1;
}
origScl = AIR_CAST(double *, norigScl->data);
nn = nrrdElementNumber(norigScl);
- airSrandMT(42*42);
- for (ii=0; ii<nn/2; ii++) {
- airNormalRand(origScl + 2*ii + 0, origScl + 2*ii + 1);
+ airSrandMT(42 * 42);
+ for (ii = 0; ii < nn / 2; ii++) {
+ airNormalRand(origScl + 2 * ii + 0, origScl + 2 * ii + 1);
}
/* learn real range */
omin = omax = origScl[0];
- for (ii=1; ii<nn; ii++) {
+ for (ii = 1; ii < nn; ii++) {
omin = AIR_MIN(omin, origScl[ii]);
omax = AIR_MAX(omax, origScl[ii]);
}
@@ -101,7 +93,8 @@
|| nrrdSpaceOriginSet(norigScl, spcOrig)) {
airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
fprintf(stderr, "trouble setting space:\n%s", err);
- airMopError(mop); return 1;
+ airMopError(mop);
+ return 1;
}
nrrdAxisInfoSet_nva(norigScl, nrrdAxisInfoSpaceDirection, spcVec);
dsx = AIR_CAST(double, sizes[0]);
@@ -110,9 +103,8 @@
sx = AIR_CAST(unsigned int, sizes[0]);
sy = AIR_CAST(unsigned int, sizes[1]);
sz = AIR_CAST(unsigned int, sizes[2]);
- subnum = AIR_CAST(unsigned int, PROBE_NUM*0.9);
+ subnum = AIR_CAST(unsigned int, PROBE_NUM * 0.9);
-
/* --------------------------------------------------------------- */
/* Quantizing to 8-bits and checking */
submop = airMopNew();
@@ -121,17 +113,19 @@
NRRD_NEW(nqdiff, submop);
if (nrrdQuantize(nucharScl, norigScl, NULL, 8)
|| nrrdUnquantize(nunquant, nucharScl, nrrdTypeDouble)
- || nrrdArithBinaryOp(nqdiff, nrrdBinaryOpSubtract,
- norigScl, nunquant)) {
+ || nrrdArithBinaryOp(nqdiff, nrrdBinaryOpSubtract, norigScl, nunquant)) {
airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
fprintf(stderr, "trouble quantizing and back:\n%s", err);
- airMopError(submop); airMopError(mop); return 1;
+ airMopError(submop);
+ airMopError(mop);
+ return 1;
}
- if (!( nucharScl->oldMin == omin
- && nucharScl->oldMax == omax )) {
+ if (!(nucharScl->oldMin == omin && nucharScl->oldMax == omax)) {
fprintf(stderr, "quantization range [%g,%g] != real range [%g,%g]\n",
nucharScl->oldMin, nucharScl->oldMax, omin, omax);
- airMopError(submop); airMopError(mop); return 1;
+ airMopError(submop);
+ airMopError(mop);
+ return 1;
}
{
double *qdiff, *unquant;
@@ -138,22 +132,25 @@
/* empirically determined tolerance, which had to be increased in
order to work under valgrind (!)- perhaps because of a
difference in the use of 80-bit registers */
- double epsilon=0.50000000000004;
+ double epsilon = 0.50000000000004;
qdiff = AIR_CAST(double *, nqdiff->data);
unquant = AIR_CAST(double *, nunquant->data);
- for (ii=0; ii<nn; ii++) {
+ for (ii = 0; ii < nn; ii++) {
double dd;
/* with infinite precision, the max difference between original and
quantized values should be exactly half the width (in value)
of 1/256 of value range ==> dd = 0.5 */
- dd = qdiff[ii]*256/(omax - omin);
+ dd = qdiff[ii] * 256 / (omax - omin);
if (AIR_ABS(dd) > epsilon) {
unsigned int ui;
ui = AIR_CAST(unsigned int, ii);
- fprintf(stderr, "|orig[%u]=%.17g - unquant=%.17g|*256/%.17g "
- "= %.17g > %.17g!\n", ui, origScl[ii], unquant[ii],
- omax - omin, AIR_ABS(dd), epsilon);
- airMopError(submop); airMopError(mop); return 1;
+ fprintf(stderr,
+ "|orig[%u]=%.17g - unquant=%.17g|*256/%.17g "
+ "= %.17g > %.17g!\n",
+ ui, origScl[ii], unquant[ii], omax - omin, AIR_ABS(dd), epsilon);
+ airMopError(submop);
+ airMopError(mop);
+ return 1;
}
}
}
@@ -162,7 +159,7 @@
/* --------------------------------------------------------------- */
/* Converting to all other types */
- for (typi=nrrdTypeUnknown+1; typi<nrrdTypeLast; typi++) {
+ for (typi = nrrdTypeUnknown + 1; typi < nrrdTypeLast; typi++) {
if (nrrdTypeBlock == typi) {
nconvScl[typi] = NULL;
continue;
@@ -171,10 +168,11 @@
if (nrrdConvert(nconvScl[typi], nucharScl, typi)) {
airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
fprintf(stderr, "trouble converting:\n%s", err);
- airMopError(mop); return 1;
+ airMopError(mop);
+ return 1;
}
}
- for (supi=1; supi<=KERN_SIZE_MAX; supi++) {
+ for (supi = 1; supi <= KERN_SIZE_MAX; supi++) {
unsigned int pvii;
int E;
double kparm[1];
@@ -184,17 +182,17 @@
gageParmSet(gctx[0][supi], gageParmCheckIntegrals, AIR_TRUE);
kparm[0] = supi;
E = 0;
- if (!E) E |= gageKernelSet(gctx[0][supi], gageKernel00,
- nrrdKernelBoxSupportDebug, kparm);
+ if (!E)
+ E |= gageKernelSet(gctx[0][supi], gageKernel00, nrrdKernelBoxSupportDebug, kparm);
pvii = 0;
- for (typi=nrrdTypeUnknown+1; typi<nrrdTypeLast; typi++) {
+ for (typi = nrrdTypeUnknown + 1; typi < nrrdTypeLast; typi++) {
if (nrrdTypeBlock == typi) {
gpvl[0][typi][supi] = NULL;
continue;
}
- if (!E) E |= !(gpvl[0][typi][supi]
- = gagePerVolumeNew(gctx[0][supi], nconvScl[typi],
- gageKindScl));
+ if (!E)
+ E |= !(gpvl[0][typi][supi] = gagePerVolumeNew(gctx[0][supi], nconvScl[typi],
+ gageKindScl));
if (!E) E |= gagePerVolumeAttach(gctx[0][supi], gpvl[0][typi][supi]);
if (1 == supi) {
/* first time through this typi loop; its the occasion to
@@ -203,8 +201,7 @@
Having to do this is a symptom of bad API design in gage */
pvlIdx[typi] = pvii++;
}
- if (!E) E |= gageQueryItemOn(gctx[0][supi], gpvl[0][typi][supi],
- gageSclValue);
+ if (!E) E |= gageQueryItemOn(gctx[0][supi], gpvl[0][typi][supi], gageSclValue);
if (E) {
break;
}
@@ -212,16 +209,18 @@
if (!E) E |= gageUpdate(gctx[0][supi]);
if (E) {
airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways);
- fprintf(stderr, "trouble (supi=%u, %d/%s) set-up:\n%s\n",
- supi, typi, airEnumStr(nrrdType, typi), err);
- airMopError(mop); return 1;
+ fprintf(stderr, "trouble (supi=%u, %d/%s) set-up:\n%s\n", supi, typi,
+ airEnumStr(nrrdType, typi), err);
+ airMopError(mop);
+ return 1;
}
if (gctx[0][supi]->radius != supi) {
- fprintf(stderr, "supi %u != gageContext->radius %u\n",
- supi, gctx[0][supi]->radius);
- airMopError(mop); return 1;
+ fprintf(stderr, "supi %u != gageContext->radius %u\n", supi,
+ gctx[0][supi]->radius);
+ airMopError(mop);
+ return 1;
}
- for (typi=nrrdTypeUnknown+1; typi<nrrdTypeLast; typi++) {
+ for (typi = nrrdTypeUnknown + 1; typi < nrrdTypeLast; typi++) {
if (nrrdTypeBlock == typi) {
vansScl[0][typi][supi] = NULL;
gansScl[0][typi][supi] = NULL;
@@ -228,25 +227,25 @@
hansScl[0][typi][supi] = NULL;
continue;
}
- vansScl[0][typi][supi] =
- gageAnswerPointer(gctx[0][supi], gpvl[0][typi][supi], gageSclValue);
- gansScl[0][typi][supi] =
- gageAnswerPointer(gctx[0][supi], gpvl[0][typi][supi], gageSclGradVec);
- hansScl[0][typi][supi] =
- gageAnswerPointer(gctx[0][supi], gpvl[0][typi][supi], gageSclHessian);
+ vansScl[0][typi][supi] = gageAnswerPointer(gctx[0][supi], gpvl[0][typi][supi],
+ gageSclValue);
+ gansScl[0][typi][supi] = gageAnswerPointer(gctx[0][supi], gpvl[0][typi][supi],
+ gageSclGradVec);
+ hansScl[0][typi][supi] = gageAnswerPointer(gctx[0][supi], gpvl[0][typi][supi],
+ gageSclHessian);
}
}
/* --------------------------------------------------------------- */
/* Exercising gageContextCopy */
- for (supi=1; supi<=KERN_SIZE_MAX; supi++) {
+ for (supi = 1; supi <= KERN_SIZE_MAX; supi++) {
if (!(gctx[1][supi] = gageContextCopy(gctx[0][supi]))) {
airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways);
- fprintf(stderr, "trouble copying gctx[%u]:\n%s\n",
- supi, err);
- airMopError(mop); return 1;
+ fprintf(stderr, "trouble copying gctx[%u]:\n%s\n", supi, err);
+ airMopError(mop);
+ return 1;
}
- for (typi=nrrdTypeUnknown+1; typi<nrrdTypeLast; typi++) {
+ for (typi = nrrdTypeUnknown + 1; typi < nrrdTypeLast; typi++) {
if (nrrdTypeBlock == typi) {
vansScl[1][typi][supi] = NULL;
gansScl[1][typi][supi] = NULL;
@@ -254,12 +253,12 @@
continue;
}
gpvl[1][typi][supi] = gctx[1][supi]->pvl[pvlIdx[typi]];
- vansScl[1][typi][supi] =
- gageAnswerPointer(gctx[1][supi], gpvl[1][typi][supi], gageSclValue);
- gansScl[1][typi][supi] =
- gageAnswerPointer(gctx[1][supi], gpvl[1][typi][supi], gageSclGradVec);
- hansScl[1][typi][supi] =
- gageAnswerPointer(gctx[1][supi], gpvl[1][typi][supi], gageSclHessian);
+ vansScl[1][typi][supi] = gageAnswerPointer(gctx[1][supi], gpvl[1][typi][supi],
+ gageSclValue);
+ gansScl[1][typi][supi] = gageAnswerPointer(gctx[1][supi], gpvl[1][typi][supi],
+ gageSclGradVec);
+ hansScl[1][typi][supi] = gageAnswerPointer(gctx[1][supi], gpvl[1][typi][supi],
+ gageSclHessian);
}
}
@@ -270,16 +269,15 @@
Because nrrdKernelBoxSupportDebug has already been set prior to
the first pass, there is some some second-time only "if (1 ==
probePass)" logic that confuses the clarity of this */
- for (probePass=0; probePass<=1; probePass++) {
- unsigned int prbi, lastjj=0, xi, yi, zi;
- double thet, xu, yu, zu, dxi, dyi, dzi,
- elapsed[2][KERN_SIZE_MAX+1], time0;
- char errpre[AIR_STRLEN_LARGE];
+ for (probePass = 0; probePass <= 1; probePass++) {
+ unsigned int prbi, lastjj = 0, xi, yi, zi;
+ double thet, xu, yu, zu, dxi, dyi, dzi, elapsed[2][KERN_SIZE_MAX + 1], time0;
+ char errpre[AIR_STRLEN_LARGE + 1];
if (1 == probePass) {
/* switch to cos^4 kernel, turn on gradient and hessian */
- for (cti=0; cti<2; cti++) {
- for (supi=1; supi<=KERN_SIZE_MAX; supi++) {
+ for (cti = 0; cti < 2; cti++) {
+ for (supi = 1; supi <= KERN_SIZE_MAX; supi++) {
int E;
double kparm[1];
gageParmSet(gctx[cti][supi], gageParmRenormalize, AIR_FALSE);
@@ -286,22 +284,27 @@
gageParmSet(gctx[cti][supi], gageParmCheckIntegrals, AIR_TRUE);
kparm[0] = supi;
E = 0;
- if (!E) E |= gageKernelSet(gctx[cti][supi], gageKernel00,
- nrrdKernelCos4SupportDebug, kparm);
- if (!E) E |= gageKernelSet(gctx[cti][supi], gageKernel11,
- nrrdKernelCos4SupportDebugD, kparm);
- if (!E) E |= gageKernelSet(gctx[cti][supi], gageKernel22,
- nrrdKernelCos4SupportDebugDD, kparm);
- for (typi=nrrdTypeUnknown+1; typi<nrrdTypeLast; typi++) {
+ if (!E)
+ E |= gageKernelSet(gctx[cti][supi], gageKernel00, nrrdKernelCos4SupportDebug,
+ kparm);
+ if (!E)
+ E |= gageKernelSet(gctx[cti][supi], gageKernel11,
+ nrrdKernelCos4SupportDebugD, kparm);
+ if (!E)
+ E |= gageKernelSet(gctx[cti][supi], gageKernel22,
+ nrrdKernelCos4SupportDebugDD, kparm);
+ for (typi = nrrdTypeUnknown + 1; typi < nrrdTypeLast; typi++) {
if (nrrdTypeBlock == typi) {
continue;
}
- if (!E) E |= gageQueryItemOn(gctx[cti][supi],
- gpvl[cti][typi][supi],
- gageSclGradVec);
- if (!E) E |= gageQueryItemOn(gctx[cti][supi],
- gpvl[cti][typi][supi],
- gageSclHessian);
+ if (!E)
+ E |= gageQueryItemOn(gctx[cti][supi],
+ gpvl[cti][typi][supi],
+ gageSclGradVec);
+ if (!E)
+ E |= gageQueryItemOn(gctx[cti][supi],
+ gpvl[cti][typi][supi],
+ gageSclHessian);
if (E) {
break;
}
@@ -309,30 +312,32 @@
if (!E) E |= gageUpdate(gctx[cti][supi]);
if (E) {
airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways);
- fprintf(stderr, "trouble (cti=%u, supi=%u, %d/%s) "
- "set-up:\n%s\n", cti,
- supi, typi, airEnumStr(nrrdType, typi), err);
- airMopError(mop); return 1;
+ fprintf(stderr,
+ "trouble (cti=%u, supi=%u, %d/%s) "
+ "set-up:\n%s\n",
+ cti, supi, typi, airEnumStr(nrrdType, typi), err);
+ airMopError(mop);
+ return 1;
}
}
}
}
- for (cti=0; cti<2; cti++) {
- for (supi=1; supi<=KERN_SIZE_MAX; supi++) {
+ for (cti = 0; cti < 2; cti++) {
+ for (supi = 1; supi <= KERN_SIZE_MAX; supi++) {
elapsed[cti][supi] = 0.0;
}
}
/* do the probes along a curvy path */
- for (prbi=0; prbi<PROBE_NUM; prbi++) {
+ for (prbi = 0; prbi < PROBE_NUM; prbi++) {
unsigned int jj;
- jj = airIndex(0, prbi, PROBE_NUM-1, subnum);
- thet = AIR_AFFINE(0, jj, subnum-1, 0.0, AIR_PI);
- xu = -cos(5*thet);
- yu = -cos(3*thet);
+ jj = airIndex(0, prbi, PROBE_NUM - 1, subnum);
+ thet = AIR_AFFINE(0, jj, subnum - 1, 0.0, AIR_PI);
+ xu = -cos(5 * thet);
+ yu = -cos(3 * thet);
zu = -cos(thet);
- dxi = AIR_AFFINE(-1.0, xu, 1.0, -0.5, dsx-0.5);
- dyi = AIR_AFFINE(-1.0, yu, 1.0, -0.5, dsy-0.5);
- dzi = AIR_AFFINE(-1.0, zu, 1.0, -0.5, dsz-0.5);
+ dxi = AIR_AFFINE(-1.0, xu, 1.0, -0.5, dsx - 0.5);
+ dyi = AIR_AFFINE(-1.0, yu, 1.0, -0.5, dsy - 0.5);
+ dzi = AIR_AFFINE(-1.0, zu, 1.0, -0.5, dsz - 0.5);
if (prbi && lastjj == jj) {
/* this occasionally tests the logic in gage that seeks to
re-compute convolution weights only when necessary */
@@ -340,27 +345,25 @@
dyi += airSgn(yu);
dzi += airSgn(zu);
}
- xi = airIndexClamp(-0.5, dxi, dsx-0.5, sx);
- yi = airIndexClamp(-0.5, dyi, dsy-0.5, sy);
- zi = airIndexClamp(-0.5, dzi, dsz-0.5, sz);
+ xi = airIndexClamp(-0.5, dxi, dsx - 0.5, sx);
+ yi = airIndexClamp(-0.5, dyi, dsy - 0.5, sy);
+ zi = airIndexClamp(-0.5, dzi, dsz - 0.5, sz);
lastjj = jj;
- for (supi=1; supi<=KERN_SIZE_MAX; supi++) {
- double truevalOrig[NRRD_TYPE_MAX+1];
- for (cti=0; cti<2; cti++) {
+ for (supi = 1; supi <= KERN_SIZE_MAX; supi++) {
+ double truevalOrig[NRRD_TYPE_MAX + 1];
+ for (cti = 0; cti < 2; cti++) {
time0 = airTime();
- if (gageProbeSpace(gctx[cti][supi], dxi, dyi, dzi,
- AIR_TRUE /* indexSpace */,
+ if (gageProbeSpace(gctx[cti][supi], dxi, dyi, dzi, AIR_TRUE /* indexSpace */,
AIR_TRUE /* clamp */)) {
- fprintf(stderr, "probe (cti %u support %u) error (%d): %s\n",
- cti, supi,
+ fprintf(stderr, "probe (cti %u support %u) error (%d): %s\n", cti, supi,
gctx[cti][supi]->errNum, gctx[cti][supi]->errStr);
- airMopError(mop); return 1;
+ airMopError(mop);
+ return 1;
}
elapsed[cti][supi] = airTime() - time0;
- for (typi=nrrdTypeUnknown+1; typi<nrrdTypeLast; typi++) {
+ for (typi = nrrdTypeUnknown + 1; typi < nrrdTypeLast; typi++) {
double arrayval, trueval, probeval;
- if (nrrdTypeBlock == typi
- || (1 == probePass && nrrdTypeChar == typi)) {
+ if (nrrdTypeBlock == typi || (1 == probePass && nrrdTypeChar == typi)) {
/* can't easily correct interpolation on signed char
values to make it match interpolation on unsigned char
values, prior to wrap-around */
@@ -372,20 +375,20 @@
/* arrayval is the value directly from array of same type
(converted from original uchar) */
arrayval = (nrrdDLookup[typi])(nconvScl[typi]->data,
- xi + sx*(yi + sy*zi));
+ xi + sx * (yi + sy * zi));
/* when using box, gage-reconstructed value should
match value from probing */
if (arrayval != probeval) {
-#define SPRINT_ERR_PREFIX \
- errPrefix(errpre, typi, supi, prbi, probePass, \
- dxi, dyi, dzi, xi, yi, zi)
+#define SPRINT_ERR_PREFIX \
+ errPrefix(errpre, typi, supi, prbi, probePass, dxi, dyi, dzi, xi, yi, zi)
SPRINT_ERR_PREFIX;
- fprintf(stderr, "%s: (cti %u) probed %g != conv %g\n", errpre,
- cti, probeval, arrayval);
- airMopError(mop); return 1;
+ fprintf(stderr, "%s: (cti %u) probed %g != conv %g\n", errpre, cti,
+ probeval, arrayval);
+ airMopError(mop);
+ return 1;
}
/* trueval on pass 0 is the original uchar value */
- trueval = AIR_CAST(double, ucharScl[xi + sx*(yi + sy*zi)]);
+ trueval = AIR_CAST(double, ucharScl[xi + sx * (yi + sy * zi)]);
} else {
/* trueval on pass 1 is the value from probing uchar volume */
trueval = vansScl[cti][nrrdTypeUChar][supi][0];
@@ -401,9 +404,10 @@
(trueval) is same result as original (truevalOrig[typi]) */
if (truevalOrig[typi] != trueval) {
SPRINT_ERR_PREFIX;
- fprintf(stderr, "%s: original->%g, gageContextCopy->%g\n",
- errpre, truevalOrig[typi], trueval);
- airMopError(mop); return 1;
+ fprintf(stderr, "%s: original->%g, gageContextCopy->%g\n", errpre,
+ truevalOrig[typi], trueval);
+ airMopError(mop);
+ return 1;
}
}
/* regardless of the volume (excepting where we've continue'd,
@@ -410,9 +414,10 @@
above) the reconstructed value probeval should match trueval */
if (trueval != probeval) {
SPRINT_ERR_PREFIX;
- fprintf(stderr, "%s: (cti %u) probed %g != true %g\n", errpre,
- cti, probeval, trueval);
- airMopError(mop); return 1;
+ fprintf(stderr, "%s: (cti %u) probed %g != true %g\n", errpre, cti,
+ probeval, trueval);
+ airMopError(mop);
+ return 1;
}
if (1 == probePass) {
/* and when we use a differentiable kernel, the gradient
@@ -423,9 +428,10 @@
gansScl[cti][typi][supi]);
if (ELL_3V_LEN(diff3) > 0.0) {
SPRINT_ERR_PREFIX;
- fprintf(stderr, "%s: (cti %u) probed gradient error len %f\n",
- errpre, cti, ELL_3V_LEN(diff3));
- airMopError(mop); return 1;
+ fprintf(stderr, "%s: (cti %u) probed gradient error len %f\n", errpre,
+ cti, ELL_3V_LEN(diff3));
+ airMopError(mop);
+ return 1;
}
ELL_9V_SUB(diff9,
hansScl[cti][nrrdTypeUChar][supi],
@@ -432,9 +438,10 @@
hansScl[cti][typi][supi]);
if (ELL_9V_LEN(diff9) > 0.0) {
SPRINT_ERR_PREFIX;
- fprintf(stderr, "%s: (cti %u) probed hessian error len %f\n",
- errpre, cti, ELL_9V_LEN(diff9));
- airMopError(mop); return 1;
+ fprintf(stderr, "%s: (cti %u) probed hessian error len %f\n", errpre,
+ cti, ELL_9V_LEN(diff9));
+ airMopError(mop);
+ return 1;
}
}
}
@@ -441,10 +448,10 @@
}
}
}
- for (cti=0; cti<2; cti++) {
- for (supi=1; supi<=KERN_SIZE_MAX; supi++) {
- fprintf(stderr, "elapsed[%u][%u] = %g ms\n",
- cti, supi, 1000*elapsed[cti][supi]);
+ for (cti = 0; cti < 2; cti++) {
+ for (supi = 1; supi <= KERN_SIZE_MAX; supi++) {
+ fprintf(stderr, "elapsed[%u][%u] = %g ms\n", cti, supi,
+ 1000 * elapsed[cti][supi]);
}
}
}
Modified: teem/trunk/Testing/gage/probeScl.c
===================================================================
--- teem/trunk/Testing/gage/probeScl.c 2024-07-17 17:53:02 UTC (rev 7216)
+++ teem/trunk/Testing/gage/probeScl.c 2024-07-17 17:54:47 UTC (rev 7217)
@@ -30,7 +30,7 @@
*/
#define INTERP_KERN_NUM 4
-#define BLUR_KERN_NUM 5
+#define BLUR_KERN_NUM 5
int
main(int argc, const char **argv) {
@@ -51,11 +51,7 @@
const NrrdKernel *bkernD[BLUR_KERN_NUM];
const NrrdKernel *bkernDD[BLUR_KERN_NUM];
double bkparm[BLUR_KERN_NUM][NRRD_KERNEL_PARMS_NUM] = {
- {1.0},
- {AIR_NAN},
- {AIR_NAN},
- {2.0, 1.0, 0.0},
- {1.2, 5.0},
+ {1.0}, {AIR_NAN}, {AIR_NAN}, {2.0, 1.0, 0.0}, {1.2, 5.0},
};
const double *ivalAns[INTERP_KERN_NUM], *bvalAns[BLUR_KERN_NUM],
*bgrdAns[BLUR_KERN_NUM], *bhesAns[BLUR_KERN_NUM];
@@ -94,16 +90,16 @@
if (nrrdLoad(nscl, fullname, NULL)) {
char *err;
airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
- fprintf(stderr, "%s: trouble reading data \"%s\":\n%s",
- me, fullname, err);
- airMopError(mop); return 1;
+ fprintf(stderr, "%s: trouble reading data \"%s\":\n%s", me, fullname, err);
+ airMopError(mop);
+ return 1;
}
/* make sure its a double-type volume (assumed below) */
if (nrrdTypeDouble != nscl->type) {
fprintf(stderr, "%s: volume type %s != expected type %s\n", me,
- airEnumStr(nrrdType, nscl->type),
- airEnumStr(nrrdType, nrrdTypeDouble));
- airMopError(mop); return 1;
+ airEnumStr(nrrdType, nscl->type), airEnumStr(nrrdType, nrrdTypeDouble));
+ airMopError(mop);
+ return 1;
}
dscl = AIR_CAST(double *, nscl->data);
sx = AIR_CAST(unsigned int, nscl->axis[0].size);
@@ -110,7 +106,7 @@
sy = AIR_CAST(unsigned int, nscl->axis[1].size);
sz = AIR_CAST(unsigned int, nscl->axis[2].size);
- for (ki=0; ki<INTERP_KERN_NUM; ki++) {
+ for (ki = 0; ki < INTERP_KERN_NUM; ki++) {
gagePerVolume *gpvl;
igctx[ki] = gageContextNew();
airMopAdd(mop, igctx[ki], (airMopper)gageContextNix, airMopAlways);
@@ -119,8 +115,7 @@
gageParmSet(igctx[ki], gageParmOrientationFromSpacing, AIR_FALSE);
E = 0;
if (!E) E |= !(gpvl = gagePerVolumeNew(igctx[ki], nscl, gageKindScl));
- if (!E) E |= gageKernelSet(igctx[ki], gageKernel00,
- ikern[ki], ikparm[ki]);
+ if (!E) E |= gageKernelSet(igctx[ki], gageKernel00, ikern[ki], ikparm[ki]);
if (!E) E |= gagePerVolumeAttach(igctx[ki], gpvl);
if (!E) E |= gageQueryItemOn(igctx[ki], gpvl, gageSclValue);
if (!E) E |= gageUpdate(igctx[ki]);
@@ -127,9 +122,9 @@
if (E) {
char *err;
airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways);
- fprintf(stderr, "%s: trouble %s set-up:\n%s\n", me,
- ikern[ki]->name, err);
- airMopError(mop); return 1;
+ fprintf(stderr, "%s: trouble %s set-up:\n%s\n", me, ikern[ki]->name, err);
+ airMopError(mop);
+ return 1;
}
ivalAns[ki] = gageAnswerPointer(igctx[ki], gpvl, gageSclValue);
}
@@ -140,27 +135,29 @@
unsigned int xi, yi, zi;
double pval[INTERP_KERN_NUM], err, rval;
int pret;
- for (zi=0; zi<sz; zi++) {
- for (yi=0; yi<sy; yi++) {
- for (xi=0; xi<sx; xi++) {
- rval = dscl[xi + sx*(yi + sy*zi)];
- for (ki=0; ki<INTERP_KERN_NUM; ki++) {
- pret = gageProbeSpace(igctx[ki], xi, yi, zi,
- AIR_TRUE /* indexSpace */,
+ for (zi = 0; zi < sz; zi++) {
+ for (yi = 0; yi < sy; yi++) {
+ for (xi = 0; xi < sx; xi++) {
+ rval = dscl[xi + sx * (yi + sy * zi)];
+ for (ki = 0; ki < INTERP_KERN_NUM; ki++) {
+ pret = gageProbeSpace(igctx[ki], xi, yi, zi, AIR_TRUE /* indexSpace */,
AIR_FALSE /* clamp */);
if (pret) {
- fprintf(stderr, "%s: %s probe error(%d): %s\n", me,
- ikern[ki]->name, igctx[ki]->errNum, igctx[ki]->errStr);
+ fprintf(stderr, "%s: %s probe error(%d): %s\n", me, ikern[ki]->name,
+ igctx[ki]->errNum, igctx[ki]->errStr);
- airMopError(mop); return 1;
+ airMopError(mop);
+ return 1;
}
pval[ki] = *ivalAns[ki];
err = AIR_ABS(rval - pval[ki]);
if (err) {
- fprintf(stderr, "%s: interp's [%u,%u,%u] %s probe %f "
- "!= true %f (err %f)\n", me, xi, yi, zi,
- ikern[ki]->name, pval[ki], rval, err);
- airMopError(mop); return 1;
+ fprintf(stderr,
+ "%s: interp's [%u,%u,%u] %s probe %f "
+ "!= true %f (err %f)\n",
+ me, xi, yi, zi, ikern[ki]->name, pval[ki], rval, err);
+ airMopError(mop);
+ return 1;
}
}
}
@@ -170,7 +167,7 @@
/* set up contexts for non-interpolating (blurring) kernels,
and their first and second derivatives */
- for (ki=0; ki<BLUR_KERN_NUM; ki++) {
+ for (ki = 0; ki < BLUR_KERN_NUM; ki++) {
gagePerVolume *gpvl;
bgctx[ki] = gageContextNew();
airMopAdd(mop, bgctx[ki], (airMopper)gageContextNix, airMopAlways);
@@ -179,12 +176,9 @@
gageParmSet(bgctx[ki], gageParmOrientationFromSpacing, AIR_FALSE);
E = 0;
if (!E) E |= !(gpvl = gagePerVolumeNew(bgctx[ki], nscl, gageKindScl));
- if (!E) E |= gageKernelSet(bgctx[ki], gageKernel00,
- bkern[ki], bkparm[ki]);
- if (!E) E |= gageKernelSet(bgctx[ki], gageKernel11,
- bkernD[ki], bkparm[ki]);
- if (!E) E |= gageKernelSet(bgctx[ki], gageKernel22,
- bkernDD[ki], bkparm[ki]);
+ if (!E) E |= gageKernelSet(bgctx[ki], gageKernel00, bkern[ki], bkparm[ki]);
+ if (!E) E |= gageKernelSet(bgctx[ki], gageKernel11, bkernD[ki], bkparm[ki]);
+ if (!E) E |= gageKernelSet(bgctx[ki], gageKernel22, bkernDD[ki], bkparm[ki]);
if (!E) E |= gagePerVolumeAttach(bgctx[ki], gpvl);
if (!E) E |= gageQueryItemOn(bgctx[ki], gpvl, gageSclValue);
if (!E) E |= gageQueryItemOn(bgctx[ki], gpvl, gageSclGradVec);
@@ -193,9 +187,9 @@
if (E) {
char *err;
airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways);
- fprintf(stderr, "%s: trouble %s set-up:\n%s\n", me,
- bkern[ki]->name, err);
- airMopError(mop); return 1;
+ fprintf(stderr, "%s: trouble %s set-up:\n%s\n", me, bkern[ki]->name, err);
+ airMopError(mop);
+ return 1;
}
fprintf(stderr, "%s radius = %u\n", bkern[ki]->name, bgctx[ki]->radius);
bvalAns[ki] = gageAnswerPointer(bgctx[ki], gpvl, gageSclValue);
@@ -205,12 +199,11 @@
{
#define POS_NUM 12
- double xp[POS_NUM], yp[POS_NUM], zp[POS_NUM],
- pos[POS_NUM*POS_NUM*POS_NUM][3], *prbd,
- offs[POS_NUM/2] = {0, 1.22222, 2.444444, 3.777777, 5.88888, 7.55555};
+ double xp[POS_NUM], yp[POS_NUM], zp[POS_NUM], pos[POS_NUM * POS_NUM * POS_NUM][3],
+ *prbd, offs[POS_NUM / 2] = {0, 1.22222, 2.444444, 3.777777, 5.88888, 7.55555};
Nrrd *nprbd, *ncorr;
unsigned int ii, jj, kk, qlen = 1 + 3 + 9;
- char *corrfn, explain[AIR_STRLEN_LARGE];
+ char *corrfn, explain[AIR_STRLEN_LARGE + 1];
int pret, differ;
corrfn = testDataPathPrefix("test/probeSclAns.nrrd");
@@ -220,64 +213,65 @@
if (nrrdLoad(ncorr, corrfn, NULL)) {
char *err;
airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
- fprintf(stderr, "%s: trouble reading data \"%s\":\n%s",
- me, corrfn, err);
- airMopError(mop); return 1;
+ fprintf(stderr, "%s: trouble reading data \"%s\":\n%s", me, corrfn, err);
+ airMopError(mop);
+ return 1;
}
- for (ii=0; ii<POS_NUM/2; ii++) {
+ for (ii = 0; ii < POS_NUM / 2; ii++) {
xp[ii] = yp[ii] = zp[ii] = offs[ii];
- xp[POS_NUM-1-ii] = AIR_CAST(double, sx)-1.0-offs[ii];
- yp[POS_NUM-1-ii] = AIR_CAST(double, sy)-1.0-offs[ii];
- zp[POS_NUM-1-ii] = AIR_CAST(double, sz)-1.0-offs[ii];
+ xp[POS_NUM - 1 - ii] = AIR_CAST(double, sx) - 1.0 - offs[ii];
+ yp[POS_NUM - 1 - ii] = AIR_CAST(double, sy) - 1.0 - offs[ii];
+ zp[POS_NUM - 1 - ii] = AIR_CAST(double, sz) - 1.0 - offs[ii];
}
- for (kk=0; kk<POS_NUM; kk++) {
- for (jj=0; jj<POS_NUM; jj++) {
- for (ii=0; ii<POS_NUM; ii++) {
- ELL_3V_SET(pos[ii + POS_NUM*(jj + POS_NUM*kk)],
- xp[ii], yp[jj], zp[kk]);
+ for (kk = 0; kk < POS_NUM; kk++) {
+ for (jj = 0; jj < POS_NUM; jj++) {
+ for (ii = 0; ii < POS_NUM; ii++) {
+ ELL_3V_SET(pos[ii + POS_NUM * (jj + POS_NUM * kk)], xp[ii], yp[jj], zp[kk]);
}
}
}
nprbd = nrrdNew();
airMopAdd(mop, nprbd, (airMopper)nrrdNuke, airMopAlways);
- if (nrrdMaybeAlloc_va(nprbd, nrrdTypeDouble, 3,
- AIR_CAST(size_t, qlen),
+ if (nrrdMaybeAlloc_va(nprbd, nrrdTypeDouble, 3, AIR_CAST(size_t, qlen),
AIR_CAST(size_t, BLUR_KERN_NUM),
- AIR_CAST(size_t, POS_NUM*POS_NUM*POS_NUM))) {
+ AIR_CAST(size_t, POS_NUM * POS_NUM * POS_NUM))) {
char *err;
airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
fprintf(stderr, "%s: trouble setting up prbd:\n%s", me, err);
- airMopError(mop); return 1;
+ airMopError(mop);
+ return 1;
}
prbd = AIR_CAST(double *, nprbd->data);
- for (ii=0; ii<POS_NUM*POS_NUM*POS_NUM; ii++) {
- for (ki=0; ki<BLUR_KERN_NUM; ki++) {
+ for (ii = 0; ii < POS_NUM * POS_NUM * POS_NUM; ii++) {
+ for (ki = 0; ki < BLUR_KERN_NUM; ki++) {
pret = gageProbeSpace(bgctx[ki], pos[ii][0], pos[ii][1], pos[ii][2],
- AIR_TRUE /* indexSpace */,
- AIR_FALSE /* clamp */);
+ AIR_TRUE /* indexSpace */, AIR_FALSE /* clamp */);
if (pret) {
- fprintf(stderr, "%s: %s probe error(%d): %s\n", me,
- bkern[ki]->name, bgctx[ki]->errNum, bgctx[ki]->errStr);
- airMopError(mop); return 1;
+ fprintf(stderr, "%s: %s probe error(%d): %s\n", me, bkern[ki]->name,
+ bgctx[ki]->errNum, bgctx[ki]->errStr);
+ airMopError(mop);
+ return 1;
}
- prbd[0 + qlen*(ki + BLUR_KERN_NUM*(ii))] = bvalAns[ki][0];
- ELL_3V_COPY(prbd + 1 + qlen*(ki + BLUR_KERN_NUM*(ii)), bgrdAns[ki]);
- ELL_9V_COPY(prbd + 4 + qlen*(ki + BLUR_KERN_NUM*(ii)), bhesAns[ki]);
+ prbd[0 + qlen * (ki + BLUR_KERN_NUM * (ii))] = bvalAns[ki][0];
+ ELL_3V_COPY(prbd + 1 + qlen * (ki + BLUR_KERN_NUM * (ii)), bgrdAns[ki]);
+ ELL_9V_COPY(prbd + 4 + qlen * (ki + BLUR_KERN_NUM * (ii)), bhesAns[ki]);
}
}
/* HEY: weirdly, so far its only on Windows (and more than 10 times worse
on Cygwin) this epsilon needs to be larger than zero, and only for the
radius 6 Gaussian? */
- if (nrrdCompare(ncorr, nprbd, AIR_FALSE /* onlyData */,
- 8.0e-14 /* epsilon */, &differ, explain)) {
+ if (nrrdCompare(ncorr, nprbd, AIR_FALSE /* onlyData */, 8.0e-14 /* epsilon */,
+ &differ, explain)) {
char *err;
airMopAdd(mop, err = biffGetDone(NRRD), airFree, airMopAlways);
fprintf(stderr, "%s: trouble comparing:\n%s", me, err);
- airMopError(mop); return 1;
+ airMopError(mop);
+ return 1;
}
if (differ) {
fprintf(stderr, "%s: probed values not correct: %s\n", me, explain);
- airMopError(mop); return 1;
+ airMopError(mop);
+ return 1;
} else {
fprintf(stderr, "all good\n");
}
Modified: teem/trunk/Testing/gage/tsbp.c
===================================================================
--- teem/trunk/Testing/gage/tsbp.c 2024-07-17 17:53:02 UTC (rev 7216)
+++ teem/trunk/Testing/gage/tsbp.c 2024-07-17 17:54:47 UTC (rev 7217)
@@ -37,16 +37,17 @@
gageStackBlurParm *sbp, *sbq;
airArray *mop;
char *err;
-char buff[AIR_STRLEN_LARGE];
+char buff[AIR_STRLEN_LARGE + 1];
void
parseFailOrDie(const char *str) {
- static const char me[]="parseFailOrDie";
+ static const char me[] = "parseFailOrDie";
fprintf(stderr, "%s(\"%s\"): ", me, str);
if (!gageStackBlurParmParse(sbp, extraFlag, &extraParm, str)) {
fprintf(stderr, "problem did NOT fail!\n");
- airMopError(mop); exit(1);
+ airMopError(mop);
+ exit(1);
}
/* else good, we got an error */
airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways);
@@ -56,21 +57,22 @@
void
parseOrDie(const char *str) {
- static const char me[]="parseOrDie";
+ static const char me[] = "parseOrDie";
int differ;
- char explain[AIR_STRLEN_LARGE]="!explain_not_set!";
+ char explain[AIR_STRLEN_LARGE + 1] = "!explain_not_set!";
if (gageStackBlurParmParse(sbp, extraFlag, &extraParm, str)
|| gageStackBlurParmSprint(buff, sbp, extraFlag, extraParm)) {
airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways);
- fprintf(stderr, "%s: failed to parse \"%s\" or then sprint: %s\n",
- me, str, err);
- airMopError(mop); exit(1);
+ fprintf(stderr, "%s: failed to parse \"%s\" or then sprint: %s\n", me, str, err);
+ airMopError(mop);
+ exit(1);
}
if (gageStackBlurParmParse(sbq, extraFlag, &extraParm, str)) {
airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways);
fprintf(stderr, "%s: failed to parse \"%s\": %s\n", me, str, err);
- airMopError(mop); exit(1);
+ airMopError(mop);
+ exit(1);
}
/* can tweak sbq here to make sure compare is working */
/*
@@ -85,16 +87,16 @@
nrrdBoundarySpecParse(sbp->bspec, "pad:3");
nrrdBoundarySpecParse(sbq->bspec, "pad:2");
*/
- if (gageStackBlurParmCompare(sbp, "first", sbq, "second",
- &differ, explain)) {
+ if (gageStackBlurParmCompare(sbp, "first", sbq, "second", &differ, explain)) {
airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways);
fprintf(stderr, "%s: failed to compare: %s", me, err);
- airMopError(mop); exit(1);
+ airMopError(mop);
+ exit(1);
}
if (differ) {
- fprintf(stderr, "%s: two sbps from same string differ: %s\n",
- me, explain);
- airMopError(mop); exit(1);
+ fprintf(stderr, "%s: two sbps from same string differ: %s\n", me, explain);
+ airMopError(mop);
+ exit(1);
}
printf("%s: \"%s\" -> \"%s\"\n", me, str, buff);
gageStackBlurParmInit(sbp);
@@ -102,13 +104,12 @@
return;
}
-static const char *sbpInfo =
- "for testing handling of stack blur parms";
+static const char *sbpInfo = "for testing handling of stack blur parms";
int
main(int argc, const char **argv) {
/* stock variables */
const char *me;
- hestOpt *hopt=NULL;
+ hestOpt *hopt = NULL;
hestParm *hparm;
/* variables specific to this program */
gageStackBlurParm **sbpv;
@@ -118,19 +119,20 @@
mop = airMopNew();
hparm = hestParmNew();
airMopAdd(mop, hparm, (airMopper)hestParmFree, airMopAlways);
- hestOptAdd(&hopt, "sbp", "sbp0", airTypeOther, 1, -1, &sbpv, NULL,
- "stack blur parms", &sbpNum, NULL, gageHestStackBlurParm);
- hestParseOrDie(hopt, argc-1, argv+1, hparm, me, sbpInfo,
- AIR_TRUE, AIR_TRUE, AIR_TRUE);
+ hestOptAdd(&hopt, "sbp", "sbp0", airTypeOther, 1, -1, &sbpv, NULL, "stack blur parms",
+ &sbpNum, NULL, gageHestStackBlurParm);
+ hestParseOrDie(hopt, argc - 1, argv + 1, hparm, me, sbpInfo, AIR_TRUE, AIR_TRUE,
+ AIR_TRUE);
airMopAdd(mop, hopt, (airMopper)hestOptFree, airMopAlways);
airMopAdd(mop, hopt, (airMopper)hestParseFree, airMopAlways);
printf("%s: command line options: ---------- \n", me);
- for (sbpIdx=0; sbpIdx<sbpNum; sbpIdx++) {
+ for (sbpIdx = 0; sbpIdx < sbpNum; sbpIdx++) {
if (gageStackBlurParmSprint(buff, sbpv[sbpIdx], NULL, NULL)) {
airMopAdd(mop, err = biffGetDone(GAGE), airFree, airMopAlways);
fprintf(stderr, "%s: problem with sbpv[%u]:%s", me, sbpIdx, err);
- airMopError(mop); return 1;
+ airMopError(mop);
+ return 1;
}
printf("%s: sbp[%u] = \"%s\"\n", me, sbpIdx, buff);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|