home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / nicol / sti_edit / sti_ed_v.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1990-11-08  |  3.3 KB  |  68 lines

  1. Unit STI_ED_V;                              { variables for the editor     }
  2.  
  3. interface
  4.  
  5. Uses
  6.   STI_SCRF;
  7.  
  8. Const
  9.   MAX_LINES   = 5000;                       { maximum number of lines       }
  10.   MAX_LEN     = 128;                        { maximum length of line        }
  11.  
  12. Type
  13.   ChrSet  = array[1..3] of byte;            { for passing on characters     }
  14.   HelpProcedure = procedure;
  15.   DirectoryFunc = function : string;
  16.   PassOnProc    = procedure(X : ChrSet);
  17.  
  18.   TabSet  = array[1..MAX_LEN] of boolean;   { tab flags                     }
  19.   OneLine = string[MAX_LEN];                { declaration for a line        }
  20.   TBuffer = array[1..MAX_LINES] of ^OneLine;{ the text buffer type          }
  21.   BlockM  = record                          { block marker                  }
  22.               BC,EC : byte;                 { start and end column          }
  23.               BL,EL : word;                 { start and end line            }
  24.             end;
  25.  
  26.  
  27.   Buffer  = record
  28.               HP          : HelpProcedure;  { procedure to call for help    }
  29.               DP          : DirectoryFunc;  { procedure to call for files   }
  30.               PP          : PassOnProc;     { procedure to pass on chars    }
  31.               Saved       : boolean;        { has the file been saved       }
  32.               TabWidth    : byte;           { with of tabs                  }
  33.               TabMarks    : TabSet;         { markers for tabs              }
  34.               Block       : BlockM;         { for marking blocks            }
  35.               FileName    : string[128];    { text file name                }
  36.               X1,Y1,                        { screen sizes                  }
  37.               X2,Y2       : byte;           { "        "                    }
  38.               Border      : boolean;        { use a border or not           }
  39.               TextCol,                      { text color                    }
  40.               BorderCol,                    { border color                  }
  41.               PromptCol   : byte;           { prompt color                  }
  42.               WinSave     : WindowSave;     { saved screen pointer          }
  43.               TextBuffer  : ^TBuffer;       { the text buffer               }
  44.               NoLines     : word;           { number of lines               }
  45.               Insert      : boolean;        { insert or not                 }
  46.               Column      : byte;           { the column number             }
  47.               Row         : word;           { the line number               }
  48.               SCRX,SCRY   : byte;           { screen position in window     }
  49.               OldX,OldY   : byte;           { old screen positions          }
  50.               OldWMin,                      { old window dimentions         }
  51.               OldWMax     : word;           { old window dimentions         }
  52.               Done        : boolean;        { flag for edit end             }
  53.             end;
  54.  
  55. Var
  56.   Edit_Buffer     : ^Buffer;                { the actual buffer             }
  57.   SearchString,                             { the search string             }
  58.   ReplaceString   : string[MAX_LEN];        { the replacement string        }
  59.  
  60. {---------------------------------------------------------------------------}
  61.  
  62. implementation
  63.  
  64. begin
  65.   Edit_Buffer   := NIL;
  66.   SearchString  := '';
  67.   ReplaceString := '';
  68. end.