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.6 by greg, Sat Dec 28 18:05:14 2019 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines