home *** CD-ROM | disk | FTP | other *** search
- {**********************************************************************}
- {* Z a p C o l o r s : Modify Compiler Menu/Edit Colors *}
- {* *}
- {* Separate this file into ZCOLOR.210 *}
- {**********************************************************************}
- Procedure Zap_Colors; { Reverse Compiler Intensity }
- Var
- Zap_Address :integer;
- Chval,
- Char_Hi,Char_Lo,Char_Marked,Char_Err :byte;
- {------------------------------------------------------------------------}
- { Find_Colors : Find old colors and postion to Output File }
- {------------------------------------------------------------------------}
- Procedure Find_Colors;
-
- Begin
- Zap_type := Zap_Edit_Colors;
- { Find original Colors positn}
- Find_Zap(Zap_Headers[zap_type],Return_Code);
-
- If ( Return_Code = 0 ) then { Get Zap address }
- Begin {Find Zap} { for reference only }
- Read(Zap_File,Zap_Address);
- Seek(ComOut_File,Zap_Address-$100); { Seek to Zap Address }
- { Current Attributes }
- Read(ComOut_File,Char_Hi,Char_Lo,Char_Marked,Char_Err);
-
- Repeat {unitl Chval = 13} { Get Hilite Colors }
- Textcolor(Char_Hi and $0F);TextBackground(Char_Hi shr 4);
- ClrScr;Write(' Enter Editor ');
- Textcolor(Char_Hi and $0F +Blink);
- Write('Hilite ');
- Textcolor(Char_Hi and $0F);
- Write('Attributes:');Writeln;
- Select_color(Char_Hi); { Get New Colors }
- Textcolor(Char_Hi and $0F);TextBackground(Char_Hi shr 4);
- ClrScr;Writeln(' Return if acceptable or hit any key...');
- Chval := Keyin;
- Until (Chval = 13);
-
- Repeat {unitl Chval = 13} { Get Normal color attrib}
- Textcolor(Char_Lo and $0F);TextBackground(Char_Lo shr 4);
- ClrScr;Write(' Enter Editor ');
- Textcolor(Char_Lo and $0F+Blink); Write('Normal Text ');
- Textcolor(Char_Lo and $0F); Writeln('Attributes:');
- Select_color(Char_Lo); { Get New Colors }
- Textcolor(Char_Lo and $0F);TextBackground(Char_Lo shr 4);
- ClrScr;Writeln(' Return if acceptable or hit any key...');
- Chval := Keyin;
- Until (Chval = 13);
-
- Repeat {unitl Chval = 13} { Get Error Attributes }
- Textcolor(Char_Marked and $0F);TextBackground(Char_Marked shr 4);
- ClrScr;Write(' Enter Editor ');
- Textcolor(Char_Marked and $0F+Blink);Write('Marked Text ');
- Textcolor(Char_Marked and $0F);Writeln('Attributes:');
- Select_color(Char_Marked); { Get New Colors }
- Textcolor(Char_Marked and $0F);TextBackground(Char_Marked shr 4);
- ClrScr;Writeln(' Return if acceptable or hit any key...');
- Chval := Keyin;
- Until (Chval = 13);
-
- Repeat {unitl Chval = 13} { Get Error Attributes }
- Textcolor(Char_Err and $0F);TextBackground(Char_Err shr 4);
- ClrScr;Write(' Enter ');
- Textcolor(Char_Err and $0F+Blink);Write('Error Message Text ');
- Textcolor(Char_Err and $0F);Writeln('Attributes:');
- Select_color(Char_Err); { Get New Colors }
- Textcolor(Char_Err and $0F);TextBackground(Char_Err shr 4);
- ClrScr;Writeln(' Return if acceptable or hit any key...');
- Chval := Keyin;
- Until (Chval = 13);
-
- Seek(ComOut_File,Zap_Address-$100); { Seek to Zap Address }
- Return_Code := IOresult; { Write New Attributes }
- Write(ComOut_File,Char_Hi,Char_Lo,Char_Marked,Char_Err);
-
- End; {Find_Zap Return_Code = 0}
- End;{Procedure Find_Colors}
- {-----------------------------------------------------------------------}
- { M A I N Z a p _ C o l o r s P r o c e d u r e }
- {-----------------------------------------------------------------------}
-
- Begin { Procedure Zap_Colors}
- Get_Abs_Cursor(x,y); { Get current cursor position }
- MkWin(x,y,x+48,y+7,White); { Make an input window }
- Textcolor(Bright+Blue); TextBackground(Black); Clrscr;
-
- Open_Compiler; { Open Compiler/Get Version }
- If (Return_Code = 0) then Find_Colors;
-
- If (Return_Code <> 0) then
- Begin { Write Error msg and pause }
- Pause(' Error Processing Edit Color Zap ');
- end;
- If (Return_Code = 0) then
- Begin
- Pause(' Compiler Color Zaps Completed ');
- end;
-
- Close(Zap_File);
- Close(ComOut_File);
- RmWin;
-
- End; { Procedure Zap_Colors }
- {......................................................................}