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

Comparing ray/src/meta/meta2bmp.c (file contents):
Revision 1.4 by greg, Mon Nov 18 22:12:32 2019 UTC vs.
Revision 1.5 by greg, Wed May 13 00:27:03 2020 UTC

# Line 44 | Line 44 | static short  condonly = FALSE,
44  
45  
46   char *
47 < findtack(s)                     /* find place to tack on suffix */
48 < register char *s;
47 > findtack(char *s)               /* find place to tack on suffix */
48   {
49          while (*s && *s != '.')
50                  s++;
# Line 58 | Line 57 | main(
57          int  argc,
58          char  **argv
59   )
61
60   {
61   FILE  *fp;
62   char  comargs[200], command[300];
# Line 137 | Line 135 | main(
135      }
136  
137   return(0);
138 < }
138 > }
139  
140  
143
141   void
142   thispage(void)          /* rewind current file */
143   {
# Line 152 | Line 149 | thispage(void)         /* rewind current file */
149   void
150   initfile(void)          /* initialize this file */
151   {
155    /*
156    static unsigned char  cmap[24] = {255,255,255, 255,152,0, 0,188,0, 0,0,255,
157                        179,179,0, 255,0,255, 0,200,200, 0,0,0};
158     */
152      static const unsigned char  cmap[8][3] = {{0,0,0}, {0,0,255}, {0,188,0},
153                  {255,152,0}, {0,200,200}, {255,0,255}, {179,179,0}, {255,255,255}};
154      static int  filenum = 0;
155      BMPHeader  *hp;
156 <    register int  i;
156 >    int  i;
157  
158      hp = BMPmappedHeader(dxsiz, dysiz, 0, 256);
166    hp->compr = BI_RLE8;
159      if (hp == NULL)
160          error(USER, "Illegal image parameter(s)");
161 +    hp->compr = BI_RLE8;
162      for (i = 0; i < 8; i++) {
163          hp->palette[i].r = cmap[i][2];
164          hp->palette[i].g = cmap[i][1];
# Line 183 | Line 176 | initfile(void)         /* initialize this file */
176   }
177  
178  
186
179   void
180   nextpage(void)          /* advance to next page */
189
181   {
182  
183      if (lineno == 0)
# Line 204 | Line 195 | nextpage(void)         /* advance to next page */
195   }
196  
197  
207
198   #define MINRUN  4
199  
200 < extern void
200 > void
201   printblock(void)                /* output scanline block to file */
212
202   {
203      int  i;
204 <    register unsigned char  *scanline;
204 >    unsigned char  *scanline;
205  
206      if (lineno == 0)
207          initfile();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines