/* * returns the column of the previous tabstop * (or 0 if there are no more). * A tabstop at col is ignored. */ static int TabPrev(Tabs tabs, int col) { for (--col; col >= 0; --col) if ((col < MAX_TABS) && TST_TAB(tabs, col)) return (col); return (0); }
/* * returns the column of the next tabstop * (or MAX_TABS - 1 if there are no more). * A tabstop at col is ignored. */ static int TabNext(TScreen * screen, Tabs tabs, int col) { if (screen->curses && screen->do_wrap && (term->flags & WRAPAROUND)) { xtermIndex(screen, 1); set_cur_col(screen, 0); col = screen->do_wrap = 0; } for (++col; col < MAX_TABS; ++col) if (TST_TAB(tabs, col)) return (col); return (MAX_TABS - 1); }
/* * returns the column of the next tabstop * (or MAX_TABS - 1 if there are no more). * A tabstop at col is ignored. */ static int TabNext(XtermWidget xw, Tabs tabs, int col) { TScreen *screen = TScreenOf(xw); if (screen->curses && screen->do_wrap && (xw->flags & WRAPAROUND)) { xtermIndex(xw, 1); set_cur_col(screen, 0); col = 0; screen->do_wrap = False; } for (++col; col < MAX_TABS; ++col) if (TST_TAB(tabs, col)) return (col); return (MAX_TABS - 1); }