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

Comparing ray/src/meta/meta2tga.c (file contents):
Revision 1.8 by greg, Mon Nov 18 22:12:32 2019 UTC vs.
Revision 1.9 by greg, Wed May 13 00:30:13 2020 UTC

# Line 44 | Line 44 | static int putthead(struct hdStruct  *hp, char  *ip, F
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 138 | Line 136 | main(
136      }
137  
138   return(0);
139 < }
139 > }
140  
141  
144
142   void
143   thispage(void)          /* rewind current file */
144   {
# Line 153 | Line 150 | thispage(void)         /* rewind current file */
150   void
151   initfile(void)          /* initialize this file */
152   {
153 <    static int  filenum = 0;
157 <    /*
158 <    static unsigned char  cmap[24] = {255,255,255, 255,152,0, 0,188,0, 0,0,255,
159 <                        179,179,0, 255,0,255, 0,200,200, 0,0,0};
160 <     */
161 <    static unsigned char  cmap[24] = {0,0,0, 0,0,255, 0,188,0, 255,152,0,
153 >    static const unsigned char  cmap[24] = {0,0,0, 0,0,255, 0,188,0, 255,152,0,
154                          0,200,200, 255,0,255, 179,179,0, 255,255,255};
155 +    static int  filenum = 0;
156      struct hdStruct  thead;
157 <    register int  i;
157 >    int  i;
158  
159      if (outtack != NULL) {
160          sprintf(outtack, "%d.tga", ++filenum);
# Line 188 | Line 181 | initfile(void)         /* initialize this file */
181   }
182  
183  
191
184   void
185   nextpage(void)          /* advance to next page */
194
186   {
187  
188      if (lineno == 0)
# Line 209 | Line 200 | nextpage(void)         /* advance to next page */
200   }
201  
202  
212
203   #define MINRUN  4
204  
205 < extern void
205 > void
206   printblock(void)                /* output scanline block to file */
217
207   {
208      int  i, c2;
209 <    register unsigned char  *scanline;
210 <    register int  j, beg, cnt = 0;
209 >    unsigned char  *scanline;
210 >    int  j, beg, cnt = 0;
211  
212      if (lineno == 0)
213          initfile();
# Line 252 | Line 241 | printblock(void)               /* output scanline block to file */
241  
242   void
243   putint2(                        /* put a 2-byte positive integer */
244 <        register int  i,
245 <        register FILE   *fp
244 >        int  i,
245 >        FILE    *fp
246   )
247   {
248          putc(i&0xff, fp);
# Line 265 | Line 254 | int
254   putthead(               /* write header to output */
255          struct hdStruct  *hp,
256          char  *ip,
257 <        register FILE  *fp
257 >        FILE  *fp
258   )
259   {
260          if (ip != NULL)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines