home *** CD-ROM | disk | FTP | other *** search
- PRODUCT : TURBO TUTOR NUMBER : 116
- VERSION : 2.00x
- OS : ALL
- DATE : May 21, 1986
-
- This file describes modifications which you can make to versions
- 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
-
- 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 }
-
-
- 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<LL Do
- 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
- 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<LL Do
- 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;
- '(': 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
- { 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 }
-
-
- 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;
-
-
-