| 319 |  | int     dir_is_horiz;           /* direct is meas. on horizontal? */ | 
| 320 |  | float   *mtx_data = NULL;       /* our matrix data */ | 
| 321 |  | int     ntsteps = 0;            /* number of rows in matrix */ | 
| 322 | + | int     step_alloc = 0; | 
| 323 |  | int     last_monthly = 0;       /* month of last report */ | 
| 324 |  | int     mo, da;                 /* month (1-12) and day (1-31) */ | 
| 325 |  | double  hr;                     /* hour (local standard time) */ | 
| 458 |  | s_meridian = DegToRad(s_meridian); | 
| 459 |  | /* process each time step in tape */ | 
| 460 |  | while (scanf("%d %d %lf %lf %lf\n", &mo, &da, &hr, &dir, &dif) == 5) { | 
| 460 | – | static int      step_alloc = 0; | 
| 461 |  | double          sda, sta; | 
| 462 |  | /* make space for next time step */ | 
| 463 |  | mtx_offset = 3*nskypatch*ntsteps++; | 
| 464 |  | if (ntsteps > step_alloc) { | 
| 465 | < | step_alloc += step_alloc>>1 + 8; | 
| 465 | > | step_alloc += (step_alloc>>1) + ntsteps + 7; | 
| 466 |  | mtx_data = resize_dmatrix(mtx_data, step_alloc, nskypatch); | 
| 467 |  | } | 
| 468 |  | if (dif <= 1e-4) { |