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.18 by greg, Sat Dec 1 21:09:53 2018 UTC

# Line 64 | Line 64 | const char     *hdr_ignkey[] = {
64                          "SOFTWARE",
65                          "CAPDATE",
66                          "GMT",
67 +                        "FRAME",
68                          NULL    /* terminator */
69                  };
70                                  /* header variable settings */
# Line 109 | Line 110 | usage()
110   static int
111   read_line(LINEBUF *bp, FILE *fp)
112   {
113 +        static int      doneWarn = 0;
114 +
115          bp->len = 0;
116          if (!bp->str) {
117                  bp->str = (char *)malloc(bp->siz = 512);
# Line 121 | Line 124 | read_line(LINEBUF *bp, FILE *fp)
124                          break;          /* found EOL */
125                  if (bp->len < bp->siz - 4)
126                          continue;       /* at EOF? */
127 <                if (bp->siz >= MAXBUF)
128 <                        break;          /* don't go to extremes */
127 >                if (bp->siz >= MAXBUF) {
128 >                        if ((report >= REP_WARN) & !doneWarn) {
129 >                                fprintf(stderr,
130 >                        "%s: warning - input line(s) past %ld MByte limit\n",
131 >                                        progname, MAXBUF>>20);
132 >                                doneWarn++;
133 >                        }
134 >                        break;          /* return MAXBUF partial line */
135 >                }
136                  if ((bp->siz += bp->siz/2) > MAXBUF)
137                          bp->siz = MAXBUF;
138                  bp->str = (char *)realloc(bp->str, bp->siz);
# Line 190 | Line 200 | color_check(COLOR c1, COLOR c2)
200   {
201          int     p;
202  
203 <        if (!real_check(colval(c1,RED)+colval(c1,GRN)+colval(c1,BLU)*(1./3.),
204 <                        colval(c2,RED)+colval(c2,GRN)+colval(c2,BLU))*(1./3.))
203 >        if (!real_check((colval(c1,RED)+colval(c1,GRN)+colval(c1,BLU))*(1./3.),
204 >                        (colval(c2,RED)+colval(c2,GRN)+colval(c2,BLU))*(1./3.)))
205                  return(0);
206  
207          p = (colval(c1,GRN) > colval(c1,RED)) ? GRN : RED;
# Line 768 | Line 778 | main(int argc, char *argv[])
778          ign_header |= !has_header(typ1);        /* check headers if indicated */
779          if (!ign_header && !headers_match())
780                  return(1);
781 <        lu_done(&hdr1); lu_done(&hdr2);
781 >        lu_done(&hdr1); lu_done(&hdr2);         /* done with header info. */
782          if (!ign_header & (report >= REP_WARN)) {
773                if (typ1 == TYP_UNKNOWN)
774                        printf("%s: warning - unrecognized format, comparing as binary\n",
775                                        progname);
783                  if (lin1cnt != lin2cnt)
784                          printf("%s: warning - headers are different lengths\n",
785 +                                        progname);
786 +                if (typ1 == TYP_UNKNOWN)
787 +                        printf("%s: warning - unrecognized format\n",
788                                          progname);
789          }
790          if (report >= REP_VERBOSE)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines