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.15 by greg, Sat Oct 20 15:17:27 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);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines