Category : Pascal Source Code
Archive   : PASS_ALL.ZIP
Filename : TI116.ASC

 
Output of file : TI116.ASC contained in archive : PASS_ALL.ZIP








PRODUCT : TURBO TUTOR NUMBER : 116
VERSION : 2.00x
OS : ALL
DATE : May 21, 1986 PAGE : 1/6
TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D




This file describes modifications which you can make to versions
2.00A, 2.00B, or 2.00C of LISTT.PAS which will update them to the
current version, 2.00D. Since the changes apply to several
different versions, ignore any modifications that have already
been made. If you have the CP/M-80 version, you must edit both
files LISTT.PAS and LISTT2.INC in order to complete the changes.

LISTT 2.00D remedies the following conditions which appeared last
in version:

1. 2.00A (for MS-DOS only) - failure to see an open- or close-
comment near the end of a long line resulting in key words not
capitalized, or directives missed.

2. 2.00A - hang on lines ending in an open-comment.

3. 2.00B - The command line buffer in correctly copied into a
local variable.

4. 2.00B (for MS-DOS only)
A) Times between noon and 12:59 P.M. printed as A.M.
B) Times of 12:?? A.M. or P.M. printed as 00:??.

5. 2.00C (for MS-DOS only) - LISTT failing to close the include
files resulting in not all of the files being printed.

6. 2.00C - Certain printer escape sequences were not interpreted
properly.

Important Note: Replace all version numbers with the current
version: 2.00D. There are three instances of
the version number throughout the program.


In the procedure ListIt:

Change from:
Line: Buffer;

Change to:
Line, Remainder: Buffer; { modification ver. 2.00B }
















PRODUCT : TURBO TUTOR NUMBER : 116
VERSION : 2.00x
OS : ALL
DATE : May 21, 1986 PAGE : 2/6
TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D




In procedure UpKeyWords:

Change from:

Var
First, LL, LK, I, J: Integer;
PossibleKey: String[MaxKeyLenPlus1];
Min, Max, Guess: Integer;
Found: Boolean;

Change to:
Var
First, LL, LK, I, J: Integer;
PossibleKey: String[MaxKeyLenPlus1];
Min, Max, Guess: Integer;
Found: Boolean;
Line1: Buffer; { addition ver. 2.00B }


Change from:
If Line[Length(Line)]=Chr(254) Then Line[0]:=Pred(Line[0]);
End { If UpKeys }
Else { Not UpKeys }
While I Begin
Case Line[I] Of
'{': If ParseState<>Quoted Then ParseState:=Comment;
'(': If (ParseState<>Quoted) And
(Copy(Line,I,2)='(*') Then
ParseState:=Comment2;
'}': If ParseState=Comment Then ParseState:=PreKey;
'*': If (ParseState=Comment2) And
(Copy(Line,I,2)='*)') Then
ParseState:=PreKey;
'''': If ParseState=Quoted Then ParseState:=PreKey

Change to:
If Line[Length(Line)]=Chr(254) Then
Line[0]:=Pred(Line[0]);
End; { If UpKeys }
Line1:=Remainder;
{ addition ver. 2.00B note deletion of Else; }
If UpKeys And (Line[Length(Line)]='*') Then














PRODUCT : TURBO TUTOR NUMBER : 116
VERSION : 2.00x
OS : ALL
DATE : May 21, 1986 PAGE : 3/6
TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D




Line1:='*'+Line1; { addition ver. 2.00B }
If Not UpKeys Then Line1:=Line+Remainder;
{ addition ver. 2.00B }
I:=1; LL:=Length(Line1)+1; { addition ver. 2.00B }
While I Begin
Case Line1[I] Of { modification ver. 2.00B }
'{': If ParseState<>Quoted Then ParseState:=Comment;
'(': If (ParseState<>Quoted) And
(Copy(Line1,I,2)='(*') Then
{ modification ver. 2.00B }
ParseState:=Comment2;
'*': If (ParseState=Comment2) And
(Copy(Line1,I,2)='*)') Then
{ modification ver. 2.00B }
ParseState:=PreKey;
'''': If ParseState=Quoted Then ParseState:=PreKey


In the procedure TruncateLine:

Change from:
Begin
Remainder:=Copy(Line,LineWidth-Extra+1,200);
Line:=Copy(Line,1,LineWidth-Extra);
End

Change to:
Begin
Remainder:=Copy(Line,LineWidth-Extra+1,200);
Line:=Copy(Line,1,LineWidth-Extra);
End
Else { addition ver. 2.00B }
Remainder := ''; { addition ver. 2.00B }


In the procedure ProcessDirectives:

Change from:
If Temp=-1 Then Temp:=Length(Copy(Line,Where+1,200))-1;
CheckDirective(Where+1,Temp);
If Not WasCmd Then Where:=Where+Temp+1;
End;














PRODUCT : TURBO TUTOR NUMBER : 116
VERSION : 2.00x
OS : ALL
DATE : May 21, 1986 PAGE : 4/6
TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D




'(': Begin
Temp:=Pos('*)',Copy(Line,Where+2,200))-1;
If Temp=-1 Then Temp:=Length(Copy(Line,Where+1,200))-1;
CheckDirective(Where+2,Temp);
If Not WasCmd Then Where:=Where+Temp+3;

Change to:
If Temp=-1 Then Temp:=Length(Copy(Line,Where+1,200));
{ modification 2.00B }
CheckDirective(Where+1,Temp);
If Not WasCmd Then Where:=Where+Temp+2;
{ modification 2.00B }
End;
'(': Begin
Temp:=Pos('*)',Copy(Line,Where+2,200))-1;
If Temp=-1 Then Temp:=Length(Copy(Line,Where+1,200))-1;
{ modification 2.00B }
CheckDirective(Where+2,Temp);
If Not WasCmd Then Where:=Where+Temp+4;
{ modification 2.00B }


In the function CommandLineArgument:

Change from:
Begin
CLA:='';
While (J<=Length(CommandLine)) And (CommandLine[J]=' ') Do
While (J<=Length(CommandLine)) And (CommandLine[J]<>' ') Do
Begin
CLA:=CLA+CommandLine[J];
J:=J+1;
End;
End;

Change to:
Begin
CLA:='';
While (J<=Length(CommandLineBuffer)) And
(CommandLineBuffer[J]=' ') Do
{ modification ver. 2.00B }
While (J<=Length(CommandLineBuffer)) And
(CommandLineBuffer[J]<>' ') Do














PRODUCT : TURBO TUTOR NUMBER : 116
VERSION : 2.00x
OS : ALL
DATE : May 21, 1986 PAGE : 5/6
TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D




{ modification ver. 2.00B }
Begin
CLA:=CLA+CommandLineBuffer[J];
{ modification ver. 2.00B }
J:=J+1;
End;
End;


In the procedure InitParms:

Change from:
AM_PM:='am';
If CH>12 Then
Begin
CH:=CH-12;
AM_PM:='pm';
End;
Str(CH:2,Hour);

Change to:
AM_PM:='am';
If CH>11 Then { modification ver. 2.00C }
Begin
CH:=CH-12;
AM_PM:='pm';
End;
If CH=0 Then CH:=12; { addition ver. 2.00C }
Str(CH:2,Hour);


In the procedure CheckDirective:

Change from:
If PageForIncludes And PageStarted Then NewPage;
CurrentInFileName:=InFileName;
End; { Else include file was found }

Change to:
If PageForIncludes And PageStarted Then NewPage;
CurrentInFileName:=InFileName;
Close(IncludeFile); { addition ver. 2.00D }
End; { Else include file was found }














PRODUCT : TURBO TUTOR NUMBER : 116
VERSION : 2.00x
OS : ALL
DATE : May 21, 1986 PAGE : 6/6
TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D




In the function CmdStr:

Change from:
Function CmdStr: Buffer;

Begin
CmdStr:=Copy(Line,Where+3,Len-3);
End;

Change to:
Function CmdStr: Buffer;

Var { addition ver. 2.00D }
S: Buffer; { addition ver. 2.00D }

Begin
S:=Copy(Line,Where+3,Len-3);
{ modification ver. 2.00D }
if (Length(S) > 2) and (Copy(S, 1, 2) = '^[') then
{ addition ver. 2.00D }
CmdStr:=#27+Copy(S, 3, Length(S)-2)
{ addition ver. 2.00D }
else { addition ver. 2.00D }
CmdStr:=S; { addition ver. 2.00D }
End;


























  3 Responses to “Category : Pascal Source Code
Archive   : PASS_ALL.ZIP
Filename : TI116.ASC

  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/