home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
telix
/
tlxpcp15.arc
/
PCP1200.SLT
< prev
next >
Wrap
Text File
|
1989-01-06
|
3KB
|
99 lines
//This area is for user configurable variables
str message_tone[]="y";
str maintain_log[]="y";
str phone_no_1200_baud[]="232-4546";
///////////////////////////////////////////////////////////////////////////////
// //
// pcp1200 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];
clear_scr();
if(!carrier())
{
// Dail PCP at 1200 baud N82
strcat(phone,phone_no_1200_baud);
set_cparams(1200,0,8,2);
flag=dial(phone,0,1);
if(!flag)
{
status_wind("User aborted 1200 Baud Gateway to Pursuit!",30);
prints("+++ Gateway Aborted! +++");
beep(500);
hangup();
return;
}
ustamp("*** Connected to PC Pursuit at 1200 Baud.",1,1);
}
//Logon to PCP
status_wind("Logging on to Pursuit!",30);
prints("Logging on to Pursuit!");
cputs("^M");
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 (1200 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");
}