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.2 by greg, Mon Oct 15 18:21:01 2018 UTC vs.
Revision 2.3 by greg, Mon Oct 15 18:31:15 2018 UTC

# Line 74 | Line 74 | char           *progname = NULL;
74   const char      stdin_name[] = "<stdin>";
75   const char      *f1name=NULL, *f2name=NULL;
76   FILE            *f1in=NULL, *f2in=NULL;
77 +
78                                  /* running real differences */
79   double  diff2sum = 0;
80   int     nsum = 0;
# Line 206 | Line 207 | setheadvar(char *val, void *p)
207          int     kln, vln;
208          int     n;
209  
210 +        adv_linecnt(htp);       /* side-effect is to count lines */
211          if (!isalpha(*val))     /* key must start line */
212                  return(0);
213          key = val++;
# Line 236 | Line 238 | setheadvar(char *val, void *p)
238          if (tep->data)
239                  free(tep->data);
240          tep->data = strcpy(malloc(vln+1), val);
239        adv_linecnt(htp);
241          return(1);
242   }
243  
# Line 317 | Line 318 | identify_type(const char *name, FILE *fin, LUTAB *htp)
318                  char    sbuf[32];
319                  if (!fgets(sbuf, sizeof(sbuf), fin))
320                          goto badeof;
321 +                adv_linecnt(htp);               /* for #?ID string */
322                  if (report >= REP_WARN && strncmp(sbuf, "RADIANCE", 8)) {
323                          fputs(name, stderr);
324                          fputs(": warning - unexpected header ID: ", stderr);
325                          fputs(sbuf, stderr);
326                  }
325                adv_linecnt(htp);               /* for #?ID string */
327                  if (getheader(fin, setheadvar, htp) < 0) {
328                          fputs(name, stderr);
329                          fputs(": Unknown error reading header\n", stderr);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines