MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ttydisc_rubword

Function ttydisc_rubword

freebsd/kern/tty_ttydisc.c:822–852  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

820}
821
822static void
823ttydisc_rubword(struct tty *tp)
824{
825 char c;
826 int quote, alnum;
827
828 /* Strip whitespace first. */
829 for (;;) {
830 if (ttyinq_peekchar(&tp->t_inq, &c, &quote) != 0)
831 return;
832 if (!CTL_WHITE(c))
833 break;
834 ttydisc_rubchar(tp);
835 }
836
837 /*
838 * Record whether the last character from the previous iteration
839 * was alphanumeric or not. We need this to implement ALTWERASE.
840 */
841 alnum = CTL_ALNUM(c);
842 for (;;) {
843 ttydisc_rubchar(tp);
844
845 if (ttyinq_peekchar(&tp->t_inq, &c, &quote) != 0)
846 return;
847 if (CTL_WHITE(c))
848 return;
849 if (CMP_FLAG(l, ALTWERASE) && CTL_ALNUM(c) != alnum)
850 return;
851 }
852}
853
854int
855ttydisc_rint(struct tty *tp, char c, int flags)

Callers 1

ttydisc_rintFunction · 0.85

Calls 2

ttyinq_peekcharFunction · 0.85
ttydisc_rubcharFunction · 0.85

Tested by

no test coverage detected