Commit | Line | Data |
---|---|---|
e81ac630 SL |
1 | #ifndef lint |
2 | static char sccsid[] = "@(#)setline.c 5.1 (Berkeley) %G%"; | |
3 | #endif | |
4 | ||
5 | /*** | |
6 | * setline - optimize line setting for sending or receiving files | |
7 | * | |
8 | * return code - none | |
9 | */ | |
10 | ||
11 | #include "uucp.h" | |
12 | #ifdef SYSIII | |
13 | #include <termio.h> | |
14 | #endif | |
15 | ||
16 | #define PACKSIZE 64 | |
17 | #define SNDFILE 'S' | |
18 | #define RCVFILE 'R' | |
19 | #define RESET 'X' | |
20 | ||
21 | setline(type) | |
22 | char type; | |
23 | { | |
24 | #ifdef SYSIII | |
25 | static struct termio tbuf, sbuf; | |
26 | static int set = 0; | |
27 | ||
28 | DEBUG(2, "setline - %c\n", type); | |
29 | if (Unet) | |
30 | return; | |
31 | switch(type) { | |
32 | case SNDFILE: | |
33 | break; | |
34 | case RCVFILE: | |
35 | ioctl(Ifn, TCGETA, &tbuf); | |
36 | sbuf = tbuf; | |
37 | tbuf.c_cc[VMIN] = PACKSIZE; | |
38 | ioctl(Ifn, TCSETAW, &tbuf); | |
39 | set++; | |
40 | break; | |
41 | case RESET: | |
42 | if (set == 0) break; | |
43 | /* Anticipatory bug fixes: set, sbuf now static, 'set' is now reset. rti!trt */ | |
44 | set = 0; | |
45 | ioctl(Ifn, TCSETAW, &sbuf); | |
46 | break; | |
47 | } | |
48 | #endif | |
49 | } |