SCCS-vsn: usr.bin/uucp/acucntrl/acucntrl.c 5.10
-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
#endif
/* acucntrl - turn around tty line between dialin and dialout
/* #define SENSECARRIER */
#include "uucp.h"
/* #define SENSECARRIER */
#include "uucp.h"
#include <sys/buf.h>
#include <signal.h>
#include <sys/conf.h>
#include <sys/buf.h>
#include <signal.h>
#include <sys/conf.h>
-#include "/sys/vaxuba/ubavar.h"
+#ifdef vax
+#ifdef BSD4_2
+#include <vaxuba/ubavar.h>
+#else
+#include <sys/ubavar.h>
+#endif
+#endif /* vax */
#include <sys/stat.h>
#include <nlist.h>
#include <sgtty.h>
#include <sys/stat.h>
#include <nlist.h>
#include <sgtty.h>
/* Get nlist info */
nlist("/vmunix", nl);
/* Get nlist info */
nlist("/vmunix", nl);
/* Chdir to /dev */
if(chdir(Devhome) < 0) {
/* Chdir to /dev */
if(chdir(Devhome) < 0) {
/* Disable modem control */
if (setmodem(device, DISABLE) < 0) {
fprintf(stderr, "Unable to disable modem control\n");
exit(1);
}
/* Disable modem control */
if (setmodem(device, DISABLE) < 0) {
fprintf(stderr, "Unable to disable modem control\n");
exit(1);
}
+#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]);
if((devfile = open(device, 1)) < 0) {
fprintf(stderr, "On open of %s: %s\n",
device, sys_errlist[errno]);
"Cannot set hangup on close on %s: %s\n",
device, sys_errlist[errno]);
"Cannot set hangup on close on %s: %s\n",
device, sys_errlist[errno]);
if (setmodem(device, ENABLE) < 0) {
fprintf(stderr, "Cannot Enable modem control\n");
(void)setmodem(device, i);
exit(1);
}
if (setmodem(device, ENABLE) < 0) {
fprintf(stderr, "Cannot Enable modem control\n");
(void)setmodem(device, i);
exit(1);
}
resetmodem=i;
if (settys(ENABLE)) {
resetmodem=i;
if (settys(ENABLE)) {
pokeinit(device, Uname, enable);
}
post(device, Uname);
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]);
if((devfile = open(device, O_RDWR|O_NDELAY)) < 0) {
fprintf(stderr, "On %s open: %s\n",
device, sys_errlist[errno]);
*p = '\0';
if(strncmp(device, &linebuf[2], ndevice) == 0) {
(void)fclose(ttysfile);
*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;
return;
}
ttyslnbeg += lnsiz;
+#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.
/*
* Excerpted from (June 8, 1983 W.Sebok)
* > ttymodem.c - enable/disable modem control for tty lines.
prefix(s1, s2)
register char *s1, *s2;
prefix(s1, s2)
register char *s1, *s2;
return (1);
return (c == '\0');
}
return (1);
return (c == '\0');
}