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

Comparing ray/src/util/rcollate.c (file contents):
Revision 2.4 by greg, Fri Sep 6 21:34:39 2013 UTC vs.
Revision 2.6 by greg, Mon Nov 18 18:07:16 2013 UTC

# Line 6 | Line 6 | static const char RCSid[] = "$Id$";
6   */
7  
8   #include <stdlib.h>
9 #include <unistd.h>
9   #include <string.h>
10   #include <ctype.h>
11   #include "platform.h"
# Line 274 | Line 273 | do_transpose(const MEMLOAD *mp)
273          RECINDEX                *rp = NULL;
274          long                    nrecords;
275          int                     i, j;
276 +                                                /* propogate sizes */
277 +        if (ni_rows <= 0)
278 +                ni_rows = no_columns;
279 +        if (ni_columns <= 0)
280 +                ni_columns = no_rows;
281                                                  /* get # records (& index) */
282          if (record_width > 0) {
283                  if ((rp = index_records(mp, record_width)) == NULL)
# Line 291 | Line 295 | do_transpose(const MEMLOAD *mp)
295          } else
296                  nrecords = mp->len / -record_width;
297                                                  /* check sizes */
294        if (ni_rows <= 0)
295                ni_rows = no_columns;
296        if (ni_columns <= 0)
297                ni_columns = no_rows;
298          if ((ni_rows <= 0) & (ni_columns > 0))
299                  ni_rows = nrecords/ni_columns;
300          if ((ni_columns <= 0) & (ni_rows > 0))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines