|
From: <kin...@us...> - 2003-11-30 22:48:32
|
Update of /cvsroot/teem/teem/src/nrrd
In directory sc8-pr-cvs1:/tmp/cvs-serv22953/nrrd
Modified Files:
read.c
Log Message:
added nrrdSanity call to nrrdRead
Index: read.c
===================================================================
RCS file: /cvsroot/teem/teem/src/nrrd/read.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -C2 -d -r1.83 -r1.84
*** read.c 29 Nov 2003 08:16:07 -0000 1.83
--- read.c 30 Nov 2003 22:48:29 -0000 1.84
***************
*** 224,230 ****
int
nrrdRead (Nrrd *nrrd, FILE *file, NrrdIoState *nio) {
! char err[AIR_STRLEN_MED], me[] = "nrrdRead";
int len, fi;
airArray *mop;
if (!(file && nrrd)) {
--- 224,236 ----
int
nrrdRead (Nrrd *nrrd, FILE *file, NrrdIoState *nio) {
! char me[]="nrrdRead", err[AIR_STRLEN_MED];
int len, fi;
airArray *mop;
+
+ /* sanity check, for good measure */
+ if (!nrrdSanity()) {
+ sprintf(err, "%s: sanity check FAILED: have to fix and re-compile", me);
+ biffAdd(NRRD, err); return 1;
+ }
if (!(file && nrrd)) {
|