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

Comparing ray/src/px/ra_ps.c (file contents):
Revision 2.26 by schorsch, Sun Jul 27 22:12:03 2003 UTC vs.
Revision 2.27 by schorsch, Fri Jan 2 12:47:01 2004 UTC

# Line 6 | Line 6 | static const char      RCSid[] = "$Id$";
6   */
7  
8   #include  <stdio.h>
9 + #include  <string.h>
10   #include  <math.h>
11   #include  <ctype.h>
12  
13   #include  "platform.h"
14   #include  "color.h"
15 + #include  "resolu.h"
16  
17   #define UPPER(c)        ((c)&~0x20)             /* ASCII trick */
18  
# Line 59 | Line 61 | int  xmax, ymax;                       /* input image dimensions */
61  
62   extern double   unit2inch();
63  
64 + static gethfunc headline;
65  
66 < int
67 < headline(s)             /* check header line */
68 < char  *s;
66 >
67 > static int
68 > headline(               /* check header line */
69 >        char    *s,
70 >        void    *p
71 > )
72   {
73          char  fmt[32];
74  
# Line 187 | Line 193 | unit2inch(s)           /* determine unit */
193   register char   *s;
194   {
195          static struct unit {char n; float f;} u[] = {
196 <                'i', 1.,
197 <                'm', 1./25.4,
198 <                'c', 1./2.54,
199 <                '\0' };
196 >                {'i', 1.},
197 >                {'m', 1./25.4},
198 >                {'c', 1./2.54},
199 >                {'\0',0} };
200          register struct unit    *up;
201  
202          while (*s && !isalpha(*s))
# Line 225 | Line 231 | parsepaper(ps)         /* determine paper size from name */
231   char    *ps;
232   {
233          static struct psize {char n[12]; float w,h;} p[] = {
234 <                "envelope", 4.12, 9.5,
235 <                "executive", 7.25, 10.5,
236 <                "letter", 8.5, 11.,
237 <                "lettersmall", 7.68, 10.16,
238 <                "legal", 8.5, 14.,
239 <                "monarch", 3.87, 7.5,
240 <                "statement", 5.5, 8.5,
241 <                "tabloid", 11., 17.,
242 <                "A3", 11.69, 16.54,
243 <                "A4", 8.27, 11.69,
244 <                "A4small", 7.47, 10.85,
245 <                "A5", 6.00, 8.27,
246 <                "A6", 4.13, 6.00,
247 <                "B4", 10.12, 14.33,
248 <                "B5", 7.17, 10.12,
249 <                "C5", 6.38, 9.01,
250 <                "C6", 4.49, 6.38,
251 <                "DL", 4.33, 8.66,
252 <                "hagaki", 3.94, 5.83,
253 <                "" };
234 >                {"envelope", 4.12, 9.5},
235 >                {"executive", 7.25, 10.5},
236 >                {"letter", 8.5, 11.},
237 >                {"lettersmall", 7.68, 10.16},
238 >                {"legal", 8.5, 14.},
239 >                {"monarch", 3.87, 7.5},
240 >                {"statement", 5.5, 8.5},
241 >                {"tabloid", 11., 17.},
242 >                {"A3", 11.69, 16.54},
243 >                {"A4", 8.27, 11.69},
244 >                {"A4small", 7.47, 10.85},
245 >                {"A5", 6.00, 8.27},
246 >                {"A6", 4.13, 6.00},
247 >                {"B4", 10.12, 14.33},
248 >                {"B5", 7.17, 10.12},
249 >                {"C5", 6.38, 9.01},
250 >                {"C6", 4.49, 6.38},
251 >                {"DL", 4.33, 8.66},
252 >                {"hagaki", 3.94, 5.83},
253 >                {"",0.0,0.0} };
254          register struct psize   *pp;
255          register char   *s = ps;
256          double  d;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines