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.7 by greg, Mon Nov 18 22:02:12 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"
12   #include "rtio.h"
13   #include "resolu.h"
14 < #ifndef _WIN32
14 > #ifdef _WIN32
15 > #undef ftello
16 > #define ftello  ftell
17 > #undef ssize_t
18 > #define ssize_t size_t
19 > #else
20   #include <sys/mman.h>
21   #endif
22  
# Line 274 | Line 278 | do_transpose(const MEMLOAD *mp)
278          RECINDEX                *rp = NULL;
279          long                    nrecords;
280          int                     i, j;
281 +                                                /* propogate sizes */
282 +        if (ni_rows <= 0)
283 +                ni_rows = no_columns;
284 +        if (ni_columns <= 0)
285 +                ni_columns = no_rows;
286                                                  /* get # records (& index) */
287          if (record_width > 0) {
288                  if ((rp = index_records(mp, record_width)) == NULL)
# Line 291 | Line 300 | do_transpose(const MEMLOAD *mp)
300          } else
301                  nrecords = mp->len / -record_width;
302                                                  /* check sizes */
294        if (ni_rows <= 0)
295                ni_rows = no_columns;
296        if (ni_columns <= 0)
297                ni_columns = no_rows;
303          if ((ni_rows <= 0) & (ni_columns > 0))
304                  ni_rows = nrecords/ni_columns;
305          if ((ni_columns <= 0) & (ni_rows > 0))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines