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

Comparing ray/src/cv/mgflib/mgf2inv.c (file contents):
Revision 1.6 by greg, Tue Mar 18 11:05:43 1997 UTC vs.
Revision 1.9 by schorsch, Sun Jul 27 22:12:02 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1995 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Convert MGF to Inventor file.
6   *
# Line 12 | Line 9 | static char SCCSid[] = "$SunId$ LBL";
9  
10   #include <stdio.h>
11  
12 + #include <stdlib.h>
13 +
14   #include <math.h>
15  
16   #include <ctype.h>
# Line 24 | Line 23 | static char SCCSid[] = "$SunId$ LBL";
23  
24   #define O_INV1          1       /* Inventor 1.0 output */
25   #define O_INV2          2       /* Inventor 2.0 output */
26 < #define O_VRML          3       /* VRML output */
26 > #define O_VRML1         3       /* VRML 1.0 output */
27  
28   #define MAXID           48      /* maximum identifier length */
29  
# Line 99 | Line 98 | char   *argv[];
98                                  /* get options and print format line */
99          for (i = 1; i < argc && argv[i][0] == '-'; i++)
100                  if (!strcmp(argv[i], "-vrml"))
101 <                        outtype = O_VRML;
101 >                        outtype = O_VRML1;
102                  else if (!strcmp(argv[i], "-1"))
103                          outtype = O_INV1;
104                  else if (!strcmp(argv[i], "-2"))
# Line 113 | Line 112 | char   *argv[];
112          case O_INV2:
113                  printf("#Inventor V2.0 ascii\n");
114                  break;
115 <        case O_VRML:
116 <                printf("#VRML 1.0 ascii\n");
115 >        case O_VRML1:
116 >                printf("#VRML V1.0 ascii\n");
117                  break;
118          }
119          printf("## Translated from MGF Version %d.%d\n", MG_VMAJOR, MG_VMINOR);
# Line 460 | Line 459 | char   **av;
459          if (put_material() < 0)
460                  return(MG_EBADMAT);
461                                  /* get endpoints */
462 <        if ((v1 = c_getvert(av[1])) == NULL | (v2 = c_getvert(av[3])) == NULL)
462 >        if (((v1 = c_getvert(av[1])) == NULL) | ((v2 = c_getvert(av[3])) == NULL))
463                  return(MG_EUNDEF);
464                                  /* get radius */
465          if (!isflt(av[2]))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines