Lines Matching refs:sp

59 vs_busy(SCR *sp, const char *msg, busy_t btype)  in vs_busy()  argument
70 if (F_ISSET(sp, SC_EX | SC_SCR_EXWROTE)) in vs_busy()
73 gp = sp->gp; in vs_busy()
74 vip = VIP(sp); in vs_busy()
93 (void)gp->scr_cursor(sp, &vip->busy_oldy, &vip->busy_oldx); in vs_busy()
96 p = msg_cat(sp, msg, &len); in vs_busy()
97 (void)gp->scr_move(sp, LASTLINE(sp), 0); in vs_busy()
98 (void)gp->scr_addstr(sp, p, len); in vs_busy()
99 (void)gp->scr_cursor(sp, &notused, &vip->busy_fx); in vs_busy()
100 (void)gp->scr_clrtoeol(sp); in vs_busy()
101 (void)gp->scr_move(sp, LASTLINE(sp), vip->busy_fx); in vs_busy()
113 (void)gp->scr_move(sp, LASTLINE(sp), 0); in vs_busy()
114 (void)gp->scr_clrtoeol(sp); in vs_busy()
116 (void)gp->scr_move(sp, vip->busy_oldy, vip->busy_oldx); in vs_busy()
133 (void)gp->scr_move(sp, LASTLINE(sp), vip->busy_fx); in vs_busy()
134 (void)gp->scr_addstr(sp, flagc + vip->busy_ch++, 1); in vs_busy()
135 (void)gp->scr_move(sp, LASTLINE(sp), vip->busy_fx); in vs_busy()
138 (void)gp->scr_refresh(sp, 0); in vs_busy()
148 vs_home(SCR *sp) in vs_home() argument
150 (void)sp->gp->scr_move(sp, LASTLINE(sp), 0); in vs_home()
151 (void)sp->gp->scr_refresh(sp, 0); in vs_home()
161 vs_update(SCR *sp, const char *m1, const CHAR_T *m2) in vs_update() argument
168 gp = sp->gp; in vs_update()
178 if (F_ISSET(sp, SC_SCR_EXWROTE)) { in vs_update()
180 INT2CHAR(sp, m2, STRLEN(m2) + 1, np, nlen); in vs_update()
181 (void)ex_printf(sp, in vs_update()
183 (void)ex_fflush(sp); in vs_update()
190 (void)gp->scr_cursor(sp, &oldy, &oldx); in vs_update()
193 (void)gp->scr_move(sp, LASTLINE(sp), 0); in vs_update()
194 (void)gp->scr_clrtoeol(sp); in vs_update()
202 if (len > sp->cols - 2) in vs_update()
203 mlen = len = sp->cols - 2; in vs_update()
204 (void)gp->scr_addstr(sp, m1, mlen); in vs_update()
209 if (len + mlen > sp->cols - 2) in vs_update()
210 mlen = (sp->cols - 2) - len; in vs_update()
211 (void)gp->scr_waddstr(sp, m2, mlen); in vs_update()
214 (void)gp->scr_move(sp, oldy, oldx); in vs_update()
215 (void)gp->scr_refresh(sp, 0); in vs_update()
231 vs_msg(SCR *sp, mtype_t mtype, char *line, size_t len) in vs_msg() argument
238 gp = sp->gp; in vs_msg()
239 vip = VIP(sp); in vs_msg()
247 if (F_ISSET(sp, SC_TINPUT_INFO) || F_ISSET(gp, G_BELLSCHED)) in vs_msg()
248 if (F_ISSET(sp, SC_SCR_VI)) { in vs_msg()
250 (void)gp->scr_bell(sp); in vs_msg()
259 if (F_ISSET(sp, SC_TINPUT_INFO)) in vs_msg()
277 if (F_ISSET(sp, SC_EX | SC_SCR_EXWROTE)) { in vs_msg()
278 if (!F_ISSET(sp, SC_SCR_EX)) in vs_msg()
279 if (F_ISSET(sp, SC_SCR_EXWROTE)) { in vs_msg()
280 if (sp->gp->scr_screen(sp, SC_EX)) in vs_msg()
283 if (ex_init(sp)) in vs_msg()
287 (void)gp->scr_attr(sp, SA_INVERSE, 1); in vs_msg()
290 (void)gp->scr_attr(sp, SA_INVERSE, 0); in vs_msg()
293 F_CLR(sp, SC_EX_WAIT_NO); in vs_msg()
295 if (!F_ISSET(sp, SC_SCR_EX)) in vs_msg()
296 (void)sp->gp->scr_screen(sp, SC_VI); in vs_msg()
301 if (!F_ISSET(sp, SC_SCR_VI)) { in vs_msg()
302 (void)vs_msgsave(sp, mtype, line, len); in vs_msg()
307 (void)gp->scr_cursor(sp, &oldy, &oldx); in vs_msg()
311 vs_output(sp, mtype, line, len); in vs_msg()
339 if (IS_ONELINE(sp)) in vs_msg()
340 (void)msg_cmsg(sp, CMSG_CONT_S, &padding); in vs_msg()
345 maxcols = sp->cols - 1; in vs_msg()
348 vs_output(sp, vip->mtype, ".\n", 2); in vs_msg()
350 vs_output(sp, vip->mtype, ";", 1); in vs_msg()
351 vs_output(sp, M_NONE, " ", 1); in vs_msg()
375 vs_output(sp, mtype, s, e - s); in vs_msg()
378 vs_output(sp, M_NONE, "\n", 1); in vs_msg()
380 if (INTERRUPTED(sp)) in vs_msg()
384 ret: (void)gp->scr_move(sp, oldy, oldx); in vs_msg()
385 (void)gp->scr_refresh(sp, 0); in vs_msg()
393 vs_output(SCR *sp, mtype_t mtype, const char *line, int llen) in vs_output() argument
402 gp = sp->gp; in vs_output()
403 vip = VIP(sp); in vs_output()
415 if (len + vip->lcontinue > sp->cols) in vs_output()
416 len = sp->cols - vip->lcontinue; in vs_output()
425 if (!IS_ONELINE(sp)) { in vs_output()
427 (void)gp->scr_move(sp, in vs_output()
428 LASTLINE(sp) - 1, 0); in vs_output()
429 (void)gp->scr_clrtoeol(sp); in vs_output()
430 (void)vs_divider(sp); in vs_output()
435 if (vip->totalcount == sp->t_maxrows && in vs_output()
443 vs_scroll(sp, NULL, SCROLL_W_QUIT); in vs_output()
445 (void)gp->scr_move(sp, LASTLINE(sp), 0); in vs_output()
449 if (INTERRUPTED(sp)) in vs_output()
452 (void)gp->scr_move(sp, LASTLINE(sp), vip->lcontinue); in vs_output()
456 (void)gp->scr_attr(sp, SA_INVERSE, 1); in vs_output()
461 (void)gp->scr_addstr(sp, cbuf, cbp - cbuf); \ in vs_output()
480 (void)gp->scr_attr(sp, SA_INVERSE, 0); in vs_output()
483 (void)gp->scr_clrtoeol(sp); in vs_output()
499 gp->scr_cursor(sp, &notused, &vip->lcontinue); in vs_output()
512 vs_ex_resolve(SCR *sp, int *continuep) in vs_ex_resolve() argument
519 gp = sp->gp; in vs_ex_resolve()
520 vip = VIP(sp); in vs_ex_resolve()
528 vs_output(sp, vip->mtype, ".", 1); in vs_ex_resolve()
549 if (F_ISSET(sp, SC_SCR_EXWROTE)) { in vs_ex_resolve()
550 if (sp->gp->scr_screen(sp, SC_VI)) in vs_ex_resolve()
553 if (!F_ISSET(sp, SC_EX_WAIT_YES) && vip->totalcount < 2) { in vs_ex_resolve()
554 F_CLR(sp, SC_EX_WAIT_NO); in vs_ex_resolve()
559 F_CLR(sp, SC_EX_WAIT_YES); in vs_ex_resolve()
566 if (!F_ISSET(sp, SC_EX_WAIT_NO) && !INTERRUPTED(sp)) { in vs_ex_resolve()
567 wtype = F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE | in vs_ex_resolve()
569 if (F_ISSET(sp, SC_SCR_EXWROTE)) in vs_ex_resolve()
570 vs_wait(sp, continuep, wtype); in vs_ex_resolve()
572 vs_scroll(sp, continuep, wtype); in vs_ex_resolve()
578 if (F_ISSET(sp, SC_SCR_EXWROTE)) in vs_ex_resolve()
585 if (TAILQ_NEXT(sp, q) != NULL) in vs_ex_resolve()
586 F_SET(sp, SC_SCR_REDRAW); in vs_ex_resolve()
590 F_SET(sp, SC_SCR_REFORMAT); in vs_ex_resolve()
593 (void)gp->scr_attr(sp, SA_ALTERNATE, 1); in vs_ex_resolve()
599 F_CLR(sp, SC_SCR_EXWROTE | SC_EX_WAIT_NO); in vs_ex_resolve()
614 sp->rows ? 1 : sp->rows - vip->totalcount; in vs_ex_resolve()
615 ev.e_tlno = sp->rows; in vs_ex_resolve()
621 (void)vs_repaint(sp, &ev); in vs_ex_resolve()
636 vs_resolve(SCR *sp, SCR *csp, int forcewait) in vs_resolve() argument
652 gp = sp->gp; in vs_resolve()
653 vip = VIP(sp); in vs_resolve()
655 csp = sp; in vs_resolve()
663 (void)gp->scr_bell(sp); in vs_resolve()
667 if (F_ISSET(sp, SC_STATUS)) { in vs_resolve()
668 F_CLR(sp, SC_STATUS); in vs_resolve()
669 msgq_status(sp, sp->lno, MSTAT_TRUNCATE); in vs_resolve()
673 mod_rpt(sp); in vs_resolve()
682 if (!F_ISSET(sp, SC_SCR_VI) && vs_refresh(sp, 1)) in vs_resolve()
685 gp->scr_msg(sp, mp->mtype, mp->buf, mp->len); in vs_resolve()
703 vs_scroll(sp, NULL, SCROLL_W); in vs_resolve()
714 vs_scroll(sp, NULL, SCROLL_W); in vs_resolve()
718 sp->rows ? 1 : sp->rows - vip->totalcount; in vs_resolve()
719 ev.e_tlno = sp->rows; in vs_resolve()
730 (void)vs_repaint(sp, &ev); in vs_resolve()
743 vs_scroll(SCR *sp, int *continuep, sw_t wtype) in vs_scroll() argument
748 gp = sp->gp; in vs_scroll()
749 vip = VIP(sp); in vs_scroll()
750 if (!IS_ONELINE(sp)) { in vs_scroll()
756 (void)gp->scr_move(sp, vip->totalcount < in vs_scroll()
757 sp->rows ? LASTLINE(sp) - vip->totalcount : 0, 0); in vs_scroll()
758 (void)gp->scr_deleteln(sp); in vs_scroll()
761 if (TAILQ_NEXT(sp, q) != NULL) { in vs_scroll()
762 (void)gp->scr_move(sp, LASTLINE(sp), 0); in vs_scroll()
763 (void)gp->scr_insertln(sp); in vs_scroll()
766 if (wtype == SCROLL_W_QUIT && vip->linecount < sp->t_maxrows) in vs_scroll()
768 vs_wait(sp, continuep, wtype); in vs_scroll()
776 vs_wait(SCR *sp, int *continuep, sw_t wtype) in vs_wait() argument
784 gp = sp->gp; in vs_wait()
785 vip = VIP(sp); in vs_wait()
787 (void)gp->scr_move(sp, LASTLINE(sp), 0); in vs_wait()
788 if (IS_ONELINE(sp)) in vs_wait()
789 p = msg_cmsg(sp, CMSG_CONT_S, &len); in vs_wait()
793 p = msg_cmsg(sp, CMSG_CONT_Q, &len); in vs_wait()
796 p = msg_cmsg(sp, CMSG_CONT_EX, &len); in vs_wait()
799 p = msg_cmsg(sp, CMSG_CONT, &len); in vs_wait()
805 (void)gp->scr_addstr(sp, p, len); in vs_wait()
810 (void)gp->scr_clrtoeol(sp); in vs_wait()
811 (void)gp->scr_refresh(sp, 0); in vs_wait()
817 if (v_event_get(sp, &ev, 0, 0)) in vs_wait()
826 (void)gp->scr_bell(sp); in vs_wait()
847 vs_divider(SCR *sp) in vs_divider() argument
854 sizeof(DIVIDESTR) - 1 > sp->cols ? sp->cols : sizeof(DIVIDESTR) - 1; in vs_divider()
855 gp = sp->gp; in vs_divider()
856 (void)gp->scr_attr(sp, SA_INVERSE, 1); in vs_divider()
857 (void)gp->scr_addstr(sp, DIVIDESTR, len); in vs_divider()
858 (void)gp->scr_attr(sp, SA_INVERSE, 0); in vs_divider()
866 vs_msgsave(SCR *sp, mtype_t mt, char *p, size_t len) in vs_msgsave() argument
878 CALLOC_GOTO(sp, mp_n, MSGS *, 1, sizeof(MSGS)); in vs_msgsave()
879 MALLOC_GOTO(sp, mp_n->buf, char *, len); in vs_msgsave()
885 gp = sp->gp; in vs_msgsave()