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