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

Comparing ray/src/util/ranimate.c (file contents):
Revision 2.9 by greg, Wed Feb 7 16:42:41 1996 UTC vs.
Revision 2.11 by greg, Tue Apr 16 10:38:19 1996 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1995 Regents of the University of California */
1 > /* Copyright (c) 1996 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 15 | Line 15 | static char SCCSid[] = "$SunId$ LBL";
15   #include "view.h"
16   #include "vars.h"
17   #include "netproc.h"
18 +                                /* default remote shell */
19 + #ifdef _AUX_SOURCE
20 + #define REMSH           "remsh"
21 + #else
22 + #define REMSH           "rsh"
23 + #endif
24                                  /* input variables */
25   #define HOST            0               /* rendering host machine */
26   #define RENDER          1               /* rendering options */
# Line 38 | Line 44 | static char SCCSid[] = "$SunId$ LBL";
44   #define DISKSPACE       19              /* how much disk space to use */
45   #define RESOLUTION      20              /* desired final resolution */
46   #define EXPOSURE        21              /* how to compute exposure */
47 + #define RSH             22              /* remote shell script or program */
48  
49 < int     NVARS = 22;             /* total number of variables */
49 > int     NVARS = 23;             /* total number of variables */
50  
51   VARIABLE        vv[] = {                /* variable-value pairs */
52          {"host",        4,      0,      NULL,   NULL},
# Line 64 | Line 71 | VARIABLE       vv[] = {                /* variable-value pairs */
71          {"DISKSPACE",   3,      0,      NULL,   fltvalue},
72          {"RESOLUTION",  3,      0,      NULL,   onevalue},
73          {"EXPOSURE",    3,      0,      NULL,   onevalue},
74 +        {"RSH",         3,      0,      NULL,   onevalue},
75   };
76  
77   #define SFNAME  "STATUS"                /* status file name */
# Line 84 | Line 92 | int    nowarn = 0;             /* turn warnings off? */
92   int     silent = 0;             /* silent mode? */
93   int     noaction = 0;           /* take no action? */
94  
95 + char    *remsh;                 /* remote shell program/script */
96   char    rendopt[2048] = "";     /* rendering options */
97   char    rresopt[32];            /* rendering resolution options */
98   char    fresopt[32];            /* filter resolution options */
# Line 166 | Line 175 | char   *argv[];
175                  argv[i] = vval(NEXTANIM);       /* just change input file */
176                  if (!silent)
177                          printargs(argc, argv, stdout);
178 <                execvp(progname, argv);         /* pass to next */
179 <                quit(1);                        /* shouldn't return */
178 >                if ((argv[0] = getpath(progname,getenv("PATH"),X_OK)) == NULL)
179 >                        fprintf(stderr, "%s: command not found\n", progname);
180 >                else
181 >                        execv(progname, argv);
182 >                quit(1);
183          }
184          quit(0);
185   userr:
# Line 281 | Line 293 | checkdir()                     /* make sure we have our directory */
293  
294   setdefaults()                   /* set default values */
295   {
296 +        extern char     *atos();
297          char    buf[256];
298  
299          if (vdef(ANIMATE)) {
# Line 346 | Line 359 | setdefaults()                  /* set default values */
359                  vval(DISKSPACE) = "100";
360                  vdef(DISKSPACE)++;
361          }
362 +        if (!vdef(RSH)) {
363 +                vval(RSH) = REMSH;
364 +                vdef(RSH)++;
365 +        }
366 +                                /* locate remote shell program */
367 +        atos(buf, sizeof(buf), vval(RSH));
368 +        if ((remsh = getpath(buf, getenv("PATH"), X_OK)) != NULL)
369 +                remsh = savqstr(remsh);
370 +        else
371 +                remsh = vval(RSH);      /* will generate error if used */
372 +
373                                  /* append rendering options */
374          if (vdef(RENDER))
375                  sprintf(rendopt+strlen(rendopt), " %s", vval(RENDER));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines