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.16 by greg, Fri Apr 14 19:03:20 1995 UTC vs.
Revision 2.19 by greg, Thu May 11 21:49:05 1995 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1994 Regents of the University of California */
1 > /* Copyright (c) 1995 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 34 | Line 34 | int    argc;
34   char    *argv[];
35   {
36          int     i, rv;
37 +                                /* print out parser version */
38 +        printf("## Translated from MGF Version %d.%d\n", MG_VMAJOR, MG_VMINOR);
39                                  /* initialize dispatch table */
40          mg_ehand[MG_E_COMMENT] = r_comment;     /* we pass comments */
41          mg_ehand[MG_E_COLOR] = c_hcolor;        /* they get color */
# Line 94 | Line 96 | char   *argv[];
96          if (i == argc) {                /* convert stdin */
97                  if ((rv = mg_load(NULL)) != MG_OK)
98                          exit(1);
99 +                if (mg_nunknown)
100 +                        printf("## %s: %u unknown entities\n",
101 +                                        argv[0], mg_nunknown);
102          } else                          /* convert each file */
103                  for ( ; i < argc; i++) {
104                          printf("## %s %s ##############################\n",
105                                          argv[0], argv[i]);
106                          if ((rv = mg_load(argv[i])) != MG_OK)
107                                  exit(1);
108 +                        if (mg_nunknown) {
109 +                                printf("## %s %s: %u unknown entities\n",
110 +                                                argv[0], argv[i], mg_nunknown);
111 +                                mg_nunknown = 0;
112 +                        }
113                  }
114          exit(0);
115   userr:
# Line 345 | Line 355 | char   **av;
355                  op = fname + strlen(fname);
356          (void)strcpy(op, ".rad");
357                                          /* see if we need to run ies2rad */
358 <        if (access(op, 0) == -1) {
358 >        if (access(fname, 0) == -1) {
359                  (void)strcpy(combuf, "ies2rad");/* build ies2rad command */
360                  op = combuf + 7;                /* get -m option (first) */
361                  if (ac-xa0 >= 2 && !strcmp(av[xa0], "-m")) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines