224 |
|
static int |
225 |
|
norm_check(FVECT nv1, FVECT nv2) |
226 |
|
{ |
227 |
< |
double max2 = nv1[2]*nv1[2]; |
227 |
> |
double max2 = nv1[2]*nv2[2]; |
228 |
|
int imax = 2; |
229 |
|
int i = 2; |
230 |
|
/* identify largest component */ |
231 |
|
while (i--) { |
232 |
< |
double tm2 = nv1[i]*nv1[i]; |
232 |
> |
double tm2 = nv1[i]*nv2[i]; |
233 |
|
if (tm2 > max2) { |
234 |
|
imax = i; |
235 |
|
max2 = tm2; |
696 |
|
static char depthvar[] = DEPTHSTR; |
697 |
|
const char *drval; |
698 |
|
|
699 |
< |
depthvar[LDEPTHSTR] = '\0'; |
699 |
> |
depthvar[LDEPTHSTR-1] = '\0'; |
700 |
|
drval = (const char *)lu_find(htp, depthvar)->data; |
701 |
|
if (!drval) |
702 |
|
return(0); |
953 |
|
return(2); |
954 |
|
if (typ1 != typ2) { |
955 |
|
if (report != REP_QUIET) |
956 |
< |
printf("%s: '%s' is %s and '%s' is %s\n", |
956 |
> |
printf("%s: '%s' format is %s and '%s' is %s\n", |
957 |
|
progname, f1name, file_type[typ1], |
958 |
|
f2name, file_type[typ2]); |
959 |
|
return(1); |
969 |
|
printf("%s: warning - unrecognized format\n", |
970 |
|
progname); |
971 |
|
} |
972 |
< |
if (report >= REP_VERBOSE) |
973 |
< |
printf("%s: input file type is %s\n", |
974 |
< |
progname, file_type[typ1]); |
975 |
< |
|
972 |
> |
if (report >= REP_VERBOSE) { |
973 |
> |
printf("%s: data format is %s\n", progname, file_type[typ1]); |
974 |
> |
if ((typ1 == TYP_FLOAT) | (typ1 == TYP_DOUBLE)) { |
975 |
> |
if (f1swap) |
976 |
> |
printf("%s: input '%s' is byte-swapped\n", |
977 |
> |
progname, f1name); |
978 |
> |
if (f2swap) |
979 |
> |
printf("%s: input '%s' is byte-swapped\n", |
980 |
> |
progname, f2name); |
981 |
> |
} |
982 |
> |
} |
983 |
|
switch (typ1) { /* compare based on type */ |
984 |
|
case TYP_BINARY: |
985 |
|
case TYP_TMESH: |