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

Comparing ray/src/cv/mgflib/3ds2mgf.c (file contents):
Revision 1.3 by greg, Fri Feb 9 11:02:29 1996 UTC vs.
Revision 1.5 by gregl, Fri Jan 16 10:47:27 1998 UTC

# Line 47 | Line 47 | extern unsigned _stklen = 16384;
47   #define MGF      4
48   #define RAW      99
49  
50 < #define DEG(x) ((180.0/M_PI)*(x))
51 < #define RAD(x) ((M_PI/180.0)*(x))
50 > #define DEG(x) ((double)(180.0/M_PI)*(x))
51 > #define RAD(x) ((double)(M_PI/180.0)*(x))
52  
53   #ifndef M_PI
54   #define M_PI (3.14159265358979323846)
# Line 351 | Line 351 | char *read_string (void);
351   float findfov (float lens);
352   int read_mgfmatname (char *s, int n, FILE *f);
353  
354 + char *progname;
355  
356 +
357   int main (int argc, char *argv[])
358   {
359      char meshfname[128];
# Line 453 | Line 455 | int main (int argc, char *argv[])
455   void process_args (int argc, char *argv[])
456   {
457      int i;
456    char *progname;
458      char *env_opt, *option;
459  
460      printf("\n\nAutodesk 3D Studio to Raytracer file Translator. Feb/96\n");
# Line 2376 | Line 2377 | void parse_3ds (Chunk *mainchunk)
2377  
2378      do  {
2379          start_chunk (&chunk);
2380 <
2380 >        if (feof(in)) {
2381 >                fprintf(stderr, "%s: unexpected EOF\n", progname);
2382 >                break;
2383 >        }
2384          if (chunk.end <= mainchunk->end) {
2385              switch (chunk.tag) {
2386                  case 0x3D3D: parse_mdata (&chunk);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines