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

Comparing ray/src/gen/gendaymtx.c (file contents):
Revision 2.17 by greg, Sun Oct 26 17:35:53 2014 UTC vs.
Revision 2.21 by greg, Wed Sep 2 22:52:04 2015 UTC

# Line 86 | Line 86 | static const char RCSid[] = "$Id$";
86   #include <string.h>
87   #include <ctype.h>
88   #include "rtmath.h"
89 + #include "resolu.h"
90   #include "platform.h"
91   #include "color.h"
92   #include "resolu.h"
# Line 393 | Line 394 | main(int argc, char *argv[])
394                          break;
395                  case '5':                       /* 5-phase calculation */
396                          nsuns = 1;
397 <                        fixed_sun_sa = 6.797e-05;
397 >                        fixed_sun_sa = PI/360.*atof(argv[++i]);
398 >                        if (fixed_sun_sa <= 0) {
399 >                                fprintf(stderr, "%s: missing solar disk size argument for '-5' option\n",
400 >                                                argv[0]);
401 >                                exit(1);
402 >                        }
403 >                        fixed_sun_sa *= fixed_sun_sa*PI;
404                          break;
405                  default:
406                          goto userr;
# Line 520 | Line 527 | main(int argc, char *argv[])
527                  printf("NROWS=%d\n", nskypatch);
528                  printf("NCOLS=%d\n", ntsteps);
529                  printf("NCOMP=3\n");
530 <                fputformat(getfmtname(outfmt), stdout);
530 >                fputformat((char *)getfmtname(outfmt), stdout);
531                  putchar('\n');
532          }
533                                          /* patches are rows (outer sort) */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines