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

Comparing ray/src/px/ra_hexbit.c (file contents):
Revision 3.2 by greg, Sat Feb 22 02:07:27 2003 UTC vs.
Revision 3.5 by greg, Tue Apr 17 17:42:28 2018 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7  
8   #include  <stdio.h>
9   #include  <time.h>
10 +
11 + #include  "platform.h"
12   #include  "color.h"
13 + #include  "rtio.h"
14   #include  "resolu.h"
15  
16   char  *progname;
14
17   int  xmax, ymax;
16
18   double  thresh = 0.5;           /* threshold value */
18
19   COLR    threshclr;
20  
21   #define abovethresh(c)  ((c)[EXP]>threshclr[EXP] || \
22                          ((c)[EXP]==threshclr[EXP] && (c)[GRN]>threshclr[GRN]))
23  
24 + static void quiterr(char *err);
25 + static void ra2hex(void);
26  
27 < main(argc, argv)
28 < int  argc;
29 < char  *argv[];
27 >
28 > int
29 > main(
30 >        int  argc,
31 >        char  *argv[]
32 > )
33   {
34          int  i;
35          
# Line 56 | Line 61 | char  *argv[];
61          }
62                                  /* assign threshold color */
63          setcolr(threshclr, thresh, thresh, thresh);
64 +                                /* binary input */
65 +        SET_FILE_BINARY(stdin);
66                                  /* get our header */
67          if (checkheader(stdin, COLRFMT, NULL) < 0 ||
68                          fgetresolu(&xmax, &ymax, stdin) < 0)
# Line 70 | Line 77 | userr:
77   }
78  
79  
80 < quiterr(err)            /* print message and exit */
81 < char  *err;
80 > static void
81 > quiterr(                /* print message and exit */
82 >        char  *err
83 > )
84   {
85          if (err != NULL) {
86                  fprintf(stderr, "%s: %s\n", progname, err);
# Line 81 | Line 90 | char  *err;
90   }
91  
92  
93 < ra2hex()                /* convert Radiance scanlines to 4x1 bit hex */
93 > static void
94 > ra2hex(void)            /* convert Radiance scanlines to 4x1 bit hex */
95   {
96          static char     cmap[] = "0123456789ABCDEF";
97          COLR    *scanin;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines