home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
telix
/
tlxpcp15.arc
/
PCP2400.SLT
< prev
next >
Wrap
Text File
|
1989-01-06
|
3KB
|
100 lines
//This area is for user configurable variables
str message_tone[]="y";
str maintain_log[]="y";
str phone_no_2400_baud[]="232-9513";
///////////////////////////////////////////////////////////////////////////////
// //
// pcp2400 v1.5 Copyright (c) by Charles Lee //
// January 1989 //
// //
///////////////////////////////////////////////////////////////////////////////
beep(int freq)
{
if((message_tone=="y")|(message_tone=="Y"))
{
tone(freq,20);
}
}
main()
{
int flag,
fp,
t;
str phone[20]="m",
usage_log_path[76],
buffer[12];
if(!carrier())
{
// Dail PCP at 2400 baud N82
strcat(phone,phone_no_2400_baud);
set_cparams(2400,0,8,2);
flag=dial(phone,0,1);
if(!flag)
{
status_wind("User aborted 2400 Baud Gateway to Pursuit!",30);
prints("+++ Gateway Aborted! +++");
beep(500);
hangup();
return;
}
ustamp("*** Connected to PC Pursuit at 2400 Baud.",1,1);
}
//Logon to PCP
status_wind("Logging on to Pursuit!",30);
prints("Logging on to Pursuit!");
cputs("@");
delay(10);
cputs("D^M");
flag=waitfor("=",5);
if(!flag)
{
status_wind("Unable to log on to Pursuit!");
prints("+++ Unable to log on! +++");
beep(500);
hangup();
return;
}
else
{
cputs("D1^M");
}
//Successful Logon!
beep(3000);
status_wind("Success!",30);
if((maintain_log=="y")|(maintain_log=="Y"))
{
status_wind("Updating usage log!",30);
usage_log_path=_script_dir;
strcat(usage_log_path,"usage.pcp");
fp=fopen(usage_log_path,"a+");
for(flag=4;flag;flag=flag-1)
{
fputc(0x0d,fp);
fputc(0x0a,fp);
}
t=curtime();
fputs("Logged on to PC Pursuit (2400 baud) on ",fp);
date(t,buffer);
fputs(buffer,fp);
fputs(" at ",fp);
time(t,buffer);
fputs(buffer,fp);
fputs(".",fp);
fputc(0x0d,fp);
fputc(0x0a,fp);
fclose(fp);
}
call("citydial.slc");
}