=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tip/Attic/tip.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- src/usr.bin/tip/Attic/tip.c 2010/06/29 05:55:37 1.39 +++ src/usr.bin/tip/Attic/tip.c 2010/06/29 16:41:56 1.40 @@ -1,4 +1,4 @@ -/* $OpenBSD: tip.c,v 1.39 2010/06/29 05:55:37 nicm Exp $ */ +/* $OpenBSD: tip.c,v 1.40 2010/06/29 16:41:56 nicm Exp $ */ /* $NetBSD: tip.c,v 1.13 1997/04/20 00:03:05 mellon Exp $ */ /* @@ -34,7 +34,7 @@ * tip - UNIX link to other systems * tip [-v] [-speed] system-name * or - * cu phone-number [-s speed] [-l line] [-a acu] + * cu phone-number [-s speed] [-l line] */ #include @@ -138,13 +138,6 @@ } setbuf(stdout, NULL); loginit(); - - /* - * Kludge, their's no easy way to get the initialization - * in the right order, so force it here - */ - if ((PH = getenv("PHONES")) == NULL) - PH = _PATH_PHONES; vinit(); /* init variables */ setparity("none"); /* set the parity table */ @@ -159,11 +152,7 @@ (void)uu_unlock(uucplock); exit(3); } - if ((p = con())) { - printf("\07%s\n[EOT]\n", p); - (void)uu_unlock(uucplock); - exit(1); - } + con(); if (!HW && ttysetup(number(value(BAUDRATE)))) { fprintf(stderr, "%s: bad baud rate %ld\n", __progname, number(value(BAUDRATE))); @@ -237,6 +226,14 @@ } /*NOTREACHED*/ exit(0); +} + +void +con(void) +{ + if (CM != NULL) + parwrite(FD, CM, size(CM)); + logent(value(HOST), DV, "call completed"); } void