home *** CD-ROM | disk | FTP | other *** search
- Unit STI_ED_V; { variables for the editor }
-
- interface
-
- Uses
- STI_SCRF;
-
- Const
- MAX_LINES = 5000; { maximum number of lines }
- MAX_LEN = 128; { maximum length of line }
-
- Type
- ChrSet = array[1..3] of byte; { for passing on characters }
- HelpProcedure = procedure;
- DirectoryFunc = function : string;
- PassOnProc = procedure(X : ChrSet);
-
- TabSet = array[1..MAX_LEN] of boolean; { tab flags }
- OneLine = string[MAX_LEN]; { declaration for a line }
- TBuffer = array[1..MAX_LINES] of ^OneLine;{ the text buffer type }
- BlockM = record { block marker }
- BC,EC : byte; { start and end column }
- BL,EL : word; { start and end line }
- end;
-
-
- Buffer = record
- HP : HelpProcedure; { procedure to call for help }
- DP : DirectoryFunc; { procedure to call for files }
- PP : PassOnProc; { procedure to pass on chars }
- Saved : boolean; { has the file been saved }
- TabWidth : byte; { with of tabs }
- TabMarks : TabSet; { markers for tabs }
- Block : BlockM; { for marking blocks }
- FileName : string[128]; { text file name }
- X1,Y1, { screen sizes }
- X2,Y2 : byte; { " " }
- Border : boolean; { use a border or not }
- TextCol, { text color }
- BorderCol, { border color }
- PromptCol : byte; { prompt color }
- WinSave : WindowSave; { saved screen pointer }
- TextBuffer : ^TBuffer; { the text buffer }
- NoLines : word; { number of lines }
- Insert : boolean; { insert or not }
- Column : byte; { the column number }
- Row : word; { the line number }
- SCRX,SCRY : byte; { screen position in window }
- OldX,OldY : byte; { old screen positions }
- OldWMin, { old window dimentions }
- OldWMax : word; { old window dimentions }
- Done : boolean; { flag for edit end }
- end;
-
- Var
- Edit_Buffer : ^Buffer; { the actual buffer }
- SearchString, { the search string }
- ReplaceString : string[MAX_LEN]; { the replacement string }
-
- {---------------------------------------------------------------------------}
-
- implementation
-
- begin
- Edit_Buffer := NIL;
- SearchString := '';
- ReplaceString := '';
- end.