| 52 | } |
| 53 | |
| 54 | static void compute_column_width(struct column_data *data) |
| 55 | { |
| 56 | int i, x, y; |
| 57 | for (x = 0; x < data->cols; x++) { |
| 58 | data->width[x] = XY2LINEAR(data, x, 0); |
| 59 | for (y = 0; y < data->rows; y++) { |
| 60 | i = XY2LINEAR(data, x, y); |
| 61 | if (i < data->list->nr && |
| 62 | data->len[data->width[x]] < data->len[i]) |
| 63 | data->width[x] = i; |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | /* |
| 69 | * Shrink all columns by shortening them one row each time (and adding |