--- ray/src/util/rcode_norm.c 2019/11/13 18:17:05 2.5 +++ ray/src/util/rcode_norm.c 2020/02/12 01:13:01 2.7 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rcode_norm.c,v 2.5 2019/11/13 18:17:05 greg Exp $"; +static const char RCSid[] = "$Id: rcode_norm.c,v 2.7 2020/02/12 01:13:01 greg Exp $"; #endif /* * Encode and decode surface normal map using 32-bit integers @@ -22,7 +22,7 @@ usage_exit(int code) { fputs("Usage: ", stderr); fputs(progname, stderr); - fputs(" [-h[io]][-H[io]][-f[afd]] [input [output.nrm]]\n", stderr); + fputs(" [-h[io]][-H[io]][-f[afd]][-x xr -y yr] [input [output.nrm]]\n", stderr); fputs(" Or: ", stderr); fputs(progname, stderr); fputs(" -r [-i][-u][-h[io]][-H[io]][-f[afd]] [input.nrm [output]]\n", @@ -38,11 +38,11 @@ encode_normals(NORMCODEC *ncp) long nexpected = (long)ncp->res.xr * ncp->res.yr; if (ncp->inpfmt[0]) { - if (strstr(ncp->inpfmt, "ascii") != NULL) + if (!strcmp(ncp->inpfmt, "ascii")) ncp->format = 'a'; - else if (strstr(ncp->inpfmt, "float") != NULL) + else if (!strcmp(ncp->inpfmt, "float")) ncp->format = 'f'; - else if (strstr(ncp->inpfmt, "double") != NULL) + else if (!strcmp(ncp->inpfmt, "double")) ncp->format = 'd'; else { fputs(ncp->inpname, stderr);