version 1.28, 2015/11/10 14:42:41 |
version 1.29, 2015/11/14 17:03:02 |
|
|
if (!(colwidths = calloc(ocols, sizeof(short)))) |
if (!(colwidths = calloc(ocols, sizeof(short)))) |
errx(1, "malloc: No gutter space"); |
errx(1, "malloc: No gutter space"); |
if (flags & SQUEEZE) { |
if (flags & SQUEEZE) { |
if (flags & TRANSPOSE) |
for (ep = elem, i = 0; i < ocols; i++) { |
for (ep = elem, i = 0; i < ocols; i++) { |
max = 0; |
|
if (flags & TRANSPOSE) { |
for (j = 0; j < orows; j++) |
for (j = 0; j < orows; j++) |
if ((n = strlen(*ep++)) > max) |
if ((n = strlen(*ep++)) > max) |
max = n; |
max = n; |
colwidths[i] = max + gutter; |
} else { |
} |
|
else |
|
for (ep = elem, i = 0; i < ocols; i++) { |
|
for (j = i; j < nelem; j += ocols) |
for (j = i; j < nelem; j += ocols) |
if ((n = strlen(ep[j])) > max) |
if ((n = strlen(ep[j])) > max) |
max = n; |
max = n; |
colwidths[i] = max + gutter; |
|
} |
} |
|
colwidths[i] = max + gutter; |
|
} |
} else { |
} else { |
for (i = 0; i < ocols; i++) |
for (i = 0; i < ocols; i++) |
colwidths[i] = colw; |
colwidths[i] = colw; |