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.4 by schorsch, Mon Oct 27 10:28:59 2003 UTC vs.
Revision 1.6 by greg, Wed Feb 4 18:49:24 2004 UTC

# Line 13 | Line 13 | static const char      RCSid[] = "$Id$";
13   #include  "rast.h"
14   #include  "targa.h"
15  
16 < #define  MAXALLOC  5000
16 > #define  MAXALLOC  30000
17   #define  DXSIZE  400            /* default x resolution */
18   #define  DYSIZE  400            /* default y resolution */
19   #define  XCOM  "pexpand +vOCImsp -DP %s | psort +y"
# Line 39 | Line 39 | static int  lineno = 0;
39   static short  condonly = FALSE,
40                conditioned = FALSE;
41  
42 + static int putthead(struct hdStruct  *hp, char  *ip, FILE  *fp);
43 +
44 +
45 +
46   char *
47   findtack(s)                     /* find place to tack on suffix */
48   register char *s;
# Line 49 | Line 53 | register char *s;
53   }
54  
55  
56 < main(argc, argv)
56 > int
57 > main(
58 >        int  argc,
59 >        char  **argv
60 > )
61  
54 int  argc;
55 char  **argv;
56
62   {
63   FILE  *fp;
64   char  comargs[200], command[300];
# Line 137 | Line 142 | char  **argv;
142  
143  
144  
145 <
146 <
142 <
143 < thispage()              /* rewind current file */
145 > void
146 > thispage(void)          /* rewind current file */
147   {
148      if (lineno)
149          error(USER, "cannot restart page in thispage");
150   }
151  
152  
153 <
154 < initfile()              /* initialize this file */
153 > void
154 > initfile(void)          /* initialize this file */
155   {
156      static int  filenum = 0;
157      /*
# Line 186 | Line 189 | initfile()             /* initialize this file */
189  
190  
191  
192 + void
193 + nextpage(void)          /* advance to next page */
194  
190 nextpage()              /* advance to next page */
191
195   {
196  
197      if (lineno == 0)
# Line 209 | Line 212 | nextpage()             /* advance to next page */
212  
213   #define MINRUN  4
214  
215 + extern void
216 + printblock(void)                /* output scanline block to file */
217  
213 printblock()            /* output scanline block to file */
214
218   {
219      int  i, c2;
220      register unsigned char  *scanline;
221 <    register int  j, beg, cnt;
221 >    register int  j, beg, cnt = 0;
222  
223      if (lineno == 0)
224          initfile();
# Line 247 | Line 250 | printblock()           /* output scanline block to file */
250   }
251  
252  
253 < putint2(i, fp)                  /* put a 2-byte positive integer */
254 < register int  i;
255 < register FILE   *fp;
253 > void
254 > putint2(                        /* put a 2-byte positive integer */
255 >        register int  i,
256 >        register FILE   *fp
257 > )
258   {
259          putc(i&0xff, fp);
260          putc(i>>8&0xff, fp);
261   }
262  
263  
264 < putthead(hp, ip, fp)            /* write header to output */
265 < struct hdStruct  *hp;
266 < char  *ip;
267 < register FILE  *fp;
264 > int
265 > putthead(               /* write header to output */
266 >        struct hdStruct  *hp,
267 >        char  *ip,
268 >        register FILE  *fp
269 > )
270   {
271          if (ip != NULL)
272                  putc(strlen(ip), fp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines