cu.c revision 94e1761e7fc32a474e3106beedc664ce987b96ec
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "tip.h"
void cleanup(void);
void timeout(void);
/*
* Botch the interface to look like cu's
*/
void
{
int i;
static char sbuf[14];
if (argc < 2) {
"usage: cu telno [-t] [-s speed] [-a acu] [-l line] [-#]\n");
exit(8);
}
"cu: extra characters after flag: %s\n",
argv[1]);
goto usage;
case 't':
--argc;
continue;
case 'a':
break;
case 's':
if (argc < 3)
goto usage;
"cu: unsupported speed %s\n",
argv[2]);
exit(3);
}
break;
case 'l':
break;
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
if (CU)
if (DV)
break;
default:
goto usage;
}
}
/*
* The "cu" host name is used to define the
* attributes of the generic dialer.
*/
(void) printf("all ports busy\n");
exit(3);
}
if (i == -1) {
(void) printf("link down\n");
exit(3);
}
loginit();
userperm();
vinit();
setparity("none");
if (HW)
if (connect()) {
(void) printf("Connect failed\n");
myperm();
exit(1);
}
if (!HW)
}