From: Rick Adams Date: Thu, 25 Feb 1988 11:45:09 +0000 (-0800) Subject: add ifdefs for non-vaxes and sequents X-Git-Tag: BSD-4_3_Net_1-Snapshot-Development~2498 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/5ebee54441a7fdb912615b5947d5de033da420c0 add ifdefs for non-vaxes and sequents SCCS-vsn: usr.bin/uucp/acucntrl/acucntrl.c 5.10 --- diff --git a/usr/src/usr.bin/uucp/acucntrl/acucntrl.c b/usr/src/usr.bin/uucp/acucntrl/acucntrl.c index 9ab684be93..552d71e7da 100644 --- a/usr/src/usr.bin/uucp/acucntrl/acucntrl.c +++ b/usr/src/usr.bin/uucp/acucntrl/acucntrl.c @@ -1,5 +1,5 @@ #ifndef lint -static char sccsid[] = "@(#)acucntrl.c 5.9 (Berkeley) %G%"; +static char sccsid[] = "@(#)acucntrl.c 5.10 (Berkeley) %G%"; #endif /* acucntrl - turn around tty line between dialin and dialout @@ -46,10 +46,17 @@ static char sccsid[] = "@(#)acucntrl.c 5.9 (Berkeley) %G%"; /* #define SENSECARRIER */ #include "uucp.h" +#ifdef DIALINOUT #include #include #include -#include "/sys/vaxuba/ubavar.h" +#ifdef vax +#ifdef BSD4_2 +#include +#else +#include +#endif +#endif /* vax */ #include #include #include @@ -168,8 +175,10 @@ int argc; char *argv[]; opnttys(device); +#ifdef vax /* Get nlist info */ nlist("/vmunix", nl); +#endif vax /* Chdir to /dev */ if(chdir(Devhome) < 0) { @@ -224,13 +233,23 @@ int argc; char *argv[]; exit(2); } +#ifndef sequent /* Disable modem control */ if (setmodem(device, DISABLE) < 0) { fprintf(stderr, "Unable to disable modem control\n"); exit(1); } +#endif !sequent if (enable) { +#ifdef sequent + if (setmodem(device, ENABLE) < 0) { + fprintf(stderr, "Cannot Enable modem control\n"); + (void)setmodem(device, i); + exit(1); + } +#endif sequent +#ifndef sequent if((devfile = open(device, 1)) < 0) { fprintf(stderr, "On open of %s: %s\n", device, sys_errlist[errno]); @@ -252,13 +271,16 @@ int argc; char *argv[]; "Cannot set hangup on close on %s: %s\n", device, sys_errlist[errno]); +#endif !sequent i = resetmodem; +#ifndef sequent if (setmodem(device, ENABLE) < 0) { fprintf(stderr, "Cannot Enable modem control\n"); (void)setmodem(device, i); exit(1); } +#endif sequent resetmodem=i; if (settys(ENABLE)) { @@ -307,6 +329,13 @@ int argc; char *argv[]; pokeinit(device, Uname, enable); } post(device, Uname); +#ifdef sequent + /* Disable modem control */ + if (setmodem(device, DISABLE) < 0) { + fprintf(stderr, "Unable to disable modem control\n"); + exit(1); + } +#endif sequent if((devfile = open(device, O_RDWR|O_NDELAY)) < 0) { fprintf(stderr, "On %s open: %s\n", device, sys_errlist[errno]); @@ -545,6 +574,10 @@ char *device; *p = '\0'; if(strncmp(device, &linebuf[2], ndevice) == 0) { (void)fclose(ttysfile); +#ifdef sequent + /* Why is the sequent off by one? */ + utmploc += sizeof(utmp); +#endif sequent return; } ttyslnbeg += lnsiz; @@ -586,6 +619,17 @@ int enable; } #endif !BSD4_3 +#ifdef sequent +setmodem(ttyline, enable) +char *ttyline; int enable; +{ + char *sysbuf[BUFSIZ]; + sprintf(sysbuf,"/etc/ttyconfig /dev/%s -special %s", ttyline, + enable ? "-carrier" : "-nocarrier"); + system(sysbuf); +} +#endif /* sequent */ +#ifdef vax /* * Excerpted from (June 8, 1983 W.Sebok) * > ttymodem.c - enable/disable modem control for tty lines. @@ -713,6 +757,7 @@ char *ttyline; int enable; } return(0); } +#endif /* vax */ prefix(s1, s2) register char *s1, *s2; @@ -724,3 +769,4 @@ prefix(s1, s2) return (1); return (c == '\0'); } +#endif /* DIALINOUT */