v3451.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright (c) 2000 by Sun Microsystems, Inc.
* All rights reserved.
*/
/* from UCB 4.4 6/25/83 */
/*
* 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 calling up on a Vadic 3451 Modem
*/
#include "tip.h"
static sigjmp_buf Sjbuf;
register char *num;
char *acu;
{
int ok;
void (*func)();
char phone[50];
#ifdef ACULOG
char line[80];
#endif
/*
* Get in synch
*/
if (!expect("READY")) {
printf("can't synchronize with vadic 3451\n");
#ifdef ACULOG
#endif
return (0);
}
sleep(1);
if (!expect("NUMBER?")) {
printf("Vadic will not accept dial command\n");
#ifdef ACULOG
#endif
return (0);
}
printf("Vadic will not accept phone number\n");
#ifdef ACULOG
#endif
return (0);
}
/*
* You cannot interrupt the Vadic when its dialing;
* even dropping DTR does not work (definitely a
* brain damaged design).
*/
if (!expect("DIALING:")) {
printf("Vadic failed to dial\n");
#ifdef ACULOG
#endif
return (0);
}
printf("\ndialing...");
if (!ok) {
printf("call failed\n");
#ifdef ACULOG
#endif
return (0);
}
return (1);
}
{
}
{
}
static
register char *cp;
int delay;
{
}
static
register char *cp;
{
char buf[300];
static void alarmtr();
return (1);
*rp = 0;
/*
* If we are waiting for the Vadic to complete
* dialing and get a connection, allow more time
* Unfortunately, the Vadic times out 24 seconds after
* the last digit is dialed
*/
if (online)
return (0);
return (0);
alarm(0);
return (0);
}
if (*rp &= 0177)
rp++;
*rp = '\0';
}
alarm(0);
return (1);
}
static void
alarmtr()
{
}
static
{
return (0);
return (1);
}
static
{
register char c;
if (c == '\0')
return (1);
return (c == '\0');
}