+/*
+ * Return the column number that results from being in column col and
+ * hitting a tab, where tabs are set every ts columns. Work right for
+ * the case where col > COLUMNS, even if ts does not divide COLUMNS.
+ */
+tabcol(col, ts)
+int col, ts;
+{
+ int offset, result;
+
+ if (col >= COLUMNS) {
+ offset = COLUMNS * (col/COLUMNS);
+ col -= offset;
+ } else
+ offset = 0;
+ result = col + ts - (col % ts) + offset;
+ return (result);
+}
+