6 |
|
*/ |
7 |
|
|
8 |
|
#include <stdlib.h> |
9 |
– |
#include <unistd.h> |
9 |
|
#include <string.h> |
10 |
|
#include <ctype.h> |
11 |
|
#include "platform.h" |
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) |
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)) |