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

Comparing ray/src/ot/obj2mesh.c (file contents):
Revision 2.12 by greg, Thu Jul 12 14:58:53 2007 UTC vs.
Revision 2.15 by greg, Fri Mar 3 01:25:27 2017 UTC

# Line 6 | Line 6 | static const char RCSid[] = "$Id$";
6   */
7  
8   #include "copyright.h"
9 + #include "paths.h"
10   #include "platform.h"
11   #include "standard.h"
12   #include "resolu.h"
# Line 39 | Line 40 | main(          /* compile a .OBJ file into a mesh */
40   )
41   {
42          int  nmatf = 0;
43 +        int  verbose = 0;
44          char  pathnames[12800];
45          char  *pns = pathnames;
46          char  *matinp[128];
# Line 65 | Line 67 | main(          /* compile a .OBJ file into a mesh */
67                                  sprintf(errmsg,
68                                          "cannot find library material: '%s'",
69                                                  argv[i]);
70 <                                error(USER, errmsg);
70 >                                error(SYSTEM, errmsg);
71                          }
72                          matinp[nmatf++] = strcpy(pns, cp);
73                          while (*pns++)
# Line 74 | Line 76 | main(          /* compile a .OBJ file into a mesh */
76                  case 'w':                               /* supress warnings */
77                          nowarn = 1;
78                          break;
79 +                case 'v':                               /* print mesh stats */
80 +                        verbose = 1;
81 +                        break;
82                  default:
83                          sprintf(errmsg, "unknown option: '%s'", argv[i]);
84                          error(USER, errmsg);
# Line 120 | Line 125 | main(          /* compile a .OBJ file into a mesh */
125  
126          writemesh(ourmesh, stdout);     /* write mesh to output */
127          
128 <        /* printmeshstats(ourmesh, stderr); */
128 >        if (verbose)
129 >                printmeshstats(ourmesh, stderr);
130  
131          quit(0);
132          return 0; /* pro forma return */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines