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.15 by greg, Tue Jun 17 18:51:47 2014 UTC vs.
Revision 2.18 by greg, Sun Oct 26 17:37:34 2014 UTC

# Line 88 | Line 88 | static const char RCSid[] = "$Id$";
88   #include "rtmath.h"
89   #include "platform.h"
90   #include "color.h"
91 + #include "resolu.h"
92  
93   char *progname;                                                         /* Program name */
94   char errmsg[128];                                                       /* Error message buffer */
# Line 319 | Line 320 | main(int argc, char *argv[])
320          int     dir_is_horiz;           /* direct is meas. on horizontal? */
321          float   *mtx_data = NULL;       /* our matrix data */
322          int     ntsteps = 0;            /* number of rows in matrix */
323 +        int     step_alloc = 0;
324          int     last_monthly = 0;       /* month of last report */
325          int     mo, da;                 /* month (1-12) and day (1-31) */
326          double  hr;                     /* hour (local standard time) */
# Line 457 | Line 459 | main(int argc, char *argv[])
459          s_meridian = DegToRad(s_meridian);
460                                          /* process each time step in tape */
461          while (scanf("%d %d %lf %lf %lf\n", &mo, &da, &hr, &dir, &dif) == 5) {
460                static int      step_alloc = 0;
462                  double          sda, sta;
463                                          /* make space for next time step */
464                  mtx_offset = 3*nskypatch*ntsteps++;
465                  if (ntsteps > step_alloc) {
466 <                        step_alloc += step_alloc>>1 + 8;
466 >                        step_alloc += (step_alloc>>1) + ntsteps + 7;
467                          mtx_data = resize_dmatrix(mtx_data, step_alloc, nskypatch);
468                  }
469                  if (dif <= 1e-4) {
# Line 519 | Line 520 | main(int argc, char *argv[])
520                  printf("NROWS=%d\n", nskypatch);
521                  printf("NCOLS=%d\n", ntsteps);
522                  printf("NCOMP=3\n");
523 <                fputformat(getfmtname(outfmt), stdout);
523 >                fputformat((char *)getfmtname(outfmt), stdout);
524                  putchar('\n');
525          }
526                                          /* patches are rows (outer sort) */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines