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 2.1 by greg, Tue Nov 12 16:04:09 1991 UTC vs.
Revision 2.4 by greg, Mon Oct 16 11:40:22 1995 UTC

# Line 21 | Line 21 | int    xres, yres;                     /* input resolution */
21  
22   int     correctorder = 0;               /* order correction? */
23  
24 + #ifdef BIGMEM
25 + char    buf[1<<22];                     /* output buffer */
26 + #else
27   char    buf[1<<20];                     /* output buffer */
28 + #endif
29  
30   int     nrows;                          /* number of rows output at once */
31  
# Line 37 | Line 41 | main(argc, argv)
41   int     argc;
42   char    *argv[];
43   {
44 +        static char     picfmt[LPICFMT+1] = PICFMT;
45 +        int     rval;
46          FILE    *fin;
47  
48          progname = argv[0];
# Line 58 | Line 64 | char   *argv[];
64                  exit(1);
65          }
66                                          /* transfer header */
67 <        if (checkheader(fin, COLRFMT, stdout) < 0) {
67 >        if ((rval = checkheader(fin, picfmt, stdout)) < 0) {
68                  fprintf(stderr, "%s: not a Radiance picture\n", progname);
69                  exit(1);
70          }
71 +        if (rval)
72 +                fputformat(picfmt, stdout);
73                                          /* add new header info. */
74 <        printf("%s\n\n", progname);
74 >        printf("%s%s\n\n", progname, correctorder?" -c":"");
75                                          /* get picture size */
76          if ((order = fgetresolu(&xres, &yres, fin)) < 0) {
77                  fprintf(stderr, "%s: bad picture size\n", progname);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines