|
From: <kin...@us...> - 2023-07-07 21:23:47
|
Revision: 7041
http://sourceforge.net/p/teem/code/7041
Author: kindlmann
Date: 2023-07-07 21:23:44 +0000 (Fri, 07 Jul 2023)
Log Message:
-----------
propagating AIR_STRLEN --> AIR_STRLEN+1 change
Modified Paths:
--------------
teem/trunk/src/unrrdu/about.c
teem/trunk/src/unrrdu/cksum.c
teem/trunk/src/unrrdu/crop.c
teem/trunk/src/unrrdu/dice.c
teem/trunk/src/unrrdu/diff.c
teem/trunk/src/unrrdu/flotsam.c
teem/trunk/src/unrrdu/ilk.c
teem/trunk/src/unrrdu/lut2.c
teem/trunk/src/unrrdu/make.c
teem/trunk/src/unrrdu/resample.c
teem/trunk/src/unrrdu/save.c
teem/trunk/src/unrrdu/shuffle.c
teem/trunk/src/unrrdu/slice.c
teem/trunk/src/unrrdu/vidicon.c
Modified: teem/trunk/src/unrrdu/about.c
===================================================================
--- teem/trunk/src/unrrdu/about.c 2023-07-07 21:18:10 UTC (rev 7040)
+++ teem/trunk/src/unrrdu/about.c 2023-07-07 21:23:44 UTC (rev 7041)
@@ -26,7 +26,7 @@
static int
unrrdu_aboutMain(int argc, const char **argv, const char *me, hestParm *hparm) {
- char buff[AIR_STRLEN_LARGE], fmt[AIR_STRLEN_MED];
+ char buff[AIR_STRLEN_LARGE + 1], fmt[AIR_STRLEN_MED + 1];
char par1[] = "\t\t\t\t"
"\"unu\" is a command-line interface to much of the functionality "
"in \"nrrd\", a C library for raster data processing. Nrrd is one "
Modified: teem/trunk/src/unrrdu/cksum.c
===================================================================
--- teem/trunk/src/unrrdu/cksum.c 2023-07-07 21:18:10 UTC (rev 7040)
+++ teem/trunk/src/unrrdu/cksum.c 2023-07-07 21:23:44 UTC (rev 7041)
@@ -34,7 +34,7 @@
Nrrd *nrrd;
airArray *mop;
unsigned int crc;
- char stmp[AIR_STRLEN_SMALL], ends[AIR_STRLEN_SMALL];
+ char stmp[AIR_STRLEN_SMALL + 1], ends[AIR_STRLEN_SMALL + 1];
size_t nn;
mop = airMopNew();
Modified: teem/trunk/src/unrrdu/crop.c
===================================================================
--- teem/trunk/src/unrrdu/crop.c 2023-07-07 21:18:10 UTC (rev 7040)
+++ teem/trunk/src/unrrdu/crop.c 2023-07-07 21:23:44 UTC (rev 7041)
@@ -99,18 +99,18 @@
unsigned int axi;
if (!(2 == _nbounds->dim && nin->dim == AIR_UINT(_nbounds->axis[0].size)
&& 2 == _nbounds->axis[1].size)) {
- char stmp1[AIR_STRLEN_SMALL], stmp2[AIR_STRLEN_SMALL];
+ char stmp[2][AIR_STRLEN_SMALL + 1];
if (_nbounds->dim >= 2) {
- airSprintSize_t(stmp1, _nbounds->axis[1].size);
+ airSprintSize_t(stmp[0], _nbounds->axis[1].size);
} else {
- strcpy(stmp1, "");
+ strcpy(stmp[0], "");
}
fprintf(stderr,
"%s: expected 2-D %u-by-2 array of cropping bounds, "
"not %u-D %s%s%s%s\n",
me, nin->dim, _nbounds->dim,
- airSprintSize_t(stmp2, _nbounds->axis[0].size),
- _nbounds->dim >= 2 ? "-by-" : "-long", _nbounds->dim >= 2 ? stmp1 : "",
+ airSprintSize_t(stmp[1], _nbounds->axis[0].size),
+ _nbounds->dim >= 2 ? "-by-" : "-long", _nbounds->dim >= 2 ? stmp[0] : "",
_nbounds->dim > 2 ? "-by-X" : "");
airMopError(mop);
return 1;
Modified: teem/trunk/src/unrrdu/dice.c
===================================================================
--- teem/trunk/src/unrrdu/dice.c 2023-07-07 21:18:10 UTC (rev 7040)
+++ teem/trunk/src/unrrdu/dice.c 2023-07-07 21:23:44 UTC (rev 7041)
@@ -32,9 +32,9 @@
static int
unrrdu_diceMain(int argc, const char **argv, const char *me, hestParm *hparm) {
hestOpt *opt = NULL;
- char *base, *err, fnout[AIR_STRLEN_MED], /* file name out */
- fffname[AIR_STRLEN_MED], /* format for filename */
- *ftmpl; /* format template */
+ char *base, *err, fnout[AIR_STRLEN_MED + 1], /* file name out */
+ fffname[AIR_STRLEN_MED + 1], /* format for filename */
+ *ftmpl; /* format template */
Nrrd *nin, *nout;
int pret, fit;
unsigned int axis, start, pos, top, size, sanity;
@@ -76,7 +76,7 @@
return 1;
}
if (nin->axis[axis].size > sanity) {
- char stmp[AIR_STRLEN_SMALL];
+ char stmp[AIR_STRLEN_SMALL + 1];
fprintf(stderr,
"%s: axis %u size %s > sanity limit %u; "
"increase via \"-l\"\n",
Modified: teem/trunk/src/unrrdu/diff.c
===================================================================
--- teem/trunk/src/unrrdu/diff.c 2023-07-07 21:18:10 UTC (rev 7040)
+++ teem/trunk/src/unrrdu/diff.c 2023-07-07 21:23:44 UTC (rev 7041)
@@ -39,7 +39,7 @@
Nrrd *ninA, *ninB;
int quiet, exitstat, onlyData, differ, ret;
double epsilon;
- char explain[AIR_STRLEN_LARGE];
+ char explain[AIR_STRLEN_LARGE + 1];
mop = airMopNew();
hestOptAdd(&opt, NULL, "ninA", airTypeOther, 1, 1, &ninA, NULL, "First input nrrd.",
Modified: teem/trunk/src/unrrdu/flotsam.c
===================================================================
--- teem/trunk/src/unrrdu/flotsam.c 2023-07-07 21:18:10 UTC (rev 7040)
+++ teem/trunk/src/unrrdu/flotsam.c 2023-07-07 21:23:44 UTC (rev 7041)
@@ -146,7 +146,7 @@
}
/* else, we see if its --version */
if (!strcmp("--version", argv[1])) {
- char vbuff[AIR_STRLEN_LARGE];
+ char vbuff[AIR_STRLEN_LARGE + 1];
airTeemVersionSprint(vbuff);
printf("%s\n", vbuff);
exit(0);
@@ -192,7 +192,7 @@
*/
void
unrrduUsageUnu(const char *me, hestParm *hparm, int alsoHidden) {
- char buff[AIR_STRLEN_LARGE], fmt[AIR_STRLEN_LARGE];
+ char buff[AIR_STRLEN_LARGE + 1], fmt[AIR_STRLEN_LARGE + 1];
unsigned int cmdi, chi, len, maxlen;
maxlen = 0;
@@ -269,7 +269,7 @@
int /* Biff: nope */
unrrduUsage(const char *me, hestParm *hparm, const char *title,
const unrrduCmd *const *cmdList) {
- char buff[AIR_STRLEN_LARGE], fmt[AIR_STRLEN_LARGE];
+ char buff[AIR_STRLEN_LARGE + 1], fmt[AIR_STRLEN_LARGE + 1];
unsigned int cmdi, chi, len, maxlen;
if (!(title && cmdList)) {
@@ -328,7 +328,7 @@
** pos[0] == -1: pos[1] gives the position relative to a "minimum" position
*/
static int
-parsePos(void *ptr, const char *str, char err[AIR_STRLEN_HUGE]) {
+parsePos(void *ptr, const char *str, char err[AIR_STRLEN_HUGE + 1]) {
static const char me[] = "parsePos";
long int *pos;
@@ -402,7 +402,7 @@
** value as nrrdTypeDefault.
*/
static int
-parseMaybeType(void *ptr, const char *str, char err[AIR_STRLEN_HUGE]) {
+parseMaybeType(void *ptr, const char *str, char err[AIR_STRLEN_HUGE + 1]) {
static const char me[] = "parseMaybeType";
int *typeP;
@@ -439,7 +439,7 @@
** for parsing an int that can be 8, 16, or 32
*/
static int
-parseBits(void *ptr, const char *str, char err[AIR_STRLEN_HUGE]) {
+parseBits(void *ptr, const char *str, char err[AIR_STRLEN_HUGE + 1]) {
static const char me[] = "parseBits";
unsigned int *bitsP;
@@ -482,7 +482,7 @@
** s<float> : unrrduScaleSpacingTarget
*/
static int
-parseScale(void *ptr, const char *str, char err[AIR_STRLEN_HUGE]) {
+parseScale(void *ptr, const char *str, char err[AIR_STRLEN_HUGE + 1]) {
static const char me[] = "parseScale";
double *scale;
unsigned int num;
@@ -569,7 +569,7 @@
}
static int
-parseFile(void *ptr, const char *str, char err[AIR_STRLEN_HUGE]) {
+parseFile(void *ptr, const char *str, char err[AIR_STRLEN_HUGE + 1]) {
static const char me[] = "parseFile";
FILE **fileP;
@@ -605,7 +605,7 @@
** enc[2]: for zlib: strategy, from nrrdZlibStrategy* enum
*/
static int
-parseEncoding(void *ptr, const char *_str, char err[AIR_STRLEN_HUGE]) {
+parseEncoding(void *ptr, const char *_str, char err[AIR_STRLEN_HUGE + 1]) {
static const char me[] = "parseEncoding";
char *str, *opt;
int *enc;
@@ -685,7 +685,7 @@
** as indicated by one of: btext, ptext, baretext, plaintext
*/
static int
-parseFormat(void *ptr, const char *str, char err[AIR_STRLEN_HUGE]) {
+parseFormat(void *ptr, const char *str, char err[AIR_STRLEN_HUGE + 1]) {
static const char me[] = "parseFormat";
int *enc;
Modified: teem/trunk/src/unrrdu/ilk.c
===================================================================
--- teem/trunk/src/unrrdu/ilk.c 2023-07-07 21:18:10 UTC (rev 7040)
+++ teem/trunk/src/unrrdu/ilk.c 2023-07-07 21:23:44 UTC (rev 7041)
@@ -317,7 +317,7 @@
if (nrrdBoundaryPad == bound) {
if (_bkgLen != MOSS_CHAN_NUM(nin)) {
- char stmp[AIR_STRLEN_SMALL];
+ char stmp[AIR_STRLEN_SMALL + 1];
fprintf(stderr, "%s: got length %u background, but image has %s channels\n", me,
_bkgLen, airSprintSize_t(stmp, MOSS_CHAN_NUM(nin)));
airMopError(mop);
Modified: teem/trunk/src/unrrdu/lut2.c
===================================================================
--- teem/trunk/src/unrrdu/lut2.c 2023-07-07 21:18:10 UTC (rev 7040)
+++ teem/trunk/src/unrrdu/lut2.c 2023-07-07 21:23:44 UTC (rev 7041)
@@ -83,7 +83,7 @@
airMopAdd(mop, nout, (airMopper)nrrdNuke, airMopAlways);
if (!(nin->dim > 1 && 2 == nin->axis[0].size)) {
- char stmp[AIR_STRLEN_SMALL];
+ char stmp[AIR_STRLEN_SMALL + 1];
fprintf(stderr,
"%s: input nrrd dim must be > 1, and axis[0].size "
"must be 2 (not %s)\n",
Modified: teem/trunk/src/unrrdu/make.c
===================================================================
--- teem/trunk/src/unrrdu/make.c 2023-07-07 21:18:10 UTC (rev 7040)
+++ teem/trunk/src/unrrdu/make.c 2023-07-07 21:23:44 UTC (rev 7041)
@@ -65,7 +65,8 @@
static int
unrrdu_makeMain(int argc, const char **argv, const char *me, hestParm *hparm) {
hestOpt *opt = NULL;
- char *out, *outData, *err, **dataFileNames, **kvp, *content, encInfo[AIR_STRLEN_LARGE];
+ char *out, *outData, *err, **dataFileNames, **kvp, *content,
+ encInfo[AIR_STRLEN_LARGE + 1];
Nrrd *nrrd;
size_t *size, bufLen;
int headerOnly, pret, lineSkip, endian, type, encodingType, gotSpacing, gotThickness,
Modified: teem/trunk/src/unrrdu/resample.c
===================================================================
--- teem/trunk/src/unrrdu/resample.c 2023-07-07 21:18:10 UTC (rev 7040)
+++ teem/trunk/src/unrrdu/resample.c 2023-07-07 21:23:44 UTC (rev 7041)
@@ -310,7 +310,7 @@
}
if (!E) E |= nrrdResampleKernelSet(rsmc, ai, unuk->kernel, unuk->parm);
switch (dowhat) {
- char stmp[AIR_STRLEN_SMALL];
+ char stmp[AIR_STRLEN_SMALL] + 1;
case unrrduScaleMultiply:
samplesOut = AIR_ROUNDUP_UI(nin->axis[ai].size * scale[1 + 2 * ai]);
break;
Modified: teem/trunk/src/unrrdu/save.c
===================================================================
--- teem/trunk/src/unrrdu/save.c 2023-07-07 21:18:10 UTC (rev 7040)
+++ teem/trunk/src/unrrdu/save.c 2023-07-07 21:23:44 UTC (rev 7041)
@@ -35,7 +35,7 @@
static int
unrrdu_saveMain(int argc, const char **argv, const char *me, hestParm *hparm) {
hestOpt *opt = NULL;
- char *out, *err, *outData, encInfo[AIR_STRLEN_HUGE], fmtInfo[AIR_STRLEN_HUGE];
+ char *out, *err, *outData, encInfo[AIR_STRLEN_HUGE + 1], fmtInfo[AIR_STRLEN_HUGE + 1];
Nrrd *nin, *nout;
airArray *mop;
NrrdIoState *nio;
Modified: teem/trunk/src/unrrdu/shuffle.c
===================================================================
--- teem/trunk/src/unrrdu/shuffle.c 2023-07-07 21:18:10 UTC (rev 7040)
+++ teem/trunk/src/unrrdu/shuffle.c 2023-07-07 21:23:44 UTC (rev 7041)
@@ -73,7 +73,7 @@
return 1;
}
if (!(permLen == nin->axis[axis].size)) {
- char stmp[AIR_STRLEN_SMALL];
+ char stmp[AIR_STRLEN_SMALL + 1];
fprintf(stderr, "%s: permutation length (%u) != axis %d's size (%s)\n", me, permLen,
axis, airSprintSize_t(stmp, nin->axis[axis].size));
airMopError(mop);
Modified: teem/trunk/src/unrrdu/slice.c
===================================================================
--- teem/trunk/src/unrrdu/slice.c 2023-07-07 21:18:10 UTC (rev 7040)
+++ teem/trunk/src/unrrdu/slice.c 2023-07-07 21:23:44 UTC (rev 7041)
@@ -78,7 +78,7 @@
return 1;
}
for (axi = 0; axi < axisNum; axi++) {
- char stmp[AIR_STRLEN_SMALL];
+ char stmp[AIR_STRLEN_SMALL + 1];
if (axisNum > 1) {
sprintf(stmp, "[%d]", axi);
} else {
Modified: teem/trunk/src/unrrdu/vidicon.c
===================================================================
--- teem/trunk/src/unrrdu/vidicon.c 2023-07-07 21:18:10 UTC (rev 7040)
+++ teem/trunk/src/unrrdu/vidicon.c 2023-07-07 21:23:44 UTC (rev 7041)
@@ -35,7 +35,7 @@
unsigned int vsize[2], vpadding[2], rpadding[2];
double rescale, rperc;
Nrrd *nin, *nrescale, *npad, *nvbase, *ntmp, *nout;
- char *out, *err, *stpfx, stname[AIR_STRLEN_SMALL];
+ char *out, *err, *stpfx, stname[AIR_STRLEN_SMALL + 1];
int pret;
NrrdResampleContext *rsmc;
NrrdKernelSpec *rescaleKsp, *vdsmp[2];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|