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

Comparing ray/src/cv/mgf2meta.c (file contents):
Revision 2.1 by greg, Tue Apr 4 10:20:21 1995 UTC vs.
Revision 2.2 by greg, Tue Apr 4 11:06:53 1995 UTC

# Line 5 | Line 5 | static char SCCSid[] = "$SunId$ LBL";
5   #endif
6  
7   /*
8 < * Convert MGF (Materials and Geometry Format) to Metafile graphics
8 > * Convert MGF (Materials and Geometry Format) to Metafile 2-d graphics
9   */
10  
11   #include <stdio.h>
12   #include <math.h>
13   #include "mgflib/parser.h"
14  
15 < #define MX(v)   (int)((1<<14)*(v)[(proj_axis+1)%3])
16 < #define MY(v)   (int)((1<<14)*(v)[(proj_axis+2)%3])
15 > #define MX(v)   (int)(((1<<14)-1)*(v)[(proj_axis+1)%3])
16 > #define MY(v)   (int)(((1<<14)-1)*(v)[(proj_axis+2)%3])
17  
18   int     r_face();
19   int     proj_axis;
# Line 44 | Line 44 | char   *argv[];
44          if (argc == 8) {                /* convert stdin */
45                  if (mg_load(NULL) != MG_OK)
46                          exit(1);
47 +                mendpage();
48          } else                          /* convert each file */
49 <                for (i = 8; i < argc; i++)
49 >                for (i = 8; i < argc; i++) {
50                          if (mg_load(argv[i]) != MG_OK)
51                                  exit(1);
52 <        mendpage();                     /* close output */
53 <        mdone();
52 >                        mendpage();
53 >                }
54 >        mdone();                        /* close output */
55          exit(0);
56   userr:
57          fprintf(stderr, "Usage: %s {x|y|z} xmin xmax ymin ymax zmin zmax [file.mgf] ..\n",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines