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

Comparing ray/src/px/greyscale.c (file contents):
Revision 1.1 by greg, Thu Feb 2 10:49:20 1989 UTC vs.
Revision 2.7 by schorsch, Sun Mar 28 20:33:13 2004 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1986 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   *  greyscale.c - program to produce grey test levels.
6   *
# Line 12 | Line 9 | static char SCCSid[] = "$SunId$ LBL";
9  
10   #include  <stdio.h>
11  
12 + #include  <math.h>
13 +
14   #include  "color.h"
15  
16  
17   double  minlog = 0.0;           /* minimum for log scale (0 == linear) */
18  
19 + static void greyscale(COLOR  col0);
20 + static void printargs(int  ac, char  **av, FILE  *fp);
21  
22 < main(argc, argv)
23 < int  argc;
24 < char  *argv[];
22 >
23 > int
24 > main(
25 >        int  argc,
26 >        char  *argv[]
27 > )
28   {
29          COLOR  col;
30 <        double  d1,d2,d3, atof(), log();
30 >        double  d1,d2,d3;
31          int  i;
32  
33          printargs(argc, argv, stdout);
# Line 54 | Line 58 | char  *argv[];
58          printf("\n");
59          printf("-Y 512 +X 512\n");
60          greyscale(col);
61 +        return 0;
62   }
63  
64  
65 < greyscale(col0)                 /* output our grey scale */
66 < COLOR  col0;
65 > static void
66 > greyscale(                      /* output our grey scale */
67 >        COLOR  col0
68 > )
69   {
63        double  exp();
70          COLOR  col1, col2, scanline[512];
71          double  x;
72          int  j;
# Line 104 | Line 110 | writerr:
110   }
111  
112  
113 < printargs(ac, av, fp)           /* print arguments to a file */
114 < int  ac;
115 < char  **av;
116 < FILE  *fp;
113 > static void
114 > printargs(              /* print arguments to a file */
115 >        int  ac,
116 >        char  **av,
117 >        FILE  *fp
118 > )
119   {
120          while (ac-- > 0) {
121                  fputs(*av++, fp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines