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

Comparing ray/src/cv/mgflib/parser.c (file contents):
Revision 1.1 by greg, Tue Jun 21 14:45:46 1994 UTC vs.
Revision 1.2 by greg, Wed Jun 22 15:33:47 1994 UTC

# Line 56 | Line 56 | int    mg_nqcdivs = MG_NQCD;   /* number of divisions per q
56                                  /* alternate handler routines */
57  
58   static int      e_any_toss(),           /* discard unneeded entity */
59 <                e_ies();                /* IES luminaire file */
59 >                e_ies(),                /* IES luminaire file */
60                  e_include(),            /* include file */
61                  e_sph(),                /* sphere */
62                  e_cyl(),                /* cylinder */
# Line 300 | Line 300 | char   *fn;
300          int     rval;
301  
302          if ((rval = mg_open(&cntxt, fn)) != MG_OK) {
303 <                fprintf("%s: %s\n", fn, mg_err[rval]);
303 >                fprintf(stderr, "%s: %s\n", fn, mg_err[rval]);
304                  return(rval);
305          }
306          while (mg_read())               /* parse each line */
# Line 349 | Line 349 | int    (*f)();
349                  if (i+1 >= ac || !isint(av[i+1]))
350                          return(MG_ETYPE);
351                  niter = atoi(av[i+1]);
352 <                argv[0] = "-i";
352 >                argv[0] = mg_ename[MG_E_OBJECT];
353                  argv[1] = cntbuf;
354                  for (j = 2; j+i < ac; j++)
355                          argv[j] = av[j+i];
356                  argv[j] = NULL;
357                  for (j = 0; j < niter; j++) {
358                          sprintf(cntbuf, "%d", j);
359 +                        if ((rval = handle_it(MG_E_OBJECT, 2, argv)) != MG_OK)
360 +                                return(rval);
361 +                        argv[0] = "-i";
362                          if ((rval = mg_iterate(ac-i, argv, f)) != MG_OK)
363 +                                return(rval);
364 +                        argv[0] = mg_ename[MG_E_OBJECT];
365 +                        if ((rval = handle_it(MG_E_OBJECT, 1, argv)) != MG_OK)
366                                  return(rval);
367                  }
368          } else if ((rval = (*f)()) != MG_OK)    /* else do this instance */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines