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.5 by greg, Wed Jun 21 08:56:35 1989 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines