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

Comparing ray/src/px/pcwarp.c (file contents):
Revision 3.2 by gwlarson, Wed Jun 9 14:06:55 1999 UTC vs.
Revision 3.5 by greg, Mon Nov 10 19:08:19 2008 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1997 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Warp colors in Radiance picture to correct for input/output changes.
6   */
7  
8   #include <stdio.h>
9 +
10 + #include "resolu.h"
11   #include "color.h"
12   #include "warp3d.h"
13  
# Line 21 | Line 20 | WARP3D *cwarp;                         /* our warp map */
20   int     iclip = CGAMUT_UPPER;           /* input value gamut clipping */
21   int     oclip = CGAMUT_LOWER;           /* output value gamut clipping */
22  
23 + static void syserror(char *s);
24 + static void picwarp(void);
25  
26 < main(argc, argv)
27 < int     argc;
28 < char    *argv[];
26 >
27 > int
28 > main(
29 >        int     argc,
30 >        char    *argv[]
31 > )
32   {
33          static char     picfmt[LPICFMT+1] = PICFMT;
34          int     cwflags = 0;
# Line 85 | Line 89 | char   *argv[];
89          exit(0);
90   userr:
91          fprintf(stderr,
92 <                "Usage: %s [-i][-o][-e|-f] map.cwp [input.pic [output.pic]]\n",
92 >                "Usage: %s [-i][-o][-e|-f] map.cwp [input.hdr [output.hdr]]\n",
93                          progname);
94          exit(1);
95   }
96  
97  
98 < syserror(s)                     /* print system error and exit */
99 < char    *s;
98 > static void
99 > syserror(                       /* print system error and exit */
100 >        char    *s
101 > )
102   {
103          fprintf(stderr, "%s: ", progname);
104          perror(s);
# Line 100 | Line 106 | char   *s;
106   }
107  
108  
109 < picwarp()                       /* warp our picture scanlines */
109 > static void
110 > picwarp(void)                   /* warp our picture scanlines */
111   {
112          register COLOR  *scan;
113          long    ngamut = 0;
# Line 142 | Line 149 | picwarp()                      /* warp our picture scanlines */
149                  }
150          }
151          if (ngamut >= (long)xres*yres/100)
152 <                fprintf(stderr, "%s: warning - %d%% of pixels out of gamut\n",
152 >                fprintf(stderr, "%s: warning - %ld%% of pixels out of gamut\n",
153                                  progname, 100*ngamut/((long)xres*yres));
154 <        free((char *)scan);
154 >        free((void *)scan);
155   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines