ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/radcompare.c
(Generate patch)

Comparing ray/src/util/radcompare.c (file contents):
Revision 2.14 by greg, Fri Oct 19 23:56:15 2018 UTC vs.
Revision 2.16 by greg, Fri Oct 26 23:45:56 2018 UTC

# Line 109 | Line 109 | usage()
109   static int
110   read_line(LINEBUF *bp, FILE *fp)
111   {
112 +        static int      doneWarn = 0;
113 +
114          bp->len = 0;
115          if (!bp->str) {
116                  bp->str = (char *)malloc(bp->siz = 512);
# Line 121 | Line 123 | read_line(LINEBUF *bp, FILE *fp)
123                          break;          /* found EOL */
124                  if (bp->len < bp->siz - 4)
125                          continue;       /* at EOF? */
126 <                if (bp->siz >= MAXBUF)
127 <                        break;          /* don't go to extremes */
126 >                if (bp->siz >= MAXBUF) {
127 >                        if ((report >= REP_WARN) & !doneWarn) {
128 >                                fprintf(stderr,
129 >                        "%s: warning - input line(s) past %ld MByte limit\n",
130 >                                        progname, MAXBUF>>20);
131 >                                doneWarn++;
132 >                        }
133 >                        break;          /* return MAXBUF partial line */
134 >                }
135                  if ((bp->siz += bp->siz/2) > MAXBUF)
136                          bp->siz = MAXBUF;
137                  bp->str = (char *)realloc(bp->str, bp->siz);
# Line 768 | Line 777 | main(int argc, char *argv[])
777          ign_header |= !has_header(typ1);        /* check headers if indicated */
778          if (!ign_header && !headers_match())
779                  return(1);
780 <        lu_done(&hdr1); lu_done(&hdr2);
780 >        lu_done(&hdr1); lu_done(&hdr2);         /* done with header info. */
781          if (!ign_header & (report >= REP_WARN)) {
773                if (typ1 == TYP_UNKNOWN)
774                        printf("%s: warning - unrecognized format, comparing as binary\n",
775                                        progname);
782                  if (lin1cnt != lin2cnt)
783                          printf("%s: warning - headers are different lengths\n",
784 +                                        progname);
785 +                if (typ1 == TYP_UNKNOWN)
786 +                        printf("%s: warning - unrecognized format\n",
787                                          progname);
788          }
789          if (report >= REP_VERBOSE)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines