v831.c revision 8d489c7a815fcac696803219572e95aa01532b0f
/*
* Copyright 2005 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"
/*
* Routines for dialing up on Vadic 831
*/
#include "tip.h"
static char dialit(char *, char *);
static char *sanitize(char *);
static void alarmtr(void);
static sigjmp_buf jmpbuf;
static int child = -1;
int
{
int timelim;
(void) printf("\nstarting call...");
#ifdef DEBUG
#endif
(void) printf("line busy...");
else
(void) printf("acu open error...");
return (0);
}
return (0);
}
/*
* ignore this stuff for aborts
*/
(void) sleep(2);
}
/*
* open line - will return on carrier
*/
#ifdef DEBUG
#endif
(void) printf("lost carrier...");
else
(void) printf("dialup line open failed...");
(void) alarm(0);
return (0);
}
(void) alarm(0);
;
if (status) {
return (0);
}
return (1);
}
static void
alarmtr(void)
{
(void) alarm(0);
}
/*
* Insurance, for some reason we don't seem to be
* hanging up...
*/
void
v831_disconnect(void)
{
(void) sleep(2);
#ifdef DEBUG
#endif
if (FD > 0) {
}
}
void
v831_abort(void)
{
#ifdef DEBUG
#endif
(void) sleep(2);
if (child > 0)
if (AC > 0) {
}
if (FD > 0)
}
/*
* Sigh, this probably must be changed at each site.
*/
struct vaconfig {
char *vc_name;
char vc_rack;
char vc_modem;
} vaconfig[] = {
{ 0 }
};
#define ABORT 01
#define SI 017
#define STX 02
#define ETX 03
static char
{
char c;
int i;
#ifdef DEBUG
#endif
return ('Z');
break;
return ('K');
}
(void) sleep(1);
#ifdef DEBUG
#endif
if (i != 1)
c = 'M';
if (c == 'B' || c == 'G') {
#ifdef DEBUG
#endif
c = oc;
}
#ifdef DEBUG
(void) printf("dialit: returns %c\n", c);
#endif
return (c);
}
static char *
sanitize(char *s)
{
static char buf[128];
char *cp;
continue;
if (*s == '_')
*s = '=';
*cp++ = *s;
}
*cp++ = 0;
return (buf);
}