program ed;           { PASCAL-Entwurf fuer den TRAC Editor }

{$V-}                 { switch off string parameter checking }
{$Iedvar.pas}         { Variable declarations }
{$Iedfct.pas}         { Function declarations }
{$Iedpmp.pas}         { Prompt subroutines }
{$Iedfil.pas}         { File operation }
{$Ieddis.pas}         { Screen display }
{$Iedind.pas}         { Index localization }
{$Iedfnd.pas}         { Find & replace }
{$Iedscr.pas}         { Text scroll }
{$Iedcur.pas}         { Cursor movement }
{$Iedins.pas}         { Text insert }
{$Ieddel.pas}         { Text delete }
{$Iedblk.pas}         { Block operations }
{$Iedsta.pas}         { Show status line }
{$Iedend.pas}         { End edit }

procedure cleanup;
begin
GotoXY(SCREENLEFT,SCREENBOTTOM);
end; { cleanup }
                      { --- Main program --- }

begin  { ed }
{$Iedini.pas}         { Init tables and variables }
finis:=false;
repeat                { Process input from keyboard }
loop: show_status;
      read(KBD,ch);
      case ch of
      ^Q:
{$Iedq}               { Q-commands }
      ^K:
{$Iedk}               { K-commands }
      else
{$Iedc}               { all other control char commands }
      end;
until finis;
cleanup;
end.  { ed }
