|
From: <kin...@us...> - 2023-07-15 12:12:57
|
Revision: 7104
http://sourceforge.net/p/teem/code/7104
Author: kindlmann
Date: 2023-07-15 12:12:55 +0000 (Sat, 15 Jul 2023)
Log Message:
-----------
like in unu: the PARSE (and the tend-specific JUSTPARSE) macros now take the INFO string, because it is part of how they respond to --help
Modified Paths:
--------------
teem/trunk/src/ten/privateTen.h
Modified: teem/trunk/src/ten/privateTen.h
===================================================================
--- teem/trunk/src/ten/privateTen.h 2023-07-14 16:58:11 UTC (rev 7103)
+++ teem/trunk/src/ten/privateTen.h 2023-07-15 12:12:55 UTC (rev 7104)
@@ -29,9 +29,9 @@
/* USAGE, PARSE: both copied verbatim from unrrdu/privateUnrrdu.h, but
** then some hacking was added . . .
*/
-#define USAGE(info) \
+#define USAGE(INFO) \
if (!argc && !hparm->noArgsIsNoProblem) { \
- hestInfo(stdout, me, (info), hparm); \
+ hestInfo(stdout, me, (INFO), hparm); \
hestUsage(stdout, hopt, me, hparm); \
hestGlossary(stdout, hopt, hparm); \
airMopError(mop); \
@@ -38,10 +38,10 @@
return 0; \
}
-/* JUSTPARSE is called by the tend functions that do *not* take an
+/* JUSTPARSE is used by the tend functions that do *not* take an
** input 7-component tensor volume
*/
-#define JUSTPARSE() \
+#define JUSTPARSE(INFO) \
if ((pret = hestParse(hopt, argc, argv, &perr, hparm))) { \
if (1 == pret) { \
fprintf(stderr, "%s: %s\n", me, perr); \
@@ -65,12 +65,12 @@
}
/*
-** PARSE is called by tend functions that do take a 7-component tensor
+** PARSE is used by tend functions that do take a 7-component tensor
** volume, so that as a hack, we can process 6-component volumes as well,
** by padding on the confidence channel (fixed at 1.0)
*/
-#define PARSE() \
- JUSTPARSE(); \
+#define PARSE(INFO) \
+ JUSTPARSE(INFO); \
if (4 == nin->dim && 6 == nin->axis[0].size && nrrdTypeBlock != nin->type) { \
ptrdiff_t padmin[4], padmax[4]; \
Nrrd *npadtmp; \
@@ -94,6 +94,10 @@
nrrdNuke(npadtmp); \
}
+/* convenience macros now that using INFO is part of how PARSE responds to --help */
+#define USAGE_PARSE(INFO) USAGE(INFO) PARSE(INFO)
+#define USAGE_JUSTPARSE(INFO) USAGE(INFO) JUSTPARSE(INFO)
+
/* enumsTen.c */
extern const airEnum _tenGage;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|