6 |
|
*/ |
7 |
|
|
8 |
|
#include <stdlib.h> |
9 |
– |
#include <string.h> |
9 |
|
#include <ctype.h> |
10 |
|
#include "platform.h" |
11 |
|
#include "rtio.h" |
386 |
|
if (outLevels > 1) { /* block reordering */ |
387 |
|
n = get_block_pos(r, c, outArray, outLevels); |
388 |
|
if (transpose) { |
389 |
< |
r = n/no_columns; |
390 |
< |
c = n - r*no_columns; |
391 |
< |
n = (long)r*ni_columns + c; |
389 |
> |
r = n/ni_rows; |
390 |
> |
c = n - r*ni_rows; |
391 |
> |
n = (long)c*ni_columns + r; |
392 |
|
} |
393 |
|
} else if (transpose) /* transpose only */ |
394 |
|
n = (long)c*ni_columns + r; |
438 |
|
no_columns = ni_rows; |
439 |
|
if (no_rows <= 0) |
440 |
|
no_rows = ni_columns; |
441 |
< |
if ((no_rows != ni_columns) | (no_columns != ni_rows)) |
441 |
> |
if (outLevels <= 1 && |
442 |
> |
(no_rows != ni_columns) | (no_columns != ni_rows)) |
443 |
|
goto badspec; |
444 |
|
} else { |
445 |
|
if (no_columns <= 0) |