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

Comparing ray/src/px/protate.c (file contents):
Revision 1.5 by greg, Tue Jun 26 09:09:35 1990 UTC vs.
Revision 1.6 by greg, Tue Jul 3 08:45:48 1990 UTC

# Line 14 | Line 14 | static char SCCSid[] = "$SunId$ LBL";
14   #include "color.h"
15  
16   int     xres, yres;                     /* input resolution */
17 + double  inpaspect = 1.0;                /* input aspect ratio */
18  
19   char    buf[1<<20];                     /* output buffer */
20  
# Line 24 | Line 25 | int    nrows;                          /* number of rows output at once */
25   char    *progname;
26  
27  
28 + headline(s)                             /* process line from header */
29 + char    *s;
30 + {
31 +        fputs(s, stdout);
32 +        if (isaspect(s))
33 +                inpaspect *= aspectval(s);
34 + }
35 +
36 +
37   main(argc, argv)
38   int     argc;
39   char    *argv[];
# Line 44 | Line 54 | char   *argv[];
54                  fprintf(stderr, "%s: cannot open\n", argv[2]);
55                  exit(1);
56          }
57 <                                        /* copy header */
58 <        copyheader(fin, stdout);
57 >                                        /* transfer header */
58 >        getheader(fin, headline);
59                                          /* add new header info. */
60 +        if (inpaspect < .99 || inpaspect > 1.01)
61 +                fputaspect(1./inpaspect/inpaspect, stdout);
62          printf("%s\n\n", progname);
63                                          /* get picture size */
64          if (fgetresolu(&xres, &yres, fin) != (YMAJOR|YDECR)) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines