Category : Recently Uploaded Files
Archive   : SIMPLE3.ZIP
Filename : CALLBACK.PAS

 
Output of file : CALLBACK.PAS contained in archive : SIMPLE3.ZIP
Program Callback;
Uses Simple3, MiscUtil, CRT, SmpUtil;
{
Copyright (c) 1994 Herb Gilliland
Fossil and Ansi driver routines written exclusively by Chris Woodward.
Above routines are copyright (c)1992, 1993 respectively.
Callback door specifics are copyrighted to Herb Gilliland.
All rights reserved and observed.
}
Const VERSION = 'CALLBACK v1.2à';
Type
ExchangeListType = Array[1..400] of Integer;
Var
Port, WaitFor : Word;
PhoneNum : LongInt;
E : ExchangeListType;
AreaCode : Integer;
DialCode : String;
Config : BBSUserInfoREc;

Procedure NailEm;
Var X : Integer;
Begin
Swriteln('');
X := 1;
Repeat
Swrite('You have '+ToStr(30-X)+' seconds to disconnect. The door will call you back.');
If Carrier then write(' - Online');
swrite(CR);
Delay(1000);
Inc(X);
CallProc( SimpleUpdateProc );
Until (NOT Carrier) or (X = 30);
If Carrier then
Begin
Writeln;
Writeln( '*************** FATAL ERROR! COULD NOT DISCONNECT! ABORTING!' );
Halt(1);
End;
End;

Function GrabEm : Boolean;
Var X : Integer;
S : String;
Begin
S := DIALCODE+' '+ToStr(PhoneNum)+Chr(13);
X := 1;
delay(2000);
Repeat
Writeln( 'þ Attempting Reconnection (try ', X, '/3)' );
Swriteln( S );
Delay( Waitfor * 1000 );
X := X + 1;
CallProc( SimpleUpdateProc );
Until (Carrier) OR (X = 4);
If Carrier then Swriteln('----------------------WELCOME BACK!');
GrabEm := Carrier;
End;

Procedure CheckExchange;
Var Exchange, X : Integer;
Found : Boolean;
Begin
Swriteln('Exchanges supported in '+ToStr(areacode)+' area code: ');
For X := 2 to E[1] do If X / 10 = X div 10 then Swriteln(ToStr(E[x])) else
Swrite(ToStr(E[x])+' º');
Exchange := Trunc(PhoneNum/10000);
While (X <= E[1]) and (Not Found) do
Begin
Swrite(CR+'þ Checking['+ToStr(E[x])+'] Exchange ('+ToStr(Exchange)+') - ');
Found := E[x] = Exchange;
Delay(200);
X := X + 1;
End;
If Found then Swriteln( ' Found' ) else
Begin
Swriteln( ' NOT Found!' );
Swriteln('Exiting... ');
Halt;
End;
End;

Procedure GetPhone( Var L : Longint );
Var S : String;
X : Integer;
Begin
L := 0;
SReadString( S );
X := 1;
While X <= Length(S) do
Begin
If NOT(S[x] in ['1'..'9','0']) then Delete(S, X, 1);
Inc(x);
End;
Val(S, L, X);
Writeln('þ Processing Input (', S, ') <'+ToStr(L)+'>' );
End;

Procedure GetInfo;
Var C : Char;
Begin
Swrite('Are you in the '+ToStr(AreaCode)+' area code? [y/n] ');
Sreadchar( C );
If NOT(c in ['y','Y']) then
Begin
Swriteln('No');
Swriteln( 'Sorry '+ToStr(AreaCode)+' area code only please.' );
Halt;
End else
Begin
Swriteln('Yes');
Repeat
Swriteln('Enter a 7 digit number on the following line, area code '+ToStr(AreaCode)+' is presumed:');
GetPhone( PhoneNum );
Swrite('Confirm? [y/n] ');
SreadChar( C );
if Not (C in ['y','Y']) then Swriteln('No');
Until (C in ['y','Y']) and (PhoneNum <> 0);
Swriteln('Yes');
CheckExchange;
CheckCarrier := False;
NailEm;
GrabEm;
CheckCarrier := True;
End;
End;

Procedure Setup;
Var Tfile : Text;
X : Integer;
Begin
Swriteln('');
SWriteln( 'ÖÄÄÄÄ Locke''s '+VERSION+' ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿' );
SWriteln( 'ÀÄÄÄÄ Copyright (c) 1994 z8soft productions. ÄÄÄÄÄÄÄÄÄÄÄÄÄĽ' );
SWriteln( 'þ Reading Configuration File' );
SWriteln( 'þ Initializing Port '+ParamStr(1) );
Assign( Tfile, 'CALLBACK.CFG' );
Reset( Tfile );
Readln( Tfile, AreaCode );
Readln( Tfile, WaitFor );
Readln( Tfile, DIALCODE );
writeln( 'þ Area Code ', AreaCode);
writeln( 'þ Dial: ', DIALCODE, ' #' );
X := 2;
Repeat
Readln( Tfile, E[x] );
Inc(x);
Until (EOF( Tfile )) or (X > 400);
E[1] := X-1;
Close( Tfile );
End;

Begin
If ParamCount <> 1 then
Begin
Writeln('Locke''s'+VERSION+' - usage: ');
Writeln('callback ');
End else
Begin
CheckTime := FALSE;
GetInfoDOORSYS( Config, 'DOOR.SYS' );
InitSimple( Config );
Setup;
GetInfo;
End;
End.


  3 Responses to “Category : Recently Uploaded Files
Archive   : SIMPLE3.ZIP
Filename : CALLBACK.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/