Path: utzoo!utgpu!jarvis.csri.toronto.edu!torsqnt!tmsoft!masnet!canremote!perry@macom1.uucp From: perry@macom1.uucp@canremote.uucp (perry@macom1.UUCP) Newsgroups: comp.dcom.modems Subject: Re: Telebit config Question c Message-ID: <89122504055353@masnet.uucp> Date: 21 Dec 89 05:05:00 GMT Organization: Canada Remote Systems Limited, Mississauga, ON, Canada Lines: 98 From: perry@macom1.UUCP (Guru's Inc.) Subj: Telebit config Question c-code uugetty Orga: CENTEL Federal Systems, Reston, VA. 22091-1506 *-*-*-*-* Message continued from prior message *-*-*-*-* { track("outgoing"); signal(SIGHUP, hangup);/* 01 watch for hangups */ while( (r=system(cbuf)) == 0 ) sleep(20); conprint(0); } else track("idle"); } intread() /*** track Interrupted Read; die if here too often.. ***/ { track("IR-"); if ( ++i > 40 ) hangup(); } !SYSV end System V version of argetty.c Xenix version: application uugin is automatically invoked by Xenix. Edit the file /etc/gettydefs and create a new line like this: R # B9600 CS8 SANE ICANON TAB3 IXANY # B9600 CS8 SANE TAB3 IXANY #..login: # R # AUTO /etc/uugin The above line should be entered as one continuous line even though it will wrap around. The letter 'R' is just an example. Edit the file /etc/ttys and modify the line that corresponds to the port the application 'uugin' will be run on to look like this: 1RttyA8t (example on the Zenith Z1000, a new machine) Cut xenix uugin.c here>>!Xenix static char Version[] = "@(#)/usr/src/uugin.c 1.0 11 Dec 89 - Centel"; /*********************************************** uugin: Bidirectional getty 1.0 11 Dec 89"; Z-1000 version P. Mathis ************************************************/ #include #include #define CR 0x0D extern char * strcpy(); extern sleep(); static char port[20] = "/dev/",mtty[35] = "/usr/spool/uucp/ttyxxx/ttyxxx", Lock[35] = "/usr/spool/uucp/LCK..", cbuf[50], buf[100], pbuf[20], prg[34], *device; int parent, child, i=0, mask; int intrexit(); FILE *dbf; static int fd1, fd2, lockfd, pterm; /***... Interrupt routines ...***/ trap0() {intrexit();} trap1() {track("hang"); signal( SIGHUP, trap1 );} trap2() {track("intr(2)"); intrexit();} trap3() {track("quit(3)"); intrexit();} trap15() {track("term(15)"); intrexit();} intrexit() { conprint(0); } conprint(n) /*** Send trace msg to crfile/console. ***/ int n; { close(fd1); if(n == 0) ; else { fd2 = open("/dev/console", 1); write(fd2, buf, (unsigned)strlen(buf) ); close(fd2); } sleep(n); exit(0); } track(msg) char *msg; { sprintf(buf, "%9s\n",msg); write(fd1, buf, (unsigned)strlen(buf) ); } main( argc, argv ) int argc; char **argv; { int inithookup = 1; signal( SIGHUP, trap1 ); /* 01 watch for *-*-*-*-* Message continued in next message *-*-*-*-* --- * Via MaSNet/HST96/HST144/V32 - UN Datacommun./Modems * Via Usenet Newsgroup comp.dcom.modems