home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / openall / ichi.lzh / ICHI.PAS < prev    next >
Pascal/Delphi Source File  |  1988-12-19  |  2KB  |  61 lines

  1. {$C-,I-,K-}
  2. program IchiEditor;
  3. { Note: Must declare maximum Stack/Heap on compilation.  Each $2000 of heap }
  4. {       provides work space for a 90k file.  We normally request $2000.     }
  5.  
  6. {$I VARTYPES.INC}  { Variable, type, and const declarations }
  7. {$I USERS.INC   }  { Message line plus other utility routines }
  8. {$I USER.INC    }  { Editor kernel and primitive level helper routines }
  9. {$I INITIALI.INC}  { File read/write, Initialization, help screens }
  10. {$I LOGO.INC    }  { Logo, marquee, and execDos procedures }
  11. {$I SCREEN.INC  }  { Screen updating routines   }
  12. {$I KCMD.INC    }  { Ctrl-K block oriented routines }
  13. {$I OCMD.INC    }  { Ctrl-O windows oriented routines }
  14. {$I QCMD.INC    }  { Ctrl-Q quick movements & search/replace routines }
  15. {$I CMD.INC     }  { General direct editing commands }
  16. {$I TASKINP.INC }  { Input classification and scheduling routines }
  17.  
  18. begin { program body }
  19.     if EditFileExist('ICHI.000') then
  20.         Ovrpath('.')
  21.     else if EditFileExist('\ICHI.000') then
  22.         Ovrpath('\')
  23.     else begin
  24.         clrscr;
  25.         gotoxy(10,10); write('╔═══════════════════════════════════════════════════╗');
  26.         gotoxy(10,11); write('║ ICHI.000 must be in the DEFAULT or ROOT directory ║');
  27.         gotoxy(10,12); write('╚═══════════════════════════════════════════════════╝');
  28.         gotoxy(1,20);
  29.         Beep; Exit;
  30.     end;
  31.  
  32.     EditInitialize;   { Obligatory initialization of dynamic structures }
  33.  
  34.     if paramCount = 1 then begin
  35.         fnameStr := paramStr(1);
  36.         if EditFileExist(fnameStr) then begin
  37.             EditAppCmdnam('Reading '+fnameStr);
  38.             EditFileRead(fnameStr);
  39.             Editbackground;
  40.             EditZapcmdnam;
  41.             EditUpdcmdline;
  42.         end
  43.         else begin
  44.             EditAppCmdnam('Creating new file '+fnameStr);
  45.             Curwin^.filename := fnameStr;
  46.         end;
  47.     end;
  48.  
  49.     EditdoLogo;
  50.     EditZapcmdnam;
  51.     EditUpdcmdline;
  52.     EditUpdExtraLine(Curwin^.Curline);
  53.  
  54.     while not Rundown do
  55.         if EditKeypressed then
  56.             EditClsinp
  57.         else
  58.             EditBackground;
  59.  
  60.     Clr_Scrn(VideoAdr, Defnorows * Defnocols, txtColor);
  61. end.