if (destcol > COLUMNS - 1) {
destline += destcol / COLUMNS;
if (outcol > COLUMNS - 1) {
l = (outcol + 1) / COLUMNS;
if (outline > LINES - 1) {
destline -= outline - (LINES - 1);
if (destline > LINES - 1) {
if (outline < LINES - 1) {
if (pfast == 0 && (!CA || holdcm))
if (destline < outline && !(CA && !holdcm || UP != NOSTR))
cgp = tgoto(CM, destcol, destline);
if (plod(strlen(cgp)) > 0)
* Tab to column col by flushing and then setting destcol.
* Move (slowly) to destination.
* Hard thing here is using home cursor on really deficient terminals.
* Otherwise just use cursor motions, hacking use of tabs and overtabbing
static int plodcnt, plodflg;
int soutcol, soutline, sdestcol, sdestline;
i = (destcol >> 3) + (destcol & 07);
if (GT && (j = ((destcol - (outcol &~ 07)) >> 3)))
if (outcol - destcol <= i && (BS || BC))
i = j = outcol - destcol;
k = (LINES - 1) - destline;
i = (destcol >> 3) + (destcol & 07);
if (BT && outcol > destcol) {
j = (((outcol+7) & ~7) - destcol - 1) >> 3;
if ((k = (destcol&7)+k) > 4)
if ((!NONL || outline >= destline) && (!NC || outline < destline) &&
(j > i + 1 || outcol > destcol && !BS && !BC)) {
while (outline < destline) {
if (plodflg && plodcnt < 0)
while (outcol > destcol) {
if (plodflg && plodcnt < 0)
if (BT && outcol - destcol > 4+k) {
while (outline > destline) {
if (plodflg && plodcnt < 0)
if (GT && destcol - outcol > 1) {
while ((i = ((outcol + 8) &~ 7)) <= destcol) {
if (destcol - outcol > 4 && (BC || BS)) {
while (outcol > destcol) {
while (outcol < destcol) {
if (plodflg && plodcnt < 0)