113668Ssam #ifndef lint 2*17838Sralph static char sccsid[] = "@(#)setline.c 5.2 (Berkeley) 01/22/85"; 313668Ssam #endif 413668Ssam 513668Ssam #include "uucp.h" 6*17838Sralph #ifdef USG 713668Ssam #include <termio.h> 813668Ssam #endif 913668Ssam 1013668Ssam #define PACKSIZE 64 1113668Ssam #define SNDFILE 'S' 1213668Ssam #define RCVFILE 'R' 1313668Ssam #define RESET 'X' 1413668Ssam 15*17838Sralph /* 16*17838Sralph * optimize line setting for sending or receiving files 17*17838Sralph * 18*17838Sralph * return code - none 19*17838Sralph */ 2013668Ssam setline(type) 2113668Ssam char type; 2213668Ssam { 23*17838Sralph #ifdef USG 2413668Ssam static struct termio tbuf, sbuf; 2513668Ssam static int set = 0; 2613668Ssam 2713668Ssam DEBUG(2, "setline - %c\n", type); 28*17838Sralph if (IsTcpIp) 2913668Ssam return; 3013668Ssam switch(type) { 3113668Ssam case SNDFILE: 3213668Ssam break; 3313668Ssam case RCVFILE: 3413668Ssam ioctl(Ifn, TCGETA, &tbuf); 3513668Ssam sbuf = tbuf; 3613668Ssam tbuf.c_cc[VMIN] = PACKSIZE; 3713668Ssam ioctl(Ifn, TCSETAW, &tbuf); 3813668Ssam set++; 3913668Ssam break; 4013668Ssam case RESET: 4113668Ssam if (set == 0) break; 4213668Ssam set = 0; 4313668Ssam ioctl(Ifn, TCSETAW, &sbuf); 4413668Ssam break; 4513668Ssam } 4613668Ssam #endif 4713668Ssam } 48