--- ray/src/util/rcollate.c 2022/03/17 01:23:16 2.43 +++ ray/src/util/rcollate.c 2024/01/25 19:25:50 2.44 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rcollate.c,v 2.43 2022/03/17 01:23:16 greg Exp $"; +static const char RCSid[] = "$Id: rcollate.c,v 2.44 2024/01/25 19:25:50 greg Exp $"; #endif /* * Utility to re-order records in a binary or ASCII data file (matrix) @@ -613,10 +613,13 @@ headline(char *s, void *p) int n; if (formatval(fmt, s)) { + if (fmtid == fmt) return(0); if (fmtid == NULL) { fmtid = fmt; return(0); } + if ((comp_size == 1) & (n_comp > 1)) + return(0); /* byte exception - skip check */ if (!strcmp(fmt, fmtid)) return(0); fprintf(stderr, "Input format '%s' != '%s'\n", fmt, fmtid); @@ -641,6 +644,8 @@ headline(char *s, void *p) return(0); } if (!strncmp(s, "NCOMP=", 6)) { + if ((comp_size == 1) & (n_comp > 1)) + return(0); /* byte exception - ignore */ n = atoi(s+6); if ((n_comp > 0) & (n != n_comp)) { fputs("Incorrect number of components\n", stderr);