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

Comparing ray/src/util/rad.c (file contents):
Revision 2.23 by greg, Tue Sep 7 11:57:04 1993 UTC vs.
Revision 2.24 by greg, Thu Sep 9 13:07:13 1993 UTC

# Line 1015 | Line 1015 | char   *vn;            /* returned view name */
1015   printview(vopts)                        /* print out selected view */
1016   register char   *vopts;
1017   {
1018 <        extern char     *atos();
1018 >        extern char     *atos(), *getenv();
1019          char    buf[256];
1020          FILE    *fp;
1021          register char   *cp;
# Line 1050 | Line 1050 | register char  *vopts;
1050                          while (isspace(*vopts))
1051                                  vopts++;
1052                          putchar(' ');
1053 <                        while (*vopts && !isspace(*vopts))
1054 <                                putchar(*vopts++);
1053 > #ifdef MSDOS
1054 >                        if (*vopts == '$') {            /* expand env. var. */
1055 >                                if (!*atos(buf, sizeof(buf), vopts+1))
1056 >                                        return(-1);
1057 >                                if ((cp = getenv(buf)) == NULL)
1058 >                                        return(-1);
1059 >                                fputs(cp, stdout);
1060 >                                vopts = sskip(vopts);
1061 >                        } else
1062 > #endif
1063 >                                while (*vopts && !isspace(*vopts))
1064 >                                        putchar(*vopts++);
1065                  }
1066          } while (*vopts++);
1067          putchar('\n');

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines