--- ray/src/util/wrapBSDF.c 2015/02/20 18:07:10 2.11
+++ ray/src/util/wrapBSDF.c 2015/04/02 16:40:32 2.14
@@ -1,5 +1,5 @@
#ifndef lint
-static const char RCSid[] = "$Id: wrapBSDF.c,v 2.11 2015/02/20 18:07:10 greg Exp $";
+static const char RCSid[] = "$Id: wrapBSDF.c,v 2.14 2015/04/02 16:40:32 greg Exp $";
#endif
/*
* Wrap BSDF data in valid WINDOW XML file
@@ -160,6 +160,7 @@ input2str(const char *inpspec)
fprintf(stderr, "%s: cannot open\n", inpspec);
return "";
}
+#ifndef _WIN32 /* XXX somehow broken on Windows */
len = lseek(fd, 0L, SEEK_END);
if (len > 0) {
lseek(fd, 0L, SEEK_SET);
@@ -178,6 +179,7 @@ input2str(const char *inpspec)
close(fd);
return str;
}
+#endif
fp = fdopen(fd, "r"); /* not a regular file */
}
/* reading from stream */
@@ -443,32 +445,30 @@ writeBSDFblock(const char *caller, struct s_dfile *df)
break;
case DSxbar31:
puts("\t\tCIE-X");
- puts("\t\tSourceSpectrum>CIE Illuminant D65 1nm.ssp");
+ puts("\t\tCIE Illuminant D65 1nm.ssp");
puts("\t\tASTM E308 1931 X.dsp");
break;
case DSzbar31:
puts("\t\tCIE-Z");
- puts("\t\tSourceSpectrum>CIE Illuminant D65 1nm.ssp");
+ puts("\t\tCIE Illuminant D65 1nm.ssp");
puts("\t\tASTM E308 1931 Z.dsp");
break;
case DSuprime:
- puts("\t\tCIE-Z");
- puts("\t\tSourceSpectrum>CIE Illuminant D65 1nm.ssp");
- puts("\t\tASTM E308 1931 u.dsp");
+ puts("\t\tCIE-u");
+ puts("\t\tCIE Illuminant D65 1nm.ssp");
break;
case DSvprime:
- puts("\t\tCIE-Z");
- puts("\t\tSourceSpectrum>CIE Illuminant D65 1nm.ssp");
- puts("\t\tASTM E308 1931 v.dsp");
+ puts("\t\tCIE-v");
+ puts("\t\tCIE Illuminant D65 1nm.ssp");
break;
case DSsolar:
puts("\t\tSolar");
- puts("\t\tSourceSpectrum>CIE Illuminant D65 1nm.ssp");
+ puts("\t\tCIE Illuminant D65 1nm.ssp");
puts("\t\tNone");
break;
case DSnir:
puts("\t\tNIR");
- puts("\t\tSourceSpectrum>PLACE_HOLDER");
+ puts("\t\tPLACE_HOLDER");
puts("\t\tPLACE_HOLDER");
break;
default:
@@ -479,7 +479,7 @@ writeBSDFblock(const char *caller, struct s_dfile *df)
spectr_file[df->spectrum]);
if (cp != NULL)
*cp = '.';
- puts("\t\tSourceSpectrum>CIE Illuminant D65 1nm.ssp");
+ puts("\t\tCIE Illuminant D65 1nm.ssp");
printf("\t\t%s\n",
spectr_file[df->spectrum]);
break;