t3000.c (7799f52a32f592a7efe259bc3411ba52d13db797) | t3000.c (e1b4d8d0746069292d84708b0e11b17a7e1ef5e0) |
---|---|
1/* 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint | 1/* 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint |
35static char sccsid[] = "@(#)t3000.c 8.1 (Berkeley) 6/6/93"; 36#endif /* not lint */ | 35static const char rcsid[] = 36 "$FreeBSD$"; 37#endif |
37 38/* 39 * Routines for calling up on a Telebit T3000 modem. 40 * Derived from Courier driver. 41 */ 42#include "tipconf.h" 43#include "tip.h" 44#include "acucommon.h" 45#include <stdio.h> | 38 39/* 40 * Routines for calling up on a Telebit T3000 modem. 41 * Derived from Courier driver. 42 */ 43#include "tipconf.h" 44#include "tip.h" 45#include "acucommon.h" 46#include <stdio.h> |
47#include <unistd.h> |
|
46 47#define MAXRETRY 5 48 49static void sigALRM(); 50static int timeout = 0; 51static int connected = 0; 52static jmp_buf timeoutbuf, intbuf; 53static int t3000_sync(); --- 256 unchanged lines hidden (view full) --- 310 311t3000_write(fd, cp, n) 312int fd; 313char *cp; 314int n; 315{ 316#ifdef notdef 317 if (boolean(value(VERBOSE))) | 48 49#define MAXRETRY 5 50 51static void sigALRM(); 52static int timeout = 0; 53static int connected = 0; 54static jmp_buf timeoutbuf, intbuf; 55static int t3000_sync(); --- 256 unchanged lines hidden (view full) --- 312 313t3000_write(fd, cp, n) 314int fd; 315char *cp; 316int n; 317{ 318#ifdef notdef 319 if (boolean(value(VERBOSE))) |
318 write(1, cp, n); | 320 write(STDOUT_FILENO, cp, n); |
319#endif 320 acu_flush (); 321 t3000_nap(); 322 for ( ; n-- ; cp++) { 323 write(fd, cp, 1); 324 acu_flush (); 325 t3000_nap(); 326 } --- 6 unchanged lines hidden (view full) --- 333 char buf[BUFSIZ]; 334 335 if (ioctl(FD, FIONREAD, &n) < 0) 336 return; 337 if (n <= 0) 338 return; 339 if (read(FD, buf, n) != n) 340 return; | 321#endif 322 acu_flush (); 323 t3000_nap(); 324 for ( ; n-- ; cp++) { 325 write(fd, cp, 1); 326 acu_flush (); 327 t3000_nap(); 328 } --- 6 unchanged lines hidden (view full) --- 335 char buf[BUFSIZ]; 336 337 if (ioctl(FD, FIONREAD, &n) < 0) 338 return; 339 if (n <= 0) 340 return; 341 if (read(FD, buf, n) != n) 342 return; |
341 write(1, buf, n); | 343 write(STDOUT_FILENO, buf, n); |
342} 343#endif 344 345t3000_nap() 346{ 347 acu_nap (50); 348} 349 350/* end of t3000.c */ | 344} 345#endif 346 347t3000_nap() 348{ 349 acu_nap (50); 350} 351 352/* end of t3000.c */ |