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

Comparing ray/src/px/oki20.c (file contents):
Revision 2.11 by schorsch, Mon Oct 27 10:24:51 2003 UTC vs.
Revision 2.12 by schorsch, Mon Nov 10 12:28:56 2003 UTC

# Line 18 | Line 18 | static const char      RCSid[] = "$Id$";
18  
19   #define  ASPECT         (120./144.)     /* pixel aspect ratio */
20  
21 < #define  FILTER         "pfilt -1 -x %d -y %d -p %f %s",NCOLS,NROWS,ASPECT
21 > #define  FILTER         "pfilt -1 -x %d -y %d -p %f",NCOLS,NROWS,ASPECT
22 > #define  FILTER_F       "pfilt -1 -x %d -y %d -p %f \"%s\"",NCOLS,NROWS,ASPECT
23  
24   long  lpat[NCOLS];
25  
# Line 49 | Line 50 | char  *argv[];
50   printp(fname)                           /* print a picture */
51   char  *fname;
52   {
53 <        char  buf[64];
53 >        char  buf[PATH_MAX];
54          FILE  *input;
55          int  xres, yres;
56          COLR  scanline[NCOLS];
# Line 57 | Line 58 | char  *fname;
58  
59          if (dofilter) {
60                  if (fname == NULL) {
61 <                        sprintf(buf, FILTER, "");
61 >                        sprintf(buf, FILTER);
62                          fname = "<stdin>";
63                  } else
64 <                        sprintf(buf, FILTER, fname);
64 >                        sprintf(buf, FILTER_F, fname);
65                  if ((input = popen(buf, "r")) == NULL) {
66                          fprintf(stderr, "Cannot execute: %s\n", buf);
67                          return(-1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines