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

Comparing ray/src/ot/oconv.c (file contents):
Revision 1.3 by greg, Mon Apr 10 17:00:27 1989 UTC vs.
Revision 1.4 by greg, Thu Jun 1 19:23:13 1989 UTC

# Line 57 | Line 57 | char  **argv;
57          if ((libpath = getenv("RAYPATH")) == NULL)
58                  libpath = ":/usr/local/lib/ray";
59  
60 <        for (i = 1; i < argc && argv[i][0] == '-'; i++)
60 >        for (i = 1; i < argc && argv[i][0] == '-' && argv[i][1]; i++)
61                  switch (argv[i][1]) {
62                  case 'i':                               /* input octree */
63                          infile = argv[++i];
# Line 85 | Line 85 | char  **argv;
85                          error(USER, errmsg);
86                          break;
87                  }
88 <        
88 >
89          if (infile != NULL) {           /* get old octree & objects */
90                  if (thescene.cusize > FTINY)
91                          error(USER, "only one of '-b' or '-i'");
# Line 101 | Line 101 | char  **argv;
101  
102          startobj = nobjects;            /* previous objects already converted */
103          
104 <        for ( ; i < argc; i++) {                /* read new files */
105 <                if (nfiles >= MAXOBJFIL)
106 <                        error(INTERNAL, "too many scene files");
107 <                readobj(ofname[nfiles++] = argv[i]);
108 <        }
104 >        for ( ; i < argc; i++)          /* read new scene descriptions */
105 >                if (!strcmp(argv[i], "-")) {    /* from stdin */
106 >                        readobj(NULL);
107 >                        outflags &= ~IO_FILES;
108 >                } else {                        /* from file */
109 >                        if (nfiles >= MAXOBJFIL)
110 >                                error(INTERNAL, "too many scene files");
111 >                        readobj(ofname[nfiles++] = argv[i]);
112 >                }
113 >
114          ofname[nfiles] = NULL;
115                                                  /* find bounding box */
116          bbmin[0] = bbmin[1] = bbmin[2] = FHUGE;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines