- for (i = 0, nn = n->prev; nn &&
- i < (int)bl->args->argv[vals[2]].sz;
- nn = nn->prev, i++)
- offset += a2width
- (&bl->args->argv[vals[2]], i);
-
- /* Whether exceeds maximum column. */
- if (i < (int)bl->args->argv[vals[2]].sz)
- width = a2width(&bl->args->argv[vals[2]], i);
- else
- width = 0;
+ ncols = bl->args->argv[vals[2]].sz;
+ dcol = ncols < 5 ? 2 : ncols == 5 ? 1 : -1;
+ for (i=0, nn=n->prev; nn && i < (int)ncols; nn=nn->prev, i++)
+ offset += a2width(&bl->args->argv[vals[2]], i) +
+ (size_t)dcol;
+
+ /*
+ * Use the declared column widths,
+ * extended as explained in the preceding paragraph.
+ */
+ if (i < (int)ncols)
+ width = a2width(&bl->args->argv[vals[2]], i) +
+ (size_t)dcol;