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.7 by greg, Wed Jan 24 12:22:15 1996 UTC vs.
Revision 2.9 by greg, Wed Feb 7 16:42:41 1996 UTC

# Line 204 | Line 204 | getastat()                     /* check/set animation status */
204                  goto fmterr;
205          fclose(fp);
206          if (astat.pid != 0) {                   /* thinks it's still running */
207 <                gethostname(buf, sizeof(buf));
208 <                if (strcmp(buf, astat.host)) {
207 >                if (strcmp(myhostname(), astat.host)) {
208                          fprintf(stderr,
209                          "%s: process %d may still be running on host %s\n",
210                                          progname, astat.pid, astat.host);
# Line 224 | Line 223 | getastat()                     /* check/set animation status */
223                  return(-1);
224          }
225   setours:                                        /* set our values */
226 <        gethostname(astat.host, sizeof(astat.host));
226 >        strcpy(astat.host, myhostname());
227          astat.pid = getpid();
228          strcpy(astat.cfname, cfname);
229          return(0);
# Line 946 | Line 945 | int    n;
945                          quit(1);
946                  }
947          } else if (n < viewnum) {       /* rewind file */
948 +                if (viewnum == 1 && feof(viewfp))
949 +                        return(&curview);               /* just one view */
950                  if (fseek(viewfp, 0L, 0) == EOF) {
951                          perror(vval(VIEWFILE));
952                          quit(1);
# Line 955 | Line 956 | int    n;
956          }
957          while (n > viewnum) {           /* scan to desired view */
958                  if (fgets(linebuf, sizeof(linebuf), viewfp) == NULL)
959 <                        return(NULL);
959 >                        return(viewnum==1 ? &curview : NULL);
960                  if (isview(linebuf) && sscanview(&curview, linebuf) > 0)
961                          viewnum++;
962          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines