--- ray/src/util/dcglare.c 2019/09/09 17:19:51 2.1 +++ ray/src/util/dcglare.c 2022/03/11 02:27:02 2.6 @@ -30,7 +30,6 @@ #include "platform.h" #include "standard.h" #include "cmatrix.h" -#include "platform.h" #include "resolu.h" #include "cmglare.h" @@ -68,7 +67,7 @@ sum_images(const char *fspec, const CMATRIX *cv, FILE error(SYSTEM, errmsg); } dt = DTfromHeader; - if ((err = cm_getheader(&dt, NULL, NULL, NULL, fp)) != NULL) + if ((err = cm_getheader(&dt, NULL, NULL, NULL, NULL, fp)) != NULL) error(USER, err); if ((dt != DTrgbe) & (dt != DTxyze) || !fscnresolu(&xr, &yr, fp)) { @@ -84,7 +83,7 @@ sum_images(const char *fspec, const CMATRIX *cv, FILE pmat = cm_alloc(myYR, myXR); memset(pmat->cmem, 0, sizeof(COLOR)*myXR*myYR); /* finish header */ - fputformat((char *)cm_fmt_id[myDT], fout); + fputformat(cm_fmt_id[myDT], fout); fputc('\n', fout); fflush(fout); } else if ((dt != myDT) | (xr != myXR) | (yr != myYR)) { @@ -301,7 +300,7 @@ main(int argc, char *argv[]) if ((argc-a < 2) | (argc-a > 5)) goto userr; /* single bounce daylight coefficients file */ - direct_path = argv[++a]; + direct_path = argv[a++]; #else if ((argc-a < 1) | (argc-a > 4)) goto userr; @@ -476,9 +475,9 @@ main(int argc, char *argv[]) fprintf(ofp, "FRAME=%d\n", i); fprintf(ofp, "NROWS=%d\n", rvec->nrows); fputs("NCOLS=1\nNCOMP=3\n", ofp); - if ((outfmt == 'f') | (outfmt == 'd')) + if ((outfmt == DTfloat) | (outfmt == DTdouble)) fputendian(ofp); - fputformat((char *)cm_fmt_id[outfmt], ofp); + fputformat(cm_fmt_id[outfmt], ofp); fputc('\n', ofp); } cm_write(rvec, outfmt, ofp); @@ -509,9 +508,9 @@ main(int argc, char *argv[]) fprintf(ofp, "NCOLS=%d\n", rmtx->ncols); fputs("NCOMP=3\n", ofp); #endif /* DC_GLARE */ - if ((outfmt == 'f') | (outfmt == 'd')) + if ((outfmt == DTfloat) | (outfmt == DTdouble)) fputendian(ofp); - fputformat((char *)cm_fmt_id[outfmt], ofp); + fputformat(cm_fmt_id[outfmt], ofp); fputc('\n', ofp); } #ifdef DC_GLARE