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

Comparing ray/src/cv/mgf2rad.c (file contents):
Revision 2.19 by greg, Thu May 11 21:49:05 1995 UTC vs.
Revision 2.21 by greg, Tue Feb 27 20:11:27 1996 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1995 Regents of the University of California */
1 > /* Copyright (c) 1996 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 33 | Line 33 | main(argc, argv)               /* convert files to stdout */
33   int     argc;
34   char    *argv[];
35   {
36 <        int     i, rv;
36 >        int     i;
37                                  /* print out parser version */
38          printf("## Translated from MGF Version %d.%d\n", MG_VMAJOR, MG_VMINOR);
39                                  /* initialize dispatch table */
# Line 94 | Line 94 | char   *argv[];
94          }
95          putchar('\n');
96          if (i == argc) {                /* convert stdin */
97 <                if ((rv = mg_load(NULL)) != MG_OK)
97 >                if (mg_load(NULL) != MG_OK)
98                          exit(1);
99                  if (mg_nunknown)
100                          printf("## %s: %u unknown entities\n",
# Line 103 | Line 103 | char   *argv[];
103                  for ( ; i < argc; i++) {
104                          printf("## %s %s ##############################\n",
105                                          argv[0], argv[i]);
106 <                        if ((rv = mg_load(argv[i])) != MG_OK)
106 >                        if (mg_load(argv[i]) != MG_OK)
107                                  exit(1);
108                          if (mg_nunknown) {
109                                  printf("## %s %s: %u unknown entities\n",
# Line 539 | Line 539 | material()                     /* get (and print) current material */
539                  return(mname);
540          }
541                                          /* check for plastic */
542 <        if (c_cmaterial->rs < .1 && (c_cmaterial->rs < .01 ||
543 <                                        c_isgrey(&c_cmaterial->rs_c))) {
542 >        if (c_cmaterial->rs < .1) {
543                  cvtcolor(radrgb, &c_cmaterial->rd_c,
544                                          c_cmaterial->rd/(1.-c_cmaterial->rs));
545                  fprintf(matfp, "\nvoid plastic %s\n0\n0\n", mname);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines