--- ray/src/util/rcode_norm.c 2019/07/19 02:18:44 2.1 +++ ray/src/util/rcode_norm.c 2019/08/13 16:31:35 2.3 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rcode_norm.c,v 2.1 2019/07/19 02:18:44 greg Exp $"; +static const char RCSid[] = "$Id: rcode_norm.c,v 2.3 2019/08/13 16:31:35 greg Exp $"; #endif /* * Encode and decode surface normal map using 32-bit integers @@ -22,10 +22,10 @@ usage_exit(int code) { fputs("Usage: ", stderr); fputs(progname, stderr); - fputs(" [-h[io]][-H[io]][-f[afd]] [input [output]]\n", stderr); + fputs(" [-h[io]][-H[io]][-f[afd]] [input [output.nrm]]\n", stderr); fputs(" Or: ", stderr); fputs(progname, stderr); - fputs(" -r [-i][-u][-h[io]][-H[io]][-f[afd]] [input [output]]\n", + fputs(" -r [-i][-u][-h[io]][-H[io]][-f[afd]] [input.nrm [output]]\n", stderr); exit(code); } @@ -38,11 +38,11 @@ encode_normals(NORMCODEC *ncp) long nexpected = (long)ncp->res.xr * ncp->res.yr; if (ncp->inpfmt[0]) { - if (strcasestr(ncp->inpfmt, "ascii") != NULL) + if (strstr(ncp->inpfmt, "ascii") != NULL) ncp->format = 'a'; - else if (strcasestr(ncp->inpfmt, "float") != NULL) + else if (strstr(ncp->inpfmt, "float") != NULL) ncp->format = 'f'; - else if (strcasestr(ncp->inpfmt, "double") != NULL) + else if (strstr(ncp->inpfmt, "double") != NULL) ncp->format = 'd'; else { fputs(ncp->inpname, stderr); @@ -304,7 +304,7 @@ main(int argc, char *argv[]) fputs(": -i option requires input resolution\n", stderr); usage_exit(1); } - nc.hdrflags &= ~(HF_HEADOUT|HF_RESOUT); + nc.hdrflags &= ~HF_RESOUT; } if (a < argc-2) { fputs(progname, stderr);