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

Comparing ray/src/px/pextrem.c (file contents):
Revision 2.1 by greg, Fri Aug 21 13:48:48 1992 UTC vs.
Revision 2.8 by schorsch, Thu Jul 3 22:41:44 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1992 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Find extrema points in a Radiance picture.
6   */
7  
8   #include  <stdio.h>
9 + #include  <math.h>
10 + #include  <string.h>
11 +
12 + #include  "platform.h"
13   #include  "color.h"
14  
15  
# Line 28 | Line 29 | char  *s;
29  
30          if (isformat(s)) {                      /* format */
31                  formatval(fmt, s);
32 <                wrongformat = strcmp(fmt, COLRFMT);
32 >                wrongformat = !globmatch(PICFMT, fmt);
33          }
34          if (!orig)
35 <                return;
35 >                return(0);
36          if (isexpos(s)) {                       /* exposure */
37                  d = exposval(s);
38                  scalecolor(expos, d);
# Line 39 | Line 40 | char  *s;
40                  colcorval(ctmp, s);
41                  multcolor(expos, ctmp);
42          }
43 +        return(0);
44   }
45  
46  
# Line 53 | Line 55 | char  *argv[];
55          COLR  *scan;
56          COLR  cmin, cmax;
57          int  xmin, ymin, xmax, ymax;
58 <        
58 >        SET_DEFAULT_BINARY();
59 >        SET_FILE_BINARY(stdin);
60          for (i = 1; i < argc; i++)      /* get options */
61                  if (!strcmp(argv[i], "-o"))
62                          orig++;
# Line 100 | Line 103 | char  *argv[];
103                          }
104                  }
105          }
106 <        free((char *)scan);
106 >        free((void *)scan);
107          printf("%d %d\t%e %e %e\n", xmin, ymin,
108                          colrval(cmin,RED)/colval(expos,RED),
109                          colrval(cmin,GRN)/colval(expos,GRN),

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines