Lines Matching +full:no +full:- +full:wp
1 /*-
32 * msgq --
50 static int reenter; /* STATIC: Re-entrancy check. */ in msgq()
65 * It's possible to enter msg when there's no screen to hold the in msgq()
76 gp = sp->gp; in msgq()
104 * probably dead anyway, but there's no reason to drop core. in msgq()
129 #define REM (blen - mlen) in msgq()
146 sp != NULL && gp != NULL && gp->if_name != NULL) { in msgq()
147 CHAR_T *wp; in msgq() local
150 CHAR2INT(sp, gp->if_name, strlen(gp->if_name) + 1, wp, wlen); in msgq()
151 for (; *wp != '\0'; ++wp) { in msgq()
152 len = snprintf(mp, REM, "%s", KEY_NAME(sp, *wp)); in msgq()
157 len = snprintf(mp, REM, ", %d: ", gp->if_lno); in msgq()
180 * of msgq are responsible for making sure that all the non-printable in msgq()
182 * random non-printable character selected at terminal initialization in msgq()
208 str[soff].prefix = u - t; in msgq()
212 str[soff].skip = (p - u) + 1; in msgq()
221 str[soff].suffix = p - u; in msgq()
227 /* If no magic strings, we're done. */ in msgq()
259 gp == NULL ? DEFAULT_NOPRINT : gp->noprint; in msgq()
285 ch = gp == NULL ? DEFAULT_NOPRINT : gp->noprint; *p != '\0'; ++p) in msgq()
291 str[cnt2].prefix = p - t; in msgq()
307 --len; in msgq()
309 memmove(mp, s_rbp, rbp - s_rbp); in msgq()
334 gp->scr_msg(sp, mt, bp, mlen); in msgq()
348 * msgq_wstr --
368 * msgq_str --
393 * mod_rpt --
397 * Historic vi documentation (USD:15-8) claimed that "The editor will also
399 * This wasn't true -- edit a large file and do "100d|1". We don't implement
441 sp->rptlchange = OOBLNO; in mod_rpt()
449 * command, which used >=. No lie. Furthermore, an action was never in mod_rpt()
462 total += sp->rptlines[cnt]; in mod_rpt()
465 if (total <= rptval && sp->rptlines[L_YANKED] < rptval) { in mod_rpt()
467 sp->rptlines[cnt] = 0; in mod_rpt()
475 if (sp->rptlines[cnt] != 0) { in mod_rpt()
484 (u_long)sp->rptlines[cnt]); in mod_rpt()
488 lines[sp->rptlines[cnt] == 1 ? 0 : 1], &len); in mod_rpt()
498 sp->rptlines[cnt] = 0; in mod_rpt()
506 sp->gp->scr_msg(sp, M_INFO, bp, tlen); in mod_rpt()
517 * msgq_status --
530 CHAR_T *wp; in msgq_status() local
534 len = strlen(sp->frp->name); in msgq_status()
540 CHAR2INT(sp, sp->frp->name, len + 1, wp, wlen); in msgq_status()
543 for (; *wp != '\0'; ++wp) { in msgq_status()
544 len = KEY_LEN(sp, *wp); in msgq_status()
545 memcpy(p, KEY_NAME(sp, *wp), len); in msgq_status()
553 if (F_ISSET(sp, SC_STATUS_CNT) && sp->argv != NULL) { in msgq_status()
554 for (cnt = 0, ap = sp->argv; *ap != NULL; ++ap, ++cnt); in msgq_status()
556 (void)snprintf(p, ep - p, in msgq_status()
567 * read-only bit is set. in msgq_status()
573 if (F_ISSET(sp->frp, FR_NEWFILE)) { in msgq_status()
574 F_CLR(sp->frp, FR_NEWFILE); in msgq_status()
580 if (F_ISSET(sp->frp, FR_NAMECHANGE)) { in msgq_status()
590 if (F_ISSET(sp->ep, F_MODIFIED)) in msgq_status()
598 if (F_ISSET(sp->frp, FR_UNLOCKED)) { in msgq_status()
631 (void)snprintf(p, ep - p, t, (u_long)lno, (u_long)last, in msgq_status()
637 (void)snprintf(p, ep - p, t, (u_long)lno); in msgq_status()
641 (void)snprintf(p, ep - p, " (pid %lu)", (u_long)getpid()); in msgq_status()
645 len = p - bp; in msgq_status()
663 if (LF_ISSET(MSTAT_TRUNCATE) && len > sp->cols) { in msgq_status()
664 for (; s < np && (*s != '/' || (p - s) > sp->cols - 3); ++s); in msgq_status()
666 s = p - (sp->cols - 5); in msgq_status()
667 *--s = ' '; in msgq_status()
669 *--s = '.'; in msgq_status()
670 *--s = '.'; in msgq_status()
671 *--s = '.'; in msgq_status()
672 len = p - s; in msgq_status()
678 sp->gp->scr_msg(sp, M_INFO, s, len); in msgq_status()
686 * msg_open --
698 * if we can't open the user defined ones -- it's useful to know if in msg_open()
722 if ((catd = catopen(p, NL_CAT_LOCALE)) == (nl_catd)-1) { in msg_open()
730 * POSIX.1-2008 gives no instruction on how to report a in msg_open()
748 msg_close(sp->gp); in msg_open()
749 sp->gp->catd = catd; in msg_open()
755 * msg_close --
763 if (gp->catd != (nl_catd)-1) in msg_close()
764 (void)catclose(gp->catd); in msg_close()
768 * msg_cont --
799 * msg_cat --
825 gp = sp == NULL ? NULL : sp->gp; in msg_cat()
826 if (gp != NULL && gp->catd != (nl_catd)-1 && in msg_cat()
827 (p = catgets(gp->catd, 1, msgno, str)) != NULL) { in msg_cat()
839 * msg_print --
849 CHAR_T *wp, *cp; in msg_print() local
855 CHAR2INT5(sp, EXP(sp)->ibcw, (char *)s, strlen(s) + 1, wp, wlen); in msg_print()
856 for (cp = wp; *cp != '\0'; ++cp) in msg_print()
881 for (p = bp, ep = (bp + blen) - 1; *wp != '\0' && p < ep; ++wp) in msg_print()
882 for (t = KEY_NAME(sp, *wp); *t != '\0' && p < ep; *p++ = *t++); in msg_print()