3 * Keith Bostic. All rights reserved.
5 * See the LICENSE file for redistribution information.
11 static const char sccsid[] = "@(#)ip_term.c 8.2 (Berkeley) 10/13/96";
14 #include <sys/types.h>
15 #include <sys/queue.h>
17 #include <bitstring.h>
20 #include "../common/common.h"
25 * Initialize the terminal special keys.
27 * PUBLIC: int ip_term_init __P((SCR *));
36 * Rework any function key mappings that were set before the
37 * screen was initialized.
39 for (qp = sp->gp->seqq.lh_first; qp != NULL; qp = qp->q.le_next)
40 if (F_ISSET(qp, SEQ_FUNCMAP))
41 (void)ip_fmap(sp, qp->stype,
42 qp->input, qp->ilen, qp->output, qp->olen);
48 * End the special keys defined by the termcap/terminfo entry.
50 * PUBLIC: int ip_term_end __P((GS *));
58 /* Delete screen specific mappings. */
59 for (qp = gp->seqq.lh_first; qp != NULL; qp = nqp) {
61 if (F_ISSET(qp, SEQ_SCREEN))
71 * PUBLIC: int ip_fmap __P((SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t));
74 ip_fmap(sp, stype, from, flen, to, tlen)
80 /* Bind a function key to a string sequence. */
86 * IP screen specific "option changed" routine.
88 * PUBLIC: int ip_optchange __P((SCR *, int, char *, u_long *));
91 ip_optchange(sp, opt, str, valp)
100 F_SET(sp->gp, G_SRESTART);
101 F_CLR(sp, SC_SCR_EX | SC_SCR_VI);
104 msgq(sp, M_ERR, "The screen type may not be changed");