Commit | Line | Data |
---|---|---|
6bafdb92 C |
1 | /* bk.h 4.2 81/02/19 */ |
2 | ||
3 | /* | |
4 | * Macro definition of bk.c/netinput(). | |
5 | * This is used to replace a call to | |
6 | * (*linesw[tp->t_line].l_rint)(c,tp); | |
7 | * with | |
8 | * | |
9 | * if (tp->t_line == NETLDISC) | |
10 | * BKINPUT(c, tp); | |
11 | * else | |
12 | * (*linesw[tp->t_line].l_rint)(c,tp); | |
13 | */ | |
14 | #define BKINPUT(c, tp) { \ | |
15 | if ((tp)->t_rec == 0) { \ | |
16 | *(tp)->t_cp++ = c; \ | |
17 | if (++(tp)->t_inbuf == BSIZE || (c) == '\n') { \ | |
18 | (tp)->t_rec = 1; \ | |
19 | wakeup((caddr_t)&(tp)->t_rawq); \ | |
20 | } \ | |
21 | } \ | |
22 | } |