1 /*- 2 * Copyright (c) 1985, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.proprietary.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)setline.c 8.1 (Berkeley) 06/06/93"; 10 #endif /* not lint */ 11 12 #include "uucp.h" 13 #ifdef USG 14 #include <termio.h> 15 #endif 16 17 #define PACKSIZE 64 18 #define SNDFILE 'S' 19 #define RCVFILE 'R' 20 #define RESET 'X' 21 22 /*LINTLIBRARY*/ 23 24 /* 25 * optimize line setting for sending or receiving files 26 * 27 * return code - none 28 */ 29 /*ARGSUSED*/ 30 setupline(type) 31 char type; 32 { 33 #ifdef USG 34 static struct termio tbuf, sbuf; 35 static int set = 0; 36 37 DEBUG(2, "setline - %c\n", type); 38 if (IsTcpIp) 39 return; 40 switch(type) { 41 case SNDFILE: 42 break; 43 case RCVFILE: 44 ioctl(Ifn, TCGETA, &tbuf); 45 sbuf = tbuf; 46 tbuf.c_cc[VMIN] = PACKSIZE; 47 ioctl(Ifn, TCSETAW, &tbuf); 48 set++; 49 break; 50 case RESET: 51 if (set == 0) break; 52 set = 0; 53 ioctl(Ifn, TCSETAW, &sbuf); 54 break; 55 } 56 #endif 57 } 58