|
From: <kin...@us...> - 2004-02-13 03:46:22
|
Update of /cvsroot/teem/teem/src/nrrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23564/nrrd Modified Files: read.c keyvalue.c Log Message: addressed Windows warnings from NrrdIO Index: read.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/read.c,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** read.c 7 Jan 2004 15:34:30 -0000 1.86 --- read.c 13 Feb 2004 03:40:58 -0000 1.87 *************** *** 197,201 **** } numbytes = nrrdElementNumber(nrrd)*nrrdElementSize(nrrd); ! if (fseek(nio->dataFile, -numbytes, SEEK_END)) { sprintf(err, "%s: failed to fseek(dataFile, " _AIR_SIZE_T_FMT ", SEEK_END)", me, numbytes); --- 197,201 ---- } numbytes = nrrdElementNumber(nrrd)*nrrdElementSize(nrrd); ! if (fseek(nio->dataFile, -((long)numbytes), SEEK_END)) { sprintf(err, "%s: failed to fseek(dataFile, " _AIR_SIZE_T_FMT ", SEEK_END)", me, numbytes); *************** *** 333,337 **** void _nrrdSplitName (char **dirP, char **baseP, const char *name) { ! int i; if (dirP) { --- 333,337 ---- void _nrrdSplitName (char **dirP, char **baseP, const char *name) { ! char *where; if (dirP) { *************** *** 341,354 **** AIR_FREE(*baseP); } ! i = strrchr(name, '/') - name; /* we found a valid break if the last directory character is somewhere in the string except the last character */ ! if (i>=0 && i<strlen(name)-1) { if (dirP) { *dirP = airStrdup(name); ! (*dirP)[i] = 0; } if (baseP) { ! *baseP = airStrdup(name + i + 1); } } else { --- 341,354 ---- AIR_FREE(*baseP); } ! where = strrchr(name, '/'); /* we found a valid break if the last directory character is somewhere in the string except the last character */ ! if (where && airStrlen(where) > 1) { if (dirP) { *dirP = airStrdup(name); ! (*dirP)[where - name] = 0; } if (baseP) { ! *baseP = airStrdup(where + 1); } } else { Index: keyvalue.c =================================================================== RCS file: /cvsroot/teem/teem/src/nrrd/keyvalue.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** keyvalue.c 7 Jan 2004 15:34:30 -0000 1.6 --- keyvalue.c 13 Feb 2004 03:40:58 -0000 1.7 *************** *** 186,190 **** void _nrrdFwriteEscaped(FILE *file, const char *str) { ! int ci; for (ci=0; ci<strlen(str); ci++) { --- 186,190 ---- void _nrrdFwriteEscaped(FILE *file, const char *str) { ! size_t ci; for (ci=0; ci<strlen(str); ci++) { |