| 1095 | } |
| 1096 | |
| 1097 | size_t |
| 1098 | ttydisc_rint_simple(struct tty *tp, const void *buf, size_t len) |
| 1099 | { |
| 1100 | const char *cbuf; |
| 1101 | |
| 1102 | if (ttydisc_can_bypass(tp)) |
| 1103 | return (ttydisc_rint_bypass(tp, buf, len)); |
| 1104 | |
| 1105 | for (cbuf = buf; len-- > 0; cbuf++) { |
| 1106 | if (ttydisc_rint(tp, *cbuf, 0) != 0) |
| 1107 | break; |
| 1108 | } |
| 1109 | |
| 1110 | return (cbuf - (const char *)buf); |
| 1111 | } |
| 1112 | |
| 1113 | size_t |
| 1114 | ttydisc_rint_bypass(struct tty *tp, const void *buf, size_t len) |
no test coverage detected