|
From: <kin...@us...> - 2023-07-08 12:25:46
|
Revision: 7057
http://sourceforge.net/p/teem/code/7057
Author: kindlmann
Date: 2023-07-08 12:25:44 +0000 (Sat, 08 Jul 2023)
Log Message:
-----------
Propagating AIR_STRLEN --> AIR_STRLEN+1 with API CHANGES to structs:
baneRange:
char name[AIR_STRLEN_SMALL + 1];
baneInc:
char name[AIR_STRLEN_SMALL + 1];
baneClip:
char name[AIR_STRLEN_SMALL + 1];
baneMeasr:
char name[AIR_STRLEN_SMALL + 1];
Modified Paths:
--------------
teem/trunk/src/bane/bane.h
teem/trunk/src/bane/gkmsFlotsam.c
teem/trunk/src/bane/hvol.c
teem/trunk/src/bane/trex.c
teem/trunk/src/bane/valid.c
Modified: teem/trunk/src/bane/bane.h
===================================================================
--- teem/trunk/src/bane/bane.h 2023-07-08 12:18:19 UTC (rev 7056)
+++ teem/trunk/src/bane/bane.h 2023-07-08 12:25:44 UTC (rev 7057)
@@ -92,7 +92,7 @@
** things used to operate on ranges
*/
typedef struct {
- char name[AIR_STRLEN_SMALL];
+ char name[AIR_STRLEN_SMALL + 1];
int type;
double center; /* for baneRangeAnywhere: nominal center of value range
NOTE: there is currently no API for setting this,
@@ -146,7 +146,7 @@
** from histNew should be eventually passed to nrrdNuke.
*/
typedef struct baneInc_t {
- char name[AIR_STRLEN_SMALL];
+ char name[AIR_STRLEN_SMALL + 1];
int type;
double S, SS;
int num; /* used for calculating standard dev */
@@ -182,7 +182,7 @@
** things used to calculate and describe clipping
*/
typedef struct {
- char name[AIR_STRLEN_SMALL];
+ char name[AIR_STRLEN_SMALL + 1];
int type;
double parm[BANE_PARM_NUM];
int (*answer)(int *countP, Nrrd *hvol, double *clipParm);
@@ -237,7 +237,7 @@
** things used to calculate and describe measurements
*/
typedef struct baneMeasr_t {
- char name[AIR_STRLEN_SMALL];
+ char name[AIR_STRLEN_SMALL + 1];
int type;
double parm[BANE_PARM_NUM];
gageQuery query; /* the gageScl query needed for this measure,
Modified: teem/trunk/src/bane/gkmsFlotsam.c
===================================================================
--- teem/trunk/src/bane/gkmsFlotsam.c 2023-07-08 12:18:19 UTC (rev 7056)
+++ teem/trunk/src/bane/gkmsFlotsam.c 2023-07-08 12:25:44 UTC (rev 7057)
@@ -33,7 +33,7 @@
** inc[1], inc[2] ... : incParm[0], incParm[1] ...
*/
static int
-baneGkmsParseIncStrategy(void *ptr, const char *str, char err[AIR_STRLEN_HUGE]) {
+baneGkmsParseIncStrategy(void *ptr, const char *str, char err[AIR_STRLEN_HUGE + 1]) {
static const char me[] = "baneGkmsParseIncStrategy";
double *inc, *incParm;
int i, bins;
@@ -90,9 +90,9 @@
/* ----------------------------------------------------------- */
static int
-baneGkmsParseBEF(void *ptr, const char *str, char err[AIR_STRLEN_HUGE]) {
+baneGkmsParseBEF(void *ptr, const char *str, char err[AIR_STRLEN_HUGE + 1]) {
static const char me[] = "baneGkmsParseBEF";
- char mesg[AIR_STRLEN_MED], *nerr;
+ char mesg[AIR_STRLEN_MED + 1], *nerr;
float cent, width, shape, alpha, off, *bef;
Nrrd **nrrdP;
airArray *mop;
@@ -109,7 +109,7 @@
if (nrrdMaybeAlloc_va(*nrrdP, nrrdTypeFloat, 2, AIR_CAST(size_t, 2),
AIR_CAST(size_t, 6))) {
airMopAdd(mop, nerr = biffGetDone(NRRD), airFree, airMopOnError);
- airStrcpy(err, AIR_STRLEN_HUGE, nerr);
+ airStrcpy(err, AIR_STRLEN_HUGE + 1, nerr);
airMopError(mop);
return 1;
}
@@ -142,7 +142,7 @@
"as a nrrd filename\n",
me, str);
strcpy(err, mesg);
- strncat(err, nerr, AIR_STRLEN_HUGE - 1 - strlen(mesg) - 1);
+ strncat(err, nerr, AIR_STRLEN_HUGE - strlen(mesg) - 1);
airMopError(mop);
return 1;
}
@@ -168,7 +168,7 @@
** gthr[1] = the scaling, or the absolute
*/
static int
-baneGkmsParseGthresh(void *ptr, const char *str, char err[AIR_STRLEN_HUGE]) {
+baneGkmsParseGthresh(void *ptr, const char *str, char err[AIR_STRLEN_HUGE + 1]) {
static const char me[] = "baneGkmsParseGthresh";
float *gthr;
@@ -219,7 +219,7 @@
*/
void
baneGkmsUsage(const char *me, hestParm *hparm) {
- char buff[AIR_STRLEN_LARGE], fmt[AIR_STRLEN_LARGE];
+ char buff[AIR_STRLEN_LARGE + 1], fmt[AIR_STRLEN_LARGE + 1];
unsigned int ci, si, len, maxlen;
maxlen = 0;
Modified: teem/trunk/src/bane/hvol.c
===================================================================
--- teem/trunk/src/bane/hvol.c 2023-07-08 12:18:19 UTC (rev 7056)
+++ teem/trunk/src/bane/hvol.c 2023-07-08 12:25:44 UTC (rev 7057)
@@ -87,7 +87,8 @@
baneFindInclusion(double min[3], double max[3], Nrrd *nin, baneHVolParm *hvp,
gageContext *ctx) {
static const char me[] = "baneFindInclusion";
- char prog[13], aname[3][AIR_STRLEN_SMALL] = {"grad-mag", "2nd deriv", "data value"};
+ char prog[13],
+ aname[3][AIR_STRLEN_SMALL + 1] = {"grad-mag", "2nd deriv", "data value"};
int sx, sy, sz, x, y, z, E, ai;
baneInc *inc[3];
/* HEY HEY HEY: The variable "hist" is used before its value is set.
Modified: teem/trunk/src/bane/trex.c
===================================================================
--- teem/trunk/src/bane/trex.c 2023-07-08 12:18:19 UTC (rev 7056)
+++ teem/trunk/src/bane/trex.c 2023-07-08 12:25:44 UTC (rev 7057)
@@ -45,7 +45,7 @@
return NULL;
}
if (TREX_LUTLEN != baneNpos->axis[0].size) {
- char stmp[AIR_STRLEN_SMALL];
+ char stmp[AIR_STRLEN_SMALL + 1];
fprintf(stderr, "%s: !!! need a length %d p(x) (not %s)\n", me, TREX_LUTLEN,
airSprintSize_t(stmp, baneNpos->axis[0].size));
return NULL;
Modified: teem/trunk/src/bane/valid.c
===================================================================
--- teem/trunk/src/bane/valid.c 2023-07-08 12:18:19 UTC (rev 7056)
+++ teem/trunk/src/bane/valid.c 2023-07-08 12:25:44 UTC (rev 7057)
@@ -132,7 +132,7 @@
return 1;
}
if (2 != info->axis[0].size) {
- char stmp[AIR_STRLEN_SMALL];
+ char stmp[AIR_STRLEN_SMALL + 1];
biffAddf(BANE, "%s: 1st axis needs size 2 (not %s)", me,
airSprintSize_t(stmp, info->axis[0].size));
return 1;
@@ -186,7 +186,7 @@
return 1;
}
if (2 != Bcpts->axis[0].size) {
- char stmp[AIR_STRLEN_SMALL];
+ char stmp[AIR_STRLEN_SMALL + 1];
biffAddf(BANE, "%s: axis#0 needs size 2 (not %s)", me,
airSprintSize_t(stmp, Bcpts->axis[0].size));
return 1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|