Lines Matching +full:mode +full:- +full:xxx

1 /*-
39 * cl_screen --
51 gp = sp->gp; in cl_screen()
64 /* See if we're already in the right mode. */ in cl_screen()
70 * Fake leaving ex mode. in cl_screen()
72 * We don't actually exit ex or vi mode unless forced (e.g. by a window in cl_screen()
82 * Fake leaving vi mode. in cl_screen()
85 * screen. Move to the last line in the current screen -- this makes in cl_screen()
95 (void)wmove(win, RLNO(sp, sp->rows), 0); in cl_screen()
98 (void)wmove(win, RLNO(sp, sp->rows) - 1, 0); in cl_screen()
102 /* Enter the requested mode. */ in cl_screen()
109 * If doing an ex screen for ex mode, move to the last line in cl_screen()
112 if (F_ISSET(sp, SC_EX) && clp->cup != NULL) in cl_screen()
113 tputs(tgoto(clp->cup, in cl_screen()
114 0, O_VAL(sp, O_LINES) - 1), 1, cl_putchar); in cl_screen()
125 * cl_quit --
150 /* Really leave vi mode. */ in cl_quit()
155 /* Really leave ex mode. */ in cl_quit()
165 * XXX in cl_quit()
167 * implementations get it wrong. It may discard type-ahead characters in cl_quit()
170 (void)tcsetattr(STDIN_FILENO, TCSADRAIN | TCSASOFT, &clp->orig); in cl_quit()
177 * cl_vi_init --
187 gp = sp->gp; in cl_vi_init()
207 * XXX in cl_vi_init()
218 * XXX in cl_vi_init()
257 * XXX in cl_vi_init()
258 * Someone got let out alone without adult supervision -- the SunOS in cl_vi_init()
262 (void)sig_init(sp->gp, sp); in cl_vi_init()
265 * We use raw mode. What we want is 8-bit clean, however, signals in cl_vi_init()
276 raw(); /* 8-bit clean. */ in cl_vi_init()
279 /* Put the cursor keys into application mode. */ in cl_vi_init()
283 * XXX in cl_vi_init()
287 clp->ti_te = TI_SENT; in cl_vi_init()
290 * XXX in cl_vi_init()
313 * XXX in cl_vi_init()
320 * it matches one. VDSUSP wasn't in POSIX 1003.1-1990, so we test for in cl_vi_init()
323 * XXX in cl_vi_init()
328 if (tcgetattr(STDIN_FILENO, &clp->vi_enter)) { in cl_vi_init()
332 if (clp->orig.c_iflag & IXON) in cl_vi_init()
333 clp->vi_enter.c_iflag |= IXON; in cl_vi_init()
334 if (clp->orig.c_iflag & IXOFF) in cl_vi_init()
335 clp->vi_enter.c_iflag |= IXOFF; in cl_vi_init()
337 clp->vi_enter.c_lflag |= ISIG; in cl_vi_init()
339 clp->vi_enter.c_cc[VDSUSP] = _POSIX_VDISABLE; in cl_vi_init()
341 clp->vi_enter.c_cc[VQUIT] = _POSIX_VDISABLE; in cl_vi_init()
342 clp->vi_enter.c_cc[VSUSP] = _POSIX_VDISABLE; in cl_vi_init()
345 * XXX in cl_vi_init()
346 * OSF/1 doesn't turn off the <discard>, <literal-next> or <status> in cl_vi_init()
347 * characters when curses switches into raw mode. It should be OK in cl_vi_init()
351 clp->vi_enter.c_cc[VDISCARD] = _POSIX_VDISABLE; in cl_vi_init()
354 clp->vi_enter.c_cc[VLNEXT] = _POSIX_VDISABLE; in cl_vi_init()
357 clp->vi_enter.c_cc[VSTATUS] = _POSIX_VDISABLE; in cl_vi_init()
365 if (tcsetattr(STDIN_FILENO, TCSASOFT | TCSADRAIN, &clp->vi_enter)) { in cl_vi_init()
369 err: (void)cl_vi_end(sp->gp); in cl_vi_init()
376 * cl_vi_end --
386 /* Restore the cursor keys to normal mode. */ in cl_vi_end()
399 (void)move(LINES - 1, 0); in cl_vi_end()
412 * XXX in cl_vi_end()
416 clp->ti_te = TE_SENT; in cl_vi_end()
422 * cl_ex_init --
441 (void)cl_getcap(sp, "cup", &clp->cup); in cl_ex_init()
442 (void)cl_getcap(sp, "smso", &clp->smso); in cl_ex_init()
443 (void)cl_getcap(sp, "rmso", &clp->rmso); in cl_ex_init()
444 (void)cl_getcap(sp, "el", &clp->el); in cl_ex_init()
445 (void)cl_getcap(sp, "cuu1", &clp->cuu1); in cl_ex_init()
448 if (clp->smso == NULL || clp->rmso == NULL) { in cl_ex_init()
449 free(clp->smso); in cl_ex_init()
450 clp->smso = NULL; in cl_ex_init()
452 free(clp->rmso); in cl_ex_init()
453 clp->rmso = NULL; in cl_ex_init()
457 * Turn on canonical mode, with normal input and output processing. in cl_ex_init()
464 * mapping <newline> to <carriage-return> on output isn't required in cl_ex_init()
465 * by POSIX 1003.1b-1993. If this turns out to be a problem, then in cl_ex_init()
469 clp->ex_enter = clp->orig; in cl_ex_init()
470 clp->ex_enter.c_lflag |= ECHO | ECHOE | ECHOK | ICANON | IEXTEN | ISIG; in cl_ex_init()
472 clp->ex_enter.c_lflag |= ECHOCTL; in cl_ex_init()
475 clp->ex_enter.c_lflag |= ECHOKE; in cl_ex_init()
477 clp->ex_enter.c_iflag |= ICRNL; in cl_ex_init()
478 clp->ex_enter.c_oflag |= OPOST; in cl_ex_init()
480 clp->ex_enter.c_oflag |= ONLCR; in cl_ex_init()
483 fast: if (tcsetattr(STDIN_FILENO, TCSADRAIN | TCSASOFT, &clp->ex_enter)) { in cl_ex_init()
493 * cl_ex_end --
509 * cl_getcap --
521 t != (char *)-1 && (len = strlen(t)) != 0) { in cl_getcap()
529 * cl_freecap --
535 free(clp->el); in cl_freecap()
536 clp->el = NULL; in cl_freecap()
538 free(clp->cup); in cl_freecap()
539 clp->cup = NULL; in cl_freecap()
541 free(clp->cuu1); in cl_freecap()
542 clp->cuu1 = NULL; in cl_freecap()
544 free(clp->rmso); in cl_freecap()
545 clp->rmso = NULL; in cl_freecap()
547 free(clp->smso); in cl_freecap()
548 clp->smso = NULL; in cl_freecap()
551 free(clp->cw.bp1.c); in cl_freecap()
552 clp->cw.bp1.c = NULL; in cl_freecap()
553 clp->cw.blen1 = 0; in cl_freecap()
557 * cl_putenv --